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
Callback invoked upon receiving a change event.
function onChange() { __debug_330( 'Received a change event.' ); self.render(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "change() { }", "function onChange() {\n\t\t__debug_452( 'Received a change event.' );\n\t\tself.render();\n\t}", "handleEventChange() {\n }", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_730( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "onChange(callback) {\n\t\tthis.changeCallback = callback;\n\t}", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_259( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_488( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_587( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_596( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_412( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_475( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_520( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "onChanged(e){}", "function onChange() {\n\t\t__debug_457( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_332( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_429( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_577( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "onchange() {}", "function onChange() {\n console.log(\"something changed...\");\n \n }", "function onChange() {\n\t\t__debug_395( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "addChangeListener(callback) {\n this.on('change', callback);\n }", "function changeEvent() {\n var value_sub = properties.value;\n trigger_param_list.push(value_sub);\n // 'seek' event is like a forced-change event\n $pebble_slider_object.triggerHandler('seek', trigger_param_list);\n if (prev_change_value !== value_sub) {\n $pebble_slider_object.triggerHandler('change', trigger_param_list);\n prev_change_value = value_sub;\n }\n trigger_param_list.length = 0;\n }", "onChange(callback) {\n this.events.change.push({ callback });\n }", "function onChange() {\n if (input.get.call(element, valueField) !== observer.oldValue && !element.readOnly) {\n observer.set(input.get.call(element, valueField));\n }\n }", "function changeFunction() {\n\tconsole.log(\"onchange\");\n}", "addChangeListener (callback) {\n this.on(Constants.CHANGE_EVENT, callback);\n }", "onDidChange(callback) {\n return this.emitter.on('did-change', callback)\n }", "change(/*event*/) {\n this._super(...arguments);\n this._parse();\n }", "addChangeListener (callback) {\n\t\tthis.on(Constants.CHANGE_EVENT, callback);\n\t}", "function handleChange(editor, data, value) {\n onChange(value);\n }", "function handleChange(editor, data, value) {\n onChange(value);\n }", "onDataChange() {}", "changedCallback () {\n\t\tif (this.oldValue === this.value) return;\n\t\tthis._setTranslation();\n\t}", "change(fn, options) {\n\t\treturn this.on({ change: fn }, options);\n\t}", "change(fn, options) {\n\t\treturn this.on({ change: fn }, options);\n\t}", "onChange () {}", "onChange () {}", "onChange(changeListener) {\n changeListener.path = this.path;\n privateDataMap.get(this).addListener(changeListener, this.path);\n }", "handleChange(event) {\n this.dispatchEvent(new CustomEvent('change', {detail: event.target.value}));\n }", "function changed(change) {\n if (change.changeType === \"property\" && change.property === property) {\n fn(change);\n }\n }", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "_setOnChanges(){\n\t\tthis.inputs.forEach(i => i.addEventListener('change', this._onChange.bind(this)));\t\n\t}", "handleChange(event) {\n\n }", "function onChangeHandler(e) {\n\n }", "function onChangeHandler(e) {\n\n }", "emitChange() {\n\t\tthis.emit(CHANGE_EVENT)\n\t}", "addChangeListener(callback) {\n\t\tthis.on(CHANGE_EVENT, callback)\n\t}", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "internalOnChange(event) {\n const me = this,\n value = me.value,\n oldValue = me._lastValue;\n\n // Don't trigger change if we enter invalid value or if value has not changed (for IE when pressing ENTER)\n if (me.isValid && value !== oldValue) {\n me._lastValue = value;\n\n // trigger change event, signaling that origin is from user\n me.trigger('change', { value, oldValue, event, userAction: true });\n\n // per default Field triggers action event on change, but might be reconfigured in subclasses (such as Combo)\n if (me.defaultAction === 'change') {\n me.trigger('action', { value, oldValue, event });\n }\n }\n\n // since Widget has Events mixed in configured with 'callOnFunctions' this will also call onClick and onAction\n }", "handleChange () {\n this.props.onStatusChange(\n this.props.item.id,\n this.refs.checkbox.checked ? 'RESERVED' : 'NEW'\n );\n }", "_valueChanged() {\n // Send a global refresh to the bapge body.\n var event = new Event(\"change\");\n this._root.dispatchEvent(event);\n }", "emitChange() {\n this.emit(CHANGE_EVENT);\n }", "emitChange() {\n this.emit(CHANGE_EVENT);\n }", "_triggerChangeEvent() {\n\t\tif ( this.$control.rendered && ! this.changeEventDisabled ) {\n\t\t\tthis._updateSettings();\n\t\t\tthis.events.emit( 'change', this.settings );\n\t\t}\n\t}", "handleChange(event){\n changeHandler(event,this);\n }", "setOnValueChangeEvent(func){\r\n this._onValueChange = func;\r\n }", "function referenceOnChange() {\n MicroReferenceAPI.onStatusChange(criteriaId);\n }", "function handleChange(event, newValue) {\n setValue(newValue);\n }", "onChange(callback) {\n this.listeners.push(callback);\n }", "onGenericChange() {\n this.contentChanged.emit(void 0);\n }", "afterValidChange() { }", "static on_changed(chr, _retval) {\n let uuid = chr.getUuid()\n console.log(colours.fg.blue + \"[BLE] [CHANGE ]\" + colours.fg.yellow + \" UUID: \" + uuid.toString() + colours.fg.magenta + \" | data: 0x\" + bytes2hex(chr.getValue()) + colours.reset);\n }", "changedInput() {\n\n\t\tlet {isValid, error} = this.state.wasInvalid ? this.validate() : this.state;\n\t\tlet onChange = this.props.onChange;\n\t\tif (onChange) {\n\t\t\tonChange(this.getValue(), isValid, error);\n\t\t}\n\t\tif (this.context.validationSchema) {\n\t\t\tlet value = this.getValue();\n\t\t\tif (this.state.isMultiSelect && value === '') {\n\t\t\t\tvalue = [];\n\t\t\t}\n\t\t\tif (this.shouldTypeBeNumberBySchemeDefinition(this.props.pointer)) {\n\t\t\t\tvalue = Number(value);\n\t\t\t}\n\t\t\tthis.context.validationParent.onValueChanged(this.props.pointer, value, isValid, error);\n\t\t}\n\t}", "_evtChange(event) { }", "on_change(event)\n\t{\n\t\t// Extract `value` from the argument\n\t\t// of this `onChange` listener\n\t\t// (for convenience)\n\n\t\tlet value = event\n\n\t\tif (event.target !== undefined)\n\t\t{\n\t\t\tvalue = event.target.value\n\t\t}\n\n\t\t// Call the parent `onChange` handler\n\t\t// with the `value` as an argument\n\t\t// (for convenience)\n\n\t\tconst { onChange } = this.props\n\n\t\tonChange(value)\n\t}", "handleChange() {\n this.forceUpdate();\n }", "function triggerChange(t) { t.dispatchEvent(changeEvent) }", "function onChange() {\n\n // hide and show input elements for which this is necessary\n setVisibility();\n\n // update preview considering the changed input value\n updatePreview();\n\n // perform change actions\n self.onchange && self.onchange( self );\n\n }", "function onChange() {\n\n // hide and show input elements for which this is necessary\n setVisibility();\n\n // update preview considering the changed input value\n updatePreview();\n\n // perform change actions\n self.onchange && self.onchange( self );\n\n }", "function changed() {\n\t\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t\t}", "registerOnChange(fn) {\n this.propagateChanges = fn;\n }", "handleChange (event) {\n }", "onCurrentChanged(value) {\n /* no-op */\n }", "onChange() {\n triggerEvent(this.input, 'input');\n triggerEvent(this.input, 'change');\n }", "function changed() {\n\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t}", "function changed() {\n\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t}", "_onChange() {\n void this._debouncer.invoke();\n }", "emitChange () {\n this.emit(Constants.CHANGE_EVENT);\n }", "onDidChange (callback) {\n\t\tconst changeSubscription = this.file.onDidChange(callback);\n\t\tthis.subscriptions.add(changeSubscription);\n\t\treturn changeSubscription;\n\t}", "onChange(item) {}", "dispatchChange() {\n this.toggleAttribute(\"empty\", !this.value);\n this.dispatchEvent(new CustomEvent(\"change\", { bubbles: true }));\n }", "function handleChange(){\n\t\t\t// Error handles\n\t\t\tif(xhr.readyState === this.DONE && xhr.status !== 200){\n\t\t\t\tconsole.log('check yoself');\n\t\t\t}\n\t\t\t// success handles\n\t\t\tif(xhr.readyState === this.DONE && xhr.status === 200){\n\t\t\t\tcallback(xhr.response);\n\t\t\t}\n\n\t\t}", "registerChangeListener(cb) {\n this._slider.events.on('indexChanged', cb);\n }", "function onChanged() {\n let g = getGlobal();\n\n //When the add-in creates the table, it will generate 4 events that we must ignore.\n //We only want to respond to the change events from the user.\n if (g.tableEventCount > 0) {\n g.tableEventCount--;\n return; //count down to throw away events caused by the table creation code\n }\n\n //check if dirty flag was set (flag avoids extra unnecessary ribbon operations)\n if (!g.isTableDirty) {\n g.isTableDirty = true;\n\n //Enable the Refresh and Submit buttons\n setSyncButtonEnabled(true);\n }\n}", "_triggerChange (e) {\n var args = [this.getValue(), this.getFormElement(), this.getUIElement()];\n if (e) {\n args.push(e);\n }\n if (this.options.onChange) {\n this.options.onChange.apply(this, args);\n }\n }", "_onChange(value) {\n this.setState({ changesMade: value });\n }", "_codemirrorValueChanged() {\n // Don't trigger change event if we're ignoring changes\n if (this._ignoreNextChange || !this.props.onChange) {\n this._ignoreNextChange = false;\n return;\n }\n\n const value = this.codeMirror.getDoc().getValue();\n\n // Disable linting if the document reaches a maximum size or is empty\n const shouldLint =\n value.length > MAX_SIZE_FOR_LINTING || value.length === 0 ? false : !this.props.noLint;\n const existingLint = this.codeMirror.options.lint || false;\n if (shouldLint !== existingLint) {\n const { lintOptions } = this.props;\n const lint = shouldLint ? lintOptions || true : false;\n this.codeMirror.setOption('lint', lint);\n }\n\n this.props.onChange(value);\n }", "function onChange(change) {\r\n\t\t//split up the path to get the file name\r\n\t\tvar splitUpPath = change.path.split('/');\r\n\r\n\t\t//log the file detected\r\n\t\tconsole.log('\"' + splitUpPath[splitUpPath.length - 1] + '\" was ' + change.type);\r\n\t}", "_onChange() {\n let value = this.get('value');\n return this.attrs.onChange(value, this);\n }", "function optionChanged(changed){\n charts(changed);\n metadata(changed);\n}", "addChangeListener(callback) {\n Bullet.on(LOCAL_EVENT_NAME, callback)\n }", "handleChangeEvent() {\n this.cacheHasChanged = true;\n }", "_onChange () {\n this.forceUpdate()\n }", "changeFn(event) {\n var fileList = event.__files_ || (event.target && event.target.files);\n if (!fileList)\n return;\n this.stopEvent(event);\n this.handleFiles(fileList);\n }", "get onChange() {\n\t\treturn this._onChange;\n\t}", "get onChange() {\n\t\treturn this._onChange;\n\t}", "get onChange() {\n\t\treturn this._onChange;\n\t}", "function sampleOnChange() {\n SkillSampleAPI.onStatusChange(criteriaId);\n }", "reportValueChange() {\n if (this.options) {\n const value = this.getSelectedOptionValues();\n this.onChange(value);\n this._value = value;\n }\n }" ]
[ "0.76206696", "0.7620642", "0.7567978", "0.7562529", "0.7559636", "0.75364155", "0.7521261", "0.7519743", "0.7512532", "0.7497861", "0.74954176", "0.74885535", "0.7486875", "0.74790376", "0.7469961", "0.7469411", "0.74654305", "0.74590075", "0.74529", "0.74512655", "0.7369066", "0.730385", "0.72735673", "0.72414035", "0.71549815", "0.7152514", "0.7128517", "0.7093095", "0.7083617", "0.7009139", "0.7009139", "0.69793963", "0.6974256", "0.6947616", "0.6947616", "0.69458693", "0.69458693", "0.6937772", "0.6914656", "0.690971", "0.6908083", "0.68284774", "0.682663", "0.68252903", "0.68252903", "0.6824956", "0.6818822", "0.6811583", "0.6811583", "0.6786172", "0.6765572", "0.67383015", "0.6705071", "0.6705071", "0.6690313", "0.668894", "0.6682675", "0.66756", "0.6664683", "0.6661744", "0.66555774", "0.6622243", "0.66172475", "0.66127586", "0.66093457", "0.6608061", "0.6598658", "0.65959495", "0.659532", "0.659532", "0.658595", "0.65802854", "0.657574", "0.6562282", "0.654525", "0.6543162", "0.6543162", "0.6542606", "0.6511655", "0.6500862", "0.6486968", "0.64826125", "0.6478265", "0.6468562", "0.6468112", "0.6466427", "0.64623266", "0.6457302", "0.64557207", "0.6430325", "0.64199036", "0.6416071", "0.64035237", "0.63999367", "0.6397887", "0.6395908", "0.6395908", "0.6395908", "0.63955903", "0.6395481" ]
0.7603297
2
Reemits a render event.
function onRender() { var args; var i; __debug_330( 'Received a render event. Re-emitting...' ); args = new Array( arguments.length+1 ); args[ 0 ] = 'render'; for ( i = 0; i < arguments.length; i++ ) { args[ i+1 ] = arguments[ i ]; } self.emit.apply( self, args ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_587( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_395( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_577( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_412( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_457( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_488( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_332( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_475( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_429( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_452( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_520( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function RenderEvent() {}", "function resumeRender() {\n shouldRender = true;\n render();\n }", "function handleRender() {\n view._isRendered = true;\n triggerDOMRefresh();\n }", "function handleRender() {\n view._isRendered = true;\n triggerDOMRefresh();\n }", "function handleRender() {\n\t view._isRendered = true;\n\t triggerDOMRefresh();\n\t }", "function handleRender(view) {\n view._isRendered = true;\n triggerDOMRefresh(view);\n }", "function handleRender(view){\r\n view._isRendered = true;\r\n triggerDOMRefresh(view);\r\n }", "render(...args) {\n if (this._render) {\n this.__notify(EV.BEFORE_RENDER);\n this._render(...args);\n this.__notify(EV.RENDERED);\n }\n\n this.rendered = true;\n }", "function renderCall() {\n // Repaint?\n if (needs_repaint === true) {\n needs_repaint = false;\n\n ctx.clearRect(0, 0, canvas_el.width, canvas_el.height);\n\n renderTimeXAxis();\n renderElementsMargin();\n\n renderRows();\n\n renderCurrentTimePoint();\n\n }\n }", "onRender()/*: void*/ {\n this.render();\n }", "unrender() {\n this.rendered = false;\n }", "postRender() {\n if (!this.multiFire || !this._hasFired) {\n return;\n }\n\n this._hasFired = false;\n this._nextFire = this._tempNextFire;\n }", "postRendering() {\n this.ctx.restore();\n }", "handleRendered_() {\n\t\tthis.isRendered_ = true;\n\t}", "function invalidate () {\n\t if (!options.batching) {\n\t if (!isRendering) render()\n\t } else {\n\t if (!frameId) frameId = raf(render)\n\t }\n\t }", "function invalidate () {\n if (!options.batching) {\n if (!isRendering) render()\n } else {\n if (!frameId) frameId = raf(render)\n }\n }", "render() {\n const self = this;\n const data = self.get('data');\n if (!data) {\n throw new Error('data must be defined first');\n }\n self.clear();\n self.emit('beforerender');\n self.refreshLayout(this.get('fitView'));\n self.emit('afterrender');\n }", "function render() {\n\t if(stopped || scene.contextLost) {\n\t return\n\t }\n\t requestAnimationFrame(render)\n\t redraw()\n\t }", "function render() {\n\t if(stopped || scene.contextLost) {\n\t return\n\t }\n\t requestAnimationFrame(render)\n\t redraw()\n\t }", "function render() {\n\n isRendered = true;\n\n renderSource();\n\n }", "function renderCallback() {\n\n while (TO_RENDER.length) {\n TO_RENDER.shift().notify();\n }\n\n TO_RENDER.added = {};\n\n while (ENV_QUEUE.length) {\n var env = ENV_QUEUE.shift();\n for (var key in env.revalidateQueue) {\n env.revalidateQueue[key].revalidate();\n }\n reslot(env);\n }\n ENV_QUEUE.added = {};\n}", "_requestRender() { this._invalidateProperties(); }", "function render() {\n\tclearCanvas();\n\tRenderer.draw();\n\t\n\t\t\n}", "function completeRender() {\n var afterRender = options.afterRender;\n\n if (afterRender) {\n afterRender.call(root, root);\n }\n\n // Always emit an afterRender event.\n root.trigger(\"afterRender\", root);\n }", "function completeRender() {\n var afterRender = options.afterRender;\n\n if (afterRender) {\n afterRender.call(root, root);\n }\n\n // Always emit an afterRender event.\n root.trigger(\"afterRender\", root);\n }", "function render() {\n\n\t\t\tisRendered = true;\n\n\t\t\trenderSource();\n\n\t\t}", "function pauseRender() {\n shouldRender = false;\n }", "willClearRender() {\n\t\tconsole.log('willClearRender ejecutado!');\n\t}", "function render () {\n // If this is called synchronously we need to\n // cancel any pending future updates\n clearFrame()\n\n // If the rendering from the previous frame is still going,\n // we'll just wait until the next frame. Ideally renders should\n // not take over 16ms to stay within a single frame, but this should\n // catch it if it does.\n if (isRendering) {\n frameId = raf(render)\n return\n } else {\n isRendering = true\n }\n\n // 1. If there isn't a native element rendered for the current mounted element\n // then we need to create it from scratch.\n // 2. If a new element has been mounted, we should diff them.\n // 3. We should update check all child components for changes.\n if (!currentNativeElement) {\n currentElement = app.element\n currentNativeElement = toNative(rootId, '0', currentElement)\n container.appendChild(currentNativeElement)\n } else if (currentElement !== app.element) {\n currentNativeElement = patch(rootId, currentElement, app.element, currentNativeElement)\n currentElement = app.element\n updateChildren(rootId)\n } else {\n updateChildren(rootId)\n }\n\n // Allow rendering again.\n isRendering = false\n }", "postrender() {\n this.gl.flush();\n }", "function render() {\n if(stopped || scene.contextLost) {\n return\n }\n requestAnimationFrame(render)\n redraw()\n }", "function clearRenderTimer() {\n\n\t\t\tclearTimeout(renderTimer);\n\n\t\t\trenderTimer = null;\n\n\t\t}", "function clearRenderTimer() {\n\n clearTimeout(renderTimer);\n\n renderTimer = null;\n\n }", "function render() {\n if (!willRender) {\n willRender = true;\n process.nextTick(function() {\n screen.render();\n willRender = false;\n });\n }\n}", "function r(e) {\n this.reinitializeTransaction(), // Only server-side rendering really needs this option (see\n // `ReactServerRendering`), but server-side uses\n // `ReactServerRenderingTransaction` instead. This option is here so that it's\n // accessible and defaults to false when `ReactDOMComponent` and\n // `ReactDOMTextComponent` checks it in `mountComponent`.`\n this.renderToStaticMarkup = !1, this.reactMountReady = i.getPooled(null), this.useCreateElement = e;\n }", "function rerender() {\n\tscreen.innerText = buffer;\n}", "function reRender() {\n input.innerText = buffer;\n}", "afterRender() { }", "afterRender() { }", "reRender() {\n this.removeAllChildrenComponents()\n\n this.build()\n }", "function render() {\n renderLives();\n renderTimeRemaining();\n }", "function render() {\n\t\t\n\t}", "function _triggerAfterRender() {\n _trigger(docma.Event.Render, [docma.currentRoute]);\n if (_initialLoad) {\n _trigger(docma.Event.Ready);\n _initialLoad = false;\n }\n }", "function render() {\n\t\t\t}", "function render () {\n\t // If this is called synchronously we need to\n\t // cancel any pending future updates\n\t clearFrame()\n\n\t // If the rendering from the previous frame is still going,\n\t // we'll just wait until the next frame. Ideally renders should\n\t // not take over 16ms to stay within a single frame, but this should\n\t // catch it if it does.\n\t if (isRendering) {\n\t frameId = raf(render)\n\t return\n\t } else {\n\t isRendering = true\n\t }\n\n\t // 1. If there isn't a native element rendered for the current mounted element\n\t // then we need to create it from scratch.\n\t // 2. If a new element has been mounted, we should diff them.\n\t // 3. We should update check all child components for changes.\n\t if (!currentNativeElement) {\n\t currentElement = app.element\n\t currentNativeElement = toNative(rootId, '0', currentElement)\n\t if (container.children.length > 0) {\n\t console.info('deku: The container element is not empty. These elements will be removed. Read more: http://cl.ly/b0Sr')\n\t }\n\t if (container === document.body) {\n\t console.warn('deku: Using document.body is allowed but it can cause some issues. Read more: http://cl.ly/b0SC')\n\t }\n\t removeAllChildren(container)\n\t container.appendChild(currentNativeElement)\n\t } else if (currentElement !== app.element) {\n\t currentNativeElement = patch(rootId, currentElement, app.element, currentNativeElement)\n\t currentElement = app.element\n\t updateChildren(rootId)\n\t } else {\n\t updateChildren(rootId)\n\t }\n\n\t // Call mount events on all new entities\n\t flushMountQueue()\n\n\t // Allow rendering again.\n\t isRendering = false\n\n\t }", "function render() {\n\t}", "render() {\n\n // Calculate delta\n if (!this.lastFrameTime) this.lastFrameTime = Date.now()\n this.delta = Math.min(1, (Date.now() - this.lastFrameTime) / 1000)\n this.lastFrameTime = Date.now()\n\n // Check if should be rendering\n if (!this.isRendering)\n return\n\n // Request another frame\n requestAnimationFrame(this.render)\n\n }", "static finishedRenderingComponent() {\n\t\trenderingComponents_.pop();\n\t}", "function render( timestamp )\n\t{\n\t\t\n\t\trequestAnimationFrame( render );\n\t\t\n\t\tcanvas_handler.draw_all( );\n\t\t\n\t}", "_endRender() {\n this._allowRegisterSegment = false;\n }", "function _render() {\n _render = (0, _asyncToGenerator2.default)(\n /*#__PURE__*/\n _regenerator.default.mark(function _callee2(props) {\n return _regenerator.default.wrap(\n function _callee2$(_context2) {\n while (1) {\n switch ((_context2.prev = _context2.next)) {\n case 0:\n if (!props.err) {\n _context2.next = 4;\n break;\n }\n\n _context2.next = 3;\n return renderError(props);\n\n case 3:\n return _context2.abrupt(\"return\");\n\n case 4:\n _context2.prev = 4;\n _context2.next = 7;\n return doRender(props);\n\n case 7:\n _context2.next = 13;\n break;\n\n case 9:\n _context2.prev = 9;\n _context2.t0 = _context2[\"catch\"](4);\n _context2.next = 13;\n return renderError(\n (0, _objectSpread2.default)({}, props, {\n err: _context2.t0,\n })\n );\n\n case 13:\n case \"end\":\n return _context2.stop();\n }\n }\n },\n _callee2,\n this,\n [[4, 9]]\n );\n })\n );\n return _render.apply(this, arguments);\n }", "redraw() {\n this.createBackground();\n this.render();\n }", "cancelRendering() {\n if (this.renderTask) {\n this.renderTask.cancel();\n this.renderTask = null;\n }\n this.resume = null;\n }", "_render(model) {\n\t\tthis._coordinator.newEvent({\n\t\t\tsource: this.constructor.name,\n\t\t\ttype: 'render',\n\t\t\tdata: {\n\t\t\t\toriginX: this._originX,\n\t\t\t\toriginY: this._originY,\n\t\t\t\twidth: this._width,\n\t\t\t\theight: this._height\n\t\t\t}\n\t\t});\n\t}", "rerender() {\n\t\tthis.setState(this.state)\n\t}", "reRender(skipPreRenderRefresh = false) {\n this.refreshFromRerender = true;\n super.reRender(skipPreRenderRefresh);\n this.initDomEvents();\n }", "renderEventInput() {\n eventContainer.innerHTML = \"\";\n eventContainer.innerHTML = eventHtml.makeNewEventHtml();\n }", "function renderCal() {\n $('#calendar').fullCalendar('rerenderEvents');\n }", "function render() {\r\n graphics.clear();\r\n myTexture.draw();\r\n }", "function Render() {\n ClearScreen();\n RenderEnergeticDroplets();\n ResetRenderingConditions();\n}", "function render() {\n window.requestAnimationFrame(render);\n manipulationCanvas.getContext('2d').clearRect(0, 0, manipulationCanvas.width, manipulationCanvas.height); //clears canvas\n triRenderer.render();\n }", "updateRendererState()\r\n {\r\n // update the renderer state object\r\n this.updateRendererStateObject();\r\n \r\n // create a new update id for the render\r\n this.updateRandomUpdateId();\r\n \r\n this.emit(\"rendererStateChanged\", this, this.rendererState);\r\n }", "onRender () {\n\n }", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function render() {\n\n\t\t\t}", "onRender() {\n if ( !this.mRunning )\n return;\n\n if ( SPE_USES_PREVIEW_IMAGE ) {\n document.querySelector( '.spline-preview-image-container' ).style.display = 'none';\n\n SPE_USES_PREVIEW_IMAGE = false;\n }\n\n if ( this.mPlayHandler && !this.mPlayHandler.isEnable ) {\n this.mPlayHandler.activate();\n }\n\n if ( this.mOrbitControls ) {\n this.mOrbitControls.update();\n }\n if ( this.mScene && this.mMainCamera ) {\n this.mRenderer.autoClear = true;\n this.mRenderer.render( this.mScene, this.mMainCamera );\n }\n }", "handleRenderCompletion() {\n this.renderNewChildren = false;\n this.preventUpdate = false;\n this.lastChildIndex = this.childCount;\n if (this.isRenderingNew) {\n this.isRenderingNew = false;\n this.update(null, false, true); // Prevent from triggering an item request to avoid infinite loop of loading.\n } else if (this.contentNode && InfiniteUtils.shouldTriggerItemRequest(InfiniteUtils.getContentData(this.contentNode))) {\n this.triggerItemRequest();\n }\n }", "function viewRenderComplete() {\n $container.trigger(topologyConstants.events.viewRenderComplete, {}); // Private Event\n }", "_notifyRenderer() {\n this.renderer.notify();\n }", "relayout() {\n dispatchSimpleEvent(this, 'relayout', true);\n }", "onBeforeRendering() {}", "render(renderedTemplate) {\n super.render()\n\n // render the template\n render(renderedTemplate, this, {\n eventContext: this\n })\n }", "function render() {\n view.update();\n requestAnimationFrame(render);\n}", "function render() {\n if (gameRunning) {\n world.camera.moveDimensions()\n context.clearRect(0, 0, canvas.width, canvas.height);\n world.render();\n setTimeout(render, renderTimeDelta)\n }\n}", "function _render(scene) {\n renderer.update(scene);\n }", "function render() {\r\n\r\n}", "function render() {\r\n\r\n}", "_invalidate() {\n\t\tif (this._invalidated) {\n\t\t\t// console.log(\"already invalidated\", this, ...arguments);\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.getDomRef() && !this._suppressInvalidation) {\n\t\t\tthis._invalidated = true;\n\t\t\t// console.log(\"INVAL\", this, ...arguments);\n\t\t\tRenderScheduler.renderDeferred(this);\n\t\t}\n\t}", "function renderOnce(){\n drawBoard(size);\n }", "function render(){\n spinCounter = 0;\n gamePlay();\n }", "function UpdateRender() {\n // Set background\n BackContextHandle.fillRect(0, 0, CanvasWidth, CanvasHeight);\n\n // Render\n BackContextHandle.save();\n Render();\n BackContextHandle.restore();\n\n // Swap the backbuffer with the frontbuffer\n var ImageData = BackContextHandle.getImageData(0, 0, CanvasWidth, CanvasHeight);\n ContextHandle.putImageData(ImageData, 0, 0);\n}", "_update() {\n render(this._template(), this.shadowRoot, {eventContext: this});\n }", "function lateRender() {\n\t\tsetTimeout( function() { // IE7 needs this so dimensions are calculated correctly\n\t\t\t\t\tif (!currentView.start && bodyVisible()) { // !currentView.start makes sure this never happens more than once\n\t\t\t\t\t\trenderView();\n\t\t\t\t\t}\n\t\t\t\t}, 0);\n\t}", "function render() {\n\t\trate = (droppedFrames > 0) ?\n\t\t\t((rate+(FPS/(droppedFrames*2)))/2):\n\t\t\t((rate + FPS)/2);\n\t\t\t\n\t\tcycleCounter = (cycleCounter + 1) % FPS;\n\t\tframeCounter = (frameCounter + 1) % 1e15;\n\t\t// just render every N frames to avoid a jarring display\n\t\tdroppedFrames = -1;\n\t\trdCallback();\n\t}", "onRender(scene, time) {}" ]
[ "0.7726372", "0.7672331", "0.7665788", "0.76572526", "0.7655998", "0.76539224", "0.7652522", "0.76429856", "0.76421237", "0.76247567", "0.7623794", "0.6994004", "0.67871696", "0.67314553", "0.67314553", "0.6673593", "0.65053445", "0.65043765", "0.6444167", "0.63916767", "0.6386083", "0.6215451", "0.60745835", "0.6063212", "0.6025815", "0.5983671", "0.59834343", "0.5943105", "0.58774674", "0.58774674", "0.58711886", "0.5855174", "0.5848575", "0.5833751", "0.5825184", "0.5825184", "0.5803323", "0.57938194", "0.57847404", "0.57549715", "0.5753157", "0.5745031", "0.5743764", "0.57243097", "0.5702407", "0.5698554", "0.56926113", "0.565947", "0.5650503", "0.5650503", "0.5606217", "0.55847776", "0.5571784", "0.5564836", "0.55646217", "0.55570143", "0.5551144", "0.5541771", "0.5538538", "0.5515794", "0.5510801", "0.55076826", "0.5506269", "0.54958576", "0.5494323", "0.54930204", "0.5490676", "0.5485293", "0.5483956", "0.5478577", "0.547311", "0.5464079", "0.545132", "0.54415125", "0.5434181", "0.5434181", "0.5434181", "0.5434181", "0.5434181", "0.5425733", "0.5420645", "0.5412628", "0.54028964", "0.53895235", "0.5386448", "0.538495", "0.5381009", "0.53802407", "0.5373726", "0.53733", "0.5364876", "0.5364876", "0.5362733", "0.53625435", "0.53615856", "0.5358409", "0.5353968", "0.53332514", "0.5331306", "0.53254426" ]
0.7651107
7
Callback invoked upon receiving a change event.
function onChange() { __debug_429( 'Received a change event.' ); if ( self._autoRender ) { // eslint-disable-line no-underscore-dangle self.render(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onChange() {\n\t\t__debug_452( 'Received a change event.' );\n\t\tself.render();\n\t}", "change() { }", "function onChange() {\n\t\t__debug_330( 'Received a change event.' );\n\t\tself.render();\n\t}", "handleEventChange() {\n }", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_730( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "onChange(callback) {\n\t\tthis.changeCallback = callback;\n\t}", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_259( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_488( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_587( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_596( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_412( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_475( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_520( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "onChanged(e){}", "function onChange() {\n\t\t__debug_457( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_332( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_577( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "onchange() {}", "function onChange() {\n console.log(\"something changed...\");\n \n }", "function onChange() {\n\t\t__debug_395( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "addChangeListener(callback) {\n this.on('change', callback);\n }", "function changeEvent() {\n var value_sub = properties.value;\n trigger_param_list.push(value_sub);\n // 'seek' event is like a forced-change event\n $pebble_slider_object.triggerHandler('seek', trigger_param_list);\n if (prev_change_value !== value_sub) {\n $pebble_slider_object.triggerHandler('change', trigger_param_list);\n prev_change_value = value_sub;\n }\n trigger_param_list.length = 0;\n }", "onChange(callback) {\n this.events.change.push({ callback });\n }", "function onChange() {\n if (input.get.call(element, valueField) !== observer.oldValue && !element.readOnly) {\n observer.set(input.get.call(element, valueField));\n }\n }", "function changeFunction() {\n\tconsole.log(\"onchange\");\n}", "addChangeListener (callback) {\n this.on(Constants.CHANGE_EVENT, callback);\n }", "onDidChange(callback) {\n return this.emitter.on('did-change', callback)\n }", "change(/*event*/) {\n this._super(...arguments);\n this._parse();\n }", "addChangeListener (callback) {\n\t\tthis.on(Constants.CHANGE_EVENT, callback);\n\t}", "function handleChange(editor, data, value) {\n onChange(value);\n }", "function handleChange(editor, data, value) {\n onChange(value);\n }", "onDataChange() {}", "changedCallback () {\n\t\tif (this.oldValue === this.value) return;\n\t\tthis._setTranslation();\n\t}", "change(fn, options) {\n\t\treturn this.on({ change: fn }, options);\n\t}", "change(fn, options) {\n\t\treturn this.on({ change: fn }, options);\n\t}", "onChange () {}", "onChange () {}", "onChange(changeListener) {\n changeListener.path = this.path;\n privateDataMap.get(this).addListener(changeListener, this.path);\n }", "handleChange(event) {\n this.dispatchEvent(new CustomEvent('change', {detail: event.target.value}));\n }", "function changed(change) {\n if (change.changeType === \"property\" && change.property === property) {\n fn(change);\n }\n }", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "_setOnChanges(){\n\t\tthis.inputs.forEach(i => i.addEventListener('change', this._onChange.bind(this)));\t\n\t}", "handleChange(event) {\n\n }", "emitChange() {\n\t\tthis.emit(CHANGE_EVENT)\n\t}", "function onChangeHandler(e) {\n\n }", "function onChangeHandler(e) {\n\n }", "addChangeListener(callback) {\n\t\tthis.on(CHANGE_EVENT, callback)\n\t}", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "internalOnChange(event) {\n const me = this,\n value = me.value,\n oldValue = me._lastValue;\n\n // Don't trigger change if we enter invalid value or if value has not changed (for IE when pressing ENTER)\n if (me.isValid && value !== oldValue) {\n me._lastValue = value;\n\n // trigger change event, signaling that origin is from user\n me.trigger('change', { value, oldValue, event, userAction: true });\n\n // per default Field triggers action event on change, but might be reconfigured in subclasses (such as Combo)\n if (me.defaultAction === 'change') {\n me.trigger('action', { value, oldValue, event });\n }\n }\n\n // since Widget has Events mixed in configured with 'callOnFunctions' this will also call onClick and onAction\n }", "handleChange () {\n this.props.onStatusChange(\n this.props.item.id,\n this.refs.checkbox.checked ? 'RESERVED' : 'NEW'\n );\n }", "_valueChanged() {\n // Send a global refresh to the bapge body.\n var event = new Event(\"change\");\n this._root.dispatchEvent(event);\n }", "emitChange() {\n this.emit(CHANGE_EVENT);\n }", "emitChange() {\n this.emit(CHANGE_EVENT);\n }", "_triggerChangeEvent() {\n\t\tif ( this.$control.rendered && ! this.changeEventDisabled ) {\n\t\t\tthis._updateSettings();\n\t\t\tthis.events.emit( 'change', this.settings );\n\t\t}\n\t}", "handleChange(event){\n changeHandler(event,this);\n }", "setOnValueChangeEvent(func){\r\n this._onValueChange = func;\r\n }", "function referenceOnChange() {\n MicroReferenceAPI.onStatusChange(criteriaId);\n }", "function handleChange(event, newValue) {\n setValue(newValue);\n }", "onChange(callback) {\n this.listeners.push(callback);\n }", "onGenericChange() {\n this.contentChanged.emit(void 0);\n }", "afterValidChange() { }", "static on_changed(chr, _retval) {\n let uuid = chr.getUuid()\n console.log(colours.fg.blue + \"[BLE] [CHANGE ]\" + colours.fg.yellow + \" UUID: \" + uuid.toString() + colours.fg.magenta + \" | data: 0x\" + bytes2hex(chr.getValue()) + colours.reset);\n }", "changedInput() {\n\n\t\tlet {isValid, error} = this.state.wasInvalid ? this.validate() : this.state;\n\t\tlet onChange = this.props.onChange;\n\t\tif (onChange) {\n\t\t\tonChange(this.getValue(), isValid, error);\n\t\t}\n\t\tif (this.context.validationSchema) {\n\t\t\tlet value = this.getValue();\n\t\t\tif (this.state.isMultiSelect && value === '') {\n\t\t\t\tvalue = [];\n\t\t\t}\n\t\t\tif (this.shouldTypeBeNumberBySchemeDefinition(this.props.pointer)) {\n\t\t\t\tvalue = Number(value);\n\t\t\t}\n\t\t\tthis.context.validationParent.onValueChanged(this.props.pointer, value, isValid, error);\n\t\t}\n\t}", "_evtChange(event) { }", "on_change(event)\n\t{\n\t\t// Extract `value` from the argument\n\t\t// of this `onChange` listener\n\t\t// (for convenience)\n\n\t\tlet value = event\n\n\t\tif (event.target !== undefined)\n\t\t{\n\t\t\tvalue = event.target.value\n\t\t}\n\n\t\t// Call the parent `onChange` handler\n\t\t// with the `value` as an argument\n\t\t// (for convenience)\n\n\t\tconst { onChange } = this.props\n\n\t\tonChange(value)\n\t}", "handleChange() {\n this.forceUpdate();\n }", "function triggerChange(t) { t.dispatchEvent(changeEvent) }", "function onChange() {\n\n // hide and show input elements for which this is necessary\n setVisibility();\n\n // update preview considering the changed input value\n updatePreview();\n\n // perform change actions\n self.onchange && self.onchange( self );\n\n }", "function onChange() {\n\n // hide and show input elements for which this is necessary\n setVisibility();\n\n // update preview considering the changed input value\n updatePreview();\n\n // perform change actions\n self.onchange && self.onchange( self );\n\n }", "function changed() {\n\t\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t\t}", "registerOnChange(fn) {\n this.propagateChanges = fn;\n }", "handleChange (event) {\n }", "onCurrentChanged(value) {\n /* no-op */\n }", "onChange() {\n triggerEvent(this.input, 'input');\n triggerEvent(this.input, 'change');\n }", "function changed() {\n\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t}", "function changed() {\n\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t}", "_onChange() {\n void this._debouncer.invoke();\n }", "emitChange () {\n this.emit(Constants.CHANGE_EVENT);\n }", "onDidChange (callback) {\n\t\tconst changeSubscription = this.file.onDidChange(callback);\n\t\tthis.subscriptions.add(changeSubscription);\n\t\treturn changeSubscription;\n\t}", "onChange(item) {}", "dispatchChange() {\n this.toggleAttribute(\"empty\", !this.value);\n this.dispatchEvent(new CustomEvent(\"change\", { bubbles: true }));\n }", "function handleChange(){\n\t\t\t// Error handles\n\t\t\tif(xhr.readyState === this.DONE && xhr.status !== 200){\n\t\t\t\tconsole.log('check yoself');\n\t\t\t}\n\t\t\t// success handles\n\t\t\tif(xhr.readyState === this.DONE && xhr.status === 200){\n\t\t\t\tcallback(xhr.response);\n\t\t\t}\n\n\t\t}", "registerChangeListener(cb) {\n this._slider.events.on('indexChanged', cb);\n }", "function onChanged() {\n let g = getGlobal();\n\n //When the add-in creates the table, it will generate 4 events that we must ignore.\n //We only want to respond to the change events from the user.\n if (g.tableEventCount > 0) {\n g.tableEventCount--;\n return; //count down to throw away events caused by the table creation code\n }\n\n //check if dirty flag was set (flag avoids extra unnecessary ribbon operations)\n if (!g.isTableDirty) {\n g.isTableDirty = true;\n\n //Enable the Refresh and Submit buttons\n setSyncButtonEnabled(true);\n }\n}", "_triggerChange (e) {\n var args = [this.getValue(), this.getFormElement(), this.getUIElement()];\n if (e) {\n args.push(e);\n }\n if (this.options.onChange) {\n this.options.onChange.apply(this, args);\n }\n }", "_onChange(value) {\n this.setState({ changesMade: value });\n }", "_codemirrorValueChanged() {\n // Don't trigger change event if we're ignoring changes\n if (this._ignoreNextChange || !this.props.onChange) {\n this._ignoreNextChange = false;\n return;\n }\n\n const value = this.codeMirror.getDoc().getValue();\n\n // Disable linting if the document reaches a maximum size or is empty\n const shouldLint =\n value.length > MAX_SIZE_FOR_LINTING || value.length === 0 ? false : !this.props.noLint;\n const existingLint = this.codeMirror.options.lint || false;\n if (shouldLint !== existingLint) {\n const { lintOptions } = this.props;\n const lint = shouldLint ? lintOptions || true : false;\n this.codeMirror.setOption('lint', lint);\n }\n\n this.props.onChange(value);\n }", "function onChange(change) {\r\n\t\t//split up the path to get the file name\r\n\t\tvar splitUpPath = change.path.split('/');\r\n\r\n\t\t//log the file detected\r\n\t\tconsole.log('\"' + splitUpPath[splitUpPath.length - 1] + '\" was ' + change.type);\r\n\t}", "_onChange() {\n let value = this.get('value');\n return this.attrs.onChange(value, this);\n }", "function optionChanged(changed){\n charts(changed);\n metadata(changed);\n}", "addChangeListener(callback) {\n Bullet.on(LOCAL_EVENT_NAME, callback)\n }", "handleChangeEvent() {\n this.cacheHasChanged = true;\n }", "_onChange () {\n this.forceUpdate()\n }", "changeFn(event) {\n var fileList = event.__files_ || (event.target && event.target.files);\n if (!fileList)\n return;\n this.stopEvent(event);\n this.handleFiles(fileList);\n }", "get onChange() {\n\t\treturn this._onChange;\n\t}", "get onChange() {\n\t\treturn this._onChange;\n\t}", "get onChange() {\n\t\treturn this._onChange;\n\t}", "function sampleOnChange() {\n SkillSampleAPI.onStatusChange(criteriaId);\n }", "reportValueChange() {\n if (this.options) {\n const value = this.getSelectedOptionValues();\n this.onChange(value);\n this._value = value;\n }\n }" ]
[ "0.76215637", "0.7620866", "0.7604169", "0.75682276", "0.7563224", "0.75595355", "0.7537074", "0.7521918", "0.7520366", "0.7513234", "0.7498563", "0.7496141", "0.7489214", "0.7487912", "0.7479759", "0.7470643", "0.74661165", "0.7458496", "0.7453694", "0.7451992", "0.736924", "0.7303583", "0.7273391", "0.7240529", "0.71548766", "0.71520585", "0.7128725", "0.7093861", "0.7083037", "0.70093733", "0.70093733", "0.69801164", "0.697409", "0.69462836", "0.69462836", "0.69462264", "0.69462264", "0.6938091", "0.69152594", "0.69095105", "0.69081986", "0.6828735", "0.6827403", "0.6826205", "0.6825447", "0.6825447", "0.6818633", "0.6811441", "0.6811441", "0.67853796", "0.6766698", "0.67388356", "0.6706443", "0.6706443", "0.6690389", "0.6690049", "0.66818786", "0.66752523", "0.6664632", "0.6662042", "0.6657042", "0.66217285", "0.6617618", "0.66118735", "0.66093236", "0.66083074", "0.6600708", "0.65971905", "0.6594819", "0.6594819", "0.65864474", "0.6579841", "0.6576589", "0.65624547", "0.6545084", "0.6543494", "0.6543494", "0.6543034", "0.6512732", "0.65007645", "0.6487829", "0.64831334", "0.6477887", "0.6468582", "0.6467927", "0.64665604", "0.6463477", "0.6457328", "0.64566207", "0.64305115", "0.64199996", "0.6416667", "0.6404831", "0.6402141", "0.6397671", "0.63960356", "0.63960356", "0.63960356", "0.6394816", "0.6394437" ]
0.7470105
16
Reemits a render event.
function onRender() { var args; var i; __debug_429( 'Received a render event. Re-emitting...' ); args = new Array( arguments.length+1 ); args[ 0 ] = 'render'; for ( i = 0; i < arguments.length; i++ ) { args[ i+1 ] = arguments[ i ]; } self.emit.apply( self, args ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_587( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_395( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_577( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_412( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_457( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_488( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_332( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_330( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_475( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_452( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_520( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function RenderEvent() {}", "function resumeRender() {\n shouldRender = true;\n render();\n }", "function handleRender() {\n view._isRendered = true;\n triggerDOMRefresh();\n }", "function handleRender() {\n view._isRendered = true;\n triggerDOMRefresh();\n }", "function handleRender() {\n\t view._isRendered = true;\n\t triggerDOMRefresh();\n\t }", "function handleRender(view) {\n view._isRendered = true;\n triggerDOMRefresh(view);\n }", "function handleRender(view){\r\n view._isRendered = true;\r\n triggerDOMRefresh(view);\r\n }", "render(...args) {\n if (this._render) {\n this.__notify(EV.BEFORE_RENDER);\n this._render(...args);\n this.__notify(EV.RENDERED);\n }\n\n this.rendered = true;\n }", "function renderCall() {\n // Repaint?\n if (needs_repaint === true) {\n needs_repaint = false;\n\n ctx.clearRect(0, 0, canvas_el.width, canvas_el.height);\n\n renderTimeXAxis();\n renderElementsMargin();\n\n renderRows();\n\n renderCurrentTimePoint();\n\n }\n }", "onRender()/*: void*/ {\n this.render();\n }", "unrender() {\n this.rendered = false;\n }", "postRender() {\n if (!this.multiFire || !this._hasFired) {\n return;\n }\n\n this._hasFired = false;\n this._nextFire = this._tempNextFire;\n }", "postRendering() {\n this.ctx.restore();\n }", "handleRendered_() {\n\t\tthis.isRendered_ = true;\n\t}", "function invalidate () {\n\t if (!options.batching) {\n\t if (!isRendering) render()\n\t } else {\n\t if (!frameId) frameId = raf(render)\n\t }\n\t }", "function invalidate () {\n if (!options.batching) {\n if (!isRendering) render()\n } else {\n if (!frameId) frameId = raf(render)\n }\n }", "render() {\n const self = this;\n const data = self.get('data');\n if (!data) {\n throw new Error('data must be defined first');\n }\n self.clear();\n self.emit('beforerender');\n self.refreshLayout(this.get('fitView'));\n self.emit('afterrender');\n }", "function render() {\n\t if(stopped || scene.contextLost) {\n\t return\n\t }\n\t requestAnimationFrame(render)\n\t redraw()\n\t }", "function render() {\n\t if(stopped || scene.contextLost) {\n\t return\n\t }\n\t requestAnimationFrame(render)\n\t redraw()\n\t }", "function render() {\n\n isRendered = true;\n\n renderSource();\n\n }", "function renderCallback() {\n\n while (TO_RENDER.length) {\n TO_RENDER.shift().notify();\n }\n\n TO_RENDER.added = {};\n\n while (ENV_QUEUE.length) {\n var env = ENV_QUEUE.shift();\n for (var key in env.revalidateQueue) {\n env.revalidateQueue[key].revalidate();\n }\n reslot(env);\n }\n ENV_QUEUE.added = {};\n}", "_requestRender() { this._invalidateProperties(); }", "function render() {\n\tclearCanvas();\n\tRenderer.draw();\n\t\n\t\t\n}", "function completeRender() {\n var afterRender = options.afterRender;\n\n if (afterRender) {\n afterRender.call(root, root);\n }\n\n // Always emit an afterRender event.\n root.trigger(\"afterRender\", root);\n }", "function completeRender() {\n var afterRender = options.afterRender;\n\n if (afterRender) {\n afterRender.call(root, root);\n }\n\n // Always emit an afterRender event.\n root.trigger(\"afterRender\", root);\n }", "function render() {\n\n\t\t\tisRendered = true;\n\n\t\t\trenderSource();\n\n\t\t}", "function pauseRender() {\n shouldRender = false;\n }", "willClearRender() {\n\t\tconsole.log('willClearRender ejecutado!');\n\t}", "function render () {\n // If this is called synchronously we need to\n // cancel any pending future updates\n clearFrame()\n\n // If the rendering from the previous frame is still going,\n // we'll just wait until the next frame. Ideally renders should\n // not take over 16ms to stay within a single frame, but this should\n // catch it if it does.\n if (isRendering) {\n frameId = raf(render)\n return\n } else {\n isRendering = true\n }\n\n // 1. If there isn't a native element rendered for the current mounted element\n // then we need to create it from scratch.\n // 2. If a new element has been mounted, we should diff them.\n // 3. We should update check all child components for changes.\n if (!currentNativeElement) {\n currentElement = app.element\n currentNativeElement = toNative(rootId, '0', currentElement)\n container.appendChild(currentNativeElement)\n } else if (currentElement !== app.element) {\n currentNativeElement = patch(rootId, currentElement, app.element, currentNativeElement)\n currentElement = app.element\n updateChildren(rootId)\n } else {\n updateChildren(rootId)\n }\n\n // Allow rendering again.\n isRendering = false\n }", "postrender() {\n this.gl.flush();\n }", "function render() {\n if(stopped || scene.contextLost) {\n return\n }\n requestAnimationFrame(render)\n redraw()\n }", "function clearRenderTimer() {\n\n\t\t\tclearTimeout(renderTimer);\n\n\t\t\trenderTimer = null;\n\n\t\t}", "function clearRenderTimer() {\n\n clearTimeout(renderTimer);\n\n renderTimer = null;\n\n }", "function render() {\n if (!willRender) {\n willRender = true;\n process.nextTick(function() {\n screen.render();\n willRender = false;\n });\n }\n}", "function r(e) {\n this.reinitializeTransaction(), // Only server-side rendering really needs this option (see\n // `ReactServerRendering`), but server-side uses\n // `ReactServerRenderingTransaction` instead. This option is here so that it's\n // accessible and defaults to false when `ReactDOMComponent` and\n // `ReactDOMTextComponent` checks it in `mountComponent`.`\n this.renderToStaticMarkup = !1, this.reactMountReady = i.getPooled(null), this.useCreateElement = e;\n }", "function rerender() {\n\tscreen.innerText = buffer;\n}", "function reRender() {\n input.innerText = buffer;\n}", "afterRender() { }", "afterRender() { }", "reRender() {\n this.removeAllChildrenComponents()\n\n this.build()\n }", "function render() {\n renderLives();\n renderTimeRemaining();\n }", "function render() {\n\t\t\n\t}", "function _triggerAfterRender() {\n _trigger(docma.Event.Render, [docma.currentRoute]);\n if (_initialLoad) {\n _trigger(docma.Event.Ready);\n _initialLoad = false;\n }\n }", "function render() {\n\t\t\t}", "function render () {\n\t // If this is called synchronously we need to\n\t // cancel any pending future updates\n\t clearFrame()\n\n\t // If the rendering from the previous frame is still going,\n\t // we'll just wait until the next frame. Ideally renders should\n\t // not take over 16ms to stay within a single frame, but this should\n\t // catch it if it does.\n\t if (isRendering) {\n\t frameId = raf(render)\n\t return\n\t } else {\n\t isRendering = true\n\t }\n\n\t // 1. If there isn't a native element rendered for the current mounted element\n\t // then we need to create it from scratch.\n\t // 2. If a new element has been mounted, we should diff them.\n\t // 3. We should update check all child components for changes.\n\t if (!currentNativeElement) {\n\t currentElement = app.element\n\t currentNativeElement = toNative(rootId, '0', currentElement)\n\t if (container.children.length > 0) {\n\t console.info('deku: The container element is not empty. These elements will be removed. Read more: http://cl.ly/b0Sr')\n\t }\n\t if (container === document.body) {\n\t console.warn('deku: Using document.body is allowed but it can cause some issues. Read more: http://cl.ly/b0SC')\n\t }\n\t removeAllChildren(container)\n\t container.appendChild(currentNativeElement)\n\t } else if (currentElement !== app.element) {\n\t currentNativeElement = patch(rootId, currentElement, app.element, currentNativeElement)\n\t currentElement = app.element\n\t updateChildren(rootId)\n\t } else {\n\t updateChildren(rootId)\n\t }\n\n\t // Call mount events on all new entities\n\t flushMountQueue()\n\n\t // Allow rendering again.\n\t isRendering = false\n\n\t }", "function render() {\n\t}", "render() {\n\n // Calculate delta\n if (!this.lastFrameTime) this.lastFrameTime = Date.now()\n this.delta = Math.min(1, (Date.now() - this.lastFrameTime) / 1000)\n this.lastFrameTime = Date.now()\n\n // Check if should be rendering\n if (!this.isRendering)\n return\n\n // Request another frame\n requestAnimationFrame(this.render)\n\n }", "static finishedRenderingComponent() {\n\t\trenderingComponents_.pop();\n\t}", "function render( timestamp )\n\t{\n\t\t\n\t\trequestAnimationFrame( render );\n\t\t\n\t\tcanvas_handler.draw_all( );\n\t\t\n\t}", "_endRender() {\n this._allowRegisterSegment = false;\n }", "function _render() {\n _render = (0, _asyncToGenerator2.default)(\n /*#__PURE__*/\n _regenerator.default.mark(function _callee2(props) {\n return _regenerator.default.wrap(\n function _callee2$(_context2) {\n while (1) {\n switch ((_context2.prev = _context2.next)) {\n case 0:\n if (!props.err) {\n _context2.next = 4;\n break;\n }\n\n _context2.next = 3;\n return renderError(props);\n\n case 3:\n return _context2.abrupt(\"return\");\n\n case 4:\n _context2.prev = 4;\n _context2.next = 7;\n return doRender(props);\n\n case 7:\n _context2.next = 13;\n break;\n\n case 9:\n _context2.prev = 9;\n _context2.t0 = _context2[\"catch\"](4);\n _context2.next = 13;\n return renderError(\n (0, _objectSpread2.default)({}, props, {\n err: _context2.t0,\n })\n );\n\n case 13:\n case \"end\":\n return _context2.stop();\n }\n }\n },\n _callee2,\n this,\n [[4, 9]]\n );\n })\n );\n return _render.apply(this, arguments);\n }", "redraw() {\n this.createBackground();\n this.render();\n }", "cancelRendering() {\n if (this.renderTask) {\n this.renderTask.cancel();\n this.renderTask = null;\n }\n this.resume = null;\n }", "_render(model) {\n\t\tthis._coordinator.newEvent({\n\t\t\tsource: this.constructor.name,\n\t\t\ttype: 'render',\n\t\t\tdata: {\n\t\t\t\toriginX: this._originX,\n\t\t\t\toriginY: this._originY,\n\t\t\t\twidth: this._width,\n\t\t\t\theight: this._height\n\t\t\t}\n\t\t});\n\t}", "rerender() {\n\t\tthis.setState(this.state)\n\t}", "reRender(skipPreRenderRefresh = false) {\n this.refreshFromRerender = true;\n super.reRender(skipPreRenderRefresh);\n this.initDomEvents();\n }", "renderEventInput() {\n eventContainer.innerHTML = \"\";\n eventContainer.innerHTML = eventHtml.makeNewEventHtml();\n }", "function renderCal() {\n $('#calendar').fullCalendar('rerenderEvents');\n }", "function render() {\r\n graphics.clear();\r\n myTexture.draw();\r\n }", "function Render() {\n ClearScreen();\n RenderEnergeticDroplets();\n ResetRenderingConditions();\n}", "function render() {\n window.requestAnimationFrame(render);\n manipulationCanvas.getContext('2d').clearRect(0, 0, manipulationCanvas.width, manipulationCanvas.height); //clears canvas\n triRenderer.render();\n }", "updateRendererState()\r\n {\r\n // update the renderer state object\r\n this.updateRendererStateObject();\r\n \r\n // create a new update id for the render\r\n this.updateRandomUpdateId();\r\n \r\n this.emit(\"rendererStateChanged\", this, this.rendererState);\r\n }", "onRender () {\n\n }", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function render() {\n\n\t\t\t}", "onRender() {\n if ( !this.mRunning )\n return;\n\n if ( SPE_USES_PREVIEW_IMAGE ) {\n document.querySelector( '.spline-preview-image-container' ).style.display = 'none';\n\n SPE_USES_PREVIEW_IMAGE = false;\n }\n\n if ( this.mPlayHandler && !this.mPlayHandler.isEnable ) {\n this.mPlayHandler.activate();\n }\n\n if ( this.mOrbitControls ) {\n this.mOrbitControls.update();\n }\n if ( this.mScene && this.mMainCamera ) {\n this.mRenderer.autoClear = true;\n this.mRenderer.render( this.mScene, this.mMainCamera );\n }\n }", "handleRenderCompletion() {\n this.renderNewChildren = false;\n this.preventUpdate = false;\n this.lastChildIndex = this.childCount;\n if (this.isRenderingNew) {\n this.isRenderingNew = false;\n this.update(null, false, true); // Prevent from triggering an item request to avoid infinite loop of loading.\n } else if (this.contentNode && InfiniteUtils.shouldTriggerItemRequest(InfiniteUtils.getContentData(this.contentNode))) {\n this.triggerItemRequest();\n }\n }", "function viewRenderComplete() {\n $container.trigger(topologyConstants.events.viewRenderComplete, {}); // Private Event\n }", "_notifyRenderer() {\n this.renderer.notify();\n }", "relayout() {\n dispatchSimpleEvent(this, 'relayout', true);\n }", "onBeforeRendering() {}", "render(renderedTemplate) {\n super.render()\n\n // render the template\n render(renderedTemplate, this, {\n eventContext: this\n })\n }", "function render() {\n view.update();\n requestAnimationFrame(render);\n}", "function render() {\n if (gameRunning) {\n world.camera.moveDimensions()\n context.clearRect(0, 0, canvas.width, canvas.height);\n world.render();\n setTimeout(render, renderTimeDelta)\n }\n}", "function _render(scene) {\n renderer.update(scene);\n }", "function render() {\r\n\r\n}", "function render() {\r\n\r\n}", "_invalidate() {\n\t\tif (this._invalidated) {\n\t\t\t// console.log(\"already invalidated\", this, ...arguments);\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.getDomRef() && !this._suppressInvalidation) {\n\t\t\tthis._invalidated = true;\n\t\t\t// console.log(\"INVAL\", this, ...arguments);\n\t\t\tRenderScheduler.renderDeferred(this);\n\t\t}\n\t}", "function renderOnce(){\n drawBoard(size);\n }", "function render(){\n spinCounter = 0;\n gamePlay();\n }", "function UpdateRender() {\n // Set background\n BackContextHandle.fillRect(0, 0, CanvasWidth, CanvasHeight);\n\n // Render\n BackContextHandle.save();\n Render();\n BackContextHandle.restore();\n\n // Swap the backbuffer with the frontbuffer\n var ImageData = BackContextHandle.getImageData(0, 0, CanvasWidth, CanvasHeight);\n ContextHandle.putImageData(ImageData, 0, 0);\n}", "_update() {\n render(this._template(), this.shadowRoot, {eventContext: this});\n }", "function lateRender() {\n\t\tsetTimeout( function() { // IE7 needs this so dimensions are calculated correctly\n\t\t\t\t\tif (!currentView.start && bodyVisible()) { // !currentView.start makes sure this never happens more than once\n\t\t\t\t\t\trenderView();\n\t\t\t\t\t}\n\t\t\t\t}, 0);\n\t}", "function render() {\n\t\trate = (droppedFrames > 0) ?\n\t\t\t((rate+(FPS/(droppedFrames*2)))/2):\n\t\t\t((rate + FPS)/2);\n\t\t\t\n\t\tcycleCounter = (cycleCounter + 1) % FPS;\n\t\tframeCounter = (frameCounter + 1) % 1e15;\n\t\t// just render every N frames to avoid a jarring display\n\t\tdroppedFrames = -1;\n\t\trdCallback();\n\t}", "onRender(scene, time) {}" ]
[ "0.7726372", "0.7672331", "0.7665788", "0.76572526", "0.7655998", "0.76539224", "0.7652522", "0.7651107", "0.76429856", "0.76247567", "0.7623794", "0.6994004", "0.67871696", "0.67314553", "0.67314553", "0.6673593", "0.65053445", "0.65043765", "0.6444167", "0.63916767", "0.6386083", "0.6215451", "0.60745835", "0.6063212", "0.6025815", "0.5983671", "0.59834343", "0.5943105", "0.58774674", "0.58774674", "0.58711886", "0.5855174", "0.5848575", "0.5833751", "0.5825184", "0.5825184", "0.5803323", "0.57938194", "0.57847404", "0.57549715", "0.5753157", "0.5745031", "0.5743764", "0.57243097", "0.5702407", "0.5698554", "0.56926113", "0.565947", "0.5650503", "0.5650503", "0.5606217", "0.55847776", "0.5571784", "0.5564836", "0.55646217", "0.55570143", "0.5551144", "0.5541771", "0.5538538", "0.5515794", "0.5510801", "0.55076826", "0.5506269", "0.54958576", "0.5494323", "0.54930204", "0.5490676", "0.5485293", "0.5483956", "0.5478577", "0.547311", "0.5464079", "0.545132", "0.54415125", "0.5434181", "0.5434181", "0.5434181", "0.5434181", "0.5434181", "0.5425733", "0.5420645", "0.5412628", "0.54028964", "0.53895235", "0.5386448", "0.538495", "0.5381009", "0.53802407", "0.5373726", "0.53733", "0.5364876", "0.5364876", "0.5362733", "0.53625435", "0.53615856", "0.5358409", "0.5353968", "0.53332514", "0.5331306", "0.53254426" ]
0.76421237
9
Callback invoked upon receiving a change event.
function onChange() { __debug_412( 'Received a change event.' ); if ( self._autoRender ) { // eslint-disable-line no-underscore-dangle self.render(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "change() { }", "function onChange() {\n\t\t__debug_452( 'Received a change event.' );\n\t\tself.render();\n\t}", "function onChange() {\n\t\t__debug_330( 'Received a change event.' );\n\t\tself.render();\n\t}", "handleEventChange() {\n }", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_730( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "onChange(callback) {\n\t\tthis.changeCallback = callback;\n\t}", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_259( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_488( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_587( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_596( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_475( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_520( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "onChanged(e){}", "function onChange() {\n\t\t__debug_457( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_332( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_429( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_577( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "onchange() {}", "function onChange() {\n console.log(\"something changed...\");\n \n }", "function onChange() {\n\t\t__debug_395( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "addChangeListener(callback) {\n this.on('change', callback);\n }", "function changeEvent() {\n var value_sub = properties.value;\n trigger_param_list.push(value_sub);\n // 'seek' event is like a forced-change event\n $pebble_slider_object.triggerHandler('seek', trigger_param_list);\n if (prev_change_value !== value_sub) {\n $pebble_slider_object.triggerHandler('change', trigger_param_list);\n prev_change_value = value_sub;\n }\n trigger_param_list.length = 0;\n }", "onChange(callback) {\n this.events.change.push({ callback });\n }", "function onChange() {\n if (input.get.call(element, valueField) !== observer.oldValue && !element.readOnly) {\n observer.set(input.get.call(element, valueField));\n }\n }", "function changeFunction() {\n\tconsole.log(\"onchange\");\n}", "addChangeListener (callback) {\n this.on(Constants.CHANGE_EVENT, callback);\n }", "onDidChange(callback) {\n return this.emitter.on('did-change', callback)\n }", "change(/*event*/) {\n this._super(...arguments);\n this._parse();\n }", "addChangeListener (callback) {\n\t\tthis.on(Constants.CHANGE_EVENT, callback);\n\t}", "function handleChange(editor, data, value) {\n onChange(value);\n }", "function handleChange(editor, data, value) {\n onChange(value);\n }", "onDataChange() {}", "changedCallback () {\n\t\tif (this.oldValue === this.value) return;\n\t\tthis._setTranslation();\n\t}", "change(fn, options) {\n\t\treturn this.on({ change: fn }, options);\n\t}", "change(fn, options) {\n\t\treturn this.on({ change: fn }, options);\n\t}", "onChange () {}", "onChange () {}", "onChange(changeListener) {\n changeListener.path = this.path;\n privateDataMap.get(this).addListener(changeListener, this.path);\n }", "handleChange(event) {\n this.dispatchEvent(new CustomEvent('change', {detail: event.target.value}));\n }", "function changed(change) {\n if (change.changeType === \"property\" && change.property === property) {\n fn(change);\n }\n }", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "_setOnChanges(){\n\t\tthis.inputs.forEach(i => i.addEventListener('change', this._onChange.bind(this)));\t\n\t}", "handleChange(event) {\n\n }", "function onChangeHandler(e) {\n\n }", "function onChangeHandler(e) {\n\n }", "emitChange() {\n\t\tthis.emit(CHANGE_EVENT)\n\t}", "addChangeListener(callback) {\n\t\tthis.on(CHANGE_EVENT, callback)\n\t}", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "internalOnChange(event) {\n const me = this,\n value = me.value,\n oldValue = me._lastValue;\n\n // Don't trigger change if we enter invalid value or if value has not changed (for IE when pressing ENTER)\n if (me.isValid && value !== oldValue) {\n me._lastValue = value;\n\n // trigger change event, signaling that origin is from user\n me.trigger('change', { value, oldValue, event, userAction: true });\n\n // per default Field triggers action event on change, but might be reconfigured in subclasses (such as Combo)\n if (me.defaultAction === 'change') {\n me.trigger('action', { value, oldValue, event });\n }\n }\n\n // since Widget has Events mixed in configured with 'callOnFunctions' this will also call onClick and onAction\n }", "handleChange () {\n this.props.onStatusChange(\n this.props.item.id,\n this.refs.checkbox.checked ? 'RESERVED' : 'NEW'\n );\n }", "_valueChanged() {\n // Send a global refresh to the bapge body.\n var event = new Event(\"change\");\n this._root.dispatchEvent(event);\n }", "emitChange() {\n this.emit(CHANGE_EVENT);\n }", "emitChange() {\n this.emit(CHANGE_EVENT);\n }", "_triggerChangeEvent() {\n\t\tif ( this.$control.rendered && ! this.changeEventDisabled ) {\n\t\t\tthis._updateSettings();\n\t\t\tthis.events.emit( 'change', this.settings );\n\t\t}\n\t}", "handleChange(event){\n changeHandler(event,this);\n }", "setOnValueChangeEvent(func){\r\n this._onValueChange = func;\r\n }", "function referenceOnChange() {\n MicroReferenceAPI.onStatusChange(criteriaId);\n }", "function handleChange(event, newValue) {\n setValue(newValue);\n }", "onChange(callback) {\n this.listeners.push(callback);\n }", "onGenericChange() {\n this.contentChanged.emit(void 0);\n }", "afterValidChange() { }", "static on_changed(chr, _retval) {\n let uuid = chr.getUuid()\n console.log(colours.fg.blue + \"[BLE] [CHANGE ]\" + colours.fg.yellow + \" UUID: \" + uuid.toString() + colours.fg.magenta + \" | data: 0x\" + bytes2hex(chr.getValue()) + colours.reset);\n }", "changedInput() {\n\n\t\tlet {isValid, error} = this.state.wasInvalid ? this.validate() : this.state;\n\t\tlet onChange = this.props.onChange;\n\t\tif (onChange) {\n\t\t\tonChange(this.getValue(), isValid, error);\n\t\t}\n\t\tif (this.context.validationSchema) {\n\t\t\tlet value = this.getValue();\n\t\t\tif (this.state.isMultiSelect && value === '') {\n\t\t\t\tvalue = [];\n\t\t\t}\n\t\t\tif (this.shouldTypeBeNumberBySchemeDefinition(this.props.pointer)) {\n\t\t\t\tvalue = Number(value);\n\t\t\t}\n\t\t\tthis.context.validationParent.onValueChanged(this.props.pointer, value, isValid, error);\n\t\t}\n\t}", "_evtChange(event) { }", "on_change(event)\n\t{\n\t\t// Extract `value` from the argument\n\t\t// of this `onChange` listener\n\t\t// (for convenience)\n\n\t\tlet value = event\n\n\t\tif (event.target !== undefined)\n\t\t{\n\t\t\tvalue = event.target.value\n\t\t}\n\n\t\t// Call the parent `onChange` handler\n\t\t// with the `value` as an argument\n\t\t// (for convenience)\n\n\t\tconst { onChange } = this.props\n\n\t\tonChange(value)\n\t}", "handleChange() {\n this.forceUpdate();\n }", "function triggerChange(t) { t.dispatchEvent(changeEvent) }", "function onChange() {\n\n // hide and show input elements for which this is necessary\n setVisibility();\n\n // update preview considering the changed input value\n updatePreview();\n\n // perform change actions\n self.onchange && self.onchange( self );\n\n }", "function onChange() {\n\n // hide and show input elements for which this is necessary\n setVisibility();\n\n // update preview considering the changed input value\n updatePreview();\n\n // perform change actions\n self.onchange && self.onchange( self );\n\n }", "function changed() {\n\t\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t\t}", "registerOnChange(fn) {\n this.propagateChanges = fn;\n }", "handleChange (event) {\n }", "onCurrentChanged(value) {\n /* no-op */\n }", "onChange() {\n triggerEvent(this.input, 'input');\n triggerEvent(this.input, 'change');\n }", "function changed() {\n\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t}", "function changed() {\n\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t}", "_onChange() {\n void this._debouncer.invoke();\n }", "emitChange () {\n this.emit(Constants.CHANGE_EVENT);\n }", "onDidChange (callback) {\n\t\tconst changeSubscription = this.file.onDidChange(callback);\n\t\tthis.subscriptions.add(changeSubscription);\n\t\treturn changeSubscription;\n\t}", "onChange(item) {}", "dispatchChange() {\n this.toggleAttribute(\"empty\", !this.value);\n this.dispatchEvent(new CustomEvent(\"change\", { bubbles: true }));\n }", "function handleChange(){\n\t\t\t// Error handles\n\t\t\tif(xhr.readyState === this.DONE && xhr.status !== 200){\n\t\t\t\tconsole.log('check yoself');\n\t\t\t}\n\t\t\t// success handles\n\t\t\tif(xhr.readyState === this.DONE && xhr.status === 200){\n\t\t\t\tcallback(xhr.response);\n\t\t\t}\n\n\t\t}", "registerChangeListener(cb) {\n this._slider.events.on('indexChanged', cb);\n }", "function onChanged() {\n let g = getGlobal();\n\n //When the add-in creates the table, it will generate 4 events that we must ignore.\n //We only want to respond to the change events from the user.\n if (g.tableEventCount > 0) {\n g.tableEventCount--;\n return; //count down to throw away events caused by the table creation code\n }\n\n //check if dirty flag was set (flag avoids extra unnecessary ribbon operations)\n if (!g.isTableDirty) {\n g.isTableDirty = true;\n\n //Enable the Refresh and Submit buttons\n setSyncButtonEnabled(true);\n }\n}", "_triggerChange (e) {\n var args = [this.getValue(), this.getFormElement(), this.getUIElement()];\n if (e) {\n args.push(e);\n }\n if (this.options.onChange) {\n this.options.onChange.apply(this, args);\n }\n }", "_onChange(value) {\n this.setState({ changesMade: value });\n }", "_codemirrorValueChanged() {\n // Don't trigger change event if we're ignoring changes\n if (this._ignoreNextChange || !this.props.onChange) {\n this._ignoreNextChange = false;\n return;\n }\n\n const value = this.codeMirror.getDoc().getValue();\n\n // Disable linting if the document reaches a maximum size or is empty\n const shouldLint =\n value.length > MAX_SIZE_FOR_LINTING || value.length === 0 ? false : !this.props.noLint;\n const existingLint = this.codeMirror.options.lint || false;\n if (shouldLint !== existingLint) {\n const { lintOptions } = this.props;\n const lint = shouldLint ? lintOptions || true : false;\n this.codeMirror.setOption('lint', lint);\n }\n\n this.props.onChange(value);\n }", "function onChange(change) {\r\n\t\t//split up the path to get the file name\r\n\t\tvar splitUpPath = change.path.split('/');\r\n\r\n\t\t//log the file detected\r\n\t\tconsole.log('\"' + splitUpPath[splitUpPath.length - 1] + '\" was ' + change.type);\r\n\t}", "_onChange() {\n let value = this.get('value');\n return this.attrs.onChange(value, this);\n }", "function optionChanged(changed){\n charts(changed);\n metadata(changed);\n}", "addChangeListener(callback) {\n Bullet.on(LOCAL_EVENT_NAME, callback)\n }", "handleChangeEvent() {\n this.cacheHasChanged = true;\n }", "_onChange () {\n this.forceUpdate()\n }", "changeFn(event) {\n var fileList = event.__files_ || (event.target && event.target.files);\n if (!fileList)\n return;\n this.stopEvent(event);\n this.handleFiles(fileList);\n }", "get onChange() {\n\t\treturn this._onChange;\n\t}", "get onChange() {\n\t\treturn this._onChange;\n\t}", "get onChange() {\n\t\treturn this._onChange;\n\t}", "function sampleOnChange() {\n SkillSampleAPI.onStatusChange(criteriaId);\n }", "reportValueChange() {\n if (this.options) {\n const value = this.getSelectedOptionValues();\n this.onChange(value);\n this._value = value;\n }\n }" ]
[ "0.76206696", "0.7620642", "0.7603297", "0.7567978", "0.7562529", "0.7559636", "0.75364155", "0.7521261", "0.7519743", "0.7512532", "0.74954176", "0.74885535", "0.7486875", "0.74790376", "0.7469961", "0.7469411", "0.74654305", "0.74590075", "0.74529", "0.74512655", "0.7369066", "0.730385", "0.72735673", "0.72414035", "0.71549815", "0.7152514", "0.7128517", "0.7093095", "0.7083617", "0.7009139", "0.7009139", "0.69793963", "0.6974256", "0.6947616", "0.6947616", "0.69458693", "0.69458693", "0.6937772", "0.6914656", "0.690971", "0.6908083", "0.68284774", "0.682663", "0.68252903", "0.68252903", "0.6824956", "0.6818822", "0.6811583", "0.6811583", "0.6786172", "0.6765572", "0.67383015", "0.6705071", "0.6705071", "0.6690313", "0.668894", "0.6682675", "0.66756", "0.6664683", "0.6661744", "0.66555774", "0.6622243", "0.66172475", "0.66127586", "0.66093457", "0.6608061", "0.6598658", "0.65959495", "0.659532", "0.659532", "0.658595", "0.65802854", "0.657574", "0.6562282", "0.654525", "0.6543162", "0.6543162", "0.6542606", "0.6511655", "0.6500862", "0.6486968", "0.64826125", "0.6478265", "0.6468562", "0.6468112", "0.6466427", "0.64623266", "0.6457302", "0.64557207", "0.6430325", "0.64199036", "0.6416071", "0.64035237", "0.63999367", "0.6397887", "0.6395908", "0.6395908", "0.6395908", "0.63955903", "0.6395481" ]
0.7497861
10
Reemits a render event.
function onRender() { var args; var i; __debug_412( 'Received a render event. Re-emitting...' ); args = new Array( arguments.length+1 ); args[ 0 ] = 'render'; for ( i = 0; i < arguments.length; i++ ) { args[ i+1 ] = arguments[ i ]; } self.emit.apply( self, args ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_587( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_395( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_577( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_457( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_488( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_332( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_330( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_475( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_429( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_452( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_520( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function RenderEvent() {}", "function resumeRender() {\n shouldRender = true;\n render();\n }", "function handleRender() {\n view._isRendered = true;\n triggerDOMRefresh();\n }", "function handleRender() {\n view._isRendered = true;\n triggerDOMRefresh();\n }", "function handleRender() {\n\t view._isRendered = true;\n\t triggerDOMRefresh();\n\t }", "function handleRender(view) {\n view._isRendered = true;\n triggerDOMRefresh(view);\n }", "function handleRender(view){\r\n view._isRendered = true;\r\n triggerDOMRefresh(view);\r\n }", "render(...args) {\n if (this._render) {\n this.__notify(EV.BEFORE_RENDER);\n this._render(...args);\n this.__notify(EV.RENDERED);\n }\n\n this.rendered = true;\n }", "function renderCall() {\n // Repaint?\n if (needs_repaint === true) {\n needs_repaint = false;\n\n ctx.clearRect(0, 0, canvas_el.width, canvas_el.height);\n\n renderTimeXAxis();\n renderElementsMargin();\n\n renderRows();\n\n renderCurrentTimePoint();\n\n }\n }", "onRender()/*: void*/ {\n this.render();\n }", "unrender() {\n this.rendered = false;\n }", "postRender() {\n if (!this.multiFire || !this._hasFired) {\n return;\n }\n\n this._hasFired = false;\n this._nextFire = this._tempNextFire;\n }", "postRendering() {\n this.ctx.restore();\n }", "handleRendered_() {\n\t\tthis.isRendered_ = true;\n\t}", "function invalidate () {\n\t if (!options.batching) {\n\t if (!isRendering) render()\n\t } else {\n\t if (!frameId) frameId = raf(render)\n\t }\n\t }", "function invalidate () {\n if (!options.batching) {\n if (!isRendering) render()\n } else {\n if (!frameId) frameId = raf(render)\n }\n }", "render() {\n const self = this;\n const data = self.get('data');\n if (!data) {\n throw new Error('data must be defined first');\n }\n self.clear();\n self.emit('beforerender');\n self.refreshLayout(this.get('fitView'));\n self.emit('afterrender');\n }", "function render() {\n\t if(stopped || scene.contextLost) {\n\t return\n\t }\n\t requestAnimationFrame(render)\n\t redraw()\n\t }", "function render() {\n\t if(stopped || scene.contextLost) {\n\t return\n\t }\n\t requestAnimationFrame(render)\n\t redraw()\n\t }", "function render() {\n\n isRendered = true;\n\n renderSource();\n\n }", "function renderCallback() {\n\n while (TO_RENDER.length) {\n TO_RENDER.shift().notify();\n }\n\n TO_RENDER.added = {};\n\n while (ENV_QUEUE.length) {\n var env = ENV_QUEUE.shift();\n for (var key in env.revalidateQueue) {\n env.revalidateQueue[key].revalidate();\n }\n reslot(env);\n }\n ENV_QUEUE.added = {};\n}", "_requestRender() { this._invalidateProperties(); }", "function render() {\n\tclearCanvas();\n\tRenderer.draw();\n\t\n\t\t\n}", "function completeRender() {\n var afterRender = options.afterRender;\n\n if (afterRender) {\n afterRender.call(root, root);\n }\n\n // Always emit an afterRender event.\n root.trigger(\"afterRender\", root);\n }", "function completeRender() {\n var afterRender = options.afterRender;\n\n if (afterRender) {\n afterRender.call(root, root);\n }\n\n // Always emit an afterRender event.\n root.trigger(\"afterRender\", root);\n }", "function render() {\n\n\t\t\tisRendered = true;\n\n\t\t\trenderSource();\n\n\t\t}", "function pauseRender() {\n shouldRender = false;\n }", "willClearRender() {\n\t\tconsole.log('willClearRender ejecutado!');\n\t}", "function render () {\n // If this is called synchronously we need to\n // cancel any pending future updates\n clearFrame()\n\n // If the rendering from the previous frame is still going,\n // we'll just wait until the next frame. Ideally renders should\n // not take over 16ms to stay within a single frame, but this should\n // catch it if it does.\n if (isRendering) {\n frameId = raf(render)\n return\n } else {\n isRendering = true\n }\n\n // 1. If there isn't a native element rendered for the current mounted element\n // then we need to create it from scratch.\n // 2. If a new element has been mounted, we should diff them.\n // 3. We should update check all child components for changes.\n if (!currentNativeElement) {\n currentElement = app.element\n currentNativeElement = toNative(rootId, '0', currentElement)\n container.appendChild(currentNativeElement)\n } else if (currentElement !== app.element) {\n currentNativeElement = patch(rootId, currentElement, app.element, currentNativeElement)\n currentElement = app.element\n updateChildren(rootId)\n } else {\n updateChildren(rootId)\n }\n\n // Allow rendering again.\n isRendering = false\n }", "postrender() {\n this.gl.flush();\n }", "function render() {\n if(stopped || scene.contextLost) {\n return\n }\n requestAnimationFrame(render)\n redraw()\n }", "function clearRenderTimer() {\n\n\t\t\tclearTimeout(renderTimer);\n\n\t\t\trenderTimer = null;\n\n\t\t}", "function clearRenderTimer() {\n\n clearTimeout(renderTimer);\n\n renderTimer = null;\n\n }", "function render() {\n if (!willRender) {\n willRender = true;\n process.nextTick(function() {\n screen.render();\n willRender = false;\n });\n }\n}", "function r(e) {\n this.reinitializeTransaction(), // Only server-side rendering really needs this option (see\n // `ReactServerRendering`), but server-side uses\n // `ReactServerRenderingTransaction` instead. This option is here so that it's\n // accessible and defaults to false when `ReactDOMComponent` and\n // `ReactDOMTextComponent` checks it in `mountComponent`.`\n this.renderToStaticMarkup = !1, this.reactMountReady = i.getPooled(null), this.useCreateElement = e;\n }", "function rerender() {\n\tscreen.innerText = buffer;\n}", "function reRender() {\n input.innerText = buffer;\n}", "afterRender() { }", "afterRender() { }", "reRender() {\n this.removeAllChildrenComponents()\n\n this.build()\n }", "function render() {\n renderLives();\n renderTimeRemaining();\n }", "function render() {\n\t\t\n\t}", "function _triggerAfterRender() {\n _trigger(docma.Event.Render, [docma.currentRoute]);\n if (_initialLoad) {\n _trigger(docma.Event.Ready);\n _initialLoad = false;\n }\n }", "function render() {\n\t\t\t}", "function render () {\n\t // If this is called synchronously we need to\n\t // cancel any pending future updates\n\t clearFrame()\n\n\t // If the rendering from the previous frame is still going,\n\t // we'll just wait until the next frame. Ideally renders should\n\t // not take over 16ms to stay within a single frame, but this should\n\t // catch it if it does.\n\t if (isRendering) {\n\t frameId = raf(render)\n\t return\n\t } else {\n\t isRendering = true\n\t }\n\n\t // 1. If there isn't a native element rendered for the current mounted element\n\t // then we need to create it from scratch.\n\t // 2. If a new element has been mounted, we should diff them.\n\t // 3. We should update check all child components for changes.\n\t if (!currentNativeElement) {\n\t currentElement = app.element\n\t currentNativeElement = toNative(rootId, '0', currentElement)\n\t if (container.children.length > 0) {\n\t console.info('deku: The container element is not empty. These elements will be removed. Read more: http://cl.ly/b0Sr')\n\t }\n\t if (container === document.body) {\n\t console.warn('deku: Using document.body is allowed but it can cause some issues. Read more: http://cl.ly/b0SC')\n\t }\n\t removeAllChildren(container)\n\t container.appendChild(currentNativeElement)\n\t } else if (currentElement !== app.element) {\n\t currentNativeElement = patch(rootId, currentElement, app.element, currentNativeElement)\n\t currentElement = app.element\n\t updateChildren(rootId)\n\t } else {\n\t updateChildren(rootId)\n\t }\n\n\t // Call mount events on all new entities\n\t flushMountQueue()\n\n\t // Allow rendering again.\n\t isRendering = false\n\n\t }", "function render() {\n\t}", "render() {\n\n // Calculate delta\n if (!this.lastFrameTime) this.lastFrameTime = Date.now()\n this.delta = Math.min(1, (Date.now() - this.lastFrameTime) / 1000)\n this.lastFrameTime = Date.now()\n\n // Check if should be rendering\n if (!this.isRendering)\n return\n\n // Request another frame\n requestAnimationFrame(this.render)\n\n }", "static finishedRenderingComponent() {\n\t\trenderingComponents_.pop();\n\t}", "function render( timestamp )\n\t{\n\t\t\n\t\trequestAnimationFrame( render );\n\t\t\n\t\tcanvas_handler.draw_all( );\n\t\t\n\t}", "_endRender() {\n this._allowRegisterSegment = false;\n }", "function _render() {\n _render = (0, _asyncToGenerator2.default)(\n /*#__PURE__*/\n _regenerator.default.mark(function _callee2(props) {\n return _regenerator.default.wrap(\n function _callee2$(_context2) {\n while (1) {\n switch ((_context2.prev = _context2.next)) {\n case 0:\n if (!props.err) {\n _context2.next = 4;\n break;\n }\n\n _context2.next = 3;\n return renderError(props);\n\n case 3:\n return _context2.abrupt(\"return\");\n\n case 4:\n _context2.prev = 4;\n _context2.next = 7;\n return doRender(props);\n\n case 7:\n _context2.next = 13;\n break;\n\n case 9:\n _context2.prev = 9;\n _context2.t0 = _context2[\"catch\"](4);\n _context2.next = 13;\n return renderError(\n (0, _objectSpread2.default)({}, props, {\n err: _context2.t0,\n })\n );\n\n case 13:\n case \"end\":\n return _context2.stop();\n }\n }\n },\n _callee2,\n this,\n [[4, 9]]\n );\n })\n );\n return _render.apply(this, arguments);\n }", "redraw() {\n this.createBackground();\n this.render();\n }", "cancelRendering() {\n if (this.renderTask) {\n this.renderTask.cancel();\n this.renderTask = null;\n }\n this.resume = null;\n }", "_render(model) {\n\t\tthis._coordinator.newEvent({\n\t\t\tsource: this.constructor.name,\n\t\t\ttype: 'render',\n\t\t\tdata: {\n\t\t\t\toriginX: this._originX,\n\t\t\t\toriginY: this._originY,\n\t\t\t\twidth: this._width,\n\t\t\t\theight: this._height\n\t\t\t}\n\t\t});\n\t}", "rerender() {\n\t\tthis.setState(this.state)\n\t}", "reRender(skipPreRenderRefresh = false) {\n this.refreshFromRerender = true;\n super.reRender(skipPreRenderRefresh);\n this.initDomEvents();\n }", "renderEventInput() {\n eventContainer.innerHTML = \"\";\n eventContainer.innerHTML = eventHtml.makeNewEventHtml();\n }", "function renderCal() {\n $('#calendar').fullCalendar('rerenderEvents');\n }", "function render() {\r\n graphics.clear();\r\n myTexture.draw();\r\n }", "function Render() {\n ClearScreen();\n RenderEnergeticDroplets();\n ResetRenderingConditions();\n}", "function render() {\n window.requestAnimationFrame(render);\n manipulationCanvas.getContext('2d').clearRect(0, 0, manipulationCanvas.width, manipulationCanvas.height); //clears canvas\n triRenderer.render();\n }", "updateRendererState()\r\n {\r\n // update the renderer state object\r\n this.updateRendererStateObject();\r\n \r\n // create a new update id for the render\r\n this.updateRandomUpdateId();\r\n \r\n this.emit(\"rendererStateChanged\", this, this.rendererState);\r\n }", "onRender () {\n\n }", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function render() {\n\n\t\t\t}", "onRender() {\n if ( !this.mRunning )\n return;\n\n if ( SPE_USES_PREVIEW_IMAGE ) {\n document.querySelector( '.spline-preview-image-container' ).style.display = 'none';\n\n SPE_USES_PREVIEW_IMAGE = false;\n }\n\n if ( this.mPlayHandler && !this.mPlayHandler.isEnable ) {\n this.mPlayHandler.activate();\n }\n\n if ( this.mOrbitControls ) {\n this.mOrbitControls.update();\n }\n if ( this.mScene && this.mMainCamera ) {\n this.mRenderer.autoClear = true;\n this.mRenderer.render( this.mScene, this.mMainCamera );\n }\n }", "handleRenderCompletion() {\n this.renderNewChildren = false;\n this.preventUpdate = false;\n this.lastChildIndex = this.childCount;\n if (this.isRenderingNew) {\n this.isRenderingNew = false;\n this.update(null, false, true); // Prevent from triggering an item request to avoid infinite loop of loading.\n } else if (this.contentNode && InfiniteUtils.shouldTriggerItemRequest(InfiniteUtils.getContentData(this.contentNode))) {\n this.triggerItemRequest();\n }\n }", "function viewRenderComplete() {\n $container.trigger(topologyConstants.events.viewRenderComplete, {}); // Private Event\n }", "_notifyRenderer() {\n this.renderer.notify();\n }", "relayout() {\n dispatchSimpleEvent(this, 'relayout', true);\n }", "onBeforeRendering() {}", "render(renderedTemplate) {\n super.render()\n\n // render the template\n render(renderedTemplate, this, {\n eventContext: this\n })\n }", "function render() {\n view.update();\n requestAnimationFrame(render);\n}", "function render() {\n if (gameRunning) {\n world.camera.moveDimensions()\n context.clearRect(0, 0, canvas.width, canvas.height);\n world.render();\n setTimeout(render, renderTimeDelta)\n }\n}", "function _render(scene) {\n renderer.update(scene);\n }", "function render() {\r\n\r\n}", "function render() {\r\n\r\n}", "_invalidate() {\n\t\tif (this._invalidated) {\n\t\t\t// console.log(\"already invalidated\", this, ...arguments);\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.getDomRef() && !this._suppressInvalidation) {\n\t\t\tthis._invalidated = true;\n\t\t\t// console.log(\"INVAL\", this, ...arguments);\n\t\t\tRenderScheduler.renderDeferred(this);\n\t\t}\n\t}", "function renderOnce(){\n drawBoard(size);\n }", "function render(){\n spinCounter = 0;\n gamePlay();\n }", "function UpdateRender() {\n // Set background\n BackContextHandle.fillRect(0, 0, CanvasWidth, CanvasHeight);\n\n // Render\n BackContextHandle.save();\n Render();\n BackContextHandle.restore();\n\n // Swap the backbuffer with the frontbuffer\n var ImageData = BackContextHandle.getImageData(0, 0, CanvasWidth, CanvasHeight);\n ContextHandle.putImageData(ImageData, 0, 0);\n}", "_update() {\n render(this._template(), this.shadowRoot, {eventContext: this});\n }", "function lateRender() {\n\t\tsetTimeout( function() { // IE7 needs this so dimensions are calculated correctly\n\t\t\t\t\tif (!currentView.start && bodyVisible()) { // !currentView.start makes sure this never happens more than once\n\t\t\t\t\t\trenderView();\n\t\t\t\t\t}\n\t\t\t\t}, 0);\n\t}", "function render() {\n\t\trate = (droppedFrames > 0) ?\n\t\t\t((rate+(FPS/(droppedFrames*2)))/2):\n\t\t\t((rate + FPS)/2);\n\t\t\t\n\t\tcycleCounter = (cycleCounter + 1) % FPS;\n\t\tframeCounter = (frameCounter + 1) % 1e15;\n\t\t// just render every N frames to avoid a jarring display\n\t\tdroppedFrames = -1;\n\t\trdCallback();\n\t}", "onRender(scene, time) {}" ]
[ "0.7726372", "0.7672331", "0.7665788", "0.7655998", "0.76539224", "0.7652522", "0.7651107", "0.76429856", "0.76421237", "0.76247567", "0.7623794", "0.6994004", "0.67871696", "0.67314553", "0.67314553", "0.6673593", "0.65053445", "0.65043765", "0.6444167", "0.63916767", "0.6386083", "0.6215451", "0.60745835", "0.6063212", "0.6025815", "0.5983671", "0.59834343", "0.5943105", "0.58774674", "0.58774674", "0.58711886", "0.5855174", "0.5848575", "0.5833751", "0.5825184", "0.5825184", "0.5803323", "0.57938194", "0.57847404", "0.57549715", "0.5753157", "0.5745031", "0.5743764", "0.57243097", "0.5702407", "0.5698554", "0.56926113", "0.565947", "0.5650503", "0.5650503", "0.5606217", "0.55847776", "0.5571784", "0.5564836", "0.55646217", "0.55570143", "0.5551144", "0.5541771", "0.5538538", "0.5515794", "0.5510801", "0.55076826", "0.5506269", "0.54958576", "0.5494323", "0.54930204", "0.5490676", "0.5485293", "0.5483956", "0.5478577", "0.547311", "0.5464079", "0.545132", "0.54415125", "0.5434181", "0.5434181", "0.5434181", "0.5434181", "0.5434181", "0.5425733", "0.5420645", "0.5412628", "0.54028964", "0.53895235", "0.5386448", "0.538495", "0.5381009", "0.53802407", "0.5373726", "0.53733", "0.5364876", "0.5364876", "0.5362733", "0.53625435", "0.53615856", "0.5358409", "0.5353968", "0.53332514", "0.5331306", "0.53254426" ]
0.76572526
3
Callback invoked upon receiving a change event.
function onChange() { __debug_457( 'Received a change event.' ); if ( self._autoRender ) { // eslint-disable-line no-underscore-dangle self.render(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onChange() {\n\t\t__debug_452( 'Received a change event.' );\n\t\tself.render();\n\t}", "change() { }", "function onChange() {\n\t\t__debug_330( 'Received a change event.' );\n\t\tself.render();\n\t}", "handleEventChange() {\n }", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_730( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "onChange(callback) {\n\t\tthis.changeCallback = callback;\n\t}", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_259( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_488( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_587( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_596( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_412( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_475( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_520( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "onChanged(e){}", "function onChange() {\n\t\t__debug_332( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_429( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_577( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "onchange() {}", "function onChange() {\n console.log(\"something changed...\");\n \n }", "function onChange() {\n\t\t__debug_395( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "addChangeListener(callback) {\n this.on('change', callback);\n }", "function changeEvent() {\n var value_sub = properties.value;\n trigger_param_list.push(value_sub);\n // 'seek' event is like a forced-change event\n $pebble_slider_object.triggerHandler('seek', trigger_param_list);\n if (prev_change_value !== value_sub) {\n $pebble_slider_object.triggerHandler('change', trigger_param_list);\n prev_change_value = value_sub;\n }\n trigger_param_list.length = 0;\n }", "onChange(callback) {\n this.events.change.push({ callback });\n }", "function onChange() {\n if (input.get.call(element, valueField) !== observer.oldValue && !element.readOnly) {\n observer.set(input.get.call(element, valueField));\n }\n }", "function changeFunction() {\n\tconsole.log(\"onchange\");\n}", "addChangeListener (callback) {\n this.on(Constants.CHANGE_EVENT, callback);\n }", "onDidChange(callback) {\n return this.emitter.on('did-change', callback)\n }", "change(/*event*/) {\n this._super(...arguments);\n this._parse();\n }", "addChangeListener (callback) {\n\t\tthis.on(Constants.CHANGE_EVENT, callback);\n\t}", "function handleChange(editor, data, value) {\n onChange(value);\n }", "function handleChange(editor, data, value) {\n onChange(value);\n }", "onDataChange() {}", "changedCallback () {\n\t\tif (this.oldValue === this.value) return;\n\t\tthis._setTranslation();\n\t}", "change(fn, options) {\n\t\treturn this.on({ change: fn }, options);\n\t}", "change(fn, options) {\n\t\treturn this.on({ change: fn }, options);\n\t}", "onChange () {}", "onChange () {}", "onChange(changeListener) {\n changeListener.path = this.path;\n privateDataMap.get(this).addListener(changeListener, this.path);\n }", "handleChange(event) {\n this.dispatchEvent(new CustomEvent('change', {detail: event.target.value}));\n }", "function changed(change) {\n if (change.changeType === \"property\" && change.property === property) {\n fn(change);\n }\n }", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "_setOnChanges(){\n\t\tthis.inputs.forEach(i => i.addEventListener('change', this._onChange.bind(this)));\t\n\t}", "handleChange(event) {\n\n }", "emitChange() {\n\t\tthis.emit(CHANGE_EVENT)\n\t}", "function onChangeHandler(e) {\n\n }", "function onChangeHandler(e) {\n\n }", "addChangeListener(callback) {\n\t\tthis.on(CHANGE_EVENT, callback)\n\t}", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "internalOnChange(event) {\n const me = this,\n value = me.value,\n oldValue = me._lastValue;\n\n // Don't trigger change if we enter invalid value or if value has not changed (for IE when pressing ENTER)\n if (me.isValid && value !== oldValue) {\n me._lastValue = value;\n\n // trigger change event, signaling that origin is from user\n me.trigger('change', { value, oldValue, event, userAction: true });\n\n // per default Field triggers action event on change, but might be reconfigured in subclasses (such as Combo)\n if (me.defaultAction === 'change') {\n me.trigger('action', { value, oldValue, event });\n }\n }\n\n // since Widget has Events mixed in configured with 'callOnFunctions' this will also call onClick and onAction\n }", "handleChange () {\n this.props.onStatusChange(\n this.props.item.id,\n this.refs.checkbox.checked ? 'RESERVED' : 'NEW'\n );\n }", "_valueChanged() {\n // Send a global refresh to the bapge body.\n var event = new Event(\"change\");\n this._root.dispatchEvent(event);\n }", "emitChange() {\n this.emit(CHANGE_EVENT);\n }", "emitChange() {\n this.emit(CHANGE_EVENT);\n }", "_triggerChangeEvent() {\n\t\tif ( this.$control.rendered && ! this.changeEventDisabled ) {\n\t\t\tthis._updateSettings();\n\t\t\tthis.events.emit( 'change', this.settings );\n\t\t}\n\t}", "handleChange(event){\n changeHandler(event,this);\n }", "setOnValueChangeEvent(func){\r\n this._onValueChange = func;\r\n }", "function referenceOnChange() {\n MicroReferenceAPI.onStatusChange(criteriaId);\n }", "function handleChange(event, newValue) {\n setValue(newValue);\n }", "onChange(callback) {\n this.listeners.push(callback);\n }", "onGenericChange() {\n this.contentChanged.emit(void 0);\n }", "afterValidChange() { }", "static on_changed(chr, _retval) {\n let uuid = chr.getUuid()\n console.log(colours.fg.blue + \"[BLE] [CHANGE ]\" + colours.fg.yellow + \" UUID: \" + uuid.toString() + colours.fg.magenta + \" | data: 0x\" + bytes2hex(chr.getValue()) + colours.reset);\n }", "changedInput() {\n\n\t\tlet {isValid, error} = this.state.wasInvalid ? this.validate() : this.state;\n\t\tlet onChange = this.props.onChange;\n\t\tif (onChange) {\n\t\t\tonChange(this.getValue(), isValid, error);\n\t\t}\n\t\tif (this.context.validationSchema) {\n\t\t\tlet value = this.getValue();\n\t\t\tif (this.state.isMultiSelect && value === '') {\n\t\t\t\tvalue = [];\n\t\t\t}\n\t\t\tif (this.shouldTypeBeNumberBySchemeDefinition(this.props.pointer)) {\n\t\t\t\tvalue = Number(value);\n\t\t\t}\n\t\t\tthis.context.validationParent.onValueChanged(this.props.pointer, value, isValid, error);\n\t\t}\n\t}", "_evtChange(event) { }", "on_change(event)\n\t{\n\t\t// Extract `value` from the argument\n\t\t// of this `onChange` listener\n\t\t// (for convenience)\n\n\t\tlet value = event\n\n\t\tif (event.target !== undefined)\n\t\t{\n\t\t\tvalue = event.target.value\n\t\t}\n\n\t\t// Call the parent `onChange` handler\n\t\t// with the `value` as an argument\n\t\t// (for convenience)\n\n\t\tconst { onChange } = this.props\n\n\t\tonChange(value)\n\t}", "handleChange() {\n this.forceUpdate();\n }", "function triggerChange(t) { t.dispatchEvent(changeEvent) }", "function onChange() {\n\n // hide and show input elements for which this is necessary\n setVisibility();\n\n // update preview considering the changed input value\n updatePreview();\n\n // perform change actions\n self.onchange && self.onchange( self );\n\n }", "function onChange() {\n\n // hide and show input elements for which this is necessary\n setVisibility();\n\n // update preview considering the changed input value\n updatePreview();\n\n // perform change actions\n self.onchange && self.onchange( self );\n\n }", "function changed() {\n\t\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t\t}", "registerOnChange(fn) {\n this.propagateChanges = fn;\n }", "handleChange (event) {\n }", "onCurrentChanged(value) {\n /* no-op */\n }", "onChange() {\n triggerEvent(this.input, 'input');\n triggerEvent(this.input, 'change');\n }", "function changed() {\n\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t}", "function changed() {\n\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t}", "_onChange() {\n void this._debouncer.invoke();\n }", "emitChange () {\n this.emit(Constants.CHANGE_EVENT);\n }", "onDidChange (callback) {\n\t\tconst changeSubscription = this.file.onDidChange(callback);\n\t\tthis.subscriptions.add(changeSubscription);\n\t\treturn changeSubscription;\n\t}", "onChange(item) {}", "dispatchChange() {\n this.toggleAttribute(\"empty\", !this.value);\n this.dispatchEvent(new CustomEvent(\"change\", { bubbles: true }));\n }", "function handleChange(){\n\t\t\t// Error handles\n\t\t\tif(xhr.readyState === this.DONE && xhr.status !== 200){\n\t\t\t\tconsole.log('check yoself');\n\t\t\t}\n\t\t\t// success handles\n\t\t\tif(xhr.readyState === this.DONE && xhr.status === 200){\n\t\t\t\tcallback(xhr.response);\n\t\t\t}\n\n\t\t}", "registerChangeListener(cb) {\n this._slider.events.on('indexChanged', cb);\n }", "function onChanged() {\n let g = getGlobal();\n\n //When the add-in creates the table, it will generate 4 events that we must ignore.\n //We only want to respond to the change events from the user.\n if (g.tableEventCount > 0) {\n g.tableEventCount--;\n return; //count down to throw away events caused by the table creation code\n }\n\n //check if dirty flag was set (flag avoids extra unnecessary ribbon operations)\n if (!g.isTableDirty) {\n g.isTableDirty = true;\n\n //Enable the Refresh and Submit buttons\n setSyncButtonEnabled(true);\n }\n}", "_triggerChange (e) {\n var args = [this.getValue(), this.getFormElement(), this.getUIElement()];\n if (e) {\n args.push(e);\n }\n if (this.options.onChange) {\n this.options.onChange.apply(this, args);\n }\n }", "_onChange(value) {\n this.setState({ changesMade: value });\n }", "_codemirrorValueChanged() {\n // Don't trigger change event if we're ignoring changes\n if (this._ignoreNextChange || !this.props.onChange) {\n this._ignoreNextChange = false;\n return;\n }\n\n const value = this.codeMirror.getDoc().getValue();\n\n // Disable linting if the document reaches a maximum size or is empty\n const shouldLint =\n value.length > MAX_SIZE_FOR_LINTING || value.length === 0 ? false : !this.props.noLint;\n const existingLint = this.codeMirror.options.lint || false;\n if (shouldLint !== existingLint) {\n const { lintOptions } = this.props;\n const lint = shouldLint ? lintOptions || true : false;\n this.codeMirror.setOption('lint', lint);\n }\n\n this.props.onChange(value);\n }", "function onChange(change) {\r\n\t\t//split up the path to get the file name\r\n\t\tvar splitUpPath = change.path.split('/');\r\n\r\n\t\t//log the file detected\r\n\t\tconsole.log('\"' + splitUpPath[splitUpPath.length - 1] + '\" was ' + change.type);\r\n\t}", "_onChange() {\n let value = this.get('value');\n return this.attrs.onChange(value, this);\n }", "function optionChanged(changed){\n charts(changed);\n metadata(changed);\n}", "addChangeListener(callback) {\n Bullet.on(LOCAL_EVENT_NAME, callback)\n }", "handleChangeEvent() {\n this.cacheHasChanged = true;\n }", "_onChange () {\n this.forceUpdate()\n }", "changeFn(event) {\n var fileList = event.__files_ || (event.target && event.target.files);\n if (!fileList)\n return;\n this.stopEvent(event);\n this.handleFiles(fileList);\n }", "get onChange() {\n\t\treturn this._onChange;\n\t}", "get onChange() {\n\t\treturn this._onChange;\n\t}", "get onChange() {\n\t\treturn this._onChange;\n\t}", "function sampleOnChange() {\n SkillSampleAPI.onStatusChange(criteriaId);\n }", "reportValueChange() {\n if (this.options) {\n const value = this.getSelectedOptionValues();\n this.onChange(value);\n this._value = value;\n }\n }" ]
[ "0.76215637", "0.7620866", "0.7604169", "0.75682276", "0.7563224", "0.75595355", "0.7537074", "0.7521918", "0.7520366", "0.7513234", "0.7498563", "0.7496141", "0.7489214", "0.7487912", "0.7470643", "0.7470105", "0.74661165", "0.7458496", "0.7453694", "0.7451992", "0.736924", "0.7303583", "0.7273391", "0.7240529", "0.71548766", "0.71520585", "0.7128725", "0.7093861", "0.7083037", "0.70093733", "0.70093733", "0.69801164", "0.697409", "0.69462836", "0.69462836", "0.69462264", "0.69462264", "0.6938091", "0.69152594", "0.69095105", "0.69081986", "0.6828735", "0.6827403", "0.6826205", "0.6825447", "0.6825447", "0.6818633", "0.6811441", "0.6811441", "0.67853796", "0.6766698", "0.67388356", "0.6706443", "0.6706443", "0.6690389", "0.6690049", "0.66818786", "0.66752523", "0.6664632", "0.6662042", "0.6657042", "0.66217285", "0.6617618", "0.66118735", "0.66093236", "0.66083074", "0.6600708", "0.65971905", "0.6594819", "0.6594819", "0.65864474", "0.6579841", "0.6576589", "0.65624547", "0.6545084", "0.6543494", "0.6543494", "0.6543034", "0.6512732", "0.65007645", "0.6487829", "0.64831334", "0.6477887", "0.6468582", "0.6467927", "0.64665604", "0.6463477", "0.6457328", "0.64566207", "0.64305115", "0.64199996", "0.6416667", "0.6404831", "0.6402141", "0.6397671", "0.63960356", "0.63960356", "0.63960356", "0.6394816", "0.6394437" ]
0.7479759
14
Reemits a render event.
function onRender() { var args; var i; __debug_457( 'Received a render event. Re-emitting...' ); args = new Array( arguments.length+1 ); args[ 0 ] = 'render'; for ( i = 0; i < arguments.length; i++ ) { args[ i+1 ] = arguments[ i ]; } self.emit.apply( self, args ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_587( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_395( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_577( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_412( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_488( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_332( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_330( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_475( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_429( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_452( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_520( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function RenderEvent() {}", "function resumeRender() {\n shouldRender = true;\n render();\n }", "function handleRender() {\n view._isRendered = true;\n triggerDOMRefresh();\n }", "function handleRender() {\n view._isRendered = true;\n triggerDOMRefresh();\n }", "function handleRender() {\n\t view._isRendered = true;\n\t triggerDOMRefresh();\n\t }", "function handleRender(view) {\n view._isRendered = true;\n triggerDOMRefresh(view);\n }", "function handleRender(view){\r\n view._isRendered = true;\r\n triggerDOMRefresh(view);\r\n }", "render(...args) {\n if (this._render) {\n this.__notify(EV.BEFORE_RENDER);\n this._render(...args);\n this.__notify(EV.RENDERED);\n }\n\n this.rendered = true;\n }", "function renderCall() {\n // Repaint?\n if (needs_repaint === true) {\n needs_repaint = false;\n\n ctx.clearRect(0, 0, canvas_el.width, canvas_el.height);\n\n renderTimeXAxis();\n renderElementsMargin();\n\n renderRows();\n\n renderCurrentTimePoint();\n\n }\n }", "onRender()/*: void*/ {\n this.render();\n }", "unrender() {\n this.rendered = false;\n }", "postRender() {\n if (!this.multiFire || !this._hasFired) {\n return;\n }\n\n this._hasFired = false;\n this._nextFire = this._tempNextFire;\n }", "postRendering() {\n this.ctx.restore();\n }", "handleRendered_() {\n\t\tthis.isRendered_ = true;\n\t}", "function invalidate () {\n\t if (!options.batching) {\n\t if (!isRendering) render()\n\t } else {\n\t if (!frameId) frameId = raf(render)\n\t }\n\t }", "function invalidate () {\n if (!options.batching) {\n if (!isRendering) render()\n } else {\n if (!frameId) frameId = raf(render)\n }\n }", "render() {\n const self = this;\n const data = self.get('data');\n if (!data) {\n throw new Error('data must be defined first');\n }\n self.clear();\n self.emit('beforerender');\n self.refreshLayout(this.get('fitView'));\n self.emit('afterrender');\n }", "function render() {\n\t if(stopped || scene.contextLost) {\n\t return\n\t }\n\t requestAnimationFrame(render)\n\t redraw()\n\t }", "function render() {\n\t if(stopped || scene.contextLost) {\n\t return\n\t }\n\t requestAnimationFrame(render)\n\t redraw()\n\t }", "function render() {\n\n isRendered = true;\n\n renderSource();\n\n }", "function renderCallback() {\n\n while (TO_RENDER.length) {\n TO_RENDER.shift().notify();\n }\n\n TO_RENDER.added = {};\n\n while (ENV_QUEUE.length) {\n var env = ENV_QUEUE.shift();\n for (var key in env.revalidateQueue) {\n env.revalidateQueue[key].revalidate();\n }\n reslot(env);\n }\n ENV_QUEUE.added = {};\n}", "_requestRender() { this._invalidateProperties(); }", "function render() {\n\tclearCanvas();\n\tRenderer.draw();\n\t\n\t\t\n}", "function completeRender() {\n var afterRender = options.afterRender;\n\n if (afterRender) {\n afterRender.call(root, root);\n }\n\n // Always emit an afterRender event.\n root.trigger(\"afterRender\", root);\n }", "function completeRender() {\n var afterRender = options.afterRender;\n\n if (afterRender) {\n afterRender.call(root, root);\n }\n\n // Always emit an afterRender event.\n root.trigger(\"afterRender\", root);\n }", "function render() {\n\n\t\t\tisRendered = true;\n\n\t\t\trenderSource();\n\n\t\t}", "function pauseRender() {\n shouldRender = false;\n }", "willClearRender() {\n\t\tconsole.log('willClearRender ejecutado!');\n\t}", "function render () {\n // If this is called synchronously we need to\n // cancel any pending future updates\n clearFrame()\n\n // If the rendering from the previous frame is still going,\n // we'll just wait until the next frame. Ideally renders should\n // not take over 16ms to stay within a single frame, but this should\n // catch it if it does.\n if (isRendering) {\n frameId = raf(render)\n return\n } else {\n isRendering = true\n }\n\n // 1. If there isn't a native element rendered for the current mounted element\n // then we need to create it from scratch.\n // 2. If a new element has been mounted, we should diff them.\n // 3. We should update check all child components for changes.\n if (!currentNativeElement) {\n currentElement = app.element\n currentNativeElement = toNative(rootId, '0', currentElement)\n container.appendChild(currentNativeElement)\n } else if (currentElement !== app.element) {\n currentNativeElement = patch(rootId, currentElement, app.element, currentNativeElement)\n currentElement = app.element\n updateChildren(rootId)\n } else {\n updateChildren(rootId)\n }\n\n // Allow rendering again.\n isRendering = false\n }", "postrender() {\n this.gl.flush();\n }", "function render() {\n if(stopped || scene.contextLost) {\n return\n }\n requestAnimationFrame(render)\n redraw()\n }", "function clearRenderTimer() {\n\n\t\t\tclearTimeout(renderTimer);\n\n\t\t\trenderTimer = null;\n\n\t\t}", "function clearRenderTimer() {\n\n clearTimeout(renderTimer);\n\n renderTimer = null;\n\n }", "function render() {\n if (!willRender) {\n willRender = true;\n process.nextTick(function() {\n screen.render();\n willRender = false;\n });\n }\n}", "function r(e) {\n this.reinitializeTransaction(), // Only server-side rendering really needs this option (see\n // `ReactServerRendering`), but server-side uses\n // `ReactServerRenderingTransaction` instead. This option is here so that it's\n // accessible and defaults to false when `ReactDOMComponent` and\n // `ReactDOMTextComponent` checks it in `mountComponent`.`\n this.renderToStaticMarkup = !1, this.reactMountReady = i.getPooled(null), this.useCreateElement = e;\n }", "function rerender() {\n\tscreen.innerText = buffer;\n}", "function reRender() {\n input.innerText = buffer;\n}", "afterRender() { }", "afterRender() { }", "reRender() {\n this.removeAllChildrenComponents()\n\n this.build()\n }", "function render() {\n renderLives();\n renderTimeRemaining();\n }", "function render() {\n\t\t\n\t}", "function _triggerAfterRender() {\n _trigger(docma.Event.Render, [docma.currentRoute]);\n if (_initialLoad) {\n _trigger(docma.Event.Ready);\n _initialLoad = false;\n }\n }", "function render() {\n\t\t\t}", "function render () {\n\t // If this is called synchronously we need to\n\t // cancel any pending future updates\n\t clearFrame()\n\n\t // If the rendering from the previous frame is still going,\n\t // we'll just wait until the next frame. Ideally renders should\n\t // not take over 16ms to stay within a single frame, but this should\n\t // catch it if it does.\n\t if (isRendering) {\n\t frameId = raf(render)\n\t return\n\t } else {\n\t isRendering = true\n\t }\n\n\t // 1. If there isn't a native element rendered for the current mounted element\n\t // then we need to create it from scratch.\n\t // 2. If a new element has been mounted, we should diff them.\n\t // 3. We should update check all child components for changes.\n\t if (!currentNativeElement) {\n\t currentElement = app.element\n\t currentNativeElement = toNative(rootId, '0', currentElement)\n\t if (container.children.length > 0) {\n\t console.info('deku: The container element is not empty. These elements will be removed. Read more: http://cl.ly/b0Sr')\n\t }\n\t if (container === document.body) {\n\t console.warn('deku: Using document.body is allowed but it can cause some issues. Read more: http://cl.ly/b0SC')\n\t }\n\t removeAllChildren(container)\n\t container.appendChild(currentNativeElement)\n\t } else if (currentElement !== app.element) {\n\t currentNativeElement = patch(rootId, currentElement, app.element, currentNativeElement)\n\t currentElement = app.element\n\t updateChildren(rootId)\n\t } else {\n\t updateChildren(rootId)\n\t }\n\n\t // Call mount events on all new entities\n\t flushMountQueue()\n\n\t // Allow rendering again.\n\t isRendering = false\n\n\t }", "function render() {\n\t}", "render() {\n\n // Calculate delta\n if (!this.lastFrameTime) this.lastFrameTime = Date.now()\n this.delta = Math.min(1, (Date.now() - this.lastFrameTime) / 1000)\n this.lastFrameTime = Date.now()\n\n // Check if should be rendering\n if (!this.isRendering)\n return\n\n // Request another frame\n requestAnimationFrame(this.render)\n\n }", "static finishedRenderingComponent() {\n\t\trenderingComponents_.pop();\n\t}", "function render( timestamp )\n\t{\n\t\t\n\t\trequestAnimationFrame( render );\n\t\t\n\t\tcanvas_handler.draw_all( );\n\t\t\n\t}", "_endRender() {\n this._allowRegisterSegment = false;\n }", "function _render() {\n _render = (0, _asyncToGenerator2.default)(\n /*#__PURE__*/\n _regenerator.default.mark(function _callee2(props) {\n return _regenerator.default.wrap(\n function _callee2$(_context2) {\n while (1) {\n switch ((_context2.prev = _context2.next)) {\n case 0:\n if (!props.err) {\n _context2.next = 4;\n break;\n }\n\n _context2.next = 3;\n return renderError(props);\n\n case 3:\n return _context2.abrupt(\"return\");\n\n case 4:\n _context2.prev = 4;\n _context2.next = 7;\n return doRender(props);\n\n case 7:\n _context2.next = 13;\n break;\n\n case 9:\n _context2.prev = 9;\n _context2.t0 = _context2[\"catch\"](4);\n _context2.next = 13;\n return renderError(\n (0, _objectSpread2.default)({}, props, {\n err: _context2.t0,\n })\n );\n\n case 13:\n case \"end\":\n return _context2.stop();\n }\n }\n },\n _callee2,\n this,\n [[4, 9]]\n );\n })\n );\n return _render.apply(this, arguments);\n }", "redraw() {\n this.createBackground();\n this.render();\n }", "cancelRendering() {\n if (this.renderTask) {\n this.renderTask.cancel();\n this.renderTask = null;\n }\n this.resume = null;\n }", "_render(model) {\n\t\tthis._coordinator.newEvent({\n\t\t\tsource: this.constructor.name,\n\t\t\ttype: 'render',\n\t\t\tdata: {\n\t\t\t\toriginX: this._originX,\n\t\t\t\toriginY: this._originY,\n\t\t\t\twidth: this._width,\n\t\t\t\theight: this._height\n\t\t\t}\n\t\t});\n\t}", "rerender() {\n\t\tthis.setState(this.state)\n\t}", "reRender(skipPreRenderRefresh = false) {\n this.refreshFromRerender = true;\n super.reRender(skipPreRenderRefresh);\n this.initDomEvents();\n }", "renderEventInput() {\n eventContainer.innerHTML = \"\";\n eventContainer.innerHTML = eventHtml.makeNewEventHtml();\n }", "function renderCal() {\n $('#calendar').fullCalendar('rerenderEvents');\n }", "function render() {\r\n graphics.clear();\r\n myTexture.draw();\r\n }", "function Render() {\n ClearScreen();\n RenderEnergeticDroplets();\n ResetRenderingConditions();\n}", "function render() {\n window.requestAnimationFrame(render);\n manipulationCanvas.getContext('2d').clearRect(0, 0, manipulationCanvas.width, manipulationCanvas.height); //clears canvas\n triRenderer.render();\n }", "updateRendererState()\r\n {\r\n // update the renderer state object\r\n this.updateRendererStateObject();\r\n \r\n // create a new update id for the render\r\n this.updateRandomUpdateId();\r\n \r\n this.emit(\"rendererStateChanged\", this, this.rendererState);\r\n }", "onRender () {\n\n }", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function render() {\n\n\t\t\t}", "onRender() {\n if ( !this.mRunning )\n return;\n\n if ( SPE_USES_PREVIEW_IMAGE ) {\n document.querySelector( '.spline-preview-image-container' ).style.display = 'none';\n\n SPE_USES_PREVIEW_IMAGE = false;\n }\n\n if ( this.mPlayHandler && !this.mPlayHandler.isEnable ) {\n this.mPlayHandler.activate();\n }\n\n if ( this.mOrbitControls ) {\n this.mOrbitControls.update();\n }\n if ( this.mScene && this.mMainCamera ) {\n this.mRenderer.autoClear = true;\n this.mRenderer.render( this.mScene, this.mMainCamera );\n }\n }", "handleRenderCompletion() {\n this.renderNewChildren = false;\n this.preventUpdate = false;\n this.lastChildIndex = this.childCount;\n if (this.isRenderingNew) {\n this.isRenderingNew = false;\n this.update(null, false, true); // Prevent from triggering an item request to avoid infinite loop of loading.\n } else if (this.contentNode && InfiniteUtils.shouldTriggerItemRequest(InfiniteUtils.getContentData(this.contentNode))) {\n this.triggerItemRequest();\n }\n }", "function viewRenderComplete() {\n $container.trigger(topologyConstants.events.viewRenderComplete, {}); // Private Event\n }", "_notifyRenderer() {\n this.renderer.notify();\n }", "relayout() {\n dispatchSimpleEvent(this, 'relayout', true);\n }", "onBeforeRendering() {}", "render(renderedTemplate) {\n super.render()\n\n // render the template\n render(renderedTemplate, this, {\n eventContext: this\n })\n }", "function render() {\n view.update();\n requestAnimationFrame(render);\n}", "function render() {\n if (gameRunning) {\n world.camera.moveDimensions()\n context.clearRect(0, 0, canvas.width, canvas.height);\n world.render();\n setTimeout(render, renderTimeDelta)\n }\n}", "function _render(scene) {\n renderer.update(scene);\n }", "function render() {\r\n\r\n}", "function render() {\r\n\r\n}", "_invalidate() {\n\t\tif (this._invalidated) {\n\t\t\t// console.log(\"already invalidated\", this, ...arguments);\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.getDomRef() && !this._suppressInvalidation) {\n\t\t\tthis._invalidated = true;\n\t\t\t// console.log(\"INVAL\", this, ...arguments);\n\t\t\tRenderScheduler.renderDeferred(this);\n\t\t}\n\t}", "function renderOnce(){\n drawBoard(size);\n }", "function render(){\n spinCounter = 0;\n gamePlay();\n }", "function UpdateRender() {\n // Set background\n BackContextHandle.fillRect(0, 0, CanvasWidth, CanvasHeight);\n\n // Render\n BackContextHandle.save();\n Render();\n BackContextHandle.restore();\n\n // Swap the backbuffer with the frontbuffer\n var ImageData = BackContextHandle.getImageData(0, 0, CanvasWidth, CanvasHeight);\n ContextHandle.putImageData(ImageData, 0, 0);\n}", "_update() {\n render(this._template(), this.shadowRoot, {eventContext: this});\n }", "function lateRender() {\n\t\tsetTimeout( function() { // IE7 needs this so dimensions are calculated correctly\n\t\t\t\t\tif (!currentView.start && bodyVisible()) { // !currentView.start makes sure this never happens more than once\n\t\t\t\t\t\trenderView();\n\t\t\t\t\t}\n\t\t\t\t}, 0);\n\t}", "function render() {\n\t\trate = (droppedFrames > 0) ?\n\t\t\t((rate+(FPS/(droppedFrames*2)))/2):\n\t\t\t((rate + FPS)/2);\n\t\t\t\n\t\tcycleCounter = (cycleCounter + 1) % FPS;\n\t\tframeCounter = (frameCounter + 1) % 1e15;\n\t\t// just render every N frames to avoid a jarring display\n\t\tdroppedFrames = -1;\n\t\trdCallback();\n\t}", "onRender(scene, time) {}" ]
[ "0.7726372", "0.7672331", "0.7665788", "0.76572526", "0.76539224", "0.7652522", "0.7651107", "0.76429856", "0.76421237", "0.76247567", "0.7623794", "0.6994004", "0.67871696", "0.67314553", "0.67314553", "0.6673593", "0.65053445", "0.65043765", "0.6444167", "0.63916767", "0.6386083", "0.6215451", "0.60745835", "0.6063212", "0.6025815", "0.5983671", "0.59834343", "0.5943105", "0.58774674", "0.58774674", "0.58711886", "0.5855174", "0.5848575", "0.5833751", "0.5825184", "0.5825184", "0.5803323", "0.57938194", "0.57847404", "0.57549715", "0.5753157", "0.5745031", "0.5743764", "0.57243097", "0.5702407", "0.5698554", "0.56926113", "0.565947", "0.5650503", "0.5650503", "0.5606217", "0.55847776", "0.5571784", "0.5564836", "0.55646217", "0.55570143", "0.5551144", "0.5541771", "0.5538538", "0.5515794", "0.5510801", "0.55076826", "0.5506269", "0.54958576", "0.5494323", "0.54930204", "0.5490676", "0.5485293", "0.5483956", "0.5478577", "0.547311", "0.5464079", "0.545132", "0.54415125", "0.5434181", "0.5434181", "0.5434181", "0.5434181", "0.5434181", "0.5425733", "0.5420645", "0.5412628", "0.54028964", "0.53895235", "0.5386448", "0.538495", "0.5381009", "0.53802407", "0.5373726", "0.53733", "0.5364876", "0.5364876", "0.5362733", "0.53625435", "0.53615856", "0.5358409", "0.5353968", "0.53332514", "0.5331306", "0.53254426" ]
0.7655998
4
Callback invoked upon receiving a change event.
function onChange() { __debug_587( 'Received a change event.' ); if ( self._autoRender ) { // eslint-disable-line no-underscore-dangle self.render(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "change() { }", "function onChange() {\n\t\t__debug_452( 'Received a change event.' );\n\t\tself.render();\n\t}", "function onChange() {\n\t\t__debug_330( 'Received a change event.' );\n\t\tself.render();\n\t}", "handleEventChange() {\n }", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_730( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "onChange(callback) {\n\t\tthis.changeCallback = callback;\n\t}", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_259( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_488( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_596( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_412( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_475( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_520( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "onChanged(e){}", "function onChange() {\n\t\t__debug_457( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_332( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_429( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_577( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "onchange() {}", "function onChange() {\n console.log(\"something changed...\");\n \n }", "function onChange() {\n\t\t__debug_395( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "addChangeListener(callback) {\n this.on('change', callback);\n }", "function changeEvent() {\n var value_sub = properties.value;\n trigger_param_list.push(value_sub);\n // 'seek' event is like a forced-change event\n $pebble_slider_object.triggerHandler('seek', trigger_param_list);\n if (prev_change_value !== value_sub) {\n $pebble_slider_object.triggerHandler('change', trigger_param_list);\n prev_change_value = value_sub;\n }\n trigger_param_list.length = 0;\n }", "onChange(callback) {\n this.events.change.push({ callback });\n }", "function onChange() {\n if (input.get.call(element, valueField) !== observer.oldValue && !element.readOnly) {\n observer.set(input.get.call(element, valueField));\n }\n }", "function changeFunction() {\n\tconsole.log(\"onchange\");\n}", "addChangeListener (callback) {\n this.on(Constants.CHANGE_EVENT, callback);\n }", "onDidChange(callback) {\n return this.emitter.on('did-change', callback)\n }", "change(/*event*/) {\n this._super(...arguments);\n this._parse();\n }", "addChangeListener (callback) {\n\t\tthis.on(Constants.CHANGE_EVENT, callback);\n\t}", "function handleChange(editor, data, value) {\n onChange(value);\n }", "function handleChange(editor, data, value) {\n onChange(value);\n }", "onDataChange() {}", "changedCallback () {\n\t\tif (this.oldValue === this.value) return;\n\t\tthis._setTranslation();\n\t}", "change(fn, options) {\n\t\treturn this.on({ change: fn }, options);\n\t}", "change(fn, options) {\n\t\treturn this.on({ change: fn }, options);\n\t}", "onChange () {}", "onChange () {}", "onChange(changeListener) {\n changeListener.path = this.path;\n privateDataMap.get(this).addListener(changeListener, this.path);\n }", "handleChange(event) {\n this.dispatchEvent(new CustomEvent('change', {detail: event.target.value}));\n }", "function changed(change) {\n if (change.changeType === \"property\" && change.property === property) {\n fn(change);\n }\n }", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "_setOnChanges(){\n\t\tthis.inputs.forEach(i => i.addEventListener('change', this._onChange.bind(this)));\t\n\t}", "handleChange(event) {\n\n }", "function onChangeHandler(e) {\n\n }", "function onChangeHandler(e) {\n\n }", "emitChange() {\n\t\tthis.emit(CHANGE_EVENT)\n\t}", "addChangeListener(callback) {\n\t\tthis.on(CHANGE_EVENT, callback)\n\t}", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "internalOnChange(event) {\n const me = this,\n value = me.value,\n oldValue = me._lastValue;\n\n // Don't trigger change if we enter invalid value or if value has not changed (for IE when pressing ENTER)\n if (me.isValid && value !== oldValue) {\n me._lastValue = value;\n\n // trigger change event, signaling that origin is from user\n me.trigger('change', { value, oldValue, event, userAction: true });\n\n // per default Field triggers action event on change, but might be reconfigured in subclasses (such as Combo)\n if (me.defaultAction === 'change') {\n me.trigger('action', { value, oldValue, event });\n }\n }\n\n // since Widget has Events mixed in configured with 'callOnFunctions' this will also call onClick and onAction\n }", "handleChange () {\n this.props.onStatusChange(\n this.props.item.id,\n this.refs.checkbox.checked ? 'RESERVED' : 'NEW'\n );\n }", "_valueChanged() {\n // Send a global refresh to the bapge body.\n var event = new Event(\"change\");\n this._root.dispatchEvent(event);\n }", "emitChange() {\n this.emit(CHANGE_EVENT);\n }", "emitChange() {\n this.emit(CHANGE_EVENT);\n }", "_triggerChangeEvent() {\n\t\tif ( this.$control.rendered && ! this.changeEventDisabled ) {\n\t\t\tthis._updateSettings();\n\t\t\tthis.events.emit( 'change', this.settings );\n\t\t}\n\t}", "handleChange(event){\n changeHandler(event,this);\n }", "setOnValueChangeEvent(func){\r\n this._onValueChange = func;\r\n }", "function referenceOnChange() {\n MicroReferenceAPI.onStatusChange(criteriaId);\n }", "function handleChange(event, newValue) {\n setValue(newValue);\n }", "onChange(callback) {\n this.listeners.push(callback);\n }", "onGenericChange() {\n this.contentChanged.emit(void 0);\n }", "afterValidChange() { }", "static on_changed(chr, _retval) {\n let uuid = chr.getUuid()\n console.log(colours.fg.blue + \"[BLE] [CHANGE ]\" + colours.fg.yellow + \" UUID: \" + uuid.toString() + colours.fg.magenta + \" | data: 0x\" + bytes2hex(chr.getValue()) + colours.reset);\n }", "changedInput() {\n\n\t\tlet {isValid, error} = this.state.wasInvalid ? this.validate() : this.state;\n\t\tlet onChange = this.props.onChange;\n\t\tif (onChange) {\n\t\t\tonChange(this.getValue(), isValid, error);\n\t\t}\n\t\tif (this.context.validationSchema) {\n\t\t\tlet value = this.getValue();\n\t\t\tif (this.state.isMultiSelect && value === '') {\n\t\t\t\tvalue = [];\n\t\t\t}\n\t\t\tif (this.shouldTypeBeNumberBySchemeDefinition(this.props.pointer)) {\n\t\t\t\tvalue = Number(value);\n\t\t\t}\n\t\t\tthis.context.validationParent.onValueChanged(this.props.pointer, value, isValid, error);\n\t\t}\n\t}", "_evtChange(event) { }", "on_change(event)\n\t{\n\t\t// Extract `value` from the argument\n\t\t// of this `onChange` listener\n\t\t// (for convenience)\n\n\t\tlet value = event\n\n\t\tif (event.target !== undefined)\n\t\t{\n\t\t\tvalue = event.target.value\n\t\t}\n\n\t\t// Call the parent `onChange` handler\n\t\t// with the `value` as an argument\n\t\t// (for convenience)\n\n\t\tconst { onChange } = this.props\n\n\t\tonChange(value)\n\t}", "handleChange() {\n this.forceUpdate();\n }", "function triggerChange(t) { t.dispatchEvent(changeEvent) }", "function onChange() {\n\n // hide and show input elements for which this is necessary\n setVisibility();\n\n // update preview considering the changed input value\n updatePreview();\n\n // perform change actions\n self.onchange && self.onchange( self );\n\n }", "function onChange() {\n\n // hide and show input elements for which this is necessary\n setVisibility();\n\n // update preview considering the changed input value\n updatePreview();\n\n // perform change actions\n self.onchange && self.onchange( self );\n\n }", "function changed() {\n\t\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t\t}", "registerOnChange(fn) {\n this.propagateChanges = fn;\n }", "handleChange (event) {\n }", "onCurrentChanged(value) {\n /* no-op */\n }", "onChange() {\n triggerEvent(this.input, 'input');\n triggerEvent(this.input, 'change');\n }", "function changed() {\n\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t}", "function changed() {\n\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t}", "_onChange() {\n void this._debouncer.invoke();\n }", "emitChange () {\n this.emit(Constants.CHANGE_EVENT);\n }", "onDidChange (callback) {\n\t\tconst changeSubscription = this.file.onDidChange(callback);\n\t\tthis.subscriptions.add(changeSubscription);\n\t\treturn changeSubscription;\n\t}", "onChange(item) {}", "dispatchChange() {\n this.toggleAttribute(\"empty\", !this.value);\n this.dispatchEvent(new CustomEvent(\"change\", { bubbles: true }));\n }", "function handleChange(){\n\t\t\t// Error handles\n\t\t\tif(xhr.readyState === this.DONE && xhr.status !== 200){\n\t\t\t\tconsole.log('check yoself');\n\t\t\t}\n\t\t\t// success handles\n\t\t\tif(xhr.readyState === this.DONE && xhr.status === 200){\n\t\t\t\tcallback(xhr.response);\n\t\t\t}\n\n\t\t}", "registerChangeListener(cb) {\n this._slider.events.on('indexChanged', cb);\n }", "function onChanged() {\n let g = getGlobal();\n\n //When the add-in creates the table, it will generate 4 events that we must ignore.\n //We only want to respond to the change events from the user.\n if (g.tableEventCount > 0) {\n g.tableEventCount--;\n return; //count down to throw away events caused by the table creation code\n }\n\n //check if dirty flag was set (flag avoids extra unnecessary ribbon operations)\n if (!g.isTableDirty) {\n g.isTableDirty = true;\n\n //Enable the Refresh and Submit buttons\n setSyncButtonEnabled(true);\n }\n}", "_triggerChange (e) {\n var args = [this.getValue(), this.getFormElement(), this.getUIElement()];\n if (e) {\n args.push(e);\n }\n if (this.options.onChange) {\n this.options.onChange.apply(this, args);\n }\n }", "_onChange(value) {\n this.setState({ changesMade: value });\n }", "_codemirrorValueChanged() {\n // Don't trigger change event if we're ignoring changes\n if (this._ignoreNextChange || !this.props.onChange) {\n this._ignoreNextChange = false;\n return;\n }\n\n const value = this.codeMirror.getDoc().getValue();\n\n // Disable linting if the document reaches a maximum size or is empty\n const shouldLint =\n value.length > MAX_SIZE_FOR_LINTING || value.length === 0 ? false : !this.props.noLint;\n const existingLint = this.codeMirror.options.lint || false;\n if (shouldLint !== existingLint) {\n const { lintOptions } = this.props;\n const lint = shouldLint ? lintOptions || true : false;\n this.codeMirror.setOption('lint', lint);\n }\n\n this.props.onChange(value);\n }", "function onChange(change) {\r\n\t\t//split up the path to get the file name\r\n\t\tvar splitUpPath = change.path.split('/');\r\n\r\n\t\t//log the file detected\r\n\t\tconsole.log('\"' + splitUpPath[splitUpPath.length - 1] + '\" was ' + change.type);\r\n\t}", "_onChange() {\n let value = this.get('value');\n return this.attrs.onChange(value, this);\n }", "function optionChanged(changed){\n charts(changed);\n metadata(changed);\n}", "addChangeListener(callback) {\n Bullet.on(LOCAL_EVENT_NAME, callback)\n }", "handleChangeEvent() {\n this.cacheHasChanged = true;\n }", "_onChange () {\n this.forceUpdate()\n }", "changeFn(event) {\n var fileList = event.__files_ || (event.target && event.target.files);\n if (!fileList)\n return;\n this.stopEvent(event);\n this.handleFiles(fileList);\n }", "get onChange() {\n\t\treturn this._onChange;\n\t}", "get onChange() {\n\t\treturn this._onChange;\n\t}", "get onChange() {\n\t\treturn this._onChange;\n\t}", "function sampleOnChange() {\n SkillSampleAPI.onStatusChange(criteriaId);\n }", "reportValueChange() {\n if (this.options) {\n const value = this.getSelectedOptionValues();\n this.onChange(value);\n this._value = value;\n }\n }" ]
[ "0.76206696", "0.7620642", "0.7603297", "0.7567978", "0.7562529", "0.7559636", "0.75364155", "0.7521261", "0.7512532", "0.7497861", "0.74954176", "0.74885535", "0.7486875", "0.74790376", "0.7469961", "0.7469411", "0.74654305", "0.74590075", "0.74529", "0.74512655", "0.7369066", "0.730385", "0.72735673", "0.72414035", "0.71549815", "0.7152514", "0.7128517", "0.7093095", "0.7083617", "0.7009139", "0.7009139", "0.69793963", "0.6974256", "0.6947616", "0.6947616", "0.69458693", "0.69458693", "0.6937772", "0.6914656", "0.690971", "0.6908083", "0.68284774", "0.682663", "0.68252903", "0.68252903", "0.6824956", "0.6818822", "0.6811583", "0.6811583", "0.6786172", "0.6765572", "0.67383015", "0.6705071", "0.6705071", "0.6690313", "0.668894", "0.6682675", "0.66756", "0.6664683", "0.6661744", "0.66555774", "0.6622243", "0.66172475", "0.66127586", "0.66093457", "0.6608061", "0.6598658", "0.65959495", "0.659532", "0.659532", "0.658595", "0.65802854", "0.657574", "0.6562282", "0.654525", "0.6543162", "0.6543162", "0.6542606", "0.6511655", "0.6500862", "0.6486968", "0.64826125", "0.6478265", "0.6468562", "0.6468112", "0.6466427", "0.64623266", "0.6457302", "0.64557207", "0.6430325", "0.64199036", "0.6416071", "0.64035237", "0.63999367", "0.6397887", "0.6395908", "0.6395908", "0.6395908", "0.63955903", "0.6395481" ]
0.7519743
8
Reemits a render event.
function onRender() { var args; var i; __debug_587( 'Received a render event. Re-emitting...' ); args = new Array( arguments.length+1 ); args[ 0 ] = 'render'; for ( i = 0; i < arguments.length; i++ ) { args[ i+1 ] = arguments[ i ]; } self.emit.apply( self, args ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_395( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_577( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_412( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_457( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_488( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_332( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_330( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_475( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_429( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_452( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_520( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function RenderEvent() {}", "function resumeRender() {\n shouldRender = true;\n render();\n }", "function handleRender() {\n view._isRendered = true;\n triggerDOMRefresh();\n }", "function handleRender() {\n view._isRendered = true;\n triggerDOMRefresh();\n }", "function handleRender() {\n\t view._isRendered = true;\n\t triggerDOMRefresh();\n\t }", "function handleRender(view) {\n view._isRendered = true;\n triggerDOMRefresh(view);\n }", "function handleRender(view){\r\n view._isRendered = true;\r\n triggerDOMRefresh(view);\r\n }", "render(...args) {\n if (this._render) {\n this.__notify(EV.BEFORE_RENDER);\n this._render(...args);\n this.__notify(EV.RENDERED);\n }\n\n this.rendered = true;\n }", "function renderCall() {\n // Repaint?\n if (needs_repaint === true) {\n needs_repaint = false;\n\n ctx.clearRect(0, 0, canvas_el.width, canvas_el.height);\n\n renderTimeXAxis();\n renderElementsMargin();\n\n renderRows();\n\n renderCurrentTimePoint();\n\n }\n }", "onRender()/*: void*/ {\n this.render();\n }", "unrender() {\n this.rendered = false;\n }", "postRender() {\n if (!this.multiFire || !this._hasFired) {\n return;\n }\n\n this._hasFired = false;\n this._nextFire = this._tempNextFire;\n }", "postRendering() {\n this.ctx.restore();\n }", "handleRendered_() {\n\t\tthis.isRendered_ = true;\n\t}", "function invalidate () {\n\t if (!options.batching) {\n\t if (!isRendering) render()\n\t } else {\n\t if (!frameId) frameId = raf(render)\n\t }\n\t }", "function invalidate () {\n if (!options.batching) {\n if (!isRendering) render()\n } else {\n if (!frameId) frameId = raf(render)\n }\n }", "render() {\n const self = this;\n const data = self.get('data');\n if (!data) {\n throw new Error('data must be defined first');\n }\n self.clear();\n self.emit('beforerender');\n self.refreshLayout(this.get('fitView'));\n self.emit('afterrender');\n }", "function render() {\n\t if(stopped || scene.contextLost) {\n\t return\n\t }\n\t requestAnimationFrame(render)\n\t redraw()\n\t }", "function render() {\n\t if(stopped || scene.contextLost) {\n\t return\n\t }\n\t requestAnimationFrame(render)\n\t redraw()\n\t }", "function render() {\n\n isRendered = true;\n\n renderSource();\n\n }", "function renderCallback() {\n\n while (TO_RENDER.length) {\n TO_RENDER.shift().notify();\n }\n\n TO_RENDER.added = {};\n\n while (ENV_QUEUE.length) {\n var env = ENV_QUEUE.shift();\n for (var key in env.revalidateQueue) {\n env.revalidateQueue[key].revalidate();\n }\n reslot(env);\n }\n ENV_QUEUE.added = {};\n}", "_requestRender() { this._invalidateProperties(); }", "function render() {\n\tclearCanvas();\n\tRenderer.draw();\n\t\n\t\t\n}", "function completeRender() {\n var afterRender = options.afterRender;\n\n if (afterRender) {\n afterRender.call(root, root);\n }\n\n // Always emit an afterRender event.\n root.trigger(\"afterRender\", root);\n }", "function completeRender() {\n var afterRender = options.afterRender;\n\n if (afterRender) {\n afterRender.call(root, root);\n }\n\n // Always emit an afterRender event.\n root.trigger(\"afterRender\", root);\n }", "function render() {\n\n\t\t\tisRendered = true;\n\n\t\t\trenderSource();\n\n\t\t}", "function pauseRender() {\n shouldRender = false;\n }", "willClearRender() {\n\t\tconsole.log('willClearRender ejecutado!');\n\t}", "function render () {\n // If this is called synchronously we need to\n // cancel any pending future updates\n clearFrame()\n\n // If the rendering from the previous frame is still going,\n // we'll just wait until the next frame. Ideally renders should\n // not take over 16ms to stay within a single frame, but this should\n // catch it if it does.\n if (isRendering) {\n frameId = raf(render)\n return\n } else {\n isRendering = true\n }\n\n // 1. If there isn't a native element rendered for the current mounted element\n // then we need to create it from scratch.\n // 2. If a new element has been mounted, we should diff them.\n // 3. We should update check all child components for changes.\n if (!currentNativeElement) {\n currentElement = app.element\n currentNativeElement = toNative(rootId, '0', currentElement)\n container.appendChild(currentNativeElement)\n } else if (currentElement !== app.element) {\n currentNativeElement = patch(rootId, currentElement, app.element, currentNativeElement)\n currentElement = app.element\n updateChildren(rootId)\n } else {\n updateChildren(rootId)\n }\n\n // Allow rendering again.\n isRendering = false\n }", "postrender() {\n this.gl.flush();\n }", "function render() {\n if(stopped || scene.contextLost) {\n return\n }\n requestAnimationFrame(render)\n redraw()\n }", "function clearRenderTimer() {\n\n\t\t\tclearTimeout(renderTimer);\n\n\t\t\trenderTimer = null;\n\n\t\t}", "function clearRenderTimer() {\n\n clearTimeout(renderTimer);\n\n renderTimer = null;\n\n }", "function render() {\n if (!willRender) {\n willRender = true;\n process.nextTick(function() {\n screen.render();\n willRender = false;\n });\n }\n}", "function r(e) {\n this.reinitializeTransaction(), // Only server-side rendering really needs this option (see\n // `ReactServerRendering`), but server-side uses\n // `ReactServerRenderingTransaction` instead. This option is here so that it's\n // accessible and defaults to false when `ReactDOMComponent` and\n // `ReactDOMTextComponent` checks it in `mountComponent`.`\n this.renderToStaticMarkup = !1, this.reactMountReady = i.getPooled(null), this.useCreateElement = e;\n }", "function rerender() {\n\tscreen.innerText = buffer;\n}", "function reRender() {\n input.innerText = buffer;\n}", "afterRender() { }", "afterRender() { }", "reRender() {\n this.removeAllChildrenComponents()\n\n this.build()\n }", "function render() {\n renderLives();\n renderTimeRemaining();\n }", "function render() {\n\t\t\n\t}", "function _triggerAfterRender() {\n _trigger(docma.Event.Render, [docma.currentRoute]);\n if (_initialLoad) {\n _trigger(docma.Event.Ready);\n _initialLoad = false;\n }\n }", "function render() {\n\t\t\t}", "function render () {\n\t // If this is called synchronously we need to\n\t // cancel any pending future updates\n\t clearFrame()\n\n\t // If the rendering from the previous frame is still going,\n\t // we'll just wait until the next frame. Ideally renders should\n\t // not take over 16ms to stay within a single frame, but this should\n\t // catch it if it does.\n\t if (isRendering) {\n\t frameId = raf(render)\n\t return\n\t } else {\n\t isRendering = true\n\t }\n\n\t // 1. If there isn't a native element rendered for the current mounted element\n\t // then we need to create it from scratch.\n\t // 2. If a new element has been mounted, we should diff them.\n\t // 3. We should update check all child components for changes.\n\t if (!currentNativeElement) {\n\t currentElement = app.element\n\t currentNativeElement = toNative(rootId, '0', currentElement)\n\t if (container.children.length > 0) {\n\t console.info('deku: The container element is not empty. These elements will be removed. Read more: http://cl.ly/b0Sr')\n\t }\n\t if (container === document.body) {\n\t console.warn('deku: Using document.body is allowed but it can cause some issues. Read more: http://cl.ly/b0SC')\n\t }\n\t removeAllChildren(container)\n\t container.appendChild(currentNativeElement)\n\t } else if (currentElement !== app.element) {\n\t currentNativeElement = patch(rootId, currentElement, app.element, currentNativeElement)\n\t currentElement = app.element\n\t updateChildren(rootId)\n\t } else {\n\t updateChildren(rootId)\n\t }\n\n\t // Call mount events on all new entities\n\t flushMountQueue()\n\n\t // Allow rendering again.\n\t isRendering = false\n\n\t }", "function render() {\n\t}", "render() {\n\n // Calculate delta\n if (!this.lastFrameTime) this.lastFrameTime = Date.now()\n this.delta = Math.min(1, (Date.now() - this.lastFrameTime) / 1000)\n this.lastFrameTime = Date.now()\n\n // Check if should be rendering\n if (!this.isRendering)\n return\n\n // Request another frame\n requestAnimationFrame(this.render)\n\n }", "static finishedRenderingComponent() {\n\t\trenderingComponents_.pop();\n\t}", "function render( timestamp )\n\t{\n\t\t\n\t\trequestAnimationFrame( render );\n\t\t\n\t\tcanvas_handler.draw_all( );\n\t\t\n\t}", "_endRender() {\n this._allowRegisterSegment = false;\n }", "function _render() {\n _render = (0, _asyncToGenerator2.default)(\n /*#__PURE__*/\n _regenerator.default.mark(function _callee2(props) {\n return _regenerator.default.wrap(\n function _callee2$(_context2) {\n while (1) {\n switch ((_context2.prev = _context2.next)) {\n case 0:\n if (!props.err) {\n _context2.next = 4;\n break;\n }\n\n _context2.next = 3;\n return renderError(props);\n\n case 3:\n return _context2.abrupt(\"return\");\n\n case 4:\n _context2.prev = 4;\n _context2.next = 7;\n return doRender(props);\n\n case 7:\n _context2.next = 13;\n break;\n\n case 9:\n _context2.prev = 9;\n _context2.t0 = _context2[\"catch\"](4);\n _context2.next = 13;\n return renderError(\n (0, _objectSpread2.default)({}, props, {\n err: _context2.t0,\n })\n );\n\n case 13:\n case \"end\":\n return _context2.stop();\n }\n }\n },\n _callee2,\n this,\n [[4, 9]]\n );\n })\n );\n return _render.apply(this, arguments);\n }", "redraw() {\n this.createBackground();\n this.render();\n }", "cancelRendering() {\n if (this.renderTask) {\n this.renderTask.cancel();\n this.renderTask = null;\n }\n this.resume = null;\n }", "_render(model) {\n\t\tthis._coordinator.newEvent({\n\t\t\tsource: this.constructor.name,\n\t\t\ttype: 'render',\n\t\t\tdata: {\n\t\t\t\toriginX: this._originX,\n\t\t\t\toriginY: this._originY,\n\t\t\t\twidth: this._width,\n\t\t\t\theight: this._height\n\t\t\t}\n\t\t});\n\t}", "rerender() {\n\t\tthis.setState(this.state)\n\t}", "reRender(skipPreRenderRefresh = false) {\n this.refreshFromRerender = true;\n super.reRender(skipPreRenderRefresh);\n this.initDomEvents();\n }", "renderEventInput() {\n eventContainer.innerHTML = \"\";\n eventContainer.innerHTML = eventHtml.makeNewEventHtml();\n }", "function renderCal() {\n $('#calendar').fullCalendar('rerenderEvents');\n }", "function render() {\r\n graphics.clear();\r\n myTexture.draw();\r\n }", "function Render() {\n ClearScreen();\n RenderEnergeticDroplets();\n ResetRenderingConditions();\n}", "function render() {\n window.requestAnimationFrame(render);\n manipulationCanvas.getContext('2d').clearRect(0, 0, manipulationCanvas.width, manipulationCanvas.height); //clears canvas\n triRenderer.render();\n }", "updateRendererState()\r\n {\r\n // update the renderer state object\r\n this.updateRendererStateObject();\r\n \r\n // create a new update id for the render\r\n this.updateRandomUpdateId();\r\n \r\n this.emit(\"rendererStateChanged\", this, this.rendererState);\r\n }", "onRender () {\n\n }", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function render() {\n\n\t\t\t}", "onRender() {\n if ( !this.mRunning )\n return;\n\n if ( SPE_USES_PREVIEW_IMAGE ) {\n document.querySelector( '.spline-preview-image-container' ).style.display = 'none';\n\n SPE_USES_PREVIEW_IMAGE = false;\n }\n\n if ( this.mPlayHandler && !this.mPlayHandler.isEnable ) {\n this.mPlayHandler.activate();\n }\n\n if ( this.mOrbitControls ) {\n this.mOrbitControls.update();\n }\n if ( this.mScene && this.mMainCamera ) {\n this.mRenderer.autoClear = true;\n this.mRenderer.render( this.mScene, this.mMainCamera );\n }\n }", "handleRenderCompletion() {\n this.renderNewChildren = false;\n this.preventUpdate = false;\n this.lastChildIndex = this.childCount;\n if (this.isRenderingNew) {\n this.isRenderingNew = false;\n this.update(null, false, true); // Prevent from triggering an item request to avoid infinite loop of loading.\n } else if (this.contentNode && InfiniteUtils.shouldTriggerItemRequest(InfiniteUtils.getContentData(this.contentNode))) {\n this.triggerItemRequest();\n }\n }", "function viewRenderComplete() {\n $container.trigger(topologyConstants.events.viewRenderComplete, {}); // Private Event\n }", "_notifyRenderer() {\n this.renderer.notify();\n }", "relayout() {\n dispatchSimpleEvent(this, 'relayout', true);\n }", "onBeforeRendering() {}", "render(renderedTemplate) {\n super.render()\n\n // render the template\n render(renderedTemplate, this, {\n eventContext: this\n })\n }", "function render() {\n view.update();\n requestAnimationFrame(render);\n}", "function render() {\n if (gameRunning) {\n world.camera.moveDimensions()\n context.clearRect(0, 0, canvas.width, canvas.height);\n world.render();\n setTimeout(render, renderTimeDelta)\n }\n}", "function _render(scene) {\n renderer.update(scene);\n }", "function render() {\r\n\r\n}", "function render() {\r\n\r\n}", "_invalidate() {\n\t\tif (this._invalidated) {\n\t\t\t// console.log(\"already invalidated\", this, ...arguments);\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.getDomRef() && !this._suppressInvalidation) {\n\t\t\tthis._invalidated = true;\n\t\t\t// console.log(\"INVAL\", this, ...arguments);\n\t\t\tRenderScheduler.renderDeferred(this);\n\t\t}\n\t}", "function renderOnce(){\n drawBoard(size);\n }", "function render(){\n spinCounter = 0;\n gamePlay();\n }", "function UpdateRender() {\n // Set background\n BackContextHandle.fillRect(0, 0, CanvasWidth, CanvasHeight);\n\n // Render\n BackContextHandle.save();\n Render();\n BackContextHandle.restore();\n\n // Swap the backbuffer with the frontbuffer\n var ImageData = BackContextHandle.getImageData(0, 0, CanvasWidth, CanvasHeight);\n ContextHandle.putImageData(ImageData, 0, 0);\n}", "_update() {\n render(this._template(), this.shadowRoot, {eventContext: this});\n }", "function lateRender() {\n\t\tsetTimeout( function() { // IE7 needs this so dimensions are calculated correctly\n\t\t\t\t\tif (!currentView.start && bodyVisible()) { // !currentView.start makes sure this never happens more than once\n\t\t\t\t\t\trenderView();\n\t\t\t\t\t}\n\t\t\t\t}, 0);\n\t}", "function render() {\n\t\trate = (droppedFrames > 0) ?\n\t\t\t((rate+(FPS/(droppedFrames*2)))/2):\n\t\t\t((rate + FPS)/2);\n\t\t\t\n\t\tcycleCounter = (cycleCounter + 1) % FPS;\n\t\tframeCounter = (frameCounter + 1) % 1e15;\n\t\t// just render every N frames to avoid a jarring display\n\t\tdroppedFrames = -1;\n\t\trdCallback();\n\t}", "onRender(scene, time) {}" ]
[ "0.7672331", "0.7665788", "0.76572526", "0.7655998", "0.76539224", "0.7652522", "0.7651107", "0.76429856", "0.76421237", "0.76247567", "0.7623794", "0.6994004", "0.67871696", "0.67314553", "0.67314553", "0.6673593", "0.65053445", "0.65043765", "0.6444167", "0.63916767", "0.6386083", "0.6215451", "0.60745835", "0.6063212", "0.6025815", "0.5983671", "0.59834343", "0.5943105", "0.58774674", "0.58774674", "0.58711886", "0.5855174", "0.5848575", "0.5833751", "0.5825184", "0.5825184", "0.5803323", "0.57938194", "0.57847404", "0.57549715", "0.5753157", "0.5745031", "0.5743764", "0.57243097", "0.5702407", "0.5698554", "0.56926113", "0.565947", "0.5650503", "0.5650503", "0.5606217", "0.55847776", "0.5571784", "0.5564836", "0.55646217", "0.55570143", "0.5551144", "0.5541771", "0.5538538", "0.5515794", "0.5510801", "0.55076826", "0.5506269", "0.54958576", "0.5494323", "0.54930204", "0.5490676", "0.5485293", "0.5483956", "0.5478577", "0.547311", "0.5464079", "0.545132", "0.54415125", "0.5434181", "0.5434181", "0.5434181", "0.5434181", "0.5434181", "0.5425733", "0.5420645", "0.5412628", "0.54028964", "0.53895235", "0.5386448", "0.538495", "0.5381009", "0.53802407", "0.5373726", "0.53733", "0.5364876", "0.5364876", "0.5362733", "0.53625435", "0.53615856", "0.5358409", "0.5353968", "0.53332514", "0.5331306", "0.53254426" ]
0.7726372
0
Callback invoked upon receiving a change event.
function onChange() { __debug_475( 'Received a change event.' ); if ( self._autoRender ) { // eslint-disable-line no-underscore-dangle self.render(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onChange() {\n\t\t__debug_452( 'Received a change event.' );\n\t\tself.render();\n\t}", "change() { }", "function onChange() {\n\t\t__debug_330( 'Received a change event.' );\n\t\tself.render();\n\t}", "handleEventChange() {\n }", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_730( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "onChange(callback) {\n\t\tthis.changeCallback = callback;\n\t}", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_259( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_488( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_587( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_596( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_412( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_520( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "onChanged(e){}", "function onChange() {\n\t\t__debug_457( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_332( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_429( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_577( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "onchange() {}", "function onChange() {\n console.log(\"something changed...\");\n \n }", "function onChange() {\n\t\t__debug_395( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "addChangeListener(callback) {\n this.on('change', callback);\n }", "function changeEvent() {\n var value_sub = properties.value;\n trigger_param_list.push(value_sub);\n // 'seek' event is like a forced-change event\n $pebble_slider_object.triggerHandler('seek', trigger_param_list);\n if (prev_change_value !== value_sub) {\n $pebble_slider_object.triggerHandler('change', trigger_param_list);\n prev_change_value = value_sub;\n }\n trigger_param_list.length = 0;\n }", "onChange(callback) {\n this.events.change.push({ callback });\n }", "function onChange() {\n if (input.get.call(element, valueField) !== observer.oldValue && !element.readOnly) {\n observer.set(input.get.call(element, valueField));\n }\n }", "function changeFunction() {\n\tconsole.log(\"onchange\");\n}", "addChangeListener (callback) {\n this.on(Constants.CHANGE_EVENT, callback);\n }", "onDidChange(callback) {\n return this.emitter.on('did-change', callback)\n }", "change(/*event*/) {\n this._super(...arguments);\n this._parse();\n }", "addChangeListener (callback) {\n\t\tthis.on(Constants.CHANGE_EVENT, callback);\n\t}", "function handleChange(editor, data, value) {\n onChange(value);\n }", "function handleChange(editor, data, value) {\n onChange(value);\n }", "onDataChange() {}", "changedCallback () {\n\t\tif (this.oldValue === this.value) return;\n\t\tthis._setTranslation();\n\t}", "change(fn, options) {\n\t\treturn this.on({ change: fn }, options);\n\t}", "change(fn, options) {\n\t\treturn this.on({ change: fn }, options);\n\t}", "onChange () {}", "onChange () {}", "onChange(changeListener) {\n changeListener.path = this.path;\n privateDataMap.get(this).addListener(changeListener, this.path);\n }", "handleChange(event) {\n this.dispatchEvent(new CustomEvent('change', {detail: event.target.value}));\n }", "function changed(change) {\n if (change.changeType === \"property\" && change.property === property) {\n fn(change);\n }\n }", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "_setOnChanges(){\n\t\tthis.inputs.forEach(i => i.addEventListener('change', this._onChange.bind(this)));\t\n\t}", "handleChange(event) {\n\n }", "emitChange() {\n\t\tthis.emit(CHANGE_EVENT)\n\t}", "function onChangeHandler(e) {\n\n }", "function onChangeHandler(e) {\n\n }", "addChangeListener(callback) {\n\t\tthis.on(CHANGE_EVENT, callback)\n\t}", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "internalOnChange(event) {\n const me = this,\n value = me.value,\n oldValue = me._lastValue;\n\n // Don't trigger change if we enter invalid value or if value has not changed (for IE when pressing ENTER)\n if (me.isValid && value !== oldValue) {\n me._lastValue = value;\n\n // trigger change event, signaling that origin is from user\n me.trigger('change', { value, oldValue, event, userAction: true });\n\n // per default Field triggers action event on change, but might be reconfigured in subclasses (such as Combo)\n if (me.defaultAction === 'change') {\n me.trigger('action', { value, oldValue, event });\n }\n }\n\n // since Widget has Events mixed in configured with 'callOnFunctions' this will also call onClick and onAction\n }", "handleChange () {\n this.props.onStatusChange(\n this.props.item.id,\n this.refs.checkbox.checked ? 'RESERVED' : 'NEW'\n );\n }", "_valueChanged() {\n // Send a global refresh to the bapge body.\n var event = new Event(\"change\");\n this._root.dispatchEvent(event);\n }", "emitChange() {\n this.emit(CHANGE_EVENT);\n }", "emitChange() {\n this.emit(CHANGE_EVENT);\n }", "_triggerChangeEvent() {\n\t\tif ( this.$control.rendered && ! this.changeEventDisabled ) {\n\t\t\tthis._updateSettings();\n\t\t\tthis.events.emit( 'change', this.settings );\n\t\t}\n\t}", "handleChange(event){\n changeHandler(event,this);\n }", "setOnValueChangeEvent(func){\r\n this._onValueChange = func;\r\n }", "function referenceOnChange() {\n MicroReferenceAPI.onStatusChange(criteriaId);\n }", "function handleChange(event, newValue) {\n setValue(newValue);\n }", "onChange(callback) {\n this.listeners.push(callback);\n }", "onGenericChange() {\n this.contentChanged.emit(void 0);\n }", "afterValidChange() { }", "static on_changed(chr, _retval) {\n let uuid = chr.getUuid()\n console.log(colours.fg.blue + \"[BLE] [CHANGE ]\" + colours.fg.yellow + \" UUID: \" + uuid.toString() + colours.fg.magenta + \" | data: 0x\" + bytes2hex(chr.getValue()) + colours.reset);\n }", "changedInput() {\n\n\t\tlet {isValid, error} = this.state.wasInvalid ? this.validate() : this.state;\n\t\tlet onChange = this.props.onChange;\n\t\tif (onChange) {\n\t\t\tonChange(this.getValue(), isValid, error);\n\t\t}\n\t\tif (this.context.validationSchema) {\n\t\t\tlet value = this.getValue();\n\t\t\tif (this.state.isMultiSelect && value === '') {\n\t\t\t\tvalue = [];\n\t\t\t}\n\t\t\tif (this.shouldTypeBeNumberBySchemeDefinition(this.props.pointer)) {\n\t\t\t\tvalue = Number(value);\n\t\t\t}\n\t\t\tthis.context.validationParent.onValueChanged(this.props.pointer, value, isValid, error);\n\t\t}\n\t}", "_evtChange(event) { }", "on_change(event)\n\t{\n\t\t// Extract `value` from the argument\n\t\t// of this `onChange` listener\n\t\t// (for convenience)\n\n\t\tlet value = event\n\n\t\tif (event.target !== undefined)\n\t\t{\n\t\t\tvalue = event.target.value\n\t\t}\n\n\t\t// Call the parent `onChange` handler\n\t\t// with the `value` as an argument\n\t\t// (for convenience)\n\n\t\tconst { onChange } = this.props\n\n\t\tonChange(value)\n\t}", "handleChange() {\n this.forceUpdate();\n }", "function triggerChange(t) { t.dispatchEvent(changeEvent) }", "function onChange() {\n\n // hide and show input elements for which this is necessary\n setVisibility();\n\n // update preview considering the changed input value\n updatePreview();\n\n // perform change actions\n self.onchange && self.onchange( self );\n\n }", "function onChange() {\n\n // hide and show input elements for which this is necessary\n setVisibility();\n\n // update preview considering the changed input value\n updatePreview();\n\n // perform change actions\n self.onchange && self.onchange( self );\n\n }", "function changed() {\n\t\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t\t}", "registerOnChange(fn) {\n this.propagateChanges = fn;\n }", "handleChange (event) {\n }", "onCurrentChanged(value) {\n /* no-op */\n }", "onChange() {\n triggerEvent(this.input, 'input');\n triggerEvent(this.input, 'change');\n }", "function changed() {\n\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t}", "function changed() {\n\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t}", "_onChange() {\n void this._debouncer.invoke();\n }", "emitChange () {\n this.emit(Constants.CHANGE_EVENT);\n }", "onDidChange (callback) {\n\t\tconst changeSubscription = this.file.onDidChange(callback);\n\t\tthis.subscriptions.add(changeSubscription);\n\t\treturn changeSubscription;\n\t}", "onChange(item) {}", "dispatchChange() {\n this.toggleAttribute(\"empty\", !this.value);\n this.dispatchEvent(new CustomEvent(\"change\", { bubbles: true }));\n }", "function handleChange(){\n\t\t\t// Error handles\n\t\t\tif(xhr.readyState === this.DONE && xhr.status !== 200){\n\t\t\t\tconsole.log('check yoself');\n\t\t\t}\n\t\t\t// success handles\n\t\t\tif(xhr.readyState === this.DONE && xhr.status === 200){\n\t\t\t\tcallback(xhr.response);\n\t\t\t}\n\n\t\t}", "registerChangeListener(cb) {\n this._slider.events.on('indexChanged', cb);\n }", "function onChanged() {\n let g = getGlobal();\n\n //When the add-in creates the table, it will generate 4 events that we must ignore.\n //We only want to respond to the change events from the user.\n if (g.tableEventCount > 0) {\n g.tableEventCount--;\n return; //count down to throw away events caused by the table creation code\n }\n\n //check if dirty flag was set (flag avoids extra unnecessary ribbon operations)\n if (!g.isTableDirty) {\n g.isTableDirty = true;\n\n //Enable the Refresh and Submit buttons\n setSyncButtonEnabled(true);\n }\n}", "_triggerChange (e) {\n var args = [this.getValue(), this.getFormElement(), this.getUIElement()];\n if (e) {\n args.push(e);\n }\n if (this.options.onChange) {\n this.options.onChange.apply(this, args);\n }\n }", "_onChange(value) {\n this.setState({ changesMade: value });\n }", "_codemirrorValueChanged() {\n // Don't trigger change event if we're ignoring changes\n if (this._ignoreNextChange || !this.props.onChange) {\n this._ignoreNextChange = false;\n return;\n }\n\n const value = this.codeMirror.getDoc().getValue();\n\n // Disable linting if the document reaches a maximum size or is empty\n const shouldLint =\n value.length > MAX_SIZE_FOR_LINTING || value.length === 0 ? false : !this.props.noLint;\n const existingLint = this.codeMirror.options.lint || false;\n if (shouldLint !== existingLint) {\n const { lintOptions } = this.props;\n const lint = shouldLint ? lintOptions || true : false;\n this.codeMirror.setOption('lint', lint);\n }\n\n this.props.onChange(value);\n }", "function onChange(change) {\r\n\t\t//split up the path to get the file name\r\n\t\tvar splitUpPath = change.path.split('/');\r\n\r\n\t\t//log the file detected\r\n\t\tconsole.log('\"' + splitUpPath[splitUpPath.length - 1] + '\" was ' + change.type);\r\n\t}", "_onChange() {\n let value = this.get('value');\n return this.attrs.onChange(value, this);\n }", "function optionChanged(changed){\n charts(changed);\n metadata(changed);\n}", "addChangeListener(callback) {\n Bullet.on(LOCAL_EVENT_NAME, callback)\n }", "handleChangeEvent() {\n this.cacheHasChanged = true;\n }", "_onChange () {\n this.forceUpdate()\n }", "changeFn(event) {\n var fileList = event.__files_ || (event.target && event.target.files);\n if (!fileList)\n return;\n this.stopEvent(event);\n this.handleFiles(fileList);\n }", "get onChange() {\n\t\treturn this._onChange;\n\t}", "get onChange() {\n\t\treturn this._onChange;\n\t}", "get onChange() {\n\t\treturn this._onChange;\n\t}", "function sampleOnChange() {\n SkillSampleAPI.onStatusChange(criteriaId);\n }", "reportValueChange() {\n if (this.options) {\n const value = this.getSelectedOptionValues();\n this.onChange(value);\n this._value = value;\n }\n }" ]
[ "0.76215637", "0.7620866", "0.7604169", "0.75682276", "0.7563224", "0.75595355", "0.7537074", "0.7521918", "0.7520366", "0.7513234", "0.7498563", "0.7489214", "0.7487912", "0.7479759", "0.7470643", "0.7470105", "0.74661165", "0.7458496", "0.7453694", "0.7451992", "0.736924", "0.7303583", "0.7273391", "0.7240529", "0.71548766", "0.71520585", "0.7128725", "0.7093861", "0.7083037", "0.70093733", "0.70093733", "0.69801164", "0.697409", "0.69462836", "0.69462836", "0.69462264", "0.69462264", "0.6938091", "0.69152594", "0.69095105", "0.69081986", "0.6828735", "0.6827403", "0.6826205", "0.6825447", "0.6825447", "0.6818633", "0.6811441", "0.6811441", "0.67853796", "0.6766698", "0.67388356", "0.6706443", "0.6706443", "0.6690389", "0.6690049", "0.66818786", "0.66752523", "0.6664632", "0.6662042", "0.6657042", "0.66217285", "0.6617618", "0.66118735", "0.66093236", "0.66083074", "0.6600708", "0.65971905", "0.6594819", "0.6594819", "0.65864474", "0.6579841", "0.6576589", "0.65624547", "0.6545084", "0.6543494", "0.6543494", "0.6543034", "0.6512732", "0.65007645", "0.6487829", "0.64831334", "0.6477887", "0.6468582", "0.6467927", "0.64665604", "0.6463477", "0.6457328", "0.64566207", "0.64305115", "0.64199996", "0.6416667", "0.6404831", "0.6402141", "0.6397671", "0.63960356", "0.63960356", "0.63960356", "0.6394816", "0.6394437" ]
0.7496141
11
Reemits a render event.
function onRender() { var args; var i; __debug_475( 'Received a render event. Re-emitting...' ); args = new Array( arguments.length+1 ); args[ 0 ] = 'render'; for ( i = 0; i < arguments.length; i++ ) { args[ i+1 ] = arguments[ i ]; } self.emit.apply( self, args ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_587( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_395( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_577( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_412( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_457( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_488( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_332( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_330( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_429( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_452( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_520( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function RenderEvent() {}", "function resumeRender() {\n shouldRender = true;\n render();\n }", "function handleRender() {\n view._isRendered = true;\n triggerDOMRefresh();\n }", "function handleRender() {\n view._isRendered = true;\n triggerDOMRefresh();\n }", "function handleRender() {\n\t view._isRendered = true;\n\t triggerDOMRefresh();\n\t }", "function handleRender(view) {\n view._isRendered = true;\n triggerDOMRefresh(view);\n }", "function handleRender(view){\r\n view._isRendered = true;\r\n triggerDOMRefresh(view);\r\n }", "render(...args) {\n if (this._render) {\n this.__notify(EV.BEFORE_RENDER);\n this._render(...args);\n this.__notify(EV.RENDERED);\n }\n\n this.rendered = true;\n }", "function renderCall() {\n // Repaint?\n if (needs_repaint === true) {\n needs_repaint = false;\n\n ctx.clearRect(0, 0, canvas_el.width, canvas_el.height);\n\n renderTimeXAxis();\n renderElementsMargin();\n\n renderRows();\n\n renderCurrentTimePoint();\n\n }\n }", "onRender()/*: void*/ {\n this.render();\n }", "unrender() {\n this.rendered = false;\n }", "postRender() {\n if (!this.multiFire || !this._hasFired) {\n return;\n }\n\n this._hasFired = false;\n this._nextFire = this._tempNextFire;\n }", "postRendering() {\n this.ctx.restore();\n }", "handleRendered_() {\n\t\tthis.isRendered_ = true;\n\t}", "function invalidate () {\n\t if (!options.batching) {\n\t if (!isRendering) render()\n\t } else {\n\t if (!frameId) frameId = raf(render)\n\t }\n\t }", "function invalidate () {\n if (!options.batching) {\n if (!isRendering) render()\n } else {\n if (!frameId) frameId = raf(render)\n }\n }", "render() {\n const self = this;\n const data = self.get('data');\n if (!data) {\n throw new Error('data must be defined first');\n }\n self.clear();\n self.emit('beforerender');\n self.refreshLayout(this.get('fitView'));\n self.emit('afterrender');\n }", "function render() {\n\t if(stopped || scene.contextLost) {\n\t return\n\t }\n\t requestAnimationFrame(render)\n\t redraw()\n\t }", "function render() {\n\t if(stopped || scene.contextLost) {\n\t return\n\t }\n\t requestAnimationFrame(render)\n\t redraw()\n\t }", "function render() {\n\n isRendered = true;\n\n renderSource();\n\n }", "function renderCallback() {\n\n while (TO_RENDER.length) {\n TO_RENDER.shift().notify();\n }\n\n TO_RENDER.added = {};\n\n while (ENV_QUEUE.length) {\n var env = ENV_QUEUE.shift();\n for (var key in env.revalidateQueue) {\n env.revalidateQueue[key].revalidate();\n }\n reslot(env);\n }\n ENV_QUEUE.added = {};\n}", "_requestRender() { this._invalidateProperties(); }", "function render() {\n\tclearCanvas();\n\tRenderer.draw();\n\t\n\t\t\n}", "function completeRender() {\n var afterRender = options.afterRender;\n\n if (afterRender) {\n afterRender.call(root, root);\n }\n\n // Always emit an afterRender event.\n root.trigger(\"afterRender\", root);\n }", "function completeRender() {\n var afterRender = options.afterRender;\n\n if (afterRender) {\n afterRender.call(root, root);\n }\n\n // Always emit an afterRender event.\n root.trigger(\"afterRender\", root);\n }", "function render() {\n\n\t\t\tisRendered = true;\n\n\t\t\trenderSource();\n\n\t\t}", "function pauseRender() {\n shouldRender = false;\n }", "willClearRender() {\n\t\tconsole.log('willClearRender ejecutado!');\n\t}", "function render () {\n // If this is called synchronously we need to\n // cancel any pending future updates\n clearFrame()\n\n // If the rendering from the previous frame is still going,\n // we'll just wait until the next frame. Ideally renders should\n // not take over 16ms to stay within a single frame, but this should\n // catch it if it does.\n if (isRendering) {\n frameId = raf(render)\n return\n } else {\n isRendering = true\n }\n\n // 1. If there isn't a native element rendered for the current mounted element\n // then we need to create it from scratch.\n // 2. If a new element has been mounted, we should diff them.\n // 3. We should update check all child components for changes.\n if (!currentNativeElement) {\n currentElement = app.element\n currentNativeElement = toNative(rootId, '0', currentElement)\n container.appendChild(currentNativeElement)\n } else if (currentElement !== app.element) {\n currentNativeElement = patch(rootId, currentElement, app.element, currentNativeElement)\n currentElement = app.element\n updateChildren(rootId)\n } else {\n updateChildren(rootId)\n }\n\n // Allow rendering again.\n isRendering = false\n }", "postrender() {\n this.gl.flush();\n }", "function render() {\n if(stopped || scene.contextLost) {\n return\n }\n requestAnimationFrame(render)\n redraw()\n }", "function clearRenderTimer() {\n\n\t\t\tclearTimeout(renderTimer);\n\n\t\t\trenderTimer = null;\n\n\t\t}", "function clearRenderTimer() {\n\n clearTimeout(renderTimer);\n\n renderTimer = null;\n\n }", "function render() {\n if (!willRender) {\n willRender = true;\n process.nextTick(function() {\n screen.render();\n willRender = false;\n });\n }\n}", "function r(e) {\n this.reinitializeTransaction(), // Only server-side rendering really needs this option (see\n // `ReactServerRendering`), but server-side uses\n // `ReactServerRenderingTransaction` instead. This option is here so that it's\n // accessible and defaults to false when `ReactDOMComponent` and\n // `ReactDOMTextComponent` checks it in `mountComponent`.`\n this.renderToStaticMarkup = !1, this.reactMountReady = i.getPooled(null), this.useCreateElement = e;\n }", "function rerender() {\n\tscreen.innerText = buffer;\n}", "function reRender() {\n input.innerText = buffer;\n}", "afterRender() { }", "afterRender() { }", "reRender() {\n this.removeAllChildrenComponents()\n\n this.build()\n }", "function render() {\n renderLives();\n renderTimeRemaining();\n }", "function render() {\n\t\t\n\t}", "function _triggerAfterRender() {\n _trigger(docma.Event.Render, [docma.currentRoute]);\n if (_initialLoad) {\n _trigger(docma.Event.Ready);\n _initialLoad = false;\n }\n }", "function render() {\n\t\t\t}", "function render () {\n\t // If this is called synchronously we need to\n\t // cancel any pending future updates\n\t clearFrame()\n\n\t // If the rendering from the previous frame is still going,\n\t // we'll just wait until the next frame. Ideally renders should\n\t // not take over 16ms to stay within a single frame, but this should\n\t // catch it if it does.\n\t if (isRendering) {\n\t frameId = raf(render)\n\t return\n\t } else {\n\t isRendering = true\n\t }\n\n\t // 1. If there isn't a native element rendered for the current mounted element\n\t // then we need to create it from scratch.\n\t // 2. If a new element has been mounted, we should diff them.\n\t // 3. We should update check all child components for changes.\n\t if (!currentNativeElement) {\n\t currentElement = app.element\n\t currentNativeElement = toNative(rootId, '0', currentElement)\n\t if (container.children.length > 0) {\n\t console.info('deku: The container element is not empty. These elements will be removed. Read more: http://cl.ly/b0Sr')\n\t }\n\t if (container === document.body) {\n\t console.warn('deku: Using document.body is allowed but it can cause some issues. Read more: http://cl.ly/b0SC')\n\t }\n\t removeAllChildren(container)\n\t container.appendChild(currentNativeElement)\n\t } else if (currentElement !== app.element) {\n\t currentNativeElement = patch(rootId, currentElement, app.element, currentNativeElement)\n\t currentElement = app.element\n\t updateChildren(rootId)\n\t } else {\n\t updateChildren(rootId)\n\t }\n\n\t // Call mount events on all new entities\n\t flushMountQueue()\n\n\t // Allow rendering again.\n\t isRendering = false\n\n\t }", "function render() {\n\t}", "render() {\n\n // Calculate delta\n if (!this.lastFrameTime) this.lastFrameTime = Date.now()\n this.delta = Math.min(1, (Date.now() - this.lastFrameTime) / 1000)\n this.lastFrameTime = Date.now()\n\n // Check if should be rendering\n if (!this.isRendering)\n return\n\n // Request another frame\n requestAnimationFrame(this.render)\n\n }", "static finishedRenderingComponent() {\n\t\trenderingComponents_.pop();\n\t}", "function render( timestamp )\n\t{\n\t\t\n\t\trequestAnimationFrame( render );\n\t\t\n\t\tcanvas_handler.draw_all( );\n\t\t\n\t}", "_endRender() {\n this._allowRegisterSegment = false;\n }", "function _render() {\n _render = (0, _asyncToGenerator2.default)(\n /*#__PURE__*/\n _regenerator.default.mark(function _callee2(props) {\n return _regenerator.default.wrap(\n function _callee2$(_context2) {\n while (1) {\n switch ((_context2.prev = _context2.next)) {\n case 0:\n if (!props.err) {\n _context2.next = 4;\n break;\n }\n\n _context2.next = 3;\n return renderError(props);\n\n case 3:\n return _context2.abrupt(\"return\");\n\n case 4:\n _context2.prev = 4;\n _context2.next = 7;\n return doRender(props);\n\n case 7:\n _context2.next = 13;\n break;\n\n case 9:\n _context2.prev = 9;\n _context2.t0 = _context2[\"catch\"](4);\n _context2.next = 13;\n return renderError(\n (0, _objectSpread2.default)({}, props, {\n err: _context2.t0,\n })\n );\n\n case 13:\n case \"end\":\n return _context2.stop();\n }\n }\n },\n _callee2,\n this,\n [[4, 9]]\n );\n })\n );\n return _render.apply(this, arguments);\n }", "redraw() {\n this.createBackground();\n this.render();\n }", "cancelRendering() {\n if (this.renderTask) {\n this.renderTask.cancel();\n this.renderTask = null;\n }\n this.resume = null;\n }", "_render(model) {\n\t\tthis._coordinator.newEvent({\n\t\t\tsource: this.constructor.name,\n\t\t\ttype: 'render',\n\t\t\tdata: {\n\t\t\t\toriginX: this._originX,\n\t\t\t\toriginY: this._originY,\n\t\t\t\twidth: this._width,\n\t\t\t\theight: this._height\n\t\t\t}\n\t\t});\n\t}", "rerender() {\n\t\tthis.setState(this.state)\n\t}", "reRender(skipPreRenderRefresh = false) {\n this.refreshFromRerender = true;\n super.reRender(skipPreRenderRefresh);\n this.initDomEvents();\n }", "renderEventInput() {\n eventContainer.innerHTML = \"\";\n eventContainer.innerHTML = eventHtml.makeNewEventHtml();\n }", "function renderCal() {\n $('#calendar').fullCalendar('rerenderEvents');\n }", "function render() {\r\n graphics.clear();\r\n myTexture.draw();\r\n }", "function Render() {\n ClearScreen();\n RenderEnergeticDroplets();\n ResetRenderingConditions();\n}", "function render() {\n window.requestAnimationFrame(render);\n manipulationCanvas.getContext('2d').clearRect(0, 0, manipulationCanvas.width, manipulationCanvas.height); //clears canvas\n triRenderer.render();\n }", "updateRendererState()\r\n {\r\n // update the renderer state object\r\n this.updateRendererStateObject();\r\n \r\n // create a new update id for the render\r\n this.updateRandomUpdateId();\r\n \r\n this.emit(\"rendererStateChanged\", this, this.rendererState);\r\n }", "onRender () {\n\n }", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function render() {\n\n\t\t\t}", "onRender() {\n if ( !this.mRunning )\n return;\n\n if ( SPE_USES_PREVIEW_IMAGE ) {\n document.querySelector( '.spline-preview-image-container' ).style.display = 'none';\n\n SPE_USES_PREVIEW_IMAGE = false;\n }\n\n if ( this.mPlayHandler && !this.mPlayHandler.isEnable ) {\n this.mPlayHandler.activate();\n }\n\n if ( this.mOrbitControls ) {\n this.mOrbitControls.update();\n }\n if ( this.mScene && this.mMainCamera ) {\n this.mRenderer.autoClear = true;\n this.mRenderer.render( this.mScene, this.mMainCamera );\n }\n }", "handleRenderCompletion() {\n this.renderNewChildren = false;\n this.preventUpdate = false;\n this.lastChildIndex = this.childCount;\n if (this.isRenderingNew) {\n this.isRenderingNew = false;\n this.update(null, false, true); // Prevent from triggering an item request to avoid infinite loop of loading.\n } else if (this.contentNode && InfiniteUtils.shouldTriggerItemRequest(InfiniteUtils.getContentData(this.contentNode))) {\n this.triggerItemRequest();\n }\n }", "function viewRenderComplete() {\n $container.trigger(topologyConstants.events.viewRenderComplete, {}); // Private Event\n }", "_notifyRenderer() {\n this.renderer.notify();\n }", "relayout() {\n dispatchSimpleEvent(this, 'relayout', true);\n }", "onBeforeRendering() {}", "render(renderedTemplate) {\n super.render()\n\n // render the template\n render(renderedTemplate, this, {\n eventContext: this\n })\n }", "function render() {\n view.update();\n requestAnimationFrame(render);\n}", "function render() {\n if (gameRunning) {\n world.camera.moveDimensions()\n context.clearRect(0, 0, canvas.width, canvas.height);\n world.render();\n setTimeout(render, renderTimeDelta)\n }\n}", "function _render(scene) {\n renderer.update(scene);\n }", "function render() {\r\n\r\n}", "function render() {\r\n\r\n}", "_invalidate() {\n\t\tif (this._invalidated) {\n\t\t\t// console.log(\"already invalidated\", this, ...arguments);\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.getDomRef() && !this._suppressInvalidation) {\n\t\t\tthis._invalidated = true;\n\t\t\t// console.log(\"INVAL\", this, ...arguments);\n\t\t\tRenderScheduler.renderDeferred(this);\n\t\t}\n\t}", "function renderOnce(){\n drawBoard(size);\n }", "function render(){\n spinCounter = 0;\n gamePlay();\n }", "function UpdateRender() {\n // Set background\n BackContextHandle.fillRect(0, 0, CanvasWidth, CanvasHeight);\n\n // Render\n BackContextHandle.save();\n Render();\n BackContextHandle.restore();\n\n // Swap the backbuffer with the frontbuffer\n var ImageData = BackContextHandle.getImageData(0, 0, CanvasWidth, CanvasHeight);\n ContextHandle.putImageData(ImageData, 0, 0);\n}", "_update() {\n render(this._template(), this.shadowRoot, {eventContext: this});\n }", "function lateRender() {\n\t\tsetTimeout( function() { // IE7 needs this so dimensions are calculated correctly\n\t\t\t\t\tif (!currentView.start && bodyVisible()) { // !currentView.start makes sure this never happens more than once\n\t\t\t\t\t\trenderView();\n\t\t\t\t\t}\n\t\t\t\t}, 0);\n\t}", "function render() {\n\t\trate = (droppedFrames > 0) ?\n\t\t\t((rate+(FPS/(droppedFrames*2)))/2):\n\t\t\t((rate + FPS)/2);\n\t\t\t\n\t\tcycleCounter = (cycleCounter + 1) % FPS;\n\t\tframeCounter = (frameCounter + 1) % 1e15;\n\t\t// just render every N frames to avoid a jarring display\n\t\tdroppedFrames = -1;\n\t\trdCallback();\n\t}", "onRender(scene, time) {}" ]
[ "0.7726372", "0.7672331", "0.7665788", "0.76572526", "0.7655998", "0.76539224", "0.7652522", "0.7651107", "0.76421237", "0.76247567", "0.7623794", "0.6994004", "0.67871696", "0.67314553", "0.67314553", "0.6673593", "0.65053445", "0.65043765", "0.6444167", "0.63916767", "0.6386083", "0.6215451", "0.60745835", "0.6063212", "0.6025815", "0.5983671", "0.59834343", "0.5943105", "0.58774674", "0.58774674", "0.58711886", "0.5855174", "0.5848575", "0.5833751", "0.5825184", "0.5825184", "0.5803323", "0.57938194", "0.57847404", "0.57549715", "0.5753157", "0.5745031", "0.5743764", "0.57243097", "0.5702407", "0.5698554", "0.56926113", "0.565947", "0.5650503", "0.5650503", "0.5606217", "0.55847776", "0.5571784", "0.5564836", "0.55646217", "0.55570143", "0.5551144", "0.5541771", "0.5538538", "0.5515794", "0.5510801", "0.55076826", "0.5506269", "0.54958576", "0.5494323", "0.54930204", "0.5490676", "0.5485293", "0.5483956", "0.5478577", "0.547311", "0.5464079", "0.545132", "0.54415125", "0.5434181", "0.5434181", "0.5434181", "0.5434181", "0.5434181", "0.5425733", "0.5420645", "0.5412628", "0.54028964", "0.53895235", "0.5386448", "0.538495", "0.5381009", "0.53802407", "0.5373726", "0.53733", "0.5364876", "0.5364876", "0.5362733", "0.53625435", "0.53615856", "0.5358409", "0.5353968", "0.53332514", "0.5331306", "0.53254426" ]
0.76429856
8
Callback invoked upon receiving a change event.
function onChange() { __debug_395( 'Received a change event.' ); if ( self._autoRender ) { // eslint-disable-line no-underscore-dangle self.render(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "change() { }", "function onChange() {\n\t\t__debug_452( 'Received a change event.' );\n\t\tself.render();\n\t}", "function onChange() {\n\t\t__debug_330( 'Received a change event.' );\n\t\tself.render();\n\t}", "handleEventChange() {\n }", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_730( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "onChange(callback) {\n\t\tthis.changeCallback = callback;\n\t}", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_259( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_488( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_587( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_596( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_412( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_475( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_520( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "onChanged(e){}", "function onChange() {\n\t\t__debug_457( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_332( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_429( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_577( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "onchange() {}", "function onChange() {\n console.log(\"something changed...\");\n \n }", "addChangeListener(callback) {\n this.on('change', callback);\n }", "function changeEvent() {\n var value_sub = properties.value;\n trigger_param_list.push(value_sub);\n // 'seek' event is like a forced-change event\n $pebble_slider_object.triggerHandler('seek', trigger_param_list);\n if (prev_change_value !== value_sub) {\n $pebble_slider_object.triggerHandler('change', trigger_param_list);\n prev_change_value = value_sub;\n }\n trigger_param_list.length = 0;\n }", "onChange(callback) {\n this.events.change.push({ callback });\n }", "function onChange() {\n if (input.get.call(element, valueField) !== observer.oldValue && !element.readOnly) {\n observer.set(input.get.call(element, valueField));\n }\n }", "function changeFunction() {\n\tconsole.log(\"onchange\");\n}", "addChangeListener (callback) {\n this.on(Constants.CHANGE_EVENT, callback);\n }", "onDidChange(callback) {\n return this.emitter.on('did-change', callback)\n }", "change(/*event*/) {\n this._super(...arguments);\n this._parse();\n }", "addChangeListener (callback) {\n\t\tthis.on(Constants.CHANGE_EVENT, callback);\n\t}", "function handleChange(editor, data, value) {\n onChange(value);\n }", "function handleChange(editor, data, value) {\n onChange(value);\n }", "onDataChange() {}", "changedCallback () {\n\t\tif (this.oldValue === this.value) return;\n\t\tthis._setTranslation();\n\t}", "change(fn, options) {\n\t\treturn this.on({ change: fn }, options);\n\t}", "change(fn, options) {\n\t\treturn this.on({ change: fn }, options);\n\t}", "onChange () {}", "onChange () {}", "onChange(changeListener) {\n changeListener.path = this.path;\n privateDataMap.get(this).addListener(changeListener, this.path);\n }", "handleChange(event) {\n this.dispatchEvent(new CustomEvent('change', {detail: event.target.value}));\n }", "function changed(change) {\n if (change.changeType === \"property\" && change.property === property) {\n fn(change);\n }\n }", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "_setOnChanges(){\n\t\tthis.inputs.forEach(i => i.addEventListener('change', this._onChange.bind(this)));\t\n\t}", "handleChange(event) {\n\n }", "function onChangeHandler(e) {\n\n }", "function onChangeHandler(e) {\n\n }", "emitChange() {\n\t\tthis.emit(CHANGE_EVENT)\n\t}", "addChangeListener(callback) {\n\t\tthis.on(CHANGE_EVENT, callback)\n\t}", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "internalOnChange(event) {\n const me = this,\n value = me.value,\n oldValue = me._lastValue;\n\n // Don't trigger change if we enter invalid value or if value has not changed (for IE when pressing ENTER)\n if (me.isValid && value !== oldValue) {\n me._lastValue = value;\n\n // trigger change event, signaling that origin is from user\n me.trigger('change', { value, oldValue, event, userAction: true });\n\n // per default Field triggers action event on change, but might be reconfigured in subclasses (such as Combo)\n if (me.defaultAction === 'change') {\n me.trigger('action', { value, oldValue, event });\n }\n }\n\n // since Widget has Events mixed in configured with 'callOnFunctions' this will also call onClick and onAction\n }", "handleChange () {\n this.props.onStatusChange(\n this.props.item.id,\n this.refs.checkbox.checked ? 'RESERVED' : 'NEW'\n );\n }", "_valueChanged() {\n // Send a global refresh to the bapge body.\n var event = new Event(\"change\");\n this._root.dispatchEvent(event);\n }", "emitChange() {\n this.emit(CHANGE_EVENT);\n }", "emitChange() {\n this.emit(CHANGE_EVENT);\n }", "_triggerChangeEvent() {\n\t\tif ( this.$control.rendered && ! this.changeEventDisabled ) {\n\t\t\tthis._updateSettings();\n\t\t\tthis.events.emit( 'change', this.settings );\n\t\t}\n\t}", "handleChange(event){\n changeHandler(event,this);\n }", "setOnValueChangeEvent(func){\r\n this._onValueChange = func;\r\n }", "function referenceOnChange() {\n MicroReferenceAPI.onStatusChange(criteriaId);\n }", "function handleChange(event, newValue) {\n setValue(newValue);\n }", "onChange(callback) {\n this.listeners.push(callback);\n }", "onGenericChange() {\n this.contentChanged.emit(void 0);\n }", "afterValidChange() { }", "static on_changed(chr, _retval) {\n let uuid = chr.getUuid()\n console.log(colours.fg.blue + \"[BLE] [CHANGE ]\" + colours.fg.yellow + \" UUID: \" + uuid.toString() + colours.fg.magenta + \" | data: 0x\" + bytes2hex(chr.getValue()) + colours.reset);\n }", "changedInput() {\n\n\t\tlet {isValid, error} = this.state.wasInvalid ? this.validate() : this.state;\n\t\tlet onChange = this.props.onChange;\n\t\tif (onChange) {\n\t\t\tonChange(this.getValue(), isValid, error);\n\t\t}\n\t\tif (this.context.validationSchema) {\n\t\t\tlet value = this.getValue();\n\t\t\tif (this.state.isMultiSelect && value === '') {\n\t\t\t\tvalue = [];\n\t\t\t}\n\t\t\tif (this.shouldTypeBeNumberBySchemeDefinition(this.props.pointer)) {\n\t\t\t\tvalue = Number(value);\n\t\t\t}\n\t\t\tthis.context.validationParent.onValueChanged(this.props.pointer, value, isValid, error);\n\t\t}\n\t}", "_evtChange(event) { }", "on_change(event)\n\t{\n\t\t// Extract `value` from the argument\n\t\t// of this `onChange` listener\n\t\t// (for convenience)\n\n\t\tlet value = event\n\n\t\tif (event.target !== undefined)\n\t\t{\n\t\t\tvalue = event.target.value\n\t\t}\n\n\t\t// Call the parent `onChange` handler\n\t\t// with the `value` as an argument\n\t\t// (for convenience)\n\n\t\tconst { onChange } = this.props\n\n\t\tonChange(value)\n\t}", "handleChange() {\n this.forceUpdate();\n }", "function triggerChange(t) { t.dispatchEvent(changeEvent) }", "function onChange() {\n\n // hide and show input elements for which this is necessary\n setVisibility();\n\n // update preview considering the changed input value\n updatePreview();\n\n // perform change actions\n self.onchange && self.onchange( self );\n\n }", "function onChange() {\n\n // hide and show input elements for which this is necessary\n setVisibility();\n\n // update preview considering the changed input value\n updatePreview();\n\n // perform change actions\n self.onchange && self.onchange( self );\n\n }", "function changed() {\n\t\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t\t}", "registerOnChange(fn) {\n this.propagateChanges = fn;\n }", "handleChange (event) {\n }", "onCurrentChanged(value) {\n /* no-op */\n }", "onChange() {\n triggerEvent(this.input, 'input');\n triggerEvent(this.input, 'change');\n }", "function changed() {\n\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t}", "function changed() {\n\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t}", "_onChange() {\n void this._debouncer.invoke();\n }", "emitChange () {\n this.emit(Constants.CHANGE_EVENT);\n }", "onDidChange (callback) {\n\t\tconst changeSubscription = this.file.onDidChange(callback);\n\t\tthis.subscriptions.add(changeSubscription);\n\t\treturn changeSubscription;\n\t}", "onChange(item) {}", "dispatchChange() {\n this.toggleAttribute(\"empty\", !this.value);\n this.dispatchEvent(new CustomEvent(\"change\", { bubbles: true }));\n }", "function handleChange(){\n\t\t\t// Error handles\n\t\t\tif(xhr.readyState === this.DONE && xhr.status !== 200){\n\t\t\t\tconsole.log('check yoself');\n\t\t\t}\n\t\t\t// success handles\n\t\t\tif(xhr.readyState === this.DONE && xhr.status === 200){\n\t\t\t\tcallback(xhr.response);\n\t\t\t}\n\n\t\t}", "registerChangeListener(cb) {\n this._slider.events.on('indexChanged', cb);\n }", "function onChanged() {\n let g = getGlobal();\n\n //When the add-in creates the table, it will generate 4 events that we must ignore.\n //We only want to respond to the change events from the user.\n if (g.tableEventCount > 0) {\n g.tableEventCount--;\n return; //count down to throw away events caused by the table creation code\n }\n\n //check if dirty flag was set (flag avoids extra unnecessary ribbon operations)\n if (!g.isTableDirty) {\n g.isTableDirty = true;\n\n //Enable the Refresh and Submit buttons\n setSyncButtonEnabled(true);\n }\n}", "_triggerChange (e) {\n var args = [this.getValue(), this.getFormElement(), this.getUIElement()];\n if (e) {\n args.push(e);\n }\n if (this.options.onChange) {\n this.options.onChange.apply(this, args);\n }\n }", "_onChange(value) {\n this.setState({ changesMade: value });\n }", "_codemirrorValueChanged() {\n // Don't trigger change event if we're ignoring changes\n if (this._ignoreNextChange || !this.props.onChange) {\n this._ignoreNextChange = false;\n return;\n }\n\n const value = this.codeMirror.getDoc().getValue();\n\n // Disable linting if the document reaches a maximum size or is empty\n const shouldLint =\n value.length > MAX_SIZE_FOR_LINTING || value.length === 0 ? false : !this.props.noLint;\n const existingLint = this.codeMirror.options.lint || false;\n if (shouldLint !== existingLint) {\n const { lintOptions } = this.props;\n const lint = shouldLint ? lintOptions || true : false;\n this.codeMirror.setOption('lint', lint);\n }\n\n this.props.onChange(value);\n }", "function onChange(change) {\r\n\t\t//split up the path to get the file name\r\n\t\tvar splitUpPath = change.path.split('/');\r\n\r\n\t\t//log the file detected\r\n\t\tconsole.log('\"' + splitUpPath[splitUpPath.length - 1] + '\" was ' + change.type);\r\n\t}", "_onChange() {\n let value = this.get('value');\n return this.attrs.onChange(value, this);\n }", "function optionChanged(changed){\n charts(changed);\n metadata(changed);\n}", "addChangeListener(callback) {\n Bullet.on(LOCAL_EVENT_NAME, callback)\n }", "handleChangeEvent() {\n this.cacheHasChanged = true;\n }", "_onChange () {\n this.forceUpdate()\n }", "changeFn(event) {\n var fileList = event.__files_ || (event.target && event.target.files);\n if (!fileList)\n return;\n this.stopEvent(event);\n this.handleFiles(fileList);\n }", "get onChange() {\n\t\treturn this._onChange;\n\t}", "get onChange() {\n\t\treturn this._onChange;\n\t}", "get onChange() {\n\t\treturn this._onChange;\n\t}", "function sampleOnChange() {\n SkillSampleAPI.onStatusChange(criteriaId);\n }", "reportValueChange() {\n if (this.options) {\n const value = this.getSelectedOptionValues();\n this.onChange(value);\n this._value = value;\n }\n }" ]
[ "0.76206696", "0.7620642", "0.7603297", "0.7567978", "0.7562529", "0.7559636", "0.75364155", "0.7521261", "0.7519743", "0.7512532", "0.7497861", "0.74954176", "0.74885535", "0.7486875", "0.74790376", "0.7469961", "0.7469411", "0.74654305", "0.74590075", "0.74529", "0.7369066", "0.730385", "0.72735673", "0.72414035", "0.71549815", "0.7152514", "0.7128517", "0.7093095", "0.7083617", "0.7009139", "0.7009139", "0.69793963", "0.6974256", "0.6947616", "0.6947616", "0.69458693", "0.69458693", "0.6937772", "0.6914656", "0.690971", "0.6908083", "0.68284774", "0.682663", "0.68252903", "0.68252903", "0.6824956", "0.6818822", "0.6811583", "0.6811583", "0.6786172", "0.6765572", "0.67383015", "0.6705071", "0.6705071", "0.6690313", "0.668894", "0.6682675", "0.66756", "0.6664683", "0.6661744", "0.66555774", "0.6622243", "0.66172475", "0.66127586", "0.66093457", "0.6608061", "0.6598658", "0.65959495", "0.659532", "0.659532", "0.658595", "0.65802854", "0.657574", "0.6562282", "0.654525", "0.6543162", "0.6543162", "0.6542606", "0.6511655", "0.6500862", "0.6486968", "0.64826125", "0.6478265", "0.6468562", "0.6468112", "0.6466427", "0.64623266", "0.6457302", "0.64557207", "0.6430325", "0.64199036", "0.6416071", "0.64035237", "0.63999367", "0.6397887", "0.6395908", "0.6395908", "0.6395908", "0.63955903", "0.6395481" ]
0.74512655
20
Reemits a render event.
function onRender() { var args; var i; __debug_395( 'Received a render event. Re-emitting...' ); args = new Array( arguments.length+1 ); args[ 0 ] = 'render'; for ( i = 0; i < arguments.length; i++ ) { args[ i+1 ] = arguments[ i ]; } self.emit.apply( self, args ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_587( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_577( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_412( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_457( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_488( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_332( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_330( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_475( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_429( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_452( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_520( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function RenderEvent() {}", "function resumeRender() {\n shouldRender = true;\n render();\n }", "function handleRender() {\n view._isRendered = true;\n triggerDOMRefresh();\n }", "function handleRender() {\n view._isRendered = true;\n triggerDOMRefresh();\n }", "function handleRender() {\n\t view._isRendered = true;\n\t triggerDOMRefresh();\n\t }", "function handleRender(view) {\n view._isRendered = true;\n triggerDOMRefresh(view);\n }", "function handleRender(view){\r\n view._isRendered = true;\r\n triggerDOMRefresh(view);\r\n }", "render(...args) {\n if (this._render) {\n this.__notify(EV.BEFORE_RENDER);\n this._render(...args);\n this.__notify(EV.RENDERED);\n }\n\n this.rendered = true;\n }", "function renderCall() {\n // Repaint?\n if (needs_repaint === true) {\n needs_repaint = false;\n\n ctx.clearRect(0, 0, canvas_el.width, canvas_el.height);\n\n renderTimeXAxis();\n renderElementsMargin();\n\n renderRows();\n\n renderCurrentTimePoint();\n\n }\n }", "onRender()/*: void*/ {\n this.render();\n }", "unrender() {\n this.rendered = false;\n }", "postRender() {\n if (!this.multiFire || !this._hasFired) {\n return;\n }\n\n this._hasFired = false;\n this._nextFire = this._tempNextFire;\n }", "postRendering() {\n this.ctx.restore();\n }", "handleRendered_() {\n\t\tthis.isRendered_ = true;\n\t}", "function invalidate () {\n\t if (!options.batching) {\n\t if (!isRendering) render()\n\t } else {\n\t if (!frameId) frameId = raf(render)\n\t }\n\t }", "function invalidate () {\n if (!options.batching) {\n if (!isRendering) render()\n } else {\n if (!frameId) frameId = raf(render)\n }\n }", "render() {\n const self = this;\n const data = self.get('data');\n if (!data) {\n throw new Error('data must be defined first');\n }\n self.clear();\n self.emit('beforerender');\n self.refreshLayout(this.get('fitView'));\n self.emit('afterrender');\n }", "function render() {\n\t if(stopped || scene.contextLost) {\n\t return\n\t }\n\t requestAnimationFrame(render)\n\t redraw()\n\t }", "function render() {\n\t if(stopped || scene.contextLost) {\n\t return\n\t }\n\t requestAnimationFrame(render)\n\t redraw()\n\t }", "function render() {\n\n isRendered = true;\n\n renderSource();\n\n }", "function renderCallback() {\n\n while (TO_RENDER.length) {\n TO_RENDER.shift().notify();\n }\n\n TO_RENDER.added = {};\n\n while (ENV_QUEUE.length) {\n var env = ENV_QUEUE.shift();\n for (var key in env.revalidateQueue) {\n env.revalidateQueue[key].revalidate();\n }\n reslot(env);\n }\n ENV_QUEUE.added = {};\n}", "_requestRender() { this._invalidateProperties(); }", "function render() {\n\tclearCanvas();\n\tRenderer.draw();\n\t\n\t\t\n}", "function completeRender() {\n var afterRender = options.afterRender;\n\n if (afterRender) {\n afterRender.call(root, root);\n }\n\n // Always emit an afterRender event.\n root.trigger(\"afterRender\", root);\n }", "function completeRender() {\n var afterRender = options.afterRender;\n\n if (afterRender) {\n afterRender.call(root, root);\n }\n\n // Always emit an afterRender event.\n root.trigger(\"afterRender\", root);\n }", "function render() {\n\n\t\t\tisRendered = true;\n\n\t\t\trenderSource();\n\n\t\t}", "function pauseRender() {\n shouldRender = false;\n }", "willClearRender() {\n\t\tconsole.log('willClearRender ejecutado!');\n\t}", "function render () {\n // If this is called synchronously we need to\n // cancel any pending future updates\n clearFrame()\n\n // If the rendering from the previous frame is still going,\n // we'll just wait until the next frame. Ideally renders should\n // not take over 16ms to stay within a single frame, but this should\n // catch it if it does.\n if (isRendering) {\n frameId = raf(render)\n return\n } else {\n isRendering = true\n }\n\n // 1. If there isn't a native element rendered for the current mounted element\n // then we need to create it from scratch.\n // 2. If a new element has been mounted, we should diff them.\n // 3. We should update check all child components for changes.\n if (!currentNativeElement) {\n currentElement = app.element\n currentNativeElement = toNative(rootId, '0', currentElement)\n container.appendChild(currentNativeElement)\n } else if (currentElement !== app.element) {\n currentNativeElement = patch(rootId, currentElement, app.element, currentNativeElement)\n currentElement = app.element\n updateChildren(rootId)\n } else {\n updateChildren(rootId)\n }\n\n // Allow rendering again.\n isRendering = false\n }", "postrender() {\n this.gl.flush();\n }", "function render() {\n if(stopped || scene.contextLost) {\n return\n }\n requestAnimationFrame(render)\n redraw()\n }", "function clearRenderTimer() {\n\n\t\t\tclearTimeout(renderTimer);\n\n\t\t\trenderTimer = null;\n\n\t\t}", "function clearRenderTimer() {\n\n clearTimeout(renderTimer);\n\n renderTimer = null;\n\n }", "function render() {\n if (!willRender) {\n willRender = true;\n process.nextTick(function() {\n screen.render();\n willRender = false;\n });\n }\n}", "function r(e) {\n this.reinitializeTransaction(), // Only server-side rendering really needs this option (see\n // `ReactServerRendering`), but server-side uses\n // `ReactServerRenderingTransaction` instead. This option is here so that it's\n // accessible and defaults to false when `ReactDOMComponent` and\n // `ReactDOMTextComponent` checks it in `mountComponent`.`\n this.renderToStaticMarkup = !1, this.reactMountReady = i.getPooled(null), this.useCreateElement = e;\n }", "function rerender() {\n\tscreen.innerText = buffer;\n}", "function reRender() {\n input.innerText = buffer;\n}", "afterRender() { }", "afterRender() { }", "reRender() {\n this.removeAllChildrenComponents()\n\n this.build()\n }", "function render() {\n renderLives();\n renderTimeRemaining();\n }", "function render() {\n\t\t\n\t}", "function _triggerAfterRender() {\n _trigger(docma.Event.Render, [docma.currentRoute]);\n if (_initialLoad) {\n _trigger(docma.Event.Ready);\n _initialLoad = false;\n }\n }", "function render() {\n\t\t\t}", "function render () {\n\t // If this is called synchronously we need to\n\t // cancel any pending future updates\n\t clearFrame()\n\n\t // If the rendering from the previous frame is still going,\n\t // we'll just wait until the next frame. Ideally renders should\n\t // not take over 16ms to stay within a single frame, but this should\n\t // catch it if it does.\n\t if (isRendering) {\n\t frameId = raf(render)\n\t return\n\t } else {\n\t isRendering = true\n\t }\n\n\t // 1. If there isn't a native element rendered for the current mounted element\n\t // then we need to create it from scratch.\n\t // 2. If a new element has been mounted, we should diff them.\n\t // 3. We should update check all child components for changes.\n\t if (!currentNativeElement) {\n\t currentElement = app.element\n\t currentNativeElement = toNative(rootId, '0', currentElement)\n\t if (container.children.length > 0) {\n\t console.info('deku: The container element is not empty. These elements will be removed. Read more: http://cl.ly/b0Sr')\n\t }\n\t if (container === document.body) {\n\t console.warn('deku: Using document.body is allowed but it can cause some issues. Read more: http://cl.ly/b0SC')\n\t }\n\t removeAllChildren(container)\n\t container.appendChild(currentNativeElement)\n\t } else if (currentElement !== app.element) {\n\t currentNativeElement = patch(rootId, currentElement, app.element, currentNativeElement)\n\t currentElement = app.element\n\t updateChildren(rootId)\n\t } else {\n\t updateChildren(rootId)\n\t }\n\n\t // Call mount events on all new entities\n\t flushMountQueue()\n\n\t // Allow rendering again.\n\t isRendering = false\n\n\t }", "function render() {\n\t}", "render() {\n\n // Calculate delta\n if (!this.lastFrameTime) this.lastFrameTime = Date.now()\n this.delta = Math.min(1, (Date.now() - this.lastFrameTime) / 1000)\n this.lastFrameTime = Date.now()\n\n // Check if should be rendering\n if (!this.isRendering)\n return\n\n // Request another frame\n requestAnimationFrame(this.render)\n\n }", "static finishedRenderingComponent() {\n\t\trenderingComponents_.pop();\n\t}", "function render( timestamp )\n\t{\n\t\t\n\t\trequestAnimationFrame( render );\n\t\t\n\t\tcanvas_handler.draw_all( );\n\t\t\n\t}", "_endRender() {\n this._allowRegisterSegment = false;\n }", "function _render() {\n _render = (0, _asyncToGenerator2.default)(\n /*#__PURE__*/\n _regenerator.default.mark(function _callee2(props) {\n return _regenerator.default.wrap(\n function _callee2$(_context2) {\n while (1) {\n switch ((_context2.prev = _context2.next)) {\n case 0:\n if (!props.err) {\n _context2.next = 4;\n break;\n }\n\n _context2.next = 3;\n return renderError(props);\n\n case 3:\n return _context2.abrupt(\"return\");\n\n case 4:\n _context2.prev = 4;\n _context2.next = 7;\n return doRender(props);\n\n case 7:\n _context2.next = 13;\n break;\n\n case 9:\n _context2.prev = 9;\n _context2.t0 = _context2[\"catch\"](4);\n _context2.next = 13;\n return renderError(\n (0, _objectSpread2.default)({}, props, {\n err: _context2.t0,\n })\n );\n\n case 13:\n case \"end\":\n return _context2.stop();\n }\n }\n },\n _callee2,\n this,\n [[4, 9]]\n );\n })\n );\n return _render.apply(this, arguments);\n }", "redraw() {\n this.createBackground();\n this.render();\n }", "cancelRendering() {\n if (this.renderTask) {\n this.renderTask.cancel();\n this.renderTask = null;\n }\n this.resume = null;\n }", "_render(model) {\n\t\tthis._coordinator.newEvent({\n\t\t\tsource: this.constructor.name,\n\t\t\ttype: 'render',\n\t\t\tdata: {\n\t\t\t\toriginX: this._originX,\n\t\t\t\toriginY: this._originY,\n\t\t\t\twidth: this._width,\n\t\t\t\theight: this._height\n\t\t\t}\n\t\t});\n\t}", "rerender() {\n\t\tthis.setState(this.state)\n\t}", "reRender(skipPreRenderRefresh = false) {\n this.refreshFromRerender = true;\n super.reRender(skipPreRenderRefresh);\n this.initDomEvents();\n }", "renderEventInput() {\n eventContainer.innerHTML = \"\";\n eventContainer.innerHTML = eventHtml.makeNewEventHtml();\n }", "function renderCal() {\n $('#calendar').fullCalendar('rerenderEvents');\n }", "function render() {\r\n graphics.clear();\r\n myTexture.draw();\r\n }", "function Render() {\n ClearScreen();\n RenderEnergeticDroplets();\n ResetRenderingConditions();\n}", "function render() {\n window.requestAnimationFrame(render);\n manipulationCanvas.getContext('2d').clearRect(0, 0, manipulationCanvas.width, manipulationCanvas.height); //clears canvas\n triRenderer.render();\n }", "updateRendererState()\r\n {\r\n // update the renderer state object\r\n this.updateRendererStateObject();\r\n \r\n // create a new update id for the render\r\n this.updateRandomUpdateId();\r\n \r\n this.emit(\"rendererStateChanged\", this, this.rendererState);\r\n }", "onRender () {\n\n }", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function render() {\n\n\t\t\t}", "onRender() {\n if ( !this.mRunning )\n return;\n\n if ( SPE_USES_PREVIEW_IMAGE ) {\n document.querySelector( '.spline-preview-image-container' ).style.display = 'none';\n\n SPE_USES_PREVIEW_IMAGE = false;\n }\n\n if ( this.mPlayHandler && !this.mPlayHandler.isEnable ) {\n this.mPlayHandler.activate();\n }\n\n if ( this.mOrbitControls ) {\n this.mOrbitControls.update();\n }\n if ( this.mScene && this.mMainCamera ) {\n this.mRenderer.autoClear = true;\n this.mRenderer.render( this.mScene, this.mMainCamera );\n }\n }", "handleRenderCompletion() {\n this.renderNewChildren = false;\n this.preventUpdate = false;\n this.lastChildIndex = this.childCount;\n if (this.isRenderingNew) {\n this.isRenderingNew = false;\n this.update(null, false, true); // Prevent from triggering an item request to avoid infinite loop of loading.\n } else if (this.contentNode && InfiniteUtils.shouldTriggerItemRequest(InfiniteUtils.getContentData(this.contentNode))) {\n this.triggerItemRequest();\n }\n }", "function viewRenderComplete() {\n $container.trigger(topologyConstants.events.viewRenderComplete, {}); // Private Event\n }", "_notifyRenderer() {\n this.renderer.notify();\n }", "relayout() {\n dispatchSimpleEvent(this, 'relayout', true);\n }", "onBeforeRendering() {}", "render(renderedTemplate) {\n super.render()\n\n // render the template\n render(renderedTemplate, this, {\n eventContext: this\n })\n }", "function render() {\n view.update();\n requestAnimationFrame(render);\n}", "function render() {\n if (gameRunning) {\n world.camera.moveDimensions()\n context.clearRect(0, 0, canvas.width, canvas.height);\n world.render();\n setTimeout(render, renderTimeDelta)\n }\n}", "function _render(scene) {\n renderer.update(scene);\n }", "function render() {\r\n\r\n}", "function render() {\r\n\r\n}", "_invalidate() {\n\t\tif (this._invalidated) {\n\t\t\t// console.log(\"already invalidated\", this, ...arguments);\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.getDomRef() && !this._suppressInvalidation) {\n\t\t\tthis._invalidated = true;\n\t\t\t// console.log(\"INVAL\", this, ...arguments);\n\t\t\tRenderScheduler.renderDeferred(this);\n\t\t}\n\t}", "function renderOnce(){\n drawBoard(size);\n }", "function render(){\n spinCounter = 0;\n gamePlay();\n }", "function UpdateRender() {\n // Set background\n BackContextHandle.fillRect(0, 0, CanvasWidth, CanvasHeight);\n\n // Render\n BackContextHandle.save();\n Render();\n BackContextHandle.restore();\n\n // Swap the backbuffer with the frontbuffer\n var ImageData = BackContextHandle.getImageData(0, 0, CanvasWidth, CanvasHeight);\n ContextHandle.putImageData(ImageData, 0, 0);\n}", "_update() {\n render(this._template(), this.shadowRoot, {eventContext: this});\n }", "function lateRender() {\n\t\tsetTimeout( function() { // IE7 needs this so dimensions are calculated correctly\n\t\t\t\t\tif (!currentView.start && bodyVisible()) { // !currentView.start makes sure this never happens more than once\n\t\t\t\t\t\trenderView();\n\t\t\t\t\t}\n\t\t\t\t}, 0);\n\t}", "function render() {\n\t\trate = (droppedFrames > 0) ?\n\t\t\t((rate+(FPS/(droppedFrames*2)))/2):\n\t\t\t((rate + FPS)/2);\n\t\t\t\n\t\tcycleCounter = (cycleCounter + 1) % FPS;\n\t\tframeCounter = (frameCounter + 1) % 1e15;\n\t\t// just render every N frames to avoid a jarring display\n\t\tdroppedFrames = -1;\n\t\trdCallback();\n\t}", "onRender(scene, time) {}" ]
[ "0.7726372", "0.7665788", "0.76572526", "0.7655998", "0.76539224", "0.7652522", "0.7651107", "0.76429856", "0.76421237", "0.76247567", "0.7623794", "0.6994004", "0.67871696", "0.67314553", "0.67314553", "0.6673593", "0.65053445", "0.65043765", "0.6444167", "0.63916767", "0.6386083", "0.6215451", "0.60745835", "0.6063212", "0.6025815", "0.5983671", "0.59834343", "0.5943105", "0.58774674", "0.58774674", "0.58711886", "0.5855174", "0.5848575", "0.5833751", "0.5825184", "0.5825184", "0.5803323", "0.57938194", "0.57847404", "0.57549715", "0.5753157", "0.5745031", "0.5743764", "0.57243097", "0.5702407", "0.5698554", "0.56926113", "0.565947", "0.5650503", "0.5650503", "0.5606217", "0.55847776", "0.5571784", "0.5564836", "0.55646217", "0.55570143", "0.5551144", "0.5541771", "0.5538538", "0.5515794", "0.5510801", "0.55076826", "0.5506269", "0.54958576", "0.5494323", "0.54930204", "0.5490676", "0.5485293", "0.5483956", "0.5478577", "0.547311", "0.5464079", "0.545132", "0.54415125", "0.5434181", "0.5434181", "0.5434181", "0.5434181", "0.5434181", "0.5425733", "0.5420645", "0.5412628", "0.54028964", "0.53895235", "0.5386448", "0.538495", "0.5381009", "0.53802407", "0.5373726", "0.53733", "0.5364876", "0.5364876", "0.5362733", "0.53625435", "0.53615856", "0.5358409", "0.5353968", "0.53332514", "0.5331306", "0.53254426" ]
0.7672331
1
Callback invoked upon receiving a change event.
function onChange() { __debug_452( 'Received a change event.' ); self.render(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "change() { }", "function onChange() {\n\t\t__debug_330( 'Received a change event.' );\n\t\tself.render();\n\t}", "handleEventChange() {\n }", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_730( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "onChange(callback) {\n\t\tthis.changeCallback = callback;\n\t}", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_259( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_488( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_587( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_596( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_412( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_475( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_520( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "onChanged(e){}", "function onChange() {\n\t\t__debug_457( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_332( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_429( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_577( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "onchange() {}", "function onChange() {\n console.log(\"something changed...\");\n \n }", "function onChange() {\n\t\t__debug_395( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "addChangeListener(callback) {\n this.on('change', callback);\n }", "function changeEvent() {\n var value_sub = properties.value;\n trigger_param_list.push(value_sub);\n // 'seek' event is like a forced-change event\n $pebble_slider_object.triggerHandler('seek', trigger_param_list);\n if (prev_change_value !== value_sub) {\n $pebble_slider_object.triggerHandler('change', trigger_param_list);\n prev_change_value = value_sub;\n }\n trigger_param_list.length = 0;\n }", "onChange(callback) {\n this.events.change.push({ callback });\n }", "function onChange() {\n if (input.get.call(element, valueField) !== observer.oldValue && !element.readOnly) {\n observer.set(input.get.call(element, valueField));\n }\n }", "function changeFunction() {\n\tconsole.log(\"onchange\");\n}", "addChangeListener (callback) {\n this.on(Constants.CHANGE_EVENT, callback);\n }", "onDidChange(callback) {\n return this.emitter.on('did-change', callback)\n }", "change(/*event*/) {\n this._super(...arguments);\n this._parse();\n }", "addChangeListener (callback) {\n\t\tthis.on(Constants.CHANGE_EVENT, callback);\n\t}", "function handleChange(editor, data, value) {\n onChange(value);\n }", "function handleChange(editor, data, value) {\n onChange(value);\n }", "onDataChange() {}", "changedCallback () {\n\t\tif (this.oldValue === this.value) return;\n\t\tthis._setTranslation();\n\t}", "change(fn, options) {\n\t\treturn this.on({ change: fn }, options);\n\t}", "change(fn, options) {\n\t\treturn this.on({ change: fn }, options);\n\t}", "onChange () {}", "onChange () {}", "onChange(changeListener) {\n changeListener.path = this.path;\n privateDataMap.get(this).addListener(changeListener, this.path);\n }", "handleChange(event) {\n this.dispatchEvent(new CustomEvent('change', {detail: event.target.value}));\n }", "function changed(change) {\n if (change.changeType === \"property\" && change.property === property) {\n fn(change);\n }\n }", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "_setOnChanges(){\n\t\tthis.inputs.forEach(i => i.addEventListener('change', this._onChange.bind(this)));\t\n\t}", "handleChange(event) {\n\n }", "emitChange() {\n\t\tthis.emit(CHANGE_EVENT)\n\t}", "function onChangeHandler(e) {\n\n }", "function onChangeHandler(e) {\n\n }", "addChangeListener(callback) {\n\t\tthis.on(CHANGE_EVENT, callback)\n\t}", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "internalOnChange(event) {\n const me = this,\n value = me.value,\n oldValue = me._lastValue;\n\n // Don't trigger change if we enter invalid value or if value has not changed (for IE when pressing ENTER)\n if (me.isValid && value !== oldValue) {\n me._lastValue = value;\n\n // trigger change event, signaling that origin is from user\n me.trigger('change', { value, oldValue, event, userAction: true });\n\n // per default Field triggers action event on change, but might be reconfigured in subclasses (such as Combo)\n if (me.defaultAction === 'change') {\n me.trigger('action', { value, oldValue, event });\n }\n }\n\n // since Widget has Events mixed in configured with 'callOnFunctions' this will also call onClick and onAction\n }", "handleChange () {\n this.props.onStatusChange(\n this.props.item.id,\n this.refs.checkbox.checked ? 'RESERVED' : 'NEW'\n );\n }", "_valueChanged() {\n // Send a global refresh to the bapge body.\n var event = new Event(\"change\");\n this._root.dispatchEvent(event);\n }", "emitChange() {\n this.emit(CHANGE_EVENT);\n }", "emitChange() {\n this.emit(CHANGE_EVENT);\n }", "_triggerChangeEvent() {\n\t\tif ( this.$control.rendered && ! this.changeEventDisabled ) {\n\t\t\tthis._updateSettings();\n\t\t\tthis.events.emit( 'change', this.settings );\n\t\t}\n\t}", "handleChange(event){\n changeHandler(event,this);\n }", "setOnValueChangeEvent(func){\r\n this._onValueChange = func;\r\n }", "function referenceOnChange() {\n MicroReferenceAPI.onStatusChange(criteriaId);\n }", "function handleChange(event, newValue) {\n setValue(newValue);\n }", "onChange(callback) {\n this.listeners.push(callback);\n }", "onGenericChange() {\n this.contentChanged.emit(void 0);\n }", "afterValidChange() { }", "static on_changed(chr, _retval) {\n let uuid = chr.getUuid()\n console.log(colours.fg.blue + \"[BLE] [CHANGE ]\" + colours.fg.yellow + \" UUID: \" + uuid.toString() + colours.fg.magenta + \" | data: 0x\" + bytes2hex(chr.getValue()) + colours.reset);\n }", "changedInput() {\n\n\t\tlet {isValid, error} = this.state.wasInvalid ? this.validate() : this.state;\n\t\tlet onChange = this.props.onChange;\n\t\tif (onChange) {\n\t\t\tonChange(this.getValue(), isValid, error);\n\t\t}\n\t\tif (this.context.validationSchema) {\n\t\t\tlet value = this.getValue();\n\t\t\tif (this.state.isMultiSelect && value === '') {\n\t\t\t\tvalue = [];\n\t\t\t}\n\t\t\tif (this.shouldTypeBeNumberBySchemeDefinition(this.props.pointer)) {\n\t\t\t\tvalue = Number(value);\n\t\t\t}\n\t\t\tthis.context.validationParent.onValueChanged(this.props.pointer, value, isValid, error);\n\t\t}\n\t}", "_evtChange(event) { }", "on_change(event)\n\t{\n\t\t// Extract `value` from the argument\n\t\t// of this `onChange` listener\n\t\t// (for convenience)\n\n\t\tlet value = event\n\n\t\tif (event.target !== undefined)\n\t\t{\n\t\t\tvalue = event.target.value\n\t\t}\n\n\t\t// Call the parent `onChange` handler\n\t\t// with the `value` as an argument\n\t\t// (for convenience)\n\n\t\tconst { onChange } = this.props\n\n\t\tonChange(value)\n\t}", "handleChange() {\n this.forceUpdate();\n }", "function triggerChange(t) { t.dispatchEvent(changeEvent) }", "function onChange() {\n\n // hide and show input elements for which this is necessary\n setVisibility();\n\n // update preview considering the changed input value\n updatePreview();\n\n // perform change actions\n self.onchange && self.onchange( self );\n\n }", "function onChange() {\n\n // hide and show input elements for which this is necessary\n setVisibility();\n\n // update preview considering the changed input value\n updatePreview();\n\n // perform change actions\n self.onchange && self.onchange( self );\n\n }", "function changed() {\n\t\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t\t}", "registerOnChange(fn) {\n this.propagateChanges = fn;\n }", "handleChange (event) {\n }", "onCurrentChanged(value) {\n /* no-op */\n }", "onChange() {\n triggerEvent(this.input, 'input');\n triggerEvent(this.input, 'change');\n }", "function changed() {\n\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t}", "function changed() {\n\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t}", "_onChange() {\n void this._debouncer.invoke();\n }", "emitChange () {\n this.emit(Constants.CHANGE_EVENT);\n }", "onDidChange (callback) {\n\t\tconst changeSubscription = this.file.onDidChange(callback);\n\t\tthis.subscriptions.add(changeSubscription);\n\t\treturn changeSubscription;\n\t}", "onChange(item) {}", "dispatchChange() {\n this.toggleAttribute(\"empty\", !this.value);\n this.dispatchEvent(new CustomEvent(\"change\", { bubbles: true }));\n }", "function handleChange(){\n\t\t\t// Error handles\n\t\t\tif(xhr.readyState === this.DONE && xhr.status !== 200){\n\t\t\t\tconsole.log('check yoself');\n\t\t\t}\n\t\t\t// success handles\n\t\t\tif(xhr.readyState === this.DONE && xhr.status === 200){\n\t\t\t\tcallback(xhr.response);\n\t\t\t}\n\n\t\t}", "registerChangeListener(cb) {\n this._slider.events.on('indexChanged', cb);\n }", "function onChanged() {\n let g = getGlobal();\n\n //When the add-in creates the table, it will generate 4 events that we must ignore.\n //We only want to respond to the change events from the user.\n if (g.tableEventCount > 0) {\n g.tableEventCount--;\n return; //count down to throw away events caused by the table creation code\n }\n\n //check if dirty flag was set (flag avoids extra unnecessary ribbon operations)\n if (!g.isTableDirty) {\n g.isTableDirty = true;\n\n //Enable the Refresh and Submit buttons\n setSyncButtonEnabled(true);\n }\n}", "_triggerChange (e) {\n var args = [this.getValue(), this.getFormElement(), this.getUIElement()];\n if (e) {\n args.push(e);\n }\n if (this.options.onChange) {\n this.options.onChange.apply(this, args);\n }\n }", "_onChange(value) {\n this.setState({ changesMade: value });\n }", "_codemirrorValueChanged() {\n // Don't trigger change event if we're ignoring changes\n if (this._ignoreNextChange || !this.props.onChange) {\n this._ignoreNextChange = false;\n return;\n }\n\n const value = this.codeMirror.getDoc().getValue();\n\n // Disable linting if the document reaches a maximum size or is empty\n const shouldLint =\n value.length > MAX_SIZE_FOR_LINTING || value.length === 0 ? false : !this.props.noLint;\n const existingLint = this.codeMirror.options.lint || false;\n if (shouldLint !== existingLint) {\n const { lintOptions } = this.props;\n const lint = shouldLint ? lintOptions || true : false;\n this.codeMirror.setOption('lint', lint);\n }\n\n this.props.onChange(value);\n }", "function onChange(change) {\r\n\t\t//split up the path to get the file name\r\n\t\tvar splitUpPath = change.path.split('/');\r\n\r\n\t\t//log the file detected\r\n\t\tconsole.log('\"' + splitUpPath[splitUpPath.length - 1] + '\" was ' + change.type);\r\n\t}", "_onChange() {\n let value = this.get('value');\n return this.attrs.onChange(value, this);\n }", "function optionChanged(changed){\n charts(changed);\n metadata(changed);\n}", "addChangeListener(callback) {\n Bullet.on(LOCAL_EVENT_NAME, callback)\n }", "handleChangeEvent() {\n this.cacheHasChanged = true;\n }", "_onChange () {\n this.forceUpdate()\n }", "changeFn(event) {\n var fileList = event.__files_ || (event.target && event.target.files);\n if (!fileList)\n return;\n this.stopEvent(event);\n this.handleFiles(fileList);\n }", "get onChange() {\n\t\treturn this._onChange;\n\t}", "get onChange() {\n\t\treturn this._onChange;\n\t}", "get onChange() {\n\t\treturn this._onChange;\n\t}", "function sampleOnChange() {\n SkillSampleAPI.onStatusChange(criteriaId);\n }", "reportValueChange() {\n if (this.options) {\n const value = this.getSelectedOptionValues();\n this.onChange(value);\n this._value = value;\n }\n }" ]
[ "0.7620866", "0.7604169", "0.75682276", "0.7563224", "0.75595355", "0.7537074", "0.7521918", "0.7520366", "0.7513234", "0.7498563", "0.7496141", "0.7489214", "0.7487912", "0.7479759", "0.7470643", "0.7470105", "0.74661165", "0.7458496", "0.7453694", "0.7451992", "0.736924", "0.7303583", "0.7273391", "0.7240529", "0.71548766", "0.71520585", "0.7128725", "0.7093861", "0.7083037", "0.70093733", "0.70093733", "0.69801164", "0.697409", "0.69462836", "0.69462836", "0.69462264", "0.69462264", "0.6938091", "0.69152594", "0.69095105", "0.69081986", "0.6828735", "0.6827403", "0.6826205", "0.6825447", "0.6825447", "0.6818633", "0.6811441", "0.6811441", "0.67853796", "0.6766698", "0.67388356", "0.6706443", "0.6706443", "0.6690389", "0.6690049", "0.66818786", "0.66752523", "0.6664632", "0.6662042", "0.6657042", "0.66217285", "0.6617618", "0.66118735", "0.66093236", "0.66083074", "0.6600708", "0.65971905", "0.6594819", "0.6594819", "0.65864474", "0.6579841", "0.6576589", "0.65624547", "0.6545084", "0.6543494", "0.6543494", "0.6543034", "0.6512732", "0.65007645", "0.6487829", "0.64831334", "0.6477887", "0.6468582", "0.6467927", "0.64665604", "0.6463477", "0.6457328", "0.64566207", "0.64305115", "0.64199996", "0.6416667", "0.6404831", "0.6402141", "0.6397671", "0.63960356", "0.63960356", "0.63960356", "0.6394816", "0.6394437" ]
0.76215637
0
Reemits a render event.
function onRender() { var args; var i; __debug_452( 'Received a render event. Re-emitting...' ); args = new Array( arguments.length+1 ); args[ 0 ] = 'render'; for ( i = 0; i < arguments.length; i++ ) { args[ i+1 ] = arguments[ i ]; } self.emit.apply( self, args ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_587( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_395( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_577( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_412( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_457( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_488( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_332( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_330( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_475( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_429( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_520( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function RenderEvent() {}", "function resumeRender() {\n shouldRender = true;\n render();\n }", "function handleRender() {\n view._isRendered = true;\n triggerDOMRefresh();\n }", "function handleRender() {\n view._isRendered = true;\n triggerDOMRefresh();\n }", "function handleRender() {\n\t view._isRendered = true;\n\t triggerDOMRefresh();\n\t }", "function handleRender(view) {\n view._isRendered = true;\n triggerDOMRefresh(view);\n }", "function handleRender(view){\r\n view._isRendered = true;\r\n triggerDOMRefresh(view);\r\n }", "render(...args) {\n if (this._render) {\n this.__notify(EV.BEFORE_RENDER);\n this._render(...args);\n this.__notify(EV.RENDERED);\n }\n\n this.rendered = true;\n }", "function renderCall() {\n // Repaint?\n if (needs_repaint === true) {\n needs_repaint = false;\n\n ctx.clearRect(0, 0, canvas_el.width, canvas_el.height);\n\n renderTimeXAxis();\n renderElementsMargin();\n\n renderRows();\n\n renderCurrentTimePoint();\n\n }\n }", "onRender()/*: void*/ {\n this.render();\n }", "unrender() {\n this.rendered = false;\n }", "postRender() {\n if (!this.multiFire || !this._hasFired) {\n return;\n }\n\n this._hasFired = false;\n this._nextFire = this._tempNextFire;\n }", "postRendering() {\n this.ctx.restore();\n }", "handleRendered_() {\n\t\tthis.isRendered_ = true;\n\t}", "function invalidate () {\n\t if (!options.batching) {\n\t if (!isRendering) render()\n\t } else {\n\t if (!frameId) frameId = raf(render)\n\t }\n\t }", "function invalidate () {\n if (!options.batching) {\n if (!isRendering) render()\n } else {\n if (!frameId) frameId = raf(render)\n }\n }", "render() {\n const self = this;\n const data = self.get('data');\n if (!data) {\n throw new Error('data must be defined first');\n }\n self.clear();\n self.emit('beforerender');\n self.refreshLayout(this.get('fitView'));\n self.emit('afterrender');\n }", "function render() {\n\t if(stopped || scene.contextLost) {\n\t return\n\t }\n\t requestAnimationFrame(render)\n\t redraw()\n\t }", "function render() {\n\t if(stopped || scene.contextLost) {\n\t return\n\t }\n\t requestAnimationFrame(render)\n\t redraw()\n\t }", "function render() {\n\n isRendered = true;\n\n renderSource();\n\n }", "function renderCallback() {\n\n while (TO_RENDER.length) {\n TO_RENDER.shift().notify();\n }\n\n TO_RENDER.added = {};\n\n while (ENV_QUEUE.length) {\n var env = ENV_QUEUE.shift();\n for (var key in env.revalidateQueue) {\n env.revalidateQueue[key].revalidate();\n }\n reslot(env);\n }\n ENV_QUEUE.added = {};\n}", "_requestRender() { this._invalidateProperties(); }", "function render() {\n\tclearCanvas();\n\tRenderer.draw();\n\t\n\t\t\n}", "function completeRender() {\n var afterRender = options.afterRender;\n\n if (afterRender) {\n afterRender.call(root, root);\n }\n\n // Always emit an afterRender event.\n root.trigger(\"afterRender\", root);\n }", "function completeRender() {\n var afterRender = options.afterRender;\n\n if (afterRender) {\n afterRender.call(root, root);\n }\n\n // Always emit an afterRender event.\n root.trigger(\"afterRender\", root);\n }", "function render() {\n\n\t\t\tisRendered = true;\n\n\t\t\trenderSource();\n\n\t\t}", "function pauseRender() {\n shouldRender = false;\n }", "willClearRender() {\n\t\tconsole.log('willClearRender ejecutado!');\n\t}", "function render () {\n // If this is called synchronously we need to\n // cancel any pending future updates\n clearFrame()\n\n // If the rendering from the previous frame is still going,\n // we'll just wait until the next frame. Ideally renders should\n // not take over 16ms to stay within a single frame, but this should\n // catch it if it does.\n if (isRendering) {\n frameId = raf(render)\n return\n } else {\n isRendering = true\n }\n\n // 1. If there isn't a native element rendered for the current mounted element\n // then we need to create it from scratch.\n // 2. If a new element has been mounted, we should diff them.\n // 3. We should update check all child components for changes.\n if (!currentNativeElement) {\n currentElement = app.element\n currentNativeElement = toNative(rootId, '0', currentElement)\n container.appendChild(currentNativeElement)\n } else if (currentElement !== app.element) {\n currentNativeElement = patch(rootId, currentElement, app.element, currentNativeElement)\n currentElement = app.element\n updateChildren(rootId)\n } else {\n updateChildren(rootId)\n }\n\n // Allow rendering again.\n isRendering = false\n }", "postrender() {\n this.gl.flush();\n }", "function render() {\n if(stopped || scene.contextLost) {\n return\n }\n requestAnimationFrame(render)\n redraw()\n }", "function clearRenderTimer() {\n\n\t\t\tclearTimeout(renderTimer);\n\n\t\t\trenderTimer = null;\n\n\t\t}", "function clearRenderTimer() {\n\n clearTimeout(renderTimer);\n\n renderTimer = null;\n\n }", "function render() {\n if (!willRender) {\n willRender = true;\n process.nextTick(function() {\n screen.render();\n willRender = false;\n });\n }\n}", "function r(e) {\n this.reinitializeTransaction(), // Only server-side rendering really needs this option (see\n // `ReactServerRendering`), but server-side uses\n // `ReactServerRenderingTransaction` instead. This option is here so that it's\n // accessible and defaults to false when `ReactDOMComponent` and\n // `ReactDOMTextComponent` checks it in `mountComponent`.`\n this.renderToStaticMarkup = !1, this.reactMountReady = i.getPooled(null), this.useCreateElement = e;\n }", "function rerender() {\n\tscreen.innerText = buffer;\n}", "function reRender() {\n input.innerText = buffer;\n}", "afterRender() { }", "afterRender() { }", "reRender() {\n this.removeAllChildrenComponents()\n\n this.build()\n }", "function render() {\n renderLives();\n renderTimeRemaining();\n }", "function render() {\n\t\t\n\t}", "function _triggerAfterRender() {\n _trigger(docma.Event.Render, [docma.currentRoute]);\n if (_initialLoad) {\n _trigger(docma.Event.Ready);\n _initialLoad = false;\n }\n }", "function render() {\n\t\t\t}", "function render () {\n\t // If this is called synchronously we need to\n\t // cancel any pending future updates\n\t clearFrame()\n\n\t // If the rendering from the previous frame is still going,\n\t // we'll just wait until the next frame. Ideally renders should\n\t // not take over 16ms to stay within a single frame, but this should\n\t // catch it if it does.\n\t if (isRendering) {\n\t frameId = raf(render)\n\t return\n\t } else {\n\t isRendering = true\n\t }\n\n\t // 1. If there isn't a native element rendered for the current mounted element\n\t // then we need to create it from scratch.\n\t // 2. If a new element has been mounted, we should diff them.\n\t // 3. We should update check all child components for changes.\n\t if (!currentNativeElement) {\n\t currentElement = app.element\n\t currentNativeElement = toNative(rootId, '0', currentElement)\n\t if (container.children.length > 0) {\n\t console.info('deku: The container element is not empty. These elements will be removed. Read more: http://cl.ly/b0Sr')\n\t }\n\t if (container === document.body) {\n\t console.warn('deku: Using document.body is allowed but it can cause some issues. Read more: http://cl.ly/b0SC')\n\t }\n\t removeAllChildren(container)\n\t container.appendChild(currentNativeElement)\n\t } else if (currentElement !== app.element) {\n\t currentNativeElement = patch(rootId, currentElement, app.element, currentNativeElement)\n\t currentElement = app.element\n\t updateChildren(rootId)\n\t } else {\n\t updateChildren(rootId)\n\t }\n\n\t // Call mount events on all new entities\n\t flushMountQueue()\n\n\t // Allow rendering again.\n\t isRendering = false\n\n\t }", "function render() {\n\t}", "render() {\n\n // Calculate delta\n if (!this.lastFrameTime) this.lastFrameTime = Date.now()\n this.delta = Math.min(1, (Date.now() - this.lastFrameTime) / 1000)\n this.lastFrameTime = Date.now()\n\n // Check if should be rendering\n if (!this.isRendering)\n return\n\n // Request another frame\n requestAnimationFrame(this.render)\n\n }", "static finishedRenderingComponent() {\n\t\trenderingComponents_.pop();\n\t}", "function render( timestamp )\n\t{\n\t\t\n\t\trequestAnimationFrame( render );\n\t\t\n\t\tcanvas_handler.draw_all( );\n\t\t\n\t}", "_endRender() {\n this._allowRegisterSegment = false;\n }", "function _render() {\n _render = (0, _asyncToGenerator2.default)(\n /*#__PURE__*/\n _regenerator.default.mark(function _callee2(props) {\n return _regenerator.default.wrap(\n function _callee2$(_context2) {\n while (1) {\n switch ((_context2.prev = _context2.next)) {\n case 0:\n if (!props.err) {\n _context2.next = 4;\n break;\n }\n\n _context2.next = 3;\n return renderError(props);\n\n case 3:\n return _context2.abrupt(\"return\");\n\n case 4:\n _context2.prev = 4;\n _context2.next = 7;\n return doRender(props);\n\n case 7:\n _context2.next = 13;\n break;\n\n case 9:\n _context2.prev = 9;\n _context2.t0 = _context2[\"catch\"](4);\n _context2.next = 13;\n return renderError(\n (0, _objectSpread2.default)({}, props, {\n err: _context2.t0,\n })\n );\n\n case 13:\n case \"end\":\n return _context2.stop();\n }\n }\n },\n _callee2,\n this,\n [[4, 9]]\n );\n })\n );\n return _render.apply(this, arguments);\n }", "redraw() {\n this.createBackground();\n this.render();\n }", "cancelRendering() {\n if (this.renderTask) {\n this.renderTask.cancel();\n this.renderTask = null;\n }\n this.resume = null;\n }", "_render(model) {\n\t\tthis._coordinator.newEvent({\n\t\t\tsource: this.constructor.name,\n\t\t\ttype: 'render',\n\t\t\tdata: {\n\t\t\t\toriginX: this._originX,\n\t\t\t\toriginY: this._originY,\n\t\t\t\twidth: this._width,\n\t\t\t\theight: this._height\n\t\t\t}\n\t\t});\n\t}", "rerender() {\n\t\tthis.setState(this.state)\n\t}", "reRender(skipPreRenderRefresh = false) {\n this.refreshFromRerender = true;\n super.reRender(skipPreRenderRefresh);\n this.initDomEvents();\n }", "renderEventInput() {\n eventContainer.innerHTML = \"\";\n eventContainer.innerHTML = eventHtml.makeNewEventHtml();\n }", "function renderCal() {\n $('#calendar').fullCalendar('rerenderEvents');\n }", "function render() {\r\n graphics.clear();\r\n myTexture.draw();\r\n }", "function Render() {\n ClearScreen();\n RenderEnergeticDroplets();\n ResetRenderingConditions();\n}", "function render() {\n window.requestAnimationFrame(render);\n manipulationCanvas.getContext('2d').clearRect(0, 0, manipulationCanvas.width, manipulationCanvas.height); //clears canvas\n triRenderer.render();\n }", "updateRendererState()\r\n {\r\n // update the renderer state object\r\n this.updateRendererStateObject();\r\n \r\n // create a new update id for the render\r\n this.updateRandomUpdateId();\r\n \r\n this.emit(\"rendererStateChanged\", this, this.rendererState);\r\n }", "onRender () {\n\n }", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function render() {\n\n\t\t\t}", "onRender() {\n if ( !this.mRunning )\n return;\n\n if ( SPE_USES_PREVIEW_IMAGE ) {\n document.querySelector( '.spline-preview-image-container' ).style.display = 'none';\n\n SPE_USES_PREVIEW_IMAGE = false;\n }\n\n if ( this.mPlayHandler && !this.mPlayHandler.isEnable ) {\n this.mPlayHandler.activate();\n }\n\n if ( this.mOrbitControls ) {\n this.mOrbitControls.update();\n }\n if ( this.mScene && this.mMainCamera ) {\n this.mRenderer.autoClear = true;\n this.mRenderer.render( this.mScene, this.mMainCamera );\n }\n }", "handleRenderCompletion() {\n this.renderNewChildren = false;\n this.preventUpdate = false;\n this.lastChildIndex = this.childCount;\n if (this.isRenderingNew) {\n this.isRenderingNew = false;\n this.update(null, false, true); // Prevent from triggering an item request to avoid infinite loop of loading.\n } else if (this.contentNode && InfiniteUtils.shouldTriggerItemRequest(InfiniteUtils.getContentData(this.contentNode))) {\n this.triggerItemRequest();\n }\n }", "function viewRenderComplete() {\n $container.trigger(topologyConstants.events.viewRenderComplete, {}); // Private Event\n }", "_notifyRenderer() {\n this.renderer.notify();\n }", "relayout() {\n dispatchSimpleEvent(this, 'relayout', true);\n }", "onBeforeRendering() {}", "render(renderedTemplate) {\n super.render()\n\n // render the template\n render(renderedTemplate, this, {\n eventContext: this\n })\n }", "function render() {\n view.update();\n requestAnimationFrame(render);\n}", "function render() {\n if (gameRunning) {\n world.camera.moveDimensions()\n context.clearRect(0, 0, canvas.width, canvas.height);\n world.render();\n setTimeout(render, renderTimeDelta)\n }\n}", "function _render(scene) {\n renderer.update(scene);\n }", "function render() {\r\n\r\n}", "function render() {\r\n\r\n}", "_invalidate() {\n\t\tif (this._invalidated) {\n\t\t\t// console.log(\"already invalidated\", this, ...arguments);\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.getDomRef() && !this._suppressInvalidation) {\n\t\t\tthis._invalidated = true;\n\t\t\t// console.log(\"INVAL\", this, ...arguments);\n\t\t\tRenderScheduler.renderDeferred(this);\n\t\t}\n\t}", "function renderOnce(){\n drawBoard(size);\n }", "function render(){\n spinCounter = 0;\n gamePlay();\n }", "function UpdateRender() {\n // Set background\n BackContextHandle.fillRect(0, 0, CanvasWidth, CanvasHeight);\n\n // Render\n BackContextHandle.save();\n Render();\n BackContextHandle.restore();\n\n // Swap the backbuffer with the frontbuffer\n var ImageData = BackContextHandle.getImageData(0, 0, CanvasWidth, CanvasHeight);\n ContextHandle.putImageData(ImageData, 0, 0);\n}", "_update() {\n render(this._template(), this.shadowRoot, {eventContext: this});\n }", "function lateRender() {\n\t\tsetTimeout( function() { // IE7 needs this so dimensions are calculated correctly\n\t\t\t\t\tif (!currentView.start && bodyVisible()) { // !currentView.start makes sure this never happens more than once\n\t\t\t\t\t\trenderView();\n\t\t\t\t\t}\n\t\t\t\t}, 0);\n\t}", "function render() {\n\t\trate = (droppedFrames > 0) ?\n\t\t\t((rate+(FPS/(droppedFrames*2)))/2):\n\t\t\t((rate + FPS)/2);\n\t\t\t\n\t\tcycleCounter = (cycleCounter + 1) % FPS;\n\t\tframeCounter = (frameCounter + 1) % 1e15;\n\t\t// just render every N frames to avoid a jarring display\n\t\tdroppedFrames = -1;\n\t\trdCallback();\n\t}", "onRender(scene, time) {}" ]
[ "0.7726372", "0.7672331", "0.7665788", "0.76572526", "0.7655998", "0.76539224", "0.7652522", "0.7651107", "0.76429856", "0.76421237", "0.7623794", "0.6994004", "0.67871696", "0.67314553", "0.67314553", "0.6673593", "0.65053445", "0.65043765", "0.6444167", "0.63916767", "0.6386083", "0.6215451", "0.60745835", "0.6063212", "0.6025815", "0.5983671", "0.59834343", "0.5943105", "0.58774674", "0.58774674", "0.58711886", "0.5855174", "0.5848575", "0.5833751", "0.5825184", "0.5825184", "0.5803323", "0.57938194", "0.57847404", "0.57549715", "0.5753157", "0.5745031", "0.5743764", "0.57243097", "0.5702407", "0.5698554", "0.56926113", "0.565947", "0.5650503", "0.5650503", "0.5606217", "0.55847776", "0.5571784", "0.5564836", "0.55646217", "0.55570143", "0.5551144", "0.5541771", "0.5538538", "0.5515794", "0.5510801", "0.55076826", "0.5506269", "0.54958576", "0.5494323", "0.54930204", "0.5490676", "0.5485293", "0.5483956", "0.5478577", "0.547311", "0.5464079", "0.545132", "0.54415125", "0.5434181", "0.5434181", "0.5434181", "0.5434181", "0.5434181", "0.5425733", "0.5420645", "0.5412628", "0.54028964", "0.53895235", "0.5386448", "0.538495", "0.5381009", "0.53802407", "0.5373726", "0.53733", "0.5364876", "0.5364876", "0.5362733", "0.53625435", "0.53615856", "0.5358409", "0.5353968", "0.53332514", "0.5331306", "0.53254426" ]
0.76247567
10
Callback invoked upon receiving a change event.
function onChange() { __debug_332( 'Received a change event.' ); if ( self._autoRender ) { // eslint-disable-line no-underscore-dangle self.render(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "change() { }", "function onChange() {\n\t\t__debug_452( 'Received a change event.' );\n\t\tself.render();\n\t}", "function onChange() {\n\t\t__debug_330( 'Received a change event.' );\n\t\tself.render();\n\t}", "handleEventChange() {\n }", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_730( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "onChange(callback) {\n\t\tthis.changeCallback = callback;\n\t}", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_259( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_488( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_587( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_596( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_412( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_475( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_520( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "onChanged(e){}", "function onChange() {\n\t\t__debug_457( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_429( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_577( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "onchange() {}", "function onChange() {\n console.log(\"something changed...\");\n \n }", "function onChange() {\n\t\t__debug_395( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "addChangeListener(callback) {\n this.on('change', callback);\n }", "function changeEvent() {\n var value_sub = properties.value;\n trigger_param_list.push(value_sub);\n // 'seek' event is like a forced-change event\n $pebble_slider_object.triggerHandler('seek', trigger_param_list);\n if (prev_change_value !== value_sub) {\n $pebble_slider_object.triggerHandler('change', trigger_param_list);\n prev_change_value = value_sub;\n }\n trigger_param_list.length = 0;\n }", "onChange(callback) {\n this.events.change.push({ callback });\n }", "function onChange() {\n if (input.get.call(element, valueField) !== observer.oldValue && !element.readOnly) {\n observer.set(input.get.call(element, valueField));\n }\n }", "function changeFunction() {\n\tconsole.log(\"onchange\");\n}", "addChangeListener (callback) {\n this.on(Constants.CHANGE_EVENT, callback);\n }", "onDidChange(callback) {\n return this.emitter.on('did-change', callback)\n }", "change(/*event*/) {\n this._super(...arguments);\n this._parse();\n }", "addChangeListener (callback) {\n\t\tthis.on(Constants.CHANGE_EVENT, callback);\n\t}", "function handleChange(editor, data, value) {\n onChange(value);\n }", "function handleChange(editor, data, value) {\n onChange(value);\n }", "onDataChange() {}", "changedCallback () {\n\t\tif (this.oldValue === this.value) return;\n\t\tthis._setTranslation();\n\t}", "change(fn, options) {\n\t\treturn this.on({ change: fn }, options);\n\t}", "change(fn, options) {\n\t\treturn this.on({ change: fn }, options);\n\t}", "onChange () {}", "onChange () {}", "onChange(changeListener) {\n changeListener.path = this.path;\n privateDataMap.get(this).addListener(changeListener, this.path);\n }", "handleChange(event) {\n this.dispatchEvent(new CustomEvent('change', {detail: event.target.value}));\n }", "function changed(change) {\n if (change.changeType === \"property\" && change.property === property) {\n fn(change);\n }\n }", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "_setOnChanges(){\n\t\tthis.inputs.forEach(i => i.addEventListener('change', this._onChange.bind(this)));\t\n\t}", "handleChange(event) {\n\n }", "function onChangeHandler(e) {\n\n }", "function onChangeHandler(e) {\n\n }", "emitChange() {\n\t\tthis.emit(CHANGE_EVENT)\n\t}", "addChangeListener(callback) {\n\t\tthis.on(CHANGE_EVENT, callback)\n\t}", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "internalOnChange(event) {\n const me = this,\n value = me.value,\n oldValue = me._lastValue;\n\n // Don't trigger change if we enter invalid value or if value has not changed (for IE when pressing ENTER)\n if (me.isValid && value !== oldValue) {\n me._lastValue = value;\n\n // trigger change event, signaling that origin is from user\n me.trigger('change', { value, oldValue, event, userAction: true });\n\n // per default Field triggers action event on change, but might be reconfigured in subclasses (such as Combo)\n if (me.defaultAction === 'change') {\n me.trigger('action', { value, oldValue, event });\n }\n }\n\n // since Widget has Events mixed in configured with 'callOnFunctions' this will also call onClick and onAction\n }", "handleChange () {\n this.props.onStatusChange(\n this.props.item.id,\n this.refs.checkbox.checked ? 'RESERVED' : 'NEW'\n );\n }", "_valueChanged() {\n // Send a global refresh to the bapge body.\n var event = new Event(\"change\");\n this._root.dispatchEvent(event);\n }", "emitChange() {\n this.emit(CHANGE_EVENT);\n }", "emitChange() {\n this.emit(CHANGE_EVENT);\n }", "_triggerChangeEvent() {\n\t\tif ( this.$control.rendered && ! this.changeEventDisabled ) {\n\t\t\tthis._updateSettings();\n\t\t\tthis.events.emit( 'change', this.settings );\n\t\t}\n\t}", "handleChange(event){\n changeHandler(event,this);\n }", "setOnValueChangeEvent(func){\r\n this._onValueChange = func;\r\n }", "function referenceOnChange() {\n MicroReferenceAPI.onStatusChange(criteriaId);\n }", "function handleChange(event, newValue) {\n setValue(newValue);\n }", "onChange(callback) {\n this.listeners.push(callback);\n }", "onGenericChange() {\n this.contentChanged.emit(void 0);\n }", "afterValidChange() { }", "static on_changed(chr, _retval) {\n let uuid = chr.getUuid()\n console.log(colours.fg.blue + \"[BLE] [CHANGE ]\" + colours.fg.yellow + \" UUID: \" + uuid.toString() + colours.fg.magenta + \" | data: 0x\" + bytes2hex(chr.getValue()) + colours.reset);\n }", "changedInput() {\n\n\t\tlet {isValid, error} = this.state.wasInvalid ? this.validate() : this.state;\n\t\tlet onChange = this.props.onChange;\n\t\tif (onChange) {\n\t\t\tonChange(this.getValue(), isValid, error);\n\t\t}\n\t\tif (this.context.validationSchema) {\n\t\t\tlet value = this.getValue();\n\t\t\tif (this.state.isMultiSelect && value === '') {\n\t\t\t\tvalue = [];\n\t\t\t}\n\t\t\tif (this.shouldTypeBeNumberBySchemeDefinition(this.props.pointer)) {\n\t\t\t\tvalue = Number(value);\n\t\t\t}\n\t\t\tthis.context.validationParent.onValueChanged(this.props.pointer, value, isValid, error);\n\t\t}\n\t}", "_evtChange(event) { }", "on_change(event)\n\t{\n\t\t// Extract `value` from the argument\n\t\t// of this `onChange` listener\n\t\t// (for convenience)\n\n\t\tlet value = event\n\n\t\tif (event.target !== undefined)\n\t\t{\n\t\t\tvalue = event.target.value\n\t\t}\n\n\t\t// Call the parent `onChange` handler\n\t\t// with the `value` as an argument\n\t\t// (for convenience)\n\n\t\tconst { onChange } = this.props\n\n\t\tonChange(value)\n\t}", "handleChange() {\n this.forceUpdate();\n }", "function triggerChange(t) { t.dispatchEvent(changeEvent) }", "function onChange() {\n\n // hide and show input elements for which this is necessary\n setVisibility();\n\n // update preview considering the changed input value\n updatePreview();\n\n // perform change actions\n self.onchange && self.onchange( self );\n\n }", "function onChange() {\n\n // hide and show input elements for which this is necessary\n setVisibility();\n\n // update preview considering the changed input value\n updatePreview();\n\n // perform change actions\n self.onchange && self.onchange( self );\n\n }", "function changed() {\n\t\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t\t}", "registerOnChange(fn) {\n this.propagateChanges = fn;\n }", "handleChange (event) {\n }", "onCurrentChanged(value) {\n /* no-op */\n }", "onChange() {\n triggerEvent(this.input, 'input');\n triggerEvent(this.input, 'change');\n }", "function changed() {\n\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t}", "function changed() {\n\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t}", "_onChange() {\n void this._debouncer.invoke();\n }", "emitChange () {\n this.emit(Constants.CHANGE_EVENT);\n }", "onDidChange (callback) {\n\t\tconst changeSubscription = this.file.onDidChange(callback);\n\t\tthis.subscriptions.add(changeSubscription);\n\t\treturn changeSubscription;\n\t}", "onChange(item) {}", "dispatchChange() {\n this.toggleAttribute(\"empty\", !this.value);\n this.dispatchEvent(new CustomEvent(\"change\", { bubbles: true }));\n }", "function handleChange(){\n\t\t\t// Error handles\n\t\t\tif(xhr.readyState === this.DONE && xhr.status !== 200){\n\t\t\t\tconsole.log('check yoself');\n\t\t\t}\n\t\t\t// success handles\n\t\t\tif(xhr.readyState === this.DONE && xhr.status === 200){\n\t\t\t\tcallback(xhr.response);\n\t\t\t}\n\n\t\t}", "registerChangeListener(cb) {\n this._slider.events.on('indexChanged', cb);\n }", "function onChanged() {\n let g = getGlobal();\n\n //When the add-in creates the table, it will generate 4 events that we must ignore.\n //We only want to respond to the change events from the user.\n if (g.tableEventCount > 0) {\n g.tableEventCount--;\n return; //count down to throw away events caused by the table creation code\n }\n\n //check if dirty flag was set (flag avoids extra unnecessary ribbon operations)\n if (!g.isTableDirty) {\n g.isTableDirty = true;\n\n //Enable the Refresh and Submit buttons\n setSyncButtonEnabled(true);\n }\n}", "_triggerChange (e) {\n var args = [this.getValue(), this.getFormElement(), this.getUIElement()];\n if (e) {\n args.push(e);\n }\n if (this.options.onChange) {\n this.options.onChange.apply(this, args);\n }\n }", "_onChange(value) {\n this.setState({ changesMade: value });\n }", "_codemirrorValueChanged() {\n // Don't trigger change event if we're ignoring changes\n if (this._ignoreNextChange || !this.props.onChange) {\n this._ignoreNextChange = false;\n return;\n }\n\n const value = this.codeMirror.getDoc().getValue();\n\n // Disable linting if the document reaches a maximum size or is empty\n const shouldLint =\n value.length > MAX_SIZE_FOR_LINTING || value.length === 0 ? false : !this.props.noLint;\n const existingLint = this.codeMirror.options.lint || false;\n if (shouldLint !== existingLint) {\n const { lintOptions } = this.props;\n const lint = shouldLint ? lintOptions || true : false;\n this.codeMirror.setOption('lint', lint);\n }\n\n this.props.onChange(value);\n }", "function onChange(change) {\r\n\t\t//split up the path to get the file name\r\n\t\tvar splitUpPath = change.path.split('/');\r\n\r\n\t\t//log the file detected\r\n\t\tconsole.log('\"' + splitUpPath[splitUpPath.length - 1] + '\" was ' + change.type);\r\n\t}", "_onChange() {\n let value = this.get('value');\n return this.attrs.onChange(value, this);\n }", "function optionChanged(changed){\n charts(changed);\n metadata(changed);\n}", "addChangeListener(callback) {\n Bullet.on(LOCAL_EVENT_NAME, callback)\n }", "handleChangeEvent() {\n this.cacheHasChanged = true;\n }", "_onChange () {\n this.forceUpdate()\n }", "changeFn(event) {\n var fileList = event.__files_ || (event.target && event.target.files);\n if (!fileList)\n return;\n this.stopEvent(event);\n this.handleFiles(fileList);\n }", "get onChange() {\n\t\treturn this._onChange;\n\t}", "get onChange() {\n\t\treturn this._onChange;\n\t}", "get onChange() {\n\t\treturn this._onChange;\n\t}", "function sampleOnChange() {\n SkillSampleAPI.onStatusChange(criteriaId);\n }", "reportValueChange() {\n if (this.options) {\n const value = this.getSelectedOptionValues();\n this.onChange(value);\n this._value = value;\n }\n }" ]
[ "0.76206696", "0.7620642", "0.7603297", "0.7567978", "0.7562529", "0.7559636", "0.75364155", "0.7521261", "0.7519743", "0.7512532", "0.7497861", "0.74954176", "0.74885535", "0.7486875", "0.74790376", "0.7469411", "0.74654305", "0.74590075", "0.74529", "0.74512655", "0.7369066", "0.730385", "0.72735673", "0.72414035", "0.71549815", "0.7152514", "0.7128517", "0.7093095", "0.7083617", "0.7009139", "0.7009139", "0.69793963", "0.6974256", "0.6947616", "0.6947616", "0.69458693", "0.69458693", "0.6937772", "0.6914656", "0.690971", "0.6908083", "0.68284774", "0.682663", "0.68252903", "0.68252903", "0.6824956", "0.6818822", "0.6811583", "0.6811583", "0.6786172", "0.6765572", "0.67383015", "0.6705071", "0.6705071", "0.6690313", "0.668894", "0.6682675", "0.66756", "0.6664683", "0.6661744", "0.66555774", "0.6622243", "0.66172475", "0.66127586", "0.66093457", "0.6608061", "0.6598658", "0.65959495", "0.659532", "0.659532", "0.658595", "0.65802854", "0.657574", "0.6562282", "0.654525", "0.6543162", "0.6543162", "0.6542606", "0.6511655", "0.6500862", "0.6486968", "0.64826125", "0.6478265", "0.6468562", "0.6468112", "0.6466427", "0.64623266", "0.6457302", "0.64557207", "0.6430325", "0.64199036", "0.6416071", "0.64035237", "0.63999367", "0.6397887", "0.6395908", "0.6395908", "0.6395908", "0.63955903", "0.6395481" ]
0.7469961
15
Reemits a render event.
function onRender() { var args; var i; __debug_332( 'Received a render event. Re-emitting...' ); args = new Array( arguments.length+1 ); args[ 0 ] = 'render'; for ( i = 0; i < arguments.length; i++ ) { args[ i+1 ] = arguments[ i ]; } self.emit.apply( self, args ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_587( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_395( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_577( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_412( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_457( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_488( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_330( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_475( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_429( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_452( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_520( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function RenderEvent() {}", "function resumeRender() {\n shouldRender = true;\n render();\n }", "function handleRender() {\n view._isRendered = true;\n triggerDOMRefresh();\n }", "function handleRender() {\n view._isRendered = true;\n triggerDOMRefresh();\n }", "function handleRender() {\n\t view._isRendered = true;\n\t triggerDOMRefresh();\n\t }", "function handleRender(view) {\n view._isRendered = true;\n triggerDOMRefresh(view);\n }", "function handleRender(view){\r\n view._isRendered = true;\r\n triggerDOMRefresh(view);\r\n }", "render(...args) {\n if (this._render) {\n this.__notify(EV.BEFORE_RENDER);\n this._render(...args);\n this.__notify(EV.RENDERED);\n }\n\n this.rendered = true;\n }", "function renderCall() {\n // Repaint?\n if (needs_repaint === true) {\n needs_repaint = false;\n\n ctx.clearRect(0, 0, canvas_el.width, canvas_el.height);\n\n renderTimeXAxis();\n renderElementsMargin();\n\n renderRows();\n\n renderCurrentTimePoint();\n\n }\n }", "onRender()/*: void*/ {\n this.render();\n }", "unrender() {\n this.rendered = false;\n }", "postRender() {\n if (!this.multiFire || !this._hasFired) {\n return;\n }\n\n this._hasFired = false;\n this._nextFire = this._tempNextFire;\n }", "postRendering() {\n this.ctx.restore();\n }", "handleRendered_() {\n\t\tthis.isRendered_ = true;\n\t}", "function invalidate () {\n\t if (!options.batching) {\n\t if (!isRendering) render()\n\t } else {\n\t if (!frameId) frameId = raf(render)\n\t }\n\t }", "function invalidate () {\n if (!options.batching) {\n if (!isRendering) render()\n } else {\n if (!frameId) frameId = raf(render)\n }\n }", "render() {\n const self = this;\n const data = self.get('data');\n if (!data) {\n throw new Error('data must be defined first');\n }\n self.clear();\n self.emit('beforerender');\n self.refreshLayout(this.get('fitView'));\n self.emit('afterrender');\n }", "function render() {\n\t if(stopped || scene.contextLost) {\n\t return\n\t }\n\t requestAnimationFrame(render)\n\t redraw()\n\t }", "function render() {\n\t if(stopped || scene.contextLost) {\n\t return\n\t }\n\t requestAnimationFrame(render)\n\t redraw()\n\t }", "function render() {\n\n isRendered = true;\n\n renderSource();\n\n }", "function renderCallback() {\n\n while (TO_RENDER.length) {\n TO_RENDER.shift().notify();\n }\n\n TO_RENDER.added = {};\n\n while (ENV_QUEUE.length) {\n var env = ENV_QUEUE.shift();\n for (var key in env.revalidateQueue) {\n env.revalidateQueue[key].revalidate();\n }\n reslot(env);\n }\n ENV_QUEUE.added = {};\n}", "_requestRender() { this._invalidateProperties(); }", "function render() {\n\tclearCanvas();\n\tRenderer.draw();\n\t\n\t\t\n}", "function completeRender() {\n var afterRender = options.afterRender;\n\n if (afterRender) {\n afterRender.call(root, root);\n }\n\n // Always emit an afterRender event.\n root.trigger(\"afterRender\", root);\n }", "function completeRender() {\n var afterRender = options.afterRender;\n\n if (afterRender) {\n afterRender.call(root, root);\n }\n\n // Always emit an afterRender event.\n root.trigger(\"afterRender\", root);\n }", "function render() {\n\n\t\t\tisRendered = true;\n\n\t\t\trenderSource();\n\n\t\t}", "function pauseRender() {\n shouldRender = false;\n }", "willClearRender() {\n\t\tconsole.log('willClearRender ejecutado!');\n\t}", "function render () {\n // If this is called synchronously we need to\n // cancel any pending future updates\n clearFrame()\n\n // If the rendering from the previous frame is still going,\n // we'll just wait until the next frame. Ideally renders should\n // not take over 16ms to stay within a single frame, but this should\n // catch it if it does.\n if (isRendering) {\n frameId = raf(render)\n return\n } else {\n isRendering = true\n }\n\n // 1. If there isn't a native element rendered for the current mounted element\n // then we need to create it from scratch.\n // 2. If a new element has been mounted, we should diff them.\n // 3. We should update check all child components for changes.\n if (!currentNativeElement) {\n currentElement = app.element\n currentNativeElement = toNative(rootId, '0', currentElement)\n container.appendChild(currentNativeElement)\n } else if (currentElement !== app.element) {\n currentNativeElement = patch(rootId, currentElement, app.element, currentNativeElement)\n currentElement = app.element\n updateChildren(rootId)\n } else {\n updateChildren(rootId)\n }\n\n // Allow rendering again.\n isRendering = false\n }", "postrender() {\n this.gl.flush();\n }", "function render() {\n if(stopped || scene.contextLost) {\n return\n }\n requestAnimationFrame(render)\n redraw()\n }", "function clearRenderTimer() {\n\n\t\t\tclearTimeout(renderTimer);\n\n\t\t\trenderTimer = null;\n\n\t\t}", "function clearRenderTimer() {\n\n clearTimeout(renderTimer);\n\n renderTimer = null;\n\n }", "function render() {\n if (!willRender) {\n willRender = true;\n process.nextTick(function() {\n screen.render();\n willRender = false;\n });\n }\n}", "function r(e) {\n this.reinitializeTransaction(), // Only server-side rendering really needs this option (see\n // `ReactServerRendering`), but server-side uses\n // `ReactServerRenderingTransaction` instead. This option is here so that it's\n // accessible and defaults to false when `ReactDOMComponent` and\n // `ReactDOMTextComponent` checks it in `mountComponent`.`\n this.renderToStaticMarkup = !1, this.reactMountReady = i.getPooled(null), this.useCreateElement = e;\n }", "function rerender() {\n\tscreen.innerText = buffer;\n}", "function reRender() {\n input.innerText = buffer;\n}", "afterRender() { }", "afterRender() { }", "reRender() {\n this.removeAllChildrenComponents()\n\n this.build()\n }", "function render() {\n renderLives();\n renderTimeRemaining();\n }", "function render() {\n\t\t\n\t}", "function _triggerAfterRender() {\n _trigger(docma.Event.Render, [docma.currentRoute]);\n if (_initialLoad) {\n _trigger(docma.Event.Ready);\n _initialLoad = false;\n }\n }", "function render() {\n\t\t\t}", "function render () {\n\t // If this is called synchronously we need to\n\t // cancel any pending future updates\n\t clearFrame()\n\n\t // If the rendering from the previous frame is still going,\n\t // we'll just wait until the next frame. Ideally renders should\n\t // not take over 16ms to stay within a single frame, but this should\n\t // catch it if it does.\n\t if (isRendering) {\n\t frameId = raf(render)\n\t return\n\t } else {\n\t isRendering = true\n\t }\n\n\t // 1. If there isn't a native element rendered for the current mounted element\n\t // then we need to create it from scratch.\n\t // 2. If a new element has been mounted, we should diff them.\n\t // 3. We should update check all child components for changes.\n\t if (!currentNativeElement) {\n\t currentElement = app.element\n\t currentNativeElement = toNative(rootId, '0', currentElement)\n\t if (container.children.length > 0) {\n\t console.info('deku: The container element is not empty. These elements will be removed. Read more: http://cl.ly/b0Sr')\n\t }\n\t if (container === document.body) {\n\t console.warn('deku: Using document.body is allowed but it can cause some issues. Read more: http://cl.ly/b0SC')\n\t }\n\t removeAllChildren(container)\n\t container.appendChild(currentNativeElement)\n\t } else if (currentElement !== app.element) {\n\t currentNativeElement = patch(rootId, currentElement, app.element, currentNativeElement)\n\t currentElement = app.element\n\t updateChildren(rootId)\n\t } else {\n\t updateChildren(rootId)\n\t }\n\n\t // Call mount events on all new entities\n\t flushMountQueue()\n\n\t // Allow rendering again.\n\t isRendering = false\n\n\t }", "function render() {\n\t}", "render() {\n\n // Calculate delta\n if (!this.lastFrameTime) this.lastFrameTime = Date.now()\n this.delta = Math.min(1, (Date.now() - this.lastFrameTime) / 1000)\n this.lastFrameTime = Date.now()\n\n // Check if should be rendering\n if (!this.isRendering)\n return\n\n // Request another frame\n requestAnimationFrame(this.render)\n\n }", "static finishedRenderingComponent() {\n\t\trenderingComponents_.pop();\n\t}", "function render( timestamp )\n\t{\n\t\t\n\t\trequestAnimationFrame( render );\n\t\t\n\t\tcanvas_handler.draw_all( );\n\t\t\n\t}", "_endRender() {\n this._allowRegisterSegment = false;\n }", "function _render() {\n _render = (0, _asyncToGenerator2.default)(\n /*#__PURE__*/\n _regenerator.default.mark(function _callee2(props) {\n return _regenerator.default.wrap(\n function _callee2$(_context2) {\n while (1) {\n switch ((_context2.prev = _context2.next)) {\n case 0:\n if (!props.err) {\n _context2.next = 4;\n break;\n }\n\n _context2.next = 3;\n return renderError(props);\n\n case 3:\n return _context2.abrupt(\"return\");\n\n case 4:\n _context2.prev = 4;\n _context2.next = 7;\n return doRender(props);\n\n case 7:\n _context2.next = 13;\n break;\n\n case 9:\n _context2.prev = 9;\n _context2.t0 = _context2[\"catch\"](4);\n _context2.next = 13;\n return renderError(\n (0, _objectSpread2.default)({}, props, {\n err: _context2.t0,\n })\n );\n\n case 13:\n case \"end\":\n return _context2.stop();\n }\n }\n },\n _callee2,\n this,\n [[4, 9]]\n );\n })\n );\n return _render.apply(this, arguments);\n }", "redraw() {\n this.createBackground();\n this.render();\n }", "cancelRendering() {\n if (this.renderTask) {\n this.renderTask.cancel();\n this.renderTask = null;\n }\n this.resume = null;\n }", "_render(model) {\n\t\tthis._coordinator.newEvent({\n\t\t\tsource: this.constructor.name,\n\t\t\ttype: 'render',\n\t\t\tdata: {\n\t\t\t\toriginX: this._originX,\n\t\t\t\toriginY: this._originY,\n\t\t\t\twidth: this._width,\n\t\t\t\theight: this._height\n\t\t\t}\n\t\t});\n\t}", "rerender() {\n\t\tthis.setState(this.state)\n\t}", "reRender(skipPreRenderRefresh = false) {\n this.refreshFromRerender = true;\n super.reRender(skipPreRenderRefresh);\n this.initDomEvents();\n }", "renderEventInput() {\n eventContainer.innerHTML = \"\";\n eventContainer.innerHTML = eventHtml.makeNewEventHtml();\n }", "function renderCal() {\n $('#calendar').fullCalendar('rerenderEvents');\n }", "function render() {\r\n graphics.clear();\r\n myTexture.draw();\r\n }", "function Render() {\n ClearScreen();\n RenderEnergeticDroplets();\n ResetRenderingConditions();\n}", "function render() {\n window.requestAnimationFrame(render);\n manipulationCanvas.getContext('2d').clearRect(0, 0, manipulationCanvas.width, manipulationCanvas.height); //clears canvas\n triRenderer.render();\n }", "updateRendererState()\r\n {\r\n // update the renderer state object\r\n this.updateRendererStateObject();\r\n \r\n // create a new update id for the render\r\n this.updateRandomUpdateId();\r\n \r\n this.emit(\"rendererStateChanged\", this, this.rendererState);\r\n }", "onRender () {\n\n }", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function render() {\n\n\t\t\t}", "onRender() {\n if ( !this.mRunning )\n return;\n\n if ( SPE_USES_PREVIEW_IMAGE ) {\n document.querySelector( '.spline-preview-image-container' ).style.display = 'none';\n\n SPE_USES_PREVIEW_IMAGE = false;\n }\n\n if ( this.mPlayHandler && !this.mPlayHandler.isEnable ) {\n this.mPlayHandler.activate();\n }\n\n if ( this.mOrbitControls ) {\n this.mOrbitControls.update();\n }\n if ( this.mScene && this.mMainCamera ) {\n this.mRenderer.autoClear = true;\n this.mRenderer.render( this.mScene, this.mMainCamera );\n }\n }", "handleRenderCompletion() {\n this.renderNewChildren = false;\n this.preventUpdate = false;\n this.lastChildIndex = this.childCount;\n if (this.isRenderingNew) {\n this.isRenderingNew = false;\n this.update(null, false, true); // Prevent from triggering an item request to avoid infinite loop of loading.\n } else if (this.contentNode && InfiniteUtils.shouldTriggerItemRequest(InfiniteUtils.getContentData(this.contentNode))) {\n this.triggerItemRequest();\n }\n }", "function viewRenderComplete() {\n $container.trigger(topologyConstants.events.viewRenderComplete, {}); // Private Event\n }", "_notifyRenderer() {\n this.renderer.notify();\n }", "relayout() {\n dispatchSimpleEvent(this, 'relayout', true);\n }", "onBeforeRendering() {}", "render(renderedTemplate) {\n super.render()\n\n // render the template\n render(renderedTemplate, this, {\n eventContext: this\n })\n }", "function render() {\n view.update();\n requestAnimationFrame(render);\n}", "function render() {\n if (gameRunning) {\n world.camera.moveDimensions()\n context.clearRect(0, 0, canvas.width, canvas.height);\n world.render();\n setTimeout(render, renderTimeDelta)\n }\n}", "function _render(scene) {\n renderer.update(scene);\n }", "function render() {\r\n\r\n}", "function render() {\r\n\r\n}", "_invalidate() {\n\t\tif (this._invalidated) {\n\t\t\t// console.log(\"already invalidated\", this, ...arguments);\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.getDomRef() && !this._suppressInvalidation) {\n\t\t\tthis._invalidated = true;\n\t\t\t// console.log(\"INVAL\", this, ...arguments);\n\t\t\tRenderScheduler.renderDeferred(this);\n\t\t}\n\t}", "function renderOnce(){\n drawBoard(size);\n }", "function render(){\n spinCounter = 0;\n gamePlay();\n }", "function UpdateRender() {\n // Set background\n BackContextHandle.fillRect(0, 0, CanvasWidth, CanvasHeight);\n\n // Render\n BackContextHandle.save();\n Render();\n BackContextHandle.restore();\n\n // Swap the backbuffer with the frontbuffer\n var ImageData = BackContextHandle.getImageData(0, 0, CanvasWidth, CanvasHeight);\n ContextHandle.putImageData(ImageData, 0, 0);\n}", "_update() {\n render(this._template(), this.shadowRoot, {eventContext: this});\n }", "function lateRender() {\n\t\tsetTimeout( function() { // IE7 needs this so dimensions are calculated correctly\n\t\t\t\t\tif (!currentView.start && bodyVisible()) { // !currentView.start makes sure this never happens more than once\n\t\t\t\t\t\trenderView();\n\t\t\t\t\t}\n\t\t\t\t}, 0);\n\t}", "function render() {\n\t\trate = (droppedFrames > 0) ?\n\t\t\t((rate+(FPS/(droppedFrames*2)))/2):\n\t\t\t((rate + FPS)/2);\n\t\t\t\n\t\tcycleCounter = (cycleCounter + 1) % FPS;\n\t\tframeCounter = (frameCounter + 1) % 1e15;\n\t\t// just render every N frames to avoid a jarring display\n\t\tdroppedFrames = -1;\n\t\trdCallback();\n\t}", "onRender(scene, time) {}" ]
[ "0.7726372", "0.7672331", "0.7665788", "0.76572526", "0.7655998", "0.76539224", "0.7651107", "0.76429856", "0.76421237", "0.76247567", "0.7623794", "0.6994004", "0.67871696", "0.67314553", "0.67314553", "0.6673593", "0.65053445", "0.65043765", "0.6444167", "0.63916767", "0.6386083", "0.6215451", "0.60745835", "0.6063212", "0.6025815", "0.5983671", "0.59834343", "0.5943105", "0.58774674", "0.58774674", "0.58711886", "0.5855174", "0.5848575", "0.5833751", "0.5825184", "0.5825184", "0.5803323", "0.57938194", "0.57847404", "0.57549715", "0.5753157", "0.5745031", "0.5743764", "0.57243097", "0.5702407", "0.5698554", "0.56926113", "0.565947", "0.5650503", "0.5650503", "0.5606217", "0.55847776", "0.5571784", "0.5564836", "0.55646217", "0.55570143", "0.5551144", "0.5541771", "0.5538538", "0.5515794", "0.5510801", "0.55076826", "0.5506269", "0.54958576", "0.5494323", "0.54930204", "0.5490676", "0.5485293", "0.5483956", "0.5478577", "0.547311", "0.5464079", "0.545132", "0.54415125", "0.5434181", "0.5434181", "0.5434181", "0.5434181", "0.5434181", "0.5425733", "0.5420645", "0.5412628", "0.54028964", "0.53895235", "0.5386448", "0.538495", "0.5381009", "0.53802407", "0.5373726", "0.53733", "0.5364876", "0.5364876", "0.5362733", "0.53625435", "0.53615856", "0.5358409", "0.5353968", "0.53332514", "0.5331306", "0.53254426" ]
0.7652522
6
Compute perpendicular offset line of length rc.
function cornerTangents(x0, y0, x1, y1, r1, rc, cw) { var x01 = x0 - x1, y01 = y0 - y1, lo = (cw ? rc : -rc) / sqrt(x01 * x01 + y01 * y01), ox = lo * y01, oy = -lo * x01, x11 = x0 + ox, y11 = y0 + oy, x10 = x1 + ox, y10 = y1 + oy, x00 = (x11 + x10) / 2, y00 = (y11 + y10) / 2, dx = x10 - x11, dy = y10 - y11, d2 = dx * dx + dy * dy, r = r1 - rc, D = x11 * y10 - x10 * y11, d = (dy < 0 ? -1 : 1) * sqrt(max(0, r * r * d2 - D * D)), cx0 = (D * dy - dx * d) / d2, cy0 = (-D * dx - dy * d) / d2, cx1 = (D * dy + dx * d) / d2, cy1 = (-D * dx + dy * d) / d2, dx0 = cx0 - x00, dy0 = cy0 - y00, dx1 = cx1 - x00, dy1 = cy1 - y00; // Pick the closer of the two intersection points. // TODO Is there a faster way to determine which intersection to use? if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1; return { cx: cx0, cy: cy0, x01: -ox, y01: -oy, x11: cx0 * (r1 / r - 1), y11: cy0 * (r1 / r - 1) }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function drawPerpendicularLine(context, eventData, element, data, color, lineWidth) {\n\n // mid point of long-axis line\n var mid = {\n x: (data.handles.start.x + data.handles.end.x) / 2,\n y: (data.handles.start.y + data.handles.end.y) / 2\n };\n\n // Length of long-axis\n var dx = (data.handles.start.x - data.handles.end.x) * (eventData.image.columnPixelSpacing || 1);\n var dy = (data.handles.start.y - data.handles.end.y) * (eventData.image.rowPixelSpacing || 1);\n var length = Math.sqrt(dx * dx + dy * dy);\n\n var vectorX = (data.handles.start.x - data.handles.end.x) / length;\n var vectorY = (data.handles.start.y - data.handles.end.y) / length;\n\n var perpendicularLineLength = length / 2;\n\n var startX = mid.x + (perpendicularLineLength / 2) * vectorY;\n var startY = mid.y - (perpendicularLineLength / 2) * vectorX;\n var endX = mid.x - (perpendicularLineLength / 2) * vectorY;\n var endY = mid.y + (perpendicularLineLength / 2) * vectorX;\n\n if (data.handles.perpendicularStart.locked) {\n data.handles.perpendicularStart.x = startX;\n data.handles.perpendicularStart.y = startY;\n data.handles.perpendicularEnd.x = endX;\n data.handles.perpendicularEnd.y = endY;\n }\n\n // Draw perpendicular line\n var perpendicularStartCanvas = cornerstone.pixelToCanvas(element, data.handles.perpendicularStart);\n var perpendicularEndCanvas = cornerstone.pixelToCanvas(element, data.handles.perpendicularEnd);\n\n context.beginPath();\n context.strokeStyle = color;\n context.lineWidth = lineWidth;\n context.moveTo(perpendicularStartCanvas.x, perpendicularStartCanvas.y);\n context.lineTo(perpendicularEndCanvas.x, perpendicularEndCanvas.y);\n context.stroke();\n\n }", "perpendicular() {\n\t\tlet x = this.y;\n\t\tlet y = 0 - this.x;\n\t\t\n\t\treturn new Vector(x, y);\n\t}", "function lineLength(x, y, x0, y0){\n return Math.sqrt((x -= x0) * x + (y -= y0) * y);\n}", "getPerpendicularLineFromPoint1() {\n\n var x1 = this.point1.getX();\n var y1 = this.point1.getY();\n var x2 = this.point2.getX();\n var y2 = this.point2.getY();\n\n var nearestAngle = getAngleOfLineBetweenPoints(x1, y1, x2, y2) + 90.0 * Math.PI / 180.0;\n\n var lineLength = GUIDE_LINE_LENGTH / 2.0;\n\n var newX1 = x1 + lineLength * Math.cos(nearestAngle);\n var newY1 = y1 + lineLength * Math.sin(nearestAngle);\n\n var newX2 = x1 - lineLength * Math.cos(nearestAngle);\n var newY2 = y1 - lineLength * Math.sin(nearestAngle);\n\n return new Line2D({x1: newX1, y1: newY1, x2: newX2, y2: newY2});\n }", "offset() {\n if (this.overlap) return this.dot ? 8 : 12;\n return this.dot ? 2 : 4;\n }", "getPerpendicularInfiniteLinePoint2() {\n var x1 = this.point1.getX();\n var y1 = this.point1.getY();\n var x2 = this.point2.getX();\n var y2 = this.point2.getY();\n\n var nearestAngle = getAngleOfLineBetweenPoints(x1, y1, x2, y2) + 90.0 * Math.PI / 180.0;\n\n var lineLength = GUIDE_LINE_LENGTH / 2.0;\n\n var newX1 = x2 + lineLength * Math.cos(nearestAngle);\n var newY1 = y2 + lineLength * Math.sin(nearestAngle);\n\n var newX2 = x2 - lineLength * Math.cos(nearestAngle);\n var newY2 = y2 - lineLength * Math.sin(nearestAngle);\n\n return new Line2D({x1: newX1, y1: newY1, x2: newX2, y2: newY2});\n }", "function line_side(l, p){\n\tvar side = ((l[1].x - l[0].x)*(p.y - l[0].y) - (l[1].y - l[0].y)*(p.x - l[0].x));\n\treturn side ? side < 0 ? -1 : 1 : 0;\n}", "getLineLengthBetweenPoints (x, y, x0, y0){\n return Math.sqrt((x -= x0) * x + (y -= y0) * y);\n }", "function perpendicularBothFixedRight(eventData, data) {\n var longLine = {\n start: {\n x: data.handles.start.x,\n y: data.handles.start.y\n },\n end: {\n x: data.handles.end.x,\n y: data.handles.end.y\n }\n };\n\n var perpendicularLine = {\n start: {\n x: data.handles.perpendicularStart.x,\n y: data.handles.perpendicularStart.y\n },\n end: {\n x: data.handles.perpendicularEnd.x,\n y: data.handles.perpendicularEnd.y\n }\n };\n\n var intersection = cornerstoneMath.lineSegment.intersectLine(longLine, perpendicularLine);\n\n var distanceFromPerpendicularP1 = cornerstoneMath.point.distance(data.handles.perpendicularStart, intersection);\n var distanceFromPerpendicularP2 = cornerstoneMath.point.distance(data.handles.perpendicularEnd, intersection);\n\n var distanceToLineP2 = cornerstoneMath.point.distance(data.handles.start, intersection);\n var newLineLength = cornerstoneMath.point.distance(data.handles.start, eventData.currentPoints.image);\n\n if (newLineLength <= distanceToLineP2) {\n return false;\n }\n\n var dx = (data.handles.start.x - eventData.currentPoints.image.x) / newLineLength;\n var dy = (data.handles.start.y - eventData.currentPoints.image.y) / newLineLength;\n\n var k = distanceToLineP2 / newLineLength;\n\n var newIntersection = {\n x: data.handles.start.x + ((eventData.currentPoints.image.x - data.handles.start.x) * k),\n y: data.handles.start.y + ((eventData.currentPoints.image.y - data.handles.start.y) * k)\n };\n\n data.handles.perpendicularStart.x = newIntersection.x + distanceFromPerpendicularP1 * dy;\n data.handles.perpendicularStart.y = newIntersection.y - distanceFromPerpendicularP1 * dx;\n\n data.handles.perpendicularEnd.x = newIntersection.x - distanceFromPerpendicularP2 * dy;\n data.handles.perpendicularEnd.y = newIntersection.y + distanceFromPerpendicularP2 * dx;\n\n return true;\n\n }", "function distLineToPoint(a, b, p) {\n var n = vectDiff(b, a)\n n = vectScale(n, 1/Math.sqrt(n[0]*n[0]+n[1]*n[1]))\n \n var amp = vectDiff(a, p)\n var d = vectDiff(amp, vectScale(n,(dot(amp, n))))\n //return { d:d, a:amp, nn:n, n:dot(amp,n)}\n return Math.sqrt(d[0]*d[0]+d[1]*d[1])\n}", "function perpendicularRightFixedPoint(eventData, data) {\n var fudgeFactor = 1;\n\n var fixedPoint = data.handles.perpendicularStart;\n var movedPoint = eventData.currentPoints.image;\n\n var distanceFromFixed = cornerstoneMath.lineSegment.distanceToPoint(data.handles, fixedPoint);\n var distanceFromMoved = cornerstoneMath.lineSegment.distanceToPoint(data.handles, movedPoint);\n\n var distanceBetweenPoints = cornerstoneMath.point.distance(fixedPoint, movedPoint);\n\n var total = distanceFromFixed + distanceFromMoved;\n\n if (distanceBetweenPoints <= distanceFromFixed) {\n return false;\n }\n\n var length = cornerstoneMath.point.distance(data.handles.start, data.handles.end);\n var dx = (data.handles.start.x - data.handles.end.x) / length;\n var dy = (data.handles.start.y - data.handles.end.y) / length;\n\n var adjustedLineP1 = {\n x: data.handles.start.x - fudgeFactor * dx,\n y: data.handles.start.y - fudgeFactor * dy\n };\n var adjustedLineP2 = {\n x: data.handles.end.x + fudgeFactor * dx,\n y: data.handles.end.y + fudgeFactor * dy\n };\n\n data.handles.perpendicularStart.x = movedPoint.x + total * dy;\n data.handles.perpendicularStart.y = movedPoint.y - total * dx;\n data.handles.perpendicularEnd.x = movedPoint.x;\n data.handles.perpendicularEnd.y = movedPoint.y;\n\n var longLine = {\n start: {\n x: data.handles.start.x,\n y: data.handles.start.y\n },\n end: {\n x: data.handles.end.x,\n y: data.handles.end.y\n }\n };\n\n var perpendicularLine = {\n start: {\n x: data.handles.perpendicularStart.x,\n y: data.handles.perpendicularStart.y\n },\n end: {\n x: data.handles.perpendicularEnd.x,\n y: data.handles.perpendicularEnd.y\n }\n };\n\n var intersection = cornerstoneMath.lineSegment.intersectLine(longLine, perpendicularLine);\n if (!intersection) {\n if (cornerstoneMath.point.distance(movedPoint, data.handles.start) > cornerstoneMath.point.distance(movedPoint, data.handles.end)) {\n data.handles.perpendicularEnd.x = adjustedLineP2.x - distanceFromMoved * dy;\n data.handles.perpendicularEnd.y = adjustedLineP2.y + distanceFromMoved * dx;\n data.handles.perpendicularStart.x = data.handles.perpendicularEnd.x + total * dy;\n data.handles.perpendicularStart.y = data.handles.perpendicularEnd.y - total * dx;\n\n return true;\n\n } else {\n data.handles.perpendicularEnd.x = adjustedLineP1.x - distanceFromMoved * dy;\n data.handles.perpendicularEnd.y = adjustedLineP1.y + distanceFromMoved * dx;\n data.handles.perpendicularStart.x = data.handles.perpendicularEnd.x + total * dy;\n data.handles.perpendicularStart.y = data.handles.perpendicularEnd.y - total * dx;\n\n return true;\n }\n\n }\n\n return true;\n }", "function perpendicularBothFixedLeft(eventData, data) {\n var longLine = {\n start: {\n x: data.handles.start.x,\n y: data.handles.start.y\n },\n end: {\n x: data.handles.end.x,\n y: data.handles.end.y\n }\n };\n\n var perpendicularLine = {\n start: {\n x: data.handles.perpendicularStart.x,\n y: data.handles.perpendicularStart.y\n },\n end: {\n x: data.handles.perpendicularEnd.x,\n y: data.handles.perpendicularEnd.y\n }\n };\n\n var intersection = cornerstoneMath.lineSegment.intersectLine(longLine, perpendicularLine);\n\n var distanceFromPerpendicularP1 = cornerstoneMath.point.distance(data.handles.perpendicularStart, intersection);\n var distanceFromPerpendicularP2 = cornerstoneMath.point.distance(data.handles.perpendicularEnd, intersection);\n\n var distanceToLineP2 = cornerstoneMath.point.distance(data.handles.end, intersection);\n var newLineLength = cornerstoneMath.point.distance(data.handles.end, eventData.currentPoints.image);\n\n if (newLineLength <= distanceToLineP2) {\n return false;\n }\n\n var dx = (data.handles.end.x - eventData.currentPoints.image.x) / newLineLength;\n var dy = (data.handles.end.y - eventData.currentPoints.image.y) / newLineLength;\n\n var k = distanceToLineP2 / newLineLength;\n\n var newIntersection = {\n x: data.handles.end.x + ((eventData.currentPoints.image.x - data.handles.end.x) * k),\n y: data.handles.end.y + ((eventData.currentPoints.image.y - data.handles.end.y) * k)\n };\n\n data.handles.perpendicularStart.x = newIntersection.x - distanceFromPerpendicularP1 * dy;\n data.handles.perpendicularStart.y = newIntersection.y + distanceFromPerpendicularP1 * dx;\n\n data.handles.perpendicularEnd.x = newIntersection.x + distanceFromPerpendicularP2 * dy;\n data.handles.perpendicularEnd.y = newIntersection.y - distanceFromPerpendicularP2 * dx;\n\n return true;\n\n }", "function d3_v3_svg_lineSlope(p0, p1) {\n return (p1[1] - p0[1]) / (p1[0] - p0[0]);\n}", "function d4_svg_lineSlope(p0, p1) {\n return (p1[1] - p0[1]) / (p1[0] - p0[0]);\n}", "function d3_svg_lineSlope(p0, p1) {\n return (p1[1] - p0[1]) / (p1[0] - p0[0]);\n}", "function d3_svg_lineSlope(p0, p1) {\n return (p1[1] - p0[1]) / (p1[0] - p0[0]);\n}", "function d3_svg_lineSlope(p0, p1) {\n return (p1[1] - p0[1]) / (p1[0] - p0[0]);\n}", "function getLinePoints(p1,p2)\n{\n\tvar slope;\n var begin;\n var end;\n var original;\n \n var horiz = Math.abs(p1[0]-p2[0]) > Math.abs(p1[1]-p2[1]); //Find pixel increment direction\n \n //Get start x,y and ending y\n if(horiz) //if pixel increment is left to right\n {\n if(p1[0]<p2[0]){begin=p1[0];end=p2[0];original=p1[1];}\n else {begin=p2[0];end=p1[0];original=p2[1];}\n slope = (p1[1]-p2[1])/(p1[0]-p2[0]);\n\n }\n else\n {\n if(p1[1]<p2[1]){begin=p1[1];end=p2[1];original=p1[0];}\n else {begin=p2[1];end=p1[1];original=p2[0];}\n slope = (p1[0]-p2[0])/(p1[1]-p2[1]);\n }\n var nps = [];\n\tvar state = begin + 1;\n //(yn-yo)/(xn-xo)=slope\n // yn = slope*(xn-xo)+yo\n while(state<end)\n\t{\n\t if(horiz)nps.push([state,Math.round((state-begin)*slope+original)])\n else nps.push([Math.round((state-begin)*slope+original),state])\n\t state+= 1;\n\t}\n\treturn nps;\n \n}", "function vertical_line_line(line, x) {\n const px = line.p[0], py = line.p[1];\n const ux = line.u[0], uy = line.u[1];\n return vec2.fromValues(x, py + uy * (x - px) / ux);\n}", "function pointLineDistance(p, lstart, lend, overLine) {\n\tvar points = normalizeArguments(\"pppb\", arguments);\n\tvar x = points[0].x;\n\tvar y = points[0].y;\n\tvar x0 = points[1].x;\n\tvar y0 = points[1].y;\n\tvar x1 = points[2].x;\n\tvar y1 = points[2].y;\n\tvar o = points[3];\n\tif(o && !(o = function(x, y, x0, y0, x1, y1) {\n\t\tif(!(x1 - x0)) return {x: x0, y: y};\n\t\telse if(!(y1 - y0)) return {x: x, y: y0};\n\t\tvar left, tg = -1 / ((y1 - y0) / (x1 - x0));\n\t\treturn {x: left = (x1 * (x * tg - y + y0) + x0 * (x * - tg + y - y1)) / (tg * (x1 - x0) + y0 - y1), y: tg * left - tg * x + y};\n\t}(x, y, x0, y0, x1, y1), o.x >= Math.min(x0, x1) && o.x <= Math.max(x0, x1) && o.y >= Math.min(y0, y1) && o.y <= Math.max(y0, y1))) {\n\t\tvar l1 = lineLength(x, y, x0, y0), l2 = lineLength(x, y, x1, y1);\n\t\treturn l1 > l2 ? l2 : l1;\n\t}\n\telse {\n\t\tvar a = y0 - y1, b = x1 - x0, c = x0 * y1 - y0 * x1;\n\t\treturn Math.abs(a * x + b * y + c) / Math.sqrt(a * a + b * b);\n\t}\n}", "function orient2d(pa, pb, pc) {\n var detleft = (pa.x - pc.x) * (pb.y - pc.y);\n var detright = (pa.y - pc.y) * (pb.x - pc.x);\n var val = detleft - detright;\n if (val > -(EPSILON) && val < (EPSILON)) {\n return Orientation.COLLINEAR;\n } else if (val > 0) {\n return Orientation.CCW;\n } else {\n return Orientation.CW;\n }\n }", "function perpendicularLeftFixedPoint(eventData, data) {\n var fudgeFactor = 1;\n\n var fixedPoint = data.handles.perpendicularEnd;\n var movedPoint = eventData.currentPoints.image;\n\n var distanceFromFixed = cornerstoneMath.lineSegment.distanceToPoint(data.handles, fixedPoint);\n var distanceFromMoved = cornerstoneMath.lineSegment.distanceToPoint(data.handles, movedPoint);\n\n var distanceBetweenPoints = cornerstoneMath.point.distance(fixedPoint, movedPoint);\n\n var total = distanceFromFixed + distanceFromMoved;\n\n if (distanceBetweenPoints <= distanceFromFixed) {\n return false;\n }\n\n var length = cornerstoneMath.point.distance(data.handles.start, data.handles.end);\n var dx = (data.handles.start.x - data.handles.end.x) / length;\n var dy = (data.handles.start.y - data.handles.end.y) / length;\n\n var adjustedLineP1 = {\n x: data.handles.start.x - fudgeFactor * dx,\n y: data.handles.start.y - fudgeFactor * dy\n };\n var adjustedLineP2 = {\n x: data.handles.end.x + fudgeFactor * dx,\n y: data.handles.end.y + fudgeFactor * dy\n };\n\n data.handles.perpendicularStart.x = movedPoint.x;\n data.handles.perpendicularStart.y = movedPoint.y;\n data.handles.perpendicularEnd.x = movedPoint.x - total * dy;\n data.handles.perpendicularEnd.y = movedPoint.y + total * dx;\n\n var longLine = {\n start: {\n x: data.handles.start.x,\n y: data.handles.start.y\n },\n end: {\n x: data.handles.end.x,\n y: data.handles.end.y\n }\n };\n\n var perpendicularLine = {\n start: {\n x: data.handles.perpendicularStart.x,\n y: data.handles.perpendicularStart.y\n },\n end: {\n x: data.handles.perpendicularEnd.x,\n y: data.handles.perpendicularEnd.y\n }\n };\n\n var intersection = cornerstoneMath.lineSegment.intersectLine(longLine, perpendicularLine);\n if (!intersection) {\n if (cornerstoneMath.point.distance(movedPoint, data.handles.start) > cornerstoneMath.point.distance(movedPoint, data.handles.end)) {\n data.handles.perpendicularStart.x = adjustedLineP2.x + distanceFromMoved * dy;\n data.handles.perpendicularStart.y = adjustedLineP2.y - distanceFromMoved * dx;\n data.handles.perpendicularEnd.x = data.handles.perpendicularStart.x - total * dy;\n data.handles.perpendicularEnd.y = data.handles.perpendicularStart.y + total * dx;\n\n return true;\n\n } else {\n data.handles.perpendicularStart.x = adjustedLineP1.x + distanceFromMoved * dy;\n data.handles.perpendicularStart.y = adjustedLineP1.y - distanceFromMoved * dx;\n data.handles.perpendicularEnd.x = data.handles.perpendicularStart.x - total * dy;\n data.handles.perpendicularEnd.y = data.handles.perpendicularStart.y + total * dx;\n\n return true;\n }\n\n }\n\n return true;\n }", "function pt(r, a) {\n return [r * Math.cos(a) + cx, cy - r * Math.sin(a)];\n }", "function PolylineOffsetIntersection(v1, v2, v3, distanceOffset) {\n\n\tlet bisectorVector = BisectorVector(\n\t\tv1,\n\t\tv2,\n\t\tv3\n\t\t);\n\n\tlet angle = radiansBetweenThreePoints(\n\t\tv1,\n\t\tv2,\n\t\tv3\n\t\t) / 2;\n\n\n\tlet distanceBisector = v2.distanceTo(bisectorVector);\n\tlet distanceIntersection = distanceOffset / Math.sin(angle);\n\tlet scaleFactor = distanceIntersection / distanceBisector;\n\n\n\tlet intersection = ScaledVector3FromStartPoint(bisectorVector, v2, scaleFactor);\n\n\treturn intersection ;\n}", "function lineDist(toPt, pt1, pt2) {\n var num = Math.abs((pt2.y - pt1.y) * toPt.x - (pt2.x - pt1.x) * toPt.y + pt2.x * pt1.y - pt2.y * pt1.x)\n var denom = Math.sqrt(Math.pow(pt2.y - pt1.y, 2) + Math.pow(pt2.x - pt1.x, 2))\n return num / denom;\n}", "function get_line_y(c) {\n\treturn 94 + c * 75;\n}", "function projectPointToLine (p, a, ab) {\n var ap = [ p[0]-a[0], p[1]-a[1] ];\n var k = dot(ap,ab)/dot(ab,ab);\n return [\n a[0] + k * ab[0],\n a[1] + k * ab[1]\n ];\n }", "function perpDistance2(xab, yab, llab, xac, yac) {\n var fcAB = xac * xab + yac * yab;\n if (fcAB < 0) {\n // point c is closer to point a\n return xac * xac + yac * yac;\n } else if (fcAB > llab) {\n // point c is closer to point b\n var xbc = xac - xab;\n var ybc = yac - yab;\n return xbc * xbc + ybc * ybc;\n } else {\n // perpendicular distance is the shortest\n var crossProduct = xac * yab - yac * xab;\n return crossProduct * crossProduct / llab;\n }\n}", "function computeLineLength( x1, y1, x2, y2 ) {\n let xdiff = subtract( x2, x1 );\n let ydiff = subtract( y2, y1 );\n let total = add( square( xdiff ), square( ydiff ) );\n return Math.sqrt( total );\n}", "static DistanceToPolyLine() {}", "function pt(r, a) {\n return [r * Math.cos(a) + cx, cy - r * Math.sin(a)];\n }", "getLineLengthForAngle(angle) {\n // set some constants\n const x = this.state.player.playerXpos;\n const y = this.state.player.playerYpos;\n const gridSize = this.state.grid.gridSize;\n const map = this.state.mapData[0];\n const radiansConversion = PI / 180;\n const debug = this.state.debug;\n\n // set some variables\n let xShift, yShift;\n let newx = x;\n let newy = y;\n\n // calculate line length until first wall segment for shifts on the x axis\n\n let lineLengthForXAxis = 0;\n\n // set initial map indices\n let tileX = parseInt(x / gridSize);\n let tileY = parseInt(y / gridSize);\n\n let tempx = x;\n let tempy = y;\n\n while (tileX > 0 && tileY >= 0 && tileX < map[0].length && tileY < map.length) {\n\n if (map[tileY][tileX] != '1') {\n\n if (angle > 0 && angle <= 90) {\n newx > gridSize ? xShift = gridSize - (newx % gridSize) : xShift = gridSize - newx;\n if (xShift == 0) { xShift = gridSize }\n newy = tempy + (xShift * (Math.tan(angle * radiansConversion)));\n newx = tempx + xShift + 0.1; // going right, subtract 0.1\n }\n if (angle > 90 && angle <= 180) {\n newx < gridSize ? xShift = newx : xShift = (newx % gridSize);\n if (xShift == 0) { xShift = gridSize }\n newy = tempy + (xShift / (Math.tan((angle + 270) * radiansConversion)));\n newx = tempx - xShift - 0.1; // going left, add 0.1\n }\n if (angle > 180 && angle <= 270) {\n newx < gridSize ? xShift = newx : xShift = (newx % gridSize);\n if (xShift == 0) { xShift = gridSize }\n\n newy = tempy - (xShift * (Math.tan((angle + 180) * radiansConversion)));\n newx = tempx - xShift - 0.1; // going left, subtract 0.1\n }\n if (angle > 270 && angle < 360) {\n newx > gridSize ? xShift = gridSize - (newx % gridSize) : xShift = gridSize - newx;\n if (xShift == 0) { xShift = gridSize }\n newy = tempy - (xShift / (Math.tan((angle + 90) * radiansConversion)));\n newx = tempx + xShift + 0.1; // going right, add 0.1\n }\n\n // set new map indices\n tileX = parseInt(newx / gridSize);\n tileY = parseInt(newy / gridSize);\n\n // before adding to the lineLength, break if out of bounds on x axis\n if (newx <= 0 || newx >= map[0].length * gridSize) {\n break;\n }\n\n lineLengthForXAxis = this.getLineLengthBetweenPoints(x, y, newx, newy);\n\n // if out of bounds on y axis, break\n if (newy <= 0 || newy >= map.length * gridSize) {\n break;\n }\n\n tempx = newx;\n tempy = newy;\n\n } else {\n break; // encountered wall segment\n }\n\n if (debug) { this.drawDebugIndicationMarker(newx, newy, 'green') }\n\n }\n\n if (debug) { console.log('x (green) = ' + lineLengthForXAxis) }\n\n // calculate line length until first wall segment for shifts on the y axis\n\n let lineLengthForYAxis = 0;\n\n // reset some reused values\n tileX = parseInt(x / gridSize);\n tileY = parseInt(y / gridSize);\n tempx = x;\n tempy = y;\n newx = x;\n newy = y;\n xShift = 0;\n yShift = 0;\n\n while (tileX > 0 && tileY >= 0 && tileX < map[0].length && tileY < map.length) {\n\n if (map[tileY][tileX] != '1'){\n\n if (angle > 0 && angle <= 90) {\n newy > gridSize ? yShift = gridSize - (newy % gridSize) : yShift = gridSize - newy;\n if (yShift == 0) { yShift = gridSize }\n newx = tempx + (yShift / (Math.tan(angle * radiansConversion)));\n newy = tempy + yShift + 0.1; // going right, add 0.1\n }\n if (angle > 90 && angle <= 180) {\n newy < gridSize ? yShift = gridSize - newy : yShift = gridSize - (newy % gridSize);\n if (yShift == 0) { yShift = gridSize }\n newx = tempx - (yShift * (Math.tan((angle + 270) * radiansConversion)));\n newy = tempy + yShift + 0.1; // going right, add 0.1\n }\n if (angle > 180 && angle <= 270) {\n newy < gridSize ? yShift = newy : yShift = (newy % gridSize);\n if (yShift == 0) { yShift = gridSize }\n newx = tempx - (yShift / (Math.tan((angle + 180) * radiansConversion)));\n newy = tempy - yShift - 0.1; // going left, subtract 0.1\n }\n if (angle > 270 && angle < 360) {\n newy > gridSize ? yShift = (newy % gridSize): yShift = newy;\n if (yShift == 0) { yShift = gridSize }\n newx = tempx + (yShift * (Math.tan((angle + 90) * radiansConversion)));\n newy = tempy - yShift - 0.1; // going left, subtract 0.1;\n }\n\n // set new map indices\n tileX = parseInt(newx / gridSize);\n tileY = parseInt(newy / gridSize);\n\n // before adding to the lineLength, break if out of bounds on y axis\n if (newy <= 0 || newy >= map.length * gridSize){\n break;\n }\n\n lineLengthForYAxis = this.getLineLengthBetweenPoints(x, y, newx, newy);\n\n // if out of bounds on x axis, break\n if (newx <= 0 || newx >= map[0].length * gridSize){\n break;\n }\n\n tempx = newx;\n tempy = newy;\n\n } else {\n break; // encountered wall segment\n }\n\n if (debug) { this.drawDebugIndicationMarker(newx, newy, 'red') }\n\n }\n\n if (debug) { console.log('y (red) = ' + lineLengthForYAxis) }\n\n // calculate the definitive shortest route to nearest wall\n let shortestRoute = lineLengthForXAxis <= lineLengthForYAxis ? lineLengthForXAxis : lineLengthForYAxis;\n\n if (debug) { console.log('shortest route is '+shortestRoute+' pixels') }\n\n // return shortest length\n return shortestRoute;\n }", "function ic_angle(img, px, py) {\n var u_max = new Int32Array([15, 15, 15, 15, 14, 14, 14, 13, 13, 12, 11, 10, 9, 8, 6, 3, 0]);\n var half_k = 15; // half patch size\n var m_01 = 0, m_10 = 0;\n var src = img.data, step = img.cols;\n var u = 0, v = 0, center_off = (py * step + px) | 0;\n var v_sum = 0, d = 0, val_plus = 0, val_minus = 0;\n\n // Treat the center line differently, v=0\n for (u = -half_k; u <= half_k; ++u)\n m_10 += u * src[center_off + u];\n\n // Go line by line in the circular patch\n for (v = 1; v <= half_k; ++v) {\n // Proceed over the two lines\n v_sum = 0;\n d = u_max[v];\n for (u = -d; u <= d; ++u) {\n val_plus = src[center_off + u + v * step];\n val_minus = src[center_off + u - v * step];\n v_sum += (val_plus - val_minus);\n m_10 += u * (val_plus + val_minus);\n }\n m_01 += v * v_sum;\n }\n\n return Math.atan2(m_01, m_10);\n}", "function getLineVertices(c1,c2,r_dots,r_lines){\n \n var lat = new Array();\n var lon = new Array();\n \n var midp_num = 4;\n var midp_count = Math.pow(2,midp_count);\n \n lat[0] = (c1[0]).toRad();\n lon[0] = (c1[1]).toRad();\n var dcoor1 = findDotPosition(lat[0],lon[0],r_dots);\n \n lat[1] = (c2[0]).toRad();\n lon[1] = (c2[1]).toRad();\n var dcoor2 = findDotPosition(lat[1],lon[1],r_dots);\n\n var linePoints = new Array();\n \n linePoints[0] = dcoor1;\n linePoints[1] = dcoor2;\n \n lat[Math.pow(2,midp_num+1)] = lat[1];\n lon[Math.pow(2,midp_num+1)] = lon[1];\n linePoints[Math.pow(2,midp_num+1)] = linePoints[1];\n \n linePoints[1] = undefined;\n \n for (i=midp_num;i>-1;i--){\n var step = Math.pow(2,i);\n for (j=0;j<linePoints.length;j+=step){\n if(linePoints[j] == undefined){\n lat[j] = findMidpoint(lat[j-step],lat[j+step],lon[j-step],lon[j+step])[0];\n lon[j] = findMidpoint(lat[j-step],lat[j+step],lon[j-step],lon[j+step])[1];\n linePoints[j] = findDotPosition(lat[j],lon[j],r_lines);\n }\n }\n }\n \n return linePoints;\n}", "function arbitraryPerpendicularVector(vec){\n var res = vec.clone().cross(CONST.e1);\n if(res.equals(CONST.zerovec) == false){\n return res;\n }\n return vec.clone().cross(CONST.e2);\n}", "function reconstructLineWidth(inBuffer, startIndex) {\n const xd = inBuffer[startIndex * 2 + 3] - inBuffer[startIndex * 2];\n const yd = inBuffer[startIndex * 2 + 3 + 1] - inBuffer[startIndex * 2 + 1];\n const zd = inBuffer[startIndex * 2 + 3 + 2] - inBuffer[startIndex * 2 + 2];\n return Math.sqrt(xd * xd + yd * yd + zd * zd) * 0.5;\n}", "getTranslationPointsForAngle(x, y, a, length) {\n let radians = a * (PI / 180);\n let x2 = x + length * Math.cos(radians);\n let y2 = y + length * Math.sin(radians);\n return [x2, y2];\n }", "function getLineLength(x1, y1, x2, y2) {\n var res = Math.sqrt(Math.pow((x2 - x1), 2) + Math.pow((y2 - y1), 2));\n return res;\n}", "function texPrism_line_dist(vparas) {\n var layrs = vparas.layars || 3;\n return { fragmentShader: `\n #define WEIGHT 0.4\n\n uniform sampler2D u_tex;\n\n varying vec2 vUv;\n varying vec3 P;\n varying vec3 P0;\n varying vec3 P1;\n varying vec3 P2;\n varying vec3 P3;\n varying vec4 cent[${layrs}];\n\n // https://math.stackexchange.com/questions/2213165/find-shortest-distance-between-lines-in-3d\n // 𝐧 = 𝐞1 × 𝐞2 = (−20, −11, −26)\n // rasterize functions\n float line(vec3 e, vec3 P, vec3 p0, vec3 p1, float w) {\n vec3 e2 = p1 - p0;\n vec3 e1 = P - e;\n vec3 n = normalize(cross(e1, e2));\n float dist = dot(n, e - p0);\n dist = 1.0/dist * WEIGHT * w;\n // return min(dist * dist, 1.0);\n return abs(dist);\n }\n\n vec4 mainImage( in vec2 fragCoord ) {\n float line_width = 0.4;\n float col = line(cameraPosition, P, P0, P1, line_width);\n col += line(cameraPosition, P, P2, P3, line_width);\n return vec4(col);\n }\n\n void main() {\n gl_FragColor += mainImage(gl_FragCoord.xy);\n gl_FragColor.g += 0.7;\n gl_FragColor.a += 0.2;\n }`,\n\n vertexShader: `\n uniform vec3 wpos;\n uniform vec3 offsets[${layrs}];\n uniform vec3 orbScale;\n\n attribute vec3 a_tan;\n attribute vec3 a_pos;\n\n varying vec2 vUv;\n varying vec3 P;\n varying vec3 P0;\n varying vec3 P1;\n varying vec3 P2;\n varying vec3 P3;\n varying vec3 vscale;\n varying vec4 cent[${layrs}];\n\n void main() {\n // vUv = uv;\n\n // gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n vec4 worldPosition = modelMatrix * vec4(position, 1.0);\n\n P = worldPosition.xyz;\n vscale = orbScale;\n for (int i = 0; i < ${layrs}; i++){\n // cent[i] = modelMatrix * vec4(wpos + offsets[i], 1.);\n cent[i] = worldPosition;\n }\n\n gl_Position = projectionMatrix * viewMatrix * worldPosition;\n\n vec4 v4 = modelMatrix * vec4( vec3(-150., 0., -50.), 1.0 );\n P0 = v4.xyz;\n v4 = modelMatrix * vec4( vec3(150., 0., -50.), 1.0 );\n P1 = v4.xyz;\n\n v4 = modelMatrix * vec4( vec3(0., 150., 50.), 1.0 );\n P2 = v4.xyz;\n v4 = modelMatrix * vec4( vec3(0., -150., 50.), 1.0 );\n P3 = v4.xyz;\n\n v4 = projectionMatrix * modelViewMatrix * vec4(uv.s, uv.t, 0., 1.0);\n vUv = v4.xy; // / v4.z;\n } `\n }\n}", "function lineMidpoint(line){\n return [(line[0][0] + line[1][0]) / 2, (line[0][1] + line[1][1]) / 2];\n }", "function perp( v ) {\n let theta = -90 * Math.PI / 180;\n let cs = Math.cos(theta);\n let sn = Math.sin(theta);\n return {\n x: v.x * cs - v.y * sn,\n y: v.x * sn + v.y * cs,\n }\n}", "function lineLength(line){\n return Math.sqrt(Math.pow(line[1][0] - line[0][0], 2) + Math.pow(line[1][1] - line[0][1], 2));\n }", "calculateOffset(offset) {\n\n // Note: vec3 has the same alignment as vec4\n let alignment = this.byteSize <= 8 ? this.byteSize : 16;\n\n // arrays have vec4 alignments\n if (this.count)\n alignment = 16;\n\n // align the start offset\n offset = math.roundUp(offset, alignment);\n this.offset = offset / 4;\n }", "getYForLine(line) {\n const options = this.options;\n const spacing = options.spacing_between_lines_px;\n const headroom = options.space_above_staff_ln;\n\n const y = this.y + (line * spacing) + (headroom * spacing);\n\n return y;\n }", "function invLerp(line, point) {\n var t = vec2.create();\n vec2.sub(t, point, line.ends[0]);\n return vec2.dot(t, line.vec) / line.len_2;\n}", "function drawSlopeLabel() {\n let label = document.getElementById(\"slopeLabel\");\n // display when points are pinned. do not redraw if nothing changed\n if (pt1.pinned && pt2.pinned && m != label.innerHTML.substring(2)\n && isFinite(m) && m != 0 && !riseRunDisplay) {\n // find midpoint of line, put the label there\n midpoint = calcMidpoint(pt1.x, pt1.y, pt2.x, pt2.y);\n screenPos = planeCoordToAbsScreenPosition(midpoint.x, midpoint.y, 0, 0);\n label.hidden = false;\n label.innerHTML = \"m=\" + m.toFixed(2);\n label.style.left = screenPos.x + \"px\";\n label.style.top = screenPos.y + \"px\";\n }\n}", "get sweepRadians() { return this._radians1 - this._radians0; }", "function getY(p, x, sweeplineY) {\n var dp = 2 * (p[1] - sweeplineY);\n var b1 = -2 * p[0] / dp;\n var c1 = sweeplineY + dp / 4 + p[0] * p[0] / dp;\n return x * x / dp + b1 * x + c1;\n }", "function perp2d(v, clockwise) {\n clockwise = clockwise || false;\n if (clockwise)\n return vec2.fromValues(v[1], -v[0]);\n return vec2.fromValues(-v[1], v[0]);\n}", "function perpDistance2(xab, yab, l2_ab, xac, yac) {\n var fc_ab = (xac * xab + yac * yab);\n if(fc_ab < 0) {\n // point c is closer to point a\n return xac * xac + yac * yac;\n }\n else if(fc_ab > l2_ab) {\n // point c is closer to point b\n var xbc = xac - xab;\n var ybc = yac - yab;\n return xbc * xbc + ybc * ybc;\n }\n else {\n // perpendicular distance is the shortest\n var crossProduct = xac * yab - yac * xab;\n return crossProduct * crossProduct / l2_ab;\n }\n}", "function perpDistance2(xab, yab, l2_ab, xac, yac) {\n var fc_ab = (xac * xab + yac * yab);\n if(fc_ab < 0) {\n // point c is closer to point a\n return xac * xac + yac * yac;\n }\n else if(fc_ab > l2_ab) {\n // point c is closer to point b\n var xbc = xac - xab;\n var ybc = yac - yab;\n return xbc * xbc + ybc * ybc;\n }\n else {\n // perpendicular distance is the shortest\n var crossProduct = xac * yab - yac * xab;\n return crossProduct * crossProduct / l2_ab;\n }\n}", "function reconstructLine(inBuffer, startOffset) {\n const outBuffer = new Float32Array(inBuffer.length / 2);\n for (let i = startOffset * 3, i2 = i * 2; i < outBuffer.length; i += 3, i2 += 6) {\n outBuffer[i] = inBuffer[i2] + (inBuffer[i2 + 3] - inBuffer[i2]) * 0.5;\n outBuffer[i + 1] = inBuffer[i2 + 1] + (inBuffer[i2 + 3 + 1] - inBuffer[i2 + 1]) * 0.5;\n outBuffer[i + 2] = inBuffer[i2 + 2] + (inBuffer[i2 + 3 + 2] - inBuffer[i2 + 2]) * 0.5;\n }\n return outBuffer;\n}", "get length() {\n return Math.sqrt(Math.pow(this.x, 2) + Math.pow(this.y, 2));\n }", "calcLineAngle(BC: number, AB: number, nextMark: number, currentMark: number) {\n let angleA = Math.fround(Math.asin(BC / AB) * 180 / Math.PI);\n if (nextMark > currentMark) angleA = -angleA;\n return angleA;\n }", "getOffset(player) {\n\n return (function(viewport, player, map) {\n\n const basePlayerOffsetY = player.baseOffsetY;\n\n const playerOffcenterLeft = Math.min(0, player.x - viewport.width/2),\n playerOffcenterRight = Math.max( 0, (player.x + viewport.width/2) - map.width),\n playerOffcenterX = playerOffcenterLeft + playerOffcenterRight;\n\n const playerOffcenterTop = Math.min(0 + basePlayerOffsetY, player.y - viewport.height/2 + basePlayerOffsetY),\n playerOffcenterBottom = Math.max(0, (player.y + viewport.height/2 - basePlayerOffsetY) - map.height),\n playerOffcenterY = playerOffcenterTop + playerOffcenterBottom //+ basePlayerOffsetY;\n\n // console.log(\n // playerOffcenterY / 70\n // );\n // //console.log(((player.y - viewport.height/2) - playerOffcenterY) / 70)\n // throw new Error();\n\n return {\n map: {\n x: (player.x - viewport.width/2) - playerOffcenterX,\n y: (player.y - viewport.height/2) - playerOffcenterY\n },\n player: {\n x: viewport.width/2 + playerOffcenterX,\n y: viewport.height/2 + playerOffcenterY\n }\n };\n\n })(\n {width: this.viewport.width.px, height: this.viewport.height.px},\n {x: player.position.x, y: player.position.y, baseOffsetY: this.basePlayerOffsetY},\n {width: this.width.px, height: this.height.px}\n );\n\n }", "function linePos(area) { return lineBefore(area).length; }", "function getLines(l, r){\n var lines = {\n left: [],\n right: []\n };\n // 3 cases: 1 l divides r, r divides l, neither divide\n var t1 = intersectsTarget(l, r);\n var t2 = intersectsTarget(r, l);\n if (t1 && t2) {\n console.error(\"Error invalid input data\");\n return {left:[], right:[]};\n }\n var v0lp = vec3(l.vectors[0][0] + l.p[0], l.vectors[0][1] + l.p[1], 0);\n var v1lp = vec3(l.vectors[1][0] + l.p[0], l.vectors[1][1] + l.p[1], 0);\n\n var v0rp = vec3(r.vectors[0][0] + r.p[0], r.vectors[0][1] + r.p[1], 0);\n var v1rp = vec3(r.vectors[1][0] + r.p[0], r.vectors[1][1] + r.p[1], 0);\n\n if (!t1 && !t2) { // neither divide\n // all combinations possible 11, 10, 01, 00\n if (dividesRightOfLine(l.y1, l.y0, r.y1, r.y0)) {\n lines.left.push(new Line(l.p, v1lp));\n } else {\n lines.left.push(new Line(l.p, v0lp));\n }\n\n if (dividesRightOfLine(r.y1, r.y0, l.y1, l.y0)) {\n lines.right.push(new Line (r.p, v1rp));\n } else {\n lines.right.push(new Line (r.p, v0rp));\n }\n\n } else if (t1) {\n lines.left.push(new Line(l.p, v1lp));\n lines.left.push(new Line(l.p, v0lp));\n if (dividesRightOfLine(r.y1, r.y0, l.y1, l.y0)) {\n lines.right.push(new Line (r.p, v1rp));\n } else {\n lines.right.push(new Line (r.p, v0rp));\n }\n } else { // r intersects l\n lines.right.push(new Line (r.p, v1rp));\n lines.right.push(new Line (r.p, v0rp));\n if (dividesRightOfLine(l.y1, l.y0, r.y1, r.y0)) {\n lines.left.push(new Line(l.p, v1lp));\n } else {\n lines.left.push(new Line(l.p, v0lp));\n }\n }\n return lines;\n}", "function translateAlong(path) {\n var l = path.getTotalLength();\n\n console.log(l);\n\n return function(d, i, a) {\n return function(t) {\n var p = path.getPointAtLength(t * l);\n return \"translate(\" + p.x + \",\" + p.y + \")\";\n };\n };\n }", "function circleLineIntersection(cc, r, p1, p2) {\n var x1 = p1[0],\n y1 = p1[1],\n x2 = p2[0],\n y2 = p2[1],\n xc = cc[0],\n yc = cc[1],\n a = (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1),\n b = 2 * ((x2 - x1) * (x1 - xc) + (y2 - y1) * (y1 - yc)),\n c =\n xc * xc + yc * yc + x1 * x1 + y1 * y1 - 2 * (xc * x1 + yc * y1) - r * r,\n d = b * b - 4 * a * c,\n u1 = 0,\n u2 = 0,\n x = 0,\n y = 0;\n if (a === 0) {\n return [0, [0, 0]];\n } else if (d < 0) {\n return [0, [0, 0]];\n }\n u1 = (-b + sqrt(d)) / (2 * a);\n u2 = (-b - sqrt(d)) / (2 * a);\n if (0 <= u1 && u1 <= 1) {\n x = x1 + u1 * (x2 - x1);\n y = y1 + u1 * (y2 - y1);\n return [1, [x, y]];\n } else if (0 <= u2 && u2 <= 1) {\n x = x1 + u2 * (x2 - x1);\n y = y1 + u2 * (y2 - y1);\n return [1, [x, y]];\n } else {\n return [0, [0, 0]];\n }\n }", "function getBevelVec(inPt, inPrev, inNext) {\n // computes for inPt the corresponding point inPt' on a new contour\n // shifted by 1 unit (length of normalized vector) to the left\n // if we walk along contour clockwise, this new contour is outside the old one\n //\n // inPt' is the intersection of the two lines parallel to the two\n // adjacent edges of inPt at a distance of 1 unit on the left side.\n var v_trans_x, v_trans_y, shrink_by; // resulting translation vector for inPt\n // good reading for geometry algorithms (here: line-line intersection)\n // http://geomalgorithms.com/a05-_intersect-1.html\n\n var v_prev_x = inPt.x - inPrev.x,\n v_prev_y = inPt.y - inPrev.y;\n var v_next_x = inNext.x - inPt.x,\n v_next_y = inNext.y - inPt.y;\n var v_prev_lensq = v_prev_x * v_prev_x + v_prev_y * v_prev_y; // check for collinear edges\n\n var collinear0 = v_prev_x * v_next_y - v_prev_y * v_next_x;\n\n if (Math.abs(collinear0) > Number.EPSILON) {\n // not collinear\n // length of vectors for normalizing\n var v_prev_len = Math.sqrt(v_prev_lensq);\n var v_next_len = Math.sqrt(v_next_x * v_next_x + v_next_y * v_next_y); // shift adjacent points by unit vectors to the left\n\n var ptPrevShift_x = inPrev.x - v_prev_y / v_prev_len;\n var ptPrevShift_y = inPrev.y + v_prev_x / v_prev_len;\n var ptNextShift_x = inNext.x - v_next_y / v_next_len;\n var ptNextShift_y = inNext.y + v_next_x / v_next_len; // scaling factor for v_prev to intersection point\n\n var sf = ((ptNextShift_x - ptPrevShift_x) * v_next_y - (ptNextShift_y - ptPrevShift_y) * v_next_x) / (v_prev_x * v_next_y - v_prev_y * v_next_x); // vector from inPt to intersection point\n\n v_trans_x = ptPrevShift_x + v_prev_x * sf - inPt.x;\n v_trans_y = ptPrevShift_y + v_prev_y * sf - inPt.y; // Don't normalize!, otherwise sharp corners become ugly\n // but prevent crazy spikes\n\n var v_trans_lensq = v_trans_x * v_trans_x + v_trans_y * v_trans_y;\n\n if (v_trans_lensq <= 2) {\n return new Vector2(v_trans_x, v_trans_y);\n } else {\n shrink_by = Math.sqrt(v_trans_lensq / 2);\n }\n } else {\n // handle special case of collinear edges\n var direction_eq = false; // assumes: opposite\n\n if (v_prev_x > Number.EPSILON) {\n if (v_next_x > Number.EPSILON) {\n direction_eq = true;\n }\n } else {\n if (v_prev_x < -Number.EPSILON) {\n if (v_next_x < -Number.EPSILON) {\n direction_eq = true;\n }\n } else {\n if (Math.sign(v_prev_y) === Math.sign(v_next_y)) {\n direction_eq = true;\n }\n }\n }\n\n if (direction_eq) {\n // console.log(\"Warning: lines are a straight sequence\");\n v_trans_x = -v_prev_y;\n v_trans_y = v_prev_x;\n shrink_by = Math.sqrt(v_prev_lensq);\n } else {\n // console.log(\"Warning: lines are a straight spike\");\n v_trans_x = v_prev_x;\n v_trans_y = v_prev_y;\n shrink_by = Math.sqrt(v_prev_lensq / 2);\n }\n }\n\n return new Vector2(v_trans_x / shrink_by, v_trans_y / shrink_by);\n }", "function getBevelVec(inPt, inPrev, inNext) {\n // computes for inPt the corresponding point inPt' on a new contour\n // shifted by 1 unit (length of normalized vector) to the left\n // if we walk along contour clockwise, this new contour is outside the old one\n //\n // inPt' is the intersection of the two lines parallel to the two\n // adjacent edges of inPt at a distance of 1 unit on the left side.\n let v_trans_x, v_trans_y, shrink_by; // resulting translation vector for inPt\n // good reading for geometry algorithms (here: line-line intersection)\n // http://geomalgorithms.com/a05-_intersect-1.html\n\n const v_prev_x = inPt.x - inPrev.x,\n v_prev_y = inPt.y - inPrev.y;\n const v_next_x = inNext.x - inPt.x,\n v_next_y = inNext.y - inPt.y;\n const v_prev_lensq = v_prev_x * v_prev_x + v_prev_y * v_prev_y; // check for collinear edges\n\n const collinear0 = v_prev_x * v_next_y - v_prev_y * v_next_x;\n\n if (Math.abs(collinear0) > Number.EPSILON) {\n // not collinear\n // length of vectors for normalizing\n const v_prev_len = Math.sqrt(v_prev_lensq);\n const v_next_len = Math.sqrt(v_next_x * v_next_x + v_next_y * v_next_y); // shift adjacent points by unit vectors to the left\n\n const ptPrevShift_x = inPrev.x - v_prev_y / v_prev_len;\n const ptPrevShift_y = inPrev.y + v_prev_x / v_prev_len;\n const ptNextShift_x = inNext.x - v_next_y / v_next_len;\n const ptNextShift_y = inNext.y + v_next_x / v_next_len; // scaling factor for v_prev to intersection point\n\n const sf = ((ptNextShift_x - ptPrevShift_x) * v_next_y - (ptNextShift_y - ptPrevShift_y) * v_next_x) / (v_prev_x * v_next_y - v_prev_y * v_next_x); // vector from inPt to intersection point\n\n v_trans_x = ptPrevShift_x + v_prev_x * sf - inPt.x;\n v_trans_y = ptPrevShift_y + v_prev_y * sf - inPt.y; // Don't normalize!, otherwise sharp corners become ugly\n // but prevent crazy spikes\n\n const v_trans_lensq = v_trans_x * v_trans_x + v_trans_y * v_trans_y;\n\n if (v_trans_lensq <= 2) {\n return new Vector2(v_trans_x, v_trans_y);\n } else {\n shrink_by = Math.sqrt(v_trans_lensq / 2);\n }\n } else {\n // handle special case of collinear edges\n let direction_eq = false; // assumes: opposite\n\n if (v_prev_x > Number.EPSILON) {\n if (v_next_x > Number.EPSILON) {\n direction_eq = true;\n }\n } else {\n if (v_prev_x < -Number.EPSILON) {\n if (v_next_x < -Number.EPSILON) {\n direction_eq = true;\n }\n } else {\n if (Math.sign(v_prev_y) === Math.sign(v_next_y)) {\n direction_eq = true;\n }\n }\n }\n\n if (direction_eq) {\n // console.log(\"Warning: lines are a straight sequence\");\n v_trans_x = -v_prev_y;\n v_trans_y = v_prev_x;\n shrink_by = Math.sqrt(v_prev_lensq);\n } else {\n // console.log(\"Warning: lines are a straight spike\");\n v_trans_x = v_prev_x;\n v_trans_y = v_prev_y;\n shrink_by = Math.sqrt(v_prev_lensq / 2);\n }\n }\n\n return new Vector2(v_trans_x / shrink_by, v_trans_y / shrink_by);\n }", "totalLength(){\n\n let clen = 0;\n let pts;\n\n for(let i = 0; i < this.nCurves; i++){\n let idx = i*2;\n pts = [ p5.Vector.add(this.cpts[idx], this.cpts[idx+1]).mult(0.5),\n this.cpts[idx+1],\n this.cpts[idx+2],\n p5.Vector.add(this.cpts[idx+2], this.cpts[idx+3]).mult(0.5)\n ];\n \n clen += this.segmentLength(pts);\n }\n\n return clen;\n\n }", "function calculateSlope() {\n let x1 = 2;\n let x2 = 4;\n let firstPointY = 2 * x1 - 2;\n let secondPointY = 2 * x2 - 2;\n return (secondPointY - firstPointY) / (x2 - x1);\n}", "function findDotPosition(lt,ln,r){\n var x = r * Math.cos(lt) * Math.sin(ln);\n var y = r * Math.sin(lt)\n var z = r * Math.cos(lt) * Math.cos(ln);\n return Array(Math.round(x), Math.round(y), Math.round(z));\n}", "function reflect(r, it) {\n let d = r.as_dir();\n let n = it.m.get_normal(it.p, 0);\n let ddn = d.dot(n);\n let dx = d.x - 2*ddn*n.x;\n let dy = d.y - 2*ddn*n.y;\n\n let a1 = (dy - (it.p.y+r.off.y)) /\n (dx - (it.p.x+r.off.x));\n\n return new Vec2(1024*dx+it.p.x, 1024*dy+it.p.y);\n}", "function getBevelVec( inPt, inPrev, inNext ) {\n\n\t\t\t\t\t// computes for inPt the corresponding point inPt' on a new contour\n\t\t\t\t\t// shifted by 1 unit (length of normalized vector) to the left\n\t\t\t\t\t// if we walk along contour clockwise, this new contour is outside the old one\n\t\t\t\t\t//\n\t\t\t\t\t// inPt' is the intersection of the two lines parallel to the two\n\t\t\t\t\t// adjacent edges of inPt at a distance of 1 unit on the left side.\n\n\t\t\t\t\tlet v_trans_x, v_trans_y, shrink_by; // resulting translation vector for inPt\n\n\t\t\t\t\t// good reading for geometry algorithms (here: line-line intersection)\n\t\t\t\t\t// http://geomalgorithms.com/a05-_intersect-1.html\n\n\t\t\t\t\tconst v_prev_x = inPt.x - inPrev.x,\n\t\t\t\t\t\tv_prev_y = inPt.y - inPrev.y;\n\t\t\t\t\tconst v_next_x = inNext.x - inPt.x,\n\t\t\t\t\t\tv_next_y = inNext.y - inPt.y;\n\n\t\t\t\t\tconst v_prev_lensq = ( v_prev_x * v_prev_x + v_prev_y * v_prev_y );\n\n\t\t\t\t\t// check for collinear edges\n\t\t\t\t\tconst collinear0 = ( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\t\t\tif ( Math.abs( collinear0 ) > Number.EPSILON ) {\n\n\t\t\t\t\t\t// not collinear\n\n\t\t\t\t\t\t// length of vectors for normalizing\n\n\t\t\t\t\t\tconst v_prev_len = Math.sqrt( v_prev_lensq );\n\t\t\t\t\t\tconst v_next_len = Math.sqrt( v_next_x * v_next_x + v_next_y * v_next_y );\n\n\t\t\t\t\t\t// shift adjacent points by unit vectors to the left\n\n\t\t\t\t\t\tconst ptPrevShift_x = ( inPrev.x - v_prev_y / v_prev_len );\n\t\t\t\t\t\tconst ptPrevShift_y = ( inPrev.y + v_prev_x / v_prev_len );\n\n\t\t\t\t\t\tconst ptNextShift_x = ( inNext.x - v_next_y / v_next_len );\n\t\t\t\t\t\tconst ptNextShift_y = ( inNext.y + v_next_x / v_next_len );\n\n\t\t\t\t\t\t// scaling factor for v_prev to intersection point\n\n\t\t\t\t\t\tconst sf = ( ( ptNextShift_x - ptPrevShift_x ) * v_next_y -\n\t\t\t\t\t\t\t\t( ptNextShift_y - ptPrevShift_y ) * v_next_x ) /\n\t\t\t\t\t\t\t( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\t\t\t\t// vector from inPt to intersection point\n\n\t\t\t\t\t\tv_trans_x = ( ptPrevShift_x + v_prev_x * sf - inPt.x );\n\t\t\t\t\t\tv_trans_y = ( ptPrevShift_y + v_prev_y * sf - inPt.y );\n\n\t\t\t\t\t\t// Don't normalize!, otherwise sharp corners become ugly\n\t\t\t\t\t\t// but prevent crazy spikes\n\t\t\t\t\t\tconst v_trans_lensq = ( v_trans_x * v_trans_x + v_trans_y * v_trans_y );\n\t\t\t\t\t\tif ( v_trans_lensq <= 2 ) {\n\n\t\t\t\t\t\t\treturn new Vector2( v_trans_x, v_trans_y );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tshrink_by = Math.sqrt( v_trans_lensq / 2 );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// handle special case of collinear edges\n\n\t\t\t\t\t\tlet direction_eq = false; // assumes: opposite\n\n\t\t\t\t\t\tif ( v_prev_x > Number.EPSILON ) {\n\n\t\t\t\t\t\t\tif ( v_next_x > Number.EPSILON ) {\n\n\t\t\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tif ( v_prev_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\t\t\tif ( v_next_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\tif ( Math.sign( v_prev_y ) === Math.sign( v_next_y ) ) {\n\n\t\t\t\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( direction_eq ) {\n\n\t\t\t\t\t\t\t// console.log(\"Warning: lines are a straight sequence\");\n\t\t\t\t\t\t\tv_trans_x = - v_prev_y;\n\t\t\t\t\t\t\tv_trans_y = v_prev_x;\n\t\t\t\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// console.log(\"Warning: lines are a straight spike\");\n\t\t\t\t\t\t\tv_trans_x = v_prev_x;\n\t\t\t\t\t\t\tv_trans_y = v_prev_y;\n\t\t\t\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq / 2 );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\treturn new Vector2( v_trans_x / shrink_by, v_trans_y / shrink_by );\n\n\t\t\t\t}", "function point_offset(i) {\n return 4*i;\n }", "get length() {\n return Math.sqrt(this.x * this.x + this.y * this.y);\n }", "getLineParameters() {\n if (this.x1 !== this.x2) {\n this.a = ((this.y2 - this.y1)) / ((this.x1 - this.x2))\n this.b = 1.0\n this.c = this.a * this.x1 + this.b * this.y1\n }\n else {\n this.a = 1.0\n this.b = ((this.x1 - this.x2)) / ((this.y2 - this.y1))\n this.c = this.a * this.x1 + this.b * this.y1\n }\n }", "static DistancePointToLine() {}", "function getLineDistance(start, end) {\n // return Math.sqrt(Math.abs(start.x - end.x) ** 2 + Math.abs(start.y - end.y) ** 2);\n return Math.sqrt(Math.pow(Math.abs(start.x - end.x), 2) + Math.pow(Math.abs(start.y - end.y), 2));\n}", "getLength() {\n var x1 = this.point1.getX();\n var y1 = this.point1.getY();\n var x2 = this.point2.getX();\n var y2 = this.point2.getY();\n return Math.hypot(x1 - x2, y1 - y2);\n }", "function getBevelVec( inPt, inPrev, inNext ) {\r\n\r\n\t\t// computes for inPt the corresponding point inPt' on a new contour\r\n\t\t// shifted by 1 unit (length of normalized vector) to the left\r\n\t\t// if we walk along contour clockwise, this new contour is outside the old one\r\n\t\t//\r\n\t\t// inPt' is the intersection of the two lines parallel to the two\r\n\t\t// adjacent edges of inPt at a distance of 1 unit on the left side.\r\n\r\n\t\tvar v_trans_x, v_trans_y, shrink_by = 1;\t\t// resulting translation vector for inPt\r\n\r\n\t\t// good reading for geometry algorithms (here: line-line intersection)\r\n\t\t// http://geomalgorithms.com/a05-_intersect-1.html\r\n\r\n\t\tvar v_prev_x = inPt.x - inPrev.x, v_prev_y = inPt.y - inPrev.y;\r\n\t\tvar v_next_x = inNext.x - inPt.x, v_next_y = inNext.y - inPt.y;\r\n\r\n\t\tvar v_prev_lensq = ( v_prev_x * v_prev_x + v_prev_y * v_prev_y );\r\n\r\n\t\t// check for collinear edges\r\n\t\tvar collinear0 = ( v_prev_x * v_next_y - v_prev_y * v_next_x );\r\n\r\n\t\tif ( Math.abs( collinear0 ) > Number.EPSILON ) {\r\n\r\n\t\t\t// not collinear\r\n\r\n\t\t\t// length of vectors for normalizing\r\n\r\n\t\t\tvar v_prev_len = Math.sqrt( v_prev_lensq );\r\n\t\t\tvar v_next_len = Math.sqrt( v_next_x * v_next_x + v_next_y * v_next_y );\r\n\r\n\t\t\t// shift adjacent points by unit vectors to the left\r\n\r\n\t\t\tvar ptPrevShift_x = ( inPrev.x - v_prev_y / v_prev_len );\r\n\t\t\tvar ptPrevShift_y = ( inPrev.y + v_prev_x / v_prev_len );\r\n\r\n\t\t\tvar ptNextShift_x = ( inNext.x - v_next_y / v_next_len );\r\n\t\t\tvar ptNextShift_y = ( inNext.y + v_next_x / v_next_len );\r\n\r\n\t\t\t// scaling factor for v_prev to intersection point\r\n\r\n\t\t\tvar sf = ( ( ptNextShift_x - ptPrevShift_x ) * v_next_y -\r\n\t\t\t\t\t\t( ptNextShift_y - ptPrevShift_y ) * v_next_x ) /\r\n\t\t\t\t\t ( v_prev_x * v_next_y - v_prev_y * v_next_x );\r\n\r\n\t\t\t// vector from inPt to intersection point\r\n\r\n\t\t\tv_trans_x = ( ptPrevShift_x + v_prev_x * sf - inPt.x );\r\n\t\t\tv_trans_y = ( ptPrevShift_y + v_prev_y * sf - inPt.y );\r\n\r\n\t\t\t// Don't normalize!, otherwise sharp corners become ugly\r\n\t\t\t// but prevent crazy spikes\r\n\t\t\tvar v_trans_lensq = ( v_trans_x * v_trans_x + v_trans_y * v_trans_y );\r\n\t\t\tif ( v_trans_lensq <= 2 ) {\r\n\r\n\t\t\t\treturn\tnew THREE.Vector2( v_trans_x, v_trans_y );\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\tshrink_by = Math.sqrt( v_trans_lensq / 2 );\r\n\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\r\n\t\t\t// handle special case of collinear edges\r\n\r\n\t\t\tvar direction_eq = false;\t\t// assumes: opposite\r\n\t\t\tif ( v_prev_x > Number.EPSILON ) {\r\n\r\n\t\t\t\tif ( v_next_x > Number.EPSILON ) {\r\n\r\n\t\t\t\t\tdirection_eq = true;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\tif ( v_prev_x < - Number.EPSILON ) {\r\n\r\n\t\t\t\t\tif ( v_next_x < - Number.EPSILON ) {\r\n\r\n\t\t\t\t\t\tdirection_eq = true;\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\tif ( Math.sign( v_prev_y ) === Math.sign( v_next_y ) ) {\r\n\r\n\t\t\t\t\t\tdirection_eq = true;\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif ( direction_eq ) {\r\n\r\n\t\t\t\t// console.log(\"Warning: lines are a straight sequence\");\r\n\t\t\t\tv_trans_x = - v_prev_y;\r\n\t\t\t\tv_trans_y = v_prev_x;\r\n\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq );\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\t// console.log(\"Warning: lines are a straight spike\");\r\n\t\t\t\tv_trans_x = v_prev_x;\r\n\t\t\t\tv_trans_y = v_prev_y;\r\n\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq / 2 );\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn\tnew THREE.Vector2( v_trans_x / shrink_by, v_trans_y / shrink_by );\r\n\r\n\t}", "function getBevelVec( inPt, inPrev, inNext ) {\r\n\r\n\t\t\t// computes for inPt the corresponding point inPt' on a new contour\r\n\t\t\t// shifted by 1 unit (length of normalized vector) to the left\r\n\t\t\t// if we walk along contour clockwise, this new contour is outside the old one\r\n\t\t\t//\r\n\t\t\t// inPt' is the intersection of the two lines parallel to the two\r\n\t\t\t// adjacent edges of inPt at a distance of 1 unit on the left side.\r\n\r\n\t\t\tvar v_trans_x, v_trans_y, shrink_by = 1;\t\t// resulting translation vector for inPt\r\n\r\n\t\t\t// good reading for geometry algorithms (here: line-line intersection)\r\n\t\t\t// http://geomalgorithms.com/a05-_intersect-1.html\r\n\r\n\t\t\tvar v_prev_x = inPt.x - inPrev.x, v_prev_y = inPt.y - inPrev.y;\r\n\t\t\tvar v_next_x = inNext.x - inPt.x, v_next_y = inNext.y - inPt.y;\r\n\r\n\t\t\tvar v_prev_lensq = ( v_prev_x * v_prev_x + v_prev_y * v_prev_y );\r\n\r\n\t\t\t// check for collinear edges\r\n\t\t\tvar collinear0 = ( v_prev_x * v_next_y - v_prev_y * v_next_x );\r\n\r\n\t\t\tif ( Math.abs( collinear0 ) > Number.EPSILON ) {\r\n\r\n\t\t\t\t// not collinear\r\n\r\n\t\t\t\t// length of vectors for normalizing\r\n\r\n\t\t\t\tvar v_prev_len = Math.sqrt( v_prev_lensq );\r\n\t\t\t\tvar v_next_len = Math.sqrt( v_next_x * v_next_x + v_next_y * v_next_y );\r\n\r\n\t\t\t\t// shift adjacent points by unit vectors to the left\r\n\r\n\t\t\t\tvar ptPrevShift_x = ( inPrev.x - v_prev_y / v_prev_len );\r\n\t\t\t\tvar ptPrevShift_y = ( inPrev.y + v_prev_x / v_prev_len );\r\n\r\n\t\t\t\tvar ptNextShift_x = ( inNext.x - v_next_y / v_next_len );\r\n\t\t\t\tvar ptNextShift_y = ( inNext.y + v_next_x / v_next_len );\r\n\r\n\t\t\t\t// scaling factor for v_prev to intersection point\r\n\r\n\t\t\t\tvar sf = ( ( ptNextShift_x - ptPrevShift_x ) * v_next_y -\r\n\t\t\t\t\t\t\t( ptNextShift_y - ptPrevShift_y ) * v_next_x ) /\r\n\t\t\t\t\t\t ( v_prev_x * v_next_y - v_prev_y * v_next_x );\r\n\r\n\t\t\t\t// vector from inPt to intersection point\r\n\r\n\t\t\t\tv_trans_x = ( ptPrevShift_x + v_prev_x * sf - inPt.x );\r\n\t\t\t\tv_trans_y = ( ptPrevShift_y + v_prev_y * sf - inPt.y );\r\n\r\n\t\t\t\t// Don't normalize!, otherwise sharp corners become ugly\r\n\t\t\t\t// but prevent crazy spikes\r\n\t\t\t\tvar v_trans_lensq = ( v_trans_x * v_trans_x + v_trans_y * v_trans_y );\r\n\t\t\t\tif ( v_trans_lensq <= 2 ) {\r\n\r\n\t\t\t\t\treturn\tnew THREE.Vector2( v_trans_x, v_trans_y );\r\n\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\tshrink_by = Math.sqrt( v_trans_lensq / 2 );\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\t// handle special case of collinear edges\r\n\r\n\t\t\t\tvar direction_eq = false;\t\t// assumes: opposite\r\n\t\t\t\tif ( v_prev_x > Number.EPSILON ) {\r\n\r\n\t\t\t\t\tif ( v_next_x > Number.EPSILON ) {\r\n\r\n\t\t\t\t\t\tdirection_eq = true;\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\tif ( v_prev_x < - Number.EPSILON ) {\r\n\r\n\t\t\t\t\t\tif ( v_next_x < - Number.EPSILON ) {\r\n\r\n\t\t\t\t\t\t\tdirection_eq = true;\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\tif ( Math.sign( v_prev_y ) === Math.sign( v_next_y ) ) {\r\n\r\n\t\t\t\t\t\t\tdirection_eq = true;\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( direction_eq ) {\r\n\r\n\t\t\t\t\t// console.log(\"Warning: lines are a straight sequence\");\r\n\t\t\t\t\tv_trans_x = - v_prev_y;\r\n\t\t\t\t\tv_trans_y = v_prev_x;\r\n\t\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq );\r\n\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\t// console.log(\"Warning: lines are a straight spike\");\r\n\t\t\t\t\tv_trans_x = v_prev_x;\r\n\t\t\t\t\tv_trans_y = v_prev_y;\r\n\t\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq / 2 );\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\treturn\tnew THREE.Vector2( v_trans_x / shrink_by, v_trans_y / shrink_by );\r\n\r\n\t\t}", "function t$f(t,l){const c=t.vertex.code;l.verticalOffsetEnabled?(t.vertex.uniforms.add(\"verticalOffset\",\"vec4\"),l.screenSizePerspectiveEnabled&&(t.include(r$d),t.vertex.uniforms.add(\"screenSizePerspectiveAlignment\",\"vec4\")),c.add(t$i`\n vec3 calculateVerticalOffset(vec3 worldPos, vec3 localOrigin) {\n float viewDistance = length((view * vec4(worldPos, 1.0)).xyz);\n ${1===l.viewingMode?t$i`vec3 worldNormal = normalize(worldPos + localOrigin);`:t$i`vec3 worldNormal = vec3(0.0, 0.0, 1.0);`}\n ${l.screenSizePerspectiveEnabled?t$i`\n float cosAngle = dot(worldNormal, normalize(worldPos - camPos));\n float verticalOffsetScreenHeight = screenSizePerspectiveScaleFloat(verticalOffset.x, abs(cosAngle), viewDistance, screenSizePerspectiveAlignment);`:t$i`\n float verticalOffsetScreenHeight = verticalOffset.x;`}\n // Screen sized offset in world space, used for example for line callouts\n float worldOffset = clamp(verticalOffsetScreenHeight * verticalOffset.y * viewDistance, verticalOffset.z, verticalOffset.w);\n return worldNormal * worldOffset;\n }\n\n vec3 addVerticalOffset(vec3 worldPos, vec3 localOrigin) {\n return worldPos + calculateVerticalOffset(worldPos, localOrigin);\n }\n `)):c.add(t$i`vec3 addVerticalOffset(vec3 worldPos, vec3 localOrigin) { return worldPos; }`);}", "function getBevelVec( inPt, inPrev, inNext ) {\n\n\t\t\t// computes for inPt the corresponding point inPt' on a new contour\n\t\t\t// shifted by 1 unit (length of normalized vector) to the left\n\t\t\t// if we walk along contour clockwise, this new contour is outside the old one\n\t\t\t//\n\t\t\t// inPt' is the intersection of the two lines parallel to the two\n\t\t\t// adjacent edges of inPt at a distance of 1 unit on the left side.\n\n\t\t\tvar v_trans_x, v_trans_y, shrink_by = 1;\t\t// resulting translation vector for inPt\n\n\t\t\t// good reading for geometry algorithms (here: line-line intersection)\n\t\t\t// http://geomalgorithms.com/a05-_intersect-1.html\n\n\t\t\tvar v_prev_x = inPt.x - inPrev.x, v_prev_y = inPt.y - inPrev.y;\n\t\t\tvar v_next_x = inNext.x - inPt.x, v_next_y = inNext.y - inPt.y;\n\n\t\t\tvar v_prev_lensq = ( v_prev_x * v_prev_x + v_prev_y * v_prev_y );\n\n\t\t\t// check for collinear edges\n\t\t\tvar collinear0 = ( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\tif ( Math.abs( collinear0 ) > Number.EPSILON ) {\n\n\t\t\t\t// not collinear\n\n\t\t\t\t// length of vectors for normalizing\n\n\t\t\t\tvar v_prev_len = Math.sqrt( v_prev_lensq );\n\t\t\t\tvar v_next_len = Math.sqrt( v_next_x * v_next_x + v_next_y * v_next_y );\n\n\t\t\t\t// shift adjacent points by unit vectors to the left\n\n\t\t\t\tvar ptPrevShift_x = ( inPrev.x - v_prev_y / v_prev_len );\n\t\t\t\tvar ptPrevShift_y = ( inPrev.y + v_prev_x / v_prev_len );\n\n\t\t\t\tvar ptNextShift_x = ( inNext.x - v_next_y / v_next_len );\n\t\t\t\tvar ptNextShift_y = ( inNext.y + v_next_x / v_next_len );\n\n\t\t\t\t// scaling factor for v_prev to intersection point\n\n\t\t\t\tvar sf = ( ( ptNextShift_x - ptPrevShift_x ) * v_next_y -\n\t\t\t\t\t\t\t( ptNextShift_y - ptPrevShift_y ) * v_next_x ) /\n\t\t\t\t\t\t ( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\t\t// vector from inPt to intersection point\n\n\t\t\t\tv_trans_x = ( ptPrevShift_x + v_prev_x * sf - inPt.x );\n\t\t\t\tv_trans_y = ( ptPrevShift_y + v_prev_y * sf - inPt.y );\n\n\t\t\t\t// Don't normalize!, otherwise sharp corners become ugly\n\t\t\t\t// but prevent crazy spikes\n\t\t\t\tvar v_trans_lensq = ( v_trans_x * v_trans_x + v_trans_y * v_trans_y );\n\t\t\t\tif ( v_trans_lensq <= 2 ) {\n\n\t\t\t\t\treturn\tnew Vector2( v_trans_x, v_trans_y );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tshrink_by = Math.sqrt( v_trans_lensq / 2 );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t// handle special case of collinear edges\n\n\t\t\t\tvar direction_eq = false;\t\t// assumes: opposite\n\t\t\t\tif ( v_prev_x > Number.EPSILON ) {\n\n\t\t\t\t\tif ( v_next_x > Number.EPSILON ) {\n\n\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( v_prev_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\tif ( v_next_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tif ( Math.sign( v_prev_y ) === Math.sign( v_next_y ) ) {\n\n\t\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( direction_eq ) {\n\n\t\t\t\t\t// console.log(\"Warning: lines are a straight sequence\");\n\t\t\t\t\tv_trans_x = - v_prev_y;\n\t\t\t\t\tv_trans_y = v_prev_x;\n\t\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// console.log(\"Warning: lines are a straight spike\");\n\t\t\t\t\tv_trans_x = v_prev_x;\n\t\t\t\t\tv_trans_y = v_prev_y;\n\t\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq / 2 );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn\tnew Vector2( v_trans_x / shrink_by, v_trans_y / shrink_by );\n\n\t\t}", "function getBevelVec( inPt, inPrev, inNext ) {\n\n\t\t\t// computes for inPt the corresponding point inPt' on a new contour\n\t\t\t// shifted by 1 unit (length of normalized vector) to the left\n\t\t\t// if we walk along contour clockwise, this new contour is outside the old one\n\t\t\t//\n\t\t\t// inPt' is the intersection of the two lines parallel to the two\n\t\t\t// adjacent edges of inPt at a distance of 1 unit on the left side.\n\n\t\t\tvar v_trans_x, v_trans_y, shrink_by = 1;\t\t// resulting translation vector for inPt\n\n\t\t\t// good reading for geometry algorithms (here: line-line intersection)\n\t\t\t// http://geomalgorithms.com/a05-_intersect-1.html\n\n\t\t\tvar v_prev_x = inPt.x - inPrev.x, v_prev_y = inPt.y - inPrev.y;\n\t\t\tvar v_next_x = inNext.x - inPt.x, v_next_y = inNext.y - inPt.y;\n\n\t\t\tvar v_prev_lensq = ( v_prev_x * v_prev_x + v_prev_y * v_prev_y );\n\n\t\t\t// check for collinear edges\n\t\t\tvar collinear0 = ( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\tif ( Math.abs( collinear0 ) > Number.EPSILON ) {\n\n\t\t\t\t// not collinear\n\n\t\t\t\t// length of vectors for normalizing\n\n\t\t\t\tvar v_prev_len = Math.sqrt( v_prev_lensq );\n\t\t\t\tvar v_next_len = Math.sqrt( v_next_x * v_next_x + v_next_y * v_next_y );\n\n\t\t\t\t// shift adjacent points by unit vectors to the left\n\n\t\t\t\tvar ptPrevShift_x = ( inPrev.x - v_prev_y / v_prev_len );\n\t\t\t\tvar ptPrevShift_y = ( inPrev.y + v_prev_x / v_prev_len );\n\n\t\t\t\tvar ptNextShift_x = ( inNext.x - v_next_y / v_next_len );\n\t\t\t\tvar ptNextShift_y = ( inNext.y + v_next_x / v_next_len );\n\n\t\t\t\t// scaling factor for v_prev to intersection point\n\n\t\t\t\tvar sf = ( ( ptNextShift_x - ptPrevShift_x ) * v_next_y -\n\t\t\t\t\t\t\t( ptNextShift_y - ptPrevShift_y ) * v_next_x ) /\n\t\t\t\t\t\t ( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\t\t// vector from inPt to intersection point\n\n\t\t\t\tv_trans_x = ( ptPrevShift_x + v_prev_x * sf - inPt.x );\n\t\t\t\tv_trans_y = ( ptPrevShift_y + v_prev_y * sf - inPt.y );\n\n\t\t\t\t// Don't normalize!, otherwise sharp corners become ugly\n\t\t\t\t// but prevent crazy spikes\n\t\t\t\tvar v_trans_lensq = ( v_trans_x * v_trans_x + v_trans_y * v_trans_y );\n\t\t\t\tif ( v_trans_lensq <= 2 ) {\n\n\t\t\t\t\treturn\tnew Vector2( v_trans_x, v_trans_y );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tshrink_by = Math.sqrt( v_trans_lensq / 2 );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t// handle special case of collinear edges\n\n\t\t\t\tvar direction_eq = false;\t\t// assumes: opposite\n\t\t\t\tif ( v_prev_x > Number.EPSILON ) {\n\n\t\t\t\t\tif ( v_next_x > Number.EPSILON ) {\n\n\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( v_prev_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\tif ( v_next_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tif ( Math.sign( v_prev_y ) === Math.sign( v_next_y ) ) {\n\n\t\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( direction_eq ) {\n\n\t\t\t\t\t// console.log(\"Warning: lines are a straight sequence\");\n\t\t\t\t\tv_trans_x = - v_prev_y;\n\t\t\t\t\tv_trans_y = v_prev_x;\n\t\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// console.log(\"Warning: lines are a straight spike\");\n\t\t\t\t\tv_trans_x = v_prev_x;\n\t\t\t\t\tv_trans_y = v_prev_y;\n\t\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq / 2 );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn\tnew Vector2( v_trans_x / shrink_by, v_trans_y / shrink_by );\n\n\t\t}", "function getBevelVec( inPt, inPrev, inNext ) {\n\n\t\t\t// computes for inPt the corresponding point inPt' on a new contour\n\t\t\t// shifted by 1 unit (length of normalized vector) to the left\n\t\t\t// if we walk along contour clockwise, this new contour is outside the old one\n\t\t\t//\n\t\t\t// inPt' is the intersection of the two lines parallel to the two\n\t\t\t// adjacent edges of inPt at a distance of 1 unit on the left side.\n\n\t\t\tvar v_trans_x, v_trans_y, shrink_by = 1;\t\t// resulting translation vector for inPt\n\n\t\t\t// good reading for geometry algorithms (here: line-line intersection)\n\t\t\t// http://geomalgorithms.com/a05-_intersect-1.html\n\n\t\t\tvar v_prev_x = inPt.x - inPrev.x, v_prev_y = inPt.y - inPrev.y;\n\t\t\tvar v_next_x = inNext.x - inPt.x, v_next_y = inNext.y - inPt.y;\n\n\t\t\tvar v_prev_lensq = ( v_prev_x * v_prev_x + v_prev_y * v_prev_y );\n\n\t\t\t// check for collinear edges\n\t\t\tvar collinear0 = ( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\tif ( Math.abs( collinear0 ) > Number.EPSILON ) {\n\n\t\t\t\t// not collinear\n\n\t\t\t\t// length of vectors for normalizing\n\n\t\t\t\tvar v_prev_len = Math.sqrt( v_prev_lensq );\n\t\t\t\tvar v_next_len = Math.sqrt( v_next_x * v_next_x + v_next_y * v_next_y );\n\n\t\t\t\t// shift adjacent points by unit vectors to the left\n\n\t\t\t\tvar ptPrevShift_x = ( inPrev.x - v_prev_y / v_prev_len );\n\t\t\t\tvar ptPrevShift_y = ( inPrev.y + v_prev_x / v_prev_len );\n\n\t\t\t\tvar ptNextShift_x = ( inNext.x - v_next_y / v_next_len );\n\t\t\t\tvar ptNextShift_y = ( inNext.y + v_next_x / v_next_len );\n\n\t\t\t\t// scaling factor for v_prev to intersection point\n\n\t\t\t\tvar sf = ( ( ptNextShift_x - ptPrevShift_x ) * v_next_y -\n\t\t\t\t\t\t\t( ptNextShift_y - ptPrevShift_y ) * v_next_x ) /\n\t\t\t\t\t\t ( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\t\t// vector from inPt to intersection point\n\n\t\t\t\tv_trans_x = ( ptPrevShift_x + v_prev_x * sf - inPt.x );\n\t\t\t\tv_trans_y = ( ptPrevShift_y + v_prev_y * sf - inPt.y );\n\n\t\t\t\t// Don't normalize!, otherwise sharp corners become ugly\n\t\t\t\t// but prevent crazy spikes\n\t\t\t\tvar v_trans_lensq = ( v_trans_x * v_trans_x + v_trans_y * v_trans_y );\n\t\t\t\tif ( v_trans_lensq <= 2 ) {\n\n\t\t\t\t\treturn\tnew Vector2( v_trans_x, v_trans_y );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tshrink_by = Math.sqrt( v_trans_lensq / 2 );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t// handle special case of collinear edges\n\n\t\t\t\tvar direction_eq = false;\t\t// assumes: opposite\n\t\t\t\tif ( v_prev_x > Number.EPSILON ) {\n\n\t\t\t\t\tif ( v_next_x > Number.EPSILON ) {\n\n\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( v_prev_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\tif ( v_next_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tif ( Math.sign( v_prev_y ) === Math.sign( v_next_y ) ) {\n\n\t\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( direction_eq ) {\n\n\t\t\t\t\t// console.log(\"Warning: lines are a straight sequence\");\n\t\t\t\t\tv_trans_x = - v_prev_y;\n\t\t\t\t\tv_trans_y = v_prev_x;\n\t\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// console.log(\"Warning: lines are a straight spike\");\n\t\t\t\t\tv_trans_x = v_prev_x;\n\t\t\t\t\tv_trans_y = v_prev_y;\n\t\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq / 2 );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn\tnew Vector2( v_trans_x / shrink_by, v_trans_y / shrink_by );\n\n\t\t}", "getAngleOfLineBetweenPoints() {\n var xDiff = this.point2.getX() - this.point1.getX();\n var yDiff = this.point2.getY() - this.point1.getY();\n return Math.atan2(yDiff, xDiff);\n }", "function rightAscension(l, b) { return atan(sin(l) * cos(e) - tan(b) * sin(e), cos(l)); }", "function rightAscension(l, b) { return atan(sin(l) * cos(e) - tan(b) * sin(e), cos(l)); }", "function getYOffset() {\n return container.offsetHeight + containerBottomMargin + containerTopMargin + canvasBorderTop + canvasBorderBottom;\n}", "function getBevelVec( inPt, inPrev, inNext ) {\n\n\t\t// computes for inPt the corresponding point inPt' on a new contour\n\t\t// shifted by 1 unit (length of normalized vector) to the left\n\t\t// if we walk along contour clockwise, this new contour is outside the old one\n\t\t//\n\t\t// inPt' is the intersection of the two lines parallel to the two\n\t\t// adjacent edges of inPt at a distance of 1 unit on the left side.\n\n\t\tvar v_trans_x, v_trans_y, shrink_by = 1; // resulting translation vector for inPt\n\n\t\t// good reading for geometry algorithms (here: line-line intersection)\n\t\t// http://geomalgorithms.com/a05-_intersect-1.html\n\n\t\tvar v_prev_x = inPt.x - inPrev.x,\n\t\t\tv_prev_y = inPt.y - inPrev.y;\n\t\tvar v_next_x = inNext.x - inPt.x,\n\t\t\tv_next_y = inNext.y - inPt.y;\n\n\t\tvar v_prev_lensq = ( v_prev_x * v_prev_x + v_prev_y * v_prev_y );\n\n\t\t// check for collinear edges\n\t\tvar collinear0 = ( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\tif ( Math.abs( collinear0 ) > Number.EPSILON ) {\n\n\t\t\t// not collinear\n\n\t\t\t// length of vectors for normalizing\n\n\t\t\tvar v_prev_len = Math.sqrt( v_prev_lensq );\n\t\t\tvar v_next_len = Math.sqrt( v_next_x * v_next_x + v_next_y * v_next_y );\n\n\t\t\t// shift adjacent points by unit vectors to the left\n\n\t\t\tvar ptPrevShift_x = ( inPrev.x - v_prev_y / v_prev_len );\n\t\t\tvar ptPrevShift_y = ( inPrev.y + v_prev_x / v_prev_len );\n\n\t\t\tvar ptNextShift_x = ( inNext.x - v_next_y / v_next_len );\n\t\t\tvar ptNextShift_y = ( inNext.y + v_next_x / v_next_len );\n\n\t\t\t// scaling factor for v_prev to intersection point\n\n\t\t\tvar sf = ( ( ptNextShift_x - ptPrevShift_x ) * v_next_y -\n\t\t\t\t\t( ptNextShift_y - ptPrevShift_y ) * v_next_x ) /\n\t\t\t\t( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\t// vector from inPt to intersection point\n\n\t\t\tv_trans_x = ( ptPrevShift_x + v_prev_x * sf - inPt.x );\n\t\t\tv_trans_y = ( ptPrevShift_y + v_prev_y * sf - inPt.y );\n\n\t\t\t// Don't normalize!, otherwise sharp corners become ugly\n\t\t\t// but prevent crazy spikes\n\t\t\tvar v_trans_lensq = ( v_trans_x * v_trans_x + v_trans_y * v_trans_y );\n\t\t\tif ( v_trans_lensq <= 2 ) {\n\n\t\t\t\treturn new Vector2( v_trans_x, v_trans_y );\n\n\t\t\t} else {\n\n\t\t\t\tshrink_by = Math.sqrt( v_trans_lensq / 2 );\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// handle special case of collinear edges\n\n\t\t\tvar direction_eq = false; // assumes: opposite\n\t\t\tif ( v_prev_x > Number.EPSILON ) {\n\n\t\t\t\tif ( v_next_x > Number.EPSILON ) {\n\n\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tif ( v_prev_x < - Number.EPSILON ) {\n\n\t\t\t\t\tif ( v_next_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( Math.sign( v_prev_y ) === Math.sign( v_next_y ) ) {\n\n\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( direction_eq ) {\n\n\t\t\t\t// console.log(\"Warning: lines are a straight sequence\");\n\t\t\t\tv_trans_x = - v_prev_y;\n\t\t\t\tv_trans_y = v_prev_x;\n\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq );\n\n\t\t\t} else {\n\n\t\t\t\t// console.log(\"Warning: lines are a straight spike\");\n\t\t\t\tv_trans_x = v_prev_x;\n\t\t\t\tv_trans_y = v_prev_y;\n\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq / 2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn new Vector2( v_trans_x / shrink_by, v_trans_y / shrink_by );\n\n\t}", "function getBevelVec( inPt, inPrev, inNext ) {\n\n\t\t// computes for inPt the corresponding point inPt' on a new contour\n\t\t// shifted by 1 unit (length of normalized vector) to the left\n\t\t// if we walk along contour clockwise, this new contour is outside the old one\n\t\t//\n\t\t// inPt' is the intersection of the two lines parallel to the two\n\t\t// adjacent edges of inPt at a distance of 1 unit on the left side.\n\n\t\tvar v_trans_x, v_trans_y, shrink_by = 1; // resulting translation vector for inPt\n\n\t\t// good reading for geometry algorithms (here: line-line intersection)\n\t\t// http://geomalgorithms.com/a05-_intersect-1.html\n\n\t\tvar v_prev_x = inPt.x - inPrev.x,\n\t\t\tv_prev_y = inPt.y - inPrev.y;\n\t\tvar v_next_x = inNext.x - inPt.x,\n\t\t\tv_next_y = inNext.y - inPt.y;\n\n\t\tvar v_prev_lensq = ( v_prev_x * v_prev_x + v_prev_y * v_prev_y );\n\n\t\t// check for collinear edges\n\t\tvar collinear0 = ( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\tif ( Math.abs( collinear0 ) > Number.EPSILON ) {\n\n\t\t\t// not collinear\n\n\t\t\t// length of vectors for normalizing\n\n\t\t\tvar v_prev_len = Math.sqrt( v_prev_lensq );\n\t\t\tvar v_next_len = Math.sqrt( v_next_x * v_next_x + v_next_y * v_next_y );\n\n\t\t\t// shift adjacent points by unit vectors to the left\n\n\t\t\tvar ptPrevShift_x = ( inPrev.x - v_prev_y / v_prev_len );\n\t\t\tvar ptPrevShift_y = ( inPrev.y + v_prev_x / v_prev_len );\n\n\t\t\tvar ptNextShift_x = ( inNext.x - v_next_y / v_next_len );\n\t\t\tvar ptNextShift_y = ( inNext.y + v_next_x / v_next_len );\n\n\t\t\t// scaling factor for v_prev to intersection point\n\n\t\t\tvar sf = ( ( ptNextShift_x - ptPrevShift_x ) * v_next_y -\n\t\t\t\t\t( ptNextShift_y - ptPrevShift_y ) * v_next_x ) /\n\t\t\t\t( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\t// vector from inPt to intersection point\n\n\t\t\tv_trans_x = ( ptPrevShift_x + v_prev_x * sf - inPt.x );\n\t\t\tv_trans_y = ( ptPrevShift_y + v_prev_y * sf - inPt.y );\n\n\t\t\t// Don't normalize!, otherwise sharp corners become ugly\n\t\t\t// but prevent crazy spikes\n\t\t\tvar v_trans_lensq = ( v_trans_x * v_trans_x + v_trans_y * v_trans_y );\n\t\t\tif ( v_trans_lensq <= 2 ) {\n\n\t\t\t\treturn new Vector2( v_trans_x, v_trans_y );\n\n\t\t\t} else {\n\n\t\t\t\tshrink_by = Math.sqrt( v_trans_lensq / 2 );\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// handle special case of collinear edges\n\n\t\t\tvar direction_eq = false; // assumes: opposite\n\t\t\tif ( v_prev_x > Number.EPSILON ) {\n\n\t\t\t\tif ( v_next_x > Number.EPSILON ) {\n\n\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tif ( v_prev_x < - Number.EPSILON ) {\n\n\t\t\t\t\tif ( v_next_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( Math.sign( v_prev_y ) === Math.sign( v_next_y ) ) {\n\n\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( direction_eq ) {\n\n\t\t\t\t// console.log(\"Warning: lines are a straight sequence\");\n\t\t\t\tv_trans_x = - v_prev_y;\n\t\t\t\tv_trans_y = v_prev_x;\n\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq );\n\n\t\t\t} else {\n\n\t\t\t\t// console.log(\"Warning: lines are a straight spike\");\n\t\t\t\tv_trans_x = v_prev_x;\n\t\t\t\tv_trans_y = v_prev_y;\n\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq / 2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn new Vector2( v_trans_x / shrink_by, v_trans_y / shrink_by );\n\n\t}", "function getBevelVec( inPt, inPrev, inNext ) {\n\n\t\t\t\t// computes for inPt the corresponding point inPt' on a new contour\n\t\t\t\t// shifted by 1 unit (length of normalized vector) to the left\n\t\t\t\t// if we walk along contour clockwise, this new contour is outside the old one\n\t\t\t\t//\n\t\t\t\t// inPt' is the intersection of the two lines parallel to the two\n\t\t\t\t// adjacent edges of inPt at a distance of 1 unit on the left side.\n\n\t\t\t\tlet v_trans_x, v_trans_y, shrink_by; // resulting translation vector for inPt\n\n\t\t\t\t// good reading for geometry algorithms (here: line-line intersection)\n\t\t\t\t// http://geomalgorithms.com/a05-_intersect-1.html\n\n\t\t\t\tconst v_prev_x = inPt.x - inPrev.x,\n\t\t\t\t\tv_prev_y = inPt.y - inPrev.y;\n\t\t\t\tconst v_next_x = inNext.x - inPt.x,\n\t\t\t\t\tv_next_y = inNext.y - inPt.y;\n\n\t\t\t\tconst v_prev_lensq = ( v_prev_x * v_prev_x + v_prev_y * v_prev_y );\n\n\t\t\t\t// check for collinear edges\n\t\t\t\tconst collinear0 = ( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\t\tif ( Math.abs( collinear0 ) > Number.EPSILON ) {\n\n\t\t\t\t\t// not collinear\n\n\t\t\t\t\t// length of vectors for normalizing\n\n\t\t\t\t\tconst v_prev_len = Math.sqrt( v_prev_lensq );\n\t\t\t\t\tconst v_next_len = Math.sqrt( v_next_x * v_next_x + v_next_y * v_next_y );\n\n\t\t\t\t\t// shift adjacent points by unit vectors to the left\n\n\t\t\t\t\tconst ptPrevShift_x = ( inPrev.x - v_prev_y / v_prev_len );\n\t\t\t\t\tconst ptPrevShift_y = ( inPrev.y + v_prev_x / v_prev_len );\n\n\t\t\t\t\tconst ptNextShift_x = ( inNext.x - v_next_y / v_next_len );\n\t\t\t\t\tconst ptNextShift_y = ( inNext.y + v_next_x / v_next_len );\n\n\t\t\t\t\t// scaling factor for v_prev to intersection point\n\n\t\t\t\t\tconst sf = ( ( ptNextShift_x - ptPrevShift_x ) * v_next_y -\n\t\t\t\t\t\t\t( ptNextShift_y - ptPrevShift_y ) * v_next_x ) /\n\t\t\t\t\t\t( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\t\t\t// vector from inPt to intersection point\n\n\t\t\t\t\tv_trans_x = ( ptPrevShift_x + v_prev_x * sf - inPt.x );\n\t\t\t\t\tv_trans_y = ( ptPrevShift_y + v_prev_y * sf - inPt.y );\n\n\t\t\t\t\t// Don't normalize!, otherwise sharp corners become ugly\n\t\t\t\t\t// but prevent crazy spikes\n\t\t\t\t\tconst v_trans_lensq = ( v_trans_x * v_trans_x + v_trans_y * v_trans_y );\n\t\t\t\t\tif ( v_trans_lensq <= 2 ) {\n\n\t\t\t\t\t\treturn new Vector2( v_trans_x, v_trans_y );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tshrink_by = Math.sqrt( v_trans_lensq / 2 );\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// handle special case of collinear edges\n\n\t\t\t\t\tlet direction_eq = false; // assumes: opposite\n\n\t\t\t\t\tif ( v_prev_x > Number.EPSILON ) {\n\n\t\t\t\t\t\tif ( v_next_x > Number.EPSILON ) {\n\n\t\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tif ( v_prev_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\t\tif ( v_next_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tif ( Math.sign( v_prev_y ) === Math.sign( v_next_y ) ) {\n\n\t\t\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( direction_eq ) {\n\n\t\t\t\t\t\t// console.log(\"Warning: lines are a straight sequence\");\n\t\t\t\t\t\tv_trans_x = - v_prev_y;\n\t\t\t\t\t\tv_trans_y = v_prev_x;\n\t\t\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// console.log(\"Warning: lines are a straight spike\");\n\t\t\t\t\t\tv_trans_x = v_prev_x;\n\t\t\t\t\t\tv_trans_y = v_prev_y;\n\t\t\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq / 2 );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\treturn new Vector2( v_trans_x / shrink_by, v_trans_y / shrink_by );\n\n\t\t\t}", "function vector(angle, radius) {\n const offset = (angle === 30) ? [1, 2] : (angle === 90) ? [2, 0] : (angle === 120) ? [1, -2] : null;\n offset.forEach(function(value, i) { offset[i] *= radius; });\n return offset;\n}", "function getBevelVec( inPt, inPrev, inNext ) {\n\n\t\t\t// computes for inPt the corresponding point inPt' on a new contour\n\t\t\t// shifted by 1 unit (length of normalized vector) to the left\n\t\t\t// if we walk along contour clockwise, this new contour is outside the old one\n\t\t\t//\n\t\t\t// inPt' is the intersection of the two lines parallel to the two\n\t\t\t// adjacent edges of inPt at a distance of 1 unit on the left side.\n\n\t\t\tvar v_trans_x, v_trans_y, shrink_by; // resulting translation vector for inPt\n\n\t\t\t// good reading for geometry algorithms (here: line-line intersection)\n\t\t\t// http://geomalgorithms.com/a05-_intersect-1.html\n\n\t\t\tvar v_prev_x = inPt.x - inPrev.x,\n\t\t\t\tv_prev_y = inPt.y - inPrev.y;\n\t\t\tvar v_next_x = inNext.x - inPt.x,\n\t\t\t\tv_next_y = inNext.y - inPt.y;\n\n\t\t\tvar v_prev_lensq = ( v_prev_x * v_prev_x + v_prev_y * v_prev_y );\n\n\t\t\t// check for collinear edges\n\t\t\tvar collinear0 = ( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\tif ( Math.abs( collinear0 ) > Number.EPSILON ) {\n\n\t\t\t\t// not collinear\n\n\t\t\t\t// length of vectors for normalizing\n\n\t\t\t\tvar v_prev_len = Math.sqrt( v_prev_lensq );\n\t\t\t\tvar v_next_len = Math.sqrt( v_next_x * v_next_x + v_next_y * v_next_y );\n\n\t\t\t\t// shift adjacent points by unit vectors to the left\n\n\t\t\t\tvar ptPrevShift_x = ( inPrev.x - v_prev_y / v_prev_len );\n\t\t\t\tvar ptPrevShift_y = ( inPrev.y + v_prev_x / v_prev_len );\n\n\t\t\t\tvar ptNextShift_x = ( inNext.x - v_next_y / v_next_len );\n\t\t\t\tvar ptNextShift_y = ( inNext.y + v_next_x / v_next_len );\n\n\t\t\t\t// scaling factor for v_prev to intersection point\n\n\t\t\t\tvar sf = ( ( ptNextShift_x - ptPrevShift_x ) * v_next_y -\n\t\t\t\t\t\t( ptNextShift_y - ptPrevShift_y ) * v_next_x ) /\n\t\t\t\t\t( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\t\t// vector from inPt to intersection point\n\n\t\t\t\tv_trans_x = ( ptPrevShift_x + v_prev_x * sf - inPt.x );\n\t\t\t\tv_trans_y = ( ptPrevShift_y + v_prev_y * sf - inPt.y );\n\n\t\t\t\t// Don't normalize!, otherwise sharp corners become ugly\n\t\t\t\t// but prevent crazy spikes\n\t\t\t\tvar v_trans_lensq = ( v_trans_x * v_trans_x + v_trans_y * v_trans_y );\n\t\t\t\tif ( v_trans_lensq <= 2 ) {\n\n\t\t\t\t\treturn new Vector2( v_trans_x, v_trans_y );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tshrink_by = Math.sqrt( v_trans_lensq / 2 );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t// handle special case of collinear edges\n\n\t\t\t\tvar direction_eq = false; // assumes: opposite\n\t\t\t\tif ( v_prev_x > Number.EPSILON ) {\n\n\t\t\t\t\tif ( v_next_x > Number.EPSILON ) {\n\n\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( v_prev_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\tif ( v_next_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tif ( Math.sign( v_prev_y ) === Math.sign( v_next_y ) ) {\n\n\t\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( direction_eq ) {\n\n\t\t\t\t\t// console.log(\"Warning: lines are a straight sequence\");\n\t\t\t\t\tv_trans_x = - v_prev_y;\n\t\t\t\t\tv_trans_y = v_prev_x;\n\t\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// console.log(\"Warning: lines are a straight spike\");\n\t\t\t\t\tv_trans_x = v_prev_x;\n\t\t\t\t\tv_trans_y = v_prev_y;\n\t\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq / 2 );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn new Vector2( v_trans_x / shrink_by, v_trans_y / shrink_by );\n\n\t\t}", "function getBevelVec( inPt, inPrev, inNext ) {\n\n\t\t\t// computes for inPt the corresponding point inPt' on a new contour\n\t\t\t// shifted by 1 unit (length of normalized vector) to the left\n\t\t\t// if we walk along contour clockwise, this new contour is outside the old one\n\t\t\t//\n\t\t\t// inPt' is the intersection of the two lines parallel to the two\n\t\t\t// adjacent edges of inPt at a distance of 1 unit on the left side.\n\n\t\t\tvar v_trans_x, v_trans_y, shrink_by; // resulting translation vector for inPt\n\n\t\t\t// good reading for geometry algorithms (here: line-line intersection)\n\t\t\t// http://geomalgorithms.com/a05-_intersect-1.html\n\n\t\t\tvar v_prev_x = inPt.x - inPrev.x,\n\t\t\t\tv_prev_y = inPt.y - inPrev.y;\n\t\t\tvar v_next_x = inNext.x - inPt.x,\n\t\t\t\tv_next_y = inNext.y - inPt.y;\n\n\t\t\tvar v_prev_lensq = ( v_prev_x * v_prev_x + v_prev_y * v_prev_y );\n\n\t\t\t// check for collinear edges\n\t\t\tvar collinear0 = ( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\tif ( Math.abs( collinear0 ) > Number.EPSILON ) {\n\n\t\t\t\t// not collinear\n\n\t\t\t\t// length of vectors for normalizing\n\n\t\t\t\tvar v_prev_len = Math.sqrt( v_prev_lensq );\n\t\t\t\tvar v_next_len = Math.sqrt( v_next_x * v_next_x + v_next_y * v_next_y );\n\n\t\t\t\t// shift adjacent points by unit vectors to the left\n\n\t\t\t\tvar ptPrevShift_x = ( inPrev.x - v_prev_y / v_prev_len );\n\t\t\t\tvar ptPrevShift_y = ( inPrev.y + v_prev_x / v_prev_len );\n\n\t\t\t\tvar ptNextShift_x = ( inNext.x - v_next_y / v_next_len );\n\t\t\t\tvar ptNextShift_y = ( inNext.y + v_next_x / v_next_len );\n\n\t\t\t\t// scaling factor for v_prev to intersection point\n\n\t\t\t\tvar sf = ( ( ptNextShift_x - ptPrevShift_x ) * v_next_y -\n\t\t\t\t\t\t( ptNextShift_y - ptPrevShift_y ) * v_next_x ) /\n\t\t\t\t\t( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\t\t// vector from inPt to intersection point\n\n\t\t\t\tv_trans_x = ( ptPrevShift_x + v_prev_x * sf - inPt.x );\n\t\t\t\tv_trans_y = ( ptPrevShift_y + v_prev_y * sf - inPt.y );\n\n\t\t\t\t// Don't normalize!, otherwise sharp corners become ugly\n\t\t\t\t// but prevent crazy spikes\n\t\t\t\tvar v_trans_lensq = ( v_trans_x * v_trans_x + v_trans_y * v_trans_y );\n\t\t\t\tif ( v_trans_lensq <= 2 ) {\n\n\t\t\t\t\treturn new Vector2( v_trans_x, v_trans_y );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tshrink_by = Math.sqrt( v_trans_lensq / 2 );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t// handle special case of collinear edges\n\n\t\t\t\tvar direction_eq = false; // assumes: opposite\n\t\t\t\tif ( v_prev_x > Number.EPSILON ) {\n\n\t\t\t\t\tif ( v_next_x > Number.EPSILON ) {\n\n\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( v_prev_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\tif ( v_next_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tif ( Math.sign( v_prev_y ) === Math.sign( v_next_y ) ) {\n\n\t\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( direction_eq ) {\n\n\t\t\t\t\t// console.log(\"Warning: lines are a straight sequence\");\n\t\t\t\t\tv_trans_x = - v_prev_y;\n\t\t\t\t\tv_trans_y = v_prev_x;\n\t\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// console.log(\"Warning: lines are a straight spike\");\n\t\t\t\t\tv_trans_x = v_prev_x;\n\t\t\t\t\tv_trans_y = v_prev_y;\n\t\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq / 2 );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn new Vector2( v_trans_x / shrink_by, v_trans_y / shrink_by );\n\n\t\t}", "function getBevelVec( inPt, inPrev, inNext ) {\n\n\t\t\t// computes for inPt the corresponding point inPt' on a new contour\n\t\t\t// shifted by 1 unit (length of normalized vector) to the left\n\t\t\t// if we walk along contour clockwise, this new contour is outside the old one\n\t\t\t//\n\t\t\t// inPt' is the intersection of the two lines parallel to the two\n\t\t\t// adjacent edges of inPt at a distance of 1 unit on the left side.\n\n\t\t\tvar v_trans_x, v_trans_y, shrink_by; // resulting translation vector for inPt\n\n\t\t\t// good reading for geometry algorithms (here: line-line intersection)\n\t\t\t// http://geomalgorithms.com/a05-_intersect-1.html\n\n\t\t\tvar v_prev_x = inPt.x - inPrev.x,\n\t\t\t\tv_prev_y = inPt.y - inPrev.y;\n\t\t\tvar v_next_x = inNext.x - inPt.x,\n\t\t\t\tv_next_y = inNext.y - inPt.y;\n\n\t\t\tvar v_prev_lensq = ( v_prev_x * v_prev_x + v_prev_y * v_prev_y );\n\n\t\t\t// check for collinear edges\n\t\t\tvar collinear0 = ( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\tif ( Math.abs( collinear0 ) > Number.EPSILON ) {\n\n\t\t\t\t// not collinear\n\n\t\t\t\t// length of vectors for normalizing\n\n\t\t\t\tvar v_prev_len = Math.sqrt( v_prev_lensq );\n\t\t\t\tvar v_next_len = Math.sqrt( v_next_x * v_next_x + v_next_y * v_next_y );\n\n\t\t\t\t// shift adjacent points by unit vectors to the left\n\n\t\t\t\tvar ptPrevShift_x = ( inPrev.x - v_prev_y / v_prev_len );\n\t\t\t\tvar ptPrevShift_y = ( inPrev.y + v_prev_x / v_prev_len );\n\n\t\t\t\tvar ptNextShift_x = ( inNext.x - v_next_y / v_next_len );\n\t\t\t\tvar ptNextShift_y = ( inNext.y + v_next_x / v_next_len );\n\n\t\t\t\t// scaling factor for v_prev to intersection point\n\n\t\t\t\tvar sf = ( ( ptNextShift_x - ptPrevShift_x ) * v_next_y -\n\t\t\t\t\t\t( ptNextShift_y - ptPrevShift_y ) * v_next_x ) /\n\t\t\t\t\t( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\t\t// vector from inPt to intersection point\n\n\t\t\t\tv_trans_x = ( ptPrevShift_x + v_prev_x * sf - inPt.x );\n\t\t\t\tv_trans_y = ( ptPrevShift_y + v_prev_y * sf - inPt.y );\n\n\t\t\t\t// Don't normalize!, otherwise sharp corners become ugly\n\t\t\t\t// but prevent crazy spikes\n\t\t\t\tvar v_trans_lensq = ( v_trans_x * v_trans_x + v_trans_y * v_trans_y );\n\t\t\t\tif ( v_trans_lensq <= 2 ) {\n\n\t\t\t\t\treturn new Vector2( v_trans_x, v_trans_y );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tshrink_by = Math.sqrt( v_trans_lensq / 2 );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t// handle special case of collinear edges\n\n\t\t\t\tvar direction_eq = false; // assumes: opposite\n\t\t\t\tif ( v_prev_x > Number.EPSILON ) {\n\n\t\t\t\t\tif ( v_next_x > Number.EPSILON ) {\n\n\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( v_prev_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\tif ( v_next_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tif ( Math.sign( v_prev_y ) === Math.sign( v_next_y ) ) {\n\n\t\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( direction_eq ) {\n\n\t\t\t\t\t// console.log(\"Warning: lines are a straight sequence\");\n\t\t\t\t\tv_trans_x = - v_prev_y;\n\t\t\t\t\tv_trans_y = v_prev_x;\n\t\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// console.log(\"Warning: lines are a straight spike\");\n\t\t\t\t\tv_trans_x = v_prev_x;\n\t\t\t\t\tv_trans_y = v_prev_y;\n\t\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq / 2 );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn new Vector2( v_trans_x / shrink_by, v_trans_y / shrink_by );\n\n\t\t}", "function getBevelVec( inPt, inPrev, inNext ) {\n\n\t\t\t// computes for inPt the corresponding point inPt' on a new contour\n\t\t\t// shifted by 1 unit (length of normalized vector) to the left\n\t\t\t// if we walk along contour clockwise, this new contour is outside the old one\n\t\t\t//\n\t\t\t// inPt' is the intersection of the two lines parallel to the two\n\t\t\t// adjacent edges of inPt at a distance of 1 unit on the left side.\n\n\t\t\tvar v_trans_x, v_trans_y, shrink_by; // resulting translation vector for inPt\n\n\t\t\t// good reading for geometry algorithms (here: line-line intersection)\n\t\t\t// http://geomalgorithms.com/a05-_intersect-1.html\n\n\t\t\tvar v_prev_x = inPt.x - inPrev.x,\n\t\t\t\tv_prev_y = inPt.y - inPrev.y;\n\t\t\tvar v_next_x = inNext.x - inPt.x,\n\t\t\t\tv_next_y = inNext.y - inPt.y;\n\n\t\t\tvar v_prev_lensq = ( v_prev_x * v_prev_x + v_prev_y * v_prev_y );\n\n\t\t\t// check for collinear edges\n\t\t\tvar collinear0 = ( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\tif ( Math.abs( collinear0 ) > Number.EPSILON ) {\n\n\t\t\t\t// not collinear\n\n\t\t\t\t// length of vectors for normalizing\n\n\t\t\t\tvar v_prev_len = Math.sqrt( v_prev_lensq );\n\t\t\t\tvar v_next_len = Math.sqrt( v_next_x * v_next_x + v_next_y * v_next_y );\n\n\t\t\t\t// shift adjacent points by unit vectors to the left\n\n\t\t\t\tvar ptPrevShift_x = ( inPrev.x - v_prev_y / v_prev_len );\n\t\t\t\tvar ptPrevShift_y = ( inPrev.y + v_prev_x / v_prev_len );\n\n\t\t\t\tvar ptNextShift_x = ( inNext.x - v_next_y / v_next_len );\n\t\t\t\tvar ptNextShift_y = ( inNext.y + v_next_x / v_next_len );\n\n\t\t\t\t// scaling factor for v_prev to intersection point\n\n\t\t\t\tvar sf = ( ( ptNextShift_x - ptPrevShift_x ) * v_next_y -\n\t\t\t\t\t\t( ptNextShift_y - ptPrevShift_y ) * v_next_x ) /\n\t\t\t\t\t( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\t\t// vector from inPt to intersection point\n\n\t\t\t\tv_trans_x = ( ptPrevShift_x + v_prev_x * sf - inPt.x );\n\t\t\t\tv_trans_y = ( ptPrevShift_y + v_prev_y * sf - inPt.y );\n\n\t\t\t\t// Don't normalize!, otherwise sharp corners become ugly\n\t\t\t\t// but prevent crazy spikes\n\t\t\t\tvar v_trans_lensq = ( v_trans_x * v_trans_x + v_trans_y * v_trans_y );\n\t\t\t\tif ( v_trans_lensq <= 2 ) {\n\n\t\t\t\t\treturn new Vector2( v_trans_x, v_trans_y );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tshrink_by = Math.sqrt( v_trans_lensq / 2 );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t// handle special case of collinear edges\n\n\t\t\t\tvar direction_eq = false; // assumes: opposite\n\t\t\t\tif ( v_prev_x > Number.EPSILON ) {\n\n\t\t\t\t\tif ( v_next_x > Number.EPSILON ) {\n\n\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( v_prev_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\tif ( v_next_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tif ( Math.sign( v_prev_y ) === Math.sign( v_next_y ) ) {\n\n\t\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( direction_eq ) {\n\n\t\t\t\t\t// console.log(\"Warning: lines are a straight sequence\");\n\t\t\t\t\tv_trans_x = - v_prev_y;\n\t\t\t\t\tv_trans_y = v_prev_x;\n\t\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// console.log(\"Warning: lines are a straight spike\");\n\t\t\t\t\tv_trans_x = v_prev_x;\n\t\t\t\t\tv_trans_y = v_prev_y;\n\t\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq / 2 );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn new Vector2( v_trans_x / shrink_by, v_trans_y / shrink_by );\n\n\t\t}", "function getBevelVec( inPt, inPrev, inNext ) {\n\n\t\t\t// computes for inPt the corresponding point inPt' on a new contour\n\t\t\t// shifted by 1 unit (length of normalized vector) to the left\n\t\t\t// if we walk along contour clockwise, this new contour is outside the old one\n\t\t\t//\n\t\t\t// inPt' is the intersection of the two lines parallel to the two\n\t\t\t// adjacent edges of inPt at a distance of 1 unit on the left side.\n\n\t\t\tvar v_trans_x, v_trans_y, shrink_by; // resulting translation vector for inPt\n\n\t\t\t// good reading for geometry algorithms (here: line-line intersection)\n\t\t\t// http://geomalgorithms.com/a05-_intersect-1.html\n\n\t\t\tvar v_prev_x = inPt.x - inPrev.x,\n\t\t\t\tv_prev_y = inPt.y - inPrev.y;\n\t\t\tvar v_next_x = inNext.x - inPt.x,\n\t\t\t\tv_next_y = inNext.y - inPt.y;\n\n\t\t\tvar v_prev_lensq = ( v_prev_x * v_prev_x + v_prev_y * v_prev_y );\n\n\t\t\t// check for collinear edges\n\t\t\tvar collinear0 = ( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\tif ( Math.abs( collinear0 ) > Number.EPSILON ) {\n\n\t\t\t\t// not collinear\n\n\t\t\t\t// length of vectors for normalizing\n\n\t\t\t\tvar v_prev_len = Math.sqrt( v_prev_lensq );\n\t\t\t\tvar v_next_len = Math.sqrt( v_next_x * v_next_x + v_next_y * v_next_y );\n\n\t\t\t\t// shift adjacent points by unit vectors to the left\n\n\t\t\t\tvar ptPrevShift_x = ( inPrev.x - v_prev_y / v_prev_len );\n\t\t\t\tvar ptPrevShift_y = ( inPrev.y + v_prev_x / v_prev_len );\n\n\t\t\t\tvar ptNextShift_x = ( inNext.x - v_next_y / v_next_len );\n\t\t\t\tvar ptNextShift_y = ( inNext.y + v_next_x / v_next_len );\n\n\t\t\t\t// scaling factor for v_prev to intersection point\n\n\t\t\t\tvar sf = ( ( ptNextShift_x - ptPrevShift_x ) * v_next_y -\n\t\t\t\t\t\t( ptNextShift_y - ptPrevShift_y ) * v_next_x ) /\n\t\t\t\t\t( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\t\t// vector from inPt to intersection point\n\n\t\t\t\tv_trans_x = ( ptPrevShift_x + v_prev_x * sf - inPt.x );\n\t\t\t\tv_trans_y = ( ptPrevShift_y + v_prev_y * sf - inPt.y );\n\n\t\t\t\t// Don't normalize!, otherwise sharp corners become ugly\n\t\t\t\t// but prevent crazy spikes\n\t\t\t\tvar v_trans_lensq = ( v_trans_x * v_trans_x + v_trans_y * v_trans_y );\n\t\t\t\tif ( v_trans_lensq <= 2 ) {\n\n\t\t\t\t\treturn new Vector2( v_trans_x, v_trans_y );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tshrink_by = Math.sqrt( v_trans_lensq / 2 );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t// handle special case of collinear edges\n\n\t\t\t\tvar direction_eq = false; // assumes: opposite\n\t\t\t\tif ( v_prev_x > Number.EPSILON ) {\n\n\t\t\t\t\tif ( v_next_x > Number.EPSILON ) {\n\n\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( v_prev_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\tif ( v_next_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tif ( Math.sign( v_prev_y ) === Math.sign( v_next_y ) ) {\n\n\t\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( direction_eq ) {\n\n\t\t\t\t\t// console.log(\"Warning: lines are a straight sequence\");\n\t\t\t\t\tv_trans_x = - v_prev_y;\n\t\t\t\t\tv_trans_y = v_prev_x;\n\t\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// console.log(\"Warning: lines are a straight spike\");\n\t\t\t\t\tv_trans_x = v_prev_x;\n\t\t\t\t\tv_trans_y = v_prev_y;\n\t\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq / 2 );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn new Vector2( v_trans_x / shrink_by, v_trans_y / shrink_by );\n\n\t\t}", "function getBevelVec( inPt, inPrev, inNext ) {\n\n\t\t\t// computes for inPt the corresponding point inPt' on a new contour\n\t\t\t// shifted by 1 unit (length of normalized vector) to the left\n\t\t\t// if we walk along contour clockwise, this new contour is outside the old one\n\t\t\t//\n\t\t\t// inPt' is the intersection of the two lines parallel to the two\n\t\t\t// adjacent edges of inPt at a distance of 1 unit on the left side.\n\n\t\t\tvar v_trans_x, v_trans_y, shrink_by; // resulting translation vector for inPt\n\n\t\t\t// good reading for geometry algorithms (here: line-line intersection)\n\t\t\t// http://geomalgorithms.com/a05-_intersect-1.html\n\n\t\t\tvar v_prev_x = inPt.x - inPrev.x,\n\t\t\t\tv_prev_y = inPt.y - inPrev.y;\n\t\t\tvar v_next_x = inNext.x - inPt.x,\n\t\t\t\tv_next_y = inNext.y - inPt.y;\n\n\t\t\tvar v_prev_lensq = ( v_prev_x * v_prev_x + v_prev_y * v_prev_y );\n\n\t\t\t// check for collinear edges\n\t\t\tvar collinear0 = ( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\tif ( Math.abs( collinear0 ) > Number.EPSILON ) {\n\n\t\t\t\t// not collinear\n\n\t\t\t\t// length of vectors for normalizing\n\n\t\t\t\tvar v_prev_len = Math.sqrt( v_prev_lensq );\n\t\t\t\tvar v_next_len = Math.sqrt( v_next_x * v_next_x + v_next_y * v_next_y );\n\n\t\t\t\t// shift adjacent points by unit vectors to the left\n\n\t\t\t\tvar ptPrevShift_x = ( inPrev.x - v_prev_y / v_prev_len );\n\t\t\t\tvar ptPrevShift_y = ( inPrev.y + v_prev_x / v_prev_len );\n\n\t\t\t\tvar ptNextShift_x = ( inNext.x - v_next_y / v_next_len );\n\t\t\t\tvar ptNextShift_y = ( inNext.y + v_next_x / v_next_len );\n\n\t\t\t\t// scaling factor for v_prev to intersection point\n\n\t\t\t\tvar sf = ( ( ptNextShift_x - ptPrevShift_x ) * v_next_y -\n\t\t\t\t\t\t( ptNextShift_y - ptPrevShift_y ) * v_next_x ) /\n\t\t\t\t\t( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\t\t// vector from inPt to intersection point\n\n\t\t\t\tv_trans_x = ( ptPrevShift_x + v_prev_x * sf - inPt.x );\n\t\t\t\tv_trans_y = ( ptPrevShift_y + v_prev_y * sf - inPt.y );\n\n\t\t\t\t// Don't normalize!, otherwise sharp corners become ugly\n\t\t\t\t// but prevent crazy spikes\n\t\t\t\tvar v_trans_lensq = ( v_trans_x * v_trans_x + v_trans_y * v_trans_y );\n\t\t\t\tif ( v_trans_lensq <= 2 ) {\n\n\t\t\t\t\treturn new Vector2( v_trans_x, v_trans_y );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tshrink_by = Math.sqrt( v_trans_lensq / 2 );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t// handle special case of collinear edges\n\n\t\t\t\tvar direction_eq = false; // assumes: opposite\n\t\t\t\tif ( v_prev_x > Number.EPSILON ) {\n\n\t\t\t\t\tif ( v_next_x > Number.EPSILON ) {\n\n\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( v_prev_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\tif ( v_next_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tif ( Math.sign( v_prev_y ) === Math.sign( v_next_y ) ) {\n\n\t\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( direction_eq ) {\n\n\t\t\t\t\t// console.log(\"Warning: lines are a straight sequence\");\n\t\t\t\t\tv_trans_x = - v_prev_y;\n\t\t\t\t\tv_trans_y = v_prev_x;\n\t\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// console.log(\"Warning: lines are a straight spike\");\n\t\t\t\t\tv_trans_x = v_prev_x;\n\t\t\t\t\tv_trans_y = v_prev_y;\n\t\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq / 2 );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn new Vector2( v_trans_x / shrink_by, v_trans_y / shrink_by );\n\n\t\t}", "function getBevelVec( inPt, inPrev, inNext ) {\n\n\t\t\t// computes for inPt the corresponding point inPt' on a new contour\n\t\t\t// shifted by 1 unit (length of normalized vector) to the left\n\t\t\t// if we walk along contour clockwise, this new contour is outside the old one\n\t\t\t//\n\t\t\t// inPt' is the intersection of the two lines parallel to the two\n\t\t\t// adjacent edges of inPt at a distance of 1 unit on the left side.\n\n\t\t\tvar v_trans_x, v_trans_y, shrink_by; // resulting translation vector for inPt\n\n\t\t\t// good reading for geometry algorithms (here: line-line intersection)\n\t\t\t// http://geomalgorithms.com/a05-_intersect-1.html\n\n\t\t\tvar v_prev_x = inPt.x - inPrev.x,\n\t\t\t\tv_prev_y = inPt.y - inPrev.y;\n\t\t\tvar v_next_x = inNext.x - inPt.x,\n\t\t\t\tv_next_y = inNext.y - inPt.y;\n\n\t\t\tvar v_prev_lensq = ( v_prev_x * v_prev_x + v_prev_y * v_prev_y );\n\n\t\t\t// check for collinear edges\n\t\t\tvar collinear0 = ( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\tif ( Math.abs( collinear0 ) > Number.EPSILON ) {\n\n\t\t\t\t// not collinear\n\n\t\t\t\t// length of vectors for normalizing\n\n\t\t\t\tvar v_prev_len = Math.sqrt( v_prev_lensq );\n\t\t\t\tvar v_next_len = Math.sqrt( v_next_x * v_next_x + v_next_y * v_next_y );\n\n\t\t\t\t// shift adjacent points by unit vectors to the left\n\n\t\t\t\tvar ptPrevShift_x = ( inPrev.x - v_prev_y / v_prev_len );\n\t\t\t\tvar ptPrevShift_y = ( inPrev.y + v_prev_x / v_prev_len );\n\n\t\t\t\tvar ptNextShift_x = ( inNext.x - v_next_y / v_next_len );\n\t\t\t\tvar ptNextShift_y = ( inNext.y + v_next_x / v_next_len );\n\n\t\t\t\t// scaling factor for v_prev to intersection point\n\n\t\t\t\tvar sf = ( ( ptNextShift_x - ptPrevShift_x ) * v_next_y -\n\t\t\t\t\t\t( ptNextShift_y - ptPrevShift_y ) * v_next_x ) /\n\t\t\t\t\t( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\t\t// vector from inPt to intersection point\n\n\t\t\t\tv_trans_x = ( ptPrevShift_x + v_prev_x * sf - inPt.x );\n\t\t\t\tv_trans_y = ( ptPrevShift_y + v_prev_y * sf - inPt.y );\n\n\t\t\t\t// Don't normalize!, otherwise sharp corners become ugly\n\t\t\t\t// but prevent crazy spikes\n\t\t\t\tvar v_trans_lensq = ( v_trans_x * v_trans_x + v_trans_y * v_trans_y );\n\t\t\t\tif ( v_trans_lensq <= 2 ) {\n\n\t\t\t\t\treturn new Vector2( v_trans_x, v_trans_y );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tshrink_by = Math.sqrt( v_trans_lensq / 2 );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t// handle special case of collinear edges\n\n\t\t\t\tvar direction_eq = false; // assumes: opposite\n\t\t\t\tif ( v_prev_x > Number.EPSILON ) {\n\n\t\t\t\t\tif ( v_next_x > Number.EPSILON ) {\n\n\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( v_prev_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\tif ( v_next_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tif ( Math.sign( v_prev_y ) === Math.sign( v_next_y ) ) {\n\n\t\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( direction_eq ) {\n\n\t\t\t\t\t// console.log(\"Warning: lines are a straight sequence\");\n\t\t\t\t\tv_trans_x = - v_prev_y;\n\t\t\t\t\tv_trans_y = v_prev_x;\n\t\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// console.log(\"Warning: lines are a straight spike\");\n\t\t\t\t\tv_trans_x = v_prev_x;\n\t\t\t\t\tv_trans_y = v_prev_y;\n\t\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq / 2 );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn new Vector2( v_trans_x / shrink_by, v_trans_y / shrink_by );\n\n\t\t}", "function getBevelVec( inPt, inPrev, inNext ) {\n\n\t\t\t// computes for inPt the corresponding point inPt' on a new contour\n\t\t\t// shifted by 1 unit (length of normalized vector) to the left\n\t\t\t// if we walk along contour clockwise, this new contour is outside the old one\n\t\t\t//\n\t\t\t// inPt' is the intersection of the two lines parallel to the two\n\t\t\t// adjacent edges of inPt at a distance of 1 unit on the left side.\n\n\t\t\tvar v_trans_x, v_trans_y, shrink_by; // resulting translation vector for inPt\n\n\t\t\t// good reading for geometry algorithms (here: line-line intersection)\n\t\t\t// http://geomalgorithms.com/a05-_intersect-1.html\n\n\t\t\tvar v_prev_x = inPt.x - inPrev.x,\n\t\t\t\tv_prev_y = inPt.y - inPrev.y;\n\t\t\tvar v_next_x = inNext.x - inPt.x,\n\t\t\t\tv_next_y = inNext.y - inPt.y;\n\n\t\t\tvar v_prev_lensq = ( v_prev_x * v_prev_x + v_prev_y * v_prev_y );\n\n\t\t\t// check for collinear edges\n\t\t\tvar collinear0 = ( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\tif ( Math.abs( collinear0 ) > Number.EPSILON ) {\n\n\t\t\t\t// not collinear\n\n\t\t\t\t// length of vectors for normalizing\n\n\t\t\t\tvar v_prev_len = Math.sqrt( v_prev_lensq );\n\t\t\t\tvar v_next_len = Math.sqrt( v_next_x * v_next_x + v_next_y * v_next_y );\n\n\t\t\t\t// shift adjacent points by unit vectors to the left\n\n\t\t\t\tvar ptPrevShift_x = ( inPrev.x - v_prev_y / v_prev_len );\n\t\t\t\tvar ptPrevShift_y = ( inPrev.y + v_prev_x / v_prev_len );\n\n\t\t\t\tvar ptNextShift_x = ( inNext.x - v_next_y / v_next_len );\n\t\t\t\tvar ptNextShift_y = ( inNext.y + v_next_x / v_next_len );\n\n\t\t\t\t// scaling factor for v_prev to intersection point\n\n\t\t\t\tvar sf = ( ( ptNextShift_x - ptPrevShift_x ) * v_next_y -\n\t\t\t\t\t\t( ptNextShift_y - ptPrevShift_y ) * v_next_x ) /\n\t\t\t\t\t( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\t\t// vector from inPt to intersection point\n\n\t\t\t\tv_trans_x = ( ptPrevShift_x + v_prev_x * sf - inPt.x );\n\t\t\t\tv_trans_y = ( ptPrevShift_y + v_prev_y * sf - inPt.y );\n\n\t\t\t\t// Don't normalize!, otherwise sharp corners become ugly\n\t\t\t\t// but prevent crazy spikes\n\t\t\t\tvar v_trans_lensq = ( v_trans_x * v_trans_x + v_trans_y * v_trans_y );\n\t\t\t\tif ( v_trans_lensq <= 2 ) {\n\n\t\t\t\t\treturn new Vector2( v_trans_x, v_trans_y );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tshrink_by = Math.sqrt( v_trans_lensq / 2 );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t// handle special case of collinear edges\n\n\t\t\t\tvar direction_eq = false; // assumes: opposite\n\t\t\t\tif ( v_prev_x > Number.EPSILON ) {\n\n\t\t\t\t\tif ( v_next_x > Number.EPSILON ) {\n\n\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( v_prev_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\tif ( v_next_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tif ( Math.sign( v_prev_y ) === Math.sign( v_next_y ) ) {\n\n\t\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( direction_eq ) {\n\n\t\t\t\t\t// console.log(\"Warning: lines are a straight sequence\");\n\t\t\t\t\tv_trans_x = - v_prev_y;\n\t\t\t\t\tv_trans_y = v_prev_x;\n\t\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// console.log(\"Warning: lines are a straight spike\");\n\t\t\t\t\tv_trans_x = v_prev_x;\n\t\t\t\t\tv_trans_y = v_prev_y;\n\t\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq / 2 );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn new Vector2( v_trans_x / shrink_by, v_trans_y / shrink_by );\n\n\t\t}", "function getBevelVec( inPt, inPrev, inNext ) {\n\n\t\t\t// computes for inPt the corresponding point inPt' on a new contour\n\t\t\t// shifted by 1 unit (length of normalized vector) to the left\n\t\t\t// if we walk along contour clockwise, this new contour is outside the old one\n\t\t\t//\n\t\t\t// inPt' is the intersection of the two lines parallel to the two\n\t\t\t// adjacent edges of inPt at a distance of 1 unit on the left side.\n\n\t\t\tvar v_trans_x, v_trans_y, shrink_by; // resulting translation vector for inPt\n\n\t\t\t// good reading for geometry algorithms (here: line-line intersection)\n\t\t\t// http://geomalgorithms.com/a05-_intersect-1.html\n\n\t\t\tvar v_prev_x = inPt.x - inPrev.x,\n\t\t\t\tv_prev_y = inPt.y - inPrev.y;\n\t\t\tvar v_next_x = inNext.x - inPt.x,\n\t\t\t\tv_next_y = inNext.y - inPt.y;\n\n\t\t\tvar v_prev_lensq = ( v_prev_x * v_prev_x + v_prev_y * v_prev_y );\n\n\t\t\t// check for collinear edges\n\t\t\tvar collinear0 = ( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\tif ( Math.abs( collinear0 ) > Number.EPSILON ) {\n\n\t\t\t\t// not collinear\n\n\t\t\t\t// length of vectors for normalizing\n\n\t\t\t\tvar v_prev_len = Math.sqrt( v_prev_lensq );\n\t\t\t\tvar v_next_len = Math.sqrt( v_next_x * v_next_x + v_next_y * v_next_y );\n\n\t\t\t\t// shift adjacent points by unit vectors to the left\n\n\t\t\t\tvar ptPrevShift_x = ( inPrev.x - v_prev_y / v_prev_len );\n\t\t\t\tvar ptPrevShift_y = ( inPrev.y + v_prev_x / v_prev_len );\n\n\t\t\t\tvar ptNextShift_x = ( inNext.x - v_next_y / v_next_len );\n\t\t\t\tvar ptNextShift_y = ( inNext.y + v_next_x / v_next_len );\n\n\t\t\t\t// scaling factor for v_prev to intersection point\n\n\t\t\t\tvar sf = ( ( ptNextShift_x - ptPrevShift_x ) * v_next_y -\n\t\t\t\t\t\t( ptNextShift_y - ptPrevShift_y ) * v_next_x ) /\n\t\t\t\t\t( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\t\t// vector from inPt to intersection point\n\n\t\t\t\tv_trans_x = ( ptPrevShift_x + v_prev_x * sf - inPt.x );\n\t\t\t\tv_trans_y = ( ptPrevShift_y + v_prev_y * sf - inPt.y );\n\n\t\t\t\t// Don't normalize!, otherwise sharp corners become ugly\n\t\t\t\t// but prevent crazy spikes\n\t\t\t\tvar v_trans_lensq = ( v_trans_x * v_trans_x + v_trans_y * v_trans_y );\n\t\t\t\tif ( v_trans_lensq <= 2 ) {\n\n\t\t\t\t\treturn new Vector2( v_trans_x, v_trans_y );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tshrink_by = Math.sqrt( v_trans_lensq / 2 );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t// handle special case of collinear edges\n\n\t\t\t\tvar direction_eq = false; // assumes: opposite\n\t\t\t\tif ( v_prev_x > Number.EPSILON ) {\n\n\t\t\t\t\tif ( v_next_x > Number.EPSILON ) {\n\n\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( v_prev_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\tif ( v_next_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tif ( Math.sign( v_prev_y ) === Math.sign( v_next_y ) ) {\n\n\t\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( direction_eq ) {\n\n\t\t\t\t\t// console.log(\"Warning: lines are a straight sequence\");\n\t\t\t\t\tv_trans_x = - v_prev_y;\n\t\t\t\t\tv_trans_y = v_prev_x;\n\t\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// console.log(\"Warning: lines are a straight spike\");\n\t\t\t\t\tv_trans_x = v_prev_x;\n\t\t\t\t\tv_trans_y = v_prev_y;\n\t\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq / 2 );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn new Vector2( v_trans_x / shrink_by, v_trans_y / shrink_by );\n\n\t\t}", "function surface_offset(x, y)\n{\n\t//post('plinko offset', x, y, '\\n');\n\ts_offset = [x, y];\n}", "function getBevelVec( inPt, inPrev, inNext ) {\n\n\t\t// computes for inPt the corresponding point inPt' on a new contour\n\t\t// shifted by 1 unit (length of normalized vector) to the left\n\t\t// if we walk along contour clockwise, this new contour is outside the old one\n\t\t//\n\t\t// inPt' is the intersection of the two lines parallel to the two\n\t\t// adjacent edges of inPt at a distance of 1 unit on the left side.\n\n\t\tvar v_trans_x, v_trans_y, shrink_by = 1;\t\t// resulting translation vector for inPt\n\n\t\t// good reading for geometry algorithms (here: line-line intersection)\n\t\t// http://geomalgorithms.com/a05-_intersect-1.html\n\n\t\tvar v_prev_x = inPt.x - inPrev.x, v_prev_y = inPt.y - inPrev.y;\n\t\tvar v_next_x = inNext.x - inPt.x, v_next_y = inNext.y - inPt.y;\n\n\t\tvar v_prev_lensq = ( v_prev_x * v_prev_x + v_prev_y * v_prev_y );\n\n\t\t// check for collinear edges\n\t\tvar collinear0 = ( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\tif ( Math.abs( collinear0 ) > Number.EPSILON ) {\n\n\t\t\t// not collinear\n\n\t\t\t// length of vectors for normalizing\n\n\t\t\tvar v_prev_len = Math.sqrt( v_prev_lensq );\n\t\t\tvar v_next_len = Math.sqrt( v_next_x * v_next_x + v_next_y * v_next_y );\n\n\t\t\t// shift adjacent points by unit vectors to the left\n\n\t\t\tvar ptPrevShift_x = ( inPrev.x - v_prev_y / v_prev_len );\n\t\t\tvar ptPrevShift_y = ( inPrev.y + v_prev_x / v_prev_len );\n\n\t\t\tvar ptNextShift_x = ( inNext.x - v_next_y / v_next_len );\n\t\t\tvar ptNextShift_y = ( inNext.y + v_next_x / v_next_len );\n\n\t\t\t// scaling factor for v_prev to intersection point\n\n\t\t\tvar sf = ( ( ptNextShift_x - ptPrevShift_x ) * v_next_y -\n\t\t\t\t\t\t( ptNextShift_y - ptPrevShift_y ) * v_next_x ) /\n\t\t\t\t\t ( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\t// vector from inPt to intersection point\n\n\t\t\tv_trans_x = ( ptPrevShift_x + v_prev_x * sf - inPt.x );\n\t\t\tv_trans_y = ( ptPrevShift_y + v_prev_y * sf - inPt.y );\n\n\t\t\t// Don't normalize!, otherwise sharp corners become ugly\n\t\t\t// but prevent crazy spikes\n\t\t\tvar v_trans_lensq = ( v_trans_x * v_trans_x + v_trans_y * v_trans_y );\n\t\t\tif ( v_trans_lensq <= 2 ) {\n\n\t\t\t\treturn\tnew Vector2( v_trans_x, v_trans_y );\n\n\t\t\t} else {\n\n\t\t\t\tshrink_by = Math.sqrt( v_trans_lensq / 2 );\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// handle special case of collinear edges\n\n\t\t\tvar direction_eq = false;\t\t// assumes: opposite\n\t\t\tif ( v_prev_x > Number.EPSILON ) {\n\n\t\t\t\tif ( v_next_x > Number.EPSILON ) {\n\n\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tif ( v_prev_x < - Number.EPSILON ) {\n\n\t\t\t\t\tif ( v_next_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( Math.sign( v_prev_y ) === Math.sign( v_next_y ) ) {\n\n\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( direction_eq ) {\n\n\t\t\t\t// console.log(\"Warning: lines are a straight sequence\");\n\t\t\t\tv_trans_x = - v_prev_y;\n\t\t\t\tv_trans_y = v_prev_x;\n\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq );\n\n\t\t\t} else {\n\n\t\t\t\t// console.log(\"Warning: lines are a straight spike\");\n\t\t\t\tv_trans_x = v_prev_x;\n\t\t\t\tv_trans_y = v_prev_y;\n\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq / 2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn\tnew Vector2( v_trans_x / shrink_by, v_trans_y / shrink_by );\n\n\t}", "function getBevelVec( inPt, inPrev, inNext ) {\n\n\t\t// computes for inPt the corresponding point inPt' on a new contour\n\t\t// shifted by 1 unit (length of normalized vector) to the left\n\t\t// if we walk along contour clockwise, this new contour is outside the old one\n\t\t//\n\t\t// inPt' is the intersection of the two lines parallel to the two\n\t\t// adjacent edges of inPt at a distance of 1 unit on the left side.\n\n\t\tvar v_trans_x, v_trans_y, shrink_by = 1;\t\t// resulting translation vector for inPt\n\n\t\t// good reading for geometry algorithms (here: line-line intersection)\n\t\t// http://geomalgorithms.com/a05-_intersect-1.html\n\n\t\tvar v_prev_x = inPt.x - inPrev.x, v_prev_y = inPt.y - inPrev.y;\n\t\tvar v_next_x = inNext.x - inPt.x, v_next_y = inNext.y - inPt.y;\n\n\t\tvar v_prev_lensq = ( v_prev_x * v_prev_x + v_prev_y * v_prev_y );\n\n\t\t// check for collinear edges\n\t\tvar collinear0 = ( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\tif ( Math.abs( collinear0 ) > Number.EPSILON ) {\n\n\t\t\t// not collinear\n\n\t\t\t// length of vectors for normalizing\n\n\t\t\tvar v_prev_len = Math.sqrt( v_prev_lensq );\n\t\t\tvar v_next_len = Math.sqrt( v_next_x * v_next_x + v_next_y * v_next_y );\n\n\t\t\t// shift adjacent points by unit vectors to the left\n\n\t\t\tvar ptPrevShift_x = ( inPrev.x - v_prev_y / v_prev_len );\n\t\t\tvar ptPrevShift_y = ( inPrev.y + v_prev_x / v_prev_len );\n\n\t\t\tvar ptNextShift_x = ( inNext.x - v_next_y / v_next_len );\n\t\t\tvar ptNextShift_y = ( inNext.y + v_next_x / v_next_len );\n\n\t\t\t// scaling factor for v_prev to intersection point\n\n\t\t\tvar sf = ( ( ptNextShift_x - ptPrevShift_x ) * v_next_y -\n\t\t\t\t\t\t( ptNextShift_y - ptPrevShift_y ) * v_next_x ) /\n\t\t\t\t\t ( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\t// vector from inPt to intersection point\n\n\t\t\tv_trans_x = ( ptPrevShift_x + v_prev_x * sf - inPt.x );\n\t\t\tv_trans_y = ( ptPrevShift_y + v_prev_y * sf - inPt.y );\n\n\t\t\t// Don't normalize!, otherwise sharp corners become ugly\n\t\t\t// but prevent crazy spikes\n\t\t\tvar v_trans_lensq = ( v_trans_x * v_trans_x + v_trans_y * v_trans_y );\n\t\t\tif ( v_trans_lensq <= 2 ) {\n\n\t\t\t\treturn\tnew THREE.Vector2( v_trans_x, v_trans_y );\n\n\t\t\t} else {\n\n\t\t\t\tshrink_by = Math.sqrt( v_trans_lensq / 2 );\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// handle special case of collinear edges\n\n\t\t\tvar direction_eq = false;\t\t// assumes: opposite\n\t\t\tif ( v_prev_x > Number.EPSILON ) {\n\n\t\t\t\tif ( v_next_x > Number.EPSILON ) {\n\n\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tif ( v_prev_x < - Number.EPSILON ) {\n\n\t\t\t\t\tif ( v_next_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( Math.sign( v_prev_y ) === Math.sign( v_next_y ) ) {\n\n\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( direction_eq ) {\n\n\t\t\t\t// console.log(\"Warning: lines are a straight sequence\");\n\t\t\t\tv_trans_x = - v_prev_y;\n\t\t\t\tv_trans_y = v_prev_x;\n\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq );\n\n\t\t\t} else {\n\n\t\t\t\t// console.log(\"Warning: lines are a straight spike\");\n\t\t\t\tv_trans_x = v_prev_x;\n\t\t\t\tv_trans_y = v_prev_y;\n\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq / 2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn\tnew THREE.Vector2( v_trans_x / shrink_by, v_trans_y / shrink_by );\n\n\t}", "function getBevelVec( inPt, inPrev, inNext ) {\n\n\t\t// computes for inPt the corresponding point inPt' on a new contour\n\t\t// shifted by 1 unit (length of normalized vector) to the left\n\t\t// if we walk along contour clockwise, this new contour is outside the old one\n\t\t//\n\t\t// inPt' is the intersection of the two lines parallel to the two\n\t\t// adjacent edges of inPt at a distance of 1 unit on the left side.\n\n\t\tvar v_trans_x, v_trans_y, shrink_by = 1;\t\t// resulting translation vector for inPt\n\n\t\t// good reading for geometry algorithms (here: line-line intersection)\n\t\t// http://geomalgorithms.com/a05-_intersect-1.html\n\n\t\tvar v_prev_x = inPt.x - inPrev.x, v_prev_y = inPt.y - inPrev.y;\n\t\tvar v_next_x = inNext.x - inPt.x, v_next_y = inNext.y - inPt.y;\n\n\t\tvar v_prev_lensq = ( v_prev_x * v_prev_x + v_prev_y * v_prev_y );\n\n\t\t// check for collinear edges\n\t\tvar collinear0 = ( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\tif ( Math.abs( collinear0 ) > Number.EPSILON ) {\n\n\t\t\t// not collinear\n\n\t\t\t// length of vectors for normalizing\n\n\t\t\tvar v_prev_len = Math.sqrt( v_prev_lensq );\n\t\t\tvar v_next_len = Math.sqrt( v_next_x * v_next_x + v_next_y * v_next_y );\n\n\t\t\t// shift adjacent points by unit vectors to the left\n\n\t\t\tvar ptPrevShift_x = ( inPrev.x - v_prev_y / v_prev_len );\n\t\t\tvar ptPrevShift_y = ( inPrev.y + v_prev_x / v_prev_len );\n\n\t\t\tvar ptNextShift_x = ( inNext.x - v_next_y / v_next_len );\n\t\t\tvar ptNextShift_y = ( inNext.y + v_next_x / v_next_len );\n\n\t\t\t// scaling factor for v_prev to intersection point\n\n\t\t\tvar sf = ( ( ptNextShift_x - ptPrevShift_x ) * v_next_y -\n\t\t\t\t\t\t( ptNextShift_y - ptPrevShift_y ) * v_next_x ) /\n\t\t\t\t\t ( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\t// vector from inPt to intersection point\n\n\t\t\tv_trans_x = ( ptPrevShift_x + v_prev_x * sf - inPt.x );\n\t\t\tv_trans_y = ( ptPrevShift_y + v_prev_y * sf - inPt.y );\n\n\t\t\t// Don't normalize!, otherwise sharp corners become ugly\n\t\t\t// but prevent crazy spikes\n\t\t\tvar v_trans_lensq = ( v_trans_x * v_trans_x + v_trans_y * v_trans_y );\n\t\t\tif ( v_trans_lensq <= 2 ) {\n\n\t\t\t\treturn\tnew THREE.Vector2( v_trans_x, v_trans_y );\n\n\t\t\t} else {\n\n\t\t\t\tshrink_by = Math.sqrt( v_trans_lensq / 2 );\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// handle special case of collinear edges\n\n\t\t\tvar direction_eq = false;\t\t// assumes: opposite\n\t\t\tif ( v_prev_x > Number.EPSILON ) {\n\n\t\t\t\tif ( v_next_x > Number.EPSILON ) {\n\n\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tif ( v_prev_x < - Number.EPSILON ) {\n\n\t\t\t\t\tif ( v_next_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( Math.sign( v_prev_y ) === Math.sign( v_next_y ) ) {\n\n\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( direction_eq ) {\n\n\t\t\t\t// console.log(\"Warning: lines are a straight sequence\");\n\t\t\t\tv_trans_x = - v_prev_y;\n\t\t\t\tv_trans_y = v_prev_x;\n\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq );\n\n\t\t\t} else {\n\n\t\t\t\t// console.log(\"Warning: lines are a straight spike\");\n\t\t\t\tv_trans_x = v_prev_x;\n\t\t\t\tv_trans_y = v_prev_y;\n\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq / 2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn\tnew THREE.Vector2( v_trans_x / shrink_by, v_trans_y / shrink_by );\n\n\t}", "function getBevelVec( inPt, inPrev, inNext ) {\n\n\t\t// computes for inPt the corresponding point inPt' on a new contour\n\t\t// shifted by 1 unit (length of normalized vector) to the left\n\t\t// if we walk along contour clockwise, this new contour is outside the old one\n\t\t//\n\t\t// inPt' is the intersection of the two lines parallel to the two\n\t\t// adjacent edges of inPt at a distance of 1 unit on the left side.\n\n\t\tvar v_trans_x, v_trans_y, shrink_by = 1;\t\t// resulting translation vector for inPt\n\n\t\t// good reading for geometry algorithms (here: line-line intersection)\n\t\t// http://geomalgorithms.com/a05-_intersect-1.html\n\n\t\tvar v_prev_x = inPt.x - inPrev.x, v_prev_y = inPt.y - inPrev.y;\n\t\tvar v_next_x = inNext.x - inPt.x, v_next_y = inNext.y - inPt.y;\n\n\t\tvar v_prev_lensq = ( v_prev_x * v_prev_x + v_prev_y * v_prev_y );\n\n\t\t// check for collinear edges\n\t\tvar collinear0 = ( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\tif ( Math.abs( collinear0 ) > Number.EPSILON ) {\n\n\t\t\t// not collinear\n\n\t\t\t// length of vectors for normalizing\n\n\t\t\tvar v_prev_len = Math.sqrt( v_prev_lensq );\n\t\t\tvar v_next_len = Math.sqrt( v_next_x * v_next_x + v_next_y * v_next_y );\n\n\t\t\t// shift adjacent points by unit vectors to the left\n\n\t\t\tvar ptPrevShift_x = ( inPrev.x - v_prev_y / v_prev_len );\n\t\t\tvar ptPrevShift_y = ( inPrev.y + v_prev_x / v_prev_len );\n\n\t\t\tvar ptNextShift_x = ( inNext.x - v_next_y / v_next_len );\n\t\t\tvar ptNextShift_y = ( inNext.y + v_next_x / v_next_len );\n\n\t\t\t// scaling factor for v_prev to intersection point\n\n\t\t\tvar sf = ( ( ptNextShift_x - ptPrevShift_x ) * v_next_y -\n\t\t\t\t\t\t( ptNextShift_y - ptPrevShift_y ) * v_next_x ) /\n\t\t\t\t\t ( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\t// vector from inPt to intersection point\n\n\t\t\tv_trans_x = ( ptPrevShift_x + v_prev_x * sf - inPt.x );\n\t\t\tv_trans_y = ( ptPrevShift_y + v_prev_y * sf - inPt.y );\n\n\t\t\t// Don't normalize!, otherwise sharp corners become ugly\n\t\t\t// but prevent crazy spikes\n\t\t\tvar v_trans_lensq = ( v_trans_x * v_trans_x + v_trans_y * v_trans_y );\n\t\t\tif ( v_trans_lensq <= 2 ) {\n\n\t\t\t\treturn\tnew Vector2( v_trans_x, v_trans_y );\n\n\t\t\t} else {\n\n\t\t\t\tshrink_by = Math.sqrt( v_trans_lensq / 2 );\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// handle special case of collinear edges\n\n\t\t\tvar direction_eq = false;\t\t// assumes: opposite\n\t\t\tif ( v_prev_x > Number.EPSILON ) {\n\n\t\t\t\tif ( v_next_x > Number.EPSILON ) {\n\n\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tif ( v_prev_x < - Number.EPSILON ) {\n\n\t\t\t\t\tif ( v_next_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( Math.sign( v_prev_y ) === Math.sign( v_next_y ) ) {\n\n\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( direction_eq ) {\n\n\t\t\t\t// console.log(\"Warning: lines are a straight sequence\");\n\t\t\t\tv_trans_x = - v_prev_y;\n\t\t\t\tv_trans_y = v_prev_x;\n\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq );\n\n\t\t\t} else {\n\n\t\t\t\t// console.log(\"Warning: lines are a straight spike\");\n\t\t\t\tv_trans_x = v_prev_x;\n\t\t\t\tv_trans_y = v_prev_y;\n\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq / 2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn\tnew Vector2( v_trans_x / shrink_by, v_trans_y / shrink_by );\n\n\t}", "function getBevelVec( inPt, inPrev, inNext ) {\n\n\t\t// computes for inPt the corresponding point inPt' on a new contour\n\t\t// shifted by 1 unit (length of normalized vector) to the left\n\t\t// if we walk along contour clockwise, this new contour is outside the old one\n\t\t//\n\t\t// inPt' is the intersection of the two lines parallel to the two\n\t\t// adjacent edges of inPt at a distance of 1 unit on the left side.\n\n\t\tvar v_trans_x, v_trans_y, shrink_by = 1;\t\t// resulting translation vector for inPt\n\n\t\t// good reading for geometry algorithms (here: line-line intersection)\n\t\t// http://geomalgorithms.com/a05-_intersect-1.html\n\n\t\tvar v_prev_x = inPt.x - inPrev.x, v_prev_y = inPt.y - inPrev.y;\n\t\tvar v_next_x = inNext.x - inPt.x, v_next_y = inNext.y - inPt.y;\n\n\t\tvar v_prev_lensq = ( v_prev_x * v_prev_x + v_prev_y * v_prev_y );\n\n\t\t// check for collinear edges\n\t\tvar collinear0 = ( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\tif ( Math.abs( collinear0 ) > Number.EPSILON ) {\n\n\t\t\t// not collinear\n\n\t\t\t// length of vectors for normalizing\n\n\t\t\tvar v_prev_len = Math.sqrt( v_prev_lensq );\n\t\t\tvar v_next_len = Math.sqrt( v_next_x * v_next_x + v_next_y * v_next_y );\n\n\t\t\t// shift adjacent points by unit vectors to the left\n\n\t\t\tvar ptPrevShift_x = ( inPrev.x - v_prev_y / v_prev_len );\n\t\t\tvar ptPrevShift_y = ( inPrev.y + v_prev_x / v_prev_len );\n\n\t\t\tvar ptNextShift_x = ( inNext.x - v_next_y / v_next_len );\n\t\t\tvar ptNextShift_y = ( inNext.y + v_next_x / v_next_len );\n\n\t\t\t// scaling factor for v_prev to intersection point\n\n\t\t\tvar sf = ( ( ptNextShift_x - ptPrevShift_x ) * v_next_y -\n\t\t\t\t\t\t( ptNextShift_y - ptPrevShift_y ) * v_next_x ) /\n\t\t\t\t\t ( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\t// vector from inPt to intersection point\n\n\t\t\tv_trans_x = ( ptPrevShift_x + v_prev_x * sf - inPt.x );\n\t\t\tv_trans_y = ( ptPrevShift_y + v_prev_y * sf - inPt.y );\n\n\t\t\t// Don't normalize!, otherwise sharp corners become ugly\n\t\t\t// but prevent crazy spikes\n\t\t\tvar v_trans_lensq = ( v_trans_x * v_trans_x + v_trans_y * v_trans_y );\n\t\t\tif ( v_trans_lensq <= 2 ) {\n\n\t\t\t\treturn\tnew Vector2( v_trans_x, v_trans_y );\n\n\t\t\t} else {\n\n\t\t\t\tshrink_by = Math.sqrt( v_trans_lensq / 2 );\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// handle special case of collinear edges\n\n\t\t\tvar direction_eq = false;\t\t// assumes: opposite\n\t\t\tif ( v_prev_x > Number.EPSILON ) {\n\n\t\t\t\tif ( v_next_x > Number.EPSILON ) {\n\n\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tif ( v_prev_x < - Number.EPSILON ) {\n\n\t\t\t\t\tif ( v_next_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( Math.sign( v_prev_y ) === Math.sign( v_next_y ) ) {\n\n\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( direction_eq ) {\n\n\t\t\t\t// console.log(\"Warning: lines are a straight sequence\");\n\t\t\t\tv_trans_x = - v_prev_y;\n\t\t\t\tv_trans_y = v_prev_x;\n\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq );\n\n\t\t\t} else {\n\n\t\t\t\t// console.log(\"Warning: lines are a straight spike\");\n\t\t\t\tv_trans_x = v_prev_x;\n\t\t\t\tv_trans_y = v_prev_y;\n\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq / 2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn\tnew Vector2( v_trans_x / shrink_by, v_trans_y / shrink_by );\n\n\t}" ]
[ "0.61555076", "0.6136213", "0.592017", "0.5753711", "0.5637825", "0.5612782", "0.54631627", "0.5454807", "0.5444906", "0.53873765", "0.5300839", "0.5262509", "0.51919144", "0.5177952", "0.5157787", "0.5157787", "0.5157787", "0.5149515", "0.51270515", "0.5126161", "0.5105256", "0.50747734", "0.5045306", "0.50257725", "0.50113297", "0.5009223", "0.49981377", "0.4997953", "0.49835432", "0.49831185", "0.4977358", "0.4967447", "0.49613354", "0.4957923", "0.4954629", "0.49511796", "0.49333426", "0.49299115", "0.4899726", "0.48695374", "0.48582122", "0.48573563", "0.48207012", "0.48192826", "0.47923183", "0.4790656", "0.4778463", "0.4767488", "0.47526667", "0.4736803", "0.4736803", "0.47256994", "0.4722919", "0.4722457", "0.47215927", "0.47153348", "0.4715044", "0.47142485", "0.46863297", "0.46818534", "0.46770817", "0.46768257", "0.4668548", "0.46615916", "0.465953", "0.46571895", "0.46533102", "0.46474192", "0.46439418", "0.46307787", "0.46306756", "0.46282792", "0.46273986", "0.4620566", "0.4620025", "0.4615993", "0.4615993", "0.4615993", "0.4611322", "0.46093988", "0.46093988", "0.46005428", "0.4597532", "0.4597532", "0.459745", "0.4596347", "0.45928186", "0.45928186", "0.45928186", "0.45928186", "0.45928186", "0.45928186", "0.45928186", "0.45928186", "0.45928186", "0.4590718", "0.4588986", "0.4588986", "0.4588986", "0.4588986", "0.4588986" ]
0.0
-1
Calculate the slopes of the tangents (Hermitetype interpolation) based on the following paper: Steffen, M. 1990. A Simple Method for Monotonic Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO. NOV(II), P. 443, 1990.
function slope3(that, x2, y2) { var h0 = that._x1 - that._x0, h1 = x2 - that._x1, s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0), s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0), p = (s0 * h1 + s1 * h0) / (h0 + h1); return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function d3_svg_lineSlope(p0, p1) {\n return (p1[1] - p0[1]) / (p1[0] - p0[0]);\n}", "function d3_svg_lineSlope(p0, p1) {\n return (p1[1] - p0[1]) / (p1[0] - p0[0]);\n}", "function d3_svg_lineSlope(p0, p1) {\n return (p1[1] - p0[1]) / (p1[0] - p0[0]);\n}", "function slope2(that,t){var h=that._x1-that._x0;return h?(3*(that._y1-that._y0)/h-t)/2:t}", "function d4_svg_lineSlope(p0, p1) {\n return (p1[1] - p0[1]) / (p1[0] - p0[0]);\n}", "function getSlope(aT, aA1, aA2) { return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1); }", "function d3_v3_svg_lineSlope(p0, p1) {\n return (p1[1] - p0[1]) / (p1[0] - p0[0]);\n}", "function getSlope (aT, aA1, aA2) { return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1); }", "function getSlope (aT, aA1, aA2) { return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1); }", "function getSlope (aT, aA1, aA2) { return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1); }", "function getSlope (aT, aA1, aA2) { return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1); }", "function getSlope (aT, aA1, aA2) { return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1); }", "function getSlope (aT, aA1, aA2) { return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1); }", "function getSlope (aT, aA1, aA2) { return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1); }", "function d3_svg_lineMonotoneTangents(points) {\n var tangents = [],\n d,\n a,\n b,\n s,\n m = d3_svg_lineFiniteDifferences(points),\n i = -1,\n j = points.length - 1;\n\n // The first two steps are done by computing finite-differences:\n // 1. Compute the slopes of the secant lines between successive points.\n // 2. Initialize the tangents at every point as the average of the secants.\n\n // Then, for each segment…\n while (++i < j) {\n d = d3_svg_lineSlope(points[i], points[i + 1]);\n\n // 3. If two successive yk = y{k + 1} are equal (i.e., d is zero), then set\n // mk = m{k + 1} = 0 as the spline connecting these points must be flat to\n // preserve monotonicity. Ignore step 4 and 5 for those k.\n\n if (Math.abs(d) < 1e-6) {\n m[i] = m[i + 1] = 0;\n } else {\n // 4. Let ak = mk / dk and bk = m{k + 1} / dk.\n a = m[i] / d;\n b = m[i + 1] / d;\n\n // 5. Prevent overshoot and ensure monotonicity by restricting the\n // magnitude of vector <ak, bk> to a circle of radius 3.\n s = a * a + b * b;\n if (s > 9) {\n s = d * 3 / Math.sqrt(s);\n m[i] = s * a;\n m[i + 1] = s * b;\n }\n }\n }\n\n // Compute the normalized tangent vector from the slopes. Note that if x is\n // not monotonic, it's possible that the slope will be infinite, so we protect\n // against NaN by setting the coordinate to zero.\n i = -1; while (++i <= j) {\n s = (points[Math.min(j, i + 1)][0] - points[Math.max(0, i - 1)][0])\n / (6 * (1 + m[i] * m[i]));\n tangents.push([s || 0, m[i] * s || 0]);\n }\n\n return tangents;\n}", "function d3_svg_lineMonotoneTangents(points) {\n var tangents = [],\n d,\n a,\n b,\n s,\n m = d3_svg_lineFiniteDifferences(points),\n i = -1,\n j = points.length - 1;\n\n // The first two steps are done by computing finite-differences:\n // 1. Compute the slopes of the secant lines between successive points.\n // 2. Initialize the tangents at every point as the average of the secants.\n\n // Then, for each segment…\n while (++i < j) {\n d = d3_svg_lineSlope(points[i], points[i + 1]);\n\n // 3. If two successive yk = y{k + 1} are equal (i.e., d is zero), then set\n // mk = m{k + 1} = 0 as the spline connecting these points must be flat to\n // preserve monotonicity. Ignore step 4 and 5 for those k.\n\n if (Math.abs(d) < 1e-6) {\n m[i] = m[i + 1] = 0;\n } else {\n // 4. Let ak = mk / dk and bk = m{k + 1} / dk.\n a = m[i] / d;\n b = m[i + 1] / d;\n\n // 5. Prevent overshoot and ensure monotonicity by restricting the\n // magnitude of vector <ak, bk> to a circle of radius 3.\n s = a * a + b * b;\n if (s > 9) {\n s = d * 3 / Math.sqrt(s);\n m[i] = s * a;\n m[i + 1] = s * b;\n }\n }\n }\n\n // Compute the normalized tangent vector from the slopes. Note that if x is\n // not monotonic, it's possible that the slope will be infinite, so we protect\n // against NaN by setting the coordinate to zero.\n i = -1; while (++i <= j) {\n s = (points[Math.min(j, i + 1)][0] - points[Math.max(0, i - 1)][0])\n / (6 * (1 + m[i] * m[i]));\n tangents.push([s || 0, m[i] * s || 0]);\n }\n\n return tangents;\n}", "function d3_svg_lineMonotoneTangents(points) {\n var tangents = [],\n d,\n a,\n b,\n s,\n m = d3_svg_lineFiniteDifferences(points),\n i = -1,\n j = points.length - 1;\n\n // The first two steps are done by computing finite-differences:\n // 1. Compute the slopes of the secant lines between successive points.\n // 2. Initialize the tangents at every point as the average of the secants.\n\n // Then, for each segment…\n while (++i < j) {\n d = d3_svg_lineSlope(points[i], points[i + 1]);\n\n // 3. If two successive yk = y{k + 1} are equal (i.e., d is zero), then set\n // mk = m{k + 1} = 0 as the spline connecting these points must be flat to\n // preserve monotonicity. Ignore step 4 and 5 for those k.\n\n if (Math.abs(d) < 1e-6) {\n m[i] = m[i + 1] = 0;\n } else {\n // 4. Let ak = mk / dk and bk = m{k + 1} / dk.\n a = m[i] / d;\n b = m[i + 1] / d;\n\n // 5. Prevent overshoot and ensure monotonicity by restricting the\n // magnitude of vector <ak, bk> to a circle of radius 3.\n s = a * a + b * b;\n if (s > 9) {\n s = d * 3 / Math.sqrt(s);\n m[i] = s * a;\n m[i + 1] = s * b;\n }\n }\n }\n\n // Compute the normalized tangent vector from the slopes. Note that if x is\n // not monotonic, it's possible that the slope will be infinite, so we protect\n // against NaN by setting the coordinate to zero.\n i = -1; while (++i <= j) {\n s = (points[Math.min(j, i + 1)][0] - points[Math.max(0, i - 1)][0]) / (6 * (1 + m[i] * m[i]));\n tangents.push([s || 0, m[i] * s || 0]);\n }\n\n return tangents;\n}", "function d4_svg_lineMonotoneTangents(points) {\n var tangents = [],\n d,\n a,\n b,\n s,\n m = d4_svg_lineFiniteDifferences(points),\n i = -1,\n j = points.length - 1;\n\n // The first two steps are done by computing finite-differences:\n // 1. Compute the slopes of the secant lines between successive points.\n // 2. Initialize the tangents at every point as the average of the secants.\n\n // Then, for each segment…\n while (++i < j) {\n d = d4_svg_lineSlope(points[i], points[i + 1]);\n\n // 3. If two successive yk = y{k + 1} are equal (i.e., d is zero), then set\n // mk = m{k + 1} = 0 as the spline connecting these points must be flat to\n // preserve monotonicity. Ignore step 4 and 5 for those k.\n\n if (Math.abs(d) < 1e-6) {\n m[i] = m[i + 1] = 0;\n } else {\n // 4. Let ak = mk / dk and bk = m{k + 1} / dk.\n a = m[i] / d;\n b = m[i + 1] / d;\n\n // 5. Prevent overshoot and ensure monotonicity by restricting the\n // magnitude of vector <ak, bk> to a circle of radius 3.\n s = a * a + b * b;\n if (s > 9) {\n s = d * 3 / Math.sqrt(s);\n m[i] = s * a;\n m[i + 1] = s * b;\n }\n }\n }\n\n // Compute the normalized tangent vector from the slopes. Note that if x is\n // not monotonic, it's possible that the slope will be infinite, so we protect\n // against NaN by setting the coordinate to zero.\n i = -1; while (++i <= j) {\n s = (points[Math.min(j, i + 1)][0] - points[Math.max(0, i - 1)][0]) / (6 * (1 + m[i] * m[i]));\n tangents.push([s || 0, m[i] * s || 0]);\n }\n\n return tangents;\n}", "function d3_v3_svg_lineMonotoneTangents(points) {\n var tangents = [],\n d,\n a,\n b,\n s,\n m = d3_v3_svg_lineFiniteDifferences(points),\n i = -1,\n j = points.length - 1;\n\n // The first two steps are done by computing finite-differences:\n // 1. Compute the slopes of the secant lines between successive points.\n // 2. Initialize the tangents at every point as the average of the secants.\n\n // Then, for each segment…\n while (++i < j) {\n d = d3_v3_svg_lineSlope(points[i], points[i + 1]);\n\n // 3. If two successive yk = y{k + 1} are equal (i.e., d is zero), then set\n // mk = m{k + 1} = 0 as the spline connecting these points must be flat to\n // preserve monotonicity. Ignore step 4 and 5 for those k.\n\n if (Math.abs(d) < 1e-6) {\n m[i] = m[i + 1] = 0;\n } else {\n // 4. Let ak = mk / dk and bk = m{k + 1} / dk.\n a = m[i] / d;\n b = m[i + 1] / d;\n\n // 5. Prevent overshoot and ensure monotonicity by restricting the\n // magnitude of vector <ak, bk> to a circle of radius 3.\n s = a * a + b * b;\n if (s > 9) {\n s = d * 3 / Math.sqrt(s);\n m[i] = s * a;\n m[i + 1] = s * b;\n }\n }\n }\n\n // Compute the normalized tangent vector from the slopes. Note that if x is\n // not monotonic, it's possible that the slope will be infinite, so we protect\n // against NaN by setting the coordinate to zero.\n i = -1; while (++i <= j) {\n s = (points[Math.min(j, i + 1)][0] - points[Math.max(0, i - 1)][0])\n / (6 * (1 + m[i] * m[i]));\n tangents.push([s || 0, m[i] * s || 0]);\n }\n\n return tangents;\n}", "function getSlope(aT, aA1, aA2) {\n return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);\n}", "function getSlope(aT, aA1, aA2) {\n return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);\n}", "function getSlope(aT, aA1, aA2) {\n return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);\n}", "function getSlope (aT, aA1, aA2) {\n return 3.0 * A(aA1, aA2)*aT*aT + 2.0 * B(aA1, aA2) * aT + C(aA1);\n}", "function visualizeSlopes(svg, render) {\n var h = render.h;\n var strokes = [];\n var r = 0.25 / Math.sqrt(h.length);\n for (var i = 0; i < h.length; i++) {\n if (h[i] <= 0 || isnearedge(h.mesh, i)) continue;\n var nbs = neighbours(h.mesh, i);\n nbs.push(i);\n var s = 0;\n var s2 = 0;\n for (var j = 0; j < nbs.length; j++) {\n var slopes = trislope(h, nbs[j]);\n s += slopes[0] / 10;\n s2 += slopes[1];\n }\n s /= nbs.length;\n s2 /= nbs.length;\n if (Math.abs(s) < runif(0.1, 0.4)) continue;\n var l = r * runif(1, 2) * (1 - 0.2 * Math.pow(Math.atan(s), 2)) * Math.exp(s2 / 100);\n var x = h.mesh.vxs[i][0];\n var y = h.mesh.vxs[i][1];\n if (Math.abs(l * s) > 2 * r) {\n var n = Math.floor(Math.abs(l * s / r));\n l /= n;\n if (n > 4) n = 4;\n for (var j = 0; j < n; j++) {\n var u = rnorm() * r;\n var v = rnorm() * r;\n strokes.push([\n [x + u - l, y + v + l * s],\n [x + u + l, y + v - l * s]\n ]);\n }\n } else {\n strokes.push([\n [x - l, y + l * s],\n [x + l, y - l * s]\n ]);\n }\n }\n var lines = svg.selectAll('line.slope').data(strokes)\n lines.enter()\n .append('line')\n .classed('slope', true);\n lines.exit()\n .remove();\n svg.selectAll('line.slope')\n .attr('x1', function(d) {\n return 1000 * d[0][0]\n })\n .attr('y1', function(d) {\n return 1000 * d[0][1]\n })\n .attr('x2', function(d) {\n return 1000 * d[1][0]\n })\n .attr('y2', function(d) {\n return 1000 * d[1][1]\n })\n }", "static getSlope(aT, aA1, aA2) {\n return 3.0 * this.A(aA1, aA2) * aT * aT + 2.0 * this.B(aA1, aA2) * aT + this.C(aA1);\n }", "function getSlope(aT, aA1, aA2) {\n return 3 * A(aA1, aA2) * aT * aT + 2 * B(aA1, aA2) * aT + C(aA1);\n }", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function GetSlope(aT, aA1, aA2) {\n return 3.0 * A(aA1, aA2)*aT*aT + 2.0 * B(aA1, aA2) * aT + C(aA1);\n }", "function GetSlope(aT, aA1, aA2) {\n return 3.0 * A(aA1, aA2)*aT*aT + 2.0 * B(aA1, aA2) * aT + C(aA1);\n }", "function getSlope (aT, aA1, aA2) {\r\n return 3.0 * A(aA1, aA2)*aT*aT + 2.0 * B(aA1, aA2) * aT + C(aA1);\r\n }", "function getSlope (aT, aA1, aA2) {\r\n return 3.0 * A(aA1, aA2)*aT*aT + 2.0 * B(aA1, aA2) * aT + C(aA1);\r\n }", "function getSlope (aT, aA1, aA2) {\r\n return 3.0 * A(aA1, aA2)*aT*aT + 2.0 * B(aA1, aA2) * aT + C(aA1);\r\n }", "function accumulate_tangent(v) {\n vec3.sub(p01, v[1].position, v[0].position);\n vec3.sub(p02, v[2].position, v[0].position);\n\n vec3.sub(t01, v[1].texcoord, v[0].texcoord);\n vec3.sub(t02, v[2].texcoord, v[0].texcoord);\n\n var r = 1.0 / (t01[0]*t02[1] - t02[0]*t01[1]);\n\n sdir[0] = r * (t02[1]*p01[0] - t01[1]*p02[0]);\n sdir[1] = r * (t02[1]*p01[1] - t01[1]*p02[1]);\n sdir[2] = r * (t02[1]*p01[2] - t01[1]*p02[2]);\n\n //tdir[0] = r * (t02[0]*p02[0] - t01[0]*p01[0]);\n //tdir[1] = r * (t02[0]*p02[1] - t01[0]*p01[1]);\n //tdir[2] = r * (t02[0]*p02[2] - t01[0]*p01[2]);\n\n for (var i = 0; i < 3; ++i) {\n vec3.add(v[i].tangent, v[i].tangent, sdir);\n //vec3.add(v[i].bitangent, v[i].bitangent, tdir);\n }\n }", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n }", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n }", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n }", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n }", "function getSlope (aT, aA1, aA2) {\n return 3.0 * A(aA1, aA2)*aT*aT + 2.0 * B(aA1, aA2) * aT + C(aA1);\n }" ]
[ "0.6538685", "0.6538685", "0.6538685", "0.6504977", "0.64406794", "0.6413437", "0.6412215", "0.6385186", "0.6385186", "0.6385186", "0.6385186", "0.6385186", "0.6385186", "0.6385186", "0.63743275", "0.63743275", "0.637079", "0.6367638", "0.63454497", "0.6232359", "0.6232359", "0.6232359", "0.6226175", "0.61820024", "0.61105233", "0.610099", "0.6082798", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.605106", "0.604859", "0.604859", "0.6047472", "0.6047472", "0.6047472", "0.5997652", "0.59880024", "0.59880024", "0.59880024", "0.59880024", "0.59831184" ]
0.0
-1
Calculate a onesided slope.
function slope2(that, t) { var h = that._x1 - that._x0; return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calculateSlope() {\n let x1 = 2;\n let x2 = 4;\n let firstPointY = 2 * x1 - 2;\n let secondPointY = 2 * x2 - 2;\n return (secondPointY - firstPointY) / (x2 - x1);\n}", "function slope(a, b) {\n return (b.y - a.y) / (b.x - a.x);\n }", "function slope(a, b) {\n return (b.y - a.y) / (b.x - a.x);\n }", "function slope(a, b) {\n return (b.y - a.y) / (b.x - a.x);\n }", "function slope(a, b) {\n return (b.y - a.y) / (b.x - a.x);\n }", "function d4_svg_lineSlope(p0, p1) {\n return (p1[1] - p0[1]) / (p1[0] - p0[0]);\n}", "function d3_svg_lineSlope(p0, p1) {\n return (p1[1] - p0[1]) / (p1[0] - p0[0]);\n}", "function d3_svg_lineSlope(p0, p1) {\n return (p1[1] - p0[1]) / (p1[0] - p0[0]);\n}", "function d3_svg_lineSlope(p0, p1) {\n return (p1[1] - p0[1]) / (p1[0] - p0[0]);\n}", "function calcSlope(a, b) {\n return ((b.y - a.y)/(b.x - a.x));\n}", "function slope(serie,startBarsAgo,endBarsAgo){\n\t\tvar dx = startBarsAgo - endBarsAgo;\n\t\tvar dy = diffSeries(barsAgo(serie,endBarsAgo), barsAgo(serie,startBarsAgo));\n\t\t\t\t\n\t\treturn div(dy,dx);\n\t}", "function slope2(that,t){var h=that._x1-that._x0;return h?(3*(that._y1-that._y0)/h-t)/2:t}", "function calculateSlope(point1, point2) {\n var deltaX = point2[0] - point1[0];\n var deltaY = point2[1] - point1[1];\n var slope = deltaY / deltaX;\n slope *= 100;\n return slope;\n}", "function d3_v3_svg_lineSlope(p0, p1) {\n return (p1[1] - p0[1]) / (p1[0] - p0[0]);\n}", "function slopeFormula(x1, y1, x2, y2) {\r\n return(y2 - y1) / (x2 - x1);\r\n\r\n}", "function slope3(that,x2,y2){var h0=that._x1-that._x0,h1=x2-that._x1,s0=(that._y1-that._y0)/(h0||h1<0&&-0),s1=(y2-that._y1)/(h1||h0<0&&-0),p=(s0*h1+s1*h0)/(h0+h1);return(sign(s0)+sign(s1))*Math.min(Math.abs(s0),Math.abs(s1),0.5*Math.abs(p))||0;}// Calculate a one-sided slope.", "function getSlope(a, b) {\n return (b.y - a.y) / (b.x - a.x);\n}", "function slope(x1, y1, x2, y2) {\n\n var dx = (x2 - x1);\n var dy = (y2 - y1);\n\n return Math.atan2(dy, dx);\n}", "function slope(x1, y1, x2, y2) {\n\n var dx = (x2 - x1);\n var dy = (y2 - y1);\n\n return Math.atan2(dy, dx);\n}", "function slopeFromPoints([x1, y1], [x2, y2]) {\n return (y2 - y1) / (x2 - x1);\n}", "function slope3(that,x2,y2){var h0=that._x1-that._x0,h1=x2-that._x1,s0=(that._y1-that._y0)/(h0||h1<0&&-0),s1=(y2-that._y1)/(h1||h0<0&&-0),p=(s0*h1+s1*h0)/(h0+h1);return(sign(s0)+sign(s1))*Math.min(Math.abs(s0),Math.abs(s1),.5*Math.abs(p))||0}", "function pointSlopeForm(x1,y1,slope,x=[]){\n //returns y values\n var y = [];\n\n for(var i = 0; i<x.length;i++){\n var foo = slope*(x[i]-x1)+y1;\n y.push(foo);\n }\n return(y);\n }", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}", "function slope3(that, x2, y2) {\n var h0 = that._x1 - that._x0,\n h1 = x2 - that._x1,\n s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0),\n s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0),\n p = (s0 * h1 + s1 * h0) / (h0 + h1);\n return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;\n} // Calculate a one-sided slope.", "function slope3(that, x2, y2) {\n var h0 = that._x1 - that._x0,\n h1 = x2 - that._x1,\n s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0),\n s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0),\n p = (s0 * h1 + s1 * h0) / (h0 + h1);\n return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;\n} // Calculate a one-sided slope.", "function slope3(that, x2, y2) {\n var h0 = that._x1 - that._x0,\n h1 = x2 - that._x1,\n s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0),\n s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0),\n p = (s0 * h1 + s1 * h0) / (h0 + h1);\n return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;\n} // Calculate a one-sided slope.", "function slope3(that, x2, y2) {\n var h0 = that._x1 - that._x0,\n h1 = x2 - that._x1,\n s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0),\n s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0),\n p = (s0 * h1 + s1 * h0) / (h0 + h1);\n return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;\n} // Calculate a one-sided slope.", "function slope3(that, x2, y2) {\n var h0 = that._x1 - that._x0,\n h1 = x2 - that._x1,\n s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0),\n s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0),\n p = (s0 * h1 + s1 * h0) / (h0 + h1);\n return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;\n} // Calculate a one-sided slope.", "function slope2(that, t) {\n\t var h = that._x1 - that._x0;\n\t return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n\t }", "function slope2(that, t) {\n\t var h = that._x1 - that._x0;\n\t return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n\t }", "function slope2(that, t) {\n\t var h = that._x1 - that._x0;\n\t return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n\t }", "function slope2(that, t) {\n\t var h = that._x1 - that._x0;\n\t return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n\t }", "function getSlopeY(x) {\n return first_y_px + ((x - first_x_px) * slope);\n }", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n }", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n }", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n }", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n }", "function slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n }" ]
[ "0.7581995", "0.74803245", "0.74803245", "0.74425995", "0.74425995", "0.7222996", "0.7183728", "0.7183728", "0.7183728", "0.7166007", "0.7138525", "0.713446", "0.71305066", "0.711682", "0.7022051", "0.70193577", "0.700835", "0.69189817", "0.69015527", "0.6782913", "0.6677642", "0.66470927", "0.6578327", "0.65572107", "0.65572107", "0.65572107", "0.65572107", "0.65572107", "0.6549859", "0.6549859", "0.6549859", "0.6549859", "0.65459734", "0.65362406", "0.65362406", "0.65362406", "0.65362406", "0.65361243" ]
0.65396535
95
Callback invoked upon receiving a change event.
function onChange() { __debug_488( 'Received a change event.' ); if ( self._autoRender ) { // eslint-disable-line no-underscore-dangle self.render(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onChange() {\n\t\t__debug_452( 'Received a change event.' );\n\t\tself.render();\n\t}", "change() { }", "function onChange() {\n\t\t__debug_330( 'Received a change event.' );\n\t\tself.render();\n\t}", "handleEventChange() {\n }", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_730( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "onChange(callback) {\n\t\tthis.changeCallback = callback;\n\t}", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_259( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_587( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_596( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_412( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_475( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_520( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "onChanged(e){}", "function onChange() {\n\t\t__debug_457( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_332( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_429( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_577( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "onchange() {}", "function onChange() {\n console.log(\"something changed...\");\n \n }", "function onChange() {\n\t\t__debug_395( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "addChangeListener(callback) {\n this.on('change', callback);\n }", "function changeEvent() {\n var value_sub = properties.value;\n trigger_param_list.push(value_sub);\n // 'seek' event is like a forced-change event\n $pebble_slider_object.triggerHandler('seek', trigger_param_list);\n if (prev_change_value !== value_sub) {\n $pebble_slider_object.triggerHandler('change', trigger_param_list);\n prev_change_value = value_sub;\n }\n trigger_param_list.length = 0;\n }", "onChange(callback) {\n this.events.change.push({ callback });\n }", "function onChange() {\n if (input.get.call(element, valueField) !== observer.oldValue && !element.readOnly) {\n observer.set(input.get.call(element, valueField));\n }\n }", "function changeFunction() {\n\tconsole.log(\"onchange\");\n}", "addChangeListener (callback) {\n this.on(Constants.CHANGE_EVENT, callback);\n }", "onDidChange(callback) {\n return this.emitter.on('did-change', callback)\n }", "change(/*event*/) {\n this._super(...arguments);\n this._parse();\n }", "addChangeListener (callback) {\n\t\tthis.on(Constants.CHANGE_EVENT, callback);\n\t}", "function handleChange(editor, data, value) {\n onChange(value);\n }", "function handleChange(editor, data, value) {\n onChange(value);\n }", "onDataChange() {}", "changedCallback () {\n\t\tif (this.oldValue === this.value) return;\n\t\tthis._setTranslation();\n\t}", "change(fn, options) {\n\t\treturn this.on({ change: fn }, options);\n\t}", "change(fn, options) {\n\t\treturn this.on({ change: fn }, options);\n\t}", "onChange () {}", "onChange () {}", "onChange(changeListener) {\n changeListener.path = this.path;\n privateDataMap.get(this).addListener(changeListener, this.path);\n }", "handleChange(event) {\n this.dispatchEvent(new CustomEvent('change', {detail: event.target.value}));\n }", "function changed(change) {\n if (change.changeType === \"property\" && change.property === property) {\n fn(change);\n }\n }", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "_setOnChanges(){\n\t\tthis.inputs.forEach(i => i.addEventListener('change', this._onChange.bind(this)));\t\n\t}", "handleChange(event) {\n\n }", "emitChange() {\n\t\tthis.emit(CHANGE_EVENT)\n\t}", "function onChangeHandler(e) {\n\n }", "function onChangeHandler(e) {\n\n }", "addChangeListener(callback) {\n\t\tthis.on(CHANGE_EVENT, callback)\n\t}", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "internalOnChange(event) {\n const me = this,\n value = me.value,\n oldValue = me._lastValue;\n\n // Don't trigger change if we enter invalid value or if value has not changed (for IE when pressing ENTER)\n if (me.isValid && value !== oldValue) {\n me._lastValue = value;\n\n // trigger change event, signaling that origin is from user\n me.trigger('change', { value, oldValue, event, userAction: true });\n\n // per default Field triggers action event on change, but might be reconfigured in subclasses (such as Combo)\n if (me.defaultAction === 'change') {\n me.trigger('action', { value, oldValue, event });\n }\n }\n\n // since Widget has Events mixed in configured with 'callOnFunctions' this will also call onClick and onAction\n }", "handleChange () {\n this.props.onStatusChange(\n this.props.item.id,\n this.refs.checkbox.checked ? 'RESERVED' : 'NEW'\n );\n }", "_valueChanged() {\n // Send a global refresh to the bapge body.\n var event = new Event(\"change\");\n this._root.dispatchEvent(event);\n }", "emitChange() {\n this.emit(CHANGE_EVENT);\n }", "emitChange() {\n this.emit(CHANGE_EVENT);\n }", "_triggerChangeEvent() {\n\t\tif ( this.$control.rendered && ! this.changeEventDisabled ) {\n\t\t\tthis._updateSettings();\n\t\t\tthis.events.emit( 'change', this.settings );\n\t\t}\n\t}", "handleChange(event){\n changeHandler(event,this);\n }", "setOnValueChangeEvent(func){\r\n this._onValueChange = func;\r\n }", "function referenceOnChange() {\n MicroReferenceAPI.onStatusChange(criteriaId);\n }", "function handleChange(event, newValue) {\n setValue(newValue);\n }", "onChange(callback) {\n this.listeners.push(callback);\n }", "onGenericChange() {\n this.contentChanged.emit(void 0);\n }", "afterValidChange() { }", "static on_changed(chr, _retval) {\n let uuid = chr.getUuid()\n console.log(colours.fg.blue + \"[BLE] [CHANGE ]\" + colours.fg.yellow + \" UUID: \" + uuid.toString() + colours.fg.magenta + \" | data: 0x\" + bytes2hex(chr.getValue()) + colours.reset);\n }", "changedInput() {\n\n\t\tlet {isValid, error} = this.state.wasInvalid ? this.validate() : this.state;\n\t\tlet onChange = this.props.onChange;\n\t\tif (onChange) {\n\t\t\tonChange(this.getValue(), isValid, error);\n\t\t}\n\t\tif (this.context.validationSchema) {\n\t\t\tlet value = this.getValue();\n\t\t\tif (this.state.isMultiSelect && value === '') {\n\t\t\t\tvalue = [];\n\t\t\t}\n\t\t\tif (this.shouldTypeBeNumberBySchemeDefinition(this.props.pointer)) {\n\t\t\t\tvalue = Number(value);\n\t\t\t}\n\t\t\tthis.context.validationParent.onValueChanged(this.props.pointer, value, isValid, error);\n\t\t}\n\t}", "_evtChange(event) { }", "on_change(event)\n\t{\n\t\t// Extract `value` from the argument\n\t\t// of this `onChange` listener\n\t\t// (for convenience)\n\n\t\tlet value = event\n\n\t\tif (event.target !== undefined)\n\t\t{\n\t\t\tvalue = event.target.value\n\t\t}\n\n\t\t// Call the parent `onChange` handler\n\t\t// with the `value` as an argument\n\t\t// (for convenience)\n\n\t\tconst { onChange } = this.props\n\n\t\tonChange(value)\n\t}", "handleChange() {\n this.forceUpdate();\n }", "function triggerChange(t) { t.dispatchEvent(changeEvent) }", "function onChange() {\n\n // hide and show input elements for which this is necessary\n setVisibility();\n\n // update preview considering the changed input value\n updatePreview();\n\n // perform change actions\n self.onchange && self.onchange( self );\n\n }", "function onChange() {\n\n // hide and show input elements for which this is necessary\n setVisibility();\n\n // update preview considering the changed input value\n updatePreview();\n\n // perform change actions\n self.onchange && self.onchange( self );\n\n }", "function changed() {\n\t\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t\t}", "registerOnChange(fn) {\n this.propagateChanges = fn;\n }", "handleChange (event) {\n }", "onCurrentChanged(value) {\n /* no-op */\n }", "onChange() {\n triggerEvent(this.input, 'input');\n triggerEvent(this.input, 'change');\n }", "function changed() {\n\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t}", "function changed() {\n\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t}", "_onChange() {\n void this._debouncer.invoke();\n }", "emitChange () {\n this.emit(Constants.CHANGE_EVENT);\n }", "onDidChange (callback) {\n\t\tconst changeSubscription = this.file.onDidChange(callback);\n\t\tthis.subscriptions.add(changeSubscription);\n\t\treturn changeSubscription;\n\t}", "onChange(item) {}", "dispatchChange() {\n this.toggleAttribute(\"empty\", !this.value);\n this.dispatchEvent(new CustomEvent(\"change\", { bubbles: true }));\n }", "function handleChange(){\n\t\t\t// Error handles\n\t\t\tif(xhr.readyState === this.DONE && xhr.status !== 200){\n\t\t\t\tconsole.log('check yoself');\n\t\t\t}\n\t\t\t// success handles\n\t\t\tif(xhr.readyState === this.DONE && xhr.status === 200){\n\t\t\t\tcallback(xhr.response);\n\t\t\t}\n\n\t\t}", "registerChangeListener(cb) {\n this._slider.events.on('indexChanged', cb);\n }", "function onChanged() {\n let g = getGlobal();\n\n //When the add-in creates the table, it will generate 4 events that we must ignore.\n //We only want to respond to the change events from the user.\n if (g.tableEventCount > 0) {\n g.tableEventCount--;\n return; //count down to throw away events caused by the table creation code\n }\n\n //check if dirty flag was set (flag avoids extra unnecessary ribbon operations)\n if (!g.isTableDirty) {\n g.isTableDirty = true;\n\n //Enable the Refresh and Submit buttons\n setSyncButtonEnabled(true);\n }\n}", "_triggerChange (e) {\n var args = [this.getValue(), this.getFormElement(), this.getUIElement()];\n if (e) {\n args.push(e);\n }\n if (this.options.onChange) {\n this.options.onChange.apply(this, args);\n }\n }", "_onChange(value) {\n this.setState({ changesMade: value });\n }", "_codemirrorValueChanged() {\n // Don't trigger change event if we're ignoring changes\n if (this._ignoreNextChange || !this.props.onChange) {\n this._ignoreNextChange = false;\n return;\n }\n\n const value = this.codeMirror.getDoc().getValue();\n\n // Disable linting if the document reaches a maximum size or is empty\n const shouldLint =\n value.length > MAX_SIZE_FOR_LINTING || value.length === 0 ? false : !this.props.noLint;\n const existingLint = this.codeMirror.options.lint || false;\n if (shouldLint !== existingLint) {\n const { lintOptions } = this.props;\n const lint = shouldLint ? lintOptions || true : false;\n this.codeMirror.setOption('lint', lint);\n }\n\n this.props.onChange(value);\n }", "function onChange(change) {\r\n\t\t//split up the path to get the file name\r\n\t\tvar splitUpPath = change.path.split('/');\r\n\r\n\t\t//log the file detected\r\n\t\tconsole.log('\"' + splitUpPath[splitUpPath.length - 1] + '\" was ' + change.type);\r\n\t}", "_onChange() {\n let value = this.get('value');\n return this.attrs.onChange(value, this);\n }", "function optionChanged(changed){\n charts(changed);\n metadata(changed);\n}", "addChangeListener(callback) {\n Bullet.on(LOCAL_EVENT_NAME, callback)\n }", "handleChangeEvent() {\n this.cacheHasChanged = true;\n }", "_onChange () {\n this.forceUpdate()\n }", "changeFn(event) {\n var fileList = event.__files_ || (event.target && event.target.files);\n if (!fileList)\n return;\n this.stopEvent(event);\n this.handleFiles(fileList);\n }", "get onChange() {\n\t\treturn this._onChange;\n\t}", "get onChange() {\n\t\treturn this._onChange;\n\t}", "get onChange() {\n\t\treturn this._onChange;\n\t}", "function sampleOnChange() {\n SkillSampleAPI.onStatusChange(criteriaId);\n }", "reportValueChange() {\n if (this.options) {\n const value = this.getSelectedOptionValues();\n this.onChange(value);\n this._value = value;\n }\n }" ]
[ "0.76215637", "0.7620866", "0.7604169", "0.75682276", "0.7563224", "0.75595355", "0.7537074", "0.7520366", "0.7513234", "0.7498563", "0.7496141", "0.7489214", "0.7487912", "0.7479759", "0.7470643", "0.7470105", "0.74661165", "0.7458496", "0.7453694", "0.7451992", "0.736924", "0.7303583", "0.7273391", "0.7240529", "0.71548766", "0.71520585", "0.7128725", "0.7093861", "0.7083037", "0.70093733", "0.70093733", "0.69801164", "0.697409", "0.69462836", "0.69462836", "0.69462264", "0.69462264", "0.6938091", "0.69152594", "0.69095105", "0.69081986", "0.6828735", "0.6827403", "0.6826205", "0.6825447", "0.6825447", "0.6818633", "0.6811441", "0.6811441", "0.67853796", "0.6766698", "0.67388356", "0.6706443", "0.6706443", "0.6690389", "0.6690049", "0.66818786", "0.66752523", "0.6664632", "0.6662042", "0.6657042", "0.66217285", "0.6617618", "0.66118735", "0.66093236", "0.66083074", "0.6600708", "0.65971905", "0.6594819", "0.6594819", "0.65864474", "0.6579841", "0.6576589", "0.65624547", "0.6545084", "0.6543494", "0.6543494", "0.6543034", "0.6512732", "0.65007645", "0.6487829", "0.64831334", "0.6477887", "0.6468582", "0.6467927", "0.64665604", "0.6463477", "0.6457328", "0.64566207", "0.64305115", "0.64199996", "0.6416667", "0.6404831", "0.6402141", "0.6397671", "0.63960356", "0.63960356", "0.63960356", "0.6394816", "0.6394437" ]
0.7521918
7
Reemits a render event.
function onRender() { var args; var i; __debug_488( 'Received a render event. Re-emitting...' ); args = new Array( arguments.length+1 ); args[ 0 ] = 'render'; for ( i = 0; i < arguments.length; i++ ) { args[ i+1 ] = arguments[ i ]; } self.emit.apply( self, args ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_587( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_395( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_577( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_412( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_457( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_332( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_330( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_475( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_429( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_452( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_520( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function RenderEvent() {}", "function resumeRender() {\n shouldRender = true;\n render();\n }", "function handleRender() {\n view._isRendered = true;\n triggerDOMRefresh();\n }", "function handleRender() {\n view._isRendered = true;\n triggerDOMRefresh();\n }", "function handleRender() {\n\t view._isRendered = true;\n\t triggerDOMRefresh();\n\t }", "function handleRender(view) {\n view._isRendered = true;\n triggerDOMRefresh(view);\n }", "function handleRender(view){\r\n view._isRendered = true;\r\n triggerDOMRefresh(view);\r\n }", "render(...args) {\n if (this._render) {\n this.__notify(EV.BEFORE_RENDER);\n this._render(...args);\n this.__notify(EV.RENDERED);\n }\n\n this.rendered = true;\n }", "function renderCall() {\n // Repaint?\n if (needs_repaint === true) {\n needs_repaint = false;\n\n ctx.clearRect(0, 0, canvas_el.width, canvas_el.height);\n\n renderTimeXAxis();\n renderElementsMargin();\n\n renderRows();\n\n renderCurrentTimePoint();\n\n }\n }", "onRender()/*: void*/ {\n this.render();\n }", "unrender() {\n this.rendered = false;\n }", "postRender() {\n if (!this.multiFire || !this._hasFired) {\n return;\n }\n\n this._hasFired = false;\n this._nextFire = this._tempNextFire;\n }", "postRendering() {\n this.ctx.restore();\n }", "handleRendered_() {\n\t\tthis.isRendered_ = true;\n\t}", "function invalidate () {\n\t if (!options.batching) {\n\t if (!isRendering) render()\n\t } else {\n\t if (!frameId) frameId = raf(render)\n\t }\n\t }", "function invalidate () {\n if (!options.batching) {\n if (!isRendering) render()\n } else {\n if (!frameId) frameId = raf(render)\n }\n }", "render() {\n const self = this;\n const data = self.get('data');\n if (!data) {\n throw new Error('data must be defined first');\n }\n self.clear();\n self.emit('beforerender');\n self.refreshLayout(this.get('fitView'));\n self.emit('afterrender');\n }", "function render() {\n\t if(stopped || scene.contextLost) {\n\t return\n\t }\n\t requestAnimationFrame(render)\n\t redraw()\n\t }", "function render() {\n\t if(stopped || scene.contextLost) {\n\t return\n\t }\n\t requestAnimationFrame(render)\n\t redraw()\n\t }", "function render() {\n\n isRendered = true;\n\n renderSource();\n\n }", "function renderCallback() {\n\n while (TO_RENDER.length) {\n TO_RENDER.shift().notify();\n }\n\n TO_RENDER.added = {};\n\n while (ENV_QUEUE.length) {\n var env = ENV_QUEUE.shift();\n for (var key in env.revalidateQueue) {\n env.revalidateQueue[key].revalidate();\n }\n reslot(env);\n }\n ENV_QUEUE.added = {};\n}", "_requestRender() { this._invalidateProperties(); }", "function render() {\n\tclearCanvas();\n\tRenderer.draw();\n\t\n\t\t\n}", "function completeRender() {\n var afterRender = options.afterRender;\n\n if (afterRender) {\n afterRender.call(root, root);\n }\n\n // Always emit an afterRender event.\n root.trigger(\"afterRender\", root);\n }", "function completeRender() {\n var afterRender = options.afterRender;\n\n if (afterRender) {\n afterRender.call(root, root);\n }\n\n // Always emit an afterRender event.\n root.trigger(\"afterRender\", root);\n }", "function render() {\n\n\t\t\tisRendered = true;\n\n\t\t\trenderSource();\n\n\t\t}", "function pauseRender() {\n shouldRender = false;\n }", "willClearRender() {\n\t\tconsole.log('willClearRender ejecutado!');\n\t}", "function render () {\n // If this is called synchronously we need to\n // cancel any pending future updates\n clearFrame()\n\n // If the rendering from the previous frame is still going,\n // we'll just wait until the next frame. Ideally renders should\n // not take over 16ms to stay within a single frame, but this should\n // catch it if it does.\n if (isRendering) {\n frameId = raf(render)\n return\n } else {\n isRendering = true\n }\n\n // 1. If there isn't a native element rendered for the current mounted element\n // then we need to create it from scratch.\n // 2. If a new element has been mounted, we should diff them.\n // 3. We should update check all child components for changes.\n if (!currentNativeElement) {\n currentElement = app.element\n currentNativeElement = toNative(rootId, '0', currentElement)\n container.appendChild(currentNativeElement)\n } else if (currentElement !== app.element) {\n currentNativeElement = patch(rootId, currentElement, app.element, currentNativeElement)\n currentElement = app.element\n updateChildren(rootId)\n } else {\n updateChildren(rootId)\n }\n\n // Allow rendering again.\n isRendering = false\n }", "postrender() {\n this.gl.flush();\n }", "function render() {\n if(stopped || scene.contextLost) {\n return\n }\n requestAnimationFrame(render)\n redraw()\n }", "function clearRenderTimer() {\n\n\t\t\tclearTimeout(renderTimer);\n\n\t\t\trenderTimer = null;\n\n\t\t}", "function clearRenderTimer() {\n\n clearTimeout(renderTimer);\n\n renderTimer = null;\n\n }", "function render() {\n if (!willRender) {\n willRender = true;\n process.nextTick(function() {\n screen.render();\n willRender = false;\n });\n }\n}", "function r(e) {\n this.reinitializeTransaction(), // Only server-side rendering really needs this option (see\n // `ReactServerRendering`), but server-side uses\n // `ReactServerRenderingTransaction` instead. This option is here so that it's\n // accessible and defaults to false when `ReactDOMComponent` and\n // `ReactDOMTextComponent` checks it in `mountComponent`.`\n this.renderToStaticMarkup = !1, this.reactMountReady = i.getPooled(null), this.useCreateElement = e;\n }", "function rerender() {\n\tscreen.innerText = buffer;\n}", "function reRender() {\n input.innerText = buffer;\n}", "afterRender() { }", "afterRender() { }", "reRender() {\n this.removeAllChildrenComponents()\n\n this.build()\n }", "function render() {\n renderLives();\n renderTimeRemaining();\n }", "function render() {\n\t\t\n\t}", "function _triggerAfterRender() {\n _trigger(docma.Event.Render, [docma.currentRoute]);\n if (_initialLoad) {\n _trigger(docma.Event.Ready);\n _initialLoad = false;\n }\n }", "function render() {\n\t\t\t}", "function render () {\n\t // If this is called synchronously we need to\n\t // cancel any pending future updates\n\t clearFrame()\n\n\t // If the rendering from the previous frame is still going,\n\t // we'll just wait until the next frame. Ideally renders should\n\t // not take over 16ms to stay within a single frame, but this should\n\t // catch it if it does.\n\t if (isRendering) {\n\t frameId = raf(render)\n\t return\n\t } else {\n\t isRendering = true\n\t }\n\n\t // 1. If there isn't a native element rendered for the current mounted element\n\t // then we need to create it from scratch.\n\t // 2. If a new element has been mounted, we should diff them.\n\t // 3. We should update check all child components for changes.\n\t if (!currentNativeElement) {\n\t currentElement = app.element\n\t currentNativeElement = toNative(rootId, '0', currentElement)\n\t if (container.children.length > 0) {\n\t console.info('deku: The container element is not empty. These elements will be removed. Read more: http://cl.ly/b0Sr')\n\t }\n\t if (container === document.body) {\n\t console.warn('deku: Using document.body is allowed but it can cause some issues. Read more: http://cl.ly/b0SC')\n\t }\n\t removeAllChildren(container)\n\t container.appendChild(currentNativeElement)\n\t } else if (currentElement !== app.element) {\n\t currentNativeElement = patch(rootId, currentElement, app.element, currentNativeElement)\n\t currentElement = app.element\n\t updateChildren(rootId)\n\t } else {\n\t updateChildren(rootId)\n\t }\n\n\t // Call mount events on all new entities\n\t flushMountQueue()\n\n\t // Allow rendering again.\n\t isRendering = false\n\n\t }", "function render() {\n\t}", "render() {\n\n // Calculate delta\n if (!this.lastFrameTime) this.lastFrameTime = Date.now()\n this.delta = Math.min(1, (Date.now() - this.lastFrameTime) / 1000)\n this.lastFrameTime = Date.now()\n\n // Check if should be rendering\n if (!this.isRendering)\n return\n\n // Request another frame\n requestAnimationFrame(this.render)\n\n }", "static finishedRenderingComponent() {\n\t\trenderingComponents_.pop();\n\t}", "function render( timestamp )\n\t{\n\t\t\n\t\trequestAnimationFrame( render );\n\t\t\n\t\tcanvas_handler.draw_all( );\n\t\t\n\t}", "_endRender() {\n this._allowRegisterSegment = false;\n }", "function _render() {\n _render = (0, _asyncToGenerator2.default)(\n /*#__PURE__*/\n _regenerator.default.mark(function _callee2(props) {\n return _regenerator.default.wrap(\n function _callee2$(_context2) {\n while (1) {\n switch ((_context2.prev = _context2.next)) {\n case 0:\n if (!props.err) {\n _context2.next = 4;\n break;\n }\n\n _context2.next = 3;\n return renderError(props);\n\n case 3:\n return _context2.abrupt(\"return\");\n\n case 4:\n _context2.prev = 4;\n _context2.next = 7;\n return doRender(props);\n\n case 7:\n _context2.next = 13;\n break;\n\n case 9:\n _context2.prev = 9;\n _context2.t0 = _context2[\"catch\"](4);\n _context2.next = 13;\n return renderError(\n (0, _objectSpread2.default)({}, props, {\n err: _context2.t0,\n })\n );\n\n case 13:\n case \"end\":\n return _context2.stop();\n }\n }\n },\n _callee2,\n this,\n [[4, 9]]\n );\n })\n );\n return _render.apply(this, arguments);\n }", "redraw() {\n this.createBackground();\n this.render();\n }", "cancelRendering() {\n if (this.renderTask) {\n this.renderTask.cancel();\n this.renderTask = null;\n }\n this.resume = null;\n }", "_render(model) {\n\t\tthis._coordinator.newEvent({\n\t\t\tsource: this.constructor.name,\n\t\t\ttype: 'render',\n\t\t\tdata: {\n\t\t\t\toriginX: this._originX,\n\t\t\t\toriginY: this._originY,\n\t\t\t\twidth: this._width,\n\t\t\t\theight: this._height\n\t\t\t}\n\t\t});\n\t}", "rerender() {\n\t\tthis.setState(this.state)\n\t}", "reRender(skipPreRenderRefresh = false) {\n this.refreshFromRerender = true;\n super.reRender(skipPreRenderRefresh);\n this.initDomEvents();\n }", "renderEventInput() {\n eventContainer.innerHTML = \"\";\n eventContainer.innerHTML = eventHtml.makeNewEventHtml();\n }", "function renderCal() {\n $('#calendar').fullCalendar('rerenderEvents');\n }", "function render() {\r\n graphics.clear();\r\n myTexture.draw();\r\n }", "function Render() {\n ClearScreen();\n RenderEnergeticDroplets();\n ResetRenderingConditions();\n}", "function render() {\n window.requestAnimationFrame(render);\n manipulationCanvas.getContext('2d').clearRect(0, 0, manipulationCanvas.width, manipulationCanvas.height); //clears canvas\n triRenderer.render();\n }", "updateRendererState()\r\n {\r\n // update the renderer state object\r\n this.updateRendererStateObject();\r\n \r\n // create a new update id for the render\r\n this.updateRandomUpdateId();\r\n \r\n this.emit(\"rendererStateChanged\", this, this.rendererState);\r\n }", "onRender () {\n\n }", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function render() {\n\n\t\t\t}", "onRender() {\n if ( !this.mRunning )\n return;\n\n if ( SPE_USES_PREVIEW_IMAGE ) {\n document.querySelector( '.spline-preview-image-container' ).style.display = 'none';\n\n SPE_USES_PREVIEW_IMAGE = false;\n }\n\n if ( this.mPlayHandler && !this.mPlayHandler.isEnable ) {\n this.mPlayHandler.activate();\n }\n\n if ( this.mOrbitControls ) {\n this.mOrbitControls.update();\n }\n if ( this.mScene && this.mMainCamera ) {\n this.mRenderer.autoClear = true;\n this.mRenderer.render( this.mScene, this.mMainCamera );\n }\n }", "handleRenderCompletion() {\n this.renderNewChildren = false;\n this.preventUpdate = false;\n this.lastChildIndex = this.childCount;\n if (this.isRenderingNew) {\n this.isRenderingNew = false;\n this.update(null, false, true); // Prevent from triggering an item request to avoid infinite loop of loading.\n } else if (this.contentNode && InfiniteUtils.shouldTriggerItemRequest(InfiniteUtils.getContentData(this.contentNode))) {\n this.triggerItemRequest();\n }\n }", "function viewRenderComplete() {\n $container.trigger(topologyConstants.events.viewRenderComplete, {}); // Private Event\n }", "_notifyRenderer() {\n this.renderer.notify();\n }", "relayout() {\n dispatchSimpleEvent(this, 'relayout', true);\n }", "onBeforeRendering() {}", "render(renderedTemplate) {\n super.render()\n\n // render the template\n render(renderedTemplate, this, {\n eventContext: this\n })\n }", "function render() {\n view.update();\n requestAnimationFrame(render);\n}", "function render() {\n if (gameRunning) {\n world.camera.moveDimensions()\n context.clearRect(0, 0, canvas.width, canvas.height);\n world.render();\n setTimeout(render, renderTimeDelta)\n }\n}", "function _render(scene) {\n renderer.update(scene);\n }", "function render() {\r\n\r\n}", "function render() {\r\n\r\n}", "_invalidate() {\n\t\tif (this._invalidated) {\n\t\t\t// console.log(\"already invalidated\", this, ...arguments);\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.getDomRef() && !this._suppressInvalidation) {\n\t\t\tthis._invalidated = true;\n\t\t\t// console.log(\"INVAL\", this, ...arguments);\n\t\t\tRenderScheduler.renderDeferred(this);\n\t\t}\n\t}", "function renderOnce(){\n drawBoard(size);\n }", "function render(){\n spinCounter = 0;\n gamePlay();\n }", "function UpdateRender() {\n // Set background\n BackContextHandle.fillRect(0, 0, CanvasWidth, CanvasHeight);\n\n // Render\n BackContextHandle.save();\n Render();\n BackContextHandle.restore();\n\n // Swap the backbuffer with the frontbuffer\n var ImageData = BackContextHandle.getImageData(0, 0, CanvasWidth, CanvasHeight);\n ContextHandle.putImageData(ImageData, 0, 0);\n}", "_update() {\n render(this._template(), this.shadowRoot, {eventContext: this});\n }", "function lateRender() {\n\t\tsetTimeout( function() { // IE7 needs this so dimensions are calculated correctly\n\t\t\t\t\tif (!currentView.start && bodyVisible()) { // !currentView.start makes sure this never happens more than once\n\t\t\t\t\t\trenderView();\n\t\t\t\t\t}\n\t\t\t\t}, 0);\n\t}", "function render() {\n\t\trate = (droppedFrames > 0) ?\n\t\t\t((rate+(FPS/(droppedFrames*2)))/2):\n\t\t\t((rate + FPS)/2);\n\t\t\t\n\t\tcycleCounter = (cycleCounter + 1) % FPS;\n\t\tframeCounter = (frameCounter + 1) % 1e15;\n\t\t// just render every N frames to avoid a jarring display\n\t\tdroppedFrames = -1;\n\t\trdCallback();\n\t}", "onRender(scene, time) {}" ]
[ "0.7726372", "0.7672331", "0.7665788", "0.76572526", "0.7655998", "0.7652522", "0.7651107", "0.76429856", "0.76421237", "0.76247567", "0.7623794", "0.6994004", "0.67871696", "0.67314553", "0.67314553", "0.6673593", "0.65053445", "0.65043765", "0.6444167", "0.63916767", "0.6386083", "0.6215451", "0.60745835", "0.6063212", "0.6025815", "0.5983671", "0.59834343", "0.5943105", "0.58774674", "0.58774674", "0.58711886", "0.5855174", "0.5848575", "0.5833751", "0.5825184", "0.5825184", "0.5803323", "0.57938194", "0.57847404", "0.57549715", "0.5753157", "0.5745031", "0.5743764", "0.57243097", "0.5702407", "0.5698554", "0.56926113", "0.565947", "0.5650503", "0.5650503", "0.5606217", "0.55847776", "0.5571784", "0.5564836", "0.55646217", "0.55570143", "0.5551144", "0.5541771", "0.5538538", "0.5515794", "0.5510801", "0.55076826", "0.5506269", "0.54958576", "0.5494323", "0.54930204", "0.5490676", "0.5485293", "0.5483956", "0.5478577", "0.547311", "0.5464079", "0.545132", "0.54415125", "0.5434181", "0.5434181", "0.5434181", "0.5434181", "0.5434181", "0.5425733", "0.5420645", "0.5412628", "0.54028964", "0.53895235", "0.5386448", "0.538495", "0.5381009", "0.53802407", "0.5373726", "0.53733", "0.5364876", "0.5364876", "0.5362733", "0.53625435", "0.53615856", "0.5358409", "0.5353968", "0.53332514", "0.5331306", "0.53254426" ]
0.76539224
5
Callback invoked upon receiving a change event.
function onChange() { __debug_577( 'Received a change event.' ); if ( self._autoRender ) { // eslint-disable-line no-underscore-dangle self.render(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onChange() {\n\t\t__debug_452( 'Received a change event.' );\n\t\tself.render();\n\t}", "change() { }", "function onChange() {\n\t\t__debug_330( 'Received a change event.' );\n\t\tself.render();\n\t}", "handleEventChange() {\n }", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_730( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "onChange(callback) {\n\t\tthis.changeCallback = callback;\n\t}", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_259( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_488( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_587( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_596( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_412( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_475( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_520( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "onChanged(e){}", "function onChange() {\n\t\t__debug_457( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_332( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_429( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "onchange() {}", "function onChange() {\n console.log(\"something changed...\");\n \n }", "function onChange() {\n\t\t__debug_395( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "addChangeListener(callback) {\n this.on('change', callback);\n }", "function changeEvent() {\n var value_sub = properties.value;\n trigger_param_list.push(value_sub);\n // 'seek' event is like a forced-change event\n $pebble_slider_object.triggerHandler('seek', trigger_param_list);\n if (prev_change_value !== value_sub) {\n $pebble_slider_object.triggerHandler('change', trigger_param_list);\n prev_change_value = value_sub;\n }\n trigger_param_list.length = 0;\n }", "onChange(callback) {\n this.events.change.push({ callback });\n }", "function onChange() {\n if (input.get.call(element, valueField) !== observer.oldValue && !element.readOnly) {\n observer.set(input.get.call(element, valueField));\n }\n }", "function changeFunction() {\n\tconsole.log(\"onchange\");\n}", "addChangeListener (callback) {\n this.on(Constants.CHANGE_EVENT, callback);\n }", "onDidChange(callback) {\n return this.emitter.on('did-change', callback)\n }", "change(/*event*/) {\n this._super(...arguments);\n this._parse();\n }", "addChangeListener (callback) {\n\t\tthis.on(Constants.CHANGE_EVENT, callback);\n\t}", "function handleChange(editor, data, value) {\n onChange(value);\n }", "function handleChange(editor, data, value) {\n onChange(value);\n }", "onDataChange() {}", "changedCallback () {\n\t\tif (this.oldValue === this.value) return;\n\t\tthis._setTranslation();\n\t}", "change(fn, options) {\n\t\treturn this.on({ change: fn }, options);\n\t}", "change(fn, options) {\n\t\treturn this.on({ change: fn }, options);\n\t}", "onChange () {}", "onChange () {}", "onChange(changeListener) {\n changeListener.path = this.path;\n privateDataMap.get(this).addListener(changeListener, this.path);\n }", "handleChange(event) {\n this.dispatchEvent(new CustomEvent('change', {detail: event.target.value}));\n }", "function changed(change) {\n if (change.changeType === \"property\" && change.property === property) {\n fn(change);\n }\n }", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "_setOnChanges(){\n\t\tthis.inputs.forEach(i => i.addEventListener('change', this._onChange.bind(this)));\t\n\t}", "handleChange(event) {\n\n }", "emitChange() {\n\t\tthis.emit(CHANGE_EVENT)\n\t}", "function onChangeHandler(e) {\n\n }", "function onChangeHandler(e) {\n\n }", "addChangeListener(callback) {\n\t\tthis.on(CHANGE_EVENT, callback)\n\t}", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "internalOnChange(event) {\n const me = this,\n value = me.value,\n oldValue = me._lastValue;\n\n // Don't trigger change if we enter invalid value or if value has not changed (for IE when pressing ENTER)\n if (me.isValid && value !== oldValue) {\n me._lastValue = value;\n\n // trigger change event, signaling that origin is from user\n me.trigger('change', { value, oldValue, event, userAction: true });\n\n // per default Field triggers action event on change, but might be reconfigured in subclasses (such as Combo)\n if (me.defaultAction === 'change') {\n me.trigger('action', { value, oldValue, event });\n }\n }\n\n // since Widget has Events mixed in configured with 'callOnFunctions' this will also call onClick and onAction\n }", "handleChange () {\n this.props.onStatusChange(\n this.props.item.id,\n this.refs.checkbox.checked ? 'RESERVED' : 'NEW'\n );\n }", "_valueChanged() {\n // Send a global refresh to the bapge body.\n var event = new Event(\"change\");\n this._root.dispatchEvent(event);\n }", "emitChange() {\n this.emit(CHANGE_EVENT);\n }", "emitChange() {\n this.emit(CHANGE_EVENT);\n }", "_triggerChangeEvent() {\n\t\tif ( this.$control.rendered && ! this.changeEventDisabled ) {\n\t\t\tthis._updateSettings();\n\t\t\tthis.events.emit( 'change', this.settings );\n\t\t}\n\t}", "handleChange(event){\n changeHandler(event,this);\n }", "setOnValueChangeEvent(func){\r\n this._onValueChange = func;\r\n }", "function referenceOnChange() {\n MicroReferenceAPI.onStatusChange(criteriaId);\n }", "function handleChange(event, newValue) {\n setValue(newValue);\n }", "onChange(callback) {\n this.listeners.push(callback);\n }", "onGenericChange() {\n this.contentChanged.emit(void 0);\n }", "afterValidChange() { }", "static on_changed(chr, _retval) {\n let uuid = chr.getUuid()\n console.log(colours.fg.blue + \"[BLE] [CHANGE ]\" + colours.fg.yellow + \" UUID: \" + uuid.toString() + colours.fg.magenta + \" | data: 0x\" + bytes2hex(chr.getValue()) + colours.reset);\n }", "changedInput() {\n\n\t\tlet {isValid, error} = this.state.wasInvalid ? this.validate() : this.state;\n\t\tlet onChange = this.props.onChange;\n\t\tif (onChange) {\n\t\t\tonChange(this.getValue(), isValid, error);\n\t\t}\n\t\tif (this.context.validationSchema) {\n\t\t\tlet value = this.getValue();\n\t\t\tif (this.state.isMultiSelect && value === '') {\n\t\t\t\tvalue = [];\n\t\t\t}\n\t\t\tif (this.shouldTypeBeNumberBySchemeDefinition(this.props.pointer)) {\n\t\t\t\tvalue = Number(value);\n\t\t\t}\n\t\t\tthis.context.validationParent.onValueChanged(this.props.pointer, value, isValid, error);\n\t\t}\n\t}", "_evtChange(event) { }", "on_change(event)\n\t{\n\t\t// Extract `value` from the argument\n\t\t// of this `onChange` listener\n\t\t// (for convenience)\n\n\t\tlet value = event\n\n\t\tif (event.target !== undefined)\n\t\t{\n\t\t\tvalue = event.target.value\n\t\t}\n\n\t\t// Call the parent `onChange` handler\n\t\t// with the `value` as an argument\n\t\t// (for convenience)\n\n\t\tconst { onChange } = this.props\n\n\t\tonChange(value)\n\t}", "handleChange() {\n this.forceUpdate();\n }", "function triggerChange(t) { t.dispatchEvent(changeEvent) }", "function onChange() {\n\n // hide and show input elements for which this is necessary\n setVisibility();\n\n // update preview considering the changed input value\n updatePreview();\n\n // perform change actions\n self.onchange && self.onchange( self );\n\n }", "function onChange() {\n\n // hide and show input elements for which this is necessary\n setVisibility();\n\n // update preview considering the changed input value\n updatePreview();\n\n // perform change actions\n self.onchange && self.onchange( self );\n\n }", "function changed() {\n\t\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t\t}", "registerOnChange(fn) {\n this.propagateChanges = fn;\n }", "handleChange (event) {\n }", "onCurrentChanged(value) {\n /* no-op */\n }", "onChange() {\n triggerEvent(this.input, 'input');\n triggerEvent(this.input, 'change');\n }", "function changed() {\n\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t}", "function changed() {\n\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t}", "_onChange() {\n void this._debouncer.invoke();\n }", "emitChange () {\n this.emit(Constants.CHANGE_EVENT);\n }", "onDidChange (callback) {\n\t\tconst changeSubscription = this.file.onDidChange(callback);\n\t\tthis.subscriptions.add(changeSubscription);\n\t\treturn changeSubscription;\n\t}", "onChange(item) {}", "dispatchChange() {\n this.toggleAttribute(\"empty\", !this.value);\n this.dispatchEvent(new CustomEvent(\"change\", { bubbles: true }));\n }", "function handleChange(){\n\t\t\t// Error handles\n\t\t\tif(xhr.readyState === this.DONE && xhr.status !== 200){\n\t\t\t\tconsole.log('check yoself');\n\t\t\t}\n\t\t\t// success handles\n\t\t\tif(xhr.readyState === this.DONE && xhr.status === 200){\n\t\t\t\tcallback(xhr.response);\n\t\t\t}\n\n\t\t}", "registerChangeListener(cb) {\n this._slider.events.on('indexChanged', cb);\n }", "function onChanged() {\n let g = getGlobal();\n\n //When the add-in creates the table, it will generate 4 events that we must ignore.\n //We only want to respond to the change events from the user.\n if (g.tableEventCount > 0) {\n g.tableEventCount--;\n return; //count down to throw away events caused by the table creation code\n }\n\n //check if dirty flag was set (flag avoids extra unnecessary ribbon operations)\n if (!g.isTableDirty) {\n g.isTableDirty = true;\n\n //Enable the Refresh and Submit buttons\n setSyncButtonEnabled(true);\n }\n}", "_triggerChange (e) {\n var args = [this.getValue(), this.getFormElement(), this.getUIElement()];\n if (e) {\n args.push(e);\n }\n if (this.options.onChange) {\n this.options.onChange.apply(this, args);\n }\n }", "_onChange(value) {\n this.setState({ changesMade: value });\n }", "_codemirrorValueChanged() {\n // Don't trigger change event if we're ignoring changes\n if (this._ignoreNextChange || !this.props.onChange) {\n this._ignoreNextChange = false;\n return;\n }\n\n const value = this.codeMirror.getDoc().getValue();\n\n // Disable linting if the document reaches a maximum size or is empty\n const shouldLint =\n value.length > MAX_SIZE_FOR_LINTING || value.length === 0 ? false : !this.props.noLint;\n const existingLint = this.codeMirror.options.lint || false;\n if (shouldLint !== existingLint) {\n const { lintOptions } = this.props;\n const lint = shouldLint ? lintOptions || true : false;\n this.codeMirror.setOption('lint', lint);\n }\n\n this.props.onChange(value);\n }", "function onChange(change) {\r\n\t\t//split up the path to get the file name\r\n\t\tvar splitUpPath = change.path.split('/');\r\n\r\n\t\t//log the file detected\r\n\t\tconsole.log('\"' + splitUpPath[splitUpPath.length - 1] + '\" was ' + change.type);\r\n\t}", "_onChange() {\n let value = this.get('value');\n return this.attrs.onChange(value, this);\n }", "function optionChanged(changed){\n charts(changed);\n metadata(changed);\n}", "addChangeListener(callback) {\n Bullet.on(LOCAL_EVENT_NAME, callback)\n }", "handleChangeEvent() {\n this.cacheHasChanged = true;\n }", "_onChange () {\n this.forceUpdate()\n }", "changeFn(event) {\n var fileList = event.__files_ || (event.target && event.target.files);\n if (!fileList)\n return;\n this.stopEvent(event);\n this.handleFiles(fileList);\n }", "get onChange() {\n\t\treturn this._onChange;\n\t}", "get onChange() {\n\t\treturn this._onChange;\n\t}", "get onChange() {\n\t\treturn this._onChange;\n\t}", "function sampleOnChange() {\n SkillSampleAPI.onStatusChange(criteriaId);\n }", "reportValueChange() {\n if (this.options) {\n const value = this.getSelectedOptionValues();\n this.onChange(value);\n this._value = value;\n }\n }" ]
[ "0.76215637", "0.7620866", "0.7604169", "0.75682276", "0.7563224", "0.75595355", "0.7537074", "0.7521918", "0.7520366", "0.7513234", "0.7498563", "0.7496141", "0.7489214", "0.7487912", "0.7479759", "0.7470643", "0.7470105", "0.7458496", "0.7453694", "0.7451992", "0.736924", "0.7303583", "0.7273391", "0.7240529", "0.71548766", "0.71520585", "0.7128725", "0.7093861", "0.7083037", "0.70093733", "0.70093733", "0.69801164", "0.697409", "0.69462836", "0.69462836", "0.69462264", "0.69462264", "0.6938091", "0.69152594", "0.69095105", "0.69081986", "0.6828735", "0.6827403", "0.6826205", "0.6825447", "0.6825447", "0.6818633", "0.6811441", "0.6811441", "0.67853796", "0.6766698", "0.67388356", "0.6706443", "0.6706443", "0.6690389", "0.6690049", "0.66818786", "0.66752523", "0.6664632", "0.6662042", "0.6657042", "0.66217285", "0.6617618", "0.66118735", "0.66093236", "0.66083074", "0.6600708", "0.65971905", "0.6594819", "0.6594819", "0.65864474", "0.6579841", "0.6576589", "0.65624547", "0.6545084", "0.6543494", "0.6543494", "0.6543034", "0.6512732", "0.65007645", "0.6487829", "0.64831334", "0.6477887", "0.6468582", "0.6467927", "0.64665604", "0.6463477", "0.6457328", "0.64566207", "0.64305115", "0.64199996", "0.6416667", "0.6404831", "0.6402141", "0.6397671", "0.63960356", "0.63960356", "0.63960356", "0.6394816", "0.6394437" ]
0.74661165
17
Reemits a render event.
function onRender() { var args; var i; __debug_577( 'Received a render event. Re-emitting...' ); args = new Array( arguments.length+1 ); args[ 0 ] = 'render'; for ( i = 0; i < arguments.length; i++ ) { args[ i+1 ] = arguments[ i ]; } self.emit.apply( self, args ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_587( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_395( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_412( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_457( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_488( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_332( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_330( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_475( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_429( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_452( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_520( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function RenderEvent() {}", "function resumeRender() {\n shouldRender = true;\n render();\n }", "function handleRender() {\n view._isRendered = true;\n triggerDOMRefresh();\n }", "function handleRender() {\n view._isRendered = true;\n triggerDOMRefresh();\n }", "function handleRender() {\n\t view._isRendered = true;\n\t triggerDOMRefresh();\n\t }", "function handleRender(view) {\n view._isRendered = true;\n triggerDOMRefresh(view);\n }", "function handleRender(view){\r\n view._isRendered = true;\r\n triggerDOMRefresh(view);\r\n }", "render(...args) {\n if (this._render) {\n this.__notify(EV.BEFORE_RENDER);\n this._render(...args);\n this.__notify(EV.RENDERED);\n }\n\n this.rendered = true;\n }", "function renderCall() {\n // Repaint?\n if (needs_repaint === true) {\n needs_repaint = false;\n\n ctx.clearRect(0, 0, canvas_el.width, canvas_el.height);\n\n renderTimeXAxis();\n renderElementsMargin();\n\n renderRows();\n\n renderCurrentTimePoint();\n\n }\n }", "onRender()/*: void*/ {\n this.render();\n }", "unrender() {\n this.rendered = false;\n }", "postRender() {\n if (!this.multiFire || !this._hasFired) {\n return;\n }\n\n this._hasFired = false;\n this._nextFire = this._tempNextFire;\n }", "postRendering() {\n this.ctx.restore();\n }", "handleRendered_() {\n\t\tthis.isRendered_ = true;\n\t}", "function invalidate () {\n\t if (!options.batching) {\n\t if (!isRendering) render()\n\t } else {\n\t if (!frameId) frameId = raf(render)\n\t }\n\t }", "function invalidate () {\n if (!options.batching) {\n if (!isRendering) render()\n } else {\n if (!frameId) frameId = raf(render)\n }\n }", "render() {\n const self = this;\n const data = self.get('data');\n if (!data) {\n throw new Error('data must be defined first');\n }\n self.clear();\n self.emit('beforerender');\n self.refreshLayout(this.get('fitView'));\n self.emit('afterrender');\n }", "function render() {\n\t if(stopped || scene.contextLost) {\n\t return\n\t }\n\t requestAnimationFrame(render)\n\t redraw()\n\t }", "function render() {\n\t if(stopped || scene.contextLost) {\n\t return\n\t }\n\t requestAnimationFrame(render)\n\t redraw()\n\t }", "function render() {\n\n isRendered = true;\n\n renderSource();\n\n }", "function renderCallback() {\n\n while (TO_RENDER.length) {\n TO_RENDER.shift().notify();\n }\n\n TO_RENDER.added = {};\n\n while (ENV_QUEUE.length) {\n var env = ENV_QUEUE.shift();\n for (var key in env.revalidateQueue) {\n env.revalidateQueue[key].revalidate();\n }\n reslot(env);\n }\n ENV_QUEUE.added = {};\n}", "_requestRender() { this._invalidateProperties(); }", "function render() {\n\tclearCanvas();\n\tRenderer.draw();\n\t\n\t\t\n}", "function completeRender() {\n var afterRender = options.afterRender;\n\n if (afterRender) {\n afterRender.call(root, root);\n }\n\n // Always emit an afterRender event.\n root.trigger(\"afterRender\", root);\n }", "function completeRender() {\n var afterRender = options.afterRender;\n\n if (afterRender) {\n afterRender.call(root, root);\n }\n\n // Always emit an afterRender event.\n root.trigger(\"afterRender\", root);\n }", "function render() {\n\n\t\t\tisRendered = true;\n\n\t\t\trenderSource();\n\n\t\t}", "function pauseRender() {\n shouldRender = false;\n }", "willClearRender() {\n\t\tconsole.log('willClearRender ejecutado!');\n\t}", "function render () {\n // If this is called synchronously we need to\n // cancel any pending future updates\n clearFrame()\n\n // If the rendering from the previous frame is still going,\n // we'll just wait until the next frame. Ideally renders should\n // not take over 16ms to stay within a single frame, but this should\n // catch it if it does.\n if (isRendering) {\n frameId = raf(render)\n return\n } else {\n isRendering = true\n }\n\n // 1. If there isn't a native element rendered for the current mounted element\n // then we need to create it from scratch.\n // 2. If a new element has been mounted, we should diff them.\n // 3. We should update check all child components for changes.\n if (!currentNativeElement) {\n currentElement = app.element\n currentNativeElement = toNative(rootId, '0', currentElement)\n container.appendChild(currentNativeElement)\n } else if (currentElement !== app.element) {\n currentNativeElement = patch(rootId, currentElement, app.element, currentNativeElement)\n currentElement = app.element\n updateChildren(rootId)\n } else {\n updateChildren(rootId)\n }\n\n // Allow rendering again.\n isRendering = false\n }", "postrender() {\n this.gl.flush();\n }", "function clearRenderTimer() {\n\n\t\t\tclearTimeout(renderTimer);\n\n\t\t\trenderTimer = null;\n\n\t\t}", "function render() {\n if(stopped || scene.contextLost) {\n return\n }\n requestAnimationFrame(render)\n redraw()\n }", "function clearRenderTimer() {\n\n clearTimeout(renderTimer);\n\n renderTimer = null;\n\n }", "function render() {\n if (!willRender) {\n willRender = true;\n process.nextTick(function() {\n screen.render();\n willRender = false;\n });\n }\n}", "function r(e) {\n this.reinitializeTransaction(), // Only server-side rendering really needs this option (see\n // `ReactServerRendering`), but server-side uses\n // `ReactServerRenderingTransaction` instead. This option is here so that it's\n // accessible and defaults to false when `ReactDOMComponent` and\n // `ReactDOMTextComponent` checks it in `mountComponent`.`\n this.renderToStaticMarkup = !1, this.reactMountReady = i.getPooled(null), this.useCreateElement = e;\n }", "function rerender() {\n\tscreen.innerText = buffer;\n}", "function reRender() {\n input.innerText = buffer;\n}", "afterRender() { }", "afterRender() { }", "reRender() {\n this.removeAllChildrenComponents()\n\n this.build()\n }", "function render() {\n renderLives();\n renderTimeRemaining();\n }", "function render() {\n\t\t\n\t}", "function _triggerAfterRender() {\n _trigger(docma.Event.Render, [docma.currentRoute]);\n if (_initialLoad) {\n _trigger(docma.Event.Ready);\n _initialLoad = false;\n }\n }", "function render() {\n\t\t\t}", "function render () {\n\t // If this is called synchronously we need to\n\t // cancel any pending future updates\n\t clearFrame()\n\n\t // If the rendering from the previous frame is still going,\n\t // we'll just wait until the next frame. Ideally renders should\n\t // not take over 16ms to stay within a single frame, but this should\n\t // catch it if it does.\n\t if (isRendering) {\n\t frameId = raf(render)\n\t return\n\t } else {\n\t isRendering = true\n\t }\n\n\t // 1. If there isn't a native element rendered for the current mounted element\n\t // then we need to create it from scratch.\n\t // 2. If a new element has been mounted, we should diff them.\n\t // 3. We should update check all child components for changes.\n\t if (!currentNativeElement) {\n\t currentElement = app.element\n\t currentNativeElement = toNative(rootId, '0', currentElement)\n\t if (container.children.length > 0) {\n\t console.info('deku: The container element is not empty. These elements will be removed. Read more: http://cl.ly/b0Sr')\n\t }\n\t if (container === document.body) {\n\t console.warn('deku: Using document.body is allowed but it can cause some issues. Read more: http://cl.ly/b0SC')\n\t }\n\t removeAllChildren(container)\n\t container.appendChild(currentNativeElement)\n\t } else if (currentElement !== app.element) {\n\t currentNativeElement = patch(rootId, currentElement, app.element, currentNativeElement)\n\t currentElement = app.element\n\t updateChildren(rootId)\n\t } else {\n\t updateChildren(rootId)\n\t }\n\n\t // Call mount events on all new entities\n\t flushMountQueue()\n\n\t // Allow rendering again.\n\t isRendering = false\n\n\t }", "function render() {\n\t}", "render() {\n\n // Calculate delta\n if (!this.lastFrameTime) this.lastFrameTime = Date.now()\n this.delta = Math.min(1, (Date.now() - this.lastFrameTime) / 1000)\n this.lastFrameTime = Date.now()\n\n // Check if should be rendering\n if (!this.isRendering)\n return\n\n // Request another frame\n requestAnimationFrame(this.render)\n\n }", "static finishedRenderingComponent() {\n\t\trenderingComponents_.pop();\n\t}", "function render( timestamp )\n\t{\n\t\t\n\t\trequestAnimationFrame( render );\n\t\t\n\t\tcanvas_handler.draw_all( );\n\t\t\n\t}", "_endRender() {\n this._allowRegisterSegment = false;\n }", "redraw() {\n this.createBackground();\n this.render();\n }", "function _render() {\n _render = (0, _asyncToGenerator2.default)(\n /*#__PURE__*/\n _regenerator.default.mark(function _callee2(props) {\n return _regenerator.default.wrap(\n function _callee2$(_context2) {\n while (1) {\n switch ((_context2.prev = _context2.next)) {\n case 0:\n if (!props.err) {\n _context2.next = 4;\n break;\n }\n\n _context2.next = 3;\n return renderError(props);\n\n case 3:\n return _context2.abrupt(\"return\");\n\n case 4:\n _context2.prev = 4;\n _context2.next = 7;\n return doRender(props);\n\n case 7:\n _context2.next = 13;\n break;\n\n case 9:\n _context2.prev = 9;\n _context2.t0 = _context2[\"catch\"](4);\n _context2.next = 13;\n return renderError(\n (0, _objectSpread2.default)({}, props, {\n err: _context2.t0,\n })\n );\n\n case 13:\n case \"end\":\n return _context2.stop();\n }\n }\n },\n _callee2,\n this,\n [[4, 9]]\n );\n })\n );\n return _render.apply(this, arguments);\n }", "cancelRendering() {\n if (this.renderTask) {\n this.renderTask.cancel();\n this.renderTask = null;\n }\n this.resume = null;\n }", "rerender() {\n\t\tthis.setState(this.state)\n\t}", "reRender(skipPreRenderRefresh = false) {\n this.refreshFromRerender = true;\n super.reRender(skipPreRenderRefresh);\n this.initDomEvents();\n }", "_render(model) {\n\t\tthis._coordinator.newEvent({\n\t\t\tsource: this.constructor.name,\n\t\t\ttype: 'render',\n\t\t\tdata: {\n\t\t\t\toriginX: this._originX,\n\t\t\t\toriginY: this._originY,\n\t\t\t\twidth: this._width,\n\t\t\t\theight: this._height\n\t\t\t}\n\t\t});\n\t}", "renderEventInput() {\n eventContainer.innerHTML = \"\";\n eventContainer.innerHTML = eventHtml.makeNewEventHtml();\n }", "function renderCal() {\n $('#calendar').fullCalendar('rerenderEvents');\n }", "function render() {\r\n graphics.clear();\r\n myTexture.draw();\r\n }", "function Render() {\n ClearScreen();\n RenderEnergeticDroplets();\n ResetRenderingConditions();\n}", "function render() {\n window.requestAnimationFrame(render);\n manipulationCanvas.getContext('2d').clearRect(0, 0, manipulationCanvas.width, manipulationCanvas.height); //clears canvas\n triRenderer.render();\n }", "updateRendererState()\r\n {\r\n // update the renderer state object\r\n this.updateRendererStateObject();\r\n \r\n // create a new update id for the render\r\n this.updateRandomUpdateId();\r\n \r\n this.emit(\"rendererStateChanged\", this, this.rendererState);\r\n }", "onRender () {\n\n }", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function render() {\n\n\t\t\t}", "onRender() {\n if ( !this.mRunning )\n return;\n\n if ( SPE_USES_PREVIEW_IMAGE ) {\n document.querySelector( '.spline-preview-image-container' ).style.display = 'none';\n\n SPE_USES_PREVIEW_IMAGE = false;\n }\n\n if ( this.mPlayHandler && !this.mPlayHandler.isEnable ) {\n this.mPlayHandler.activate();\n }\n\n if ( this.mOrbitControls ) {\n this.mOrbitControls.update();\n }\n if ( this.mScene && this.mMainCamera ) {\n this.mRenderer.autoClear = true;\n this.mRenderer.render( this.mScene, this.mMainCamera );\n }\n }", "handleRenderCompletion() {\n this.renderNewChildren = false;\n this.preventUpdate = false;\n this.lastChildIndex = this.childCount;\n if (this.isRenderingNew) {\n this.isRenderingNew = false;\n this.update(null, false, true); // Prevent from triggering an item request to avoid infinite loop of loading.\n } else if (this.contentNode && InfiniteUtils.shouldTriggerItemRequest(InfiniteUtils.getContentData(this.contentNode))) {\n this.triggerItemRequest();\n }\n }", "function viewRenderComplete() {\n $container.trigger(topologyConstants.events.viewRenderComplete, {}); // Private Event\n }", "_notifyRenderer() {\n this.renderer.notify();\n }", "relayout() {\n dispatchSimpleEvent(this, 'relayout', true);\n }", "onBeforeRendering() {}", "function render() {\n view.update();\n requestAnimationFrame(render);\n}", "render(renderedTemplate) {\n super.render()\n\n // render the template\n render(renderedTemplate, this, {\n eventContext: this\n })\n }", "function render() {\n if (gameRunning) {\n world.camera.moveDimensions()\n context.clearRect(0, 0, canvas.width, canvas.height);\n world.render();\n setTimeout(render, renderTimeDelta)\n }\n}", "function _render(scene) {\n renderer.update(scene);\n }", "_invalidate() {\n\t\tif (this._invalidated) {\n\t\t\t// console.log(\"already invalidated\", this, ...arguments);\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.getDomRef() && !this._suppressInvalidation) {\n\t\t\tthis._invalidated = true;\n\t\t\t// console.log(\"INVAL\", this, ...arguments);\n\t\t\tRenderScheduler.renderDeferred(this);\n\t\t}\n\t}", "function renderOnce(){\n drawBoard(size);\n }", "function render() {\r\n\r\n}", "function render() {\r\n\r\n}", "function render(){\n spinCounter = 0;\n gamePlay();\n }", "function UpdateRender() {\n // Set background\n BackContextHandle.fillRect(0, 0, CanvasWidth, CanvasHeight);\n\n // Render\n BackContextHandle.save();\n Render();\n BackContextHandle.restore();\n\n // Swap the backbuffer with the frontbuffer\n var ImageData = BackContextHandle.getImageData(0, 0, CanvasWidth, CanvasHeight);\n ContextHandle.putImageData(ImageData, 0, 0);\n}", "_update() {\n render(this._template(), this.shadowRoot, {eventContext: this});\n }", "function lateRender() {\n\t\tsetTimeout( function() { // IE7 needs this so dimensions are calculated correctly\n\t\t\t\t\tif (!currentView.start && bodyVisible()) { // !currentView.start makes sure this never happens more than once\n\t\t\t\t\t\trenderView();\n\t\t\t\t\t}\n\t\t\t\t}, 0);\n\t}", "function render() {\n\t\trate = (droppedFrames > 0) ?\n\t\t\t((rate+(FPS/(droppedFrames*2)))/2):\n\t\t\t((rate + FPS)/2);\n\t\t\t\n\t\tcycleCounter = (cycleCounter + 1) % FPS;\n\t\tframeCounter = (frameCounter + 1) % 1e15;\n\t\t// just render every N frames to avoid a jarring display\n\t\tdroppedFrames = -1;\n\t\trdCallback();\n\t}", "onRender(scene, time) {}" ]
[ "0.7726008", "0.76720464", "0.76568705", "0.76556915", "0.7653662", "0.7652237", "0.76507944", "0.7642652", "0.7641725", "0.76243794", "0.7623485", "0.6988311", "0.6787753", "0.67292804", "0.67292804", "0.66715395", "0.6504154", "0.65031016", "0.64408934", "0.63911784", "0.63832504", "0.6216513", "0.60724235", "0.6062319", "0.60219234", "0.59836125", "0.5983508", "0.5941997", "0.58751863", "0.58751863", "0.5866305", "0.58532953", "0.5847918", "0.5832956", "0.5824475", "0.5824475", "0.57984394", "0.5794476", "0.57849914", "0.5753514", "0.5751769", "0.5745542", "0.5742956", "0.57261705", "0.5700743", "0.5697362", "0.56906766", "0.5658283", "0.5647874", "0.5647874", "0.56082886", "0.55818856", "0.5568193", "0.55638623", "0.5561195", "0.55555004", "0.5547681", "0.5539074", "0.5537674", "0.551174", "0.5510248", "0.5506466", "0.55056506", "0.54968303", "0.54927397", "0.54925305", "0.5491187", "0.5481378", "0.54808074", "0.54778576", "0.54715353", "0.54636055", "0.5449442", "0.54379225", "0.5430673", "0.5430673", "0.5430673", "0.5430673", "0.5430673", "0.54221267", "0.541832", "0.54105276", "0.5400512", "0.5388434", "0.5388329", "0.53808653", "0.5378749", "0.5376822", "0.5373553", "0.5371306", "0.53626144", "0.5361633", "0.53611964", "0.53611964", "0.53603065", "0.53570354", "0.5350287", "0.53337485", "0.5330154", "0.5322407" ]
0.76654947
2
Callback invoked upon receiving a change event.
function onChange() { __debug_520( 'Received a change event.' ); if ( self._autoRender ) { // eslint-disable-line no-underscore-dangle self.render(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onChange() {\n\t\t__debug_452( 'Received a change event.' );\n\t\tself.render();\n\t}", "change() { }", "function onChange() {\n\t\t__debug_330( 'Received a change event.' );\n\t\tself.render();\n\t}", "handleEventChange() {\n }", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_730( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "onChange(callback) {\n\t\tthis.changeCallback = callback;\n\t}", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_259( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_488( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_587( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_596( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_412( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_475( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "onChanged(e){}", "function onChange() {\n\t\t__debug_457( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_332( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_429( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_577( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "onchange() {}", "function onChange() {\n console.log(\"something changed...\");\n \n }", "function onChange() {\n\t\t__debug_395( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "addChangeListener(callback) {\n this.on('change', callback);\n }", "function changeEvent() {\n var value_sub = properties.value;\n trigger_param_list.push(value_sub);\n // 'seek' event is like a forced-change event\n $pebble_slider_object.triggerHandler('seek', trigger_param_list);\n if (prev_change_value !== value_sub) {\n $pebble_slider_object.triggerHandler('change', trigger_param_list);\n prev_change_value = value_sub;\n }\n trigger_param_list.length = 0;\n }", "onChange(callback) {\n this.events.change.push({ callback });\n }", "function onChange() {\n if (input.get.call(element, valueField) !== observer.oldValue && !element.readOnly) {\n observer.set(input.get.call(element, valueField));\n }\n }", "function changeFunction() {\n\tconsole.log(\"onchange\");\n}", "addChangeListener (callback) {\n this.on(Constants.CHANGE_EVENT, callback);\n }", "onDidChange(callback) {\n return this.emitter.on('did-change', callback)\n }", "change(/*event*/) {\n this._super(...arguments);\n this._parse();\n }", "addChangeListener (callback) {\n\t\tthis.on(Constants.CHANGE_EVENT, callback);\n\t}", "function handleChange(editor, data, value) {\n onChange(value);\n }", "function handleChange(editor, data, value) {\n onChange(value);\n }", "onDataChange() {}", "changedCallback () {\n\t\tif (this.oldValue === this.value) return;\n\t\tthis._setTranslation();\n\t}", "change(fn, options) {\n\t\treturn this.on({ change: fn }, options);\n\t}", "change(fn, options) {\n\t\treturn this.on({ change: fn }, options);\n\t}", "onChange () {}", "onChange () {}", "onChange(changeListener) {\n changeListener.path = this.path;\n privateDataMap.get(this).addListener(changeListener, this.path);\n }", "handleChange(event) {\n this.dispatchEvent(new CustomEvent('change', {detail: event.target.value}));\n }", "function changed(change) {\n if (change.changeType === \"property\" && change.property === property) {\n fn(change);\n }\n }", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "_setOnChanges(){\n\t\tthis.inputs.forEach(i => i.addEventListener('change', this._onChange.bind(this)));\t\n\t}", "handleChange(event) {\n\n }", "emitChange() {\n\t\tthis.emit(CHANGE_EVENT)\n\t}", "function onChangeHandler(e) {\n\n }", "function onChangeHandler(e) {\n\n }", "addChangeListener(callback) {\n\t\tthis.on(CHANGE_EVENT, callback)\n\t}", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "internalOnChange(event) {\n const me = this,\n value = me.value,\n oldValue = me._lastValue;\n\n // Don't trigger change if we enter invalid value or if value has not changed (for IE when pressing ENTER)\n if (me.isValid && value !== oldValue) {\n me._lastValue = value;\n\n // trigger change event, signaling that origin is from user\n me.trigger('change', { value, oldValue, event, userAction: true });\n\n // per default Field triggers action event on change, but might be reconfigured in subclasses (such as Combo)\n if (me.defaultAction === 'change') {\n me.trigger('action', { value, oldValue, event });\n }\n }\n\n // since Widget has Events mixed in configured with 'callOnFunctions' this will also call onClick and onAction\n }", "handleChange () {\n this.props.onStatusChange(\n this.props.item.id,\n this.refs.checkbox.checked ? 'RESERVED' : 'NEW'\n );\n }", "_valueChanged() {\n // Send a global refresh to the bapge body.\n var event = new Event(\"change\");\n this._root.dispatchEvent(event);\n }", "emitChange() {\n this.emit(CHANGE_EVENT);\n }", "emitChange() {\n this.emit(CHANGE_EVENT);\n }", "_triggerChangeEvent() {\n\t\tif ( this.$control.rendered && ! this.changeEventDisabled ) {\n\t\t\tthis._updateSettings();\n\t\t\tthis.events.emit( 'change', this.settings );\n\t\t}\n\t}", "handleChange(event){\n changeHandler(event,this);\n }", "setOnValueChangeEvent(func){\r\n this._onValueChange = func;\r\n }", "function referenceOnChange() {\n MicroReferenceAPI.onStatusChange(criteriaId);\n }", "function handleChange(event, newValue) {\n setValue(newValue);\n }", "onChange(callback) {\n this.listeners.push(callback);\n }", "onGenericChange() {\n this.contentChanged.emit(void 0);\n }", "afterValidChange() { }", "static on_changed(chr, _retval) {\n let uuid = chr.getUuid()\n console.log(colours.fg.blue + \"[BLE] [CHANGE ]\" + colours.fg.yellow + \" UUID: \" + uuid.toString() + colours.fg.magenta + \" | data: 0x\" + bytes2hex(chr.getValue()) + colours.reset);\n }", "changedInput() {\n\n\t\tlet {isValid, error} = this.state.wasInvalid ? this.validate() : this.state;\n\t\tlet onChange = this.props.onChange;\n\t\tif (onChange) {\n\t\t\tonChange(this.getValue(), isValid, error);\n\t\t}\n\t\tif (this.context.validationSchema) {\n\t\t\tlet value = this.getValue();\n\t\t\tif (this.state.isMultiSelect && value === '') {\n\t\t\t\tvalue = [];\n\t\t\t}\n\t\t\tif (this.shouldTypeBeNumberBySchemeDefinition(this.props.pointer)) {\n\t\t\t\tvalue = Number(value);\n\t\t\t}\n\t\t\tthis.context.validationParent.onValueChanged(this.props.pointer, value, isValid, error);\n\t\t}\n\t}", "_evtChange(event) { }", "on_change(event)\n\t{\n\t\t// Extract `value` from the argument\n\t\t// of this `onChange` listener\n\t\t// (for convenience)\n\n\t\tlet value = event\n\n\t\tif (event.target !== undefined)\n\t\t{\n\t\t\tvalue = event.target.value\n\t\t}\n\n\t\t// Call the parent `onChange` handler\n\t\t// with the `value` as an argument\n\t\t// (for convenience)\n\n\t\tconst { onChange } = this.props\n\n\t\tonChange(value)\n\t}", "handleChange() {\n this.forceUpdate();\n }", "function triggerChange(t) { t.dispatchEvent(changeEvent) }", "function onChange() {\n\n // hide and show input elements for which this is necessary\n setVisibility();\n\n // update preview considering the changed input value\n updatePreview();\n\n // perform change actions\n self.onchange && self.onchange( self );\n\n }", "function onChange() {\n\n // hide and show input elements for which this is necessary\n setVisibility();\n\n // update preview considering the changed input value\n updatePreview();\n\n // perform change actions\n self.onchange && self.onchange( self );\n\n }", "function changed() {\n\t\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t\t}", "registerOnChange(fn) {\n this.propagateChanges = fn;\n }", "handleChange (event) {\n }", "onCurrentChanged(value) {\n /* no-op */\n }", "onChange() {\n triggerEvent(this.input, 'input');\n triggerEvent(this.input, 'change');\n }", "function changed() {\n\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t}", "function changed() {\n\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t}", "_onChange() {\n void this._debouncer.invoke();\n }", "emitChange () {\n this.emit(Constants.CHANGE_EVENT);\n }", "onDidChange (callback) {\n\t\tconst changeSubscription = this.file.onDidChange(callback);\n\t\tthis.subscriptions.add(changeSubscription);\n\t\treturn changeSubscription;\n\t}", "onChange(item) {}", "dispatchChange() {\n this.toggleAttribute(\"empty\", !this.value);\n this.dispatchEvent(new CustomEvent(\"change\", { bubbles: true }));\n }", "function handleChange(){\n\t\t\t// Error handles\n\t\t\tif(xhr.readyState === this.DONE && xhr.status !== 200){\n\t\t\t\tconsole.log('check yoself');\n\t\t\t}\n\t\t\t// success handles\n\t\t\tif(xhr.readyState === this.DONE && xhr.status === 200){\n\t\t\t\tcallback(xhr.response);\n\t\t\t}\n\n\t\t}", "registerChangeListener(cb) {\n this._slider.events.on('indexChanged', cb);\n }", "function onChanged() {\n let g = getGlobal();\n\n //When the add-in creates the table, it will generate 4 events that we must ignore.\n //We only want to respond to the change events from the user.\n if (g.tableEventCount > 0) {\n g.tableEventCount--;\n return; //count down to throw away events caused by the table creation code\n }\n\n //check if dirty flag was set (flag avoids extra unnecessary ribbon operations)\n if (!g.isTableDirty) {\n g.isTableDirty = true;\n\n //Enable the Refresh and Submit buttons\n setSyncButtonEnabled(true);\n }\n}", "_triggerChange (e) {\n var args = [this.getValue(), this.getFormElement(), this.getUIElement()];\n if (e) {\n args.push(e);\n }\n if (this.options.onChange) {\n this.options.onChange.apply(this, args);\n }\n }", "_onChange(value) {\n this.setState({ changesMade: value });\n }", "_codemirrorValueChanged() {\n // Don't trigger change event if we're ignoring changes\n if (this._ignoreNextChange || !this.props.onChange) {\n this._ignoreNextChange = false;\n return;\n }\n\n const value = this.codeMirror.getDoc().getValue();\n\n // Disable linting if the document reaches a maximum size or is empty\n const shouldLint =\n value.length > MAX_SIZE_FOR_LINTING || value.length === 0 ? false : !this.props.noLint;\n const existingLint = this.codeMirror.options.lint || false;\n if (shouldLint !== existingLint) {\n const { lintOptions } = this.props;\n const lint = shouldLint ? lintOptions || true : false;\n this.codeMirror.setOption('lint', lint);\n }\n\n this.props.onChange(value);\n }", "function onChange(change) {\r\n\t\t//split up the path to get the file name\r\n\t\tvar splitUpPath = change.path.split('/');\r\n\r\n\t\t//log the file detected\r\n\t\tconsole.log('\"' + splitUpPath[splitUpPath.length - 1] + '\" was ' + change.type);\r\n\t}", "_onChange() {\n let value = this.get('value');\n return this.attrs.onChange(value, this);\n }", "function optionChanged(changed){\n charts(changed);\n metadata(changed);\n}", "addChangeListener(callback) {\n Bullet.on(LOCAL_EVENT_NAME, callback)\n }", "handleChangeEvent() {\n this.cacheHasChanged = true;\n }", "_onChange () {\n this.forceUpdate()\n }", "changeFn(event) {\n var fileList = event.__files_ || (event.target && event.target.files);\n if (!fileList)\n return;\n this.stopEvent(event);\n this.handleFiles(fileList);\n }", "get onChange() {\n\t\treturn this._onChange;\n\t}", "get onChange() {\n\t\treturn this._onChange;\n\t}", "get onChange() {\n\t\treturn this._onChange;\n\t}", "function sampleOnChange() {\n SkillSampleAPI.onStatusChange(criteriaId);\n }", "reportValueChange() {\n if (this.options) {\n const value = this.getSelectedOptionValues();\n this.onChange(value);\n this._value = value;\n }\n }" ]
[ "0.76215637", "0.7620866", "0.7604169", "0.75682276", "0.7563224", "0.75595355", "0.7537074", "0.7521918", "0.7520366", "0.7513234", "0.7498563", "0.7496141", "0.7487912", "0.7479759", "0.7470643", "0.7470105", "0.74661165", "0.7458496", "0.7453694", "0.7451992", "0.736924", "0.7303583", "0.7273391", "0.7240529", "0.71548766", "0.71520585", "0.7128725", "0.7093861", "0.7083037", "0.70093733", "0.70093733", "0.69801164", "0.697409", "0.69462836", "0.69462836", "0.69462264", "0.69462264", "0.6938091", "0.69152594", "0.69095105", "0.69081986", "0.6828735", "0.6827403", "0.6826205", "0.6825447", "0.6825447", "0.6818633", "0.6811441", "0.6811441", "0.67853796", "0.6766698", "0.67388356", "0.6706443", "0.6706443", "0.6690389", "0.6690049", "0.66818786", "0.66752523", "0.6664632", "0.6662042", "0.6657042", "0.66217285", "0.6617618", "0.66118735", "0.66093236", "0.66083074", "0.6600708", "0.65971905", "0.6594819", "0.6594819", "0.65864474", "0.6579841", "0.6576589", "0.65624547", "0.6545084", "0.6543494", "0.6543494", "0.6543034", "0.6512732", "0.65007645", "0.6487829", "0.64831334", "0.6477887", "0.6468582", "0.6467927", "0.64665604", "0.6463477", "0.6457328", "0.64566207", "0.64305115", "0.64199996", "0.6416667", "0.6404831", "0.6402141", "0.6397671", "0.63960356", "0.63960356", "0.63960356", "0.6394816", "0.6394437" ]
0.7489214
12
Reemits a render event.
function onRender() { var args; var i; __debug_520( 'Received a render event. Re-emitting...' ); args = new Array( arguments.length+1 ); args[ 0 ] = 'render'; for ( i = 0; i < arguments.length; i++ ) { args[ i+1 ] = arguments[ i ]; } self.emit.apply( self, args ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_587( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_395( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_577( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_412( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_457( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_488( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_332( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_330( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_475( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_429( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\t__debug_452( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "function RenderEvent() {}", "function resumeRender() {\n shouldRender = true;\n render();\n }", "function handleRender() {\n view._isRendered = true;\n triggerDOMRefresh();\n }", "function handleRender() {\n view._isRendered = true;\n triggerDOMRefresh();\n }", "function handleRender() {\n\t view._isRendered = true;\n\t triggerDOMRefresh();\n\t }", "function handleRender(view) {\n view._isRendered = true;\n triggerDOMRefresh(view);\n }", "function handleRender(view){\r\n view._isRendered = true;\r\n triggerDOMRefresh(view);\r\n }", "render(...args) {\n if (this._render) {\n this.__notify(EV.BEFORE_RENDER);\n this._render(...args);\n this.__notify(EV.RENDERED);\n }\n\n this.rendered = true;\n }", "function renderCall() {\n // Repaint?\n if (needs_repaint === true) {\n needs_repaint = false;\n\n ctx.clearRect(0, 0, canvas_el.width, canvas_el.height);\n\n renderTimeXAxis();\n renderElementsMargin();\n\n renderRows();\n\n renderCurrentTimePoint();\n\n }\n }", "onRender()/*: void*/ {\n this.render();\n }", "unrender() {\n this.rendered = false;\n }", "postRender() {\n if (!this.multiFire || !this._hasFired) {\n return;\n }\n\n this._hasFired = false;\n this._nextFire = this._tempNextFire;\n }", "postRendering() {\n this.ctx.restore();\n }", "handleRendered_() {\n\t\tthis.isRendered_ = true;\n\t}", "function invalidate () {\n\t if (!options.batching) {\n\t if (!isRendering) render()\n\t } else {\n\t if (!frameId) frameId = raf(render)\n\t }\n\t }", "function invalidate () {\n if (!options.batching) {\n if (!isRendering) render()\n } else {\n if (!frameId) frameId = raf(render)\n }\n }", "render() {\n const self = this;\n const data = self.get('data');\n if (!data) {\n throw new Error('data must be defined first');\n }\n self.clear();\n self.emit('beforerender');\n self.refreshLayout(this.get('fitView'));\n self.emit('afterrender');\n }", "function render() {\n\t if(stopped || scene.contextLost) {\n\t return\n\t }\n\t requestAnimationFrame(render)\n\t redraw()\n\t }", "function render() {\n\t if(stopped || scene.contextLost) {\n\t return\n\t }\n\t requestAnimationFrame(render)\n\t redraw()\n\t }", "function render() {\n\n isRendered = true;\n\n renderSource();\n\n }", "function renderCallback() {\n\n while (TO_RENDER.length) {\n TO_RENDER.shift().notify();\n }\n\n TO_RENDER.added = {};\n\n while (ENV_QUEUE.length) {\n var env = ENV_QUEUE.shift();\n for (var key in env.revalidateQueue) {\n env.revalidateQueue[key].revalidate();\n }\n reslot(env);\n }\n ENV_QUEUE.added = {};\n}", "_requestRender() { this._invalidateProperties(); }", "function render() {\n\tclearCanvas();\n\tRenderer.draw();\n\t\n\t\t\n}", "function completeRender() {\n var afterRender = options.afterRender;\n\n if (afterRender) {\n afterRender.call(root, root);\n }\n\n // Always emit an afterRender event.\n root.trigger(\"afterRender\", root);\n }", "function completeRender() {\n var afterRender = options.afterRender;\n\n if (afterRender) {\n afterRender.call(root, root);\n }\n\n // Always emit an afterRender event.\n root.trigger(\"afterRender\", root);\n }", "function render() {\n\n\t\t\tisRendered = true;\n\n\t\t\trenderSource();\n\n\t\t}", "function pauseRender() {\n shouldRender = false;\n }", "willClearRender() {\n\t\tconsole.log('willClearRender ejecutado!');\n\t}", "function render () {\n // If this is called synchronously we need to\n // cancel any pending future updates\n clearFrame()\n\n // If the rendering from the previous frame is still going,\n // we'll just wait until the next frame. Ideally renders should\n // not take over 16ms to stay within a single frame, but this should\n // catch it if it does.\n if (isRendering) {\n frameId = raf(render)\n return\n } else {\n isRendering = true\n }\n\n // 1. If there isn't a native element rendered for the current mounted element\n // then we need to create it from scratch.\n // 2. If a new element has been mounted, we should diff them.\n // 3. We should update check all child components for changes.\n if (!currentNativeElement) {\n currentElement = app.element\n currentNativeElement = toNative(rootId, '0', currentElement)\n container.appendChild(currentNativeElement)\n } else if (currentElement !== app.element) {\n currentNativeElement = patch(rootId, currentElement, app.element, currentNativeElement)\n currentElement = app.element\n updateChildren(rootId)\n } else {\n updateChildren(rootId)\n }\n\n // Allow rendering again.\n isRendering = false\n }", "postrender() {\n this.gl.flush();\n }", "function render() {\n if(stopped || scene.contextLost) {\n return\n }\n requestAnimationFrame(render)\n redraw()\n }", "function clearRenderTimer() {\n\n\t\t\tclearTimeout(renderTimer);\n\n\t\t\trenderTimer = null;\n\n\t\t}", "function clearRenderTimer() {\n\n clearTimeout(renderTimer);\n\n renderTimer = null;\n\n }", "function render() {\n if (!willRender) {\n willRender = true;\n process.nextTick(function() {\n screen.render();\n willRender = false;\n });\n }\n}", "function r(e) {\n this.reinitializeTransaction(), // Only server-side rendering really needs this option (see\n // `ReactServerRendering`), but server-side uses\n // `ReactServerRenderingTransaction` instead. This option is here so that it's\n // accessible and defaults to false when `ReactDOMComponent` and\n // `ReactDOMTextComponent` checks it in `mountComponent`.`\n this.renderToStaticMarkup = !1, this.reactMountReady = i.getPooled(null), this.useCreateElement = e;\n }", "function rerender() {\n\tscreen.innerText = buffer;\n}", "function reRender() {\n input.innerText = buffer;\n}", "afterRender() { }", "afterRender() { }", "reRender() {\n this.removeAllChildrenComponents()\n\n this.build()\n }", "function render() {\n renderLives();\n renderTimeRemaining();\n }", "function render() {\n\t\t\n\t}", "function _triggerAfterRender() {\n _trigger(docma.Event.Render, [docma.currentRoute]);\n if (_initialLoad) {\n _trigger(docma.Event.Ready);\n _initialLoad = false;\n }\n }", "function render() {\n\t\t\t}", "function render () {\n\t // If this is called synchronously we need to\n\t // cancel any pending future updates\n\t clearFrame()\n\n\t // If the rendering from the previous frame is still going,\n\t // we'll just wait until the next frame. Ideally renders should\n\t // not take over 16ms to stay within a single frame, but this should\n\t // catch it if it does.\n\t if (isRendering) {\n\t frameId = raf(render)\n\t return\n\t } else {\n\t isRendering = true\n\t }\n\n\t // 1. If there isn't a native element rendered for the current mounted element\n\t // then we need to create it from scratch.\n\t // 2. If a new element has been mounted, we should diff them.\n\t // 3. We should update check all child components for changes.\n\t if (!currentNativeElement) {\n\t currentElement = app.element\n\t currentNativeElement = toNative(rootId, '0', currentElement)\n\t if (container.children.length > 0) {\n\t console.info('deku: The container element is not empty. These elements will be removed. Read more: http://cl.ly/b0Sr')\n\t }\n\t if (container === document.body) {\n\t console.warn('deku: Using document.body is allowed but it can cause some issues. Read more: http://cl.ly/b0SC')\n\t }\n\t removeAllChildren(container)\n\t container.appendChild(currentNativeElement)\n\t } else if (currentElement !== app.element) {\n\t currentNativeElement = patch(rootId, currentElement, app.element, currentNativeElement)\n\t currentElement = app.element\n\t updateChildren(rootId)\n\t } else {\n\t updateChildren(rootId)\n\t }\n\n\t // Call mount events on all new entities\n\t flushMountQueue()\n\n\t // Allow rendering again.\n\t isRendering = false\n\n\t }", "function render() {\n\t}", "render() {\n\n // Calculate delta\n if (!this.lastFrameTime) this.lastFrameTime = Date.now()\n this.delta = Math.min(1, (Date.now() - this.lastFrameTime) / 1000)\n this.lastFrameTime = Date.now()\n\n // Check if should be rendering\n if (!this.isRendering)\n return\n\n // Request another frame\n requestAnimationFrame(this.render)\n\n }", "static finishedRenderingComponent() {\n\t\trenderingComponents_.pop();\n\t}", "function render( timestamp )\n\t{\n\t\t\n\t\trequestAnimationFrame( render );\n\t\t\n\t\tcanvas_handler.draw_all( );\n\t\t\n\t}", "_endRender() {\n this._allowRegisterSegment = false;\n }", "function _render() {\n _render = (0, _asyncToGenerator2.default)(\n /*#__PURE__*/\n _regenerator.default.mark(function _callee2(props) {\n return _regenerator.default.wrap(\n function _callee2$(_context2) {\n while (1) {\n switch ((_context2.prev = _context2.next)) {\n case 0:\n if (!props.err) {\n _context2.next = 4;\n break;\n }\n\n _context2.next = 3;\n return renderError(props);\n\n case 3:\n return _context2.abrupt(\"return\");\n\n case 4:\n _context2.prev = 4;\n _context2.next = 7;\n return doRender(props);\n\n case 7:\n _context2.next = 13;\n break;\n\n case 9:\n _context2.prev = 9;\n _context2.t0 = _context2[\"catch\"](4);\n _context2.next = 13;\n return renderError(\n (0, _objectSpread2.default)({}, props, {\n err: _context2.t0,\n })\n );\n\n case 13:\n case \"end\":\n return _context2.stop();\n }\n }\n },\n _callee2,\n this,\n [[4, 9]]\n );\n })\n );\n return _render.apply(this, arguments);\n }", "redraw() {\n this.createBackground();\n this.render();\n }", "cancelRendering() {\n if (this.renderTask) {\n this.renderTask.cancel();\n this.renderTask = null;\n }\n this.resume = null;\n }", "_render(model) {\n\t\tthis._coordinator.newEvent({\n\t\t\tsource: this.constructor.name,\n\t\t\ttype: 'render',\n\t\t\tdata: {\n\t\t\t\toriginX: this._originX,\n\t\t\t\toriginY: this._originY,\n\t\t\t\twidth: this._width,\n\t\t\t\theight: this._height\n\t\t\t}\n\t\t});\n\t}", "rerender() {\n\t\tthis.setState(this.state)\n\t}", "reRender(skipPreRenderRefresh = false) {\n this.refreshFromRerender = true;\n super.reRender(skipPreRenderRefresh);\n this.initDomEvents();\n }", "renderEventInput() {\n eventContainer.innerHTML = \"\";\n eventContainer.innerHTML = eventHtml.makeNewEventHtml();\n }", "function renderCal() {\n $('#calendar').fullCalendar('rerenderEvents');\n }", "function render() {\r\n graphics.clear();\r\n myTexture.draw();\r\n }", "function Render() {\n ClearScreen();\n RenderEnergeticDroplets();\n ResetRenderingConditions();\n}", "function render() {\n window.requestAnimationFrame(render);\n manipulationCanvas.getContext('2d').clearRect(0, 0, manipulationCanvas.width, manipulationCanvas.height); //clears canvas\n triRenderer.render();\n }", "updateRendererState()\r\n {\r\n // update the renderer state object\r\n this.updateRendererStateObject();\r\n \r\n // create a new update id for the render\r\n this.updateRandomUpdateId();\r\n \r\n this.emit(\"rendererStateChanged\", this, this.rendererState);\r\n }", "onRender () {\n\n }", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}", "function render() {\n\n\t\t\t}", "onRender() {\n if ( !this.mRunning )\n return;\n\n if ( SPE_USES_PREVIEW_IMAGE ) {\n document.querySelector( '.spline-preview-image-container' ).style.display = 'none';\n\n SPE_USES_PREVIEW_IMAGE = false;\n }\n\n if ( this.mPlayHandler && !this.mPlayHandler.isEnable ) {\n this.mPlayHandler.activate();\n }\n\n if ( this.mOrbitControls ) {\n this.mOrbitControls.update();\n }\n if ( this.mScene && this.mMainCamera ) {\n this.mRenderer.autoClear = true;\n this.mRenderer.render( this.mScene, this.mMainCamera );\n }\n }", "handleRenderCompletion() {\n this.renderNewChildren = false;\n this.preventUpdate = false;\n this.lastChildIndex = this.childCount;\n if (this.isRenderingNew) {\n this.isRenderingNew = false;\n this.update(null, false, true); // Prevent from triggering an item request to avoid infinite loop of loading.\n } else if (this.contentNode && InfiniteUtils.shouldTriggerItemRequest(InfiniteUtils.getContentData(this.contentNode))) {\n this.triggerItemRequest();\n }\n }", "function viewRenderComplete() {\n $container.trigger(topologyConstants.events.viewRenderComplete, {}); // Private Event\n }", "_notifyRenderer() {\n this.renderer.notify();\n }", "relayout() {\n dispatchSimpleEvent(this, 'relayout', true);\n }", "onBeforeRendering() {}", "render(renderedTemplate) {\n super.render()\n\n // render the template\n render(renderedTemplate, this, {\n eventContext: this\n })\n }", "function render() {\n view.update();\n requestAnimationFrame(render);\n}", "function render() {\n if (gameRunning) {\n world.camera.moveDimensions()\n context.clearRect(0, 0, canvas.width, canvas.height);\n world.render();\n setTimeout(render, renderTimeDelta)\n }\n}", "function _render(scene) {\n renderer.update(scene);\n }", "function render() {\r\n\r\n}", "function render() {\r\n\r\n}", "_invalidate() {\n\t\tif (this._invalidated) {\n\t\t\t// console.log(\"already invalidated\", this, ...arguments);\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.getDomRef() && !this._suppressInvalidation) {\n\t\t\tthis._invalidated = true;\n\t\t\t// console.log(\"INVAL\", this, ...arguments);\n\t\t\tRenderScheduler.renderDeferred(this);\n\t\t}\n\t}", "function renderOnce(){\n drawBoard(size);\n }", "function render(){\n spinCounter = 0;\n gamePlay();\n }", "function UpdateRender() {\n // Set background\n BackContextHandle.fillRect(0, 0, CanvasWidth, CanvasHeight);\n\n // Render\n BackContextHandle.save();\n Render();\n BackContextHandle.restore();\n\n // Swap the backbuffer with the frontbuffer\n var ImageData = BackContextHandle.getImageData(0, 0, CanvasWidth, CanvasHeight);\n ContextHandle.putImageData(ImageData, 0, 0);\n}", "_update() {\n render(this._template(), this.shadowRoot, {eventContext: this});\n }", "function lateRender() {\n\t\tsetTimeout( function() { // IE7 needs this so dimensions are calculated correctly\n\t\t\t\t\tif (!currentView.start && bodyVisible()) { // !currentView.start makes sure this never happens more than once\n\t\t\t\t\t\trenderView();\n\t\t\t\t\t}\n\t\t\t\t}, 0);\n\t}", "function render() {\n\t\trate = (droppedFrames > 0) ?\n\t\t\t((rate+(FPS/(droppedFrames*2)))/2):\n\t\t\t((rate + FPS)/2);\n\t\t\t\n\t\tcycleCounter = (cycleCounter + 1) % FPS;\n\t\tframeCounter = (frameCounter + 1) % 1e15;\n\t\t// just render every N frames to avoid a jarring display\n\t\tdroppedFrames = -1;\n\t\trdCallback();\n\t}", "onRender(scene, time) {}" ]
[ "0.7726372", "0.7672331", "0.7665788", "0.76572526", "0.7655998", "0.76539224", "0.7652522", "0.7651107", "0.76429856", "0.76421237", "0.76247567", "0.6994004", "0.67871696", "0.67314553", "0.67314553", "0.6673593", "0.65053445", "0.65043765", "0.6444167", "0.63916767", "0.6386083", "0.6215451", "0.60745835", "0.6063212", "0.6025815", "0.5983671", "0.59834343", "0.5943105", "0.58774674", "0.58774674", "0.58711886", "0.5855174", "0.5848575", "0.5833751", "0.5825184", "0.5825184", "0.5803323", "0.57938194", "0.57847404", "0.57549715", "0.5753157", "0.5745031", "0.5743764", "0.57243097", "0.5702407", "0.5698554", "0.56926113", "0.565947", "0.5650503", "0.5650503", "0.5606217", "0.55847776", "0.5571784", "0.5564836", "0.55646217", "0.55570143", "0.5551144", "0.5541771", "0.5538538", "0.5515794", "0.5510801", "0.55076826", "0.5506269", "0.54958576", "0.5494323", "0.54930204", "0.5490676", "0.5485293", "0.5483956", "0.5478577", "0.547311", "0.5464079", "0.545132", "0.54415125", "0.5434181", "0.5434181", "0.5434181", "0.5434181", "0.5434181", "0.5425733", "0.5420645", "0.5412628", "0.54028964", "0.53895235", "0.5386448", "0.538495", "0.5381009", "0.53802407", "0.5373726", "0.53733", "0.5364876", "0.5364876", "0.5362733", "0.53625435", "0.53615856", "0.5358409", "0.5353968", "0.53332514", "0.5331306", "0.53254426" ]
0.7623794
11
Callback invoked upon receiving a change event.
function onChange() { /* eslint-disable no-underscore-dangle */ __debug_596( 'Received a change event.' ); if ( self._autoRender ) { self.render(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onChange() {\n\t\t__debug_452( 'Received a change event.' );\n\t\tself.render();\n\t}", "change() { }", "function onChange() {\n\t\t__debug_330( 'Received a change event.' );\n\t\tself.render();\n\t}", "handleEventChange() {\n }", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_730( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "onChange(callback) {\n\t\tthis.changeCallback = callback;\n\t}", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_259( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_488( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_587( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_412( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_475( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_520( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "onChanged(e){}", "function onChange() {\n\t\t__debug_457( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_332( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_429( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_577( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "onchange() {}", "function onChange() {\n console.log(\"something changed...\");\n \n }", "function onChange() {\n\t\t__debug_395( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "addChangeListener(callback) {\n this.on('change', callback);\n }", "function changeEvent() {\n var value_sub = properties.value;\n trigger_param_list.push(value_sub);\n // 'seek' event is like a forced-change event\n $pebble_slider_object.triggerHandler('seek', trigger_param_list);\n if (prev_change_value !== value_sub) {\n $pebble_slider_object.triggerHandler('change', trigger_param_list);\n prev_change_value = value_sub;\n }\n trigger_param_list.length = 0;\n }", "onChange(callback) {\n this.events.change.push({ callback });\n }", "function onChange() {\n if (input.get.call(element, valueField) !== observer.oldValue && !element.readOnly) {\n observer.set(input.get.call(element, valueField));\n }\n }", "function changeFunction() {\n\tconsole.log(\"onchange\");\n}", "addChangeListener (callback) {\n this.on(Constants.CHANGE_EVENT, callback);\n }", "onDidChange(callback) {\n return this.emitter.on('did-change', callback)\n }", "change(/*event*/) {\n this._super(...arguments);\n this._parse();\n }", "addChangeListener (callback) {\n\t\tthis.on(Constants.CHANGE_EVENT, callback);\n\t}", "function handleChange(editor, data, value) {\n onChange(value);\n }", "function handleChange(editor, data, value) {\n onChange(value);\n }", "onDataChange() {}", "changedCallback () {\n\t\tif (this.oldValue === this.value) return;\n\t\tthis._setTranslation();\n\t}", "change(fn, options) {\n\t\treturn this.on({ change: fn }, options);\n\t}", "change(fn, options) {\n\t\treturn this.on({ change: fn }, options);\n\t}", "onChange () {}", "onChange () {}", "onChange(changeListener) {\n changeListener.path = this.path;\n privateDataMap.get(this).addListener(changeListener, this.path);\n }", "handleChange(event) {\n this.dispatchEvent(new CustomEvent('change', {detail: event.target.value}));\n }", "function changed(change) {\n if (change.changeType === \"property\" && change.property === property) {\n fn(change);\n }\n }", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "_setOnChanges(){\n\t\tthis.inputs.forEach(i => i.addEventListener('change', this._onChange.bind(this)));\t\n\t}", "handleChange(event) {\n\n }", "emitChange() {\n\t\tthis.emit(CHANGE_EVENT)\n\t}", "function onChangeHandler(e) {\n\n }", "function onChangeHandler(e) {\n\n }", "addChangeListener(callback) {\n\t\tthis.on(CHANGE_EVENT, callback)\n\t}", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "internalOnChange(event) {\n const me = this,\n value = me.value,\n oldValue = me._lastValue;\n\n // Don't trigger change if we enter invalid value or if value has not changed (for IE when pressing ENTER)\n if (me.isValid && value !== oldValue) {\n me._lastValue = value;\n\n // trigger change event, signaling that origin is from user\n me.trigger('change', { value, oldValue, event, userAction: true });\n\n // per default Field triggers action event on change, but might be reconfigured in subclasses (such as Combo)\n if (me.defaultAction === 'change') {\n me.trigger('action', { value, oldValue, event });\n }\n }\n\n // since Widget has Events mixed in configured with 'callOnFunctions' this will also call onClick and onAction\n }", "handleChange () {\n this.props.onStatusChange(\n this.props.item.id,\n this.refs.checkbox.checked ? 'RESERVED' : 'NEW'\n );\n }", "_valueChanged() {\n // Send a global refresh to the bapge body.\n var event = new Event(\"change\");\n this._root.dispatchEvent(event);\n }", "emitChange() {\n this.emit(CHANGE_EVENT);\n }", "emitChange() {\n this.emit(CHANGE_EVENT);\n }", "_triggerChangeEvent() {\n\t\tif ( this.$control.rendered && ! this.changeEventDisabled ) {\n\t\t\tthis._updateSettings();\n\t\t\tthis.events.emit( 'change', this.settings );\n\t\t}\n\t}", "handleChange(event){\n changeHandler(event,this);\n }", "setOnValueChangeEvent(func){\r\n this._onValueChange = func;\r\n }", "function referenceOnChange() {\n MicroReferenceAPI.onStatusChange(criteriaId);\n }", "function handleChange(event, newValue) {\n setValue(newValue);\n }", "onChange(callback) {\n this.listeners.push(callback);\n }", "onGenericChange() {\n this.contentChanged.emit(void 0);\n }", "afterValidChange() { }", "static on_changed(chr, _retval) {\n let uuid = chr.getUuid()\n console.log(colours.fg.blue + \"[BLE] [CHANGE ]\" + colours.fg.yellow + \" UUID: \" + uuid.toString() + colours.fg.magenta + \" | data: 0x\" + bytes2hex(chr.getValue()) + colours.reset);\n }", "changedInput() {\n\n\t\tlet {isValid, error} = this.state.wasInvalid ? this.validate() : this.state;\n\t\tlet onChange = this.props.onChange;\n\t\tif (onChange) {\n\t\t\tonChange(this.getValue(), isValid, error);\n\t\t}\n\t\tif (this.context.validationSchema) {\n\t\t\tlet value = this.getValue();\n\t\t\tif (this.state.isMultiSelect && value === '') {\n\t\t\t\tvalue = [];\n\t\t\t}\n\t\t\tif (this.shouldTypeBeNumberBySchemeDefinition(this.props.pointer)) {\n\t\t\t\tvalue = Number(value);\n\t\t\t}\n\t\t\tthis.context.validationParent.onValueChanged(this.props.pointer, value, isValid, error);\n\t\t}\n\t}", "_evtChange(event) { }", "on_change(event)\n\t{\n\t\t// Extract `value` from the argument\n\t\t// of this `onChange` listener\n\t\t// (for convenience)\n\n\t\tlet value = event\n\n\t\tif (event.target !== undefined)\n\t\t{\n\t\t\tvalue = event.target.value\n\t\t}\n\n\t\t// Call the parent `onChange` handler\n\t\t// with the `value` as an argument\n\t\t// (for convenience)\n\n\t\tconst { onChange } = this.props\n\n\t\tonChange(value)\n\t}", "handleChange() {\n this.forceUpdate();\n }", "function triggerChange(t) { t.dispatchEvent(changeEvent) }", "function onChange() {\n\n // hide and show input elements for which this is necessary\n setVisibility();\n\n // update preview considering the changed input value\n updatePreview();\n\n // perform change actions\n self.onchange && self.onchange( self );\n\n }", "function onChange() {\n\n // hide and show input elements for which this is necessary\n setVisibility();\n\n // update preview considering the changed input value\n updatePreview();\n\n // perform change actions\n self.onchange && self.onchange( self );\n\n }", "function changed() {\n\t\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t\t}", "registerOnChange(fn) {\n this.propagateChanges = fn;\n }", "handleChange (event) {\n }", "onCurrentChanged(value) {\n /* no-op */\n }", "onChange() {\n triggerEvent(this.input, 'input');\n triggerEvent(this.input, 'change');\n }", "function changed() {\n\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t}", "function changed() {\n\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t}", "_onChange() {\n void this._debouncer.invoke();\n }", "emitChange () {\n this.emit(Constants.CHANGE_EVENT);\n }", "onDidChange (callback) {\n\t\tconst changeSubscription = this.file.onDidChange(callback);\n\t\tthis.subscriptions.add(changeSubscription);\n\t\treturn changeSubscription;\n\t}", "onChange(item) {}", "dispatchChange() {\n this.toggleAttribute(\"empty\", !this.value);\n this.dispatchEvent(new CustomEvent(\"change\", { bubbles: true }));\n }", "function handleChange(){\n\t\t\t// Error handles\n\t\t\tif(xhr.readyState === this.DONE && xhr.status !== 200){\n\t\t\t\tconsole.log('check yoself');\n\t\t\t}\n\t\t\t// success handles\n\t\t\tif(xhr.readyState === this.DONE && xhr.status === 200){\n\t\t\t\tcallback(xhr.response);\n\t\t\t}\n\n\t\t}", "registerChangeListener(cb) {\n this._slider.events.on('indexChanged', cb);\n }", "function onChanged() {\n let g = getGlobal();\n\n //When the add-in creates the table, it will generate 4 events that we must ignore.\n //We only want to respond to the change events from the user.\n if (g.tableEventCount > 0) {\n g.tableEventCount--;\n return; //count down to throw away events caused by the table creation code\n }\n\n //check if dirty flag was set (flag avoids extra unnecessary ribbon operations)\n if (!g.isTableDirty) {\n g.isTableDirty = true;\n\n //Enable the Refresh and Submit buttons\n setSyncButtonEnabled(true);\n }\n}", "_triggerChange (e) {\n var args = [this.getValue(), this.getFormElement(), this.getUIElement()];\n if (e) {\n args.push(e);\n }\n if (this.options.onChange) {\n this.options.onChange.apply(this, args);\n }\n }", "_onChange(value) {\n this.setState({ changesMade: value });\n }", "_codemirrorValueChanged() {\n // Don't trigger change event if we're ignoring changes\n if (this._ignoreNextChange || !this.props.onChange) {\n this._ignoreNextChange = false;\n return;\n }\n\n const value = this.codeMirror.getDoc().getValue();\n\n // Disable linting if the document reaches a maximum size or is empty\n const shouldLint =\n value.length > MAX_SIZE_FOR_LINTING || value.length === 0 ? false : !this.props.noLint;\n const existingLint = this.codeMirror.options.lint || false;\n if (shouldLint !== existingLint) {\n const { lintOptions } = this.props;\n const lint = shouldLint ? lintOptions || true : false;\n this.codeMirror.setOption('lint', lint);\n }\n\n this.props.onChange(value);\n }", "function onChange(change) {\r\n\t\t//split up the path to get the file name\r\n\t\tvar splitUpPath = change.path.split('/');\r\n\r\n\t\t//log the file detected\r\n\t\tconsole.log('\"' + splitUpPath[splitUpPath.length - 1] + '\" was ' + change.type);\r\n\t}", "_onChange() {\n let value = this.get('value');\n return this.attrs.onChange(value, this);\n }", "function optionChanged(changed){\n charts(changed);\n metadata(changed);\n}", "addChangeListener(callback) {\n Bullet.on(LOCAL_EVENT_NAME, callback)\n }", "handleChangeEvent() {\n this.cacheHasChanged = true;\n }", "_onChange () {\n this.forceUpdate()\n }", "changeFn(event) {\n var fileList = event.__files_ || (event.target && event.target.files);\n if (!fileList)\n return;\n this.stopEvent(event);\n this.handleFiles(fileList);\n }", "get onChange() {\n\t\treturn this._onChange;\n\t}", "get onChange() {\n\t\treturn this._onChange;\n\t}", "get onChange() {\n\t\treturn this._onChange;\n\t}", "function sampleOnChange() {\n SkillSampleAPI.onStatusChange(criteriaId);\n }", "reportValueChange() {\n if (this.options) {\n const value = this.getSelectedOptionValues();\n this.onChange(value);\n this._value = value;\n }\n }" ]
[ "0.76215637", "0.7620866", "0.7604169", "0.75682276", "0.7563224", "0.75595355", "0.7537074", "0.7521918", "0.7520366", "0.7498563", "0.7496141", "0.7489214", "0.7487912", "0.7479759", "0.7470643", "0.7470105", "0.74661165", "0.7458496", "0.7453694", "0.7451992", "0.736924", "0.7303583", "0.7273391", "0.7240529", "0.71548766", "0.71520585", "0.7128725", "0.7093861", "0.7083037", "0.70093733", "0.70093733", "0.69801164", "0.697409", "0.69462836", "0.69462836", "0.69462264", "0.69462264", "0.6938091", "0.69152594", "0.69095105", "0.69081986", "0.6828735", "0.6827403", "0.6826205", "0.6825447", "0.6825447", "0.6818633", "0.6811441", "0.6811441", "0.67853796", "0.6766698", "0.67388356", "0.6706443", "0.6706443", "0.6690389", "0.6690049", "0.66818786", "0.66752523", "0.6664632", "0.6662042", "0.6657042", "0.66217285", "0.6617618", "0.66118735", "0.66093236", "0.66083074", "0.6600708", "0.65971905", "0.6594819", "0.6594819", "0.65864474", "0.6579841", "0.6576589", "0.65624547", "0.6545084", "0.6543494", "0.6543494", "0.6543034", "0.6512732", "0.65007645", "0.6487829", "0.64831334", "0.6477887", "0.6468582", "0.6467927", "0.64665604", "0.6463477", "0.6457328", "0.64566207", "0.64305115", "0.64199996", "0.6416667", "0.6404831", "0.6402141", "0.6397671", "0.63960356", "0.63960356", "0.63960356", "0.6394816", "0.6394437" ]
0.7513234
9
Callback invoked upon receiving a change event.
function onChange() { /* eslint-disable no-underscore-dangle */ __debug_259( 'Received a change event.' ); if ( self._autoRender ) { self.render(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "change() { }", "function onChange() {\n\t\t__debug_452( 'Received a change event.' );\n\t\tself.render();\n\t}", "function onChange() {\n\t\t__debug_330( 'Received a change event.' );\n\t\tself.render();\n\t}", "handleEventChange() {\n }", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_730( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "onChange(callback) {\n\t\tthis.changeCallback = callback;\n\t}", "function onChange() {\n\t\t__debug_488( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_587( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_596( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_412( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_475( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_520( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "onChanged(e){}", "function onChange() {\n\t\t__debug_457( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_332( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_429( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_577( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "onchange() {}", "function onChange() {\n console.log(\"something changed...\");\n \n }", "function onChange() {\n\t\t__debug_395( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "addChangeListener(callback) {\n this.on('change', callback);\n }", "function changeEvent() {\n var value_sub = properties.value;\n trigger_param_list.push(value_sub);\n // 'seek' event is like a forced-change event\n $pebble_slider_object.triggerHandler('seek', trigger_param_list);\n if (prev_change_value !== value_sub) {\n $pebble_slider_object.triggerHandler('change', trigger_param_list);\n prev_change_value = value_sub;\n }\n trigger_param_list.length = 0;\n }", "onChange(callback) {\n this.events.change.push({ callback });\n }", "function onChange() {\n if (input.get.call(element, valueField) !== observer.oldValue && !element.readOnly) {\n observer.set(input.get.call(element, valueField));\n }\n }", "function changeFunction() {\n\tconsole.log(\"onchange\");\n}", "addChangeListener (callback) {\n this.on(Constants.CHANGE_EVENT, callback);\n }", "onDidChange(callback) {\n return this.emitter.on('did-change', callback)\n }", "change(/*event*/) {\n this._super(...arguments);\n this._parse();\n }", "addChangeListener (callback) {\n\t\tthis.on(Constants.CHANGE_EVENT, callback);\n\t}", "function handleChange(editor, data, value) {\n onChange(value);\n }", "function handleChange(editor, data, value) {\n onChange(value);\n }", "onDataChange() {}", "changedCallback () {\n\t\tif (this.oldValue === this.value) return;\n\t\tthis._setTranslation();\n\t}", "change(fn, options) {\n\t\treturn this.on({ change: fn }, options);\n\t}", "change(fn, options) {\n\t\treturn this.on({ change: fn }, options);\n\t}", "onChange () {}", "onChange () {}", "onChange(changeListener) {\n changeListener.path = this.path;\n privateDataMap.get(this).addListener(changeListener, this.path);\n }", "handleChange(event) {\n this.dispatchEvent(new CustomEvent('change', {detail: event.target.value}));\n }", "function changed(change) {\n if (change.changeType === \"property\" && change.property === property) {\n fn(change);\n }\n }", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "_setOnChanges(){\n\t\tthis.inputs.forEach(i => i.addEventListener('change', this._onChange.bind(this)));\t\n\t}", "handleChange(event) {\n\n }", "function onChangeHandler(e) {\n\n }", "function onChangeHandler(e) {\n\n }", "emitChange() {\n\t\tthis.emit(CHANGE_EVENT)\n\t}", "addChangeListener(callback) {\n\t\tthis.on(CHANGE_EVENT, callback)\n\t}", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "internalOnChange(event) {\n const me = this,\n value = me.value,\n oldValue = me._lastValue;\n\n // Don't trigger change if we enter invalid value or if value has not changed (for IE when pressing ENTER)\n if (me.isValid && value !== oldValue) {\n me._lastValue = value;\n\n // trigger change event, signaling that origin is from user\n me.trigger('change', { value, oldValue, event, userAction: true });\n\n // per default Field triggers action event on change, but might be reconfigured in subclasses (such as Combo)\n if (me.defaultAction === 'change') {\n me.trigger('action', { value, oldValue, event });\n }\n }\n\n // since Widget has Events mixed in configured with 'callOnFunctions' this will also call onClick and onAction\n }", "handleChange () {\n this.props.onStatusChange(\n this.props.item.id,\n this.refs.checkbox.checked ? 'RESERVED' : 'NEW'\n );\n }", "_valueChanged() {\n // Send a global refresh to the bapge body.\n var event = new Event(\"change\");\n this._root.dispatchEvent(event);\n }", "emitChange() {\n this.emit(CHANGE_EVENT);\n }", "emitChange() {\n this.emit(CHANGE_EVENT);\n }", "_triggerChangeEvent() {\n\t\tif ( this.$control.rendered && ! this.changeEventDisabled ) {\n\t\t\tthis._updateSettings();\n\t\t\tthis.events.emit( 'change', this.settings );\n\t\t}\n\t}", "handleChange(event){\n changeHandler(event,this);\n }", "setOnValueChangeEvent(func){\r\n this._onValueChange = func;\r\n }", "function referenceOnChange() {\n MicroReferenceAPI.onStatusChange(criteriaId);\n }", "function handleChange(event, newValue) {\n setValue(newValue);\n }", "onChange(callback) {\n this.listeners.push(callback);\n }", "onGenericChange() {\n this.contentChanged.emit(void 0);\n }", "afterValidChange() { }", "static on_changed(chr, _retval) {\n let uuid = chr.getUuid()\n console.log(colours.fg.blue + \"[BLE] [CHANGE ]\" + colours.fg.yellow + \" UUID: \" + uuid.toString() + colours.fg.magenta + \" | data: 0x\" + bytes2hex(chr.getValue()) + colours.reset);\n }", "changedInput() {\n\n\t\tlet {isValid, error} = this.state.wasInvalid ? this.validate() : this.state;\n\t\tlet onChange = this.props.onChange;\n\t\tif (onChange) {\n\t\t\tonChange(this.getValue(), isValid, error);\n\t\t}\n\t\tif (this.context.validationSchema) {\n\t\t\tlet value = this.getValue();\n\t\t\tif (this.state.isMultiSelect && value === '') {\n\t\t\t\tvalue = [];\n\t\t\t}\n\t\t\tif (this.shouldTypeBeNumberBySchemeDefinition(this.props.pointer)) {\n\t\t\t\tvalue = Number(value);\n\t\t\t}\n\t\t\tthis.context.validationParent.onValueChanged(this.props.pointer, value, isValid, error);\n\t\t}\n\t}", "_evtChange(event) { }", "on_change(event)\n\t{\n\t\t// Extract `value` from the argument\n\t\t// of this `onChange` listener\n\t\t// (for convenience)\n\n\t\tlet value = event\n\n\t\tif (event.target !== undefined)\n\t\t{\n\t\t\tvalue = event.target.value\n\t\t}\n\n\t\t// Call the parent `onChange` handler\n\t\t// with the `value` as an argument\n\t\t// (for convenience)\n\n\t\tconst { onChange } = this.props\n\n\t\tonChange(value)\n\t}", "handleChange() {\n this.forceUpdate();\n }", "function triggerChange(t) { t.dispatchEvent(changeEvent) }", "function onChange() {\n\n // hide and show input elements for which this is necessary\n setVisibility();\n\n // update preview considering the changed input value\n updatePreview();\n\n // perform change actions\n self.onchange && self.onchange( self );\n\n }", "function onChange() {\n\n // hide and show input elements for which this is necessary\n setVisibility();\n\n // update preview considering the changed input value\n updatePreview();\n\n // perform change actions\n self.onchange && self.onchange( self );\n\n }", "function changed() {\n\t\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t\t}", "registerOnChange(fn) {\n this.propagateChanges = fn;\n }", "handleChange (event) {\n }", "onCurrentChanged(value) {\n /* no-op */\n }", "onChange() {\n triggerEvent(this.input, 'input');\n triggerEvent(this.input, 'change');\n }", "function changed() {\n\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t}", "function changed() {\n\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t}", "_onChange() {\n void this._debouncer.invoke();\n }", "emitChange () {\n this.emit(Constants.CHANGE_EVENT);\n }", "onDidChange (callback) {\n\t\tconst changeSubscription = this.file.onDidChange(callback);\n\t\tthis.subscriptions.add(changeSubscription);\n\t\treturn changeSubscription;\n\t}", "onChange(item) {}", "dispatchChange() {\n this.toggleAttribute(\"empty\", !this.value);\n this.dispatchEvent(new CustomEvent(\"change\", { bubbles: true }));\n }", "function handleChange(){\n\t\t\t// Error handles\n\t\t\tif(xhr.readyState === this.DONE && xhr.status !== 200){\n\t\t\t\tconsole.log('check yoself');\n\t\t\t}\n\t\t\t// success handles\n\t\t\tif(xhr.readyState === this.DONE && xhr.status === 200){\n\t\t\t\tcallback(xhr.response);\n\t\t\t}\n\n\t\t}", "registerChangeListener(cb) {\n this._slider.events.on('indexChanged', cb);\n }", "function onChanged() {\n let g = getGlobal();\n\n //When the add-in creates the table, it will generate 4 events that we must ignore.\n //We only want to respond to the change events from the user.\n if (g.tableEventCount > 0) {\n g.tableEventCount--;\n return; //count down to throw away events caused by the table creation code\n }\n\n //check if dirty flag was set (flag avoids extra unnecessary ribbon operations)\n if (!g.isTableDirty) {\n g.isTableDirty = true;\n\n //Enable the Refresh and Submit buttons\n setSyncButtonEnabled(true);\n }\n}", "_triggerChange (e) {\n var args = [this.getValue(), this.getFormElement(), this.getUIElement()];\n if (e) {\n args.push(e);\n }\n if (this.options.onChange) {\n this.options.onChange.apply(this, args);\n }\n }", "_onChange(value) {\n this.setState({ changesMade: value });\n }", "_codemirrorValueChanged() {\n // Don't trigger change event if we're ignoring changes\n if (this._ignoreNextChange || !this.props.onChange) {\n this._ignoreNextChange = false;\n return;\n }\n\n const value = this.codeMirror.getDoc().getValue();\n\n // Disable linting if the document reaches a maximum size or is empty\n const shouldLint =\n value.length > MAX_SIZE_FOR_LINTING || value.length === 0 ? false : !this.props.noLint;\n const existingLint = this.codeMirror.options.lint || false;\n if (shouldLint !== existingLint) {\n const { lintOptions } = this.props;\n const lint = shouldLint ? lintOptions || true : false;\n this.codeMirror.setOption('lint', lint);\n }\n\n this.props.onChange(value);\n }", "function onChange(change) {\r\n\t\t//split up the path to get the file name\r\n\t\tvar splitUpPath = change.path.split('/');\r\n\r\n\t\t//log the file detected\r\n\t\tconsole.log('\"' + splitUpPath[splitUpPath.length - 1] + '\" was ' + change.type);\r\n\t}", "_onChange() {\n let value = this.get('value');\n return this.attrs.onChange(value, this);\n }", "function optionChanged(changed){\n charts(changed);\n metadata(changed);\n}", "addChangeListener(callback) {\n Bullet.on(LOCAL_EVENT_NAME, callback)\n }", "handleChangeEvent() {\n this.cacheHasChanged = true;\n }", "_onChange () {\n this.forceUpdate()\n }", "changeFn(event) {\n var fileList = event.__files_ || (event.target && event.target.files);\n if (!fileList)\n return;\n this.stopEvent(event);\n this.handleFiles(fileList);\n }", "get onChange() {\n\t\treturn this._onChange;\n\t}", "get onChange() {\n\t\treturn this._onChange;\n\t}", "get onChange() {\n\t\treturn this._onChange;\n\t}", "function sampleOnChange() {\n SkillSampleAPI.onStatusChange(criteriaId);\n }", "reportValueChange() {\n if (this.options) {\n const value = this.getSelectedOptionValues();\n this.onChange(value);\n this._value = value;\n }\n }" ]
[ "0.76206696", "0.7620642", "0.7603297", "0.7567978", "0.7562529", "0.7559636", "0.7521261", "0.7519743", "0.7512532", "0.7497861", "0.74954176", "0.74885535", "0.7486875", "0.74790376", "0.7469961", "0.7469411", "0.74654305", "0.74590075", "0.74529", "0.74512655", "0.7369066", "0.730385", "0.72735673", "0.72414035", "0.71549815", "0.7152514", "0.7128517", "0.7093095", "0.7083617", "0.7009139", "0.7009139", "0.69793963", "0.6974256", "0.6947616", "0.6947616", "0.69458693", "0.69458693", "0.6937772", "0.6914656", "0.690971", "0.6908083", "0.68284774", "0.682663", "0.68252903", "0.68252903", "0.6824956", "0.6818822", "0.6811583", "0.6811583", "0.6786172", "0.6765572", "0.67383015", "0.6705071", "0.6705071", "0.6690313", "0.668894", "0.6682675", "0.66756", "0.6664683", "0.6661744", "0.66555774", "0.6622243", "0.66172475", "0.66127586", "0.66093457", "0.6608061", "0.6598658", "0.65959495", "0.659532", "0.659532", "0.658595", "0.65802854", "0.657574", "0.6562282", "0.654525", "0.6543162", "0.6543162", "0.6542606", "0.6511655", "0.6500862", "0.6486968", "0.64826125", "0.6478265", "0.6468562", "0.6468112", "0.6466427", "0.64623266", "0.6457302", "0.64557207", "0.6430325", "0.64199036", "0.6416071", "0.64035237", "0.63999367", "0.6397887", "0.6395908", "0.6395908", "0.6395908", "0.63955903", "0.6395481" ]
0.75364155
6
Callback invoked upon receiving a `change` event.
function onChange() { /* eslint-disable no-underscore-dangle */ __debug_730( 'Received a change event.' ); if ( self._autoRender ) { self.render(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onchange() {}", "function onChange() {\n\t\t__debug_452( 'Received a change event.' );\n\t\tself.render();\n\t}", "function onChange() {\n\t\t__debug_330( 'Received a change event.' );\n\t\tself.render();\n\t}", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_259( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "change() { }", "function onChange() {\n\t\t/* eslint-disable no-underscore-dangle */\n\t\t__debug_596( 'Received a change event.' );\n\t\tif ( self._autoRender ) {\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_587( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_488( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_412( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_475( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_520( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_457( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_577( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_332( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_429( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "function onChange() {\n\t\t__debug_395( 'Received a change event.' );\n\t\tif ( self._autoRender ) { // eslint-disable-line no-underscore-dangle\n\t\t\tself.render();\n\t\t}\n\t}", "onChange(callback) {\n\t\tthis.changeCallback = callback;\n\t}", "onChange(callback) {\n this.events.change.push({ callback });\n }", "function onChange() {\n console.log(\"something changed...\");\n \n }", "function changeFunction() {\n\tconsole.log(\"onchange\");\n}", "change(/*event*/) {\n this._super(...arguments);\n this._parse();\n }", "handleEventChange() {\n }", "onChanged(e){}", "onChange () {}", "onChange () {}", "function onChangeHandler(e) {\n\n }", "function onChangeHandler(e) {\n\n }", "addChangeListener(callback) {\n this.on('change', callback);\n }", "change(fn, options) {\n\t\treturn this.on({ change: fn }, options);\n\t}", "change(fn, options) {\n\t\treturn this.on({ change: fn }, options);\n\t}", "function changeEvent() {\n var value_sub = properties.value;\n trigger_param_list.push(value_sub);\n // 'seek' event is like a forced-change event\n $pebble_slider_object.triggerHandler('seek', trigger_param_list);\n if (prev_change_value !== value_sub) {\n $pebble_slider_object.triggerHandler('change', trigger_param_list);\n prev_change_value = value_sub;\n }\n trigger_param_list.length = 0;\n }", "handleChange(event) {\n\n }", "handleChange(event) {\n this.dispatchEvent(new CustomEvent('change', {detail: event.target.value}));\n }", "function onChange() {\n if (input.get.call(element, valueField) !== observer.oldValue && !element.readOnly) {\n observer.set(input.get.call(element, valueField));\n }\n }", "function handleChange(editor, data, value) {\n onChange(value);\n }", "function handleChange(editor, data, value) {\n onChange(value);\n }", "handleChange (event) {\n }", "on_change(event)\n\t{\n\t\t// Extract `value` from the argument\n\t\t// of this `onChange` listener\n\t\t// (for convenience)\n\n\t\tlet value = event\n\n\t\tif (event.target !== undefined)\n\t\t{\n\t\t\tvalue = event.target.value\n\t\t}\n\n\t\t// Call the parent `onChange` handler\n\t\t// with the `value` as an argument\n\t\t// (for convenience)\n\n\t\tconst { onChange } = this.props\n\n\t\tonChange(value)\n\t}", "function handleChange(event, newValue) {\n setValue(newValue);\n }", "addChangeListener (callback) {\n this.on(Constants.CHANGE_EVENT, callback);\n }", "function changed(change) {\n if (change.changeType === \"property\" && change.property === property) {\n fn(change);\n }\n }", "function onChange(change) {\r\n\t\t//split up the path to get the file name\r\n\t\tvar splitUpPath = change.path.split('/');\r\n\r\n\t\t//log the file detected\r\n\t\tconsole.log('\"' + splitUpPath[splitUpPath.length - 1] + '\" was ' + change.type);\r\n\t}", "function onChange() {\n\n // hide and show input elements for which this is necessary\n setVisibility();\n\n // update preview considering the changed input value\n updatePreview();\n\n // perform change actions\n self.onchange && self.onchange( self );\n\n }", "function onChange() {\n\n // hide and show input elements for which this is necessary\n setVisibility();\n\n // update preview considering the changed input value\n updatePreview();\n\n // perform change actions\n self.onchange && self.onchange( self );\n\n }", "onChange() {\n triggerEvent(this.input, 'input');\n triggerEvent(this.input, 'change');\n }", "_setOnChanges(){\n\t\tthis.inputs.forEach(i => i.addEventListener('change', this._onChange.bind(this)));\t\n\t}", "addChangeListener (callback) {\n\t\tthis.on(Constants.CHANGE_EVENT, callback);\n\t}", "changeFn(event) {\n var fileList = event.__files_ || (event.target && event.target.files);\n if (!fileList)\n return;\n this.stopEvent(event);\n this.handleFiles(fileList);\n }", "onChange(item) {}", "onChange(callback) {\n this.listeners.push(callback);\n }", "onDataChange() {}", "handleChange(event){\n changeHandler(event,this);\n }", "onChange(changeListener) {\n changeListener.path = this.path;\n privateDataMap.get(this).addListener(changeListener, this.path);\n }", "function optionChanged(changed){\n charts(changed);\n metadata(changed);\n}", "function onChange(event)\n\t{\n\t\tconst val = event.target.value\n\t\tsetValue(val)\n\t}", "function optionChanged(){\n init();\n}", "internalOnChange(event) {\n const me = this,\n value = me.value,\n oldValue = me._lastValue;\n\n // Don't trigger change if we enter invalid value or if value has not changed (for IE when pressing ENTER)\n if (me.isValid && value !== oldValue) {\n me._lastValue = value;\n\n // trigger change event, signaling that origin is from user\n me.trigger('change', { value, oldValue, event, userAction: true });\n\n // per default Field triggers action event on change, but might be reconfigured in subclasses (such as Combo)\n if (me.defaultAction === 'change') {\n me.trigger('action', { value, oldValue, event });\n }\n }\n\n // since Widget has Events mixed in configured with 'callOnFunctions' this will also call onClick and onAction\n }", "function onChange(value) {\n console.log(value);\n}", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "function onChange(e) {\n setValue(e.target.value);\n }", "handleChange() {\r\n var e = document.getElementById(\"selection\")\r\n // call passed in function to spawn any necessary actions on the parent component.\r\n this.props.sendChange(e.value)\r\n }", "onDidChange(callback) {\n return this.emitter.on('did-change', callback)\n }", "_triggerChange (e) {\n var args = [this.getValue(), this.getFormElement(), this.getUIElement()];\n if (e) {\n args.push(e);\n }\n if (this.options.onChange) {\n this.options.onChange.apply(this, args);\n }\n }", "_onChange() {\n let value = this.get('value');\n return this.attrs.onChange(value, this);\n }", "handleChange () {\n this.props.onStatusChange(\n this.props.item.id,\n this.refs.checkbox.checked ? 'RESERVED' : 'NEW'\n );\n }", "function handleChange(event, value) {\n setValue(value);\n }", "dispatchChange() {\n this.toggleAttribute(\"empty\", !this.value);\n this.dispatchEvent(new CustomEvent(\"change\", { bubbles: true }));\n }", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "addChangeListener(callback) {\n this.on(CHANGE, callback);\n }", "function handleChange(ev) {\n\n switch (ev.name) {\n case \"duration\":\n handleDurationChange(ev);\n break;\n case \"type\":\n handleTypeChange(ev);\n break;\n case \"unit\":\n handleUnitChange(ev);\n break;\n case \"display\":\n handleDisplayChange(ev);\n break;\n }\n}", "function handleChanged(event) {\n console.log(event.target.value);\n setName(event.target.value);\n }", "emitChange() {\n\t\tthis.emit(CHANGE_EVENT)\n\t}", "_triggerChangeEvent() {\n\t\tif ( this.$control.rendered && ! this.changeEventDisabled ) {\n\t\t\tthis._updateSettings();\n\t\t\tthis.events.emit( 'change', this.settings );\n\t\t}\n\t}", "changedInput() {\n\n\t\tlet {isValid, error} = this.state.wasInvalid ? this.validate() : this.state;\n\t\tlet onChange = this.props.onChange;\n\t\tif (onChange) {\n\t\t\tonChange(this.getValue(), isValid, error);\n\t\t}\n\t\tif (this.context.validationSchema) {\n\t\t\tlet value = this.getValue();\n\t\t\tif (this.state.isMultiSelect && value === '') {\n\t\t\t\tvalue = [];\n\t\t\t}\n\t\t\tif (this.shouldTypeBeNumberBySchemeDefinition(this.props.pointer)) {\n\t\t\t\tvalue = Number(value);\n\t\t\t}\n\t\t\tthis.context.validationParent.onValueChanged(this.props.pointer, value, isValid, error);\n\t\t}\n\t}", "setOnValueChangeEvent(func){\r\n this._onValueChange = func;\r\n }", "addChangeListener(callback) {\n\t\tthis.on(CHANGE_EVENT, callback)\n\t}", "change() {\n\n const divs = this.parent.querySelectorAll('[class^=\"toggle-select-\"],[class*=\" toggle-select-\"]');\n const selectOption = this.select.options[this.select.selectedIndex];\n let value;\n\n if(this.options.field == 'group')\n {\n value = selectOption.parentNode.label ? selectOption.parentNode.label.toLowerCase() : null;\n } else {\n value = selectOption.value;\n }\n\n // Toggle each div\n divs.forEach(div => {\n const isVisible = div.classList.contains('toggle-select-'+value);\n const inputs = div.querySelectorAll('select,textarea,input:not([type=\"hidden\"],[type=\"checkbox\"],[type=\"radio\"])');\n\n // Toggle the visible div\n isVisible ? div.classList.remove('d-none') : div.classList.add('d-none');\n\n // Toggle the inputs\n if(inputs)\n {\n this.toggleForm(inputs,isVisible);\n }\n\n });\n\n // Run the custom callback\n this.options.onChanged(value);\n\n }", "function onChange(e) {\n let val = e.target.value\n setValue(val)\n }", "_onChange() {\n void this._debouncer.invoke();\n }", "change(e){\n this.props.onChange(e);\n }", "_evtChange(event) { }", "changedCallback () {\n\t\tif (this.oldValue === this.value) return;\n\t\tthis._setTranslation();\n\t}", "_onChange(value) {\n this.setState({ changesMade: value });\n }", "function handleFieldChange(name, value) {\n console.log('handle field change', name, value);\n}", "get onChange() {\n\t\treturn this._onChange;\n\t}", "get onChange() {\n\t\treturn this._onChange;\n\t}", "get onChange() {\n\t\treturn this._onChange;\n\t}", "function triggerChange(t) { t.dispatchEvent(changeEvent) }", "function onChange(model, options) {\n trigger.call(this, 'change', model, model.changedAttributes());\n}", "function handleChange(){\n\t\t\t// Error handles\n\t\t\tif(xhr.readyState === this.DONE && xhr.status !== 200){\n\t\t\t\tconsole.log('check yoself');\n\t\t\t}\n\t\t\t// success handles\n\t\t\tif(xhr.readyState === this.DONE && xhr.status === 200){\n\t\t\t\tcallback(xhr.response);\n\t\t\t}\n\n\t\t}", "function optionChanged(id) {\n\n getData(id);\n}", "onGenericChange() {\n this.contentChanged.emit(void 0);\n }", "function changed() {\n\t\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t\t}", "_valueChanged() {\n // Send a global refresh to the bapge body.\n var event = new Event(\"change\");\n this._root.dispatchEvent(event);\n }", "registerOnChange(fn) {\n this._onChange = fn;\n }", "registerOnChange(fn) {\n this._onChange = fn;\n }", "registerOnChange(fn) {\n this._onChange = fn;\n }", "registerOnChange(fn) {\n this._onChange = fn;\n }", "registerOnChange(fn) {\n this._onChange = fn;\n }", "registerOnChange(fn) {\n this._onChange = fn;\n }" ]
[ "0.780158", "0.7738475", "0.77369756", "0.77029145", "0.76844275", "0.7682688", "0.7669162", "0.7657933", "0.76380193", "0.76380044", "0.76366675", "0.762749", "0.7620743", "0.7619063", "0.7610295", "0.7607545", "0.76055974", "0.74953437", "0.7451562", "0.73982304", "0.73816687", "0.73451215", "0.73160183", "0.72348636", "0.72348636", "0.72133523", "0.72133523", "0.72039765", "0.71511525", "0.71511525", "0.71294165", "0.7107751", "0.7091095", "0.70530605", "0.70489186", "0.70489186", "0.6971249", "0.6936888", "0.682686", "0.67989826", "0.6795398", "0.67953473", "0.67911124", "0.67911124", "0.67851907", "0.67817754", "0.6715953", "0.6715252", "0.6708887", "0.669219", "0.6690656", "0.6686853", "0.66834104", "0.667601", "0.6669034", "0.66663903", "0.6657707", "0.6646295", "0.6637038", "0.6635842", "0.6608839", "0.6594631", "0.6574918", "0.6559714", "0.6559646", "0.6540975", "0.65370864", "0.6532238", "0.6532238", "0.652345", "0.65154487", "0.6514823", "0.65146434", "0.65105796", "0.6508008", "0.6502548", "0.64969826", "0.6460906", "0.64523494", "0.6443726", "0.64429086", "0.6438711", "0.6437379", "0.64314276", "0.643006", "0.643006", "0.643006", "0.64285946", "0.6427114", "0.642414", "0.6423626", "0.64166296", "0.6411354", "0.6394273", "0.63868994", "0.63868994", "0.63868994", "0.63868994", "0.63868994", "0.63868994" ]
0.7720417
3
Next turn alteration, comp generation
function nextTurn() { let index = floor(random(next.length)); let position = next.splice(index, 1)[0]; let i = position[0]; let j = position[1]; board[i][j] = players[currentPlayer]; currentPlayer = (currentPlayer + 1) % players.length; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function nextGeneration() {\n boardTmp = [];\n board.forEach(arrayTiles => boardTmp.push(new Array(arrayTiles.length)));\n board.forEach((arrayTiles, index1D) => arrayTiles.forEach((tile, index2D) => boardTmp[index1D][index2D] = tile));\n\n board.forEach((arrayTiles, index1D) => arrayTiles.forEach((tile, index2D) => cellEvolve(index1D, index2D)));\n\n board = boardTmp;\n\n $(__BOARD__).children().each((index, tileNode) => {\n tileNode = $(tileNode);\n if(tileNode.attr('class').replace(\" \", \"\") !== board[tileNode.attr(\"data-index-1d\")][tileNode.attr(\"data-index-2d\")]) {\n tileNode.toggleClass(__BLACK_TILE_CLASS__);\n tileNode.toggleClass(__WHITE_TILE_CLASS__);\n }\n });\n\n numGeneration++;\n $(\"#num-generation\").text(numGeneration);\n}", "function calculateNextGeneration() {\n if (isGameActive) {\n nextGenerationCalculated();\n }\n}", "nextGen() {\r\n\t\tthis.board = this.rules(this.board);\r\n\t\tfor (let i = 1; i < this.board.length - 1; i++) {\r\n\t\t\tfor (let j = 1; j < this.board[i].length - 1; j++) {\r\n\t\t\t\tif (this.board[i][j] == 1)\r\n\t\t\t\t\tdocument.getElementById(`${i},${j}`).className = \"live\";\r\n\t\t\t\telse document.getElementById(`${i},${j}`).className = \"dead\";\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function newGeneration(){\n firstTime = 1;\n newGen === true ? step() : null\n}", "function nextGen() {\n population.selection();\n population.reproduction();\n}", "function nextGeneration() {\r\n resetGame();\r\n // Normalize the fitness values 0-1\r\n normalizeFitness(allBoards);\r\n // Generate a new set of birds\r\n activeBoards = generate(allBoards);\r\n\r\n addTiles(activeBoards);\r\n // Copy those birds to another array\r\n allBoards = activeBoards.slice();\r\n}", "step() {\n // Fill the offscreen buffer with the next cca generation built\n // from the current buffer.\n\n let backBufferIndex = this.currentBufferIndex === 0 ? 1 : 0;\n let currentBuffer = this.buffer[this.currentBufferIndex];\n let backBuffer = this.buffer[backBufferIndex];\n\n // See if we have a neighbor to infect this one\n function hasInfectiousNeighbor(x, y) {\n const nextValue = (currentBuffer[y][x] + 1) % MODULO;\n\n // Check the west neighbor of cell x, y\n /*if (x > 0) {\n if (currentBuffer[y][x - 1] === nextValue) {\n return true;\n }\n }*/\n\n // North\n if (y > 0) {\n if (currentBuffer[y - 1][x] === nextValue) {\n return true;\n }\n }\n\n // East\n if (x < this.width - 1) {\n if (currentBuffer[y][x + 1] === nextValue) {\n return true;\n }\n }\n\n // South\n if (y < this.height - 1) {\n if (currentBuffer[y + 1][x] === nextValue) {\n return true;\n }\n }\n\n // If we've made it this far we're not infected!\n return false;\n }\n\n // Loop through and decide the state of the next generation\n // for each cell processed.\n for (let y = 0; y < this.height; y++) {\n for (let x = 0; x < this.width; x++) {\n if (hasInfectiousNeighbor.call(this, x, y)) {\n backBuffer[y][x] = (currentBuffer[y][x] + 1) % MODULO;\n } else {\n backBuffer[y][x] = currentBuffer[y][x];\n }\n }\n }\n\n this.currentBufferIndex = this.currentBufferIndex === 0 ? 1 : 0;\n }", "function cycle_generation() {\n var _t = playProgression(0, applyTonalMask(mwrncb(mix_buffers()).map((arr)=>{return [arr[0],arr[1]/param2];}),tonal_mask[Object.getOwnPropertyNames(tonal_mask)[param4]]));\n return setTimeout(()=>{cycle_generation()}, _t*param3); //wait this shouldn't be an interval\n}", "function nextGenerationCalculated() {\n for (var i = 0; i < rows; i++) {\n for (var j = 0; j < columns; j++) {\n checkBoardState(i, j);\n }\n }\n\n //Set current board and free up the next board\n duplicateBoard();\n // copy all 1 values to \"alive\" in the table\n updateBoard();\n\n}", "function next() {\n\t\n\tif (currentTransformStep === transformSteps.length) {\n\t\tconsole.log('all transformations performed')\n\t}\n\telse\n\t\ttransformSteps[currentTransformStep++]()\n\t\t\n}", "function conwayLife( board, turns ){\n for (let i = 0; i < turns; i++){\n board = transform(board)\n }\n return board\n}", "function cycle() {\n // When the changes have reached the maximum, we need to stop the simulation for a bit.\n\n if (chng === numChanges - 1) {\n // console.log(`bots length: ${bots.length}`);\n document.getElementById(\"Message\").innerHTML = `Generation ${gen} has finished its life, time for the fittest to have offspring!`;\n clearInterval(CY);\n gen += 1;\n chng = 0;\n // Sort the array of bots based on their fitness.\n bots.sort(compare);\n // console.log(`bots length: ${bots.length}`);\n var numReplic = Math.ceil(numBots * 0.25);\n var GenReproduce = new Array(numReplic);\n // Transfer the top 25 % to another array for reproduction. Stop drawing everything.\n clearInterval(DE);\n canvasContext.fillStyle = 'white';\n canvasContext.fillRect(0, 0, canvas.width, canvas.height);\n // We also animate the best of that generation.\n for (let i = 0; i < numReplic; i += 1) {\n GenReproduce[i] = bots[i];\n var color = bots[i].getColor();\n drawCircle((i * 20) + 15, 20, botRadius, color);\n }\n\n console.log(GenReproduce);\n // wait for 2 seconds to show the best from that generation before reproduction\n setTimeout(() => {\n console.log(\"Starting next sim\");\n document.getElementById(\"Message\").innerHTML = \"And those are Their offspring below them! <br>Press next generation to continue...\";\n document.getElementById(\"nextGen\").classList = \"highlightButton\";\n // Reproducing\n var newGen = new Array(numBots);\n var k = 0;\n for (let i = 0; i < numReplic; i += 1) {\n for (let j = 0; j < 4; j += 1) {\n newGen[k] = GenReproduce[i].reproduce();\n k += 1;\n }\n }\n // print new generation.\n bots.length = 0;\n // console.log(newGen);\n bots = newGen;\n for (let i = 0; i < bots.length; i += 1) {\n drawCircle((i * 20) + 15, 60, botRadius, bots[i].getColor());\n }\n }, 4000);\n\n document.getElementById(\"Message\").innerHTML = `Generation ${gen} Has finished its life! These are selected to reproduce in the next generation!`;\n } else {\n document.getElementById(\"Message\").innerHTML = \"Simulating...\";\n chng += 1;\n acqChng();\n }\n}", "function completeComp() {\n generateCountBack();\n compFactory.finalOrder = players.sortPlayers(Object.keys(players.getAllPlayers()));\n compFactory.currentRoundNumber = 0;\n }", "function makeAStep(){\n let nextGen = makeTheArray(col, row);\n for(i =0;i<col;i++){\n for(j=0;j<row;j++){\n\n let state = grid[i][j];\n let voisin = countVoisin(grid, i ,j);\n\n if(state == 0 && voisin ==3){\n nextGen[i][j] = 1;\n }else if(state ==1 && (voisin <2 || voisin >3)){\n nextGen[i][j] = 0;\n }else{\n nextGen[i][j] = state;\n }\n\n }\n }\n // the grid will now become the grid that was modified\n grid = nextGen;\n}", "function next_gen() {\r\n isRunning = false;\r\n updateCells(gameGrid);\r\n drawGridLines();\r\n generation++;\r\n document.getElementById(\"gen-num\").innerHTML = generation;\r\n }", "function nextGeneration() {\n generation++\n // console.log(\"Next Generation\")\n resetGameGA()\n // Generate a new set of pacmen\n normalizeFitness(players)\n newPlayers = generate(players)\n // newPlayers = newPlayers.map(resetPlayerValues)\n // Copy those birds to another array\n players = newPlayers.slice()\n // console.log(players)\n}", "runGeneration() {\n this.sort();\n \n const crossoverList = this.solutions[0].crossover(this.solutions[1]);\n this.solutions.push(crossoverList);\n \n for (let i=0; i<this.getSize(); i++) {\n if (utils.randPercent < this.mutationRate) {\n this.mutateSolution(this.solution[i]);\n }\n }\n }", "compose() {\n this.composeWith(`${_consts.GENERATOR_NAME}:${_consts.SUB_GEN_FINISH}`);\n }", "function revStep(firstText, secondText, enzyme, firstRectMidX, firstRectMidY,\n nextX, nextY, ctx, moduleNumber) {\n //create first protein\n ctx.closePath();\n ctx.beginPath();\n ctx.font = \"20px Arial\";\n //color = yourFunction(max)\n ctx.rect(firstRectMidX - 100, firstRectMidY - 25, 100, 50);\n ctx.fillStyle = calculateColor(moduleNumber, 1);\n ctx.fill();\n ctx.closePath();\n ctx.beginPath();\n //draw arrows between proteins\n if (nextX) {\n if (nextX === firstRectMidX) { //reactions are formatted normally\n ctx.moveTo(firstRectMidX - 65, firstRectMidY + 35);\n ctx.lineTo(firstRectMidX - 55, firstRectMidY + 25);\n ctx.lineTo(firstRectMidX - 55, firstRectMidY + 75);\n ctx.moveTo(firstRectMidX - 45, firstRectMidY + 25);\n ctx.lineTo(firstRectMidX - 45, firstRectMidY + 75);\n ctx.lineTo(firstRectMidX - 35, firstRectMidY + 65);\n ctx.stroke();\n ctx.closePath();\n ctx.beginPath();\n //create second protein\n ctx.rect(firstRectMidX - 100, firstRectMidY + 75, 100, 50);\n ctx.fillStyle = calculateColor(moduleNumber, 0);\n ctx.fill();\n ctx.closePath();\n ctx.beginPath();\n } else {\n if (nextY === firstRectMidY) { //reactions horizontally connected\n ctx.moveTo(firstRectMidX + 10, firstRectMidY - 15);\n ctx.lineTo(firstRectMidX, firstRectMidY - 5);\n ctx.lineTo(firstRectMidX + 50, firstRectMidY - 5);\n ctx.moveTo(firstRectMidX, firstRectMidY + 5);\n ctx.lineTo(firstRectMidX + 50, firstRectMidY + 5);\n ctx.lineTo(firstRectMidX + 40, firstRectMidY + 15);\n ctx.stroke();\n ctx.closePath();\n ctx.beginPath();\n ctx.rect(firstRectMidX + 50, firstRectMidY - 25, 100, 50);\n ctx.fillStyle = calculateColor(moduleNumber, 0);\n ctx.fill();\n ctx.closePath();\n ctx.beginPath();\n } else { //reactions diagonally connected\n ctx.moveTo(firstRectMidX - 55, firstRectMidY + 25);\n ctx.lineTo(firstRectMidX - 55, firstRectMidY + 50);\n ctx.lineTo(firstRectMidX - 130, firstRectMidY + 75);\n ctx.moveTo(firstRectMidX - 55, firstRectMidY + 50);\n ctx.lineTo(firstRectMidX + 20, firstRectMidY + 75);\n ctx.moveTo(firstRectMidX - 45, firstRectMidY + 25);\n ctx.lineTo(firstRectMidX - 45, firstRectMidY + 50);\n ctx.lineTo(firstRectMidX - 120, firstRectMidY + 75);\n ctx.moveTo(firstRectMidX - 45, firstRectMidY + 50);\n ctx.lineTo(firstRectMidX + 30, firstRectMidY + 75);\n ctx.stroke();\n ctx.closePath();\n ctx.beginPath();\n ctx.rect(firstRectMidX - 175, firstRectMidY + 75, 100, 50);\n ctx.rect(firstRectMidX - 25, firstRectMidY + 75, 100, 50);\n ctx.fillStyle = calculateColor(moduleNumber, 0);\n ctx.fill();\n ctx.closePath();\n ctx.beginPath();\n }\n }\n } else {\n ctx.moveTo(firstRectMidX - 65, firstRectMidY + 35);\n ctx.lineTo(firstRectMidX - 55, firstRectMidY + 25);\n ctx.lineTo(firstRectMidX - 55, firstRectMidY + 75);\n ctx.moveTo(firstRectMidX - 45, firstRectMidY + 25);\n ctx.lineTo(firstRectMidX - 45, firstRectMidY + 75);\n ctx.lineTo(firstRectMidX - 35, firstRectMidY + 65);\n ctx.stroke();\n ctx.closePath();\n ctx.beginPath();\n //create second protein\n ctx.rect(firstRectMidX - 100, firstRectMidY + 75, 100, 50);\n ctx.fillStyle = calculateColor(moduleNumber, 0);\n ctx.fill();\n ctx.closePath();\n ctx.beginPath();\n\n }\n //Enzyme\n ctx.beginPath();\n ctx.font = \"12px Arial\";\n var fontMeasures = ctx.measureText(enzyme);\n\n var xCoord;\n var yCoord;\n if (nextX && (nextY === firstRectMidY)) {\n xCoord = firstRectMidX + 20 - (fontMeasures.width / 2);\n yCoord = firstRectMidY;\n } else {\n xCoord = firstRectMidX - 55 - (fontMeasures.width / 2);\n yCoord = firstRectMidY + 50;\n }\n ctx.moveTo(xCoord, yCoord);\n ctx.bezierCurveTo(\n xCoord, yCoord - 20,\n xCoord + fontMeasures.width + 10, yCoord - 20,\n xCoord + fontMeasures.width + 10, yCoord);\n ctx.bezierCurveTo(\n xCoord + fontMeasures.width + 10, yCoord + 20,\n xCoord, yCoord + 20,\n xCoord, yCoord);\n ctx.fillStyle = \"white\";\n ctx.fill();\n\n ctx.fillStyle = \"white\";\n ctx.font = \"20px Arial\";\n ctx.stroke();\n ctx.closePath();\n ctx.beginPath();\n //add label to first protein\n ctx.fillText(firstText, firstRectMidX - 90, firstRectMidY + 5);\n if (!nextY) {\n //add label to second protein\n ctx.fillText(secondText, firstRectMidX - 90, firstRectMidY + 105);\n }\n ctx.stroke();\n ctx.closePath();\n ctx.beginPath();\n ctx.fillStyle = \"black\";\n ctx.font = \"12px Arial\";\n ctx.fillText(enzyme, xCoord + 5, yCoord + 4);\n //draw everything to the screen\n ctx.stroke();\n}", "function cw_generationZero() {\n cw_materializeGeneration();\n\n}", "function main() {\n console.log(oPieces)\n //let sRandomPlan = fRandomPiece('plans');\n //let sResult = '';\n\n // if plan calls plan it should draw without replacement to prevent infinite loop\n //console.log(sRandomPlan)\n}", "function comportement (){\n\t }", "_next(){\t\t\n\t\tif(this.currentContribution < (this.contributions.length - 1)) {\n\t\t\tthis.currentContribution++;\n\t\t} else {\n\t\t\tthis.currentContribution = 0;\n\t\t}\n\t\tthis._updateContent(this._diff());\n\t}", "nextGeneration() {\n let nextGeneration = [];\n this.generationCounter++;\n\n const survivors = Math.round(this.options.phenotypePerGeneration * this.options.repartition[0]);\n const childrens = Math.round(this.options.phenotypePerGeneration * this.options.repartition[1]);\n const randoms = Math.round(this.options.phenotypePerGeneration * this.options.repartition[2]);\n\n for (let i = 0; i < survivors; i++) {\n nextGeneration = [...nextGeneration, this.generation[this.options.phenotypePerGeneration - 1 - i]]\n }\n\n for (let i = survivors; i < survivors + childrens; i++) {\n nextGeneration = [...nextGeneration, this.makeChildren()]\n }\n for (let i = survivors + childrens; i < this.options.phenotypePerGeneration; i++) {\n let phenotype = new Phenotype(this.modelData, this.options.genotypePerPhenotype, this.genomOptions);\n phenotype.random();\n nextGeneration = [...nextGeneration, phenotype]\n }\n\n this.generation = nextGeneration;\n \n for (let i = survivors; i < this.options.phenotypePerGeneration; i++) {\n this.generation[i].similarityRatio = imgUtils.similarityBtwImageData(this.minifyModelData, this.generation[i].generate())\n }\n\n this.generation.sort((a, b) =>\n (a.similarityRatio - b.similarityRatio)) // Baddest to Best\n \n this.drawExample()\n\n let total = 0;\n for (let i = 0; i < this.options.phenotypePerGeneration; i++) {\n total += this.generation[i].similarityRatio\n }\n /** \n console.log(\"Generation n°\" + this.generationCounter \n + \" Best : \" + this.generation[this.options.phenotypePerGeneration - 1].similarityRatio \n + \", total : \" + total/this.options.phenotypePerGeneration);\n */\n }", "function nextLevel(){ Goal = Goal + 4; // it rise the level of the new sequence of 4 elements\n\t\t\t\t\t\t\t\t\t\t\t Limit = 1; // it brings back limit value to 1 \n\t\t\t\t\t\t\t\t\t\t\t stepCounter = 0;\t// it resets stepCounter (not sure this is correct, probably it should continue because it is some kind of points)\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t theSacredSequence = []; //this is the full sequence to repeat, it changes only at new game;\n\t\t\t\t\t\t\t\t\t\t thePartialSequence = [];//this is the portion to repeat of the full sequence, it increments during the game it starts of 4 notes then adds one by one\n\t\t\t\t\t\t\t\t\t\t thePlayerSequence = []; // this is the player sequence , it increments during the game and needs to be equal to thePartialSequence to proceed with the game\t\t\t\t\t\t \t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t displayVar();// check html \n\t\t\t\t\t\t\t\t\t\t generateSacredSequence();//function call after game reset\n \t\t\t\t }", "function generateSeq() {\r\n\r\n}", "goNext () {\n // Checks if there is any business in array that isn't in the previous array\n if(this.props.info.length > this.state.previous.length + 1){\n let rand = this.rando();\n this.pickRest(rand);\n }\n }", "function nextGeneration() {\n resetGame();\n // Normalize the fitness values 0-1\n normalizeFitness(population.clients);\n // Generate a new set of birds\n stats = population.evolve();\n printStats()\n activeBirds = population.clients.slice();\n // Copy those birds to another array\n}", "newNextColor() {\n if (this.gameOver) {\n return;\n }\n this.nextBlob1Color = Math.floor(Math.random() * this.puyoVariations) + 1;\n this.nextBlob2Color = Math.floor(Math.random() * this.puyoVariations) + 1;\n this.state.updateNextBlobs();\n }", "alternateTurns() {\n this.turn = (this.turn === 'X' ? 'O' : 'X');\n }", "function playCompAnimation() {\n\tcompGo = true;\n\tfor (let i = 0; i < compSequence.length; i++) {\n\t\tsetTimeout(function () {\n\t\t\tassignColorAnimation(compSequence[i]);\n\t\t}, (i + 1) * 1000);\n\t}\n\tplayerSequence = [];\n}", "function UltimateTicTacToe() {\r\n }", "updateComponents(opts) {\nreturn this.generateUpdatedSource(opts);\n}", "function drawNext(){\n prepareNextPiece();\n\n if(matrixNext.type === 'L' || matrixNext.type === 'I'){\n var copy = rotateLeft(matrixNext.matrix);\n drawNextPiece(copy, {x:2.5, y: 0.5});\n }\n else{\n //show the current piece\n drawNextPiece(matrixNext.matrix, {x: 3, y: 0.9});\n }\n}", "_advanceSeed() {\n const RESULT = MULTIPLIER * parseInt(this._seed, FORMAT.BIN) + ADDEND;\n const RESULT_BIN = RESULT.toString(FORMAT.BIN);\n\n this._seed = RESULT_BIN.substr(0, RESULT_BIN.length - MAX_LENGTH);;\n }", "function takeTurns() {\n self.gameBoard.turn++;\n if (self.gameBoard.turn % 2 === 0) {\n return \"o\";\n }\n else {\n return \"x\";\n }\n\n }", "function Next() {\n var dirs = tw.dirs;\n /**\n * CONDITIONAL EXECUTION\n */\n var numAnim = tw.animateCur.length;\n if (!numAnim) {\n clearInterval(tw.timer);\n return;\n }\n /**\n * GET CURRENT TIME DEPENDS ON 'FORWARD' - 'REVERSE' DIRECTION\n * + Case 'reverse': first reduce time 'tsInit'\n */\n var tsLast = tw.tsCur;\n tw.tsCur = VA.tsCur = +new Date();\n // Case: 'forward'\n if (dirs == 'forward') {\n tw.tCur = tw.tsCur - tw.tsInit;\n }\n else if (dirs == 'reverse') {\n tw.tCur -= tw.tsCur - tsLast;\n // Update time 'init' for Tween & Items\n tw.tsInit = tw.tsCur - tw.tCur;\n UpdateTimeInitAllItem();\n }\n // Execute function 'step' (if have) when next animation\n !!tw.evStep && tw.evStep();\n /**\n * SETUP CURRENT VALUE STYLE OF OBJECTS\n */\n for (var i = 0, len = tw.animateCur.length; i < len; i++) {\n var isNext = tw.animateCur[i].next();\n /**\n * REMOVE ANIMATE OF CURRENT OBJECT NEU NOT HAVE NEXT VALUE\n */\n if (!isNext)\n numAnim--;\n if (!numAnim) {\n clearInterval(tw.timer);\n /**\n * CASE: 'WAIT' FOR NEXT ANIMATION\n */\n if (tw.tCur < tw.tMax) {\n // Case: 'forward'\n if (dirs == 'forward') {\n tw.status = 'wait';\n Play();\n }\n else if (dirs == 'reverse') {\n /**\n * CASE: TIME 'WAIT' BETWEEN ANIAMTIONS\n */\n if (tw.tCur > 0) {\n tw.status = 'wait';\n Play();\n }\n else {\n // Reset direction of Tween\n tw.dirs = 'forward';\n // Mark sure setup Transform at first\n // Included setup status\n that.go(0);\n // Execute function 'complete' (if have) when complete animation\n !!tw.evComplete && tw.evComplete();\n }\n }\n }\n else if (tw.tCur >= tw.tMax) {\n tw.status = 'pause';\n // Execute fuction 'complete' (if have) when complete animation\n !!tw.evComplete && tw.evComplete();\n }\n }\n }\n }", "function nextTurn() {\r\n\tif(state.turn === 'b') {\r\n\t\tstate.turn = 'w';\r\n\t\tif(!moveAvailable(state.turn)){\r\n\t\t\tstate.turn = 'b';\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tstate.turn = 'b';\r\n\t\tif(!moveAvailable(state.turn)){\r\n\t\t\tstate.turn = 'w';\r\n\t\t}\r\n\t}\r\n\treturn (\"It is \" + state.turn + \"'s turn.\");\r\n}", "function forceScrambleUpdate() {\n self.generateScramble();\n }", "function nextGeneration() {\n resetGame();\n // Normalize the fitness values 0-1\n normalizeFitness(population.members);\n // Generate a new set of birds\n stats = population.evolve();\n printStats()\n activeBirds = population.members.slice();\n // Copy those birds to another array\n }", "nextGeneration() {\n // Selektion\n let best = this.getFittest();\n\n // config.size ist vielleicht größer/kleiner als vorher\n let newCities = new Array(this.config.size);\n\n // Repopulation\n newCities[0] = best;\n for(let i = 1; i < newCities.length; i++) {\n let newCity = best.clone();\n \n // Mutation\n newCity.mutate(this.config);\n\n newCities[i] = newCity;\n }\n\n this.cities = newCities;\n }", "function gen_op_shrl_T1_T0_cc()\n{\n gen_opc_ptr.push({func:op_shrl_T1_T0_cc});\n}", "function rotor_transcribe(){\n\tfor(element in input.transcribed){\n\t\tinput.rotortranscribed = rotor.master[input.transcribed[element]];\n\t}\n\trotor.dial1 += 1;\n \tif (rotor.dial1 == 26) {\n rotor.dial1 = 0;\n \trotor.dial2 += 1;\n\t}\n if (rotor.dial2 == 26) {\n rotor.dial2 = 0;\n \trotor.dial3 += 1;\n\t}\n}", "function gen_op_rsbl_T0_T1_cc()\n{\n gen_opc_ptr.push({func:op_rsbl_T0_T1_cc});\n}", "function nextGen() {\n ctx.fillStyle = \"black\";\n ctx.fillRect(0,0,maxWidth * RATIO_MULT,maxHeight * RATIO_MULT);\n tempGrid = [];\n for (var i = 0; i < grid.length; i++) {\n tempGrid[i] = [];\n for (var j = 0; j < grid[i].length; j++) {\n tempGrid[i][j] = [0,0];\n }\n }\n\n for (var x = 0; x < grid.length; x++) {\n for (var y = 0; y < grid[x].length; y++) {\n tempGrid[x][y] = grid[x][y];\n }\n }\n\n //console.log(\"generating\");\n var changes = 0;\n for (var x = 0; x < grid.length; x++) {\n for (var y = 0; y < grid[x].length; y++) {\n if (grid[x][y][0] == 1 && !isSurvive(x,y)) {\n tempGrid[x][y] = [0,1];\n changes++;\n }\n else if (grid[x][y][0] == 0 && isCreate(x,y)) {\n tempGrid[x][y] = [1,1];\n changes++;\n }\n }\n }\n if (changes == 0) {\n started = false;\n clearInterval(drawInterval);\n }\n else {\n for (var x = 0; x < grid.length; x++) {\n for (var y = 0; y < grid[x].length; y++) {\n grid[x][y] = tempGrid[x][y];\n }\n }\n }\n}", "function gen_op_shrl_T1_0_cc()\n{\n gen_opc_ptr.push({func:op_shrl_T1_0_cc});\n}", "step() {\n let i;\n for (i = 0; i < this.cols * this.rows; ++i) {\n this.buff[i] = this.nextState(i);\n }\n let temp = this.buff;\n this.buff = this.cells;\n this.cells = temp;\n }", "function pascGenOut()\n{\n actSheet.clear()\n var em = 7;\n var tea = 7;\n //var pasc = makeSevenBruitForce();\n var pascB = genTwoPascal(12);\n //the em is a number above 2.\n var pasc= pascGen(pascB,em-2,7,0,pascB)\n var level=0;\n while (level!=em)\n {\n //cA is first row\n var newStructure = [];\n for (var cA=0;cA<tea+1;cA++)\n {\n //cBgoes across first row\n var tempArray =[];\n for (var cB=0;cB<cA+1;cB++)\n {\n //so we get the structures in the last dimension accordig to cb\n //there is something wrong with the multipliers\n var multip = basePascal[cA][cB];\n var curS = pCurrentStructure[cB]\n // Logger.log(\"level: \"+level+\" cA: \"+cA+\" cB: \"+cB+\" multip: \"+multip +\"ohter: \"+basePascal[cA][cB])\n var cloeMultRes=cloneAndMultiply(pCurrentStructure[cB],basePascal[cA][cB])\n tempArray.push(cloeMultRes);\n }\n newStructure.push(tempArray);\n }\n pCurrentStructure = newStructure;\n level++;\n }\n// var captRes = makePasc(newStructure,em,tea,level,basePascal);\n return pCurrentStructure;\n}", "function workshop() {\n\n end = shapeact.length\n start = end - 20\n // pts = shapechange.slice(start, end)\n actpts = shapeact.slice(start, end)\n\n //if shape has been added recently wait 25 iterations before finding a new one. prevent over crowding and counteractive shape reports\n //if at 10 point after the shape was determined (end of linear forecast) then output live data results to determine if profit or loss occured.\n //exports data to profit.js\n if (wait[0] == 1) {\n\n var arrayout1 = []\n arrayout2 = outdata()\n pipchange = mvmt[0]\n gold = profit[0]\n\n if (color[0] == 'green') {\n reco = \"Buy\"\n }\n else if (color[0] == 'red') {\n reco = \"Sell\"\n }\n\n arrayout1 = [pipchange, reco, gold]\n output = arrayout1.concat(arrayout2)\n\n console.log(output)\n\n newresult() \n \n mvmt.shift()\n profit.shift()\n }\n bors()\n}", "forceTurnEvaluation() {\n this.turnIndicator -= 1;\n this.turnIndicator += 1;\n }", "function runJeanPaintingStrategy() {\n // Assert: myType == ANT_GEORGES; adjFriends[ANT_MARK] == 1;\n // adjFriends[ANT_WILLIAM] == 0; adjFriends[ANT_GEORGES] == 0.\n var phase = 0;\n for (var i = 0; i < TOTAL_NBRS; i++) {\n\tif (view[CCW[i]].ant && view[CCW[i]].ant.friend &&\n\t (view[CCW[i]].ant.type == ANT_MARK)) {\n\t compass = i & 6;\n\t phase = i & 1;\n\t break;\n\t}\n }\n // Assert: compass is set.\n debugme(\"Jean: compass is set at \" + compass + \", phase \" + phase);\n if (phase == 0) {\n\tif (destOK[CCW[compass+7]]) {\n\t // step forward\n\t return {cell:CCW[compass+7]};\n\t} else if (destOK[CCW[compass+1]]) {\n\t // initiate a turn\n\t return {cell:CCW[compass+1]};\n\t} else if (destOK[CCW[compass+4]]) {\n\t // part company, one way or another\n\t return {cell:CCW[compass+4]};\n\t} else if (destOK[CCW[compass+5]]) {\n\t return {cell:CCW[compass+5]};\n\t} else if (destOK[CCW[compass+6]]) {\n\t return {cell:CCW[compass+6]};\n\t} else {\n\t return CELL_NOP;\n\t}\n } else {\n\treturn {cell:CCW[compass+3], color:myColor};\n }\n return CELL_NOP; // fallback\n}", "gen() {\n let inputs = gen.getInputs( this ), out\n \n gen.requestMemory( this.memory )\n \n let lastInputMemoryIdx = 'memory[ ' + this.memory.lastInput.idx + ' ]',\n outputMemoryStartIdx = this.memory.lastInput.idx + 1,\n inputSignal = inputs[0],\n controlSignal = inputs[1]\n \n /* \n * we check to see if the current control inputs equals our last input\n * if so, we store the signal input in the memory associated with the currently\n * selected index. If not, we put 0 in the memory associated with the last selected index,\n * change the selected index, and then store the signal in put in the memery assoicated\n * with the newly selected index\n */\n \n out =\n\n` if( ${controlSignal} !== ${lastInputMemoryIdx} ) {\n memory[ ${lastInputMemoryIdx} + ${outputMemoryStartIdx} ] = 0 \n ${lastInputMemoryIdx} = ${controlSignal}\n }\n memory[ ${outputMemoryStartIdx} + ${controlSignal} ] = ${inputSignal}\n\n`\n this.controlString = inputs[1]\n this.initialized = true\n\n gen.memo[ this.name ] = this.name\n\n this.outputs.forEach( v => v.gen() )\n\n return [ null, ' ' + out ]\n }", "printNextGeneration() {\n var newList = this.computeNextGeneration();\n for (var i=0; i < this.cells.length; i++) {\n if ((this.cells[i].className.indexOf('live') == -1) && (newList[i] == 1)) {\n this.cells[i].classList.add('live');\n }\n if ((this.cells[i].className.indexOf('live') != -1) && (newList[i] == 0)) {\n this.cells[i].classList.remove('live');\n }\n }\n }", "function nextExercice() {\n var nb_cycle = session.phases[current_phase_index-1].nb_cycle;\n var nb_exercices = session.phases[current_phase_index-1].exercices.length;\n\n if(current_exercice_index > 0) {\n // set current phas eand exercice back to normal\n let current_phase = document.getElementById('phase-'+current_phase_index);\n let current_cycle = document.getElementById('phase-'+current_phase_index+'-rep');\n let current_exercice = document.getElementById('phase-'+current_phase_index+'-exercice-'+current_exercice_index);\n\n current_phase.classList.toggle(\"collapse\", true);\n current_exercice.classList.replace(\"bg-success\", \"bg-info\");\n\n let current_phase_spinner = document.getElementById('phase-'+current_phase_index+'-spinner');\n let current_exercice_spinner = document.getElementById('phase-'+current_phase_index+'-exercice-'+current_exercice_index+'-spinner');\n\n current_phase_spinner.setAttribute(\"hidden\", \"true\");\n current_exercice_spinner.setAttribute(\"hidden\", \"true\");\n }\n\n current_exercice_index++;\n\n // if new exercice index is over number of exercices, go to next cycle\n if(current_exercice_index > nb_exercices) {\n current_exercice_index = 1;\n current_cycle_index++;\n\n // if new cycle is over number of cycles, go to next phase\n if(current_cycle_index > nb_cycle) {\n current_cycle_index = 1;\n current_phase_index++;\n\n // if new phase index is over number of phases, session is finished!\n if(current_phase_index==nb_phases+1) {\n state = \"END\";\n toggleChrono();\n return;\n }\n }\n }\n\n // update exercice duration and init time\n current_exercice_duration = session.phases[current_phase_index-1].exercices[current_exercice_index-1].duration;\n current_exercice_time = 0;\n\n // get current phase, cycle and exercice\n current_phase = document.getElementById('phase-'+current_phase_index);\n current_cycle = document.getElementById('phase-'+current_phase_index+'-rep');\n current_exercice = document.getElementById('phase-'+current_phase_index+'-exercice-'+current_exercice_index);\n\n // update their values\n current_phase.classList.toggle(\"collapse\", false);\n current_cycle.innerHTML = current_cycle_index;\n current_exercice.classList.add(\"bg-success\");\n current_exercice.classList.remove(\"bg-info\", \"bg-light\");\n\n // get spinners\n current_phase_spinner = document.getElementById('phase-'+current_phase_index+'-spinner');\n current_exercice_spinner = document.getElementById('phase-'+current_phase_index+'-exercice-'+current_exercice_index+'-spinner');\n\n // updare spinners\n current_phase_spinner.removeAttribute(\"hidden\");\n current_exercice_spinner.removeAttribute(\"hidden\");\n}", "function compMove() {\r\n\tvar possibles = [];\r\n\tif (playersTurn === false) {\r\n\t\tfor (var i = 0; i < options.length; i++) {\r\n\t\t\tfor (var j = 0; j < squaresChosenByComputer.length; j++){\r\n\t\t\t\tif (options[i].indexOf(squaresChosenByComputer[j]) > 0){\r\n\t\t\t\t\tpossibles = options[i].filter(function(value) { \r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\t//3 o o danh sach thang co den 2 kha nang de danh\r\n\t\t\t\tif (j === squaresChosenByComputer.length - 1 && possibles.length === 2){\r\n\t\t\t\t\tfor (var k = 0; k < possibles.length; k++) {\r\n\t\t\t\t\t\tif (checkMove(squaresChosenByPlayer, possibles[k])){\r\n\t\t\t\t\t\t\tif (checkMove(squaresChosenByComputer, possibles[k])) {\r\n\t\t\t\t\t\t\t\t$(\"#\" + possibles[k]).html(compChoice); \r\n\t\t\t\t\t\t\t\tsquaresChosenByComputer.push(possibles[k]);\r\n\t\t\t\t\t\t\t\tremoveOption(possibles[k]);\r\n\t\t\t\t\t\t\t\tfinished(\"Computer\", squaresChosenByComputer);\r\n\t\t\t\t\t\t\t\tpossibles.length = 0; \r\n\t\t\t\t\t\t\t\treturn;\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\t\t\r\n\t\t\t\tif (j === squaresChosenByComputer.length - 1 && possibles.length === 1){ //TH chi co 1 kha nang danh\r\n\t\t\t\t\tif (checkMove(squaresChosenByPlayer, possibles[0])){\r\n\t\t\t\t\t\t$(\"#\" + possibles[0]).html(compChoice);\r\n\t\t\t\t\t\tsquaresChosenByComputer.push(possibles[0]);\r\n\t\t\t\t\t\tremoveOption(possibles[0]);\r\n\t\t\t\t\t\tfinished(\"Computer\", squaresChosenByComputer);\r\n\t\t\t\t\t\tpossibles.length = 0;\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}\r\n\t\t}\r\n\r\n\t\t//return random luot di cua comp\r\n\t\tvar move = array[Math.floor(Math.random() * array.length)];\r\n\t\t$(\"#\" + move).html(compChoice);\r\n\t\tsquaresChosenByComputer.push(move);\r\n\t\tremoveOption(move);\r\n\t\tfinished(\"Computer\", squaresChosenByComputer);\r\n\t}\r\n}", "function nextAssistState () {\n\tswitch (assistInfo.state) {\n\t\tcase 'intro':\n\t\t\tassistInfo.curGame = curGame; //temporary\n\t\t\tloadAssistState('chooseOrder');\n\t\t\tbreak;\n\t\tcase 'chooseOrder':\n\t\t\tassistInfo.board = getValue('assistStageSelect'); //todo: should probably also be moved\n\t\t\tloadAssistState('turn');\n\t\t\tbreak;\n\t\tcase 'turn':\n\t\t\t//loadAssistState('minigame');\n\t\t\tbreak;\n\t}\n}", "function next_phase() {\n \n ///////////////////////////////////////////////////////\n // per-phase ways to proceed while \"proceed === false\":\n \n if ( phase === 5 ) {\n if ( answer1 === \"4\" && answer2 === \"2\" && answer3 === \"3\" ) { // all answers are currently set to the correct ones\n proceed = true; // then it executes the general phase++ code below\n //noLoop(); timestamp = millis(); phase++; loop();\n } else {\n comprehension_warning = true; // makes the warning message come on screen\n comprehension_tally++;\n }\n }\n \n ///////////////////////////////////////////////////////\n // the general way to proceed (happens only when proceed === true)\n \n if ( proceed === true ) { noLoop(); timestamp = millis(); phase++; loop(); }\n // proceed gets set to false when a question is unanswered / answered incorrectly\n \n // button click first changes the phase in line above, then then executes whatever's in \"if phase x (new phase #) do y\"\n\n}", "incrementRotor(){if(this.bias<25){this.bias+=1;}else{this.bias=0;}}", "changeState(leftBoarderDistance, downDistance, board, bS, next) {\n let distanceB = Math.round(downDistance / blockSize); // Distance in blocks to bottom border\n let distance = (Math.round(leftBoarderDistance / blockSize)); // Distance in blocks to left border\n if (this.calc == false) {\n if (this.check(leftBoarderDistance, downDistance, board, bS, next) == false) {\n return;\n }\n }\n switch (this.blockNumber) { // Switch depending on block\n case 1: {\n switch (this.state) { //Check state\n case 1: {\n if (distance < 5) {\n for (let i = 0; i < this.res.children.length; i++) {\n this.res.children[i].y = 3 * blockSize;\n this.res.children[i].x = (i) * blockSize;\n }\n }\n else {\n for (let i = 0; i < this.res.children.length; i++) {\n this.res.children[i].y = 3 * blockSize;\n this.res.children[i].x = (i - 3) * blockSize;\n }\n }\n this.state = 2;\n break;\n }\n case 2: {\n if (distance < 5) {\n for (let i = 0; i < this.res.children.length; i++) {\n this.res.children[i].x = 0;\n this.res.children[i].y = blockSize * i;\n }\n }\n else {\n for (let i = 0; i < this.res.children.length; i++) {\n this.res.children[i].x = 0;\n this.res.children[i].y = blockSize * i;\n }\n }\n this.state = 1;\n break;\n }\n }\n }\n case 2: {\n break;\n }\n case 3: {\n // Variable holding next/previous state, we don't want to change main variable until we change the state\n let state = this.stateChanger(next);\n switch (state) {\n case 1: {\n for (let i = 0; i < this.res.children.length; i++) {\n if (i < 2) {\n this.res.children[i].y = blockSize * i;\n this.res.children[i].x = 0;\n }\n else {\n this.res.children[i].y = blockSize;\n this.res.children[i].x = blockSize * (i - 1);\n }\n }\n if (next) {\n this.res.x += blockSize * (distance == 8 ? -1 : 0);\n }\n else {\n this.res.x += blockSize * (distance == 0 ? 1 : 0);\n }\n this.state = state;\n break;\n }\n case 2: {\n for (let i = 0; i < this.res.children.length; i++) {\n if (i < 2) {\n this.res.children[i].y = 0;\n this.res.children[i].x = blockSize * (i + 1);\n }\n else {\n this.res.children[i].y = blockSize * (i - 1);\n this.res.children[i].x = blockSize;\n }\n }\n if (next) {\n this.res.y -= blockSize * (distanceB == 0 ? 1 : 0);\n }\n this.state = state;\n break;\n }\n case 3: {\n for (let i = 0; i < this.res.children.length; i++) {\n if (i < 2) {\n this.res.children[i].y = blockSize;\n this.res.children[i].x = blockSize * i;\n }\n else {\n this.res.children[i].y = blockSize * (i - 1);\n this.res.children[i].x = blockSize * 2;\n }\n }\n if (next) {\n this.res.x += blockSize * (distance == 0 ? 1 : 0);\n }\n else {\n this.res.x += blockSize * (distance == 8 ? -1 : 0);\n }\n this.state = state;\n break;\n }\n case 4: {\n for (let i = 0; i < this.res.children.length; i++) {\n if (i < 2) {\n this.res.children[i].y = blockSize * 2;\n this.res.children[i].x = blockSize * i;\n }\n else {\n this.res.children[i].y = blockSize * (i - 2);\n this.res.children[i].x = blockSize;\n }\n }\n if (!next) {\n this.res.y -= blockSize * (distanceB == 0 ? 1 : 0);\n }\n this.state = state;\n break;\n }\n }\n break;\n }\n case 4: {\n // Variable holding next/previous state, we don't want to change main variable until we change the state\n let state = this.stateChanger(next);\n switch (state) {\n case 1: {\n for (let i = 0; i < this.res.children.length; i++) {\n if (i == 0) {\n this.res.children[i].y = blockSize;\n this.res.children[i].x = 0;\n }\n else {\n this.res.children[i].y = (i - 1) * blockSize;\n this.res.children[i].x = blockSize;\n }\n }\n if (next) {\n this.res.x += blockSize * (distance == 8 ? -1 : 0);\n }\n else {\n this.res.y -= blockSize * (distanceB == 0 ? 1 : 0);\n }\n this.state = state;\n break;\n }\n case 2: {\n for (let i = 0; i < this.res.children.length; i++) {\n if (i == 0) {\n this.res.children[i].y = 0;\n this.res.children[i].x = blockSize;\n }\n else {\n this.res.children[i].y = blockSize;\n this.res.children[i].x = (i - 1) * blockSize;\n }\n }\n if (next) {\n this.res.x += blockSize * (distance == 8 ? -1 : 0);\n }\n else {\n this.res.x += blockSize * (distance == 0 ? 1 : 0);\n }\n this.state = state;\n break;\n }\n case 3: {\n for (let i = 0; i < this.res.children.length; i++) {\n if (i == 0) {\n this.res.children[i].y = blockSize;\n this.res.children[i].x = 2 * blockSize;\n }\n else {\n this.res.children[i].y = (i - 1) * blockSize;\n this.res.children[i].x = blockSize;\n }\n }\n if (next) {\n this.res.y -= blockSize * (distanceB == 0 ? 1 : 0);\n this.res.x += blockSize * (distance == 8 ? -1 : 0);\n }\n this.state = state;\n break;\n }\n case 4: {\n for (let i = 0; i < this.res.children.length; i++) {\n if (i < 3) {\n this.res.children[i].y = blockSize;\n this.res.children[i].x = i * blockSize;\n }\n else {\n this.res.children[i].y = 2 * blockSize;\n this.res.children[i].x = blockSize;\n }\n }\n if (next) {\n this.res.x += blockSize * (distance == 0 ? 1 : 0);\n }\n else {\n this.res.x += blockSize * (distance == 8 ? -1 : 0);\n }\n this.state = state;\n break;\n }\n }\n break;\n }\n case 5: {\n // Variable holding next/previous state, we don't want to change main variable until we change the state\n let state = this.stateChanger(next);\n switch (state) {\n case 1: {\n for (let i = 0; i < this.res.children.length; i++) {\n if (i < 2) {\n this.res.children[i].y = blockSize;\n this.res.children[i].x = blockSize * i;\n }\n else {\n this.res.children[i].y = 0;\n this.res.children[i].x = blockSize * (i - 1);\n }\n }\n if (next) {\n this.res.x += blockSize * (distance == 8 ? -1 : 0);\n }\n else {\n this.res.x += blockSize * (distance == 0 ? 1 : 0);\n }\n this.state = state;\n break;\n }\n case 2: {\n for (let i = 0; i < this.res.children.length; i++) {\n if (i < 2) {\n this.res.children[i].y = blockSize * i;\n this.res.children[i].x = blockSize;\n }\n else {\n this.res.children[i].y = blockSize * (i - 1);\n this.res.children[i].x = blockSize * 2;\n }\n }\n if (next) {\n this.res.y -= blockSize * (distanceB == 0 ? 1 : 0);\n }\n this.state = state;\n break;\n }\n case 3: {\n for (let i = 0; i < this.res.children.length; i++) {\n if (i < 2) {\n this.res.children[i].y = blockSize * 2;\n this.res.children[i].x = blockSize * i;\n }\n else {\n this.res.children[i].y = blockSize;\n this.res.children[i].x = blockSize * (i - 1);\n }\n }\n if (next) {\n this.res.x += blockSize * (distance == 0 ? 1 : 0);\n }\n else {\n this.res.x += blockSize * (distance == 8 ? -1 : 0);\n }\n this.state = state;\n break;\n }\n case 4: {\n for (let i = 0; i < this.res.children.length; i++) {\n if (i < 2) {\n this.res.children[i].y = blockSize * i;\n this.res.children[i].x = 0;\n }\n else {\n this.res.children[i].y = blockSize * (i - 1);\n this.res.children[i].x = blockSize;\n }\n }\n if (!next) {\n this.res.y -= blockSize * (distanceB == 0 ? 1 : 0);\n }\n this.state = state;\n break;\n }\n }\n break;\n }\n case 6: {\n // Variable holding next/previous state, we don't want to change main variable until we change the state\n let state = this.stateChanger(next);\n switch (state) {\n case 1: {\n for (let i = 0; i < this.res.children.length; i++) {\n if (i < 3) {\n this.res.children[i].y = blockSize;\n this.res.children[i].x = blockSize * i;\n }\n else {\n this.res.children[i].y = 0;\n this.res.children[i].x = blockSize * (i - 1);\n }\n }\n if (next) {\n this.res.x += blockSize * (distance == 8 ? -1 : 0);\n }\n else {\n this.res.x += blockSize * (distance == 0 ? 1 : 0);\n }\n this.state = state;\n break;\n }\n case 2: {\n for (let i = 0; i < this.res.children.length; i++) {\n if (i < 3) {\n this.res.children[i].y = blockSize * i;\n this.res.children[i].x = blockSize;\n }\n else {\n this.res.children[i].y = blockSize * 2;\n this.res.children[i].x = blockSize * 2;\n }\n }\n if (next) {\n this.res.y -= blockSize * (distanceB == 0 ? 1 : 0);\n }\n this.state = state;\n break;\n }\n case 3: {\n for (let i = 0; i < this.res.children.length; i++) {\n if (i < 3) {\n this.res.children[i].y = blockSize;\n this.res.children[i].x = blockSize * i;\n }\n else {\n this.res.children[i].y = blockSize * 2;\n this.res.children[i].x = 0;\n }\n }\n if (next) {\n this.res.x += blockSize * (distance == 0 ? 1 : 0);\n }\n else {\n this.res.x += blockSize * (distance == 8 ? -1 : 0);\n }\n this.state = state;\n break;\n }\n case 4: {\n for (let i = 0; i < this.res.children.length; i++) {\n if (i < 3) {\n this.res.children[i].y = blockSize * i;\n this.res.children[i].x = blockSize;\n }\n else {\n this.res.children[i].y = 0;\n this.res.children[i].x = 0;\n }\n }\n if (!next) {\n this.res.y -= blockSize * (distanceB == 0 ? 1 : 0);\n }\n this.state = state;\n break;\n }\n }\n break;\n }\n case 7: {\n let state = this.stateChanger(next);\n switch (state) {\n case 1: {\n for (let i = 0; i < this.res.children.length; i++) {\n if (i < 2) {\n this.res.children[i].y = 0;\n this.res.children[i].x = blockSize * i;\n }\n else {\n this.res.children[i].y = blockSize;\n this.res.children[i].x = blockSize * (i - 1);\n }\n }\n if (next) {\n this.res.x += blockSize * (distance == 8 ? -1 : 0);\n }\n else {\n this.res.x += blockSize * (distance == 0 ? 1 : 0);\n }\n this.state = state;\n break;\n }\n case 2: {\n for (let i = 0; i < this.res.children.length; i++) {\n if (i < 2) {\n this.res.children[i].y = blockSize * (i + 1);\n this.res.children[i].x = blockSize;\n }\n else {\n this.res.children[i].y = blockSize * (i - 2);\n this.res.children[i].x = blockSize * 2;\n }\n }\n if (next) {\n this.res.y -= blockSize * (distanceB == 0 ? 1 : 0);\n }\n this.state = state;\n break;\n }\n case 3: {\n for (let i = 0; i < this.res.children.length; i++) {\n if (i < 2) {\n this.res.children[i].y = blockSize;\n this.res.children[i].x = blockSize * i;\n }\n else {\n this.res.children[i].y = blockSize * 2;\n this.res.children[i].x = blockSize * (i - 1);\n }\n }\n if (next) {\n this.res.x += blockSize * (distance == 0 ? 1 : 0);\n }\n else {\n this.res.x += blockSize * (distance == 8 ? -1 : 0);\n }\n this.state = state;\n break;\n }\n case 4: {\n for (let i = 0; i < this.res.children.length; i++) {\n if (i < 2) {\n this.res.children[i].y = blockSize * (i + 1);\n this.res.children[i].x = 0;\n }\n else {\n this.res.children[i].y = blockSize * (i - 2);\n this.res.children[i].x = blockSize;\n }\n }\n if (!next) {\n this.res.y -= blockSize * (distanceB == 0 ? 1 : 0);\n }\n this.state = state;\n break;\n }\n }\n break;\n }\n }\n }", "function computeNextGeneration() {\n var gen = generations[generations.length - 1];\n var bestTrack = gen[0];\n\n var generationCreator = createGenerationCreator(gen.length);\n\n var nextGen = generationCreator.createNextGeneration(gen);\n var newBestTrack = nextGen[0];\n\n generations.push(nextGen);\n\n $('#outputTrackLength').text(Math.round(newBestTrack.distance * 100) / 100);\n\n // let allcandidates = $('#wholegen').is(':checked');\n // if (allcandidates) {\n // for (let i = 1; i < nextGen.length; ++i) {\n // drawField.addTrack(nextGen[i], 0.08);\n // }\n // }\n\n // drawField.removeTrack(bestTrack); // remove old best gen\n drawField.removeAllTracks(); // remove whole gen\n drawField.addTrack(newBestTrack);\n\n return newBestTrack.distance - bestTrack.distance;\n }", "function runNextGenerator (dir, specsChanges, withOptions, index = 1) {\n // console.log('>runNextGenerator', dir);\n if (!specsChanges.length) return;\n const specsChg = specsChanges.shift();\n\n if (specsChg.prompts) {\n return doGenerate(specsChg);\n } else {\n return doSpecChange(specsChg);\n }\n\n function doGenerate (specsChg) {\n return helpers.run(path.join(__dirname, '..', 'generators', specsChg.generate))\n .inTmpDir(dirNext => {\n appDir = dirNext;\n console.log(` ${index + 1} \"generate ${specsChg.generate}\" with ${JSON.stringify(specsChg.prompts).substr(0, 60)}`);\n\n // console.log('314', dir, dirNext);\n fs.copySync(dir, dirNext);\n\n resetSpecs();\n })\n .withPrompts(Object.assign({},\n specsChg.prompts,\n { action: 'force' } // force file overwrites\n ))\n .withOptions(Object.assign({}, { calledByTest: specsChg.calledByTest || true }, withOptions))\n .then(dir => {\n // There are no more generation steps\n if (!specsChanges.length) {\n return dir;\n }\n\n return runNextGenerator(dir, specsChanges, withOptions, ++index);\n });\n }\n\n function doSpecChange (specsChg) {\n return helpers.run(path.join(__dirname, '..', 'generators', 'all'))\n .inTmpDir(dirNext => {\n let nextJson;\n\n appDir = dirNext;\n console.log(` ${index + 1} change specs ${JSON.stringify(specsChg.merge).substr(0, 65)}`);\n\n // console.log('314', dir, dirNext);\n fs.copySync(dir, dirNext);\n\n // console.log('317', path.join(dir, 'feathers-gen-specs.json'));\n const prevJson = fs.readJsonSync(path.join(dir, 'feathers-gen-specs.json'));\n if (specsChg.before) {\n specsChg.before(prevJson);\n }\n nextJson = specsChg.merge ? merge(prevJson, specsChg.merge) : prevJson;\n\n // console.log('322', path.join(dirNext, 'feathers-gen-specs.json'));\n fs.writeFileSync(path.join(dirNext, 'feathers-gen-specs.json'), JSON.stringify(nextJson, null, 2));\n\n resetSpecs();\n })\n .withPrompts({\n confirmation: true,\n action: 'force' // force file overwrites\n })\n .withOptions(withOptions)\n .then(dir => {\n // There are no more generation steps\n if (!specsChanges.length) {\n return dir;\n }\n\n return runNextGenerator(dir, specsChanges, withOptions, ++index);\n });\n }\n}", "function sequencenext() {\r\n orderforcomp.push(Math.floor(Math.random()*6));\r\n shownextseq(orderforcomp[orderforcomp.length - 1]);\r\n orderforplayer=[];\r\n}", "function generateChange(cents, changeDict) {\n\n}", "nextTurn() {\n if (this.state.nextMove === true) {\n this.setState({\n nextMove: !this.state.nextMove\n }, () => {\n this.compMove();\n })\n }\n }", "generate() {\n let old = this.string\n this.string = ''\n for (let c of old) {\n this.string += this._processCommand(c)\n }\n }", "static next(): State<TetrisPiece, Random.Generator> {\n return Random.intBetween(0, TYPE.length - 1).map(i => new TetrisPiece(i, 0));\n }", "function gen_op_rscl_T0_T1_cc()\n{\n gen_opc_ptr.push({func:op_rscl_T0_T1_cc});\n}", "stepThyratrons() {\n let X2bPtr = this.Xptr[1]-1;\n if (X2bPtr===0) X2bPtr = ROTOR_SIZES.X2;\n let S1bPtr = this.Sptr[0]-1;\n if (S1bPtr===0) S1bPtr = ROTOR_SIZES.S1;\n\n // Get Chi rotor 5 two back to calculate plaintext (Z+Chi+Psi=Plain)\n let X5bPtr=this.Xptr[4]-1;\n if (X5bPtr===0) X5bPtr=ROTOR_SIZES.X5;\n X5bPtr=X5bPtr-1;\n if (X5bPtr===0) X5bPtr=ROTOR_SIZES.X5;\n // Get Psi rotor 5 two back to calculate plaintext (Z+Chi+Psi=Plain)\n let S5bPtr=this.Sptr[4]-1;\n if (S5bPtr===0) S5bPtr=ROTOR_SIZES.S5;\n S5bPtr=S5bPtr-1;\n if (S5bPtr===0) S5bPtr=ROTOR_SIZES.S5;\n\n const x2sw = this.limitations.X2;\n const s1sw = this.limitations.S1;\n const p5sw = this.limitations.P5;\n\n // Limitation calculations\n let lim=1;\n if (x2sw) lim = this.rings.X[2][X2bPtr-1];\n if (s1sw) lim = lim ^ this.rings.S[1][S1bPtr-1];\n\n // P5\n if (p5sw) {\n let p5lim = this.P5Zbit[1];\n p5lim = p5lim ^ this.rings.X[5][X5bPtr-1];\n p5lim = p5lim ^ this.rings.S[5][S5bPtr-1];\n lim = lim ^ p5lim;\n }\n\n const basicmotor = this.rings.M[2][this.Mptr[0]-1];\n this.totalmotor = basicmotor;\n\n if (x2sw || s1sw) {\n if (basicmotor===0 && lim===1) {\n this.totalmotor = 0;\n } else {\n this.totalmotor = 1;\n }\n }\n\n // Step Chi rotors\n for (let r=0; r<5; r++) {\n this.Xptr[r]++;\n if (this.Xptr[r] > ROTOR_SIZES[\"X\"+(r+1)]) this.Xptr[r] = 1;\n }\n\n if (this.totalmotor) {\n // Step Psi rotors\n for (let r=0; r<5; r++) {\n this.Sptr[r]++;\n if (this.Sptr[r] > ROTOR_SIZES[\"S\"+(r+1)]) this.Sptr[r] = 1;\n }\n }\n\n // Move M37 rotor if M61 set\n if (this.rings.M[1][this.Mptr[1]-1]===1) this.Mptr[0]++;\n if (this.Mptr[0] > ROTOR_SIZES.M37) this.Mptr[0]=1;\n\n // Always move M61 rotor\n this.Mptr[1]++;\n if (this.Mptr[1] > ROTOR_SIZES.M61) this.Mptr[1]=1;\n }", "_updateGeneration () {\n let shouldUpdateGenerationCounter = false\n\n for (let x = 0; x < this.sizeX; x++) {\n for (let y = 0; y < this.sizeY; y++) {\n let neighbours = this._countNeighbours(x, y)\n if (this.matrix[x][y] === 1 && (neighbours > 3 || neighbours < 2)) {\n this.nextMatrix[x][y] = -1\n } else if (this.matrix[x][y] !== 1 && neighbours === 3) {\n shouldUpdateGenerationCounter = true\n this.nextMatrix[x][y] = 1\n } else {\n this.nextMatrix[x][y] = this.matrix[x][y]\n }\n }\n }\n\n if (shouldUpdateGenerationCounter) {\n this.generationNumber++\n }\n }", "function moveToNext(Calvin){\n\t// console.log(\"MNext: \" + currElement);\n\t// console.log(\"Element Array Length: \" + elementIdArray.length);\n\tif(currElement>0 && currElement<elementIdArray.length){\n\t\tletThereBeLight(currElement,Calvin);\n\t\tcurrElement++;\n\t}\n\telse if(firstIteration == 0){\n\t\tletThereBeLight(currElement,Calvin);\n\t\tfirstIteration++;\n\t\tcurrElement++;\n\n\t}\n\telse if(currElement >= elementIdArray.length-1){\n\t\talert(\"You have reached the end of this guided tour! Thanks for joining us!\");\n\t\tCalvin.eraseTourGuide();\n\t\tremoveDarkness();\n\t\tcurrElement =0;\n\t\tfirstIteration=0;\n\t}\n}", "function compile() {\n\n}", "function advance(){\n var tweenDelay = 0;\n clearInterval(timer);\n \n if(phase === 0){\n console.log(\"phase===0\") \n //slide(collapseCopy, \"-1300px\", 7, 'linear', 0); \n slide(colcopyl1, \"-913px\", 11, 'linear', 0);\n slide(colcopyl2, \"1213px\", 12, 'linear', 0);\n slide(colcopyl3, \"-913px\", 13, 'linear', 0);\n slide(colcopyl4, \"1213px\", 14, 'linear', 0);\n //fade(opportunity, 1, 'ease-in-out', 3.7);\n timer = setInterval(advance, 3000);\n }\n if(phase === 1){\n console.log(\"phase===1\")\n var colcopyl1w = colcopyl1.offsetLeft;\n var colcopyl2w = colcopyl2.offsetLeft;\n var colcopyl3w = colcopyl3.offsetLeft;\n var colcopyl4w = colcopyl4.offsetLeft;\n slide(colcopyl1, (colcopyl1w +'px'), 40, 'linear', 0.5);\n slide(colcopyl2, (colcopyl2w +'px'), 42, 'linear', 0.5);\n slide(colcopyl3, (colcopyl3w +'px'), 44, 'linear', 0.5);\n slide(colcopyl4, (colcopyl4w +'px'), 46, 'linear', 0.5);\n\n colorChange(colcopywhite1, 0.75, 40, 'linear', 0.5);\n colorChange(colcopywhite4, 0.75, 40, 'linear', 0.5);\n\n fadeOut(colcopyl1txt, 0.75, 'ease-in-out', 0);\n fadeOut(colcopyl1btxt, 0.75, 'ease-in-out', 0);\n fadeOut(colcopyl2txt, 0.75, 'ease-in-out', 0);\n fadeOut(colcopyl2btxt, 0.75, 'ease-in-out', 0);\n fadeOut(colcopyl3txt, 0.75, 'ease-in-out', 0);\n fadeOut(colcopyl4txt, 0.75, 'ease-in-out', 0);\n fadeOut(colcopyl4btxt, 0.75, 'ease-in-out', 0);\n \n //slide(opportunity, \"243px\", 0.6, 'ease-in-out', 0); \n\n timer = setInterval(advance, 1000);\n }\n if(phase === 2){\n console.log(\"phase===2\")\n var mq = window.matchMedia( \"(max-device-width: 480px)\" );\n\n if( mq.matches ) {\n fade(colcopyHidden1, 0.5, 'ease-in-out', 0.2);\n fade(colcopyHidden2, 0.5, 'ease-in-out', 0.2);\n\n rePosition(colcopyl1, 271, 32, 0.5, 'ease-in-out', tweenDelay);\n //rePosition(colcopy2, 305, 32, 0.5, 'ease-in-out', tweenDelay);\n rePosition(colcopyl4, 455, 32, 0.5, 'ease-in-out', tweenDelay);\n fade(clickToExpand, 0.3, 'ease-in-out', 0.4); \n } else {\n fade(colcopyHidden1, 0.5, 'ease-in-out', 0.2);\n fade(colcopyHidden2, 0.5, 'ease-in-out', 0.2);\n \n rePosition(colcopyl1, 271, 32, 0.5, 'ease-in-out', tweenDelay);\n //rePosition(colcopyl2, 262, 32, 0.5, 'ease-in-out', tweenDelay);\n rePosition(colcopyl4, 455, 32, 0.5, 'ease-in-out', tweenDelay); \n fade(clickToExpand, 0.3, 'ease-in-out', .9);\n }\n\n timer = setInterval(advance, 1000);\n }\n\n phase ++;\n }", "function nextTurn(t, inc) {\r\n if (inc === void 0) { inc = 1; }\r\n if (t.activeTurn === t.currentTurn)\r\n return undefined;\r\n if ((t.activeTurn + inc) > t.currentTurn)\r\n t.activeTurn = t.currentTurn;\r\n else\r\n t.activeTurn += inc;\r\n return state(t, t.activeTurn);\r\n }", "drawEveryGeneration() {}", "async afterTurn() {\n await super.afterTurn();\n // <<-- Creer-Merge: after-turn -->>\n this.updateSpawnedCowboys();\n this.game.currentPlayer.siesta = Math.max(0, this.game.currentPlayer.siesta - 1);\n this.updateCowboys();\n this.advanceBottles();\n this.resetPianoPlaying();\n this.applyHazardDamage();\n utils_1.filterInPlace(this.game.cowboys, (c) => !c.isDead);\n utils_1.filterInPlace(this.game.furnishings, (f) => !f.isDestroyed);\n utils_1.filterInPlace(this.game.bottles, (b) => !b.isDestroyed);\n this.game.currentPlayer.youngGun.update();\n // <<-- /Creer-Merge: after-turn -->>\n }", "function nextTurn(){\n\tchangeDiscard();\n\tplayerTurnIs();\n}", "function bubbleNextRun(){\n addStep(\"Set node 1 as current and node 2 as \\\"next\\\"\");\n setClass(nodes[0], 2, \"Current\"); \n setClass(nodes[1], 2, \"Special\");\n bubbleIndex = 0;\n bubbleIsSorted = true;\n bubbleEndStep = 1;\n}", "function rotate2(){\r\n var rotor3prev = []; // temporary containers for data that is to be overwritten\r\n var rotor2prev = [];\r\n\r\n // getting the temporary data for the rotor 3 prev\r\n for (i = 0; i < 26; i++) {\r\n if(rotor3[i].prev == 26){\r\n rotor3prev.push(1);\r\n }else {\r\n rotor3prev.push((rotor3[i].prev) + 1);\r\n }\r\n }\r\n\r\n // getting temporary date for the prev column in rotor 2\r\n for (i = 0; i < 26; i++) {\r\n rotor2prev.push(rotor2[i].prev);\r\n }\r\n\r\n // changing posiiton of the letters and next values\r\n for (i = 0; i < 26; i++) {\r\n if(rotor2[i].next == 26){\r\n rotor2[i].next = 1;\r\n }else {\r\n rotor2[i].next ++;\r\n }\r\n if(rotor2[i].pos == 26){\r\n rotor2[i].pos = 1;\r\n }else {\r\n rotor2[i].pos ++;\r\n }\r\n\r\n }\r\n\r\n // adding 1 to the value of prev on rotor 3\r\n for (i = 0; i < 26; i++) {\r\n if(i == 25){\r\n rotor2[i].prev = parseInt(rotor2prev[0]);\r\n\r\n }else {\r\n rotor2[i].prev = parseInt(rotor2prev[i + 1]);\r\n }\r\n }\r\n // changing the position of the prev on rotor 3\r\n\r\n for (i = 0; i < 26; i++) {\r\n if(i == 0){\r\n rotor3[i].prev = parseInt(rotor3prev[25]);\r\n }else {\r\n rotor3[i].prev = parseInt(rotor3prev[i - 1]);\r\n }\r\n }\r\n\r\n for (var i = 0; i < 26; i++) {\r\n if(rotor2[i].pos == 2){\r\n if(rotor2[i].val == 'v'){\r\n rotate1();\r\n console.log(\"1 has been triggered\");\r\n break;\r\n }\r\n }\r\n }\r\n\r\n\r\n}", "function skipSingleGeneration() {\n nextGenerationCalculated();\n}", "advanceTurnOrder() {\n super.updatePlayerScore(this.redTurnOrder[0], \"Red\");\n super.updatePlayerScore(this.blueTurnOrder[0], \"Blue\");\n const lastPlayer = this.redTurnOrder.shift();\n this.redTurnOrder.push(lastPlayer);\n const lastPlayer2 = this.blueTurnOrder.shift();\n this.blueTurnOrder.push(lastPlayer2);\n }", "step() { }", "function computerPhase() {\n removeEventListeners();\n nextPlayer();\n randomComputerPlay.firstRoll();\n randomComputerPlay.makeProgress(activePlayer);\n}", "makeNextAction() {\n\n var _nextAction = this.getNextAction();\n // If move forward\n if(_nextAction == 1) {\n let currentX = this.xPosition;\n let currentY = this.yPosition;\n\n // Move depending on current direction\n if (this.DIRECTION.NORTH == this.heading) {\n this.yPosition--;\n if(this.yPosition < 0) {\n this.yPosition = 0;\n }\n }\n else if (this.DIRECTION.EAST == this.heading) {\n this.xPosition++;\n if(this.xPosition > this.maze.getMaxX()) {\n this.xPosition = this.maze.getMaxX();\n }\n }\n else if (this.DIRECTION.SOUTH == this.heading) {\n this.yPosition++;\n if(this.yPosition > this.maze.getMaxY()) {\n this.yPosition = this.maze.getMaxY();\n }\n }\n else if (this.DIRECTION.WEST == this.heading) {\n this.xPosition--;\n if(this.xPosition < 0) {\n this.xPosition = 0;\n }\n }\n\n // We can't move here\n if (this.maze.isWall(this.xPosition, this.yPosition) == true) {\n this.xPosition = currentX;\n this.yPosition = currentY;\n }\n else {\n if(currentX !== this.xPosition || currentY !== this.yPosition) {\n var pos = this.getPosition();\n this.route.push({ x: pos.x, y: pos.y});\n this.drawingRoute.push({ move: { x: pos.x, y: pos.y } });\n }\n }\n }\n // Move clockwise\n else if (_nextAction == 2) {\n if(this.DIRECTION.NORTH == this.heading) {\n this.heading = this.DIRECTION.EAST;\n }\n else if(this.DIRECTION.EAST == this.heading) {\n this.heading = this.DIRECTION.SOUTH;\n }\n else if(this.DIRECTION.SOUTH == this.heading) {\n this.heading = this.DIRECTION.WEST;\n }\n else if(this.DIRECTION.WEST == this.heading) {\n this.heading = this.DIRECTION.NORTH;\n }\n this.drawingRoute.push( { turn: { clockwise: true } } );\n }\n // Move anti-ckockwise\n else if (_nextAction == 3) {\n if(this.DIRECTION.NORTH == this.heading) {\n this.heading = this.DIRECTION.WEST;\n }\n else if(this.DIRECTION.EAST == this.heading) {\n this.heading = this.DIRECTION.NORTH;\n }\n else if(this.DIRECTION.SOUTH == this.heading) {\n this.heading = this.DIRECTION.EAST;\n }\n else if(this.DIRECTION.WEST == this.heading) {\n this.heading = this.DIRECTION.SOUTH;\n }\n this.drawingRoute.push( { turn: { clockwise: false } } );\n }\n\n // Reset sensor value\n this.sensorVal = -1;\n }", "function nextShader() {\n\tcurrent++;\n\tcurrent = current % shaders.length;\n\twindow.location.href = \"#0\" + current;\n}", "draw () { //change name to generate?? also need to redo\n return null;\n }", "nextIteration() {\n if (this.contexts && this.contexts.length > 0) {\n this.contexts = this.contexts.slice();\n this.lastId++;\n const context = Object.assign({}, this.contexts[this.contexts.length - 1]);\n context.iterationId += 1;\n context.id = this.lastId;\n this.contexts.splice(-1, 1, context);\n this._currentContextIds.splice(0, 1, this.contextIdforContexts(this.contexts));\n }\n else {\n throw new Error('Cannot increase frame iteration, the context is empty');\n }\n }", "nextIteration() {\n if (this.contexts && this.contexts.length > 0) {\n this.contexts = this.contexts.slice();\n this.lastId++;\n const context = Object.assign({}, this.contexts[this.contexts.length - 1]);\n context.iterationId += 1;\n context.id = this.lastId;\n this.contexts.splice(-1, 1, context);\n this._currentContextIds.splice(0, 1, this.contextIdforContexts(this.contexts));\n }\n else {\n throw new Error('Cannot increase frame iteration, the context is empty');\n }\n }", "function gen_op_logic_T1_cc()\n{\n gen_opc_ptr.push({func:op_logic_T1_cc});\n}", "next1(move) {\n let next = freeStates.pop();\n next.parent = this;\n next.lastMove = move;\n next.depth = this.depth + 1;\n next.flip = this.move('flip', this.flip, move);\n next.twist = this.move('twist', this.twist, move);\n next.slice = this.move('FRtoBR', this.slice * 24, move) / 24 | 0;\n return next;\n }", "function main() {\n var N = 22; //Number of animation frames from 0 e.g. N=1 is the same as having two images which swap...\n Conf.augment ? Conf.animate += 1 : Conf.animate -= 1;\n if(Conf.animate === 0 || Conf.animate === N) {\n Conf.augment ? Conf.augment = false : Conf.augment = true;\n }\n }", "evolve() {\n if (this.link) {\n this.memory.body = [\n WORK, WORK, WORK, WORK, WORK, WORK, WORK,\n CARRY, CARRY, CARRY, CARRY, CARRY,\n MOVE, MOVE, MOVE, MOVE, MOVE, MOVE, MOVE, MOVE, MOVE, MOVE, MOVE, MOVE\n ]\n }\n }", "function Ltransform() {\n decipherMove(\"L\",\"F\",\"R\",\"B\",\"L\",\"F\",\"R\",\"B\",\"L\",\"F\",\"R\",\"B\",\"L\",\"F\",\"R\",\"B\");\n}", "_generateComponents (){\n this._generateJumpButtons();\n }", "next() {\n this.seed += 1;\n return this.prefix + this.seed;\n }", "function Generator() {} // 84", "nextComp(gameInstance, deckInstance, personInstance1, personInstance2, tableInstance, tableIdName, personIdName1, personIdName2, socket) {\n console.log('работает некст комп');\n if (personInstance2.personCards.length === 0) {\n socket.emit('You may out');\n this.out(tableInstance, tableIdName, socket);\n gameInstance.counter += 1;\n personInstance1.takeCard(deckInstance, personInstance1, tableIdName, personIdName1, socket);\n personInstance2.takeCard(deckInstance, personInstance2, tableIdName, personIdName2, socket);\n socket.emit('human should go');\n } else {\n let i = personInstance1.personCards.length - 1;\n while (i >= 0) {\n if (tableInstance.tableValues.indexOf(personInstance1.personCards[i].value) !== (-1)) {\n let x = personInstance1.personCards[i];\n tableInstance.tableCards.push(x);\n tableInstance.tableValues.push(x.value);\n socket.emit('nextComp', {\n tableIdName: tableIdName, personIdName: personIdName1, cardPic: x.image,\n cardNum: x.num, i: i\n });\n personInstance1.personCards.splice(i, 1);\n break;\n } else {\n i -= 1;\n }\n }\n if (i === -1) {\n personInstance1.out(tableInstance, tableIdName, socket);\n gameInstance.counter += 1;\n personInstance1.takeCard(deckInstance, personInstance1, tableIdName, personIdName1, socket);\n personInstance2.takeCard(deckInstance, personInstance2, tableIdName, personIdName2, socket);\n // socket.emit('human should go');\n gameInstance.playHuman(gameInstance, deckInstance, personInstance1, personInstance2, tableInstance, 'tableHtml', 'person1', 'person2', socket);\n\n }\n }\n }", "goToNextState() {\n this.colors = this.nextStateColors\n this.lives = this.nextStateLives\n this.nextStateColors = new Array(COLS * ROWS).fill(COLOR.BLANK)\n this.nextStateLives = new Array(COLS * ROWS).fill(false)\n }", "function switchConvolve()\n{\n if(convolve === true)\n {\n document.getElementById('dry').classList.remove('roombutton');\n document.getElementById('dry').classList.add('roombuttonselected');\n document.getElementById('wet').classList.remove('roombuttonselected');\n document.getElementById('wet').classList.add('roombutton');\n convolve = false;\n }\n else if(convolve === false)\n {\n document.getElementById('wet').classList.remove('roombutton');\n document.getElementById('wet').classList.add('roombuttonselected');\n document.getElementById('dry').classList.remove('roombuttonselected');\n document.getElementById('dry').classList.add('roombutton');\n convolve = true;\n }\n toggleDrawer();\n compile();\n}", "function nextTurn(){\n\t// save destination index to source index\n\t$(\"#characters\").children().each(function(index) {\n\t\t$(this).attr(\"srcPos\", $(this).attr(\"destPos\"));\n\t});\n\t\n\t// if it came to specific level, make playground wider\n\tif(marioGame.enStatus == enStep.nInit)\n\t\tmarioGame.Position = [1, 2, 3, 4, 5, 6, 7, 8, 9];\n\telse\n\t{\n\t\tif(marioGame.nLevel == 0)\n\t\t\tmarioGame.Position = [3, 4, 5, 6, 7];\n\t\telse if(marioGame.nLevel == 1)\n\t\t\tmarioGame.Position = [2, 3, 4, 5, 6, 7];\n\t\telse if(marioGame.nLevel == 2)\n\t\t\tmarioGame.Position = [2, 3, 4, 5, 6, 7, 8];\n\t\telse if(marioGame.nLevel == 3)\n\t\t\tmarioGame.Position = [1, 2, 3, 4, 5, 6, 7, 8];\n\t\telse if(marioGame.nLevel == 4)\n\t\t\tmarioGame.Position = [1, 2, 3, 4, 5, 6, 7, 8, 9];\n\t\telse if(marioGame.nLevel == 5)\n\t\t\tmarioGame.Position = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];\n\t}\n\t\t\n\t// disorder, player's position randomly\n\tmarioGame.Position.sort(shuffle);\n\t\n\t// save new destination position of each character\n\t$(\"#characters\").children().each(function(index) {\n\t\t$(this).attr(\"destPos\", marioGame.Position[index]);\n\t});\n\t\n\tmarioGame.nFrame = 0;\n\t\n\t// Check turns of this level are all done\n\tif( (marioGame.enStatus == enStep.nPlaying)&& (marioGame.nTurn > (5+marioGame.nLevel) ) )\n\t{\n\t\tmarioGame.enStatus = enStep.nSelect;\n\t\treturn;\n\t}\n}", "encoderSteps(lang, cycleCount1, cycleCount2){\n\t\tlet steps=[];\n\t\tlet step;\n\t\tstep = {name:'setParam',\n\t\t\tdescription: lang.setParam,\n\t\t\thelp:lang.setParamHelp,\n\t\t\tsub:[]\n\t\t};\n\t\tsteps.push(step);\n\n\t\tstep = {name:'setBits',\n\t\t\tdescription: lang.setBits,\n\t\t\thelp:lang.setIrBitsHelp,\n\t\t\tsub:[]\n\t\t};\n\t\tsteps.push(step);\n\n\t\tstep = {name:'flipIR',\n\t\t\tdescription: lang.flipIR,\n\t\t\thelp:lang.flipIRHelp,\n\t\t\tsub:[]\n\t\t};\n\t\tsteps.push(step);\n\n\t\tstep = {name: 'set1SW', // SW1 => Close, SW2 => 1\n\t\t\tdescription: lang.setSW,\n\t\t\thelp: lang.setSWHelp,\n\t\t\tsub: []\n\t\t};\n\t\tsteps.push(step);\n\n\t\tstep = {name: 'calcParity',\n\t\t\tdescription: lang.calcParity,\n\t\t\thelp: 'Executed for each Information bit (m-times)',\n\t\t\tcycleCount: cycleCount1,\n\t\t\tsub:[{name: 'calcFB', description: lang.calcFB, help: lang.calcFBHelp},\n\t\t\t\t{name: 'calcXOR', description: lang.calcXOR, help: lang.calcXORHelp},\n\t\t\t\t{name: 'shiftEN', description: lang.shiftEN, help: lang.shiftENHelp},\n\t\t\t\t{name: 'shiftCR', description: lang.shiftCR, help: lang.shiftCRHelp},\n\t\t\t\t//{name: 'shiftIR', description: lang.shiftIR, help: lang.shiftIRHelp}\n\t\t\t],\n\t\t\texitCond: lang.mTimesExitCond\n\t\t};\n\t\tsteps.push(step);\n\n\t\tstep = {name: 'set2SW', // SW1 => open, SW2 => 2\n\t\t\tdescription: lang.setSW,\n\t\t\thelp: lang.setSWHelp,\n\t\t\tsub: []\n\t\t};\n\t\tsteps.push(step);\n\n\t\tstep = {name: 'shiftParity',\n\t\t\tdescription: lang.shiftParity,\n\t\t\thelp: 'Execute for each Encoder bit (k-times)',\n\t\t\tcycleCount: cycleCount2,\n\t\t\tsub:[ {name: 'shiftCR', description: lang.shiftCR, help: lang.shiftCRHelp},\n\t\t\t\t//{name: 'shiftEN', description: lang.shiftEN, help: lang.shiftENHelp}\n\t\t\t],\n\t\t\texitCond: lang.kTimesExitCond\n\t\t};\n\t\tsteps.push(step);\n\n\t\tstep = {name:'flipCR',\n\t\t\tdescription: lang.flipCR,\n\t\t\thelp:lang.flipCRHelp,\n\t\t\tsub:[]\n\t\t};\n\t\tsteps.push(step);\n\n\n\t\tstep = {name: 'finish',\n\t\t\tdescription: lang.finish,\n\t\t\thelp: lang.finishMsg,\n\t\t\tsub:[]\n\t\t};\n\t\tsteps.push(step);\n\t\treturn steps;\n\t}", "function makeGen() {\n //The starting gen is igen\n // ilist1 is alist of the indices (i's in the comm lists) of the LHS objects\n n1=iList1.length;\n \n name2_money={}; // The total money affiliated with \"name2\"\n \n // The nodes and money transferred for each link \n name1_arr=[];\n name2_arr=[];\n money_arr=[];\n console.log(\"starting makeGen\");\n for (i=0; i < n1; i++) {\n i1=iList1[i];\n name1=comm_name[i1];\n tList=getAllIndexes(tran_id1,comm_id[iList1[i]]);\n moneyTot=0.;\n iStart=name1_arr.length; // The current value\n for (j=0; j<tList.length; j++ ) {\n id2=tran_id2[tList[j]];\n i2=i_comm_id[id2];\n name2=comm_name[i2];\n //if ((i<10) && (j<100)) console.log(j,tList[j],i2,id2,name2);\n money0=parseFloat(tran_amt[tList[j]]);\n if (includeLink(i1,name1,i2,name2,money0) == true) {\n // Provided we've made it this far...\n isNew=true;\n i1_test=getAllIndexes(name1_arr,name1);\n if (i1_test.length > 0) {\n for (k=0; k < i1_test.length; k++) {\n if (name2_arr[i1_test[k]] == name2) {\n i1_match=i1_test[k];\n isNew=false;\n }\n }\n }\n if (isNew == true) {\n name1_arr.push(name1); \n name2_arr.push(name2);\n money_arr.push(money0); // This is not the final value of the money, since the previous node only has a finite value\n } else {\n money_arr[i1_match]+=money0;\n }\n moneyTot+=money0;\n }\n }\n if (igen==0) {\n moneyList1[0]=moneyTot; \n totalAmt=moneyTot; // for the title\n for (k=0; k< money_arr.length; k++) {\n if (name2_arr[k] in name2_money) {\n name2_money[name2_arr[k]]+=money_arr[k];\n } else {\n name2_money[name2_arr[k]]=money_arr[k];\n }\n }\n find_top(name2_money);\n } else {\n for (k=iStart; k < money_arr.length; k++) {\n money_arr[k]=money_arr[k]*moneyList1[i]/moneyTot;\n }\n }\n } \n // Finally, update the nodes for the next time around.\n nodeList2=[];\n iList2=[];\n moneyList2=[];\n for (k=0; k < money_arr.length; k++) {\n name2=name2_arr[k];\n money2=money_arr[k];\n i2=i_comm_name[name2];\n if (name2 in nodeList2) {\n idx=nodeList2.indexOf(name2);\n moneyList2[idx]+=money2;\n } else {\n nodeList2.push(name2); \n moneyList2.push(money2);\n iList2.push(i2);\n }\n \n }\n}" ]
[ "0.6370642", "0.59359837", "0.5902944", "0.5851451", "0.5778909", "0.57437503", "0.570387", "0.5686315", "0.5671231", "0.567009", "0.56489676", "0.5602402", "0.55906326", "0.5579446", "0.5560562", "0.5552275", "0.552184", "0.54985714", "0.5469438", "0.5460973", "0.5455673", "0.5448085", "0.5430524", "0.54239875", "0.5390725", "0.5383029", "0.53405035", "0.53337646", "0.53186315", "0.5306459", "0.53046846", "0.5292008", "0.52888775", "0.5284979", "0.52733773", "0.52572197", "0.5254026", "0.5253585", "0.5250222", "0.5243158", "0.5240332", "0.52329296", "0.5231072", "0.52308273", "0.52273214", "0.5219861", "0.5205121", "0.5197589", "0.5189747", "0.5185321", "0.5184012", "0.51837814", "0.5183683", "0.5179496", "0.5160192", "0.51474446", "0.51343507", "0.51320785", "0.5131679", "0.513122", "0.5127761", "0.51244086", "0.5119682", "0.5117953", "0.5115743", "0.51123464", "0.5111865", "0.5101767", "0.5095799", "0.5091183", "0.5090978", "0.5089632", "0.50872415", "0.50811386", "0.50789195", "0.50770354", "0.5075933", "0.50757813", "0.5075616", "0.50641847", "0.5062219", "0.5056362", "0.5054916", "0.50507516", "0.50453156", "0.50439", "0.50439", "0.5042261", "0.5041494", "0.504103", "0.50406885", "0.50383264", "0.50272304", "0.5026102", "0.5024914", "0.5024817", "0.5018722", "0.50155395", "0.50049424", "0.5004884", "0.5004738" ]
0.0
-1
console.log(expTwo(2, 2)); console.log(expTwo(2, 6)); console.log(expTwo(2, 7));
function fibIt(n) { const fibArr = [1, 1]; while (fibArr.length < n) { fibArr.push(fibArr[fibArr.length - 2] + fibArr[fibArr.length - 1]); } return fibArr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function exp(args){\n return Math.exp(args);\n}", "function executeExponential(x, y) {\r\n if (x != NaN && y != NaN) {\r\n let result = \"\";\r\n let rollingResult = 1;\r\n for (let i = 0; i < y; i++) {\r\n rollingResult *= x;\r\n result += rollingResult + \" \";\r\n }\r\n console.log(result);\r\n } else {\r\n console.log(\"Invalid input\");\r\n }\r\n}", "function calculateExponent(num, exp) {\n\tconsole.log(Math.pow(num, exp));\n}", "function exp(n, e) {\n n = n ? n : 0;\n e = e ? e : 1;\n\n return Math.pow(n, e);\n}", "function exponent(number1,number2){\n let result = 1;\n for(i = 0; i < number2; i++){\n result *= number1\n }\n console.log(result);\n}", "function f(x){\n // return Math.pow(x,2);//\n return x*2;\n}", "function funcOne(hgjfjhghjgnf) {\n console.log(hgjfjhghjgnf * 2);\n}", "function expF(x, a, b, c) {\n\tc = c ? c : 0;\n\treturn a*b**x + c*x;\n}", "function myFuntion(a,b){\r\n return Math.pow(a,b)\r\n}", "function exp(value) {\n return (Array.isArray(value)) ? value[0](exp(value[1]), exp(value[2])) : value;\n}", "function exp2(base, n) {\n if (n === 0) { return 1 };\n \n if ( n % 2 === 0 ) {\n let r = exp2(base, n / 2);\n return r * r;\n } else {\n let r = (exp2(base, (n - 1) / 2));\n return base * (r * r);\n }\n}", "function createExpFunc(num) {\n\n}", "function exp(value) { // takes first array and takes next 2 as arguments\n return (Array.isArray(value)) ? value[0](value[1], value[2]) : value;\n}", "function exponent(x, y) {\r\n let finalResult = 1;\r\n for (let i = 0; i < y; i++) {\r\n finalResult *= x;\r\n }\r\n return finalResult;\r\n}", "function squareNumber(num) {\n console.log (num**2);\n}", "function createExpFunc(num) {\n return function(num2){\n return Math.pow(num2, num);\n }\n}", "function generateExp(){\n for (var i=0;i<iterations;i++){\n if (a2*a2+b2*b2>=4){\n return i; \n }\n var e=Math.E;\n var tmA=a2;\n a2=e^tmA*Math.cos(b2)-0.65;\n b2=e^tmA*Math.sin(b2);\n }\n return -1;\n}", "function exponent(base, exp) {\n if (exp === 0) {\n return 1;\n } else if (exp === 1) {\n return base;\n } else if (exp % 2 === 0) {\n return (exponent(base, exp / 2)) ** 2;\n } else {\n // odd exponent\n return base * ((exponent(base, (exp - 1) / 2)) ** 2);\n }\n}", "function multiply(num1, num2) {\r\n console.log(num1 * num2);\r\n}", "function exponent(startNumber, exponentNumber)\n{\n const result = startNumber ** exponentNumber;\n\n // console.log(result);\n return result;\n}", "function multiplyBy2(x){\r\n return x * 2;\r\n}", "function exp(b, n) {\n let base = b;\n for(let i = 1; i < n; i++) {\n base *= b;\n }\n return b;\n}", "function power(n, exp) {\n if (exp === 0) return 1;\n if (exp === 1) return n;\n return n * power(n, exp - 1);\n}", "function exponent(base, expo) {\n var result = 1;\n for(var i = 0; i < expo; ++i) {\n result *= base;\n }\n console.log(result);\n return result;\n}", "function squareNumber (numOne) {\n console.log (numOne * numOne);\n}", "function timesTwo(num) {\n\tconsole.log(num * 2);\n}", "function timesTwo(num) {\n\tconsole.log(num * 2);\n}", "function transmogrifier(num1,num2,num3){\n\n var totalfirstsecond = num1 * num2;\n\n var power = Math.pow(totalfirstsecond, num3);\n\n console.log (power);\n\n return power;\n\n}", "function exponent(num, times) {\n return Math.pow(num, times);\n}", "function multipleNum(a, b) {\n\tconsole.log(a*b);\n}", "function power (base, exp){\n if(exp === 0) return 1;\n return base * power(base, exp-1);\n}", "function calculateExponent(num, exp) {\n return Math.pow(num, exp);\n}", "function exp(value) {\n return (Array.isArray(value))\n ? value[0](\n exp(value[1]),\n exp(value[2])\n )\n : value;\n}", "function power(base1,exp1) {\n if (exp1 === 0){\n return 1\n }\n return base1 * power(base1, exp1-1)\n}", "function multipleTwoNumbers(num1, num2){\n var result = num1 * num2;\n return result;\n\n}", "function multiply(x,y){\n console.log(x);\n console.log(y);\n}", "function multiply(n1,n2) {\n var result = n1*n2;\n // console.log(result);\n return result;\n}", "function calc(exp) { return \"calc(\" + exp + \")\"; }", "function pow(x,n) {\n let x = inum;\n let n = itimes\n alert (x**n);\n}", "function Power(a,b)\n{\nresult=Math.pow(a,b);\nreturn result;\n}", "function ex1(){\n return 12+20\n }", "function complicated () {\n console.log(multiply(return4(), 8));\n}", "function myFunction() {\n a = 4;\n b = 3;\n document.getElementById(\"result\").innerHTML = Math.pow(a, b); \n}", "function power(base, exp) {\n if(exp <=0 ) return 1\n\n return base*power(base, exp-1)\n\n}", "function square(num) {\n console.log(num * num);\n }", "function multiplyByTwo(number) {return number * 2;}", "function pow(exp) {\n return function(base) {\n return Math.pow (base, exp);\n };\n }", "function multiplyTwoNumbers(a, b) {\nreturn a * b\n}", "function exponenet(n , b){\n\tif (typeof n !== \"number\" || typeof b !== \"number\"){\n\t\treturn TypeError(\"Enter a number for both n and b\")\n\t} else {\n\t\treturn Math.pow(n, b)\n\t}\n}", "function power (a,b){\n var result = Math.pow(a,b)\n return result\n}", "function multiplyTwoNumbers(x,y){\n return x * y;\n}", "function B(x) {\n console.log(\"B\");\n\n return x ** 2;\n}", "function calc(number1, number2){\n\tconsole.log(number1 + \" times \" + number2 + \" equals \" + number1 * number2)\n}", "function doubleIt(num){\n var result = num*2;\n //console.log(result);\n return result;\n}", "function a(n){\n\tconsole.log('n is', n);\n\ty = n*2;\n\treturn y;\n}", "function gamma(z)\n{\n return Math.exp(logamma(z));\n}", "function multiplicacion (numero1, numero2) {\n var resultado = numero1 * numero2\n console.log(resultado)\n}", "function g(a, b) {\n return a * b * 3.5;\n}", "function g(a, b) {\n return a * b * 3.5;\n}", "function log2(num) {\n\n}", "function square(x){\n\tconsole.log(x*x);\n}", "function calculateExponent(num, exp) {\n\treturn Math.pow(num, exp)\n}", "function multiplicar(a, b) {//parametros dentro de la declaracion de la funcion\n console.log(a * b)\n}", "function intexp(value)\n{\n\treturn (Math.floor(log2(value)));\n}", "function g(a, b) {\n return a * b * 3.5;\n}", "function firstfunc (x, y){\n\tvar mathandstuff = (x * y) + (2*x * 2*y);\n\tconsole.log(\"Answer:\", mathandstuff);\n\treturn mathandstuff;\n\n}", "function a(n) { //n=5\n console.log('n is', n);\n y = n * 2; //10\n return y; //return 10\n}", "function multipliesTwoNumbers(num1, num2) {\nlet product = num1 * num2;\nreturn (product);\n}", "function multiplyTwoNumbs(a,b){\n return a *b;\n}", "function multiply() {\n return num1 * num2;\n}", "function multiply() {\n return num1 * num2;\n}", "function multiple(num1, num2){\n let result = num1 * num2;\n return result;\n}", "function multiply (x) {\n return x * 2;\n}", "function product(num1, num2){\n multiply = num1 * num2;\n console.log(multiply);\n return multiply\n}", "function calculateExponent(num, exp) {\n return Math.pow(num, exp);\n }", "function multiplyByTwo2(b){\n var a = 2;\n return a * b;\n}", "function funcTwo(num1, num2, num3) {\n console.log(num1 / num2 / num3);\n}", "function power(a, b) {\n return null; \n}", "function two() {\r\n\treturn 1 + 1;\r\n}", "function square(number){\n\tconsole.log(number * number)\n\n}", "function recursiveExponent(base, exp) {\n return recursion(exp, 1);\n\n function recursion(n, res) {\n if (n === 0) return res;\n return recursion(n - 1, res * base);\n }\n}", "function doubleIT(num){\n var result = num * 2;\n return result;\n}", "function power(x,y) {\n return Math.pow(x,y); \n}", "function expo(){\n var1 = +prompt(\"Enter a base number\");\n var2 = +prompt(\"Enter an exponential number\");\n var power = Math.pow(var1,var2);\n document.write(var2 +\" is the power of \" + var1 +\" = \" +power);\n}", "function raisedValue(){\r\n var a =prompt(\"enter first value\");\r\n var b = prompt(\"enter second value\");\r\n console.log(Math.pow(a, b))\r\n }", "function myMathFunction() {\n console.log(2+2);\n console.log(3-2);\n console.log(12/4);\n console.log(2*5);\n}", "function multiplyByItself(x){\n return x**2;\n}", "function hypo(a, b) {\n var y = 45;\n function square(x) {\n console.log(y);\n return x * x;\n }\n return Math.sqrt(square(a)+ square(b))\n}", "function expValue(x,y){\n let result = [];\n let start = 1;\n\n \n\n if(typeof x === 'number' && typeof y === 'number'){\n console.log('true');\n }else{\n console.log('false');\n }\n\n for (let i = 1; i <= y; i++){\n start *= x;\n result += start + ' ';\n }\n console.log(result);\n \n \n}", "function expm1(x){ // 1401\n return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : exp(x) - 1; // 1402\n} // 1403", "function multiplyEm(num1, num2) {\n var product = num1 * num2;\n return product\n}", "function power(base, exp) {\n if (exp === 0) return 1;\n return base * power(base, exp-1);\n}", "function exponent (base, expo) {\n if (expo === 1) {\n return base\n }\n return base * exponent(base, expo - 1)\n}", "function moyenne(a,b){\n var moy=(a+b)/2;\n return moy;\n}", "function power(x, y) {\n return x**y;\n }", "function MiFuncion(x, y){\n console.log(x + y)\n}", "function powerCalculator(num, exp) {\n if(exp >= 0) {\n let answer = 1\n for(let i = 1; i <= exp; i++) {\n answer = answer * num\n }\n return answer;\n }\n else {\n return 'exponent should be >= 0'\n }\n }", "function multiply(a, b) {\n var result = a * b;\n console.log(result);\n return result;\n}", "function potencia2(a,b) {\n return a ** b;\n\n}", "function teste2(x, y){\n print(`total = ${x + y}`)\n}", "function multiply(n1,n2){\r\n return n1*n2;\r\n}" ]
[ "0.7817147", "0.69642866", "0.6905295", "0.6774016", "0.6765923", "0.67334956", "0.66194695", "0.65695155", "0.6547786", "0.6544614", "0.6543179", "0.6530159", "0.65273", "0.64918613", "0.64756984", "0.6473066", "0.6458299", "0.6439698", "0.6420843", "0.64118695", "0.6408318", "0.6401413", "0.6378301", "0.6371681", "0.6359682", "0.6356326", "0.6356326", "0.635413", "0.6352132", "0.635081", "0.63420606", "0.63143086", "0.6311199", "0.63105005", "0.63091767", "0.63091373", "0.63088286", "0.629252", "0.6291634", "0.6280572", "0.6277975", "0.62768555", "0.626757", "0.62613755", "0.62592155", "0.6255221", "0.62432855", "0.6241921", "0.6237343", "0.6234754", "0.6232645", "0.6220525", "0.6218368", "0.62137777", "0.6199535", "0.6198606", "0.619025", "0.6188382", "0.6188382", "0.61806697", "0.61790913", "0.61712325", "0.6162547", "0.61617565", "0.6155699", "0.61403203", "0.6138899", "0.61369085", "0.6134321", "0.61337924", "0.61337924", "0.61296374", "0.6128806", "0.6125396", "0.61253816", "0.612431", "0.61221826", "0.6121892", "0.61204773", "0.6116335", "0.6107394", "0.6106901", "0.61059195", "0.61022824", "0.60976106", "0.6096932", "0.60943204", "0.60929865", "0.609228", "0.60917515", "0.60893536", "0.6087104", "0.60852605", "0.608512", "0.6083875", "0.60809225", "0.60806763", "0.6077926", "0.6073315", "0.60716647", "0.60714763" ]
0.0
-1
console.log(bSearch([1, 2, 3], 1)); console.log(bSearch([2, 3, 4, 5], 3)); console.log(bSearch([2, 4, 6, 8, 10], 6)); console.log(bSearch([1, 3, 4, 5, 9], 5)); console.log(bSearch([1, 2, 3, 4, 5, 6], 6) ); console.log(bSearch([1, 2, 3, 4, 5, 6], 0)); console.log(bSearch([1, 2, 3, 4, 5, 7], 6));
function makeChange(total, coinsArr) { if (total <= 0) { return []; } for (let i = 0; i < coinsArr.length; i++) { if (total >= coinsArr[i]) { total -= coinsArr[i]; return [coinsArr[i]].concat(makeChange(total, coinsArr.slice(i, coinsArr.length))); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bSearch(arr, val) {\n let start = 0;\n let end = arr.length - 1;\n\n while (start < end) {\n const mid = Math.floor((end - start) / 2) + start;\n if (arr[mid] === val) {\n return mid;\n }\n if (arr[mid] < val) {\n start = mid + 1;\n } else {\n end = mid - 1;\n }\n }\n\n return start;\n}", "function binarySearch(arr, value) {\n\n}", "function binarySearch(arr, val) {\n\n}", "function bsearch(arr, target) {\n if (arr.length < 1){\n return -1;\n }\n let middle = Math.floor(arr.length/2);\n\n if (arr[middle] === target){\n return middle;\n } else if (arr[middle] > target){\n let left = arr.slice(0, middle);\n return bsearch(left, target);\n } else {\n let right = arr.slice(middle+1);\n if (bsearch(right, target) !== -1) return bsearch(right, target)+middle+1;\n return bsearch(right, target);\n }\n\n}", "function bSearch(arr, s, e) {\n if (s > e) return -1;\n const mid = Math.floor((s + e) / 2);\n if (arr[mid] > arr[mid + 1]) return mid + 1;\n else return Math.max(bSearch(arr, s, mid - 1), bSearch(arr, mid + 1, e));\n}", "function bsearch(arr, target) {\n let mid = Math.floor(arr.length / 2);\n if (arr[mid] === target) {\n return mid;\n } else if (arr.length <= 1 && arr[mid] !== target) {\n return -1;\n }\n\n let left = arr.slice(0, mid);\n let right = arr.slice(mid, arr.length);\n let val;\n if (target > arr[mid]){\n val = bsearch(right, target);\n if (val === -1) {\n return val;\n } else {\n val += left.length;\n }\n } else {\n val = bsearch(left, target);\n }\n return val;\n\n}", "function bsearch(arr, target) {\n if (arr.length === 0) { return -1; }\n\n let midIdx = Math.floor(arr.length / 2);\n\n if (arr[midIdx] === target) {\n return midIdx;\n } else if (arr[midIdx] > target) {\n return bsearch(arr.slice(0, midIdx), target);\n } else {\n let result = bsearch(arr.slice(midIdx + 1), target);\n if (result === -1) {\n return -1;\n } else {\n return midIdx + 1 + result;\n }\n }\n}", "function bsearch(arr, target) {\n /*\n let middle = Math.floor(arr.length / 2);\n let midP = arr[middle];\n\n if (arr.length === 1 && arr[0] != target) {\n return -1;\n }\n\n if (midP < target) {\n let search = bsearch(arr.slice(middle + 1), target);\n return (search === -1) ? -1 : search + middle + 1;\n\n } else if (midP === target) {\n return middle;\n\n } else if (midP > target) {\n let search2 = bsearch(arr.slice(0, middle), target);\n return (search2 === -1) ? -1 : search2;\n }\n */\n\n //\n // let middle = Math.floor(arr.length / 2);\n // let midP = arr[middle];\n //\n // if (arr.length <= 1 && arr[0] != target) {\n // return -1;\n // }\n //\n // if (midP < target) {\n // let search = bsearch(arr.slice(middle + 1), target)\n // return (search === -1) ? -1 : search + middle + 1;\n //\n // } else if (midP === target) {\n // return middle;\n //\n // } else if (midP > target) {\n // let search = bsearch(arr.slice(0, middle), target);\n // return (search === -1) ? -1 : search;\n // }\n\n //\n // let middle = Math.floor(arr.length / 2)\n // let midP = arr[middle];\n //\n // if (arr.length <= 1 && arr[0] !== target) {\n // return -1\n // }\n //\n // if (midP < target) {\n // let search = bsearch(arr.slice(middle + 1), target);\n // return (search === -1) ? -1 : search + middle + 1;\n // } else if (midP === target) {\n // return middle;\n // } else if (midP > target) {\n // let search = bsearch(arr.slice(0, middle), target);\n // return (search === -1) ? -1 : search;\n // }\n}", "function binarySearch(sortedNums, searchNum) {}", "function bsearch(arr, target) {\n if (arr.length === 0) {\n return null;\n }\n\n const mid = Math.floor(arr.length / 2);\n if (arr[mid] === target) {\n return mid;\n } else if (arr[mid] > target) {\n return bsearch(arr.slice(0, mid), target);\n } else if (arr[mid] < target) {\n let result = bsearch(arr.slice(mid + 1), target);\n return result === null ? null : result + mid + 1;\n }\n}", "function binarySearch(list, toFind) {\n let lowIdx = 0;\n let highIdx = list.length;\n let middleIdx,\n guess,\n counter = 0; // counter for demostration\n\n while (lowIdx <= highIdx) {\n counter++;\n middleIdx = Math.floor(highIdx + lowIdx) / 2;\n guess = list[middleIdx];\n if (guess === toFind) break;\n else if (guess > toFind) highIdx = middleIdx -1;\n else lowIdx = middleIdx; // guess > itemToFind\n }\n console.log('iterations: ',counter);\n if (guess === toFind) return middleIdx; // return the index if found\n return -1;\n}", "function bSearch(arr, target) {\n if (arr.length === 1) {\n if (arr[0] === target) {\n return target;\n } else {\n return null;\n }\n } else if (arr.length === 0) {\n return null;\n } else {\n let midpoint = Math.floor(arr.length / 2);\n if (arr[midpoint] === target) {\n return target;\n } else if (arr[midpoint] < target) {\n return bSearch(arr.slice(midpoint + 1, arr.length), target);\n } else {\n return bSearch(arr.slice(0, midpoint - 1), target);\n }\n }\n\n}", "function binarySearch(searchElement, array) {\n var currentElement;\n var minIndex = 0;\n var maxIndex = array.length - 1;\n while (minIndex <= maxIndex) {\n currentIndex = (minIndex + maxIndex) / 2 | 0;\n currentElement = array[currentIndex];\n \t\tconsole.log(\"currentIndex \" + currentIndex, \"currentElement \" + currentElement);\n if (currentElement < searchElement) {\n minIndex = currentIndex + 1;\n }\n else if (currentElement > searchElement) {\n maxIndex = currentIndex - 1;\n }\n else {\n return currentIndex;\n }\n }\n \n return -1;\n}", "function binarySearch( list, target ) {\n\n}", "function bsearch(arr, target) {\n if(!(arr instanceof Array)) {\n return -1;\n }\n \n if (arr[0] === target) {\n return target;\n } else if (arr[0] !== target && arr.length === 1) {\n return -1\n } else {\n let newArr = arr.slice(1, arr.length);\n return bsearch(newArr, target);\n }\n}", "function BinarySearch(arr, key) {\n let low = 0;\n let high = arr.length - 1;\n\n for (let i = 0; i < arr.length; i++) {\n let mid = Math.floor((low + high) / 2);\n if (key === arr[mid]) {\n console.log(`Found ${key} in ${mid}th index.`);\n console.log(`Number of iterations = ${i + 1}`);\n break;\n }\n\n else if (key > arr[mid]) {\n low = mid + 1;\n mid = Math.floor((low + high / 2));\n }\n\n else if (key < arr[mid]) {\n high = mid - 1;\n mid = Math.floor((low + high / 2));\n }\n\n if (low > high) {\n console.log(`Didn't find ${key} in the list. Process iterated for ${i + 1} times.`);\n break;\n }\n }\n}", "function binarySearch(arr, searchValue) {\n function find(arr, searchValue, left, right) {\n if (right < left)\n return -1;\n\n /*\n int mid = mid = (left + right) / 2;\n There is a bug in the above line;\n Joshua Bloch suggests the following replacement:\n */\n var mid = Math.floor((left + right) >>> 1);\n if (searchValue > arr[mid])\n return find(arr, searchValue, mid + 1, right);\n\n if (searchValue < arr[mid])\n return find(arr, searchValue, left, mid - 1);\n\n return mid;\n }\n return find(arr, searchValue, 0, arr.length - 1);\n}", "function binarySearch(arr, searchValue) {\n function find(arr, searchValue, left, right) {\n if (right < left)\n return -1;\n\n /*\n int mid = mid = (left + right) / 2;\n There is a bug in the above line;\n Joshua Bloch suggests the following replacement:\n */\n var mid = Math.floor((left + right) >>> 1);\n if (searchValue > arr[mid])\n return find(arr, searchValue, mid + 1, right);\n\n if (searchValue < arr[mid])\n return find(arr, searchValue, left, mid - 1);\n\n return mid;\n };\n\n return find(arr, searchValue, 0, arr.length - 1);\n}", "function binarySearchBonus(arr, val) {\r\n var start = 0;\r\n var end = arr.length-1;\r\n var counter = 0;\r\n while (start <= end && counter == 0){\r\n var pointer = Math.floor((end-start)/2)+start;\r\n if (arr[pointer]==val){\r\n counter ++;\r\n break;\r\n }\r\n else if (arr[pointer]<val){\r\n start = pointer+1;\r\n }\r\n else if (arr[pointer]>val){\r\n end = pointer-1;\r\n }\r\n }\r\n if (counter>0){\r\n var x = 1\r\n while (arr[pointer+x]==val){\r\n counter++;\r\n x++;\r\n }\r\n x = 1\r\n while (arr[pointer-x]==val){\r\n counter++;\r\n x++;\r\n }\r\n }\r\n return counter\r\n }", "function rBinarySearch(array, num ) {\n\n}", "function BinarySearch(array, search) {\n\tlet arrayToSearch = array;\n\n\t// High and Low are the bondaries of search within the array\n\tlet low = 0;\n\tlet high = array.length;\n\n\tlet found = false;\n\t// Turing the searchInput to all lowercase so capped letters aren't a factor\n\tlet itemToFind = search.toLowerCase();\n\n\twhile (high >= low && found === false) {\n\t\t// Set middle to the middle int value between high and low\n\t\tlet middle = parseInt((low + high) / 2);\n\n\t\t// If the middle value equals the array's length, exit the function\n\t\tif (middle === arrayToSearch.length) {\n\t\t\tbreak;\n\t\t}\n\n\t\t// If the itemToFind is equal to the middle index element...\n\t\tif (FoundItem(arrayToSearch, middle, itemToFind)) {\n\t\t\t// Then...\n\t\t\t// Set if we found the item to true\n\t\t\tfound = true;\n\t\t\t// Exit the while loop\n\t\t\tbreak;\n\t\t}\n\n\t\t// If the itemToFind is alphabetically lower than the middle...\n\t\tif (itemToFind < (arrayToSearch[middle][1][0]).toLowerCase()) {\n\t\t\t// Then...\n\t\t\t// Set the high value to the middle\n\t\t\thigh = middle - 1;\n\t\t} else {\n\t\t\t// Otherwise...\n\t\t\t// Set the low value to the middle\n\t\t\tlow = middle + 1;\n\t\t}\n\t}\n}", "function binarySearch(ar, el, compare_fn) {\n var m = 0;\n var n = ar.length - 1;\n while (m <= n) {\n var k = (n + m) >> 1;\n var cmp = compare_fn(el, ar[k]);\n if (cmp > 0) {\n m = k + 1;\n } else if(cmp < 0) {\n n = k - 1;\n } else {\n return k;\n }\n }\n return -m - 1;\n}", "function binarySearch(\n array = [3, 5, 6, 8, 11, 12, 14, 15, 17, 18],\n value = 16,\n start,\n end\n) {\n var start = start === undefined ? 0 : start;\n var end = end === undefined ? array.length : end;\n\n if (start > end) {\n return -1;\n }\n\n const index = Math.floor((start + end) / 2);\n const item = array[index];\n\n console.log(start, end);\n if (item == value) {\n return index;\n } else if (item < value) {\n return binarySearch(array, value, index + 1, end);\n } else if (item > value) {\n return binarySearch(array, value, start, index - 1);\n }\n}", "function binarySearch(array, value, start, end) {\n start = start === undefined ? 0 : start;\n end = end === undefined ? array.length : end;\n\n if (start > end) {\n return -1;\n }\n\n const index = Math.floor((start + end) / 2);\n const item = array[index];\n\n\n if (item === value) {\n return index;\n }\n else if (item < value) {\n return binarySearch(array, value, index + 1, end);\n }\n else if (item > value) {\n return binarySearch(array, value, start, index - 1);\n }\n}", "binarySearchInteger(arr, search){\n var startIndex = 0,\n stopIndex = arr.length - 1,\n middle = Math.floor((stopIndex + startIndex) / 2);\n\n\n while (arr[middle] != search && startIndex < stopIndex) {\n\n //adjust search area\n if (search < arr[middle]) {\n stopIndex = middle - 1;\n } else if (search > arr[middle]) {\n startIndex = middle + 1;\n }\n\n //recalculate middle\n middle = Math.floor((stopIndex + startIndex) / 2);\n }\n\n //make sure it's the right value\n if(arr[middle]==search){\n return middle;\n }\n else{\n return -1;\n }\n \n }", "function binarySearch(arr, value, start=0, end=arr.length) {\n console.log(`${start}, ${end}`);\n if(start > end ) return null; \n \n let index = Math.floor((start + end) /2); \n\n if(arr[index] === value) {\n return index; \n }\n if(arr[index] > value) {\n return binarySearch(arr, value, start, index - 1); \n }\n if(arr[index] < value) {\n return binarySearch(arr, value, index + 1, end);\n }\n}", "function binarySearch(array, value, start, end) {\n var start = start === undefined ? 0 : start;\n var end = end === undefined ? array.length : end;\n\n if (start > end) {\n return -1;\n }\n\n const index = Math.floor((start + end) / 2);\n const item = array[index];\n\n console.log(start, end);\n if (item == value) {\n return index;\n } else if (item < value) {\n return binarySearch(array, value, index + 1, end);\n } else if (item > value) {\n return binarySearch(array, value, start, index - 1);\n }\n}", "function binarySearch(arr, k) {\n //assumption that arr is ordered & comprised of numbers\n // k is desired number\n // returns index of k or -1 if there is no match\n\n var low = 0;\n var high = arr.length-1;\n var mid = Math.floor((high + low)/2);\n\n while(low !== mid ){\n if(arr[mid] === k){\n console.log('FOUND!', mid);\n return mid;\n } else if (arr[mid] > k) {\n high = mid;\n mid = Math.floor((high + low)/2);\n } else if (arr[mid] < k) {\n low = mid;\n mid = Math.floor((high + low)/2);\n }\n }\n console.log('NOT FOUND! ', -1);\n return -1;\n}", "function binarySearch(args) {\n var input = args[0].split('\\n').map(Number),\n\t\tx = input[input.length - 1],\n indexOfX,\n i;\n\n input.shift();\n input.pop();\n input.sort(function (a, b) {\n return a - b;\n });\n\n indexOfX = binSearch(input, x, 0, input.length - 1);\n return indexOfX;\n\n function binSearch(array, number, start, end) {\n if (array[start] > number || number > array[end]) {\n return (-1);\n }\n\n var middle = ((end + start) / 2) | 0;\n if (array[middle] === number) {\n return middle;\n } else {\n if (array[middle] > number) {\n return binSearch(array, number, start, (middle - 1));\n } else {\n return binSearch(array, number, (middle + 1), end);\n }\n }\n }\n}", "function recursiveSearch(aLow,aHigh,aNeedle,aHaystack,aCompare,aBias){// This function terminates when one of the following is true:\n//\n// 1. We find the exact element we are looking for.\n//\n// 2. We did not find the exact element, but we can return the index of\n// the next-closest element.\n//\n// 3. We did not find the exact element, and there is no next-closest\n// element than the one we are searching for, so we return -1.\nvar mid=Math.floor((aHigh-aLow)/2)+aLow;var cmp=aCompare(aNeedle,aHaystack[mid],true);if(cmp===0){// Found the element we are looking for.\nreturn mid;}else if(cmp>0){// Our needle is greater than aHaystack[mid].\nif(aHigh-mid>1){// The element is in the upper half.\nreturn recursiveSearch(mid,aHigh,aNeedle,aHaystack,aCompare,aBias);}// The exact needle element was not found in this haystack. Determine if\n// we are in termination case (3) or (2) and return the appropriate thing.\nif(aBias==exports.LEAST_UPPER_BOUND){return aHigh<aHaystack.length?aHigh:-1;}else{return mid;}}else{// Our needle is less than aHaystack[mid].\nif(mid-aLow>1){// The element is in the lower half.\nreturn recursiveSearch(aLow,mid,aNeedle,aHaystack,aCompare,aBias);}// we are in termination case (3) or (2) and return the appropriate thing.\nif(aBias==exports.LEAST_UPPER_BOUND){return mid;}else{return aLow<0?-1:aLow;}}}", "function binarySearch(arr, val) {\n if(arr.length == 0){\n return -1\n } else if(arr[arr.length - 1] == val){\n return arr.length - 1;\n }\n return 0 + findIndex(arr.slice(0, arr.length - 1), val);\n}", "function binarySearch(A, cmpVal, def, valfn, i, j){\n if(!A.length) return -1; \n var valfn = valfn || function(x){ return x; }\n var def = def || 0;\n if(i === undefined){ i = 0; }\n if(j === undefined){ j = A.length; }\n if(i >= j) {\n\tif(def === -1){\n\t if(i > 0) return i - 1;\n\t else return i;\n\t}\n\telse if(def === 0){\n\t var v0 = 999999999;\n\t var v2 = 999999999;\n\t if(i > 0) v0 = valfn(A[i-1])\n\t if(i + 1 < A.length) v2 = valfn(A[i+1]);\n\t var a = [Math.abs(v0 - cmpVal)\n\t\t ,Math.abs(valfn(A[i]) - cmpVal)\n\t\t ,Math.abs(v2 - cmpVal)]\n\t var closest = a.indexOf(Math.min.apply(Math, a));\n\t if(closest === 0) return i - 1; \n\t else if(closest === 2){ return i + 1; }\n\t else return i; \n\t}\n\telse if(def === 1){\n\t if(i + 1 < A.length) return i + 1;\n\t else return i; \n\t}\n\telse { throw \"Parameter 'def' must be -1, 0, or 1\"; }\n }\n\n var idx = i + Math.floor((j - i)/2);\n if (idx < 0 || idx + 1 > A.length){ throw \"Bad idx: \"+idx+\" not in [0, \"+A.length+\"]\"; }\n var v = valfn(A[idx]);\n\n if(v > cmpVal){ return binarySearch(A, cmpVal, def, valfn, i, idx); }\n if(v === cmpVal){ return idx; }\n if(v < cmpVal){ return binarySearch(A, cmpVal, def, valfn, idx+1, j); }\n}", "function binarySearch(anArray, item) {\n let lowerIndex = 0;\n let upperIndex = anArray.length - 1;\n let middleIndex;\n\n while (lowerIndex <= upperIndex) {\n middleIndex = Math.floor((lowerIndex + upperIndex) / 2);\n\n if (item.localeCompare(anArray[middleIndex]) == 0) {\n return middleIndex;\n } else if (item.localeCompare(anArray[middleIndex]) == -1) {\n upperIndex = middleIndex - 1;\n } else {\n lowerIndex = middleIndex + 1;\n }\n }\n\n return -1;\n}", "binarySearch(arr, number) {\n console.log(\"in binary search \" + arr)\n var n = arr.length;\n var l = 1\n var tem\n while (tem != number) {\n if (n < l)\n break;\n var m = l + Math.floor((n - l) / 2)\n\n if (arr[m] < number)\n l = m + 1\n else if (arr[m] > number)\n n = m - 1\n else if (arr[m] == number) {\n console.log(\"number is present\")\n tem = number\n return true\n }\n else {\n break;\n return false\n }\n\n\n }\n\n\n}", "function binary_Search(items, value){\n var firstIndex = 0,\n lastIndex = items.length - 1,\n middleIndex = Math.floor((lastIndex + firstIndex)/2);\n \n while(items[middleIndex] != value && firstIndex < lastIndex)\n {\n if (value < items[middleIndex])\n {\n lastIndex = middleIndex - 1;\n } \n else if (value > items[middleIndex])\n {\n firstIndex = middleIndex + 1;\n }\n middleIndex = Math.floor((lastIndex + firstIndex)/2);\n }\n \n return (items[middleIndex] != value) ? -1 : middleIndex;\n }", "function search(x, a, cmp)\n {\n let lo = 0, hi = a.length - 1;\n while (lo <= hi) {\n let m = Math.floor((lo + hi)/2), r = cmp(x, a[m]);\n if (r < 0) hi = m - 1;\n else if (r > 0) lo = m + 1;\n else return m;\n }\n return -1;\n }", "function search(arr, value) {\n let index = arr.indexOf(value);\n if (index > 0) {\n return console.log(index);\n } else {\n return console.log(-1);\n }\n}", "function binarySearch (array, value) {\n var start = 0;\n var end = array.length - 1;\n var middle;\n\n while (start <= end) {\n middle = Math.floor((start + end) / 2);\n\n if (array[middle] === value) {\n return middle;\n }\n if (value < array[middle]) {\n end = middle - 1;\n } else {\n start = middle + 1;\n }\n }\n return -1;\n}", "function binarySearch(arr, value) {\n let middle = 0;\n let left = 0;\n let right = arr.length - 1;\n while (left <= right) {\n if (arr[right] < value || arr[left] > value) return -1;\n middle = Math.ceil((left + right) / 2);\n if (arr[middle] === value) return middle;\n if (arr[middle] > value) {\n right = middle - 1;\n } else if (arr[middle] < value) {\n left = middle + 1;\n }\n }\n return -1;\n}", "function binarySearch (arr, target) {\n var n = arr.length,\n l = 0, r = n - 1;\n while(l < r) {\n var middle = (l+r) / 2\n if (target === arr[middle]) {\n return middle\n } else if (middle > target) {\n r = middle + 1\n } else {\n l = middle - 1\n }\n }\n return -1\n}", "function binarySearch(arr, val) {\n if (arr.length === 0) return -1;\n let leftpointer = 0, rightPointer = arr.length - 1, guessIndex = Math.floor((rightPointer) / 2);\n\n while (arr[guessIndex] !== val && leftpointer <= rightPointer) {\n console.log(leftpointer, guessIndex, rightPointer);\n if (arr[guessIndex] < val) leftpointer = guessIndex + 1;\n else rightPointer = guessIndex - 1;\n guessIndex = Math.floor((rightPointer - leftpointer) / 2) + leftpointer;\n }\n\n return arr[guessIndex] === val ? guessIndex : -1;\n}", "function binarySearch(arr,val) {\n let start = 0\n let end = arr.length-1\n let mid = Math.floor((start+end)/2)\n\n while (arr[mid] !== val && start <= end) {\n\n if (arr[mid] < val) {\n start = mid + 1\n } else {\n end = mid - 1\n }\n mid = Math.floor((start+end)/2)\n }\n if (arr[mid] === val) {\n return mid\n }\n return -1\n}", "function linearSearch(arr, val){\n for(let i=0; i<arr.length; i++){\n if(arr[i] === val){\n return i;\n }\n return -1;\n }\n console.log('Hello World!')\n}", "function binarySearch() {\n var sortedArray = [ 1, 3, 8, 9, 13, 15, 16, 18, 24, 27, 29, 31, 34, 36, 39, 42, 44, 47, 48, 50 ];\n var output = \"Type one of the following integers to find it's index in the array: \\nIndex : Number\\n\";\n\n for (var i = 0; i < sortedArray.length; i++)\n {\n output = output + i + \" : \" + sortedArray[i] + \"\\n\";\n }\n\n printInElement(output);\n\n var choice = parseInt(prompt(\"Enter index\"));\n var bottom = 0;\n var top = sortedArray.length;\n var mid = (top + bottom) / 2;\n\n while (true) {\n\n if (sortedArray[mid] === choice) {\n output += \"The index of \" + choice + \" is \" + mid;\n break;\n }\n\n if (bottom === mid || top === mid) {\n output += \"Number not found!\";\n break;\n } else if (sortedArray[mid] > choice) {\n top = mid;\n mid = (top + bottom) / 2;\n } else if (sortedArray[mid] < choice) {\n bottom = mid;\n mid = (top + bottom) / 2;\n }\n }\n\n printInElement(output);\n}", "function binarySearch(array, value) {\n let left = 0;\n let right = array.length - 1;\n let middle = Math.round((left + right) / 2);\n while (array[middle] !== value && left <= right) {\n middle = Math.round((left + right) / 2);\n if (array[middle] > value) {\n right = middle - 1;\n } else {\n left = middle + 1;\n } \n }\n \n if (array[middle] === value) {\n return middle\n }\n\n return -1\n}", "function binarySearch(list, value)\r\n{\r\n\tlet start = 0;\r\n\tlet stop = list.length - 1;\r\n\tlet middle = Math.floor((start + stop) / 2);\r\n\t\r\n\twhile (list[middle][0] !== value && start < stop)\r\n\t{\r\n\t\tif (value < list[middle][0])\r\n\t\t{\r\n\t\t\tstop = middle - 1;\r\n\t\t} else\r\n\t\t{\r\n\t\t\tstart = middle + 1;\r\n\t\t}\r\n\t\t\r\n\t\tmiddle = Math.floor((start + stop) / 2);\r\n\t}\r\n\t\r\n\treturn (list[middle][0] !== value) ? -1 : middle;\r\n}", "function binarySearch(arr, value){\n var middle = Math.floor(arr.length/2)\n var li = 0\n var ri = arr.length-1\n if (arr[0]>value || arr[arr.length-1]<value) {\n return false\n }\n while (arr[middle] != value) {\n if (arr[middle] < value) {\n li = middle\n middle = Math.floor(((ri-li)/2)+li)\n }\n if (arr[middle] > value) {\n ri = middle\n middle = Math.floor(((ri-li)/2)+li)\n }\n }\n return true\n}", "function binarySearch(arr, item, start, end) {\n //IF ARRAY IS EMPTY, INSERT ITEM AT INDEX ZERO\n if(arr.length == 0) {\n return 0;\n }\n //IF NEW ITEM IS SMALLLER THAN ALL EXIXTING ELEMENTS THEN INSERT AT INDEX ZERO\n if (item <= arr[start]) { \n return start; \n }\n //IF NEW ITEM IS GREATER THAN ALL EXIXTING ELEMENTS THEN INSERT AT INDEX LAST\n if (arr[end] < item) { \n return end + 1;\n }\n //IF THERE IS ONLY TWO ELEMENT IN ARRAY\n if(end - start == 1){\n return end;\n }\n \n var index = start + Math.floor((end - start + 1) / 2);\n //BINARY SEARCH FOR INDEX AT LEFT SIDE\n if (item <= arr[index]) {\n return binarySearch(arr, item, start, index);\n }\n //BINARY SEARCH FOR INDEX AT RIGHT SIDE\n if (arr[index] < item) {\n return binarySearch(arr, item, index, end);\n }\n}", "function binarySearch(arr, num){\n //assume sorted array with postive integers and no repeating numbers\n // newArr = arr.slice(0,num+1)\n var newArr = arr.slice();\n let index = 0;\n\n\n if(newArr[0] === num) return 0;\n\n function helper(a){\n let arrHalf = Math.floor(a.length/2)\n\n if(a.length ===1 ){\n index = -1;\n return;\n }\n\n if(a[arrHalf] === num){\n index += arrHalf;\n return;\n }\n if(a[arrHalf+1] === num){\n index += arrHalf+1;\n return;\n }\n if(a[arrHalf] > num){\n a = a.slice(0, arrHalf);\n }\n\n if(a[arrHalf] < num){\n index += arrHalf;\n a = a.slice(arrHalf);\n }\n\n helper(a)\n }\n helper(newArr)\n return index\n}", "function indexOf(arr, searchItem) {\n // code here\n}", "function indexOf(arr, searchItem) {\n // code here\n}", "function binarySearch(arr, value) {\n var left = 0;\n var right = arr.length - 1;\n var middle = Math.floor((left + right) / 2);\n\n while (arr[middle] !== value && left <= right) {\n if (value < arr[middle]) right = middle - 1;\n else left = middle + 1;\n middle = Math.floor((left + right) / 2);\n }\n return arr[middle] === value ? middle : -1;\n}", "function binarySearch(arr, elem){\n let start = 0;\n let end = (arr.length - 1); \n let middle = Math.floor((start + end) / 2);\n while (start <= end) {\n if (arr[middle] > elem){\n end = middle - 1\n } else if (arr[middle] < elem) {\n start = middle + 1\n } else {\n return middle\n }\n middle = Math.floor((start + end) / 2);\n }\n return -1\n}", "function binarySearch(arr, target, i, j) {\n let s = i, e = j;\n while (s <= e) {\n const mid = Math.floor((s + e) / 2);\n if (arr[mid] === target) return mid;\n else if (arr[mid] < target) s = mid + 1;\n else e = mid - 1;\n }\n return -1;\n}", "function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n } else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n } // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n\n\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n } else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n } // we are in termination case (3) or (2) and return the appropriate thing.\n\n\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}", "function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n } else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n } // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n\n\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n } else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n } // we are in termination case (3) or (2) and return the appropriate thing.\n\n\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}", "function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n } else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n } // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n\n\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n } else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n } // we are in termination case (3) or (2) and return the appropriate thing.\n\n\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}", "function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n } else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n } // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n\n\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n } else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n } // we are in termination case (3) or (2) and return the appropriate thing.\n\n\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}", "function search(arr, v) {\n// decide which half is the number located in\n let pos = Math.ceil(arr.length / 2);\n let finalPos = pos;\n\n \n while(arr.length > 1) {\n if (arr[pos] === v) return finalPos;\n console.log(pos)\n if (arr[pos] <= v ) {\n arr = arr.slice(pos) \n pos = Math.ceil(arr.length / 2);\n finalPos = pos + finalPos\n } else {\n arr = arr.slice(0, pos)\n pos = Math.ceil(arr.length / 2);\n finalPos = finalPos - pos\n \n \n }\n\n }\n return -1;\n}", "function binarySearch(arr, numToSearch) {\n let min = 0;\n let max = arr.length - 1;\n\n while (min <= max) {\n // everytime keep middle element updated\n let middle = Math.floor((min + max) / 2);\n let currentElement = arr[middle];\n\n if (currentElement < numToSearch) {\n min = middle + 1;\n } else if (currentElement > numToSearch) {\n max = middle - 1;\n } else {\n // When we finally found the search element in the array :)\n return middle;\n }\n }\n return -1;\n}", "function search(arr, numToSearch) {\n for (let i = 0; i < arr.length; i++) {\n // O(n)\n if (arr[i] === numToSearch) {\n return i;\n }\n }\n return -1;\n}", "function binarySearch(arr, val) {\n var start = 0;\n var end = arr.length-1;\n while (start <= end) {\n var mid = Math.floor((start + end)/2);\n if (arr[mid] === val) {\n return mid;\n }\n else if (arr[mid] > val) {\n end = mid - 1;\n }\n else if (arr[mid] < val) {\n start = mid + 1;\n }\n }\n return -1;\n}", "function binarySearch(array,num){\n\tvar list=array\n\twhile(list.length>1){\n\t\t//console.log(list[Math.floor(list.length/2)])\n\t\tif(list[Math.floor(list.length/2)]==num){\n\t\t\treturn true;\n\t\t}\n\t\telse if(list[Math.floor(list.length/2)]<num){\n\t\t\tlist=list.slice(Math.floor(list.length/2),list.length)\t\t\t\n\t\t}\n\t\telse{\n\t\t\tlist=list.slice(0,Math.floor(list.length/2))\n\t\t}\n\t}\n\tif(list[0]==num){\n\t\treturn true;\n\t}\n\treturn false\n}", "function binarySearch(array, value, start, end) {\n //if start & end are omitted => function uses start & end of array by default \n var start = start === undefined ? 0 : start;\n var end = end === undefined ? array.length : end;\n\n //if array if start index is > than end index = value hasn't been found (because they're in sorted order)\n if (start > end) {\n return -1;\n }\n\n //pick an index in the middle of start & end indixies & check the item at that index \n const index = Math.floor((start + end) / 2);\n const item = array[index];\n\n //if item is = to the value then you have found the correct index\n console.log(start, end);\n if (item == value) {\n return index;\n }\n //Otherwise, recursively search in either left or right hald of sorted array\n //depending on whether the item was < or > than the value \n else if (item < value) {\n return binarySearch(array, value, index + 1, end);\n }\n else if (item > value) {\n return binarySearch(array, value, start, index - 1);\n }\n}", "function doBetterLinearSearch(array, arraySize, searchedElement) {\n var defaultAnswer = \"NOT_FOUND\";\n for (var i = 0; i < arraySize; i++) {\n array[i] = Math.floor((Math.random() * 100) + 1); /* 10 random numbers from 1 to 100*/\n console.log(array[i]);\n if (array[i] === searchedElement) break;\n }\n i < arraySize ? console.log(\"Index of searched element is \" + (i+1)) : console.log(\"Index of searched element is \" + defaultAnswer);\n}", "function binarySearch(array, key) {\n var low = 0;\n var high = array.length - 1;\n var mid;\n var element;\n\n while(low <= high) {\n mid = Math.floor((low + high) / 2, 10);\n element = array[mid];\n if (element < key) {\n high = mid - 1;\n }else if (element > key){\n high = mid - 1;\n }else{\n return mid;\n }\n }\n return - 1;\n}", "function binarySearch_2(arr, elem) {\n let start = 0;\n let end = arr.length - 1;\n let middle = Math.floor((start + end) / 2);\n\n while (arr[middle] !== elem && start <= end) {\n if (elem < arr[middle]) {\n end = middle - 1;\n } else {\n start = middle + 1;\n }\n\n middle = Math.floor((start + end) / 2);\n }\n\n if (arr[middle] === elem) {\n return middle;\n }\n\n return -1;\n}", "function binarySearch2(arry, n) {\n start = 0;\n end = arry.length - 1;\n middle = Math.floor(start + end / 2);\n while (arry[middle] !== n && middle < end && middle > start) {\n if (n > arry[middle]) start = middle + 1;\n else end = middle - 1;\n\n middle = Math.floor((start + end) / 2);\n }\n return arry[middle] === n ? middle : -1;\n}", "function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n } else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n } else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}", "function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n } else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n } else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}", "function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n } else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n } else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}", "function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n } else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n } else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}", "function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n } else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n } else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}", "function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n } else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n } else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}", "function linear_search(arr, n){\n for(var elem of arr){\n if(elem === n){\n return arr.indexOf(elem);\n }\n }\n}", "function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}", "function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}", "function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}", "function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}", "function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}", "function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}", "function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}", "function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}", "function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}", "function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}", "function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}", "function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}", "function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}", "function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}", "function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}", "function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}", "function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}", "function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}", "function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}", "function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}", "function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}", "function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}", "function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}", "function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}", "function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}", "function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}" ]
[ "0.7691193", "0.76159966", "0.74805665", "0.746844", "0.746709", "0.7350664", "0.73291844", "0.7279991", "0.7263582", "0.7149281", "0.71429867", "0.71399575", "0.7089549", "0.7084962", "0.7023133", "0.70065725", "0.6953944", "0.69396734", "0.6908604", "0.6898395", "0.6897295", "0.6896087", "0.6840875", "0.6828145", "0.6820562", "0.6817759", "0.68167603", "0.6812762", "0.6809948", "0.6803212", "0.67997766", "0.67796916", "0.6778313", "0.6759058", "0.6720535", "0.6715887", "0.6690163", "0.6684157", "0.66837996", "0.66808087", "0.6677533", "0.6663648", "0.6656493", "0.66462165", "0.66441274", "0.66428894", "0.66372526", "0.66365004", "0.66294616", "0.66240776", "0.66240776", "0.66191435", "0.6615556", "0.6611174", "0.6610789", "0.6610789", "0.6610789", "0.6610789", "0.66077316", "0.660388", "0.66027796", "0.66008335", "0.6600198", "0.6599511", "0.65891683", "0.6581555", "0.6575212", "0.65695846", "0.6568958", "0.6568958", "0.6568958", "0.6568958", "0.6568958", "0.6568958", "0.65638536", "0.65609", "0.65609", "0.65609", "0.65609", "0.65609", "0.65609", "0.65609", "0.65609", "0.65609", "0.65609", "0.65609", "0.65609", "0.65609", "0.65609", "0.65609", "0.65609", "0.65609", "0.65609", "0.65609", "0.65609", "0.65609", "0.65609", "0.65609", "0.65609", "0.65609", "0.65609" ]
0.0
-1
helper function to create screen icons that aren't too bland
function createScreenIcon( color1, color2, gradientType ) { let colorGradient; if ( gradientType === 'radial' ) { colorGradient = new RadialGradient( Screen.MINIMUM_HOME_SCREEN_ICON_SIZE.width / 2, Screen.MINIMUM_HOME_SCREEN_ICON_SIZE.height / 2, 0, Screen.MINIMUM_HOME_SCREEN_ICON_SIZE.width / 2, Screen.MINIMUM_HOME_SCREEN_ICON_SIZE.height / 2, Screen.MINIMUM_HOME_SCREEN_ICON_SIZE.width * 0.67 ).addColorStop( 0, color1 ).addColorStop( 1, color2 ); } else { colorGradient = new LinearGradient( 0, 0, Screen.MINIMUM_HOME_SCREEN_ICON_SIZE.width, 0 ) .addColorStop( 0, color1 ) .addColorStop( 1, color2 ); } return new Rectangle( 0, 0, Screen.MINIMUM_HOME_SCREEN_ICON_SIZE.width, Screen.MINIMUM_HOME_SCREEN_ICON_SIZE.height, { fill: colorGradient } ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function icons() {\r\n var arr = [], style = 'style=\"width:18px\"';\r\n if (iconMapper.map(link)) add(iconMapper.map(link));\r\n if (iconMapper.map(obj.Type)) add(iconMapper.map(obj.Type));\r\n if (reg !== 'Message' && iconMapper.map(reg)) add(iconMapper.map(reg));\r\n if (detail.contains('email')) add(iconMapper.map('email'));\r\n if (detail.contains('SMS')) add(iconMapper.map('sms'));\r\n\r\n //make sure there is exactly 2 icons\r\n arr.first(2);\r\n while (arr.length < 2) {\r\n arr.push('icon-blank');\r\n }\r\n\r\n if (arr.length) {\r\n return '<i ' + style + ' class=\"' + arr.join(' icon-large muted disp-ib\"></i> <i ' + style + ' class=\"') + ' icon-large muted disp-ib\"></i> ';\r\n } else {\r\n return '';\r\n }\r\n function add(i) {\r\n if (!arr.contains(i)) arr.push(i);\r\n }\r\n }", "generateIcons() {\n const terminalBase = Core.atlas.find(this.name);\n const terminalDisplay = Core.atlas.find(this.name + \"-display-icon\");\n return [terminalBase, terminalDisplay];\n }", "deriveIcon(announcementLevel) {\n let iconName = \"\";\n if (announcementLevel.indexOf(\"Low\") > -1) { iconName = \"ms-Icon--star\"; }\n else if (announcementLevel.indexOf(\"Medium\") > -1) { iconName = \"ms-Icon--infoCircle\"; }\n else if (announcementLevel.indexOf(\"High\") > -1) { iconName = \"ms-Icon--alert\"; }\n return \"<i class=\\\"ms-Icon \" + iconName + \"\\\" aria-hidden=\\\"true\\\"></i>\";\n }", "function createCreateIcon() { return $('<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\"><path d=\"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z\"></path></svg>'); }", "createInventoryShortcutIcon() {\r\n if (!this.inventoryShortcutIcon) {\r\n this.inventoryShortcutIcon = this.add.image(\r\n this.settingsIcon.x - 70,\r\n this.settingsIcon.y + 15,\r\n this.inventoryShortcutSprite\r\n );\r\n this.inventoryShortcutIcon.setDisplaySize(30, 30);\r\n }\r\n }", "function makeIcons(app) {\n if (HIDDEN_ROLES.indexOf(app.manifest.role) !== -1) {\n return;\n }\n\n if (app.manifest.entry_points) {\n for (var i in app.manifest.entry_points) {\n icons.push(new Icon(app, i));\n }\n } else {\n icons.push(new Icon(app));\n }\n }", "getIcons(content) {\n switch (content) {\n case \"Logout\":\n return (\n <>\n <FiLogOut size=\"0.9rem\" />\n </>\n );\n case \"Login\":\n return (\n <>\n <FiLogIn size=\"0.9rem\" />\n </>\n );\n case \"Profile\":\n return (\n <>\n <FiUserPlus size=\"0.9rem\" />\n </>\n );\n case \"Help\":\n return (\n <>\n <FiShoppingCart size=\"0.9rem\" />\n </>\n );\n case \"Home\":\n return (\n <>\n <FiUser size=\"0.9rem\" />\n </>\n );\n case \"About\":\n return (\n <>\n <FiClipboard size=\"0.9rem\" />\n </>\n );\n case \"Contact\":\n return (\n <>\n <BsGift size=\"0.9rem\" />\n </>\n );\n case \"Staff Manager\":\n return (\n <>\n <GrUserSettings size=\"0.9rem\" />\n </>\n );\n default:\n return <></>;\n }\n }", "getIcon(code) {\n let prefix = 'wi wi-';\n let icon = code\n\n let now = new Date()\n let sunrise = new Date(this.sunrise * 1000)\n let sunset = new Date(this.sunset * 1000)\n\n let tod = \"night-\"\n //determine if it is day or night\n if (now >= sunrise && now <= sunset) {\n tod = \"day-\"\n }\n //ids between 700-799 and 900-999 do not have day prefixes\n if (!(code > 699 && code < 800) && !(code > 899)) {\n icon = tod + icon\n }\n\n //add prefix\n icon = prefix + \"owm-\" + icon\n\n return icon\n }", "function getHeirloomIcon(heirloom) {\n\tif (typeof heirloom.name === 'undefined') return \"<span class='icomoon icon-sad3'></span>\";\n\tif (heirloom.rarity == 6) {\n\tvar icon = (heirloom.type == \"Shield\") ? 'id=\"Shield\"><img style=\"max-height: 100%;\" src=\"https://s21.postimg.org/4imgb9nqv/Transparent_Armor_6.png\"' : 'id=\"Staff\"><img style=\"max-height: 100%;\" src=\"https://s16.postimg.org/a1m5f2gqd/Transparent_Legs_6.png\"';\n\t}\n\tif (heirloom.rarity == 5) {\n\tvar icon = (heirloom.type == \"Shield\") ? 'id=\"Shield\"><img style=\"max-height: 100%;\" src=\"https://s21.postimg.org/m7anwg63b/Transparent_Armor_5.png\"' : 'id=\"Staff\"><img style=\"max-height: 100%;\" src=\"https://s12.postimg.org/96714wb5p/Transparent_Legs_5.png\"';\n\t}\n\tif (heirloom.rarity == 4) {\n\tvar icon = (heirloom.type == \"Shield\") ? 'id=\"Shield\"><img style=\"max-height: 100%;\" src=\"https://s9.postimg.org/p3lns1qjj/Transparent_Armor_4.png\"' : 'id=\"Staff\"><img style=\"max-height: 100%;\" src=\"https://s12.postimg.org/f6ply8bwd/Transparent_Legs_4.png\"';\n\t}\n\tif (heirloom.rarity == 3) {\n\tvar icon = (heirloom.type == \"Shield\") ? 'id=\"Shield\"><img style=\"max-height: 100%;\" src=\"https://s10.postimg.org/c2pquh94p/Transparent_Armor_3.png\"' : 'id=\"Staff\"><img style=\"max-height: 100%;\" src=\"https://s11.postimg.org/roo3t7v7n/Transparent_Legs_3.png\"';\n\t}\n\tif (heirloom.rarity == 2) {\n\tvar icon = (heirloom.type == \"Shield\") ? 'id=\"Shield\"><img style=\"max-height: 100%;\" src=\"https://s18.postimg.org/jprvnxg15/Transparent_Armor_2.png\"' : 'id=\"Staff\"><img style=\"max-height: 100%;\" src=\"https://s16.postimg.org/fupq997qd/Transparent_Legs_2.png\"';\n\t}\n\tif (heirloom.rarity == 1) {\n\tvar icon = (heirloom.type == \"Shield\") ? 'id=\"Shield\"><img style=\"max-height: 100%;\" src=\"https://s21.postimg.org/iouuqjc8n/Transparent_Armor_1.png\"' : 'id=\"Staff\"><img style=\"max-height: 100%;\" src=\"https://s10.postimg.org/nxsok6djt/Transparent_Legs_1.png\"';\n\t}\n\tif (heirloom.rarity == 0) {\n\tvar icon = (heirloom.type == \"Shield\") ? 'id=\"Shield\"><img style=\"max-height: 100%;\" src=\"https://s14.postimg.org/dcw0kj0ep/Transparent_Armor_0.png\"' : 'id=\"Staff\"><img style=\"max-height: 100%;\" src=\"https://s18.postimg.org/lh7kxanbd/Transparent_Legs_0.png\"';\n\t}\n\treturn icon;\n}", "function getIcon(style) {\n switch (style) {\n case \"#icon-1753-0288D1\":\n return \"img/green-atm.png\";\n case \"baby\":\n return \"img/ed-baby.png\";\n case \"#icon-1753-0288D1\":\n return \"img/green-atm.png\";\n case \"barbell\":\n return \"img/blue-barbell.png\";\n case \"#icon-1519-0288D1\":\n return \"img/blue-sports.png\";\n case \"bed\":\n return \"img/red-bed.png\";\n case \"#icon-1522-0288D1\":\n return \"img/purple-bike.png\";\n case \"bike\":\n return \"img/blue-bike.png\";\n case \"#icon-1664-0288d1\":\n return \"img/lightpurple-book.png\";\n case \"#icon-1899-DB4436\":\n return \"img/red-book.png\";\n case \"#icon-1546-DB4436\":\n return \"img/red-buildings.png\";\n // case \"clipboard\":\n // return \"img/clipboard.png\";\n case \"coffee\":\n return \"img/orange-coffee.png\";\n case \"#icon-1820-0288D1\":\n return \"img/green-laptop.png\";\n case \"#icon-1547-0288D1-nodesc\":\n return \"img/purple-downtown.png\";\n case \"#icon-1577-0288D1\":\n return \"img/orange-fastfood.png\";\n case \"#icon-1577-DB4436\":\n return \"img/orange-food.png\";\n case \"#icon-1548-0288D1\":\n return \"img/purple-pillars.png\";\n case \"#icon-1646-DB4436\":\n return \"img/green-health.png\";\n case \"microscope\":\n return \"img/purple-science.png\";\n //case \"minus\": return \"img/minus.png\";\n case \"#icon-1548-0288D1\":\n return \"img/red-music.png\";\n case \"paint-blue\":\n return \"img/blue-paint.png\";\n case \"#icon-1509-0288D1\":\n return \"img/purple-paint.png\";\n case \"rcmp\":\n return \"img/purple-rcmp.png\";\n case \"running\":\n return \"img/blue-running.png\";\n case \"#icon-1685-0288D1\":\n return \"img/shop-green.png\";\n case \"shop-orange\":\n return \"img/orange-retail.png\";\n case \"#icon-1680-0288D1\":\n return \"img/blue-sports.png\";\n case \"#icon-1701-0288D1\":\n return \"img/blue-swim.png\";\n case \"tennis\":\n return \"img/blue-tennis.png\";\n case \"#icon-1709-0288D1\":\n return \"img/blue-threatre.png\";\n case \"ticket\":\n return \"img/purple-ticket.png\";\n case \"#icon-1886-0288D1\":\n return \"img/blue-tree.png\";\n case \"#icon-1890-0288D1\":\n return \"img/blue-volley.png\";\n default:\n return \"img/blue-dot.png\";\n }\n}", "_createIconHtml(iconName) {\n return `<i class=\"material-icons\">${iconName}</i>`;\n }", "function setDesktopIcons(){\t}", "function renderIconHtml(depth) {\n var html = '';\n for (var i = 0; i < depth; i++) {\n html += '<span class=\"fc-icon\"></span>';\n }\n html +=\n '<span class=\"fc-expander-space\">' +\n '<span class=\"fc-icon\"></span>' +\n '</span>';\n return html;\n}", "getIcon_() {\n return this.isCloudGamingDevice_ ? 'oobe-32:game-controller' :\n 'oobe-32:checkmark';\n }", "function createIcon(iconType, nameIcon){\n if(iconType == 1){\n return ' <i class=\"material-icons prefix\">'+nameIcon+'</i>\\n';\n }else{\n return ' <i class=\"'+nameIcon+' prefix\"></i>\\n';\n }\n}", "function renderIconHtml(depth) {\n var html = '';\n for (var i = 0; i < depth; i++) {\n html += '<span class=\"fc-icon\"></span>';\n }\n html +=\n '<span class=\"fc-expander-space\">' +\n '<span class=\"fc-icon\"></span>' +\n '</span>';\n return html;\n }", "function getIcon(type) {\r\n const all_weather = \"<span title='All Weather' class='fa fa-cloud'></span>\";\r\n const tent = \"<span title='Tent' class='glyphicon glyphicon-tent'></span>\";\r\n const caravan = \"<span title='Caravan' class='fas fa-car'></span>\";\r\n const motorhome = \"<span title='Motorhome' class='fas fa-truck'></span>\";\r\n const electrical = \"<span title='Electrical Outlet' class='fas fa-bolt'></span>\";\r\n\r\n switch (type) {\r\n case \"tent\":\r\n return tent;\r\n case \"caravan\":\r\n return caravan + \" \" + all_weather;\r\n case \"motorhome\":\r\n return motorhome + \" \" + all_weather + electrical;\r\n case \"all\":\r\n return tent + \" \" + caravan + \" \" + motorhome + \" \" + electrical;\r\n case \"all-manage\":\r\n return \"<div class='row'>\" + tent + \" \" + caravan + \"</div><div class='row'>\" + motorhome + \" \" + electrical + \"</div>\";\r\n default:\r\n return \"N/A\";\r\n }\r\n}", "function fullIcon(data) {\n return { ...exports.iconDefaults, ...data };\n}", "function mapper_page_paint_icons() {\n\n if( glyph_url != null ) return;\n\n if(true) { \n glyph_post = \"/dynamapper/icons/weather-clear.png\";\n var feature = {};\n feature[\"kind\"] = \"icon\";\n feature[\"image\"] = glyph_post;\n feature[\"iconSize\"] = [ 32, 32 ];\n feature[\"iconAnchor\"] = [ 9, 34 ];\n feature[\"iconWindowAnchor\"] = [ 9, 2 ];\n mapper_inject_feature(feature);\n }\n\n if(true) {\n glyph_person = \"/dynamapper/icons/emblem-favorite.png\";\n var feature = {};\n feature[\"kind\"] = \"icon\";\n feature[\"image\"] = glyph_person;\n feature[\"iconSize\"] = [ 32, 32 ];\n feature[\"iconAnchor\"] = [ 9, 34 ];\n feature[\"iconWindowAnchor\"] = [ 9, 2 ];\n mapper_inject_feature(feature);\n }\n\n if(true) {\n glyph_url = \"/dynamapper/icons/emblem-important.png\";\n var feature = {};\n feature[\"kind\"] = \"icon\";\n feature[\"image\"] = glyph_url;\n feature[\"iconSize\"] = [ 32, 32 ];\n feature[\"iconAnchor\"] = [ 9, 34 ];\n feature[\"iconWindowAnchor\"] = [ 9, 2 ];\n mapper_inject_feature(feature);\n }\n}", "renderIcon(icon) {\n if (icon) {\n const { positions } = this.props\n\n const sliceIconTextOptions = {\n ...Config.menu.sliceIconText,\n x: positions.IconX,\n y: positions.IconY\n }\n\n return (\n <MenuSliceIconText {...sliceIconTextOptions}>\n {Config.FONT_AWESOME[icon]}\n </MenuSliceIconText>\n )\n }\n\n return null\n }", "function makeIcon(type, title) {\n return { type, title, width: 20 };\n}", "function bigIcon(icons) {\n if (!icons) {\n return '';\n }\n\n var lastIcon = 0;\n for (var i in icons) {\n if (i > lastIcon) {\n lastIcon = i;\n }\n }\n return icons[lastIcon];\n }", "getDragIcon (items) {\n let icon = new Image();\n let canvas = document.createElement('canvas');\n let imgPanel = canvas.getContext('2d');\n imgPanel.font = 'normal 12px Arial';\n imgPanel.fillStyle = 'white';\n\n let top = 0;\n for ( let i = 0; i < items.length; ++i ) {\n let item = items[i];\n if ( i <= 4 ) {\n // icon\n // NOTE: the icon may be broken, use naturalWidth detect this\n if (\n item.icon &&\n item.icon.naturalWidth !== undefined &&\n item.icon.naturalWidth !== 0\n ) {\n imgPanel.drawImage(item.icon,0,top,16,16);\n }\n // text\n imgPanel.fillText(item.name,20,top + 15);\n top += 15;\n } else {\n imgPanel.fillStyle = 'gray';\n imgPanel.fillText('[more...]',20,top + 15);\n\n break;\n }\n }\n\n icon.src = canvas.toDataURL();\n return icon;\n }", "function icon(platform){\n\n if(platform==\"CODECHEF\") return \"img/cc32.jpg\";\n else if (platform==\"HACKEREARTH\") return \"img/he32.png\";\n else if (platform==\"CODEFORCES\") return \"img/cf32.png\"; \n else if(platform==\"TOPCODER\") return \"img/tc32.gif\";\n else if(platform==\"HACKERRANK\") return \"img/hr36.png\";\n else if(platform==\"GOOGLE\") return \"img/google32.png\";\n else return \"img/other32.png\";\n}", "function icon(text, name) {\n let span = document.createElement(\"span\")\n span.className = \"menuicon \" + name\n span.title = name\n span.textContent = text\n return span\n}", "function getIcon(abr) {\n switch (abr) {\n case \"BCH\":\n return \"bch.png\";\n case \"ZRX\":\n return \"zrx.png\";\n case \"LTC\":\n return \"ltc.png\";\n case \"ETH\":\n return \"eth.png\";\n case \"ETC\":\n return \"etc.png\";\n case \"BTC\":\n return \"btc.png\";\n case \"USDC\":\n return \"usdc.png\";\n default:\n return \"bat.png\";\n break;\n }\n }", "newIcon() {\n return `${this.iconPrefix}${this.getEquivalentIconOf(this.icon)}`;\n }", "function printIcons(icons, contenitoreIcone) {\r\n icons.forEach((icon)=>{\r\n const {family, prefix, name, color} = icon;\r\n const html =//parte di html\r\n `<div class=\"icon\">\r\n <i class=\"${family} ${prefix}${name}\"\r\n style=\"color: ${color}\"></i>\r\n <div class=\"nomeIcona\">${name}</div>\r\n </div>\r\n `\r\n contenitoreIcone.append(html);\r\n return\r\n });\r\n\r\n\r\n}", "function Icon(n,s,c,callback){\n\texecute(\"gsettings get org.gnome.desktop.interface icon-theme\",function(stdout){\n\t\tif(stdout != \"\"){theme_name=decodeURIComponent(stdout.replace(/[\"']/g, \"\"));IconFinder(theme_name,n,s,c,callback,true);}else{\n\t\t\texecute(\"grep '^gtk-icon-theme-name' $HOME/.gtkrc-2.0 | awk -F'=' '{print $2}'\",function(stdout){\n\t\t\t\tif(stdout != \"\"){theme_name=decodeURIComponent(stdout.replace(/[\"']/g, \"\"));IconFinder(theme_name,n,s,c,callback,true);}\n\t\t\t})\n\t\t}\n\t})\n}", "function getIcon(abr) {\n switch (abr) {\n case \"BCH\":\n return \"bch.png\";\n case \"ZRX\":\n return \"bch.png\";\n case \"LTC\":\n return \"ltc.png\";\n case \"ETH\":\n return \"eth.png\";\n case \"BTC\":\n return \"btc.png\";\n case \"BTC\":\n return \"btc.png\";\n default:\n return \"bat.png\";\n break;\n }\n}", "function iconPrefix(padSize) {\n return \"/docs/iconp/\" + padSize.slice(4);\n}", "function fullIcon(icon) {\n return merge_1.merge(exports.iconDefaults, icon);\n}", "getIcon() {\n return \"document-cook\";\n }", "function createIconPanel(icons) {\n icons.sort(function (x, y) { return x.src < y.src ? -1 : x.src > y.src ? 1 : 0; });\n\n if (icons && icons.length) {\n var html = [\"<div class='icon-panel'>\"];\n var htIcons = {};\n for (var i = 0; i < icons.length; i++) {\n htIcons[icons[i].src] = true;\n }\n for (var s in htIcons) {\n html.push(\"<img src='\" + s + \"' />\");\n }\n html.push(\"</div>\");\n return html.join(\"\");\n }\n return \"\";\n }", "_createAppearanceTabIcons() {\n\n // We have to add these events to the Gtk.DrawingAreas to make them actually\n // clickable. Else it would not be possible to select the tabs.\n const tabEvents = Gdk.EventMask.BUTTON_PRESS_MASK | Gdk.EventMask.BUTTON_RELEASE_MASK;\n\n // Draw six lines representing the wedge separators.\n let tabIcon = this._builder.get_object('wedges-tab-icon');\n tabIcon.add_events(tabEvents);\n tabIcon.connect('draw', (widget, ctx) => {\n const size = Math.min(widget.get_allocated_width(), widget.get_allocated_height());\n const color = widget.get_style_context().get_color(Gtk.StateFlags.NORMAL);\n\n ctx.translate(size / 2, size / 2);\n ctx.rotate(2 * Math.PI / 12);\n\n for (let i = 0; i < 6; i++) {\n ctx.moveTo(size / 5, 0);\n ctx.lineTo(size / 2, 0);\n ctx.rotate(2 * Math.PI / 6);\n }\n\n ctx.setSourceRGBA(color.red, color.green, color.blue, color.alpha);\n ctx.setLineWidth(2);\n ctx.stroke();\n\n return false;\n });\n\n // Draw on circle representing the center item.\n tabIcon = this._builder.get_object('center-tab-icon');\n tabIcon.add_events(tabEvents);\n tabIcon.connect('draw', (widget, ctx) => {\n const size = Math.min(widget.get_allocated_width(), widget.get_allocated_height());\n const color = widget.get_style_context().get_color(Gtk.StateFlags.NORMAL);\n\n ctx.translate(size / 2, size / 2);\n ctx.setSourceRGBA(color.red, color.green, color.blue, color.alpha);\n ctx.arc(0, 0, size / 4, 0, 2 * Math.PI);\n ctx.fill();\n\n return false;\n });\n\n // Draw six circles representing child items.\n tabIcon = this._builder.get_object('children-tab-icon');\n tabIcon.add_events(tabEvents);\n tabIcon.connect('draw', (widget, ctx) => {\n const size = Math.min(widget.get_allocated_width(), widget.get_allocated_height());\n const color = widget.get_style_context().get_color(Gtk.StateFlags.NORMAL);\n\n ctx.translate(size / 2, size / 2);\n ctx.setSourceRGBA(color.red, color.green, color.blue, color.alpha);\n\n for (let i = 0; i < 6; i++) {\n ctx.rotate(2 * Math.PI / 6);\n ctx.arc(size / 3, 0, size / 10, 0, 2 * Math.PI);\n ctx.fill();\n }\n\n return false;\n });\n\n // Draw six groups of five grandchildren each. The grandchild at the back-navigation\n // position is skipped.\n tabIcon = this._builder.get_object('grandchildren-tab-icon');\n tabIcon.add_events(tabEvents);\n tabIcon.connect('draw', (widget, ctx) => {\n const size = Math.min(widget.get_allocated_width(), widget.get_allocated_height());\n const color = widget.get_style_context().get_color(Gtk.StateFlags.NORMAL);\n\n ctx.translate(size / 2, size / 2);\n ctx.setSourceRGBA(color.red, color.green, color.blue, color.alpha);\n\n for (let i = 0; i < 6; i++) {\n ctx.rotate(2 * Math.PI / 6);\n\n ctx.save()\n ctx.translate(size / 3, 0);\n ctx.rotate(Math.PI);\n\n for (let j = 0; j < 5; j++) {\n ctx.rotate(2 * Math.PI / 6);\n ctx.arc(size / 10, 0, size / 20, 0, 2 * Math.PI);\n ctx.fill();\n }\n\n ctx.restore();\n }\n\n return false;\n });\n\n // Draw a line and some circles representing a trace.\n tabIcon = this._builder.get_object('trace-tab-icon');\n tabIcon.add_events(tabEvents);\n tabIcon.connect('draw', (widget, ctx) => {\n const size = Math.min(widget.get_allocated_width(), widget.get_allocated_height());\n const color = widget.get_style_context().get_color(Gtk.StateFlags.NORMAL);\n\n ctx.setSourceRGBA(color.red, color.green, color.blue, color.alpha);\n\n ctx.moveTo(0.2 * size, 0.2 * size);\n ctx.lineTo(0.4 * size, 0.6 * size);\n ctx.lineTo(0.9 * size, 0.7 * size);\n\n ctx.setLineWidth(2);\n ctx.stroke();\n\n ctx.arc(0.2 * size, 0.2 * size, 0.15 * size, 0, 2 * Math.PI);\n ctx.fill();\n\n ctx.arc(0.4 * size, 0.6 * size, 0.1 * size, 0, 2 * Math.PI);\n ctx.fill();\n\n ctx.arc(0.9 * size, 0.7 * size, 0.1 * size, 0, 2 * Math.PI);\n ctx.fill();\n\n return false;\n });\n\n // Draw three dots indicating the advanced settings.\n tabIcon = this._builder.get_object('advanced-tab-icon');\n tabIcon.add_events(tabEvents);\n tabIcon.connect('draw', (widget, ctx) => {\n const size = Math.min(widget.get_allocated_width(), widget.get_allocated_height());\n const color = widget.get_style_context().get_color(Gtk.StateFlags.NORMAL);\n\n ctx.setSourceRGBA(color.red, color.green, color.blue, color.alpha);\n\n ctx.arc(0.15 * size, 0.5 * size, 0.1 * size, 0, 2 * Math.PI);\n ctx.fill();\n\n ctx.arc(0.5 * size, 0.5 * size, 0.1 * size, 0, 2 * Math.PI);\n ctx.fill();\n\n ctx.arc(0.85 * size, 0.5 * size, 0.1 * size, 0, 2 * Math.PI);\n ctx.fill();\n\n return false;\n });\n }", "createIconClass(data) {\n const name = 'jp-Dialog-buttonIcon';\n const extra = data.iconClass;\n return extra ? `${name} ${extra}` : name;\n }", "function getIcon(id) {\n var today = new Date();\n var h = today.getHours();\n if (id.toString()[0] === '2') {\n //return '11d.png';\n return '<i class=\"wi wi-thunderstorm\"></i>';\n }\n if (id.toString()[0] === '3') {\n //return '09d.png';\n return '<i class=\"wi wi-sprinkle\"></i>';\n }\n if (id === 500 || id === 501 || id === 502 || id === 503 || id === 504) {\n if (h > 6 && h < 18) {\n //return '10d.png';\n return '<i class=\"wi wi-day-rain\"></i>';\n } else {\n //return '10n.png';\n return '<i class=\"wi wi-night-alt-rain\"></i>';\n }\n }\n if (id === 511) {\n //return '13d.png';\n return '<i class=\"wi wi-rain-mix\"></i>';\n }\n if (id === 520 || id === 521 || id === 522 || id === 531) {\n //return '09d.png';\n return '<i class=\"wi wi-rain\"></i>';\n }\n if (id.toString()[0] === '6') {\n //return '13d.png';\n return '<i class=\"wi wi-snow\"></i>';\n }\n if (id.toString()[0] === '7') {\n //return '50d.png';\n return '<i class=\"wi wi-windy\"></i>';\n }\n if (id === 800) {\n if (h > 6 && h < 18) {\n //return '01d.png';\n return '<i class=\"wi wi-day-sunny\"></i>';\n } else {\n //return '01n.png';\n return '<i class=\"wi wi-night-clear\"></i>';\n }\n }\n if (id === 801) {\n if (h > 6 && h < 18) {\n //return '02d.png';\n return '<i class=\"wi wi-day-cloudy\"></i>';\n } else {\n //return '02n.png';\n return '<i class=\"wi wi-night-alt-cloudy\"></i>';\n }\n }\n if (id === 802) {\n //return '03d.png';\n return '<i class=\"wi wi-cloudy\"></i>';\n }\n if (id === 803 || id === 804) {\n //return '04d.png';\n return '<i class=\"wi wi-cloudy\"></i>';\n }\n\n } //getIcon", "function createIcon(name, options) {\n options = options || {};\n var el = document.createElement('a');\n\n var shortcut = options.shortcut || shortcuts[name];\n if (shortcut) {\n shortcut = fixShortcut(shortcut);\n el.title = shortcut;\n el.title = el.title.replace('Cmd', '⌘');\n if (isMac) {\n el.title = el.title.replace('Alt', '⌥');\n }\n }\n\n el.className = options.className || 'eicon-' + name;\n return el;\n}", "function showToolbarIcon(tabId, iconName) {\n // Change toolbar icon to new icon\n var smallIconPath, bigIconPath\n\n if(isEdge()){\n\n smallIconPath = 'app/images/' + iconName + '-20.png'\n bigIconPath = 'app/images/' + iconName + '-40.png'\n chrome.browserAction.setIcon({\n tabId: tabId,\n path: {\n '20': smallIconPath,\n '40': bigIconPath\n }\n })\n\n }else{\n smallIconPath = 'app/images/' + iconName + '-19.png'\n bigIconPath = 'app/images/' + iconName + '-38.png'\n chrome.browserAction.setIcon({\n tabId: tabId,\n path: {\n '19': smallIconPath,\n '38': bigIconPath\n }\n })\n\n }\n\n }", "function createIcon(options, enableTooltips) {\n\toptions = options || {};\n\tvar el = document.createElement(\"a\");\n\tenableTooltips = (enableTooltips == undefined) ? true : enableTooltips;\n\n\tif(options.title && enableTooltips) {\n\t\tel.title = options.title;\n\n\t\tif(isMac) {\n\t\t\tel.title = el.title.replace(\"Ctrl\", \"⌘\");\n\t\t\tel.title = el.title.replace(\"Alt\", \"⌥\");\n\t\t}\n\t}\n\n\tel.className = options.className;\n\treturn el;\n}", "function create_icon(classes, title) {\n\treturn $(\"<i/>\")\n\t\t.addClass(classes)\n\t\t.attr(\"title\", title)\n\t\t.attr(\"aria-hidden\", \"true\")\n\t\t.add($(\"<span/>\")\n\t\t\t.addClass(\"sr-only\")\n\t\t\t.text(\"(\" + title + \")\"));\n}", "function setIcons(options) {\n let icon = `<i class='fas fa-${options.icon_name} fa-fw'></i>`;\n if (options.quantity) {\n icon = icon.repeat(options.quantity);\n }\n return icon;\n}", "function initializeIcons(baseUrl, options) {\n if (baseUrl === void 0) { baseUrl = ''; }\n var subset = {\n style: {\n MozOsxFontSmoothing: 'grayscale',\n WebkitFontSmoothing: 'antialiased',\n fontStyle: 'normal',\n fontWeight: 'normal',\n speak: 'none'\n },\n fontFace: {\n fontFamily: \"\\\"FabricMDL2Icons-7\\\"\",\n src: \"url('\" + baseUrl + \"fabric-icons-7-2b97bb99.woff') format('woff')\"\n },\n icons: {\n 'SingleBookmark': '\\uEDFF',\n 'SingleBookmarkSolid': '\\uEE00',\n 'DoubleChevronDown': '\\uEE04',\n 'FollowUser': '\\uEE05',\n 'ReplyAll': '\\uEE0A',\n 'WorkforceManagement': '\\uEE0F',\n 'RecruitmentManagement': '\\uEE12',\n 'Questionnaire': '\\uEE19',\n 'ManagerSelfService': '\\uEE23',\n 'ProductionFloorManagement': '\\uEE29',\n 'ProductRelease': '\\uEE2E',\n 'ProductVariant': '\\uEE30',\n 'ReplyMirrored': '\\uEE35',\n 'ReplyAllMirrored': '\\uEE36',\n 'Medal': '\\uEE38',\n 'AddGroup': '\\uEE3D',\n 'QuestionnaireMirrored': '\\uEE4B',\n 'CloudImportExport': '\\uEE55',\n 'TemporaryUser': '\\uEE58',\n 'CaretSolid16': '\\uEE62',\n 'GroupedDescending': '\\uEE66',\n 'GroupedAscending': '\\uEE67',\n 'AwayStatus': '\\uEE6A',\n 'MyMoviesTV': '\\uEE6C',\n 'GenericScan': '\\uEE6F',\n 'AustralianRules': '\\uEE70',\n 'WifiEthernet': '\\uEE77',\n 'TrackersMirrored': '\\uEE92',\n 'DateTimeMirrored': '\\uEE93',\n 'StopSolid': '\\uEE95',\n 'DoubleChevronUp12': '\\uEE96',\n 'DoubleChevronDown12': '\\uEE97',\n 'DoubleChevronLeft12': '\\uEE98',\n 'DoubleChevronRight12': '\\uEE99',\n 'CalendarAgenda': '\\uEE9A',\n 'ConnectVirtualMachine': '\\uEE9D',\n 'AddEvent': '\\uEEB5',\n 'AssetLibrary': '\\uEEB6',\n 'DataConnectionLibrary': '\\uEEB7',\n 'DocLibrary': '\\uEEB8',\n 'FormLibrary': '\\uEEB9',\n 'FormLibraryMirrored': '\\uEEBA',\n 'ReportLibrary': '\\uEEBB',\n 'ReportLibraryMirrored': '\\uEEBC',\n 'ContactCard': '\\uEEBD',\n 'CustomList': '\\uEEBE',\n 'CustomListMirrored': '\\uEEBF',\n 'IssueTracking': '\\uEEC0',\n 'IssueTrackingMirrored': '\\uEEC1',\n 'PictureLibrary': '\\uEEC2',\n 'OfficeAddinsLogo': '\\uEEC7',\n 'OfflineOneDriveParachute': '\\uEEC8',\n 'OfflineOneDriveParachuteDisabled': '\\uEEC9',\n 'TriangleSolidUp12': '\\uEECC',\n 'TriangleSolidDown12': '\\uEECD',\n 'TriangleSolidLeft12': '\\uEECE',\n 'TriangleSolidRight12': '\\uEECF',\n 'TriangleUp12': '\\uEED0',\n 'TriangleDown12': '\\uEED1',\n 'TriangleLeft12': '\\uEED2',\n 'TriangleRight12': '\\uEED3',\n 'ArrowUpRight8': '\\uEED4',\n 'ArrowDownRight8': '\\uEED5',\n 'DocumentSet': '\\uEED6',\n 'GoToDashboard': '\\uEEED',\n 'DelveAnalytics': '\\uEEEE',\n 'ArrowUpRightMirrored8': '\\uEEEF',\n 'ArrowDownRightMirrored8': '\\uEEF0',\n 'CompanyDirectory': '\\uEF0D',\n 'OpenEnrollment': '\\uEF1C',\n 'CompanyDirectoryMirrored': '\\uEF2B',\n 'OneDriveAdd': '\\uEF32',\n 'ProfileSearch': '\\uEF35',\n 'Header2': '\\uEF36',\n 'Header3': '\\uEF37',\n 'Header4': '\\uEF38',\n 'RingerSolid': '\\uEF3A',\n 'Eyedropper': '\\uEF3C',\n 'MarketDown': '\\uEF42',\n 'CalendarWorkWeek': '\\uEF51',\n 'SidePanel': '\\uEF52',\n 'GlobeFavorite': '\\uEF53',\n 'CaretTopLeftSolid8': '\\uEF54',\n 'CaretTopRightSolid8': '\\uEF55',\n 'ViewAll2': '\\uEF56',\n 'DocumentReply': '\\uEF57',\n 'PlayerSettings': '\\uEF58',\n 'ReceiptForward': '\\uEF59',\n 'ReceiptReply': '\\uEF5A',\n 'ReceiptCheck': '\\uEF5B',\n 'Fax': '\\uEF5C',\n 'RecurringEvent': '\\uEF5D',\n 'ReplyAlt': '\\uEF5E',\n 'ReplyAllAlt': '\\uEF5F',\n 'EditStyle': '\\uEF60',\n 'EditMail': '\\uEF61',\n 'Lifesaver': '\\uEF62',\n 'LifesaverLock': '\\uEF63',\n 'InboxCheck': '\\uEF64',\n 'FolderSearch': '\\uEF65'\n }\n };\n (0,_fluentui_style_utilities__WEBPACK_IMPORTED_MODULE_0__.registerIcons)(subset, options);\n}", "function initializeIcons(baseUrl, options) {\n if (baseUrl === void 0) { baseUrl = ''; }\n var subset = {\n style: {\n MozOsxFontSmoothing: 'grayscale',\n WebkitFontSmoothing: 'antialiased',\n fontStyle: 'normal',\n fontWeight: 'normal',\n speak: 'none'\n },\n fontFace: {\n fontFamily: \"\\\"FabricMDL2Icons-7\\\"\",\n src: \"url('\" + baseUrl + \"fabric-icons-7-2b97bb99.woff') format('woff')\"\n },\n icons: {\n 'SingleBookmark': '\\uEDFF',\n 'SingleBookmarkSolid': '\\uEE00',\n 'DoubleChevronDown': '\\uEE04',\n 'FollowUser': '\\uEE05',\n 'ReplyAll': '\\uEE0A',\n 'WorkforceManagement': '\\uEE0F',\n 'RecruitmentManagement': '\\uEE12',\n 'Questionnaire': '\\uEE19',\n 'ManagerSelfService': '\\uEE23',\n 'ProductionFloorManagement': '\\uEE29',\n 'ProductRelease': '\\uEE2E',\n 'ProductVariant': '\\uEE30',\n 'ReplyMirrored': '\\uEE35',\n 'ReplyAllMirrored': '\\uEE36',\n 'Medal': '\\uEE38',\n 'AddGroup': '\\uEE3D',\n 'QuestionnaireMirrored': '\\uEE4B',\n 'CloudImportExport': '\\uEE55',\n 'TemporaryUser': '\\uEE58',\n 'CaretSolid16': '\\uEE62',\n 'GroupedDescending': '\\uEE66',\n 'GroupedAscending': '\\uEE67',\n 'AwayStatus': '\\uEE6A',\n 'MyMoviesTV': '\\uEE6C',\n 'GenericScan': '\\uEE6F',\n 'AustralianRules': '\\uEE70',\n 'WifiEthernet': '\\uEE77',\n 'TrackersMirrored': '\\uEE92',\n 'DateTimeMirrored': '\\uEE93',\n 'StopSolid': '\\uEE95',\n 'DoubleChevronUp12': '\\uEE96',\n 'DoubleChevronDown12': '\\uEE97',\n 'DoubleChevronLeft12': '\\uEE98',\n 'DoubleChevronRight12': '\\uEE99',\n 'CalendarAgenda': '\\uEE9A',\n 'ConnectVirtualMachine': '\\uEE9D',\n 'AddEvent': '\\uEEB5',\n 'AssetLibrary': '\\uEEB6',\n 'DataConnectionLibrary': '\\uEEB7',\n 'DocLibrary': '\\uEEB8',\n 'FormLibrary': '\\uEEB9',\n 'FormLibraryMirrored': '\\uEEBA',\n 'ReportLibrary': '\\uEEBB',\n 'ReportLibraryMirrored': '\\uEEBC',\n 'ContactCard': '\\uEEBD',\n 'CustomList': '\\uEEBE',\n 'CustomListMirrored': '\\uEEBF',\n 'IssueTracking': '\\uEEC0',\n 'IssueTrackingMirrored': '\\uEEC1',\n 'PictureLibrary': '\\uEEC2',\n 'OfficeAddinsLogo': '\\uEEC7',\n 'OfflineOneDriveParachute': '\\uEEC8',\n 'OfflineOneDriveParachuteDisabled': '\\uEEC9',\n 'TriangleSolidUp12': '\\uEECC',\n 'TriangleSolidDown12': '\\uEECD',\n 'TriangleSolidLeft12': '\\uEECE',\n 'TriangleSolidRight12': '\\uEECF',\n 'TriangleUp12': '\\uEED0',\n 'TriangleDown12': '\\uEED1',\n 'TriangleLeft12': '\\uEED2',\n 'TriangleRight12': '\\uEED3',\n 'ArrowUpRight8': '\\uEED4',\n 'ArrowDownRight8': '\\uEED5',\n 'DocumentSet': '\\uEED6',\n 'GoToDashboard': '\\uEEED',\n 'DelveAnalytics': '\\uEEEE',\n 'ArrowUpRightMirrored8': '\\uEEEF',\n 'ArrowDownRightMirrored8': '\\uEEF0',\n 'CompanyDirectory': '\\uEF0D',\n 'OpenEnrollment': '\\uEF1C',\n 'CompanyDirectoryMirrored': '\\uEF2B',\n 'OneDriveAdd': '\\uEF32',\n 'ProfileSearch': '\\uEF35',\n 'Header2': '\\uEF36',\n 'Header3': '\\uEF37',\n 'Header4': '\\uEF38',\n 'RingerSolid': '\\uEF3A',\n 'Eyedropper': '\\uEF3C',\n 'MarketDown': '\\uEF42',\n 'CalendarWorkWeek': '\\uEF51',\n 'SidePanel': '\\uEF52',\n 'GlobeFavorite': '\\uEF53',\n 'CaretTopLeftSolid8': '\\uEF54',\n 'CaretTopRightSolid8': '\\uEF55',\n 'ViewAll2': '\\uEF56',\n 'DocumentReply': '\\uEF57',\n 'PlayerSettings': '\\uEF58',\n 'ReceiptForward': '\\uEF59',\n 'ReceiptReply': '\\uEF5A',\n 'ReceiptCheck': '\\uEF5B',\n 'Fax': '\\uEF5C',\n 'RecurringEvent': '\\uEF5D',\n 'ReplyAlt': '\\uEF5E',\n 'ReplyAllAlt': '\\uEF5F',\n 'EditStyle': '\\uEF60',\n 'EditMail': '\\uEF61',\n 'Lifesaver': '\\uEF62',\n 'LifesaverLock': '\\uEF63',\n 'InboxCheck': '\\uEF64',\n 'FolderSearch': '\\uEF65'\n }\n };\n (0,_fluentui_style_utilities__WEBPACK_IMPORTED_MODULE_0__.registerIcons)(subset, options);\n}", "function update_icon()\n {\n const icon = bookmarks.is_unlocked() ? \"unlocked-bookmarks.svg\" :\n \"locked-bookmarks.svg\";\n const path = `/icons/main/${icon}`;\n browser.browserAction.setIcon({\n path:\n {\n \"16\": path,\n \"32\": path,\n \"48\": path,\n \"64\": path,\n \"96\": path,\n \"128\": path,\n \"256\": path\n }\n });\n }", "function getPaletteIcon()\n {\n return {\n key: \"svg\",\n val: viewDisplay(`${className}-pal-disp`, 0, 0, 25, 25)\n }\n }", "actionIcons() {\n const componentName = this.breakdownPathComponents()[1];\n return {\n header: \"\",\n key: \"id\",\n render: (id) => <span className=\"icons\" style={{display: this.state.isAdmin ? \"inherit\" : \"none\"}}>\n <Link to={\"/\" + componentName + \"/\" + id}><img className=\"smallicon\" src=\"/assets/images/edit.png\"/></Link>\n <Link to={\"/\" + componentName + \"/\" + id + \"/delete\"}><img className=\"smallicon\" src=\"/assets/images/delete.png\"/></Link>\n </span>\n }\n }", "function initializeIcons(baseUrl, options) {\n if (baseUrl === void 0) { baseUrl = ''; }\n var subset = {\n style: {\n MozOsxFontSmoothing: 'grayscale',\n WebkitFontSmoothing: 'antialiased',\n fontStyle: 'normal',\n fontWeight: 'normal',\n speak: 'none'\n },\n fontFace: {\n fontFamily: \"\\\"FabricMDL2Icons-6\\\"\",\n src: \"url('\" + baseUrl + \"fabric-icons-6-ef6fd590.woff') format('woff')\"\n },\n icons: {\n 'SwayLogoInverse': '\\uED29',\n 'OutOfOffice': '\\uED34',\n 'Trophy': '\\uED3F',\n 'ReopenPages': '\\uED50',\n 'EmojiTabSymbols': '\\uED58',\n 'AADLogo': '\\uED68',\n 'AccessLogo': '\\uED69',\n 'AdminALogoInverse32': '\\uED6A',\n 'AdminCLogoInverse32': '\\uED6B',\n 'AdminDLogoInverse32': '\\uED6C',\n 'AdminELogoInverse32': '\\uED6D',\n 'AdminLLogoInverse32': '\\uED6E',\n 'AdminMLogoInverse32': '\\uED6F',\n 'AdminOLogoInverse32': '\\uED70',\n 'AdminPLogoInverse32': '\\uED71',\n 'AdminSLogoInverse32': '\\uED72',\n 'AdminYLogoInverse32': '\\uED73',\n 'DelveLogoInverse': '\\uED76',\n 'ExchangeLogoInverse': '\\uED78',\n 'LyncLogo': '\\uED79',\n 'OfficeVideoLogoInverse': '\\uED7A',\n 'SocialListeningLogo': '\\uED7C',\n 'VisioLogoInverse': '\\uED7D',\n 'Balloons': '\\uED7E',\n 'Cat': '\\uED7F',\n 'MailAlert': '\\uED80',\n 'MailCheck': '\\uED81',\n 'MailLowImportance': '\\uED82',\n 'MailPause': '\\uED83',\n 'MailRepeat': '\\uED84',\n 'SecurityGroup': '\\uED85',\n 'Table': '\\uED86',\n 'VoicemailForward': '\\uED87',\n 'VoicemailReply': '\\uED88',\n 'Waffle': '\\uED89',\n 'RemoveEvent': '\\uED8A',\n 'EventInfo': '\\uED8B',\n 'ForwardEvent': '\\uED8C',\n 'WipePhone': '\\uED8D',\n 'AddOnlineMeeting': '\\uED8E',\n 'JoinOnlineMeeting': '\\uED8F',\n 'RemoveLink': '\\uED90',\n 'PeopleBlock': '\\uED91',\n 'PeopleRepeat': '\\uED92',\n 'PeopleAlert': '\\uED93',\n 'PeoplePause': '\\uED94',\n 'TransferCall': '\\uED95',\n 'AddPhone': '\\uED96',\n 'UnknownCall': '\\uED97',\n 'NoteReply': '\\uED98',\n 'NoteForward': '\\uED99',\n 'NotePinned': '\\uED9A',\n 'RemoveOccurrence': '\\uED9B',\n 'Timeline': '\\uED9C',\n 'EditNote': '\\uED9D',\n 'CircleHalfFull': '\\uED9E',\n 'Room': '\\uED9F',\n 'Unsubscribe': '\\uEDA0',\n 'Subscribe': '\\uEDA1',\n 'HardDrive': '\\uEDA2',\n 'RecurringTask': '\\uEDB2',\n 'TaskManager': '\\uEDB7',\n 'TaskManagerMirrored': '\\uEDB8',\n 'Combine': '\\uEDBB',\n 'Split': '\\uEDBC',\n 'DoubleChevronUp': '\\uEDBD',\n 'DoubleChevronLeft': '\\uEDBE',\n 'DoubleChevronRight': '\\uEDBF',\n 'TextBox': '\\uEDC2',\n 'TextField': '\\uEDC3',\n 'NumberField': '\\uEDC4',\n 'Dropdown': '\\uEDC5',\n 'PenWorkspace': '\\uEDC6',\n 'BookingsLogo': '\\uEDC7',\n 'ClassNotebookLogoInverse': '\\uEDC8',\n 'DelveAnalyticsLogo': '\\uEDCA',\n 'DocsLogoInverse': '\\uEDCB',\n 'Dynamics365Logo': '\\uEDCC',\n 'DynamicSMBLogo': '\\uEDCD',\n 'OfficeAssistantLogo': '\\uEDCE',\n 'OfficeStoreLogo': '\\uEDCF',\n 'OneNoteEduLogoInverse': '\\uEDD0',\n 'PlannerLogo': '\\uEDD1',\n 'PowerApps': '\\uEDD2',\n 'Suitcase': '\\uEDD3',\n 'ProjectLogoInverse': '\\uEDD4',\n 'CaretLeft8': '\\uEDD5',\n 'CaretRight8': '\\uEDD6',\n 'CaretUp8': '\\uEDD7',\n 'CaretDown8': '\\uEDD8',\n 'CaretLeftSolid8': '\\uEDD9',\n 'CaretRightSolid8': '\\uEDDA',\n 'CaretUpSolid8': '\\uEDDB',\n 'CaretDownSolid8': '\\uEDDC',\n 'ClearFormatting': '\\uEDDD',\n 'Superscript': '\\uEDDE',\n 'Subscript': '\\uEDDF',\n 'Strikethrough': '\\uEDE0',\n 'Export': '\\uEDE1',\n 'ExportMirrored': '\\uEDE2'\n }\n };\n (0,_fluentui_style_utilities__WEBPACK_IMPORTED_MODULE_0__.registerIcons)(subset, options);\n}", "function initializeIcons(baseUrl, options) {\n if (baseUrl === void 0) { baseUrl = ''; }\n var subset = {\n style: {\n MozOsxFontSmoothing: 'grayscale',\n WebkitFontSmoothing: 'antialiased',\n fontStyle: 'normal',\n fontWeight: 'normal',\n speak: 'none'\n },\n fontFace: {\n fontFamily: \"\\\"FabricMDL2Icons-6\\\"\",\n src: \"url('\" + baseUrl + \"fabric-icons-6-ef6fd590.woff') format('woff')\"\n },\n icons: {\n 'SwayLogoInverse': '\\uED29',\n 'OutOfOffice': '\\uED34',\n 'Trophy': '\\uED3F',\n 'ReopenPages': '\\uED50',\n 'EmojiTabSymbols': '\\uED58',\n 'AADLogo': '\\uED68',\n 'AccessLogo': '\\uED69',\n 'AdminALogoInverse32': '\\uED6A',\n 'AdminCLogoInverse32': '\\uED6B',\n 'AdminDLogoInverse32': '\\uED6C',\n 'AdminELogoInverse32': '\\uED6D',\n 'AdminLLogoInverse32': '\\uED6E',\n 'AdminMLogoInverse32': '\\uED6F',\n 'AdminOLogoInverse32': '\\uED70',\n 'AdminPLogoInverse32': '\\uED71',\n 'AdminSLogoInverse32': '\\uED72',\n 'AdminYLogoInverse32': '\\uED73',\n 'DelveLogoInverse': '\\uED76',\n 'ExchangeLogoInverse': '\\uED78',\n 'LyncLogo': '\\uED79',\n 'OfficeVideoLogoInverse': '\\uED7A',\n 'SocialListeningLogo': '\\uED7C',\n 'VisioLogoInverse': '\\uED7D',\n 'Balloons': '\\uED7E',\n 'Cat': '\\uED7F',\n 'MailAlert': '\\uED80',\n 'MailCheck': '\\uED81',\n 'MailLowImportance': '\\uED82',\n 'MailPause': '\\uED83',\n 'MailRepeat': '\\uED84',\n 'SecurityGroup': '\\uED85',\n 'Table': '\\uED86',\n 'VoicemailForward': '\\uED87',\n 'VoicemailReply': '\\uED88',\n 'Waffle': '\\uED89',\n 'RemoveEvent': '\\uED8A',\n 'EventInfo': '\\uED8B',\n 'ForwardEvent': '\\uED8C',\n 'WipePhone': '\\uED8D',\n 'AddOnlineMeeting': '\\uED8E',\n 'JoinOnlineMeeting': '\\uED8F',\n 'RemoveLink': '\\uED90',\n 'PeopleBlock': '\\uED91',\n 'PeopleRepeat': '\\uED92',\n 'PeopleAlert': '\\uED93',\n 'PeoplePause': '\\uED94',\n 'TransferCall': '\\uED95',\n 'AddPhone': '\\uED96',\n 'UnknownCall': '\\uED97',\n 'NoteReply': '\\uED98',\n 'NoteForward': '\\uED99',\n 'NotePinned': '\\uED9A',\n 'RemoveOccurrence': '\\uED9B',\n 'Timeline': '\\uED9C',\n 'EditNote': '\\uED9D',\n 'CircleHalfFull': '\\uED9E',\n 'Room': '\\uED9F',\n 'Unsubscribe': '\\uEDA0',\n 'Subscribe': '\\uEDA1',\n 'HardDrive': '\\uEDA2',\n 'RecurringTask': '\\uEDB2',\n 'TaskManager': '\\uEDB7',\n 'TaskManagerMirrored': '\\uEDB8',\n 'Combine': '\\uEDBB',\n 'Split': '\\uEDBC',\n 'DoubleChevronUp': '\\uEDBD',\n 'DoubleChevronLeft': '\\uEDBE',\n 'DoubleChevronRight': '\\uEDBF',\n 'TextBox': '\\uEDC2',\n 'TextField': '\\uEDC3',\n 'NumberField': '\\uEDC4',\n 'Dropdown': '\\uEDC5',\n 'PenWorkspace': '\\uEDC6',\n 'BookingsLogo': '\\uEDC7',\n 'ClassNotebookLogoInverse': '\\uEDC8',\n 'DelveAnalyticsLogo': '\\uEDCA',\n 'DocsLogoInverse': '\\uEDCB',\n 'Dynamics365Logo': '\\uEDCC',\n 'DynamicSMBLogo': '\\uEDCD',\n 'OfficeAssistantLogo': '\\uEDCE',\n 'OfficeStoreLogo': '\\uEDCF',\n 'OneNoteEduLogoInverse': '\\uEDD0',\n 'PlannerLogo': '\\uEDD1',\n 'PowerApps': '\\uEDD2',\n 'Suitcase': '\\uEDD3',\n 'ProjectLogoInverse': '\\uEDD4',\n 'CaretLeft8': '\\uEDD5',\n 'CaretRight8': '\\uEDD6',\n 'CaretUp8': '\\uEDD7',\n 'CaretDown8': '\\uEDD8',\n 'CaretLeftSolid8': '\\uEDD9',\n 'CaretRightSolid8': '\\uEDDA',\n 'CaretUpSolid8': '\\uEDDB',\n 'CaretDownSolid8': '\\uEDDC',\n 'ClearFormatting': '\\uEDDD',\n 'Superscript': '\\uEDDE',\n 'Subscript': '\\uEDDF',\n 'Strikethrough': '\\uEDE0',\n 'Export': '\\uEDE1',\n 'ExportMirrored': '\\uEDE2'\n }\n };\n (0,_fluentui_style_utilities__WEBPACK_IMPORTED_MODULE_0__.registerIcons)(subset, options);\n}", "function initializeIcons(baseUrl, options) {\n if (baseUrl === void 0) { baseUrl = ''; }\n var subset = {\n style: {\n MozOsxFontSmoothing: 'grayscale',\n WebkitFontSmoothing: 'antialiased',\n fontStyle: 'normal',\n fontWeight: 'normal',\n speak: 'none'\n },\n fontFace: {\n fontFamily: \"\\\"FabricMDL2Icons-1\\\"\",\n src: \"url('\" + baseUrl + \"fabric-icons-1-4d521695.woff') format('woff')\"\n },\n icons: {\n 'Paste': '\\uE77F',\n 'WindowsLogo': '\\uE782',\n 'Error': '\\uE783',\n 'GripperBarVertical': '\\uE784',\n 'Unlock': '\\uE785',\n 'Slideshow': '\\uE786',\n 'Trim': '\\uE78A',\n 'AutoEnhanceOn': '\\uE78D',\n 'AutoEnhanceOff': '\\uE78E',\n 'Color': '\\uE790',\n 'SaveAs': '\\uE792',\n 'Light': '\\uE793',\n 'Filters': '\\uE795',\n 'AspectRatio': '\\uE799',\n 'Contrast': '\\uE7A1',\n 'Redo': '\\uE7A6',\n 'Crop': '\\uE7A8',\n 'PhotoCollection': '\\uE7AA',\n 'Album': '\\uE7AB',\n 'Rotate': '\\uE7AD',\n 'PanoIndicator': '\\uE7B0',\n 'Translate': '\\uE7B2',\n 'RedEye': '\\uE7B3',\n 'ViewOriginal': '\\uE7B4',\n 'ThumbnailView': '\\uE7B6',\n 'Package': '\\uE7B8',\n 'Telemarketer': '\\uE7B9',\n 'Warning': '\\uE7BA',\n 'Financial': '\\uE7BB',\n 'Education': '\\uE7BE',\n 'ShoppingCart': '\\uE7BF',\n 'Train': '\\uE7C0',\n 'Move': '\\uE7C2',\n 'TouchPointer': '\\uE7C9',\n 'Merge': '\\uE7D5',\n 'TurnRight': '\\uE7DB',\n 'Ferry': '\\uE7E3',\n 'Highlight': '\\uE7E6',\n 'PowerButton': '\\uE7E8',\n 'Tab': '\\uE7E9',\n 'Admin': '\\uE7EF',\n 'TVMonitor': '\\uE7F4',\n 'Speakers': '\\uE7F5',\n 'Game': '\\uE7FC',\n 'HorizontalTabKey': '\\uE7FD',\n 'UnstackSelected': '\\uE7FE',\n 'StackIndicator': '\\uE7FF',\n 'Nav2DMapView': '\\uE800',\n 'StreetsideSplitMinimize': '\\uE802',\n 'Car': '\\uE804',\n 'Bus': '\\uE806',\n 'EatDrink': '\\uE807',\n 'SeeDo': '\\uE808',\n 'LocationCircle': '\\uE80E',\n 'Home': '\\uE80F',\n 'SwitcherStartEnd': '\\uE810',\n 'ParkingLocation': '\\uE811',\n 'IncidentTriangle': '\\uE814',\n 'Touch': '\\uE815',\n 'MapDirections': '\\uE816',\n 'CaretHollow': '\\uE817',\n 'CaretSolid': '\\uE818',\n 'History': '\\uE81C',\n 'Location': '\\uE81D',\n 'MapLayers': '\\uE81E',\n 'SearchNearby': '\\uE820',\n 'Work': '\\uE821',\n 'Recent': '\\uE823',\n 'Hotel': '\\uE824',\n 'Bank': '\\uE825',\n 'LocationDot': '\\uE827',\n 'Dictionary': '\\uE82D',\n 'ChromeBack': '\\uE830',\n 'FolderOpen': '\\uE838',\n 'PinnedFill': '\\uE842',\n 'RevToggleKey': '\\uE845',\n 'USB': '\\uE88E',\n 'Previous': '\\uE892',\n 'Next': '\\uE893',\n 'Sync': '\\uE895',\n 'Help': '\\uE897',\n 'Emoji': '\\uE899',\n 'MailForward': '\\uE89C',\n 'ClosePane': '\\uE89F',\n 'OpenPane': '\\uE8A0',\n 'PreviewLink': '\\uE8A1',\n 'ZoomIn': '\\uE8A3',\n 'Bookmarks': '\\uE8A4',\n 'Document': '\\uE8A5',\n 'ProtectedDocument': '\\uE8A6',\n 'OpenInNewWindow': '\\uE8A7',\n 'MailFill': '\\uE8A8',\n 'ViewAll': '\\uE8A9',\n 'Switch': '\\uE8AB',\n 'Rename': '\\uE8AC',\n 'Go': '\\uE8AD',\n 'Remote': '\\uE8AF',\n 'SelectAll': '\\uE8B3',\n 'Orientation': '\\uE8B4',\n 'Import': '\\uE8B5'\n }\n };\n (0,_fluentui_style_utilities__WEBPACK_IMPORTED_MODULE_0__.registerIcons)(subset, options);\n}", "function initializeIcons(baseUrl, options) {\n if (baseUrl === void 0) { baseUrl = ''; }\n var subset = {\n style: {\n MozOsxFontSmoothing: 'grayscale',\n WebkitFontSmoothing: 'antialiased',\n fontStyle: 'normal',\n fontWeight: 'normal',\n speak: 'none'\n },\n fontFace: {\n fontFamily: \"\\\"FabricMDL2Icons-1\\\"\",\n src: \"url('\" + baseUrl + \"fabric-icons-1-4d521695.woff') format('woff')\"\n },\n icons: {\n 'Paste': '\\uE77F',\n 'WindowsLogo': '\\uE782',\n 'Error': '\\uE783',\n 'GripperBarVertical': '\\uE784',\n 'Unlock': '\\uE785',\n 'Slideshow': '\\uE786',\n 'Trim': '\\uE78A',\n 'AutoEnhanceOn': '\\uE78D',\n 'AutoEnhanceOff': '\\uE78E',\n 'Color': '\\uE790',\n 'SaveAs': '\\uE792',\n 'Light': '\\uE793',\n 'Filters': '\\uE795',\n 'AspectRatio': '\\uE799',\n 'Contrast': '\\uE7A1',\n 'Redo': '\\uE7A6',\n 'Crop': '\\uE7A8',\n 'PhotoCollection': '\\uE7AA',\n 'Album': '\\uE7AB',\n 'Rotate': '\\uE7AD',\n 'PanoIndicator': '\\uE7B0',\n 'Translate': '\\uE7B2',\n 'RedEye': '\\uE7B3',\n 'ViewOriginal': '\\uE7B4',\n 'ThumbnailView': '\\uE7B6',\n 'Package': '\\uE7B8',\n 'Telemarketer': '\\uE7B9',\n 'Warning': '\\uE7BA',\n 'Financial': '\\uE7BB',\n 'Education': '\\uE7BE',\n 'ShoppingCart': '\\uE7BF',\n 'Train': '\\uE7C0',\n 'Move': '\\uE7C2',\n 'TouchPointer': '\\uE7C9',\n 'Merge': '\\uE7D5',\n 'TurnRight': '\\uE7DB',\n 'Ferry': '\\uE7E3',\n 'Highlight': '\\uE7E6',\n 'PowerButton': '\\uE7E8',\n 'Tab': '\\uE7E9',\n 'Admin': '\\uE7EF',\n 'TVMonitor': '\\uE7F4',\n 'Speakers': '\\uE7F5',\n 'Game': '\\uE7FC',\n 'HorizontalTabKey': '\\uE7FD',\n 'UnstackSelected': '\\uE7FE',\n 'StackIndicator': '\\uE7FF',\n 'Nav2DMapView': '\\uE800',\n 'StreetsideSplitMinimize': '\\uE802',\n 'Car': '\\uE804',\n 'Bus': '\\uE806',\n 'EatDrink': '\\uE807',\n 'SeeDo': '\\uE808',\n 'LocationCircle': '\\uE80E',\n 'Home': '\\uE80F',\n 'SwitcherStartEnd': '\\uE810',\n 'ParkingLocation': '\\uE811',\n 'IncidentTriangle': '\\uE814',\n 'Touch': '\\uE815',\n 'MapDirections': '\\uE816',\n 'CaretHollow': '\\uE817',\n 'CaretSolid': '\\uE818',\n 'History': '\\uE81C',\n 'Location': '\\uE81D',\n 'MapLayers': '\\uE81E',\n 'SearchNearby': '\\uE820',\n 'Work': '\\uE821',\n 'Recent': '\\uE823',\n 'Hotel': '\\uE824',\n 'Bank': '\\uE825',\n 'LocationDot': '\\uE827',\n 'Dictionary': '\\uE82D',\n 'ChromeBack': '\\uE830',\n 'FolderOpen': '\\uE838',\n 'PinnedFill': '\\uE842',\n 'RevToggleKey': '\\uE845',\n 'USB': '\\uE88E',\n 'Previous': '\\uE892',\n 'Next': '\\uE893',\n 'Sync': '\\uE895',\n 'Help': '\\uE897',\n 'Emoji': '\\uE899',\n 'MailForward': '\\uE89C',\n 'ClosePane': '\\uE89F',\n 'OpenPane': '\\uE8A0',\n 'PreviewLink': '\\uE8A1',\n 'ZoomIn': '\\uE8A3',\n 'Bookmarks': '\\uE8A4',\n 'Document': '\\uE8A5',\n 'ProtectedDocument': '\\uE8A6',\n 'OpenInNewWindow': '\\uE8A7',\n 'MailFill': '\\uE8A8',\n 'ViewAll': '\\uE8A9',\n 'Switch': '\\uE8AB',\n 'Rename': '\\uE8AC',\n 'Go': '\\uE8AD',\n 'Remote': '\\uE8AF',\n 'SelectAll': '\\uE8B3',\n 'Orientation': '\\uE8B4',\n 'Import': '\\uE8B5'\n }\n };\n (0,_fluentui_style_utilities__WEBPACK_IMPORTED_MODULE_0__.registerIcons)(subset, options);\n}", "function initializeIcons(baseUrl, options) {\n if (baseUrl === void 0) { baseUrl = ''; }\n var subset = {\n style: {\n MozOsxFontSmoothing: 'grayscale',\n WebkitFontSmoothing: 'antialiased',\n fontStyle: 'normal',\n fontWeight: 'normal',\n speak: 'none'\n },\n fontFace: {\n fontFamily: \"\\\"FabricMDL2Icons-3\\\"\",\n src: \"url('\" + baseUrl + \"fabric-icons-3-089e217a.woff') format('woff')\"\n },\n icons: {\n 'ChevronDownSmall': '\\uE96E',\n 'ChevronLeftSmall': '\\uE96F',\n 'ChevronRightSmall': '\\uE970',\n 'ChevronUpMed': '\\uE971',\n 'ChevronDownMed': '\\uE972',\n 'ChevronLeftMed': '\\uE973',\n 'ChevronRightMed': '\\uE974',\n 'Devices2': '\\uE975',\n 'PC1': '\\uE977',\n 'PresenceChickletVideo': '\\uE979',\n 'Reply': '\\uE97A',\n 'HalfAlpha': '\\uE97E',\n 'ConstructionCone': '\\uE98F',\n 'DoubleChevronLeftMed': '\\uE991',\n 'Volume0': '\\uE992',\n 'Volume1': '\\uE993',\n 'Volume2': '\\uE994',\n 'Volume3': '\\uE995',\n 'Chart': '\\uE999',\n 'Robot': '\\uE99A',\n 'Manufacturing': '\\uE99C',\n 'LockSolid': '\\uE9A2',\n 'FitPage': '\\uE9A6',\n 'FitWidth': '\\uE9A7',\n 'BidiLtr': '\\uE9AA',\n 'BidiRtl': '\\uE9AB',\n 'RightDoubleQuote': '\\uE9B1',\n 'Sunny': '\\uE9BD',\n 'CloudWeather': '\\uE9BE',\n 'Cloudy': '\\uE9BF',\n 'PartlyCloudyDay': '\\uE9C0',\n 'PartlyCloudyNight': '\\uE9C1',\n 'ClearNight': '\\uE9C2',\n 'RainShowersDay': '\\uE9C3',\n 'Rain': '\\uE9C4',\n 'Thunderstorms': '\\uE9C6',\n 'RainSnow': '\\uE9C7',\n 'Snow': '\\uE9C8',\n 'BlowingSnow': '\\uE9C9',\n 'Frigid': '\\uE9CA',\n 'Fog': '\\uE9CB',\n 'Squalls': '\\uE9CC',\n 'Duststorm': '\\uE9CD',\n 'Unknown': '\\uE9CE',\n 'Precipitation': '\\uE9CF',\n 'Ribbon': '\\uE9D1',\n 'AreaChart': '\\uE9D2',\n 'Assign': '\\uE9D3',\n 'FlowChart': '\\uE9D4',\n 'CheckList': '\\uE9D5',\n 'Diagnostic': '\\uE9D9',\n 'Generate': '\\uE9DA',\n 'LineChart': '\\uE9E6',\n 'Equalizer': '\\uE9E9',\n 'BarChartHorizontal': '\\uE9EB',\n 'BarChartVertical': '\\uE9EC',\n 'Freezing': '\\uE9EF',\n 'FunnelChart': '\\uE9F1',\n 'Processing': '\\uE9F5',\n 'Quantity': '\\uE9F8',\n 'ReportDocument': '\\uE9F9',\n 'StackColumnChart': '\\uE9FC',\n 'SnowShowerDay': '\\uE9FD',\n 'HailDay': '\\uEA00',\n 'WorkFlow': '\\uEA01',\n 'HourGlass': '\\uEA03',\n 'StoreLogoMed20': '\\uEA04',\n 'TimeSheet': '\\uEA05',\n 'TriangleSolid': '\\uEA08',\n 'UpgradeAnalysis': '\\uEA0B',\n 'VideoSolid': '\\uEA0C',\n 'RainShowersNight': '\\uEA0F',\n 'SnowShowerNight': '\\uEA11',\n 'Teamwork': '\\uEA12',\n 'HailNight': '\\uEA13',\n 'PeopleAdd': '\\uEA15',\n 'Glasses': '\\uEA16',\n 'DateTime2': '\\uEA17',\n 'Shield': '\\uEA18',\n 'Header1': '\\uEA19',\n 'PageAdd': '\\uEA1A',\n 'NumberedList': '\\uEA1C',\n 'PowerBILogo': '\\uEA1E',\n 'Info2': '\\uEA1F',\n 'MusicInCollectionFill': '\\uEA36',\n 'Asterisk': '\\uEA38',\n 'ErrorBadge': '\\uEA39',\n 'CircleFill': '\\uEA3B',\n 'Record2': '\\uEA3F',\n 'AllAppsMirrored': '\\uEA40',\n 'BookmarksMirrored': '\\uEA41',\n 'BulletedListMirrored': '\\uEA42',\n 'CaretHollowMirrored': '\\uEA45',\n 'CaretSolidMirrored': '\\uEA46',\n 'ChromeBackMirrored': '\\uEA47',\n 'ClearSelectionMirrored': '\\uEA48',\n 'ClosePaneMirrored': '\\uEA49',\n 'DockLeftMirrored': '\\uEA4C',\n 'DoubleChevronLeftMedMirrored': '\\uEA4D',\n 'GoMirrored': '\\uEA4F'\n }\n };\n (0,_fluentui_style_utilities__WEBPACK_IMPORTED_MODULE_0__.registerIcons)(subset, options);\n}", "function initializeIcons(baseUrl, options) {\n if (baseUrl === void 0) { baseUrl = ''; }\n var subset = {\n style: {\n MozOsxFontSmoothing: 'grayscale',\n WebkitFontSmoothing: 'antialiased',\n fontStyle: 'normal',\n fontWeight: 'normal',\n speak: 'none'\n },\n fontFace: {\n fontFamily: \"\\\"FabricMDL2Icons-3\\\"\",\n src: \"url('\" + baseUrl + \"fabric-icons-3-089e217a.woff') format('woff')\"\n },\n icons: {\n 'ChevronDownSmall': '\\uE96E',\n 'ChevronLeftSmall': '\\uE96F',\n 'ChevronRightSmall': '\\uE970',\n 'ChevronUpMed': '\\uE971',\n 'ChevronDownMed': '\\uE972',\n 'ChevronLeftMed': '\\uE973',\n 'ChevronRightMed': '\\uE974',\n 'Devices2': '\\uE975',\n 'PC1': '\\uE977',\n 'PresenceChickletVideo': '\\uE979',\n 'Reply': '\\uE97A',\n 'HalfAlpha': '\\uE97E',\n 'ConstructionCone': '\\uE98F',\n 'DoubleChevronLeftMed': '\\uE991',\n 'Volume0': '\\uE992',\n 'Volume1': '\\uE993',\n 'Volume2': '\\uE994',\n 'Volume3': '\\uE995',\n 'Chart': '\\uE999',\n 'Robot': '\\uE99A',\n 'Manufacturing': '\\uE99C',\n 'LockSolid': '\\uE9A2',\n 'FitPage': '\\uE9A6',\n 'FitWidth': '\\uE9A7',\n 'BidiLtr': '\\uE9AA',\n 'BidiRtl': '\\uE9AB',\n 'RightDoubleQuote': '\\uE9B1',\n 'Sunny': '\\uE9BD',\n 'CloudWeather': '\\uE9BE',\n 'Cloudy': '\\uE9BF',\n 'PartlyCloudyDay': '\\uE9C0',\n 'PartlyCloudyNight': '\\uE9C1',\n 'ClearNight': '\\uE9C2',\n 'RainShowersDay': '\\uE9C3',\n 'Rain': '\\uE9C4',\n 'Thunderstorms': '\\uE9C6',\n 'RainSnow': '\\uE9C7',\n 'Snow': '\\uE9C8',\n 'BlowingSnow': '\\uE9C9',\n 'Frigid': '\\uE9CA',\n 'Fog': '\\uE9CB',\n 'Squalls': '\\uE9CC',\n 'Duststorm': '\\uE9CD',\n 'Unknown': '\\uE9CE',\n 'Precipitation': '\\uE9CF',\n 'Ribbon': '\\uE9D1',\n 'AreaChart': '\\uE9D2',\n 'Assign': '\\uE9D3',\n 'FlowChart': '\\uE9D4',\n 'CheckList': '\\uE9D5',\n 'Diagnostic': '\\uE9D9',\n 'Generate': '\\uE9DA',\n 'LineChart': '\\uE9E6',\n 'Equalizer': '\\uE9E9',\n 'BarChartHorizontal': '\\uE9EB',\n 'BarChartVertical': '\\uE9EC',\n 'Freezing': '\\uE9EF',\n 'FunnelChart': '\\uE9F1',\n 'Processing': '\\uE9F5',\n 'Quantity': '\\uE9F8',\n 'ReportDocument': '\\uE9F9',\n 'StackColumnChart': '\\uE9FC',\n 'SnowShowerDay': '\\uE9FD',\n 'HailDay': '\\uEA00',\n 'WorkFlow': '\\uEA01',\n 'HourGlass': '\\uEA03',\n 'StoreLogoMed20': '\\uEA04',\n 'TimeSheet': '\\uEA05',\n 'TriangleSolid': '\\uEA08',\n 'UpgradeAnalysis': '\\uEA0B',\n 'VideoSolid': '\\uEA0C',\n 'RainShowersNight': '\\uEA0F',\n 'SnowShowerNight': '\\uEA11',\n 'Teamwork': '\\uEA12',\n 'HailNight': '\\uEA13',\n 'PeopleAdd': '\\uEA15',\n 'Glasses': '\\uEA16',\n 'DateTime2': '\\uEA17',\n 'Shield': '\\uEA18',\n 'Header1': '\\uEA19',\n 'PageAdd': '\\uEA1A',\n 'NumberedList': '\\uEA1C',\n 'PowerBILogo': '\\uEA1E',\n 'Info2': '\\uEA1F',\n 'MusicInCollectionFill': '\\uEA36',\n 'Asterisk': '\\uEA38',\n 'ErrorBadge': '\\uEA39',\n 'CircleFill': '\\uEA3B',\n 'Record2': '\\uEA3F',\n 'AllAppsMirrored': '\\uEA40',\n 'BookmarksMirrored': '\\uEA41',\n 'BulletedListMirrored': '\\uEA42',\n 'CaretHollowMirrored': '\\uEA45',\n 'CaretSolidMirrored': '\\uEA46',\n 'ChromeBackMirrored': '\\uEA47',\n 'ClearSelectionMirrored': '\\uEA48',\n 'ClosePaneMirrored': '\\uEA49',\n 'DockLeftMirrored': '\\uEA4C',\n 'DoubleChevronLeftMedMirrored': '\\uEA4D',\n 'GoMirrored': '\\uEA4F'\n }\n };\n (0,_fluentui_style_utilities__WEBPACK_IMPORTED_MODULE_0__.registerIcons)(subset, options);\n}", "function addFoodIcon(food) {\n switch(pluralize.singular(food.name.toLowerCase())) {\n case 'apple':\n return 'apple-1.png';\n break;\n case 'asparagus':\n return 'asparagus.png';\n break;\n case 'avocado':\n return 'avocado.png';\n break;\n case 'bacon':\n return 'bacon.png';\n break;\n case 'banana':\n return 'banana.png';\n break;\n case 'bean':\n return 'beans.png';\n break;\n case 'biscuit':\n return 'biscuit.png';\n break;\n case 'blueberry':\n return 'blueberries.png';\n break;\n case 'bread':\n return 'bread-1.png';\n break;\n case 'broccoli':\n return 'broccoli.png';\n break;\n case 'cabbage':\n return 'cabbage.png';\n break;\n case 'cake':\n return 'cake.png';\n break;\n case 'candy':\n return 'candy.png';\n break;\n case 'carrot':\n return 'carrot.png';\n break;\n case 'cauliflower':\n return 'cauliflower.png';\n break;\n case 'cereal':\n return 'cereals.png';\n break;\n case 'cheese':\n return 'cheese.png';\n break;\n case 'cherry':\n return 'cherries.png';\n break;\n case 'chili':\n return 'chili.png';\n break;\n case 'chips':\n return 'chips.png';\n break;\n case 'chives':\n return 'chives.png';\n break;\n case 'green onion':\n return 'chives.png';\n break;\n case 'chocolate':\n return 'chocolate.png';\n break;\n case 'coconut':\n return 'coconut.png';\n break;\n case 'coffee':\n return 'coffee-2.png';\n break;\n case 'cookie':\n return 'cookies.png';\n break;\n case 'corn':\n return 'corn.png';\n break;\n case 'cucumber':\n return 'cucumber.png';\n break;\n case 'egg':\n return 'egg.png';\n break;\n case 'fish':\n return 'fish.png';\n break;\n case 'flour':\n return 'flour.png';\n break;\n case 'fry':\n return 'fries.png';\n break;\n case 'garlic':\n return 'garlic.png';\n break;\n case 'egg':\n return 'egg.png';\n break;\n case 'grape':\n return 'grapes.png';\n break;\n case 'ham':\n return 'ham.png';\n break;\n case 'honey':\n return 'honey.png';\n break;\n case 'ice cream':\n return 'ice-cream-12.png';\n break;\n case 'jam':\n return 'jam-1.png';\n break;\n case 'jelly':\n return 'jam-1.png';\n break;\n case 'lemon':\n return 'lemon-1.png';\n break;\n case 'lime':\n return 'lime.png';\n break;\n case 'milk':\n return 'milk-1.png';\n break;\n case 'mushroom':\n return 'mushroom.png';\n break;\n case 'mustard':\n return 'mustard.png';\n break;\n case 'noodles':\n return 'noodles.png';\n break;\n case 'oat':\n return 'oat.png';\n break;\n case 'olive oil':\n return 'oil.png';\n break;\n case 'vegetable oil':\n return 'oil.png';\n break;\n case 'oil':\n return 'oil.png';\n break;\n case 'olive':\n return 'olive.png';\n break;\n case 'onion':\n return 'onion.png';\n break;\n case 'orange':\n return 'orange.png';\n break;\n case 'pancake':\n return 'pancakes-1.png';\n break;\n case 'pasta':\n return 'spaguetti.png';\n break;\n case 'peach':\n return 'peach.png';\n break;\n case 'pear':\n return 'pear.png';\n break;\n case 'pea':\n return 'peas.png';\n break;\n case 'pepper':\n return 'pepper.png';\n break;\n case 'pickle':\n return 'pickles.png';\n break;\n case 'pie':\n return 'pie.png';\n break;\n case 'pineapple':\n return 'pineapple.png';\n break;\n case 'beer':\n return 'pint.png';\n break;\n case 'pistachio':\n return 'pistachio.png';\n break;\n case 'pizza':\n return 'pizza.png';\n break;\n case 'pomegranate':\n return 'pomegranate.png';\n break;\n case 'potato':\n return 'potatoes-2.png';\n break;\n case 'pretzel':\n return 'pretzel.png';\n break;\n case 'pumpkin':\n return 'pumpkin.png';\n break;\n case 'radish':\n return 'radish.png';\n break;\n case 'raspberry':\n return 'raspberry.png';\n break;\n case 'rice':\n return 'rice.png';\n break;\n case 'brown rice':\n return 'rice.png';\n break;\n case 'white rice':\n return 'rice.png';\n break;\n case 'salad':\n return 'salad.png';\n break;\n case 'lettuce':\n return 'salad-1.png';\n break;\n case 'spinach':\n return 'salad-1.png';\n break;\n case 'kale':\n return 'salad-1.png';\n break;\n case 'salami':\n return 'salami.png';\n break;\n case 'salmon':\n return 'salmon.png';\n break;\n case 'sandwich':\n return 'sandwich.png';\n break;\n case 'sausage':\n return 'sausage.png';\n break;\n case 'italian sausage':\n return 'sausage.png';\n break;\n case 'breakfast sausage':\n return 'sausage.png';\n break;\n case 'steak':\n return 'steak.png';\n break;\n case 'strawberry':\n return 'strawberry.png';\n break;\n case 'sushi':\n return 'sushi-1.png';\n break;\n case 'taco':\n return 'taco.png';\n break;\n case 'toast':\n return 'toast.png';\n break;\n case 'tomato':\n return 'tomato.png';\n break;\n case 'turkey':\n return 'turkey.png';\n break;\n case 'watermelon':\n return 'watermelon.png';\n break;\n case 'wrap':\n return 'wrap.png';\n break;\n case 'chicken':\n return 'meat.png';\n break;\n case 'chicken breast':\n return 'meat.png';\n break;\n case 'ketchup':\n return 'mustard-2.png';\n break;\n case 'ground beef':\n return 'ham.png';\n break;\n case 'ground turkey':\n return 'ham.png';\n break;\n case 'ground chicken':\n return 'ham.png';\n break;\n case 'ground chicken':\n return 'ham.png';\n break;\n // If a food name is not one of these things, populate it's icon based on category\n default: \n if (food.category === 'Vegetables') {\n return 'salad-1.png';\n } else if (food.category === 'Fruits') {\n return 'apple-1.png'\n } else if (food.category === 'Meat/Seafood') {\n return 'meat-1.png'\n } else if (food.category === 'Grains') {\n return 'grain.png'\n } else if (food.category === 'Dairy') {\n return 'milk.png'\n } else if (food.category === 'Sugars') {\n return 'cupcake.png'\n }\n return 'food.png'\n }\n}", "renderIcon(data) {\n const e = document.createElement('div');\n e.className = this.createIconClass(data);\n e.appendChild(document.createTextNode(data.iconLabel));\n return e;\n }", "function createIcon(options, enableTooltips, shortcuts) {\n\t\t\toptions = options || {};\n\t\t\tvar el = document.createElement(\"a\");\n\t\t\tenableTooltips = (enableTooltips == undefined) ? true : enableTooltips;\n\t\t\n\t\t\tif(options.title && enableTooltips) {\n\t\t\t\tel.title = createTootlip(options.title, options.action, shortcuts);\n\t\t\n\t\t\t\tif(isMac) {\n\t\t\t\t\tel.title = el.title.replace(\"Ctrl\", \"⌘\");\n\t\t\t\t\tel.title = el.title.replace(\"Alt\", \"⌥\");\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\tel.tabIndex = -1;\n\t\t\tel.className = options.className;\n\t\t\treturn el;\n\t\t}", "renderIcon(cssClass) {\n return `<i class=\"wi ${cssClass}\"></i>`;\n }", "function createIcon(options, enableTooltips, shortcuts) {\n\toptions = options || {};\n\tvar el = document.createElement(\"a\");\n\tenableTooltips = (enableTooltips == undefined) ? true : enableTooltips;\n\n\tif(options.title && enableTooltips) {\n\t\tel.title = createTootlip(options.title, options.action, shortcuts);\n\n\t\tif(isMac) {\n\t\t\tel.title = el.title.replace(\"Ctrl\", \"⌘\");\n\t\t\tel.title = el.title.replace(\"Alt\", \"⌥\");\n\t\t}\n\t}\n\n\tel.tabIndex = -1;\n\tel.className = options.className;\n\treturn el;\n}", "function createIcon(options, enableTooltips, shortcuts) {\n\toptions = options || {};\n\tvar el = document.createElement(\"a\");\n\tenableTooltips = (enableTooltips == undefined) ? true : enableTooltips;\n\n\tif(options.title && enableTooltips) {\n\t\tel.title = createTootlip(options.title, options.action, shortcuts);\n\n\t\tif(isMac) {\n\t\t\tel.title = el.title.replace(\"Ctrl\", \"⌘\");\n\t\t\tel.title = el.title.replace(\"Alt\", \"⌥\");\n\t\t}\n\t}\n\n\tel.tabIndex = -1;\n\tel.className = options.className;\n\treturn el;\n}", "function createIcon(options, enableTooltips, shortcuts) {\n\toptions = options || {};\n\tvar el = document.createElement(\"a\");\n\tenableTooltips = (enableTooltips == undefined) ? true : enableTooltips;\n\n\tif(options.title && enableTooltips) {\n\t\tel.title = createTootlip(options.title, options.action, shortcuts);\n\n\t\tif(isMac) {\n\t\t\tel.title = el.title.replace(\"Ctrl\", \"⌘\");\n\t\t\tel.title = el.title.replace(\"Alt\", \"⌥\");\n\t\t}\n\t}\n\n\tel.tabIndex = -1;\n\tel.className = options.className;\n\treturn el;\n}", "function initializeIcons(baseUrl, options) {\n if (baseUrl === void 0) { baseUrl = ''; }\n var subset = {\n style: {\n MozOsxFontSmoothing: 'grayscale',\n WebkitFontSmoothing: 'antialiased',\n fontStyle: 'normal',\n fontWeight: 'normal',\n speak: 'none'\n },\n fontFace: {\n fontFamily: \"\\\"FabricMDL2Icons-4\\\"\",\n src: \"url('\" + baseUrl + \"fabric-icons-4-a656cc0a.woff') format('woff')\"\n },\n icons: {\n 'HelpMirrored': '\\uEA51',\n 'ImportMirrored': '\\uEA52',\n 'ImportAllMirrored': '\\uEA53',\n 'ListMirrored': '\\uEA55',\n 'MailForwardMirrored': '\\uEA56',\n 'MailReplyMirrored': '\\uEA57',\n 'MailReplyAllMirrored': '\\uEA58',\n 'MiniContractMirrored': '\\uEA59',\n 'MiniExpandMirrored': '\\uEA5A',\n 'OpenPaneMirrored': '\\uEA5B',\n 'ParkingLocationMirrored': '\\uEA5E',\n 'SendMirrored': '\\uEA63',\n 'ShowResultsMirrored': '\\uEA65',\n 'ThumbnailViewMirrored': '\\uEA67',\n 'Media': '\\uEA69',\n 'Devices3': '\\uEA6C',\n 'Focus': '\\uEA6F',\n 'VideoLightOff': '\\uEA74',\n 'Lightbulb': '\\uEA80',\n 'StatusTriangle': '\\uEA82',\n 'VolumeDisabled': '\\uEA85',\n 'Puzzle': '\\uEA86',\n 'EmojiNeutral': '\\uEA87',\n 'EmojiDisappointed': '\\uEA88',\n 'HomeSolid': '\\uEA8A',\n 'Ringer': '\\uEA8F',\n 'PDF': '\\uEA90',\n 'HeartBroken': '\\uEA92',\n 'StoreLogo16': '\\uEA96',\n 'MultiSelectMirrored': '\\uEA98',\n 'Broom': '\\uEA99',\n 'AddToShoppingList': '\\uEA9A',\n 'Cocktails': '\\uEA9D',\n 'Wines': '\\uEABF',\n 'Articles': '\\uEAC1',\n 'Cycling': '\\uEAC7',\n 'DietPlanNotebook': '\\uEAC8',\n 'Pill': '\\uEACB',\n 'ExerciseTracker': '\\uEACC',\n 'HandsFree': '\\uEAD0',\n 'Medical': '\\uEAD4',\n 'Running': '\\uEADA',\n 'Weights': '\\uEADB',\n 'Trackers': '\\uEADF',\n 'AddNotes': '\\uEAE3',\n 'AllCurrency': '\\uEAE4',\n 'BarChart4': '\\uEAE7',\n 'CirclePlus': '\\uEAEE',\n 'Coffee': '\\uEAEF',\n 'Cotton': '\\uEAF3',\n 'Market': '\\uEAFC',\n 'Money': '\\uEAFD',\n 'PieDouble': '\\uEB04',\n 'PieSingle': '\\uEB05',\n 'RemoveFilter': '\\uEB08',\n 'Savings': '\\uEB0B',\n 'Sell': '\\uEB0C',\n 'StockDown': '\\uEB0F',\n 'StockUp': '\\uEB11',\n 'Lamp': '\\uEB19',\n 'Source': '\\uEB1B',\n 'MSNVideos': '\\uEB1C',\n 'Cricket': '\\uEB1E',\n 'Golf': '\\uEB1F',\n 'Baseball': '\\uEB20',\n 'Soccer': '\\uEB21',\n 'MoreSports': '\\uEB22',\n 'AutoRacing': '\\uEB24',\n 'CollegeHoops': '\\uEB25',\n 'CollegeFootball': '\\uEB26',\n 'ProFootball': '\\uEB27',\n 'ProHockey': '\\uEB28',\n 'Rugby': '\\uEB2D',\n 'SubstitutionsIn': '\\uEB31',\n 'Tennis': '\\uEB33',\n 'Arrivals': '\\uEB34',\n 'Design': '\\uEB3C',\n 'Website': '\\uEB41',\n 'Drop': '\\uEB42',\n 'HistoricalWeather': '\\uEB43',\n 'SkiResorts': '\\uEB45',\n 'Snowflake': '\\uEB46',\n 'BusSolid': '\\uEB47',\n 'FerrySolid': '\\uEB48',\n 'AirplaneSolid': '\\uEB4C',\n 'TrainSolid': '\\uEB4D',\n 'Ticket': '\\uEB54',\n 'WifiWarning4': '\\uEB63',\n 'Devices4': '\\uEB66',\n 'AzureLogo': '\\uEB6A',\n 'BingLogo': '\\uEB6B',\n 'MSNLogo': '\\uEB6C',\n 'OutlookLogoInverse': '\\uEB6D',\n 'OfficeLogo': '\\uEB6E',\n 'SkypeLogo': '\\uEB6F',\n 'Door': '\\uEB75',\n 'EditMirrored': '\\uEB7E',\n 'GiftCard': '\\uEB8E',\n 'DoubleBookmark': '\\uEB8F',\n 'StatusErrorFull': '\\uEB90'\n }\n };\n (0,_fluentui_style_utilities__WEBPACK_IMPORTED_MODULE_0__.registerIcons)(subset, options);\n}", "function initializeIcons(baseUrl, options) {\n if (baseUrl === void 0) { baseUrl = ''; }\n var subset = {\n style: {\n MozOsxFontSmoothing: 'grayscale',\n WebkitFontSmoothing: 'antialiased',\n fontStyle: 'normal',\n fontWeight: 'normal',\n speak: 'none'\n },\n fontFace: {\n fontFamily: \"\\\"FabricMDL2Icons-4\\\"\",\n src: \"url('\" + baseUrl + \"fabric-icons-4-a656cc0a.woff') format('woff')\"\n },\n icons: {\n 'HelpMirrored': '\\uEA51',\n 'ImportMirrored': '\\uEA52',\n 'ImportAllMirrored': '\\uEA53',\n 'ListMirrored': '\\uEA55',\n 'MailForwardMirrored': '\\uEA56',\n 'MailReplyMirrored': '\\uEA57',\n 'MailReplyAllMirrored': '\\uEA58',\n 'MiniContractMirrored': '\\uEA59',\n 'MiniExpandMirrored': '\\uEA5A',\n 'OpenPaneMirrored': '\\uEA5B',\n 'ParkingLocationMirrored': '\\uEA5E',\n 'SendMirrored': '\\uEA63',\n 'ShowResultsMirrored': '\\uEA65',\n 'ThumbnailViewMirrored': '\\uEA67',\n 'Media': '\\uEA69',\n 'Devices3': '\\uEA6C',\n 'Focus': '\\uEA6F',\n 'VideoLightOff': '\\uEA74',\n 'Lightbulb': '\\uEA80',\n 'StatusTriangle': '\\uEA82',\n 'VolumeDisabled': '\\uEA85',\n 'Puzzle': '\\uEA86',\n 'EmojiNeutral': '\\uEA87',\n 'EmojiDisappointed': '\\uEA88',\n 'HomeSolid': '\\uEA8A',\n 'Ringer': '\\uEA8F',\n 'PDF': '\\uEA90',\n 'HeartBroken': '\\uEA92',\n 'StoreLogo16': '\\uEA96',\n 'MultiSelectMirrored': '\\uEA98',\n 'Broom': '\\uEA99',\n 'AddToShoppingList': '\\uEA9A',\n 'Cocktails': '\\uEA9D',\n 'Wines': '\\uEABF',\n 'Articles': '\\uEAC1',\n 'Cycling': '\\uEAC7',\n 'DietPlanNotebook': '\\uEAC8',\n 'Pill': '\\uEACB',\n 'ExerciseTracker': '\\uEACC',\n 'HandsFree': '\\uEAD0',\n 'Medical': '\\uEAD4',\n 'Running': '\\uEADA',\n 'Weights': '\\uEADB',\n 'Trackers': '\\uEADF',\n 'AddNotes': '\\uEAE3',\n 'AllCurrency': '\\uEAE4',\n 'BarChart4': '\\uEAE7',\n 'CirclePlus': '\\uEAEE',\n 'Coffee': '\\uEAEF',\n 'Cotton': '\\uEAF3',\n 'Market': '\\uEAFC',\n 'Money': '\\uEAFD',\n 'PieDouble': '\\uEB04',\n 'PieSingle': '\\uEB05',\n 'RemoveFilter': '\\uEB08',\n 'Savings': '\\uEB0B',\n 'Sell': '\\uEB0C',\n 'StockDown': '\\uEB0F',\n 'StockUp': '\\uEB11',\n 'Lamp': '\\uEB19',\n 'Source': '\\uEB1B',\n 'MSNVideos': '\\uEB1C',\n 'Cricket': '\\uEB1E',\n 'Golf': '\\uEB1F',\n 'Baseball': '\\uEB20',\n 'Soccer': '\\uEB21',\n 'MoreSports': '\\uEB22',\n 'AutoRacing': '\\uEB24',\n 'CollegeHoops': '\\uEB25',\n 'CollegeFootball': '\\uEB26',\n 'ProFootball': '\\uEB27',\n 'ProHockey': '\\uEB28',\n 'Rugby': '\\uEB2D',\n 'SubstitutionsIn': '\\uEB31',\n 'Tennis': '\\uEB33',\n 'Arrivals': '\\uEB34',\n 'Design': '\\uEB3C',\n 'Website': '\\uEB41',\n 'Drop': '\\uEB42',\n 'HistoricalWeather': '\\uEB43',\n 'SkiResorts': '\\uEB45',\n 'Snowflake': '\\uEB46',\n 'BusSolid': '\\uEB47',\n 'FerrySolid': '\\uEB48',\n 'AirplaneSolid': '\\uEB4C',\n 'TrainSolid': '\\uEB4D',\n 'Ticket': '\\uEB54',\n 'WifiWarning4': '\\uEB63',\n 'Devices4': '\\uEB66',\n 'AzureLogo': '\\uEB6A',\n 'BingLogo': '\\uEB6B',\n 'MSNLogo': '\\uEB6C',\n 'OutlookLogoInverse': '\\uEB6D',\n 'OfficeLogo': '\\uEB6E',\n 'SkypeLogo': '\\uEB6F',\n 'Door': '\\uEB75',\n 'EditMirrored': '\\uEB7E',\n 'GiftCard': '\\uEB8E',\n 'DoubleBookmark': '\\uEB8F',\n 'StatusErrorFull': '\\uEB90'\n }\n };\n (0,_fluentui_style_utilities__WEBPACK_IMPORTED_MODULE_0__.registerIcons)(subset, options);\n}", "function createRalphIcon(wrapper, height, iconLoc, size) {\n\n\t//Heart is 20px wide\n\tvar width = size ? size : 9;\n\tvar scale = width / 20;\n\n\t//Heart\n\twrapper.append(\"path\")\n\t\t.attr(\"class\", \"ralph-icon\")\t\n\t\t.attr(\"transform\", \"translate(\" + iconLoc + \",\" + height + \")scale(\" + scale + \")translate(0,\" + (-24) + \")\")\n\t\t.attr(\"d\", \"M5.7.08C.08,0-5.11,8.76,10,17.87a.06.06,0,0,1,.1,0C25.76,8.47,19.71-.59,13.91.12a4.54,4.54,0,0,0-3.83,2.61A4.54,4.54,0,0,0,6.24.12L5.7.08h0Z\");\n\n\treturn iconLoc + width + 1;\n}//createRalphIcon", "function weatherIcon(weather) {\n if (weather > 800) {\n icon = String.fromCodePoint(0x1F325);\n }\n else if (weather == 800) {\n icon = String.fromCodePoint(0x2600);\n }\n else if (weather > 299 && weather < 600) {\n icon = String.fromCodePoint(0x1F327);\n }\n else if (weather < 300) {\n icon = String.fromCodePoint(0x26C8);\n }\n else if (weather > 599 && weather < 700) {\n icon = String.fromCodePoint(0x1F328);\n }\n else {\n icon = String.fromCodePoint(0x1F32B);\n }\n}", "function initializeIcons(baseUrl, options) {\n if (baseUrl === void 0) { baseUrl = ''; }\n var subset = {\n style: {\n MozOsxFontSmoothing: 'grayscale',\n WebkitFontSmoothing: 'antialiased',\n fontStyle: 'normal',\n fontWeight: 'normal',\n speak: 'none'\n },\n fontFace: {\n fontFamily: \"\\\"FabricMDL2Icons-9\\\"\",\n src: \"url('\" + baseUrl + \"fabric-icons-9-c6162b42.woff') format('woff')\"\n },\n icons: {\n 'AddFavoriteFill': '\\uF0C9',\n 'BufferTimeBefore': '\\uF0CF',\n 'BufferTimeAfter': '\\uF0D0',\n 'BufferTimeBoth': '\\uF0D1',\n 'PublishContent': '\\uF0D4',\n 'ClipboardList': '\\uF0E3',\n 'ClipboardListMirrored': '\\uF0E4',\n 'CannedChat': '\\uF0F2',\n 'SkypeForBusinessLogo': '\\uF0FC',\n 'TabCenter': '\\uF100',\n 'PageCheckedin': '\\uF104',\n 'PageList': '\\uF106',\n 'ReadOutLoud': '\\uF112',\n 'CaretBottomLeftSolid8': '\\uF121',\n 'CaretBottomRightSolid8': '\\uF122',\n 'FolderHorizontal': '\\uF12B',\n 'MicrosoftStaffhubLogo': '\\uF130',\n 'GiftboxOpen': '\\uF133',\n 'StatusCircleOuter': '\\uF136',\n 'StatusCircleInner': '\\uF137',\n 'StatusCircleRing': '\\uF138',\n 'StatusTriangleOuter': '\\uF139',\n 'StatusTriangleInner': '\\uF13A',\n 'StatusTriangleExclamation': '\\uF13B',\n 'StatusCircleExclamation': '\\uF13C',\n 'StatusCircleErrorX': '\\uF13D',\n 'StatusCircleInfo': '\\uF13F',\n 'StatusCircleBlock': '\\uF140',\n 'StatusCircleBlock2': '\\uF141',\n 'StatusCircleQuestionMark': '\\uF142',\n 'StatusCircleSync': '\\uF143',\n 'Toll': '\\uF160',\n 'ExploreContentSingle': '\\uF164',\n 'CollapseContent': '\\uF165',\n 'CollapseContentSingle': '\\uF166',\n 'InfoSolid': '\\uF167',\n 'GroupList': '\\uF168',\n 'ProgressRingDots': '\\uF16A',\n 'CaloriesAdd': '\\uF172',\n 'BranchFork': '\\uF173',\n 'MuteChat': '\\uF17A',\n 'AddHome': '\\uF17B',\n 'AddWork': '\\uF17C',\n 'MobileReport': '\\uF18A',\n 'ScaleVolume': '\\uF18C',\n 'HardDriveGroup': '\\uF18F',\n 'FastMode': '\\uF19A',\n 'ToggleLeft': '\\uF19E',\n 'ToggleRight': '\\uF19F',\n 'TriangleShape': '\\uF1A7',\n 'RectangleShape': '\\uF1A9',\n 'CubeShape': '\\uF1AA',\n 'Trophy2': '\\uF1AE',\n 'BucketColor': '\\uF1B6',\n 'BucketColorFill': '\\uF1B7',\n 'Taskboard': '\\uF1C2',\n 'SingleColumn': '\\uF1D3',\n 'DoubleColumn': '\\uF1D4',\n 'TripleColumn': '\\uF1D5',\n 'ColumnLeftTwoThirds': '\\uF1D6',\n 'ColumnRightTwoThirds': '\\uF1D7',\n 'AccessLogoFill': '\\uF1DB',\n 'AnalyticsLogo': '\\uF1DE',\n 'AnalyticsQuery': '\\uF1DF',\n 'NewAnalyticsQuery': '\\uF1E0',\n 'AnalyticsReport': '\\uF1E1',\n 'WordLogo': '\\uF1E3',\n 'WordLogoFill': '\\uF1E4',\n 'ExcelLogo': '\\uF1E5',\n 'ExcelLogoFill': '\\uF1E6',\n 'OneNoteLogo': '\\uF1E7',\n 'OneNoteLogoFill': '\\uF1E8',\n 'OutlookLogo': '\\uF1E9',\n 'OutlookLogoFill': '\\uF1EA',\n 'PowerPointLogo': '\\uF1EB',\n 'PowerPointLogoFill': '\\uF1EC',\n 'PublisherLogo': '\\uF1ED',\n 'PublisherLogoFill': '\\uF1EE',\n 'ScheduleEventAction': '\\uF1EF',\n 'FlameSolid': '\\uF1F3',\n 'ServerProcesses': '\\uF1FE',\n 'Server': '\\uF201',\n 'SaveAll': '\\uF203',\n 'LinkedInLogo': '\\uF20A',\n 'Decimals': '\\uF218',\n 'SidePanelMirrored': '\\uF221',\n 'ProtectRestrict': '\\uF22A',\n 'Blog': '\\uF22B',\n 'UnknownMirrored': '\\uF22E',\n 'PublicContactCardMirrored': '\\uF230',\n 'GridViewSmall': '\\uF232',\n 'GridViewMedium': '\\uF233',\n 'GridViewLarge': '\\uF234',\n 'Step': '\\uF241',\n 'StepInsert': '\\uF242',\n 'StepShared': '\\uF243',\n 'StepSharedAdd': '\\uF244',\n 'StepSharedInsert': '\\uF245',\n 'ViewDashboard': '\\uF246',\n 'ViewList': '\\uF247'\n }\n };\n (0,_fluentui_style_utilities__WEBPACK_IMPORTED_MODULE_0__.registerIcons)(subset, options);\n}", "function initializeIcons(baseUrl, options) {\n if (baseUrl === void 0) { baseUrl = ''; }\n var subset = {\n style: {\n MozOsxFontSmoothing: 'grayscale',\n WebkitFontSmoothing: 'antialiased',\n fontStyle: 'normal',\n fontWeight: 'normal',\n speak: 'none'\n },\n fontFace: {\n fontFamily: \"\\\"FabricMDL2Icons-9\\\"\",\n src: \"url('\" + baseUrl + \"fabric-icons-9-c6162b42.woff') format('woff')\"\n },\n icons: {\n 'AddFavoriteFill': '\\uF0C9',\n 'BufferTimeBefore': '\\uF0CF',\n 'BufferTimeAfter': '\\uF0D0',\n 'BufferTimeBoth': '\\uF0D1',\n 'PublishContent': '\\uF0D4',\n 'ClipboardList': '\\uF0E3',\n 'ClipboardListMirrored': '\\uF0E4',\n 'CannedChat': '\\uF0F2',\n 'SkypeForBusinessLogo': '\\uF0FC',\n 'TabCenter': '\\uF100',\n 'PageCheckedin': '\\uF104',\n 'PageList': '\\uF106',\n 'ReadOutLoud': '\\uF112',\n 'CaretBottomLeftSolid8': '\\uF121',\n 'CaretBottomRightSolid8': '\\uF122',\n 'FolderHorizontal': '\\uF12B',\n 'MicrosoftStaffhubLogo': '\\uF130',\n 'GiftboxOpen': '\\uF133',\n 'StatusCircleOuter': '\\uF136',\n 'StatusCircleInner': '\\uF137',\n 'StatusCircleRing': '\\uF138',\n 'StatusTriangleOuter': '\\uF139',\n 'StatusTriangleInner': '\\uF13A',\n 'StatusTriangleExclamation': '\\uF13B',\n 'StatusCircleExclamation': '\\uF13C',\n 'StatusCircleErrorX': '\\uF13D',\n 'StatusCircleInfo': '\\uF13F',\n 'StatusCircleBlock': '\\uF140',\n 'StatusCircleBlock2': '\\uF141',\n 'StatusCircleQuestionMark': '\\uF142',\n 'StatusCircleSync': '\\uF143',\n 'Toll': '\\uF160',\n 'ExploreContentSingle': '\\uF164',\n 'CollapseContent': '\\uF165',\n 'CollapseContentSingle': '\\uF166',\n 'InfoSolid': '\\uF167',\n 'GroupList': '\\uF168',\n 'ProgressRingDots': '\\uF16A',\n 'CaloriesAdd': '\\uF172',\n 'BranchFork': '\\uF173',\n 'MuteChat': '\\uF17A',\n 'AddHome': '\\uF17B',\n 'AddWork': '\\uF17C',\n 'MobileReport': '\\uF18A',\n 'ScaleVolume': '\\uF18C',\n 'HardDriveGroup': '\\uF18F',\n 'FastMode': '\\uF19A',\n 'ToggleLeft': '\\uF19E',\n 'ToggleRight': '\\uF19F',\n 'TriangleShape': '\\uF1A7',\n 'RectangleShape': '\\uF1A9',\n 'CubeShape': '\\uF1AA',\n 'Trophy2': '\\uF1AE',\n 'BucketColor': '\\uF1B6',\n 'BucketColorFill': '\\uF1B7',\n 'Taskboard': '\\uF1C2',\n 'SingleColumn': '\\uF1D3',\n 'DoubleColumn': '\\uF1D4',\n 'TripleColumn': '\\uF1D5',\n 'ColumnLeftTwoThirds': '\\uF1D6',\n 'ColumnRightTwoThirds': '\\uF1D7',\n 'AccessLogoFill': '\\uF1DB',\n 'AnalyticsLogo': '\\uF1DE',\n 'AnalyticsQuery': '\\uF1DF',\n 'NewAnalyticsQuery': '\\uF1E0',\n 'AnalyticsReport': '\\uF1E1',\n 'WordLogo': '\\uF1E3',\n 'WordLogoFill': '\\uF1E4',\n 'ExcelLogo': '\\uF1E5',\n 'ExcelLogoFill': '\\uF1E6',\n 'OneNoteLogo': '\\uF1E7',\n 'OneNoteLogoFill': '\\uF1E8',\n 'OutlookLogo': '\\uF1E9',\n 'OutlookLogoFill': '\\uF1EA',\n 'PowerPointLogo': '\\uF1EB',\n 'PowerPointLogoFill': '\\uF1EC',\n 'PublisherLogo': '\\uF1ED',\n 'PublisherLogoFill': '\\uF1EE',\n 'ScheduleEventAction': '\\uF1EF',\n 'FlameSolid': '\\uF1F3',\n 'ServerProcesses': '\\uF1FE',\n 'Server': '\\uF201',\n 'SaveAll': '\\uF203',\n 'LinkedInLogo': '\\uF20A',\n 'Decimals': '\\uF218',\n 'SidePanelMirrored': '\\uF221',\n 'ProtectRestrict': '\\uF22A',\n 'Blog': '\\uF22B',\n 'UnknownMirrored': '\\uF22E',\n 'PublicContactCardMirrored': '\\uF230',\n 'GridViewSmall': '\\uF232',\n 'GridViewMedium': '\\uF233',\n 'GridViewLarge': '\\uF234',\n 'Step': '\\uF241',\n 'StepInsert': '\\uF242',\n 'StepShared': '\\uF243',\n 'StepSharedAdd': '\\uF244',\n 'StepSharedInsert': '\\uF245',\n 'ViewDashboard': '\\uF246',\n 'ViewList': '\\uF247'\n }\n };\n (0,_fluentui_style_utilities__WEBPACK_IMPORTED_MODULE_0__.registerIcons)(subset, options);\n}", "buildIcons(){\n for(var i=0; i<this.popUpFltImgs.length; i++){\n this.buildIcon(i, false);\n }\n }", "function createIcon() {\n var newIcon = new HmiObject();\n newIcon.uid = Date.now();\n newIcon.typeId = 'icon';\n newIcon.type = 'Icon';\n return newIcon;\n }", "function initializeIcons(baseUrl, options) {\n if (baseUrl === void 0) { baseUrl = ''; }\n var subset = {\n style: {\n MozOsxFontSmoothing: 'grayscale',\n WebkitFontSmoothing: 'antialiased',\n fontStyle: 'normal',\n fontWeight: 'normal',\n speak: 'none'\n },\n fontFace: {\n fontFamily: \"\\\"FabricMDL2Icons-0\\\"\",\n src: \"url('\" + baseUrl + \"fabric-icons-0-467ee27f.woff') format('woff')\"\n },\n icons: {\n 'PageLink': '\\uE302',\n 'CommentSolid': '\\uE30E',\n 'ChangeEntitlements': '\\uE310',\n 'Installation': '\\uE311',\n 'WebAppBuilderModule': '\\uE313',\n 'WebAppBuilderFragment': '\\uE314',\n 'WebAppBuilderSlot': '\\uE315',\n 'BullseyeTargetEdit': '\\uE319',\n 'WebAppBuilderFragmentCreate': '\\uE31B',\n 'PageData': '\\uE31C',\n 'PageHeaderEdit': '\\uE31D',\n 'ProductList': '\\uE31E',\n 'UnpublishContent': '\\uE31F',\n 'DependencyAdd': '\\uE344',\n 'DependencyRemove': '\\uE345',\n 'EntitlementPolicy': '\\uE346',\n 'EntitlementRedemption': '\\uE347',\n 'SchoolDataSyncLogo': '\\uE34C',\n 'PinSolid12': '\\uE352',\n 'PinSolidOff12': '\\uE353',\n 'AddLink': '\\uE35E',\n 'SharepointAppIcon16': '\\uE365',\n 'DataflowsLink': '\\uE366',\n 'TimePicker': '\\uE367',\n 'UserWarning': '\\uE368',\n 'ComplianceAudit': '\\uE369',\n 'InternetSharing': '\\uE704',\n 'Brightness': '\\uE706',\n 'MapPin': '\\uE707',\n 'Airplane': '\\uE709',\n 'Tablet': '\\uE70A',\n 'QuickNote': '\\uE70B',\n 'Video': '\\uE714',\n 'People': '\\uE716',\n 'Phone': '\\uE717',\n 'Pin': '\\uE718',\n 'Shop': '\\uE719',\n 'Stop': '\\uE71A',\n 'Link': '\\uE71B',\n 'AllApps': '\\uE71D',\n 'Zoom': '\\uE71E',\n 'ZoomOut': '\\uE71F',\n 'Microphone': '\\uE720',\n 'Camera': '\\uE722',\n 'Attach': '\\uE723',\n 'Send': '\\uE724',\n 'FavoriteList': '\\uE728',\n 'PageSolid': '\\uE729',\n 'Forward': '\\uE72A',\n 'Back': '\\uE72B',\n 'Refresh': '\\uE72C',\n 'Lock': '\\uE72E',\n 'ReportHacked': '\\uE730',\n 'EMI': '\\uE731',\n 'MiniLink': '\\uE732',\n 'Blocked': '\\uE733',\n 'ReadingMode': '\\uE736',\n 'Favicon': '\\uE737',\n 'Remove': '\\uE738',\n 'Checkbox': '\\uE739',\n 'CheckboxComposite': '\\uE73A',\n 'CheckboxFill': '\\uE73B',\n 'CheckboxIndeterminate': '\\uE73C',\n 'CheckboxCompositeReversed': '\\uE73D',\n 'BackToWindow': '\\uE73F',\n 'FullScreen': '\\uE740',\n 'Print': '\\uE749',\n 'Up': '\\uE74A',\n 'Down': '\\uE74B',\n 'OEM': '\\uE74C',\n 'Save': '\\uE74E',\n 'ReturnKey': '\\uE751',\n 'Cloud': '\\uE753',\n 'Flashlight': '\\uE754',\n 'CommandPrompt': '\\uE756',\n 'Sad': '\\uE757',\n 'RealEstate': '\\uE758',\n 'SIPMove': '\\uE759',\n 'EraseTool': '\\uE75C',\n 'GripperTool': '\\uE75E',\n 'Dialpad': '\\uE75F',\n 'PageLeft': '\\uE760',\n 'PageRight': '\\uE761',\n 'MultiSelect': '\\uE762',\n 'KeyboardClassic': '\\uE765',\n 'Play': '\\uE768',\n 'Pause': '\\uE769',\n 'InkingTool': '\\uE76D',\n 'Emoji2': '\\uE76E',\n 'GripperBarHorizontal': '\\uE76F',\n 'System': '\\uE770',\n 'Personalize': '\\uE771',\n 'SearchAndApps': '\\uE773',\n 'Globe': '\\uE774',\n 'EaseOfAccess': '\\uE776',\n 'ContactInfo': '\\uE779',\n 'Unpin': '\\uE77A',\n 'Contact': '\\uE77B',\n 'Memo': '\\uE77C',\n 'IncomingCall': '\\uE77E'\n }\n };\n (0,_fluentui_style_utilities__WEBPACK_IMPORTED_MODULE_0__.registerIcons)(subset, options);\n}", "function initializeIcons(baseUrl, options) {\n if (baseUrl === void 0) { baseUrl = ''; }\n var subset = {\n style: {\n MozOsxFontSmoothing: 'grayscale',\n WebkitFontSmoothing: 'antialiased',\n fontStyle: 'normal',\n fontWeight: 'normal',\n speak: 'none'\n },\n fontFace: {\n fontFamily: \"\\\"FabricMDL2Icons-0\\\"\",\n src: \"url('\" + baseUrl + \"fabric-icons-0-467ee27f.woff') format('woff')\"\n },\n icons: {\n 'PageLink': '\\uE302',\n 'CommentSolid': '\\uE30E',\n 'ChangeEntitlements': '\\uE310',\n 'Installation': '\\uE311',\n 'WebAppBuilderModule': '\\uE313',\n 'WebAppBuilderFragment': '\\uE314',\n 'WebAppBuilderSlot': '\\uE315',\n 'BullseyeTargetEdit': '\\uE319',\n 'WebAppBuilderFragmentCreate': '\\uE31B',\n 'PageData': '\\uE31C',\n 'PageHeaderEdit': '\\uE31D',\n 'ProductList': '\\uE31E',\n 'UnpublishContent': '\\uE31F',\n 'DependencyAdd': '\\uE344',\n 'DependencyRemove': '\\uE345',\n 'EntitlementPolicy': '\\uE346',\n 'EntitlementRedemption': '\\uE347',\n 'SchoolDataSyncLogo': '\\uE34C',\n 'PinSolid12': '\\uE352',\n 'PinSolidOff12': '\\uE353',\n 'AddLink': '\\uE35E',\n 'SharepointAppIcon16': '\\uE365',\n 'DataflowsLink': '\\uE366',\n 'TimePicker': '\\uE367',\n 'UserWarning': '\\uE368',\n 'ComplianceAudit': '\\uE369',\n 'InternetSharing': '\\uE704',\n 'Brightness': '\\uE706',\n 'MapPin': '\\uE707',\n 'Airplane': '\\uE709',\n 'Tablet': '\\uE70A',\n 'QuickNote': '\\uE70B',\n 'Video': '\\uE714',\n 'People': '\\uE716',\n 'Phone': '\\uE717',\n 'Pin': '\\uE718',\n 'Shop': '\\uE719',\n 'Stop': '\\uE71A',\n 'Link': '\\uE71B',\n 'AllApps': '\\uE71D',\n 'Zoom': '\\uE71E',\n 'ZoomOut': '\\uE71F',\n 'Microphone': '\\uE720',\n 'Camera': '\\uE722',\n 'Attach': '\\uE723',\n 'Send': '\\uE724',\n 'FavoriteList': '\\uE728',\n 'PageSolid': '\\uE729',\n 'Forward': '\\uE72A',\n 'Back': '\\uE72B',\n 'Refresh': '\\uE72C',\n 'Lock': '\\uE72E',\n 'ReportHacked': '\\uE730',\n 'EMI': '\\uE731',\n 'MiniLink': '\\uE732',\n 'Blocked': '\\uE733',\n 'ReadingMode': '\\uE736',\n 'Favicon': '\\uE737',\n 'Remove': '\\uE738',\n 'Checkbox': '\\uE739',\n 'CheckboxComposite': '\\uE73A',\n 'CheckboxFill': '\\uE73B',\n 'CheckboxIndeterminate': '\\uE73C',\n 'CheckboxCompositeReversed': '\\uE73D',\n 'BackToWindow': '\\uE73F',\n 'FullScreen': '\\uE740',\n 'Print': '\\uE749',\n 'Up': '\\uE74A',\n 'Down': '\\uE74B',\n 'OEM': '\\uE74C',\n 'Save': '\\uE74E',\n 'ReturnKey': '\\uE751',\n 'Cloud': '\\uE753',\n 'Flashlight': '\\uE754',\n 'CommandPrompt': '\\uE756',\n 'Sad': '\\uE757',\n 'RealEstate': '\\uE758',\n 'SIPMove': '\\uE759',\n 'EraseTool': '\\uE75C',\n 'GripperTool': '\\uE75E',\n 'Dialpad': '\\uE75F',\n 'PageLeft': '\\uE760',\n 'PageRight': '\\uE761',\n 'MultiSelect': '\\uE762',\n 'KeyboardClassic': '\\uE765',\n 'Play': '\\uE768',\n 'Pause': '\\uE769',\n 'InkingTool': '\\uE76D',\n 'Emoji2': '\\uE76E',\n 'GripperBarHorizontal': '\\uE76F',\n 'System': '\\uE770',\n 'Personalize': '\\uE771',\n 'SearchAndApps': '\\uE773',\n 'Globe': '\\uE774',\n 'EaseOfAccess': '\\uE776',\n 'ContactInfo': '\\uE779',\n 'Unpin': '\\uE77A',\n 'Contact': '\\uE77B',\n 'Memo': '\\uE77C',\n 'IncomingCall': '\\uE77E'\n }\n };\n (0,_fluentui_style_utilities__WEBPACK_IMPORTED_MODULE_0__.registerIcons)(subset, options);\n}", "function initializeIcons(baseUrl, options) {\n if (baseUrl === void 0) { baseUrl = ''; }\n var subset = {\n style: {\n MozOsxFontSmoothing: 'grayscale',\n WebkitFontSmoothing: 'antialiased',\n fontStyle: 'normal',\n fontWeight: 'normal',\n speak: 'none'\n },\n fontFace: {\n fontFamily: \"\\\"FabricMDL2Icons-8\\\"\",\n src: \"url('\" + baseUrl + \"fabric-icons-8-6fdf1528.woff') format('woff')\"\n },\n icons: {\n 'CollapseMenu': '\\uEF66',\n 'ExpandMenu': '\\uEF67',\n 'Boards': '\\uEF68',\n 'SunAdd': '\\uEF69',\n 'SunQuestionMark': '\\uEF6A',\n 'LandscapeOrientation': '\\uEF6B',\n 'DocumentSearch': '\\uEF6C',\n 'PublicCalendar': '\\uEF6D',\n 'PublicContactCard': '\\uEF6E',\n 'PublicEmail': '\\uEF6F',\n 'PublicFolder': '\\uEF70',\n 'WordDocument': '\\uEF71',\n 'PowerPointDocument': '\\uEF72',\n 'ExcelDocument': '\\uEF73',\n 'GroupedList': '\\uEF74',\n 'ClassroomLogo': '\\uEF75',\n 'Sections': '\\uEF76',\n 'EditPhoto': '\\uEF77',\n 'Starburst': '\\uEF78',\n 'ShareiOS': '\\uEF79',\n 'AirTickets': '\\uEF7A',\n 'PencilReply': '\\uEF7B',\n 'Tiles2': '\\uEF7C',\n 'SkypeCircleCheck': '\\uEF7D',\n 'SkypeCircleClock': '\\uEF7E',\n 'SkypeCircleMinus': '\\uEF7F',\n 'SkypeMessage': '\\uEF83',\n 'ClosedCaption': '\\uEF84',\n 'ATPLogo': '\\uEF85',\n 'OfficeFormsLogoInverse': '\\uEF86',\n 'RecycleBin': '\\uEF87',\n 'EmptyRecycleBin': '\\uEF88',\n 'Hide2': '\\uEF89',\n 'Breadcrumb': '\\uEF8C',\n 'BirthdayCake': '\\uEF8D',\n 'TimeEntry': '\\uEF95',\n 'CRMProcesses': '\\uEFB1',\n 'PageEdit': '\\uEFB6',\n 'PageArrowRight': '\\uEFB8',\n 'PageRemove': '\\uEFBA',\n 'Database': '\\uEFC7',\n 'DataManagementSettings': '\\uEFC8',\n 'CRMServices': '\\uEFD2',\n 'EditContact': '\\uEFD3',\n 'ConnectContacts': '\\uEFD4',\n 'AppIconDefaultAdd': '\\uEFDA',\n 'AppIconDefaultList': '\\uEFDE',\n 'ActivateOrders': '\\uEFE0',\n 'DeactivateOrders': '\\uEFE1',\n 'ProductCatalog': '\\uEFE8',\n 'ScatterChart': '\\uEFEB',\n 'AccountActivity': '\\uEFF4',\n 'DocumentManagement': '\\uEFFC',\n 'CRMReport': '\\uEFFE',\n 'KnowledgeArticle': '\\uF000',\n 'Relationship': '\\uF003',\n 'HomeVerify': '\\uF00E',\n 'ZipFolder': '\\uF012',\n 'SurveyQuestions': '\\uF01B',\n 'TextDocument': '\\uF029',\n 'TextDocumentShared': '\\uF02B',\n 'PageCheckedOut': '\\uF02C',\n 'PageShared': '\\uF02D',\n 'SaveAndClose': '\\uF038',\n 'Script': '\\uF03A',\n 'Archive': '\\uF03F',\n 'ActivityFeed': '\\uF056',\n 'Compare': '\\uF057',\n 'EventDate': '\\uF059',\n 'ArrowUpRight': '\\uF069',\n 'CaretRight': '\\uF06B',\n 'SetAction': '\\uF071',\n 'ChatBot': '\\uF08B',\n 'CaretSolidLeft': '\\uF08D',\n 'CaretSolidDown': '\\uF08E',\n 'CaretSolidRight': '\\uF08F',\n 'CaretSolidUp': '\\uF090',\n 'PowerAppsLogo': '\\uF091',\n 'PowerApps2Logo': '\\uF092',\n 'SearchIssue': '\\uF09A',\n 'SearchIssueMirrored': '\\uF09B',\n 'FabricAssetLibrary': '\\uF09C',\n 'FabricDataConnectionLibrary': '\\uF09D',\n 'FabricDocLibrary': '\\uF09E',\n 'FabricFormLibrary': '\\uF09F',\n 'FabricFormLibraryMirrored': '\\uF0A0',\n 'FabricReportLibrary': '\\uF0A1',\n 'FabricReportLibraryMirrored': '\\uF0A2',\n 'FabricPublicFolder': '\\uF0A3',\n 'FabricFolderSearch': '\\uF0A4',\n 'FabricMovetoFolder': '\\uF0A5',\n 'FabricUnsyncFolder': '\\uF0A6',\n 'FabricSyncFolder': '\\uF0A7',\n 'FabricOpenFolderHorizontal': '\\uF0A8',\n 'FabricFolder': '\\uF0A9',\n 'FabricFolderFill': '\\uF0AA',\n 'FabricNewFolder': '\\uF0AB',\n 'FabricPictureLibrary': '\\uF0AC',\n 'PhotoVideoMedia': '\\uF0B1',\n 'AddFavorite': '\\uF0C8'\n }\n };\n (0,_fluentui_style_utilities__WEBPACK_IMPORTED_MODULE_0__.registerIcons)(subset, options);\n}", "function initializeIcons(baseUrl, options) {\n if (baseUrl === void 0) { baseUrl = ''; }\n var subset = {\n style: {\n MozOsxFontSmoothing: 'grayscale',\n WebkitFontSmoothing: 'antialiased',\n fontStyle: 'normal',\n fontWeight: 'normal',\n speak: 'none'\n },\n fontFace: {\n fontFamily: \"\\\"FabricMDL2Icons-8\\\"\",\n src: \"url('\" + baseUrl + \"fabric-icons-8-6fdf1528.woff') format('woff')\"\n },\n icons: {\n 'CollapseMenu': '\\uEF66',\n 'ExpandMenu': '\\uEF67',\n 'Boards': '\\uEF68',\n 'SunAdd': '\\uEF69',\n 'SunQuestionMark': '\\uEF6A',\n 'LandscapeOrientation': '\\uEF6B',\n 'DocumentSearch': '\\uEF6C',\n 'PublicCalendar': '\\uEF6D',\n 'PublicContactCard': '\\uEF6E',\n 'PublicEmail': '\\uEF6F',\n 'PublicFolder': '\\uEF70',\n 'WordDocument': '\\uEF71',\n 'PowerPointDocument': '\\uEF72',\n 'ExcelDocument': '\\uEF73',\n 'GroupedList': '\\uEF74',\n 'ClassroomLogo': '\\uEF75',\n 'Sections': '\\uEF76',\n 'EditPhoto': '\\uEF77',\n 'Starburst': '\\uEF78',\n 'ShareiOS': '\\uEF79',\n 'AirTickets': '\\uEF7A',\n 'PencilReply': '\\uEF7B',\n 'Tiles2': '\\uEF7C',\n 'SkypeCircleCheck': '\\uEF7D',\n 'SkypeCircleClock': '\\uEF7E',\n 'SkypeCircleMinus': '\\uEF7F',\n 'SkypeMessage': '\\uEF83',\n 'ClosedCaption': '\\uEF84',\n 'ATPLogo': '\\uEF85',\n 'OfficeFormsLogoInverse': '\\uEF86',\n 'RecycleBin': '\\uEF87',\n 'EmptyRecycleBin': '\\uEF88',\n 'Hide2': '\\uEF89',\n 'Breadcrumb': '\\uEF8C',\n 'BirthdayCake': '\\uEF8D',\n 'TimeEntry': '\\uEF95',\n 'CRMProcesses': '\\uEFB1',\n 'PageEdit': '\\uEFB6',\n 'PageArrowRight': '\\uEFB8',\n 'PageRemove': '\\uEFBA',\n 'Database': '\\uEFC7',\n 'DataManagementSettings': '\\uEFC8',\n 'CRMServices': '\\uEFD2',\n 'EditContact': '\\uEFD3',\n 'ConnectContacts': '\\uEFD4',\n 'AppIconDefaultAdd': '\\uEFDA',\n 'AppIconDefaultList': '\\uEFDE',\n 'ActivateOrders': '\\uEFE0',\n 'DeactivateOrders': '\\uEFE1',\n 'ProductCatalog': '\\uEFE8',\n 'ScatterChart': '\\uEFEB',\n 'AccountActivity': '\\uEFF4',\n 'DocumentManagement': '\\uEFFC',\n 'CRMReport': '\\uEFFE',\n 'KnowledgeArticle': '\\uF000',\n 'Relationship': '\\uF003',\n 'HomeVerify': '\\uF00E',\n 'ZipFolder': '\\uF012',\n 'SurveyQuestions': '\\uF01B',\n 'TextDocument': '\\uF029',\n 'TextDocumentShared': '\\uF02B',\n 'PageCheckedOut': '\\uF02C',\n 'PageShared': '\\uF02D',\n 'SaveAndClose': '\\uF038',\n 'Script': '\\uF03A',\n 'Archive': '\\uF03F',\n 'ActivityFeed': '\\uF056',\n 'Compare': '\\uF057',\n 'EventDate': '\\uF059',\n 'ArrowUpRight': '\\uF069',\n 'CaretRight': '\\uF06B',\n 'SetAction': '\\uF071',\n 'ChatBot': '\\uF08B',\n 'CaretSolidLeft': '\\uF08D',\n 'CaretSolidDown': '\\uF08E',\n 'CaretSolidRight': '\\uF08F',\n 'CaretSolidUp': '\\uF090',\n 'PowerAppsLogo': '\\uF091',\n 'PowerApps2Logo': '\\uF092',\n 'SearchIssue': '\\uF09A',\n 'SearchIssueMirrored': '\\uF09B',\n 'FabricAssetLibrary': '\\uF09C',\n 'FabricDataConnectionLibrary': '\\uF09D',\n 'FabricDocLibrary': '\\uF09E',\n 'FabricFormLibrary': '\\uF09F',\n 'FabricFormLibraryMirrored': '\\uF0A0',\n 'FabricReportLibrary': '\\uF0A1',\n 'FabricReportLibraryMirrored': '\\uF0A2',\n 'FabricPublicFolder': '\\uF0A3',\n 'FabricFolderSearch': '\\uF0A4',\n 'FabricMovetoFolder': '\\uF0A5',\n 'FabricUnsyncFolder': '\\uF0A6',\n 'FabricSyncFolder': '\\uF0A7',\n 'FabricOpenFolderHorizontal': '\\uF0A8',\n 'FabricFolder': '\\uF0A9',\n 'FabricFolderFill': '\\uF0AA',\n 'FabricNewFolder': '\\uF0AB',\n 'FabricPictureLibrary': '\\uF0AC',\n 'PhotoVideoMedia': '\\uF0B1',\n 'AddFavorite': '\\uF0C8'\n }\n };\n (0,_fluentui_style_utilities__WEBPACK_IMPORTED_MODULE_0__.registerIcons)(subset, options);\n}", "getIcon() {\n switch (this.props.checkr) {\n case \"waitlist\":\n return {\n checkrText: \"Pending waitlist\",\n color: Colors.white,\n name: \"hourglass-empty\"\n };\n case \"clear\":\n return {\n checkrText: \"All Set!\",\n color: Colors.white,\n name: \"check\"\n };\n case \"consider\":\n return {\n checkrText: \"In Review\",\n color: Colors.error,\n name: \"hourglass-empty\"\n };\n case \"pending\":\n return {\n checkrText: \"Pending\",\n color: Colors.secondary,\n name: \"hourglass-full\"\n };\n case \"sent\":\n return {\n checkrText: \"Sent\",\n color: Colors.secondary,\n name: \"hourglass-empty\"\n };\n default:\n return {\n checkrText: \"Error\",\n color: Colors.error,\n name: \"error-outline\"\n };\n }\n }", "function print(array,icons){\n icons.html(\"\");\n array.forEach((element) => {\n const {family,prefix,name,color}= element;\n icons.append( `\n <div>\n <i class=\"${family} ${prefix}${name}\"></i>\n <div class=\"title\">${name}</div>\n </div>\n `\n )\n });\n}", "function IconOptions() {}", "function toggleIcon(grayedOut) {\n\t\tvar head = top.document.getElementsByTagName(\"head\");\n\t\tif (head) {\n\t\t\tvar icon = document.createElement('link');\n\t\t\ticon.type = 'image/x-icon';\n\t\t\ticon.rel = 'shortcut icon';\n\n\t\t\tif (grayedOut) {\n\t\t\t\t// Grayscale.\n\t\t\t\ticon.href = 'data:image/x-icon;base64,AAABAAQAICAAAAEACACoCAAARgAAABAQAAABAAgAaAUAAO4IAAAgIAAAAQAgAKgQAABWDgAAEBAAAAEAIABoBAAA/h4AACgAAAAgAAAAQAAAAAEACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQIBAAYEAwAAAgQABQUFAAkCAQAMBgMAAAYJAAkJCQAODAoADQ0OAAALEgAGDBEAAg4XAAAPGQAAEh4AEhISABQTEwAWFhYAGRkZAB4eHgAADiAAABQiAA0YIAAUHCIACSM0ACEhIQAkJCQAKSkpAC4uLgA2Mi8AMjIyADY2NgA5OTkAPT09AAAtSwAIMU0AADFRAAA4XQAAQGwAG0xsAABEcAAPSnIAAEx/AEFBQQBFRUUASEZFAElJSQBNTU0AUVFRAFVVVQBaWloAXV1dAGFiYgBlZWUAaWlpAG5ubgBxcXEAdXV1AHl5eQB9fX0AAE+FAABVjQAQVYMAGlyIAABYkwAOXZEACF2WAABdmwAAX58AGmOUAAZjoQARaqQAGWuhAAByvgAJeMIAAHvNABJ+xgAcf8MAAYHXAAeC1AAKg9UAAIbcABWV3gAAieMAAIrkAAiW8QAAl/gAAJf/AACZ/gAEmP8AAJ3/AAua+gAAof8ABaH/AASk/wAMo/8ACKT/AGbH/wB/zP8AgYGBAIWFhQCHiIgAiIiIAI2NjQCRkZEAlZWVAJmZmQCenp4AoaGhAKWlpQCoqKgAra2tAKyusACxsbIAtra2ALm5uQC9vb0AuOb/AMHBwQDGxsYAycnJAM/MywDPz88A0tLSANTU1ADZ2dkA3d3dAN/g4ADj4+MA6enpAPHx8QD09PQA+fn5AP7+/gDwwwAA/9IRAP/YMQD/3VEA/+RxAP/qkQD/8LEA//bRAP///wAAAAAALxQAAFAiAABwMAAAkD4AALBNAADPWwAA8GkAAP95EQD/ijEA/51RAP+vcQD/wZEA/9KxAP/l0QD///8AAAAAAC8DAABQBAAAcAYAAJAJAACwCgAAzwwAAPAOAAD/IBIA/z4xAP9cUQD/enEA/5eRAP+2sQD/1NEA////AAAAAAAvAA4AUAAXAHAAIQCQACsAsAA2AM8AQADwAEkA/xFaAP8xcAD/UYYA/3GcAP+RsgD/scgA/9HfAP///wAAAAAALwAgAFAANgBwAEwAkABiALAAeADPAI4A8ACkAP8RswD/Mb4A/1HHAP9x0QD/kdwA/7HlAP/R8AD///8AAAAAACwALwBLAFAAaQBwAIcAkAClALAAxADPAOEA8ADwEf8A8jH/APRR/wD2cf8A95H/APmx/wD70f8A////AAAAAAAbAC8ALQBQAD8AcABSAJAAYwCwAHYAzwCIAPAAmRH/AKYx/wC0Uf8AwnH/AM+R/wDcsf8A69H/AP///wAAAAAACAAvAA4AUAAVAHAAGwCQACEAsAAmAM8ALADwAD4R/wBYMf8AcVH/AIxx/wCmkf8Av7H/ANrR/wD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8PAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAaCAAAAAAAAAAACBswAAAAAAAAAAAAAAAAAAAALAgAAAAAAAAAAAAAAAAAAAAACCwAAAAAAAAAAAAAHQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAfAAAAAAAAMAAAAAAAAAAAAAAAADhkAAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAAAAhhIUwAAAAAAAAAAAAAAAALwAAAAAAABQAAAAAAAAACnyPj34aAAAAAAAAAA8DAAAAADMBAAAhfzsEAAAAAABoj4+Pj2sAAAAAAAAnUiMAAAAyLAQACHiPj2wQAAAAMoaPj4+EMAAAAAAHQVtdTAsAACEsBAE8j4+Pj28IABqBj4+PjzkAAAAAA0RbW1lbPgMAISwDCniPj4+Pj2kKb4+Pj49wAgAAAAA9W1lZW19RDQAhLAQDE2qPj4+PhXeFj4+PfRIAAAAAKVtbWVthSBcBACEsBAAAADmGj4+Pj4+Pj4MgAAAAACVXW1lZXj8CAAAAIS8IAAAAADyPj4+Pj4+POQAAAAAWVVtYW15CAQAAAAAhMREKBAIAAGiPj4+Pj20DAAAAB0pbWVlbRwIAAAAAACEzGxMRCgQDaY+Pj4+PbQMAAABBXVlZWVtFAwAAAAAAITYfHBoTCWWPj4+Pj4+GOAAAJltbWVlZWVs+AAAAAAAhOS0hHRtlho+Pj4+Pj4+CHhVVW1lZW1tYW1krAwAAACE7My8ycI+Pj4+PeYaPj496TltZWVtNXFtZW1lFFgMAIWY3N3+Pj4+Pj3AcdI+Pj492WlhdSwpAYVlZW1tPDgAhaTw5dI+Pj494LRwwgo+Pj49jWVYZAAhJYVlZX0MBACFsamdkgI+PeTQvLyA8ho+Pj4ZiKgUEAAhGYF9QDAAAIXRvbGlvg3U6NzY0MS9wj4+Pj3ESERAIAgYoUyQAAAA2AHBybmxuaGVkOzg3MzWAj4+CLhsbFBMQCQYYBAAAAwAAeHR1cm9tbGpoZDs6NmaFj2QiIiAdHBoTEQkICAQ4AAAAfHR4d3Nxbm1raWdkOXJ0MzIxLywhHx0bGhMaZgAAAAAAAHl1eHd1c3BtbGpoZDw5ODUzMjAtLCAdZAAAAAAAAAAAAAB9d3V1dXRyb21raGdkOzk3NDI2bgAAAAAAAAAAAAAAAAAAAH55dXJycG5sa2hnaG13AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///////n///4AB//wAAD/wAAAPwAAAA4AAAAGAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAGAAAABwAAAA/AAAA/8AAA//4AB////////////KAAAABAAAAAgAAAAAQAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQoABAcKAAAFDgAACA0ACAgIAAgKDAAPDw8AEhAOABQQDQAADhgAAhAZABAQEAAWEhAAEBQXABUVFQAZGRkAHx4dAAAYKAAMHywAJSUlACkpKQAvLy8AMjIyADY2NgA5OTkAPDw8AAArSAACOV4ABTteAAk+YgAAR3YAAEt9AAZPfwAKTnoAQEBAAEdHRwBMR0MASEhIAFJSUgBWVlYAWVlZAF1dXQBiYmIAZmZmAGpqagBycnIAdXV1AHl5eQABXp8AD2afAABkqAAAa7EAEHO0AEeDrAAAg9kAB4neAACb+wAAmf0ABZn8AAGd/gAAof8AAaX/AHLL/wCDg4MAh4eHAJGRkQCXl5cAmZmZAKGhoQCkpKQAqqelAK2trQCxsbEAtbW1ALq6ugDDw8MAycnJAM7OzgDV1dUA2traAN3d3QDk5OQA7OztAPLw7wD09PQA+vr6APj//wD+/v4APf8xAFv/UQB5/3EAmP+RALX/sQDU/9EA////AAAAAAAULwAAIlAAADBwAAA9kAAATLAAAFnPAABn8AAAeP8RAIr/MQCc/1EArv9xAMD/kQDS/7EA5P/RAP///wAAAAAAJi8AAEBQAABacAAAdJAAAI6wAACpzwAAwvAAANH/EQDY/zEA3v9RAOP/cQDp/5EA7/+xAPb/0QD///8AAAAAAC8mAABQQQAAcFsAAJB0AACwjgAAz6kAAPDDAAD/0hEA/9gxAP/dUQD/5HEA/+qRAP/wsQD/9tEA////AAAAAAAvFAAAUCIAAHAwAACQPgAAsE0AAM9bAADwaQAA/3kRAP+KMQD/nVEA/69xAP/BkQD/0rEA/+XRAP///wAAAAAALwMAAFAEAABwBgAAkAkAALAKAADPDAAA8A4AAP8gEgD/PjEA/1xRAP96cQD/l5EA/7axAP/U0QD///8AAAAAAC8ADgBQABcAcAAhAJAAKwCwADYAzwBAAPAASQD/EVoA/zFwAP9RhgD/cZwA/5GyAP+xyAD/0d8A////AAAAAAAvACAAUAA2AHAATACQAGIAsAB4AM8AjgDwAKQA/xGzAP8xvgD/UccA/3HRAP+R3AD/seUA/9HwAP///wAAAAAALAAvAEsAUABpAHAAhwCQAKUAsADEAM8A4QDwAPAR/wDyMf8A9FH/APZx/wD3kf8A+bH/APvR/wD///8AAAAAABsALwAtAFAAPwBwAFIAkABjALAAdgDPAIgA8ACZEf8ApjH/ALRR/wDCcf8Az5H/ANyx/wDr0f8A////AAAAAAAIAC8ADgBQABUAcAAbAJAAIQCwACYAzwAsAPAAPhH/AFgx/wBxUf8AjHH/AKaR/wC/sf8A2tH/AP///wAAAAAAADApJiYpMAAAAAAAAAAAFQAAAAAAAAAAFQAAAAAWAAAAAAAnKQAAAAAAFgApABQMAAAPUlMUAAABEgApFA9PSgwARF9VGAAENDcKFBQoX19GKV9fLQAAMz4+HRQVBS5YX1ZfSAAAID48IgIUGAIAMF9fURAAGzk9IQAAFCYQADBfX1ENAzc9PCAAABQrGkFWX1ZfRzE9Ozw5HwEUMENfX0svWF8/Oh4yPj4cFERCU1AqGUlfVzYABjU4CxRORkhCLywsU1QlEAgOEwAsAE5KSEVCMEZEJCMXEQkoAAAAAE5LSUZCQC8rKEAAAAAAAAAAAABQTkxNAAAAAAAA+B8AAOAHAACAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIABAADgBwAA/D8AACgAAAAgAAAAQAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWAAAAMgAAAFIAAABrAAAAfAAAAIEAAACBAAAAfAAAAGsAAABSAAAAMgAAABYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAADMAAAB2AAAAsQAAAN0AAAD4AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD4AAAA3QAAALEAAAB2AAAAMwAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAGcAAAC+AAAA9gAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD2AAAAvgAAAGcAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAFsAAADQAAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8BAQH/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAANAAAABbAAAABQAAAAAAAAAAAAAAAAAAABsAAACxAAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/bm5u/39/f/8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAACxAAAAGwAAAAAAAAAJAAAAtAAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/zo6Ov/09PT/+Pj4/0xMTP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAC0AAAACQAAAFkBAQH/AAAA/wAAAP8AAAD/Hx8f/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8PDw//z8/P////////////2dnZ/yAgIP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/ABIe/wACA/8AAAD/AAAA/wAAAP8AAABZBQUFqAMDA/8AAAD/AAAA/zk5Of/c3Nz/eHh4/wUFBf8AAAD/AAAA/wAAAP8AAAD/AAAA/4+Pj///////////////////////l5eX/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wBAbP8Ahtz/AC1L/wAAAP8AAAD/AAAA/wAAAKgKCgrGBAQE/wAAAP8JCQn/w8PD////////////n5+f/w8PD/8AAAD/AAAA/wAAAP9VVVX/+/v7//////////////////T09P9LS0v/AAAA/wAAAP8AAAD/AAAA/wAFCP8AWJP/AJz//wCh//8Ae83/AAsS/wAAAP8AAAD/AAAAxgoKCsUEBAT/AQEB/35+fv//////////////////////qKio/wkJCf8AAAD/ICAg/+Pj4///////////////////////cHBw/wAAAP8AAAD/AAAA/wAAAP8AAQH/AF2b/wCf//8Am///AJn//wCe//8AVY7/AAIE/wAAAP8AAADFCgoKxQICAv8MDAz/x8fH////////////////////////////kJCQ/w0NDf+np6f//////////////////////6ysrP8EBAT/AAAA/wAAAP8AAAD/AAAA/wBPhf8Anf//AJr//wCZ//8Amv//BKT//wqD1f8CDhf/AAAA/wAAAMUKCgrFBAQE/wEBAf8aGhr/lZWV///////////////////////6+vr/wcHB//r6+v/////////////////U1NT/FxcX/wAAAP8AAAD/AAAA/wAAAP8ARHD/AJz//wCb//8Amf//AJv//wai//8RaqT/DRgg/wIBAf8AAAD/AAAAxQsLC8UFBQX/AAAA/wAAAP8AAAD/cXFx//z8/P//////////////////////////////////////8fHx/zc3N/8AAAD/AAAA/wAAAP8AAAD/ADFR/wCX+P8AnP//AJn//wCa//8Gof//EFWD/wgDAv8AAAD/AAAA/wAAAP8AAADFExMTxQkJCf8BAQH/AAAA/wAAAP8AAAD/fX19//////////////////////////////////////9ycnL/AAAA/wAAAP8AAAD/AAAA/wAVI/8AieP/AJ7//wCZ//8Amv//BaL//w5dkf8GAQD/AAAA/wAAAP8AAAD/AAAA/wAAAMUeHh7GFBQU/wsLC/8GBgb/AwMD/wAAAP8AAAD/jY2N////////////////////////////o6Oj/wEBAf8AAAD/AAAA/wAAAP8ABwv/AHK+/wCf//8Amf//AJn//wCf//8GY6H/BgQD/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAAxSwsLMcjIyP/GBgY/xMTE/8ODg7/BgYG/wICAv+RkZH///////////////////////////+hoaH/AgIC/wAAAP8AAAD/AAAA/wBYk/8AoP//AJr//wCZ//8Amf//AJ7//wBfn/8AAgP/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAADFOjo6yDMzM/8oKCj/IiIi/xgYGP8LCwv/hYWF//////////////////////////////////39/f9ubm7/AAAA/wAAAP8AOF3/AJv+/wCb//8Amf//AJn//wCZ//8Amf//AJv//wBVjP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAMVJSUnIRERE/zk5Of8sLCz/JCQk/4WFhf/8/Pz//////////////////////////////////////+rq6v82Mi//AA4g/wCK5P8Anf//AJn//wCZ//8An///AJr//wCZ//8Am///AJn8/wBMf/8AAQL/AAAA/wAAAP8AAAD/AAAAxVlZWcpYWFj/S0tL/1RUVP+tra3////////////////////////////Ly8v//Pz8/////////////////8/My/8cf8P/AJv//wCZ//8Amf//A5z//xJ+xv8Lmvr/AJv//wCZ//8Am///AJr//wBfn/8AFCH/AAID/wAAAP8AAADFaGhoy2pqav9oaGj/3d3d////////////////////////////rq6u/ygoKP+4uLj//////////////////////7jm//8EmP//AJf//wCh//8JeML/Dg0P/xpciP8JpP//AJr//wCZ//8Am///AJ7//wGB1/8ADxn/AAAA/wAAAMV4eHjNfn5+/3BwcP+4uLj//////////////////////8fHx/9ERET/KSkp/01NTf/p6en//////////////////////3/M//8Amv//CJbx/wkjNP8AAAD/CwkJ/xlrof8Ipf//AJr//wCZ//8Co///CF2W/wICA/8AAAD/AAAAxoeHh8yUlJT/hoaG/4ODg//f39/////////////IyMj/Xl5e/0tLS/9ISEj/Nzc3/319ff/8/Pz//////////////////P7//2bH//8PSnL/CgEA/wQEBP8BAAD/CwkI/xpjlP8Mo///AKP//weC1P8GDBH/AAAA/wAAAP8AAADEkpKSpqioqP+cnJz/kJCQ/6ioqP/x8fH/vb29/3V1df9oaGj/ZWVl/1xcXP9TU1P/R0dH/66urv//////////////////////rK6w/xcXF/8UExP/EBAQ/wsLC/8FAwP/DAYD/xtMbP8Vld7/CDFN/wAAAP8AAAD/AAAA/wAAAJqwsLBQqqqq/7Kysv+mpqb/n5+f/6SkpP+MjIz/hoaG/4CAgP94eHj/b29v/2dnZ/9bW1v/YGFh/9/g4P///////////+jo6P9IRkX/JSUk/yQkJP8dHR3/GBgY/xISEv8LCgr/DQcD/xQcIv8FBQX/AAAA/wAAAP8AAAD+AAAAQenp6QWoqKiju7u7/7y8vP+xsbH/qKio/6Kiov+bm5v/k5OT/4uLi/+Dg4P/e3t7/3Nzc/9lZWX/h4iI//j5+f/+/v7/gYGB/zs7O/88PDz/NTU1/y4uLv8nJyf/ICAg/xoaGv8TExP/DgwK/woKCf8ICAj/BgYG/wMDA5MAAAABAAAAAOPj4w+0tLSXubm5+MTExP+/v7//tra2/6+vr/+np6f/oKCg/5iYmP+QkJD/iIiI/4CAgP9ycnL/srKz/7e3t/9aWlr/V1dX/1BQUP9ISEj/QUFB/zk5Of8yMjL/Kysr/yQkJP8hISH/Gxsb/xcXF/IeHh6HBgYGBwAAAAAAAAAAAAAAAAAAAADOzs49tLS0sry8vP/Gxsb/w8PD/7u7u/+zs7P/q6ur/6Ojo/+bm5v/lJSU/4yMjP+Dg4P/fHx8/3Jycv9ra2v/Y2Nj/1tbW/9TU1P/TU1N/0ZGRv8/Pz//Nzc3/ywsLPs6OjqkdXV1MAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu7u4Dz8/PSLy8vKG6urrlvr6+/7+/v/+9vb3/uLi4/7CwsP+oqKj/oKCg/5eXl/+Pj4//iIiI/4GBgf95eXn/cXFx/2lpaf9eXl7/VFRU/1JSUt9mZmaWmZmZPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOPj4xrOzs5Wv7+/kri4uMK1tbXmsrKy+a+vr/+srKz/pqam/5+fn/+YmJj/jo6O/4WFhfiAgIDjgYGBvY2NjYqqqqpNz8/PEwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8fHxBebm5hja2towzs7OScbGxlrGxsZfwsLCXsDAwFjFxcVH0dHRLN/f3xXu7u4CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA///////AA//8AAA/8AAAD8AAAAOAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAB4AAAB/AAAB/+AAB//8AD//////8oAAAAEAAAACAAAAABACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAEsAAACEAAAApwAAALcAAAC3AAAApwAAAIQAAABLAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAdQAAANYAAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAANYAAAB1AAAAEAAAAAAAAAApAAAA0AAAAP8AAAD/AAAA/wAAAP8AAAD/UlJS/1paWv8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAANAAAAApAQEBpgAAAP8mJib/Dw8P/wAAAP8AAAD/FhYW/+Tk5P/t7e3/JCQk/wAAAP8AAAD/AAYL/wAYKP8AAAD/AAAApgICAtoUFBT/1dXV/7e3t/8QEBD/AAAA/5qamv//////9PT0/zMzM/8AAAD/AAgN/wBrsf8Ag9r/AA4Y/wAAANoAAADbVVVV////////////pKSk/1paWv/+/v7//////2pqav8AAAD/AAID/wBkqP8Apf//A6X//wU7Xv8AAADbBQUF2ggICP9ycnL//Pz8///////6+vr//////66urv8CAgL/AAAA/wBLff8Aov//A57+/wpOev8EBwr/AAAA2hQUFNoDAwP/AAAA/3Z2dv///////////93d3f8XFxf/AAAA/wArSP8Am/v/AKH//wZPf/8CAAD/AAAA/wAAANotLS3cGRkZ/wMDA/94eHj////////////b29v/FhIQ/wAFDv8Ag9n/AKH//wCe//8AS33/AAAA/wAAAP8AAADaS0tL3Tw8PP+Hh4f/+/v7///////7+/v//////6qnpf8BXp//AKD//wWZ/P8Cnf//AJr8/wBHdv8ABQn/AAAA2mVlZd+Xl5f///////////+5ubn/dnZ2//39/f//////csv//wCY//8JPmL/D2af/wKm//8Aov//Ajle/wAAANuLi4vdkpKS/+zs7P/Y2Nj/XV1d/zk5Of+zs7P///////j///9Hg6z/AAAA/wgKDP8Qc7T/B4ne/wIQGf8AAADYsLCwoaampv+tra3/kJCQ/3Z2dv9lZWX/Z2dn/+3t7v/y8O//TEdD/xoaGf8SEA7/EBQX/wwfLP8AAAD/AAAAmefn5yK+vr7EtLS0/62trf+goKD/kJCQ/3h4eP+jo6P/mZmZ/0dHR/9AQED/MTEx/x8eHf8UEA3/GxsbvQMDAxwAAAAA9PT0CNbW1mPDw8PIurq6+7CwsP+kpKT/k5OT/4ODg/90dHT/YWFh/1RUVPpdXV3Dj4+PXHt7ewUAAAAAAAAAAAAAAAAAAAAA9vb2BePj4znS0tJzw8PDmbi4uKupqamxp6enm7KysnDNzc018/PzAwAAAAAAAAAAAAAAAOAHrEGAAaxBAACsQQAArEEAAKxBAACsQQAArEEAAKxBAACsQQAArEEAAKxBAACsQQAArEEAAKxBgAGsQeAHrEE=';\n\t\t\t} else {\n\t\t\t\t// Color.\n\t\t\t\ticon.href = 'data:image/x-icon;base64,AAABAAQAICAAAAEACACoCAAARgAAABAQAAABAAgAaAUAAO4IAAAgIAAAAQAgAKgQAABWDgAAEBAAAAEAIABoBAAA/h4AACgAAAAgAAAAQAAAAAEACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQIBAAYEAwAAAgQABQUFAAkCAQAMBgMAAAYJAAkJCQAODAoADQ0OAAALEgAGDBEAAg4XAAAPGQAAEh4AEhISABQTEwAWFhYAGRkZAB4eHgAADiAAABQiAA0YIAAUHCIACSM0ACEhIQAkJCQAKSkpAC4uLgA2Mi8AMjIyADY2NgA5OTkAPT09AAAtSwAIMU0AADFRAAA4XQAAQGwAG0xsAABEcAAPSnIAAEx/AEFBQQBFRUUASEZFAElJSQBNTU0AUVFRAFVVVQBaWloAXV1dAGFiYgBlZWUAaWlpAG5ubgBxcXEAdXV1AHl5eQB9fX0AAE+FAABVjQAQVYMAGlyIAABYkwAOXZEACF2WAABdmwAAX58AGmOUAAZjoQARaqQAGWuhAAByvgAJeMIAAHvNABJ+xgAcf8MAAYHXAAeC1AAKg9UAAIbcABWV3gAAieMAAIrkAAiW8QAAl/gAAJf/AACZ/gAEmP8AAJ3/AAua+gAAof8ABaH/AASk/wAMo/8ACKT/AGbH/wB/zP8AgYGBAIWFhQCHiIgAiIiIAI2NjQCRkZEAlZWVAJmZmQCenp4AoaGhAKWlpQCoqKgAra2tAKyusACxsbIAtra2ALm5uQC9vb0AuOb/AMHBwQDGxsYAycnJAM/MywDPz88A0tLSANTU1ADZ2dkA3d3dAN/g4ADj4+MA6enpAPHx8QD09PQA+fn5AP7+/gDwwwAA/9IRAP/YMQD/3VEA/+RxAP/qkQD/8LEA//bRAP///wAAAAAALxQAAFAiAABwMAAAkD4AALBNAADPWwAA8GkAAP95EQD/ijEA/51RAP+vcQD/wZEA/9KxAP/l0QD///8AAAAAAC8DAABQBAAAcAYAAJAJAACwCgAAzwwAAPAOAAD/IBIA/z4xAP9cUQD/enEA/5eRAP+2sQD/1NEA////AAAAAAAvAA4AUAAXAHAAIQCQACsAsAA2AM8AQADwAEkA/xFaAP8xcAD/UYYA/3GcAP+RsgD/scgA/9HfAP///wAAAAAALwAgAFAANgBwAEwAkABiALAAeADPAI4A8ACkAP8RswD/Mb4A/1HHAP9x0QD/kdwA/7HlAP/R8AD///8AAAAAACwALwBLAFAAaQBwAIcAkAClALAAxADPAOEA8ADwEf8A8jH/APRR/wD2cf8A95H/APmx/wD70f8A////AAAAAAAbAC8ALQBQAD8AcABSAJAAYwCwAHYAzwCIAPAAmRH/AKYx/wC0Uf8AwnH/AM+R/wDcsf8A69H/AP///wAAAAAACAAvAA4AUAAVAHAAGwCQACEAsAAmAM8ALADwAD4R/wBYMf8AcVH/AIxx/wCmkf8Av7H/ANrR/wD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8PAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAaCAAAAAAAAAAACBswAAAAAAAAAAAAAAAAAAAALAgAAAAAAAAAAAAAAAAAAAAACCwAAAAAAAAAAAAAHQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAfAAAAAAAAMAAAAAAAAAAAAAAAADhkAAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAAAAAAAhhIUwAAAAAAAAAAAAAAAALwAAAAAAABQAAAAAAAAACnyPj34aAAAAAAAAABEDAAAAADMDAAAhfzsEAAAAAABoj4+Pj2sAAAAAAAAtaR8AAAAyLAQACHiPj2wQAAAAMoaPj4+EMAAAAAAENW9wZQkAACEsBAE8j4+Pj28IABqBj4+PjzkAAAAABDZvb29vNAMAISwDCniPj4+Pj2kKb4+Pj49wAQAAAAAyb29vb3BoEAAhLAQDE2qPj4+PhXeFj4+PfRIAAAAAL29vbm9wORMDACEsBAAAADmGj4+Pj4+Pj4MgAAAAACBub29ucDMCAAAAIS8IAAAAADyPj4+Pj4+POQAAAAASam9ub3A2AwAAAAAhMREKBAEAAGiPj4+Pj20DAAAABDxvbm9vOAIAAAAAACEzGxMRCgQDaY+Pj4+PbQMAAAA1cG9ub282AQAAAAAAITYfHBoTCWWPj4+Pj4+GOAAAIm9vb25vbm80AAAAAAAhOS0hHRtlho+Pj4+Pj4+CHxBqb25vb29ub28xAwAAACE7My8ycI+Pj4+PeYaPj496Z29vbm9nb29vb243EgMAIWY3N3+Pj4+Pj3AcdI+Pj4+Cbm5wZAo1cW5vb29oEAAhaTw5dI+Pj494LRwwgo+Pj498bm0bAAg5cG9ucDYDACFsamdkgI+PeTQvLyA8ho+Pj4Z6MQMEAAg3cHBoCgAAIXRvbGlvg3U6NzY0MS9wj4+Pj3ASERAIAQQxbB8AAAA2AHBybmxuaGVkOzg3MzWAj4+CLRsbFBMQCQQUBAAAAwAAeHR1cm9tbGpoZDs6NmaFj2QiIiAdHBoTEQkICAQ4AAAAfHR4d3Nwbm1raWdkOXJ0MzIxLywhHx0bGhMaZgAAAAAAAHl1eHd1c3BtbGpoZDw5ODUzMjAtLCAdZAAAAAAAAAAAAAB9d3V1dXRyb21raGdkOzk3NDI2bgAAAAAAAAAAAAAAAAAAAH55dXJycG5sa2hnaG13AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///////n///4AB//wAAD/wAAAPwAAAA4AAAAGAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAGAAAABwAAAA/AAAA/8AAA//4AB////////////KAAAABAAAAAgAAAAAQAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQoABAcKAAAFDgAACA0ACAgIAAgKDAAPDw8AEhAOABQQDQAADhgAAhAZABAQEAAWEhAAEBQXABUVFQAZGRkAHx4dAAAYKAAMHywAJSUlACkpKQAvLy8AMjIyADY2NgA5OTkAPDw8AAArSAACOV4ABTteAAk+YgAAR3YAAEt9AAZPfwAKTnoAQEBAAEdHRwBMR0MASEhIAFJSUgBWVlYAWVlZAF1dXQBiYmIAZmZmAGpqagBycnIAdXV1AHl5eQABXp8AD2afAABkqAAAa7EAEHO0AEeDrAAAg9kAB4neAACb+wAAmf0ABZn8AAGd/gAAof8AAaX/AHLL/wCDg4MAh4eHAJGRkQCXl5cAmZmZAKGhoQCkpKQAqqelAK2trQCxsbEAtbW1ALq6ugDDw8MAycnJAM7OzgDV1dUA2traAN3d3QDk5OQA7OztAPLw7wD09PQA+vr6APj//wD+/v4APf8xAFv/UQB5/3EAmP+RALX/sQDU/9EA////AAAAAAAULwAAIlAAADBwAAA9kAAATLAAAFnPAABn8AAAeP8RAIr/MQCc/1EArv9xAMD/kQDS/7EA5P/RAP///wAAAAAAJi8AAEBQAABacAAAdJAAAI6wAACpzwAAwvAAANH/EQDY/zEA3v9RAOP/cQDp/5EA7/+xAPb/0QD///8AAAAAAC8mAABQQQAAcFsAAJB0AACwjgAAz6kAAPDDAAD/0hEA/9gxAP/dUQD/5HEA/+qRAP/wsQD/9tEA////AAAAAAAvFAAAUCIAAHAwAACQPgAAsE0AAM9bAADwaQAA/3kRAP+KMQD/nVEA/69xAP/BkQD/0rEA/+XRAP///wAAAAAALwMAAFAEAABwBgAAkAkAALAKAADPDAAA8A4AAP8gEgD/PjEA/1xRAP96cQD/l5EA/7axAP/U0QD///8AAAAAAC8ADgBQABcAcAAhAJAAKwCwADYAzwBAAPAASQD/EVoA/zFwAP9RhgD/cZwA/5GyAP+xyAD/0d8A////AAAAAAAvACAAUAA2AHAATACQAGIAsAB4AM8AjgDwAKQA/xGzAP8xvgD/UccA/3HRAP+R3AD/seUA/9HwAP///wAAAAAALAAvAEsAUABpAHAAhwCQAKUAsADEAM8A4QDwAPAR/wDyMf8A9FH/APZx/wD3kf8A+bH/APvR/wD///8AAAAAABsALwAtAFAAPwBwAFIAkABjALAAdgDPAIgA8ACZEf8ApjH/ALRR/wDCcf8Az5H/ANyx/wDr0f8A////AAAAAAAIAC8ADgBQABUAcAAbAJAAIQCwACYAzwAsAPAAPhH/AFgx/wBxUf8AjHH/AKaR/wC/sf8A2tH/AP///wAAAAAAADApJiYpMAAAAAAAAAAAFQAAAAAAAAAAFQAAAAAWAAAAAAAnKQAAAAAAFgApABQMAAAPUlMUAAAFEAApFA9PSgwARF9VGQAFL0IHFBQoX19GKV9fLQAALUhIIxQVBS5YX1ZfSAAAJ0hHJwUUGAUAMF9fURAAFkZIKAAAFCYQADBfX1EMBUJIRycAABQrGkFWX1ZfRixIRkdHJwIUMENfX0svWF9ORiQtSEgaFERCU1AqGUlfWEEABjBDDBRORkhCLywsU1QkEAcPEQAsAE5KSEVCMEZEJCMXEQcoAAAAAE5LSUZCQC8rKEAAAAAAAAAAAABQTkxNAAAAAAAA+B8AAOAHAACAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIABAADgBwAA/D8AACgAAAAgAAAAQAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWAAAAMgAAAFIAAABrAAAAfAAAAIEAAACBAAAAfAAAAGsAAABSAAAAMgAAABYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAADMAAAB2AAAAsQAAAN0AAAD4AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD4AAAA3QAAALEAAAB2AAAAMwAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAGcAAAC+AAAA9gAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD2AAAAvgAAAGcAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAFsAAADQAAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8BAQH/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAANAAAABbAAAABQAAAAAAAAAAAAAAAAAAABsAAACxAAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/bm5u/39/f/8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAACxAAAAGwAAAAAAAAAJAAAAtAAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/zo6Ov/09PT/+Pj4/0xMTP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAC0AAAACQAAAFkBAQH/AAAA/wAAAP8AAAD/Hx8f/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8PDw//z8/P////////////2dnZ/yAgIP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/ExMT/wICAv8AAAD/AAAA/wAAAP8AAABZBQUFqAMDA/8AAAD/AAAA/zk5Of/c3Nz/eHh4/wUFBf8AAAD/AAAA/wAAAP8AAAD/AAAA/4+Pj///////////////////////l5eX/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/0ZGRv+RkZH/MTEx/wAAAP8AAAD/AAAA/wAAAKgKCgrGBAQE/wAAAP8JCQn/w8PD////////////n5+f/w8PD/8AAAD/AAAA/wAAAP9VVVX/+/v7//////////////////T09P9LS0v/AAAA/wAAAP8AAAD/AAAA/wUFBf9gYGD/qKio/6urq/+Ghob/CwsL/wAAAP8AAAD/AAAAxgoKCsUEBAT/AQEB/35+fv//////////////////////qKio/wkJCf8AAAD/ICAg/+Pj4///////////////////////cHBw/wAAAP8AAAD/AAAA/wAAAP8AAAD/ZWVl/6qqqv+np6f/pqam/6mpqf9cXFz/AgIC/wAAAP8AAADFCgoKxQICAv8MDAz/x8fH////////////////////////////kJCQ/w0NDf+np6f//////////////////////6ysrP8EBAT/AAAA/wAAAP8AAAD/AAAA/1ZWVv+pqan/p6en/6ampv+np6f/ra2t/46Ojv8PDw//AAAA/wAAAMUKCgrFBAQE/wEBAf8aGhr/lZWV///////////////////////6+vr/wcHB//r6+v/////////////////U1NT/FxcX/wAAAP8AAAD/AAAA/wAAAP9JSUn/qKio/6enp/+mpqb/p6en/6ysrP9xcXH/GRkZ/wEBAf8AAAD/AAAAxQsLC8UFBQX/AAAA/wAAAP8AAAD/cXFx//z8/P//////////////////////////////////////8fHx/zc3N/8AAAD/AAAA/wAAAP8AAAD/NTU1/6Ojo/+oqKj/pqam/6enp/+srKz/W1tb/wMDA/8AAAD/AAAA/wAAAP8AAADFExMTxQkJCf8BAQH/AAAA/wAAAP8AAAD/fX19//////////////////////////////////////9ycnL/AAAA/wAAAP8AAAD/AAAA/xYWFv+UlJT/qamp/6ampv+np6f/rKys/2NjY/8BAQH/AAAA/wAAAP8AAAD/AAAA/wAAAMUeHh7GFBQU/wsLC/8GBgb/AwMD/wAAAP8AAAD/jY2N////////////////////////////o6Oj/wEBAf8AAAD/AAAA/wAAAP8HBwf/fHx8/6qqqv+mpqb/pqam/6qqqv9ra2v/AwMD/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAAxSwsLMcjIyP/GBgY/xMTE/8ODg7/BgYG/wICAv+RkZH///////////////////////////+hoaH/AgIC/wAAAP8AAAD/AAAA/2BgYP+qqqr/p6en/6ampv+mpqb/qamp/2dnZ/8CAgL/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAADFOjo6yDMzM/8oKCj/IiIi/xgYGP8LCwv/hYWF//////////////////////////////////39/f9ubm7/AAAA/wAAAP88PDz/p6en/6enp/+mpqb/pqam/6ampv+mpqb/p6en/1xcXP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAMVJSUnIRERE/zk5Of8sLCz/JCQk/4WFhf/8/Pz//////////////////////////////////////+rq6v8xMTH/ERER/5WVlf+pqan/pqam/6ampv+qqqr/p6en/6ampv+np6f/paWl/1JSUv8BAQH/AAAA/wAAAP8AAAD/AAAAxVlZWcpYWFj/S0tL/1RUVP+tra3////////////////////////////Ly8v//Pz8/////////////////8zMzP+IiIj/p6en/6ampv+mpqb/qKio/4eHh/+np6f/p6en/6ampv+np6f/p6en/2dnZ/8VFRX/AgIC/wAAAP8AAADFaGhoy2pqav9oaGj/3d3d////////////////////////////rq6u/ygoKP+4uLj//////////////////////+jo6P+mpqb/paWl/6urq/+BgYH/DQ0N/2FhYf+urq7/p6en/6ampv+np6f/qamp/4yMjP8QEBD/AAAA/wAAAMV4eHjNfn5+/3BwcP+4uLj//////////////////////8fHx/9ERET/KSkp/01NTf/p6en//////////////////////9LS0v+np6f/oaGh/yUlJf8AAAD/CQkJ/3Jycv+urq7/p6en/6ampv+srKz/ZGRk/wICAv8AAAD/AAAAxoeHh8yUlJT/hoaG/4ODg//f39/////////////IyMj/Xl5e/0tLS/9ISEj/Nzc3/319ff/8/Pz//////////////////v7+/83Nzf9PT0//AQEB/wQEBP8AAAD/CAgI/2lpaf+tra3/rKys/42Njf8MDAz/AAAA/wAAAP8AAADEkpKSpqioqP+cnJz/kJCQ/6ioqP/x8fH/vb29/3V1df9oaGj/ZWVl/1xcXP9TU1P/R0dH/66urv//////////////////////rq6u/xcXF/8TExP/EBAQ/wsLC/8DAwP/BQUF/1BQUP+cnJz/NDQ0/wAAAP8AAAD/AAAA/wAAAJqwsLBQqqqq/7Kysv+mpqb/n5+f/6SkpP+MjIz/hoaG/4CAgP94eHj/b29v/2dnZ/9bW1v/YGBg/9/f3////////////+jo6P9FRUX/JCQk/yQkJP8dHR3/GBgY/xISEv8KCgr/BgYG/xwcHP8FBQX/AAAA/wAAAP8AAAD+AAAAQenp6QWoqKiju7u7/7y8vP+xsbH/qKio/6Kiov+bm5v/k5OT/4uLi/+Dg4P/e3t7/3Nzc/9lZWX/h4eH//j4+P/+/v7/gYGB/zs7O/88PDz/NTU1/y4uLv8nJyf/ICAg/xoaGv8TExP/CwsL/wkJCf8ICAj/BgYG/wMDA5MAAAABAAAAAOPj4w+0tLSXubm5+MTExP+/v7//tra2/6+vr/+np6f/oKCg/5iYmP+QkJD/iIiI/4CAgP9ycnL/srKy/7e3t/9aWlr/V1dX/1BQUP9ISEj/QUFB/zk5Of8yMjL/Kysr/yQkJP8hISH/Gxsb/xcXF/IeHh6HBgYGBwAAAAAAAAAAAAAAAAAAAADOzs49tLS0sry8vP/Gxsb/w8PD/7u7u/+zs7P/q6ur/6Ojo/+bm5v/lJSU/4yMjP+Dg4P/fHx8/3Jycv9ra2v/Y2Nj/1tbW/9TU1P/TU1N/0ZGRv8/Pz//Nzc3/ywsLPs6OjqkdXV1MAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu7u4Dz8/PSLy8vKG6urrlvr6+/7+/v/+9vb3/uLi4/7CwsP+oqKj/oKCg/5eXl/+Pj4//iIiI/4GBgf95eXn/cXFx/2lpaf9eXl7/VFRU/1JSUt9mZmaWmZmZPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOPj4xrOzs5Wv7+/kri4uMK1tbXmsrKy+a+vr/+srKz/pqam/5+fn/+YmJj/jo6O/4WFhfiAgIDjgYGBvY2NjYqqqqpNz8/PEwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8fHxBebm5hja2towzs7OScbGxlrGxsZfwsLCXsDAwFjFxcVH0dHRLN/f3xXu7u4CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA///////AA//8AAA/8AAAD8AAAAOAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAB4AAAB/AAAB/+AAB//8AD//////8oAAAAEAAAACAAAAABACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAEsAAACEAAAApwAAALcAAAC3AAAApwAAAIQAAABLAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAdQAAANYAAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAANYAAAB1AAAAEAAAAAAAAAApAAAA0AAAAP8AAAD/AAAA/wAAAP8AAAD/UlJS/1paWv8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAANAAAAApAQEBpgAAAP8mJib/Dw8P/wAAAP8AAAD/FhYW/+Tk5P/t7e3/JCQk/wAAAP8AAAD/BgYG/xoaGv8AAAD/AAAApgICAtoUFBT/1dXV/7e3t/8QEBD/AAAA/5qamv//////9PT0/zMzM/8AAAD/CAgI/3R0dP+Ojo7/Dw8P/wAAANoAAADbVVVV////////////pKSk/1paWv/+/v7//////2pqav8AAAD/AgIC/21tbf+tra3/rq6u/z8/P/8AAADbBQUF2ggICP9ycnL//Pz8///////6+vr//////66urv8CAgL/AAAA/1FRUf+srKz/qamp/1NTU/8HBwf/AAAA2hQUFNoDAwP/AAAA/3Z2dv///////////93d3f8XFxf/AAAA/y4uLv+mpqb/q6ur/1VVVf8AAAD/AAAA/wAAANotLS3cGRkZ/wMDA/94eHj////////////b29v/ERER/wcHB/+Ojo7/q6ur/6mpqf9RUVH/AAAA/wAAAP8AAADaS0tL3Tw8PP+Hh4f/+/v7///////7+/v//////6ampv9nZ2f/qqqq/6ampv+pqan/pqam/01NTf8FBQX/AAAA2mVlZd+Xl5f///////////+5ubn/dnZ2//39/f//////0NDQ/6ampv9CQkL/bW1t/66urv+srKz/Pj4+/wAAANuLi4vdkpKS/+zs7P/Y2Nj/XV1d/zk5Of+zs7P///////7+/v+IiIj/AAAA/woKCv97e3v/lJSU/xEREf8AAADYsLCwoaampv+tra3/kJCQ/3Z2dv9lZWX/Z2dn/+3t7f/v7+//RkZG/xkZGf8PDw//FBQU/yAgIP8AAAD/AAAAmefn5yK+vr7EtLS0/62trf+goKD/kJCQ/3h4eP+jo6P/mZmZ/0dHR/9AQED/MTEx/x0dHf8PDw//GxsbvQMDAxwAAAAA9PT0CNbW1mPDw8PIurq6+7CwsP+kpKT/k5OT/4ODg/90dHT/YWFh/1RUVPpdXV3Dj4+PXHt7ewUAAAAAAAAAAAAAAAAAAAAA9vb2BePj4znS0tJzw8PDmbi4uKupqamxp6enm7KysnDNzc018/PzAwAAAAAAAAAAAAAAAOAHrEGAAaxBAACsQQAArEEAAKxBAACsQQAArEEAAKxBAACsQQAArEEAAKxBAACsQQAArEEAAKxBgAGsQeAHrEE=';\n\t\t\t}\n\t\t\thead[0].appendChild(icon);\n\t\t}\n\n\t\thead = top.document.getElementById(\"logodesc\");\n\t\tif (head) {\n\t\t\thead.parentNode.removeChild(head);\n\t\t}\n\t}", "static get heartIconFilled() {\n const icon = 'data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDUwIDUwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MCA1MDsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8cGF0aCBzdHlsZT0iZmlsbDojRDc1QTRBOyIgZD0iTTI0Ljg1LDEwLjEyNmMyLjAxOC00Ljc4Myw2LjYyOC04LjEyNSwxMS45OS04LjEyNWM3LjIyMywwLDEyLjQyNSw2LjE3OSwxMy4wNzksMTMuNTQzICBjMCwwLDAuMzUzLDEuODI4LTAuNDI0LDUuMTE5Yy0xLjA1OCw0LjQ4Mi0zLjU0NSw4LjQ2NC02Ljg5OCwxMS41MDNMMjQuODUsNDhMNy40MDIsMzIuMTY1Yy0zLjM1My0zLjAzOC01Ljg0LTcuMDIxLTYuODk4LTExLjUwMyAgYy0wLjc3Ny0zLjI5MS0wLjQyNC01LjExOS0wLjQyNC01LjExOUMwLjczNCw4LjE3OSw1LjkzNiwyLDEzLjE1OSwyQzE4LjUyMiwyLDIyLjgzMiw1LjM0MywyNC44NSwxMC4xMjZ6Ii8+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+Cjwvc3ZnPgo=';\n return icon;\n }", "function createIcon(options, enableTooltips, shortcuts) {\n\t\toptions = options || {};\n\t\tvar el = document.createElement(\"a\");\n\t\tenableTooltips = (enableTooltips == undefined) ? true : enableTooltips;\n\n\t\tif(options.title && enableTooltips) {\n\t\t\tel.title = createTootlip(options.title, options.action, shortcuts);\n\n\t\t\tif(isMac) {\n\t\t\t\tel.title = el.title.replace(\"Ctrl\", \"⌘\");\n\t\t\t\tel.title = el.title.replace(\"Alt\", \"⌥\");\n\t\t\t}\n\t\t}\n\n\t\tel.tabIndex = -1;\n\t\tel.className = options.className;\n\t\treturn el;\n\t}", "function initializeIcons(baseUrl, options) {\n if (baseUrl === void 0) { baseUrl = ''; }\n var subset = {\n style: {\n MozOsxFontSmoothing: 'grayscale',\n WebkitFontSmoothing: 'antialiased',\n fontStyle: 'normal',\n fontWeight: 'normal',\n speak: 'none'\n },\n fontFace: {\n fontFamily: \"\\\"FabricMDL2Icons-5\\\"\",\n src: \"url('\" + baseUrl + \"fabric-icons-5-f95ba260.woff') format('woff')\"\n },\n icons: {\n 'Certificate': '\\uEB95',\n 'FastForward': '\\uEB9D',\n 'Rewind': '\\uEB9E',\n 'Photo2': '\\uEB9F',\n 'OpenSource': '\\uEBC2',\n 'Movers': '\\uEBCD',\n 'CloudDownload': '\\uEBD3',\n 'Family': '\\uEBDA',\n 'WindDirection': '\\uEBE6',\n 'Bug': '\\uEBE8',\n 'SiteScan': '\\uEBEC',\n 'BrowserScreenShot': '\\uEBED',\n 'F12DevTools': '\\uEBEE',\n 'CSS': '\\uEBEF',\n 'JS': '\\uEBF0',\n 'DeliveryTruck': '\\uEBF4',\n 'ReminderPerson': '\\uEBF7',\n 'ReminderGroup': '\\uEBF8',\n 'ReminderTime': '\\uEBF9',\n 'TabletMode': '\\uEBFC',\n 'Umbrella': '\\uEC04',\n 'NetworkTower': '\\uEC05',\n 'CityNext': '\\uEC06',\n 'CityNext2': '\\uEC07',\n 'Section': '\\uEC0C',\n 'OneNoteLogoInverse': '\\uEC0D',\n 'ToggleFilled': '\\uEC11',\n 'ToggleBorder': '\\uEC12',\n 'SliderThumb': '\\uEC13',\n 'ToggleThumb': '\\uEC14',\n 'Documentation': '\\uEC17',\n 'Badge': '\\uEC1B',\n 'Giftbox': '\\uEC1F',\n 'VisualStudioLogo': '\\uEC22',\n 'HomeGroup': '\\uEC26',\n 'ExcelLogoInverse': '\\uEC28',\n 'WordLogoInverse': '\\uEC29',\n 'PowerPointLogoInverse': '\\uEC2A',\n 'Cafe': '\\uEC32',\n 'SpeedHigh': '\\uEC4A',\n 'Commitments': '\\uEC4D',\n 'ThisPC': '\\uEC4E',\n 'MusicNote': '\\uEC4F',\n 'MicOff': '\\uEC54',\n 'PlaybackRate1x': '\\uEC57',\n 'EdgeLogo': '\\uEC60',\n 'CompletedSolid': '\\uEC61',\n 'AlbumRemove': '\\uEC62',\n 'MessageFill': '\\uEC70',\n 'TabletSelected': '\\uEC74',\n 'MobileSelected': '\\uEC75',\n 'LaptopSelected': '\\uEC76',\n 'TVMonitorSelected': '\\uEC77',\n 'DeveloperTools': '\\uEC7A',\n 'Shapes': '\\uEC7C',\n 'InsertTextBox': '\\uEC7D',\n 'LowerBrightness': '\\uEC8A',\n 'WebComponents': '\\uEC8B',\n 'OfflineStorage': '\\uEC8C',\n 'DOM': '\\uEC8D',\n 'CloudUpload': '\\uEC8E',\n 'ScrollUpDown': '\\uEC8F',\n 'DateTime': '\\uEC92',\n 'Event': '\\uECA3',\n 'Cake': '\\uECA4',\n 'Org': '\\uECA6',\n 'PartyLeader': '\\uECA7',\n 'DRM': '\\uECA8',\n 'CloudAdd': '\\uECA9',\n 'AppIconDefault': '\\uECAA',\n 'Photo2Add': '\\uECAB',\n 'Photo2Remove': '\\uECAC',\n 'Calories': '\\uECAD',\n 'POI': '\\uECAF',\n 'AddTo': '\\uECC8',\n 'RadioBtnOff': '\\uECCA',\n 'RadioBtnOn': '\\uECCB',\n 'ExploreContent': '\\uECCD',\n 'Product': '\\uECDC',\n 'ProgressLoopInner': '\\uECDE',\n 'ProgressLoopOuter': '\\uECDF',\n 'Blocked2': '\\uECE4',\n 'FangBody': '\\uECEB',\n 'Toolbox': '\\uECED',\n 'PageHeader': '\\uECEE',\n 'ChatInviteFriend': '\\uECFE',\n 'Brush': '\\uECFF',\n 'Shirt': '\\uED00',\n 'Crown': '\\uED01',\n 'Diamond': '\\uED02',\n 'ScaleUp': '\\uED09',\n 'QRCode': '\\uED14',\n 'Feedback': '\\uED15',\n 'SharepointLogoInverse': '\\uED18',\n 'YammerLogo': '\\uED19',\n 'Hide': '\\uED1A',\n 'Uneditable': '\\uED1D',\n 'ReturnToSession': '\\uED24',\n 'OpenFolderHorizontal': '\\uED25',\n 'CalendarMirrored': '\\uED28'\n }\n };\n (0,_fluentui_style_utilities__WEBPACK_IMPORTED_MODULE_0__.registerIcons)(subset, options);\n}", "function initializeIcons(baseUrl, options) {\n if (baseUrl === void 0) { baseUrl = ''; }\n var subset = {\n style: {\n MozOsxFontSmoothing: 'grayscale',\n WebkitFontSmoothing: 'antialiased',\n fontStyle: 'normal',\n fontWeight: 'normal',\n speak: 'none'\n },\n fontFace: {\n fontFamily: \"\\\"FabricMDL2Icons-5\\\"\",\n src: \"url('\" + baseUrl + \"fabric-icons-5-f95ba260.woff') format('woff')\"\n },\n icons: {\n 'Certificate': '\\uEB95',\n 'FastForward': '\\uEB9D',\n 'Rewind': '\\uEB9E',\n 'Photo2': '\\uEB9F',\n 'OpenSource': '\\uEBC2',\n 'Movers': '\\uEBCD',\n 'CloudDownload': '\\uEBD3',\n 'Family': '\\uEBDA',\n 'WindDirection': '\\uEBE6',\n 'Bug': '\\uEBE8',\n 'SiteScan': '\\uEBEC',\n 'BrowserScreenShot': '\\uEBED',\n 'F12DevTools': '\\uEBEE',\n 'CSS': '\\uEBEF',\n 'JS': '\\uEBF0',\n 'DeliveryTruck': '\\uEBF4',\n 'ReminderPerson': '\\uEBF7',\n 'ReminderGroup': '\\uEBF8',\n 'ReminderTime': '\\uEBF9',\n 'TabletMode': '\\uEBFC',\n 'Umbrella': '\\uEC04',\n 'NetworkTower': '\\uEC05',\n 'CityNext': '\\uEC06',\n 'CityNext2': '\\uEC07',\n 'Section': '\\uEC0C',\n 'OneNoteLogoInverse': '\\uEC0D',\n 'ToggleFilled': '\\uEC11',\n 'ToggleBorder': '\\uEC12',\n 'SliderThumb': '\\uEC13',\n 'ToggleThumb': '\\uEC14',\n 'Documentation': '\\uEC17',\n 'Badge': '\\uEC1B',\n 'Giftbox': '\\uEC1F',\n 'VisualStudioLogo': '\\uEC22',\n 'HomeGroup': '\\uEC26',\n 'ExcelLogoInverse': '\\uEC28',\n 'WordLogoInverse': '\\uEC29',\n 'PowerPointLogoInverse': '\\uEC2A',\n 'Cafe': '\\uEC32',\n 'SpeedHigh': '\\uEC4A',\n 'Commitments': '\\uEC4D',\n 'ThisPC': '\\uEC4E',\n 'MusicNote': '\\uEC4F',\n 'MicOff': '\\uEC54',\n 'PlaybackRate1x': '\\uEC57',\n 'EdgeLogo': '\\uEC60',\n 'CompletedSolid': '\\uEC61',\n 'AlbumRemove': '\\uEC62',\n 'MessageFill': '\\uEC70',\n 'TabletSelected': '\\uEC74',\n 'MobileSelected': '\\uEC75',\n 'LaptopSelected': '\\uEC76',\n 'TVMonitorSelected': '\\uEC77',\n 'DeveloperTools': '\\uEC7A',\n 'Shapes': '\\uEC7C',\n 'InsertTextBox': '\\uEC7D',\n 'LowerBrightness': '\\uEC8A',\n 'WebComponents': '\\uEC8B',\n 'OfflineStorage': '\\uEC8C',\n 'DOM': '\\uEC8D',\n 'CloudUpload': '\\uEC8E',\n 'ScrollUpDown': '\\uEC8F',\n 'DateTime': '\\uEC92',\n 'Event': '\\uECA3',\n 'Cake': '\\uECA4',\n 'Org': '\\uECA6',\n 'PartyLeader': '\\uECA7',\n 'DRM': '\\uECA8',\n 'CloudAdd': '\\uECA9',\n 'AppIconDefault': '\\uECAA',\n 'Photo2Add': '\\uECAB',\n 'Photo2Remove': '\\uECAC',\n 'Calories': '\\uECAD',\n 'POI': '\\uECAF',\n 'AddTo': '\\uECC8',\n 'RadioBtnOff': '\\uECCA',\n 'RadioBtnOn': '\\uECCB',\n 'ExploreContent': '\\uECCD',\n 'Product': '\\uECDC',\n 'ProgressLoopInner': '\\uECDE',\n 'ProgressLoopOuter': '\\uECDF',\n 'Blocked2': '\\uECE4',\n 'FangBody': '\\uECEB',\n 'Toolbox': '\\uECED',\n 'PageHeader': '\\uECEE',\n 'ChatInviteFriend': '\\uECFE',\n 'Brush': '\\uECFF',\n 'Shirt': '\\uED00',\n 'Crown': '\\uED01',\n 'Diamond': '\\uED02',\n 'ScaleUp': '\\uED09',\n 'QRCode': '\\uED14',\n 'Feedback': '\\uED15',\n 'SharepointLogoInverse': '\\uED18',\n 'YammerLogo': '\\uED19',\n 'Hide': '\\uED1A',\n 'Uneditable': '\\uED1D',\n 'ReturnToSession': '\\uED24',\n 'OpenFolderHorizontal': '\\uED25',\n 'CalendarMirrored': '\\uED28'\n }\n };\n (0,_fluentui_style_utilities__WEBPACK_IMPORTED_MODULE_0__.registerIcons)(subset, options);\n}", "displayIcon() {\n switch(this.determineCurator()) {\n case \"Recommended\":\n return(\n <div className=\"percent\">{this.state.boardDetails.relevance}%</div>\n );\n case \"Discovered\":\n return(\n <div className=\"icon\">\n <img className=\"tanjo-icon\" src=\"//tanjo.s3.amazonaws.com/assets/tanjo-icons/icon-discovered-by-tanjo-black.svg\" />\n </div>\n );\n case \"Board Header\":\n return(\n <div className=\"icon\">\n <img className=\"tanjo-icon\" src=\"//tanjo.s3.amazonaws.com/assets/tanjo-icons/icon-save-outline-white.svg\" />\n </div>\n );\n case \"Board Owner Header\":\n return(\n <div className=\"icon\">\n <img className=\"tanjo-icon\" src=\"//tanjo.s3.amazonaws.com/assets/icons/saved-by-you.svg\" />\n </div>\n );\n case \"Persona Header\":\n return(\n <div className=\"icon\">\n <img className=\"tanjo-icon\" src=\"//tanjo.s3.amazonaws.com/assets/tanjo-icons/icon-save-outline-white.svg\" />\n </div>\n );\n default:\n return(\n <div className=\"icon\">\n <img className=\"tanjo-icon\" src=\"//tanjo.s3.amazonaws.com/assets/tanjo-icons/icon-saved-by-username-black.svg\" />\n </div>\n );\n }\n }", "static get heartIconLight() {\n const icon = 'data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDUxLjk5NyA1MS45OTciIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDUxLjk5NyA1MS45OTc7IiB4bWw6c3BhY2U9InByZXNlcnZlIiB3aWR0aD0iMTZweCIgaGVpZ2h0PSIxNnB4Ij4KPGc+Cgk8cGF0aCBkPSJNNTEuOTExLDE2LjI0MkM1MS4xNTIsNy44ODgsNDUuMjM5LDEuODI3LDM3LjgzOSwxLjgyN2MtNC45MywwLTkuNDQ0LDIuNjUzLTExLjk4NCw2LjkwNSAgIGMtMi41MTctNC4zMDctNi44NDYtNi45MDYtMTEuNjk3LTYuOTA2Yy03LjM5OSwwLTEzLjMxMyw2LjA2MS0xNC4wNzEsMTQuNDE1Yy0wLjA2LDAuMzY5LTAuMzA2LDIuMzExLDAuNDQyLDUuNDc4ICAgYzEuMDc4LDQuNTY4LDMuNTY4LDguNzIzLDcuMTk5LDEyLjAxM2wxOC4xMTUsMTYuNDM5bDE4LjQyNi0xNi40MzhjMy42MzEtMy4yOTEsNi4xMjEtNy40NDUsNy4xOTktMTIuMDE0ICAgQzUyLjIxNiwxOC41NTMsNTEuOTcsMTYuNjExLDUxLjkxMSwxNi4yNDJ6IE00OS41MjEsMjEuMjYxYy0wLjk4NCw0LjE3Mi0zLjI2NSw3Ljk3My02LjU5LDEwLjk4NUwyNS44NTUsNDcuNDgxTDkuMDcyLDMyLjI1ICAgYy0zLjMzMS0zLjAxOC01LjYxMS02LjgxOC02LjU5Ni0xMC45OWMtMC43MDgtMi45OTctMC40MTctNC42OS0wLjQxNi00LjcwMWwwLjAxNS0wLjEwMUMyLjcyNSw5LjEzOSw3LjgwNiwzLjgyNiwxNC4xNTgsMy44MjYgICBjNC42ODcsMCw4LjgxMywyLjg4LDEwLjc3MSw3LjUxNWwwLjkyMSwyLjE4M2wwLjkyMS0yLjE4M2MxLjkyNy00LjU2NCw2LjI3MS03LjUxNCwxMS4wNjktNy41MTQgICBjNi4zNTEsMCwxMS40MzMsNS4zMTMsMTIuMDk2LDEyLjcyN0M0OS45MzgsMTYuNTcsNTAuMjI5LDE4LjI2NCw0OS41MjEsMjEuMjYxeiIgZmlsbD0iIzAwMDAwMCIvPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+Cjwvc3ZnPgo=';\n return icon;\n }", "function initializeIcons(baseUrl, options) {\n if (baseUrl === void 0) { baseUrl = ''; }\n var subset = {\n style: {\n MozOsxFontSmoothing: 'grayscale',\n WebkitFontSmoothing: 'antialiased',\n fontStyle: 'normal',\n fontWeight: 'normal',\n speak: 'none'\n },\n fontFace: {\n fontFamily: \"\\\"FabricMDL2Icons-10\\\"\",\n src: \"url('\" + baseUrl + \"fabric-icons-10-c4ded8e4.woff') format('woff')\"\n },\n icons: {\n 'ViewListGroup': '\\uF248',\n 'ViewListTree': '\\uF249',\n 'TriggerAuto': '\\uF24A',\n 'TriggerUser': '\\uF24B',\n 'PivotChart': '\\uF24C',\n 'StackedBarChart': '\\uF24D',\n 'StackedLineChart': '\\uF24E',\n 'BuildQueue': '\\uF24F',\n 'BuildQueueNew': '\\uF250',\n 'UserFollowed': '\\uF25C',\n 'ContactLink': '\\uF25F',\n 'Stack': '\\uF26F',\n 'Bullseye': '\\uF272',\n 'VennDiagram': '\\uF273',\n 'FiveTileGrid': '\\uF274',\n 'FocalPoint': '\\uF277',\n 'Insert': '\\uF278',\n 'RingerRemove': '\\uF279',\n 'TeamsLogoInverse': '\\uF27A',\n 'TeamsLogo': '\\uF27B',\n 'TeamsLogoFill': '\\uF27C',\n 'SkypeForBusinessLogoFill': '\\uF27D',\n 'SharepointLogo': '\\uF27E',\n 'SharepointLogoFill': '\\uF27F',\n 'DelveLogo': '\\uF280',\n 'DelveLogoFill': '\\uF281',\n 'OfficeVideoLogo': '\\uF282',\n 'OfficeVideoLogoFill': '\\uF283',\n 'ExchangeLogo': '\\uF284',\n 'ExchangeLogoFill': '\\uF285',\n 'Signin': '\\uF286',\n 'DocumentApproval': '\\uF28B',\n 'CloneToDesktop': '\\uF28C',\n 'InstallToDrive': '\\uF28D',\n 'Blur': '\\uF28E',\n 'Build': '\\uF28F',\n 'ProcessMetaTask': '\\uF290',\n 'BranchFork2': '\\uF291',\n 'BranchLocked': '\\uF292',\n 'BranchCommit': '\\uF293',\n 'BranchCompare': '\\uF294',\n 'BranchMerge': '\\uF295',\n 'BranchPullRequest': '\\uF296',\n 'BranchSearch': '\\uF297',\n 'BranchShelveset': '\\uF298',\n 'RawSource': '\\uF299',\n 'MergeDuplicate': '\\uF29A',\n 'RowsGroup': '\\uF29B',\n 'RowsChild': '\\uF29C',\n 'Deploy': '\\uF29D',\n 'Redeploy': '\\uF29E',\n 'ServerEnviroment': '\\uF29F',\n 'VisioDiagram': '\\uF2A0',\n 'HighlightMappedShapes': '\\uF2A1',\n 'TextCallout': '\\uF2A2',\n 'IconSetsFlag': '\\uF2A4',\n 'VisioLogo': '\\uF2A7',\n 'VisioLogoFill': '\\uF2A8',\n 'VisioDocument': '\\uF2A9',\n 'TimelineProgress': '\\uF2AA',\n 'TimelineDelivery': '\\uF2AB',\n 'Backlog': '\\uF2AC',\n 'TeamFavorite': '\\uF2AD',\n 'TaskGroup': '\\uF2AE',\n 'TaskGroupMirrored': '\\uF2AF',\n 'ScopeTemplate': '\\uF2B0',\n 'AssessmentGroupTemplate': '\\uF2B1',\n 'NewTeamProject': '\\uF2B2',\n 'CommentAdd': '\\uF2B3',\n 'CommentNext': '\\uF2B4',\n 'CommentPrevious': '\\uF2B5',\n 'ShopServer': '\\uF2B6',\n 'LocaleLanguage': '\\uF2B7',\n 'QueryList': '\\uF2B8',\n 'UserSync': '\\uF2B9',\n 'UserPause': '\\uF2BA',\n 'StreamingOff': '\\uF2BB',\n 'ArrowTallUpLeft': '\\uF2BD',\n 'ArrowTallUpRight': '\\uF2BE',\n 'ArrowTallDownLeft': '\\uF2BF',\n 'ArrowTallDownRight': '\\uF2C0',\n 'FieldEmpty': '\\uF2C1',\n 'FieldFilled': '\\uF2C2',\n 'FieldChanged': '\\uF2C3',\n 'FieldNotChanged': '\\uF2C4',\n 'RingerOff': '\\uF2C5',\n 'PlayResume': '\\uF2C6',\n 'BulletedList2': '\\uF2C7',\n 'BulletedList2Mirrored': '\\uF2C8',\n 'ImageCrosshair': '\\uF2C9',\n 'GitGraph': '\\uF2CA',\n 'Repo': '\\uF2CB',\n 'RepoSolid': '\\uF2CC',\n 'FolderQuery': '\\uF2CD',\n 'FolderList': '\\uF2CE',\n 'FolderListMirrored': '\\uF2CF',\n 'LocationOutline': '\\uF2D0',\n 'POISolid': '\\uF2D1',\n 'CalculatorNotEqualTo': '\\uF2D2',\n 'BoxSubtractSolid': '\\uF2D3'\n }\n };\n (0,_fluentui_style_utilities__WEBPACK_IMPORTED_MODULE_0__.registerIcons)(subset, options);\n}", "function initializeIcons(baseUrl, options) {\n if (baseUrl === void 0) { baseUrl = ''; }\n var subset = {\n style: {\n MozOsxFontSmoothing: 'grayscale',\n WebkitFontSmoothing: 'antialiased',\n fontStyle: 'normal',\n fontWeight: 'normal',\n speak: 'none'\n },\n fontFace: {\n fontFamily: \"\\\"FabricMDL2Icons-10\\\"\",\n src: \"url('\" + baseUrl + \"fabric-icons-10-c4ded8e4.woff') format('woff')\"\n },\n icons: {\n 'ViewListGroup': '\\uF248',\n 'ViewListTree': '\\uF249',\n 'TriggerAuto': '\\uF24A',\n 'TriggerUser': '\\uF24B',\n 'PivotChart': '\\uF24C',\n 'StackedBarChart': '\\uF24D',\n 'StackedLineChart': '\\uF24E',\n 'BuildQueue': '\\uF24F',\n 'BuildQueueNew': '\\uF250',\n 'UserFollowed': '\\uF25C',\n 'ContactLink': '\\uF25F',\n 'Stack': '\\uF26F',\n 'Bullseye': '\\uF272',\n 'VennDiagram': '\\uF273',\n 'FiveTileGrid': '\\uF274',\n 'FocalPoint': '\\uF277',\n 'Insert': '\\uF278',\n 'RingerRemove': '\\uF279',\n 'TeamsLogoInverse': '\\uF27A',\n 'TeamsLogo': '\\uF27B',\n 'TeamsLogoFill': '\\uF27C',\n 'SkypeForBusinessLogoFill': '\\uF27D',\n 'SharepointLogo': '\\uF27E',\n 'SharepointLogoFill': '\\uF27F',\n 'DelveLogo': '\\uF280',\n 'DelveLogoFill': '\\uF281',\n 'OfficeVideoLogo': '\\uF282',\n 'OfficeVideoLogoFill': '\\uF283',\n 'ExchangeLogo': '\\uF284',\n 'ExchangeLogoFill': '\\uF285',\n 'Signin': '\\uF286',\n 'DocumentApproval': '\\uF28B',\n 'CloneToDesktop': '\\uF28C',\n 'InstallToDrive': '\\uF28D',\n 'Blur': '\\uF28E',\n 'Build': '\\uF28F',\n 'ProcessMetaTask': '\\uF290',\n 'BranchFork2': '\\uF291',\n 'BranchLocked': '\\uF292',\n 'BranchCommit': '\\uF293',\n 'BranchCompare': '\\uF294',\n 'BranchMerge': '\\uF295',\n 'BranchPullRequest': '\\uF296',\n 'BranchSearch': '\\uF297',\n 'BranchShelveset': '\\uF298',\n 'RawSource': '\\uF299',\n 'MergeDuplicate': '\\uF29A',\n 'RowsGroup': '\\uF29B',\n 'RowsChild': '\\uF29C',\n 'Deploy': '\\uF29D',\n 'Redeploy': '\\uF29E',\n 'ServerEnviroment': '\\uF29F',\n 'VisioDiagram': '\\uF2A0',\n 'HighlightMappedShapes': '\\uF2A1',\n 'TextCallout': '\\uF2A2',\n 'IconSetsFlag': '\\uF2A4',\n 'VisioLogo': '\\uF2A7',\n 'VisioLogoFill': '\\uF2A8',\n 'VisioDocument': '\\uF2A9',\n 'TimelineProgress': '\\uF2AA',\n 'TimelineDelivery': '\\uF2AB',\n 'Backlog': '\\uF2AC',\n 'TeamFavorite': '\\uF2AD',\n 'TaskGroup': '\\uF2AE',\n 'TaskGroupMirrored': '\\uF2AF',\n 'ScopeTemplate': '\\uF2B0',\n 'AssessmentGroupTemplate': '\\uF2B1',\n 'NewTeamProject': '\\uF2B2',\n 'CommentAdd': '\\uF2B3',\n 'CommentNext': '\\uF2B4',\n 'CommentPrevious': '\\uF2B5',\n 'ShopServer': '\\uF2B6',\n 'LocaleLanguage': '\\uF2B7',\n 'QueryList': '\\uF2B8',\n 'UserSync': '\\uF2B9',\n 'UserPause': '\\uF2BA',\n 'StreamingOff': '\\uF2BB',\n 'ArrowTallUpLeft': '\\uF2BD',\n 'ArrowTallUpRight': '\\uF2BE',\n 'ArrowTallDownLeft': '\\uF2BF',\n 'ArrowTallDownRight': '\\uF2C0',\n 'FieldEmpty': '\\uF2C1',\n 'FieldFilled': '\\uF2C2',\n 'FieldChanged': '\\uF2C3',\n 'FieldNotChanged': '\\uF2C4',\n 'RingerOff': '\\uF2C5',\n 'PlayResume': '\\uF2C6',\n 'BulletedList2': '\\uF2C7',\n 'BulletedList2Mirrored': '\\uF2C8',\n 'ImageCrosshair': '\\uF2C9',\n 'GitGraph': '\\uF2CA',\n 'Repo': '\\uF2CB',\n 'RepoSolid': '\\uF2CC',\n 'FolderQuery': '\\uF2CD',\n 'FolderList': '\\uF2CE',\n 'FolderListMirrored': '\\uF2CF',\n 'LocationOutline': '\\uF2D0',\n 'POISolid': '\\uF2D1',\n 'CalculatorNotEqualTo': '\\uF2D2',\n 'BoxSubtractSolid': '\\uF2D3'\n }\n };\n (0,_fluentui_style_utilities__WEBPACK_IMPORTED_MODULE_0__.registerIcons)(subset, options);\n}", "function renderOverlayIcon(unreadsCount) {\n const canvas = document.createElement('canvas');\n canvas.height = 128;\n canvas.width = 128;\n canvas.style.letterSpacing = '-5px';\n\n const ctx = canvas.getContext('2d');\n ctx.fillStyle = '#f42020';\n ctx.beginPath();\n ctx.ellipse(64, 64, 64, 64, 0, 0, 2 * Math.PI);\n ctx.fill();\n ctx.textAlign = 'center';\n ctx.fillStyle = 'white';\n ctx.font = '90px sans-serif';\n ctx.fillText(Math.min(99, unreadsCount).toString(), 64, 96);\n\n return canvas;\n}", "function initializeIcons(baseUrl, options) {\n if (baseUrl === void 0) { baseUrl = ''; }\n var subset = {\n style: {\n MozOsxFontSmoothing: 'grayscale',\n WebkitFontSmoothing: 'antialiased',\n fontStyle: 'normal',\n fontWeight: 'normal',\n speak: 'none',\n },\n fontFace: {\n fontFamily: \"\\\"FabricMDL2Icons\\\"\",\n src: \"url('\" + baseUrl + \"fabric-icons-a13498cf.woff') format('woff')\",\n },\n icons: {\n GlobalNavButton: '\\uE700',\n ChevronDown: '\\uE70D',\n ChevronUp: '\\uE70E',\n Edit: '\\uE70F',\n Add: '\\uE710',\n Cancel: '\\uE711',\n More: '\\uE712',\n Settings: '\\uE713',\n Mail: '\\uE715',\n Filter: '\\uE71C',\n Search: '\\uE721',\n Share: '\\uE72D',\n BlockedSite: '\\uE72F',\n FavoriteStar: '\\uE734',\n FavoriteStarFill: '\\uE735',\n CheckMark: '\\uE73E',\n Delete: '\\uE74D',\n ChevronLeft: '\\uE76B',\n ChevronRight: '\\uE76C',\n Calendar: '\\uE787',\n Megaphone: '\\uE789',\n Undo: '\\uE7A7',\n Flag: '\\uE7C1',\n Page: '\\uE7C3',\n Pinned: '\\uE840',\n View: '\\uE890',\n Clear: '\\uE894',\n Download: '\\uE896',\n Upload: '\\uE898',\n Folder: '\\uE8B7',\n Sort: '\\uE8CB',\n AlignRight: '\\uE8E2',\n AlignLeft: '\\uE8E4',\n Tag: '\\uE8EC',\n AddFriend: '\\uE8FA',\n Info: '\\uE946',\n SortLines: '\\uE9D0',\n List: '\\uEA37',\n CircleRing: '\\uEA3A',\n Heart: '\\uEB51',\n HeartFill: '\\uEB52',\n Tiles: '\\uECA5',\n Embed: '\\uECCE',\n Glimmer: '\\uECF4',\n Ascending: '\\uEDC0',\n Descending: '\\uEDC1',\n SortUp: '\\uEE68',\n SortDown: '\\uEE69',\n SyncToPC: '\\uEE6E',\n LargeGrid: '\\uEECB',\n SkypeCheck: '\\uEF80',\n SkypeClock: '\\uEF81',\n SkypeMinus: '\\uEF82',\n ClearFilter: '\\uEF8F',\n Flow: '\\uEF90',\n StatusCircleCheckmark: '\\uF13E',\n MoreVertical: '\\uF2BC',\n },\n };\n (0,_fluentui_style_utilities__WEBPACK_IMPORTED_MODULE_0__.registerIcons)(subset, options);\n}", "function initializeIcons(baseUrl, options) {\n if (baseUrl === void 0) { baseUrl = ''; }\n var subset = {\n style: {\n MozOsxFontSmoothing: 'grayscale',\n WebkitFontSmoothing: 'antialiased',\n fontStyle: 'normal',\n fontWeight: 'normal',\n speak: 'none',\n },\n fontFace: {\n fontFamily: \"\\\"FabricMDL2Icons\\\"\",\n src: \"url('\" + baseUrl + \"fabric-icons-a13498cf.woff') format('woff')\",\n },\n icons: {\n GlobalNavButton: '\\uE700',\n ChevronDown: '\\uE70D',\n ChevronUp: '\\uE70E',\n Edit: '\\uE70F',\n Add: '\\uE710',\n Cancel: '\\uE711',\n More: '\\uE712',\n Settings: '\\uE713',\n Mail: '\\uE715',\n Filter: '\\uE71C',\n Search: '\\uE721',\n Share: '\\uE72D',\n BlockedSite: '\\uE72F',\n FavoriteStar: '\\uE734',\n FavoriteStarFill: '\\uE735',\n CheckMark: '\\uE73E',\n Delete: '\\uE74D',\n ChevronLeft: '\\uE76B',\n ChevronRight: '\\uE76C',\n Calendar: '\\uE787',\n Megaphone: '\\uE789',\n Undo: '\\uE7A7',\n Flag: '\\uE7C1',\n Page: '\\uE7C3',\n Pinned: '\\uE840',\n View: '\\uE890',\n Clear: '\\uE894',\n Download: '\\uE896',\n Upload: '\\uE898',\n Folder: '\\uE8B7',\n Sort: '\\uE8CB',\n AlignRight: '\\uE8E2',\n AlignLeft: '\\uE8E4',\n Tag: '\\uE8EC',\n AddFriend: '\\uE8FA',\n Info: '\\uE946',\n SortLines: '\\uE9D0',\n List: '\\uEA37',\n CircleRing: '\\uEA3A',\n Heart: '\\uEB51',\n HeartFill: '\\uEB52',\n Tiles: '\\uECA5',\n Embed: '\\uECCE',\n Glimmer: '\\uECF4',\n Ascending: '\\uEDC0',\n Descending: '\\uEDC1',\n SortUp: '\\uEE68',\n SortDown: '\\uEE69',\n SyncToPC: '\\uEE6E',\n LargeGrid: '\\uEECB',\n SkypeCheck: '\\uEF80',\n SkypeClock: '\\uEF81',\n SkypeMinus: '\\uEF82',\n ClearFilter: '\\uEF8F',\n Flow: '\\uEF90',\n StatusCircleCheckmark: '\\uF13E',\n MoreVertical: '\\uF2BC',\n },\n };\n (0,_fluentui_style_utilities__WEBPACK_IMPORTED_MODULE_0__.registerIcons)(subset, options);\n}", "function make_desc(ind){\r\n size_marker_icon(ind);\r\n }", "function getIcon(types) {\n\t\tswitch(types) {\n\t\t\t//case \"pharmacy\": return \"icons/drugstore.png\";\n\t\t\tcase \"hospital\": return \"https://www.phoenixchildrens.org/sites/default/files/images/hospital-building.png\";\n\t\t\t//case \"lab\": return \"icons/barber.png\";\n\t\t\tdefault: return \"http://www.bloodjournal.org/sites/all/modules/highwire/highwire/images/google-icon.png\";\n\t\t}\n\t}", "function initializeIcons(baseUrl, options) {\n if (baseUrl === void 0) { baseUrl = ''; }\n var subset = {\n style: {\n MozOsxFontSmoothing: 'grayscale',\n WebkitFontSmoothing: 'antialiased',\n fontStyle: 'normal',\n fontWeight: 'normal',\n speak: 'none'\n },\n fontFace: {\n fontFamily: \"\\\"FabricMDL2Icons-14\\\"\",\n src: \"url('\" + baseUrl + \"fabric-icons-14-5cf58db8.woff') format('woff')\"\n },\n icons: {\n 'Snooze': '\\uF4BD',\n 'WaffleOffice365': '\\uF4E0',\n 'ImageSearch': '\\uF4E8',\n 'NewsSearch': '\\uF4E9',\n 'VideoSearch': '\\uF4EA',\n 'R': '\\uF4EB',\n 'FontColorA': '\\uF4EC',\n 'FontColorSwatch': '\\uF4ED',\n 'LightWeight': '\\uF4EE',\n 'NormalWeight': '\\uF4EF',\n 'SemiboldWeight': '\\uF4F0',\n 'GroupObject': '\\uF4F1',\n 'UngroupObject': '\\uF4F2',\n 'AlignHorizontalLeft': '\\uF4F3',\n 'AlignHorizontalCenter': '\\uF4F4',\n 'AlignHorizontalRight': '\\uF4F5',\n 'AlignVerticalTop': '\\uF4F6',\n 'AlignVerticalCenter': '\\uF4F7',\n 'AlignVerticalBottom': '\\uF4F8',\n 'HorizontalDistributeCenter': '\\uF4F9',\n 'VerticalDistributeCenter': '\\uF4FA',\n 'Ellipse': '\\uF4FB',\n 'Line': '\\uF4FC',\n 'Octagon': '\\uF4FD',\n 'Hexagon': '\\uF4FE',\n 'Pentagon': '\\uF4FF',\n 'RightTriangle': '\\uF500',\n 'HalfCircle': '\\uF501',\n 'QuarterCircle': '\\uF502',\n 'ThreeQuarterCircle': '\\uF503',\n '6PointStar': '\\uF504',\n '12PointStar': '\\uF505',\n 'ArrangeBringToFront': '\\uF506',\n 'ArrangeSendToBack': '\\uF507',\n 'ArrangeSendBackward': '\\uF508',\n 'ArrangeBringForward': '\\uF509',\n 'BorderDash': '\\uF50A',\n 'BorderDot': '\\uF50B',\n 'LineStyle': '\\uF50C',\n 'LineThickness': '\\uF50D',\n 'WindowEdit': '\\uF50E',\n 'HintText': '\\uF50F',\n 'MediaAdd': '\\uF510',\n 'AnchorLock': '\\uF511',\n 'AutoHeight': '\\uF512',\n 'ChartSeries': '\\uF513',\n 'ChartXAngle': '\\uF514',\n 'ChartYAngle': '\\uF515',\n 'Combobox': '\\uF516',\n 'LineSpacing': '\\uF517',\n 'Padding': '\\uF518',\n 'PaddingTop': '\\uF519',\n 'PaddingBottom': '\\uF51A',\n 'PaddingLeft': '\\uF51B',\n 'PaddingRight': '\\uF51C',\n 'NavigationFlipper': '\\uF51D',\n 'AlignJustify': '\\uF51E',\n 'TextOverflow': '\\uF51F',\n 'VisualsFolder': '\\uF520',\n 'VisualsStore': '\\uF521',\n 'PictureCenter': '\\uF522',\n 'PictureFill': '\\uF523',\n 'PicturePosition': '\\uF524',\n 'PictureStretch': '\\uF525',\n 'PictureTile': '\\uF526',\n 'Slider': '\\uF527',\n 'SliderHandleSize': '\\uF528',\n 'DefaultRatio': '\\uF529',\n 'NumberSequence': '\\uF52A',\n 'GUID': '\\uF52B',\n 'ReportAdd': '\\uF52C',\n 'DashboardAdd': '\\uF52D',\n 'MapPinSolid': '\\uF52E',\n 'WebPublish': '\\uF52F',\n 'PieSingleSolid': '\\uF530',\n 'BlockedSolid': '\\uF531',\n 'DrillDown': '\\uF532',\n 'DrillDownSolid': '\\uF533',\n 'DrillExpand': '\\uF534',\n 'DrillShow': '\\uF535',\n 'SpecialEvent': '\\uF536',\n 'OneDriveFolder16': '\\uF53B',\n 'FunctionalManagerDashboard': '\\uF542',\n 'BIDashboard': '\\uF543',\n 'CodeEdit': '\\uF544',\n 'RenewalCurrent': '\\uF545',\n 'RenewalFuture': '\\uF546',\n 'SplitObject': '\\uF547',\n 'BulkUpload': '\\uF548',\n 'DownloadDocument': '\\uF549',\n 'GreetingCard': '\\uF54B',\n 'Flower': '\\uF54E',\n 'WaitlistConfirm': '\\uF550',\n 'WaitlistConfirmMirrored': '\\uF551',\n 'LaptopSecure': '\\uF552',\n 'DragObject': '\\uF553',\n 'EntryView': '\\uF554',\n 'EntryDecline': '\\uF555',\n 'ContactCardSettings': '\\uF556',\n 'ContactCardSettingsMirrored': '\\uF557'\n }\n };\n (0,_fluentui_style_utilities__WEBPACK_IMPORTED_MODULE_0__.registerIcons)(subset, options);\n}", "function initializeIcons(baseUrl, options) {\n if (baseUrl === void 0) { baseUrl = ''; }\n var subset = {\n style: {\n MozOsxFontSmoothing: 'grayscale',\n WebkitFontSmoothing: 'antialiased',\n fontStyle: 'normal',\n fontWeight: 'normal',\n speak: 'none'\n },\n fontFace: {\n fontFamily: \"\\\"FabricMDL2Icons-14\\\"\",\n src: \"url('\" + baseUrl + \"fabric-icons-14-5cf58db8.woff') format('woff')\"\n },\n icons: {\n 'Snooze': '\\uF4BD',\n 'WaffleOffice365': '\\uF4E0',\n 'ImageSearch': '\\uF4E8',\n 'NewsSearch': '\\uF4E9',\n 'VideoSearch': '\\uF4EA',\n 'R': '\\uF4EB',\n 'FontColorA': '\\uF4EC',\n 'FontColorSwatch': '\\uF4ED',\n 'LightWeight': '\\uF4EE',\n 'NormalWeight': '\\uF4EF',\n 'SemiboldWeight': '\\uF4F0',\n 'GroupObject': '\\uF4F1',\n 'UngroupObject': '\\uF4F2',\n 'AlignHorizontalLeft': '\\uF4F3',\n 'AlignHorizontalCenter': '\\uF4F4',\n 'AlignHorizontalRight': '\\uF4F5',\n 'AlignVerticalTop': '\\uF4F6',\n 'AlignVerticalCenter': '\\uF4F7',\n 'AlignVerticalBottom': '\\uF4F8',\n 'HorizontalDistributeCenter': '\\uF4F9',\n 'VerticalDistributeCenter': '\\uF4FA',\n 'Ellipse': '\\uF4FB',\n 'Line': '\\uF4FC',\n 'Octagon': '\\uF4FD',\n 'Hexagon': '\\uF4FE',\n 'Pentagon': '\\uF4FF',\n 'RightTriangle': '\\uF500',\n 'HalfCircle': '\\uF501',\n 'QuarterCircle': '\\uF502',\n 'ThreeQuarterCircle': '\\uF503',\n '6PointStar': '\\uF504',\n '12PointStar': '\\uF505',\n 'ArrangeBringToFront': '\\uF506',\n 'ArrangeSendToBack': '\\uF507',\n 'ArrangeSendBackward': '\\uF508',\n 'ArrangeBringForward': '\\uF509',\n 'BorderDash': '\\uF50A',\n 'BorderDot': '\\uF50B',\n 'LineStyle': '\\uF50C',\n 'LineThickness': '\\uF50D',\n 'WindowEdit': '\\uF50E',\n 'HintText': '\\uF50F',\n 'MediaAdd': '\\uF510',\n 'AnchorLock': '\\uF511',\n 'AutoHeight': '\\uF512',\n 'ChartSeries': '\\uF513',\n 'ChartXAngle': '\\uF514',\n 'ChartYAngle': '\\uF515',\n 'Combobox': '\\uF516',\n 'LineSpacing': '\\uF517',\n 'Padding': '\\uF518',\n 'PaddingTop': '\\uF519',\n 'PaddingBottom': '\\uF51A',\n 'PaddingLeft': '\\uF51B',\n 'PaddingRight': '\\uF51C',\n 'NavigationFlipper': '\\uF51D',\n 'AlignJustify': '\\uF51E',\n 'TextOverflow': '\\uF51F',\n 'VisualsFolder': '\\uF520',\n 'VisualsStore': '\\uF521',\n 'PictureCenter': '\\uF522',\n 'PictureFill': '\\uF523',\n 'PicturePosition': '\\uF524',\n 'PictureStretch': '\\uF525',\n 'PictureTile': '\\uF526',\n 'Slider': '\\uF527',\n 'SliderHandleSize': '\\uF528',\n 'DefaultRatio': '\\uF529',\n 'NumberSequence': '\\uF52A',\n 'GUID': '\\uF52B',\n 'ReportAdd': '\\uF52C',\n 'DashboardAdd': '\\uF52D',\n 'MapPinSolid': '\\uF52E',\n 'WebPublish': '\\uF52F',\n 'PieSingleSolid': '\\uF530',\n 'BlockedSolid': '\\uF531',\n 'DrillDown': '\\uF532',\n 'DrillDownSolid': '\\uF533',\n 'DrillExpand': '\\uF534',\n 'DrillShow': '\\uF535',\n 'SpecialEvent': '\\uF536',\n 'OneDriveFolder16': '\\uF53B',\n 'FunctionalManagerDashboard': '\\uF542',\n 'BIDashboard': '\\uF543',\n 'CodeEdit': '\\uF544',\n 'RenewalCurrent': '\\uF545',\n 'RenewalFuture': '\\uF546',\n 'SplitObject': '\\uF547',\n 'BulkUpload': '\\uF548',\n 'DownloadDocument': '\\uF549',\n 'GreetingCard': '\\uF54B',\n 'Flower': '\\uF54E',\n 'WaitlistConfirm': '\\uF550',\n 'WaitlistConfirmMirrored': '\\uF551',\n 'LaptopSecure': '\\uF552',\n 'DragObject': '\\uF553',\n 'EntryView': '\\uF554',\n 'EntryDecline': '\\uF555',\n 'ContactCardSettings': '\\uF556',\n 'ContactCardSettingsMirrored': '\\uF557'\n }\n };\n (0,_fluentui_style_utilities__WEBPACK_IMPORTED_MODULE_0__.registerIcons)(subset, options);\n}", "computeDesktopIcons() {\n var _this = this;\n\n return (0, _bluebirdLst().coroutine)(function* () {\n const packager = _this.packager;\n const iconDir = packager.platformSpecificBuildOptions.icon;\n const sources = [iconDir == null ? \"icons\" : iconDir];\n const commonConfiguration = packager.config;\n let icnsPath = (commonConfiguration.mac || {}).icon || commonConfiguration.icon;\n\n if (icnsPath != null) {\n if (!icnsPath.endsWith(\".icns\")) {\n icnsPath += \".icns\";\n }\n\n sources.push(icnsPath);\n }\n\n sources.push(\"icon.icns\");\n sources.push(path.join((0, _pathManager().getTemplatePath)(\"linux\"), \"electron-icons\"));\n const result = yield packager.resolveIcon(sources, \"set\");\n _this.maxIconPath = result[result.length - 1].file;\n return result;\n })();\n }", "function initializeIcons(baseUrl, options) {\n if (baseUrl === void 0) { baseUrl = ''; }\n var subset = {\n style: {\n MozOsxFontSmoothing: 'grayscale',\n WebkitFontSmoothing: 'antialiased',\n fontStyle: 'normal',\n fontWeight: 'normal',\n speak: 'none'\n },\n fontFace: {\n fontFamily: \"\\\"FabricMDL2Icons-2\\\"\",\n src: \"url('\" + baseUrl + \"fabric-icons-2-63c99abf.woff') format('woff')\"\n },\n icons: {\n 'Picture': '\\uE8B9',\n 'ChromeClose': '\\uE8BB',\n 'ShowResults': '\\uE8BC',\n 'Message': '\\uE8BD',\n 'CalendarDay': '\\uE8BF',\n 'CalendarWeek': '\\uE8C0',\n 'MailReplyAll': '\\uE8C2',\n 'Read': '\\uE8C3',\n 'Cut': '\\uE8C6',\n 'PaymentCard': '\\uE8C7',\n 'Copy': '\\uE8C8',\n 'Important': '\\uE8C9',\n 'MailReply': '\\uE8CA',\n 'GotoToday': '\\uE8D1',\n 'Font': '\\uE8D2',\n 'FontColor': '\\uE8D3',\n 'FolderFill': '\\uE8D5',\n 'Permissions': '\\uE8D7',\n 'DisableUpdates': '\\uE8D8',\n 'Unfavorite': '\\uE8D9',\n 'Italic': '\\uE8DB',\n 'Underline': '\\uE8DC',\n 'Bold': '\\uE8DD',\n 'MoveToFolder': '\\uE8DE',\n 'Dislike': '\\uE8E0',\n 'Like': '\\uE8E1',\n 'AlignCenter': '\\uE8E3',\n 'OpenFile': '\\uE8E5',\n 'ClearSelection': '\\uE8E6',\n 'FontDecrease': '\\uE8E7',\n 'FontIncrease': '\\uE8E8',\n 'FontSize': '\\uE8E9',\n 'CellPhone': '\\uE8EA',\n 'RepeatOne': '\\uE8ED',\n 'RepeatAll': '\\uE8EE',\n 'Calculator': '\\uE8EF',\n 'Library': '\\uE8F1',\n 'PostUpdate': '\\uE8F3',\n 'NewFolder': '\\uE8F4',\n 'CalendarReply': '\\uE8F5',\n 'UnsyncFolder': '\\uE8F6',\n 'SyncFolder': '\\uE8F7',\n 'BlockContact': '\\uE8F8',\n 'Accept': '\\uE8FB',\n 'BulletedList': '\\uE8FD',\n 'Preview': '\\uE8FF',\n 'News': '\\uE900',\n 'Chat': '\\uE901',\n 'Group': '\\uE902',\n 'World': '\\uE909',\n 'Comment': '\\uE90A',\n 'DockLeft': '\\uE90C',\n 'DockRight': '\\uE90D',\n 'Repair': '\\uE90F',\n 'Accounts': '\\uE910',\n 'Street': '\\uE913',\n 'RadioBullet': '\\uE915',\n 'Stopwatch': '\\uE916',\n 'Clock': '\\uE917',\n 'WorldClock': '\\uE918',\n 'AlarmClock': '\\uE919',\n 'Photo': '\\uE91B',\n 'ActionCenter': '\\uE91C',\n 'Hospital': '\\uE91D',\n 'Timer': '\\uE91E',\n 'FullCircleMask': '\\uE91F',\n 'LocationFill': '\\uE920',\n 'ChromeMinimize': '\\uE921',\n 'ChromeRestore': '\\uE923',\n 'Annotation': '\\uE924',\n 'Fingerprint': '\\uE928',\n 'Handwriting': '\\uE929',\n 'ChromeFullScreen': '\\uE92D',\n 'Completed': '\\uE930',\n 'Label': '\\uE932',\n 'FlickDown': '\\uE935',\n 'FlickUp': '\\uE936',\n 'FlickLeft': '\\uE937',\n 'FlickRight': '\\uE938',\n 'MiniExpand': '\\uE93A',\n 'MiniContract': '\\uE93B',\n 'Streaming': '\\uE93E',\n 'MusicInCollection': '\\uE940',\n 'OneDriveLogo': '\\uE941',\n 'CompassNW': '\\uE942',\n 'Code': '\\uE943',\n 'LightningBolt': '\\uE945',\n 'CalculatorMultiply': '\\uE947',\n 'CalculatorAddition': '\\uE948',\n 'CalculatorSubtract': '\\uE949',\n 'CalculatorPercentage': '\\uE94C',\n 'CalculatorEqualTo': '\\uE94E',\n 'PrintfaxPrinterFile': '\\uE956',\n 'StorageOptical': '\\uE958',\n 'Communications': '\\uE95A',\n 'Headset': '\\uE95B',\n 'Health': '\\uE95E',\n 'Webcam2': '\\uE960',\n 'FrontCamera': '\\uE96B',\n 'ChevronUpSmall': '\\uE96D'\n }\n };\n (0,_fluentui_style_utilities__WEBPACK_IMPORTED_MODULE_0__.registerIcons)(subset, options);\n}", "function initializeIcons(baseUrl, options) {\n if (baseUrl === void 0) { baseUrl = ''; }\n var subset = {\n style: {\n MozOsxFontSmoothing: 'grayscale',\n WebkitFontSmoothing: 'antialiased',\n fontStyle: 'normal',\n fontWeight: 'normal',\n speak: 'none'\n },\n fontFace: {\n fontFamily: \"\\\"FabricMDL2Icons-2\\\"\",\n src: \"url('\" + baseUrl + \"fabric-icons-2-63c99abf.woff') format('woff')\"\n },\n icons: {\n 'Picture': '\\uE8B9',\n 'ChromeClose': '\\uE8BB',\n 'ShowResults': '\\uE8BC',\n 'Message': '\\uE8BD',\n 'CalendarDay': '\\uE8BF',\n 'CalendarWeek': '\\uE8C0',\n 'MailReplyAll': '\\uE8C2',\n 'Read': '\\uE8C3',\n 'Cut': '\\uE8C6',\n 'PaymentCard': '\\uE8C7',\n 'Copy': '\\uE8C8',\n 'Important': '\\uE8C9',\n 'MailReply': '\\uE8CA',\n 'GotoToday': '\\uE8D1',\n 'Font': '\\uE8D2',\n 'FontColor': '\\uE8D3',\n 'FolderFill': '\\uE8D5',\n 'Permissions': '\\uE8D7',\n 'DisableUpdates': '\\uE8D8',\n 'Unfavorite': '\\uE8D9',\n 'Italic': '\\uE8DB',\n 'Underline': '\\uE8DC',\n 'Bold': '\\uE8DD',\n 'MoveToFolder': '\\uE8DE',\n 'Dislike': '\\uE8E0',\n 'Like': '\\uE8E1',\n 'AlignCenter': '\\uE8E3',\n 'OpenFile': '\\uE8E5',\n 'ClearSelection': '\\uE8E6',\n 'FontDecrease': '\\uE8E7',\n 'FontIncrease': '\\uE8E8',\n 'FontSize': '\\uE8E9',\n 'CellPhone': '\\uE8EA',\n 'RepeatOne': '\\uE8ED',\n 'RepeatAll': '\\uE8EE',\n 'Calculator': '\\uE8EF',\n 'Library': '\\uE8F1',\n 'PostUpdate': '\\uE8F3',\n 'NewFolder': '\\uE8F4',\n 'CalendarReply': '\\uE8F5',\n 'UnsyncFolder': '\\uE8F6',\n 'SyncFolder': '\\uE8F7',\n 'BlockContact': '\\uE8F8',\n 'Accept': '\\uE8FB',\n 'BulletedList': '\\uE8FD',\n 'Preview': '\\uE8FF',\n 'News': '\\uE900',\n 'Chat': '\\uE901',\n 'Group': '\\uE902',\n 'World': '\\uE909',\n 'Comment': '\\uE90A',\n 'DockLeft': '\\uE90C',\n 'DockRight': '\\uE90D',\n 'Repair': '\\uE90F',\n 'Accounts': '\\uE910',\n 'Street': '\\uE913',\n 'RadioBullet': '\\uE915',\n 'Stopwatch': '\\uE916',\n 'Clock': '\\uE917',\n 'WorldClock': '\\uE918',\n 'AlarmClock': '\\uE919',\n 'Photo': '\\uE91B',\n 'ActionCenter': '\\uE91C',\n 'Hospital': '\\uE91D',\n 'Timer': '\\uE91E',\n 'FullCircleMask': '\\uE91F',\n 'LocationFill': '\\uE920',\n 'ChromeMinimize': '\\uE921',\n 'ChromeRestore': '\\uE923',\n 'Annotation': '\\uE924',\n 'Fingerprint': '\\uE928',\n 'Handwriting': '\\uE929',\n 'ChromeFullScreen': '\\uE92D',\n 'Completed': '\\uE930',\n 'Label': '\\uE932',\n 'FlickDown': '\\uE935',\n 'FlickUp': '\\uE936',\n 'FlickLeft': '\\uE937',\n 'FlickRight': '\\uE938',\n 'MiniExpand': '\\uE93A',\n 'MiniContract': '\\uE93B',\n 'Streaming': '\\uE93E',\n 'MusicInCollection': '\\uE940',\n 'OneDriveLogo': '\\uE941',\n 'CompassNW': '\\uE942',\n 'Code': '\\uE943',\n 'LightningBolt': '\\uE945',\n 'CalculatorMultiply': '\\uE947',\n 'CalculatorAddition': '\\uE948',\n 'CalculatorSubtract': '\\uE949',\n 'CalculatorPercentage': '\\uE94C',\n 'CalculatorEqualTo': '\\uE94E',\n 'PrintfaxPrinterFile': '\\uE956',\n 'StorageOptical': '\\uE958',\n 'Communications': '\\uE95A',\n 'Headset': '\\uE95B',\n 'Health': '\\uE95E',\n 'Webcam2': '\\uE960',\n 'FrontCamera': '\\uE96B',\n 'ChevronUpSmall': '\\uE96D'\n }\n };\n (0,_fluentui_style_utilities__WEBPACK_IMPORTED_MODULE_0__.registerIcons)(subset, options);\n}", "function cardIcons(isNative, isIntroduced, isThreatened, isEndangered) {\n const div = document.createElement(\"div\");\n div.setAttribute(\"class\", \"card-icons\");\n\n if (!!isNative) {\n let _i = document.createElement(\"i\");\n _i.setAttribute(\"class\", \"fas fa-leaf\");\n _i.setAttribute(\"title\", \"Native\");\n div.appendChild(_i);\n }\n\n if (!!isIntroduced) {\n let _i = document.createElement(\"i\");\n _i.setAttribute(\"class\", \"fas fa-frog\");\n _i.setAttribute(\"title\", \"Introduced\");\n div.appendChild(_i);\n }\n\n if (!!isThreatened) {\n let _i = document.createElement(\"i\");\n _i.setAttribute(\"class\", \"fas fa-radiation-alt\");\n _i.setAttribute(\"title\", \"Threatened\");\n div.appendChild(_i);\n }\n\n if (!!isEndangered) {\n let _i = document.createElement(\"i\");\n _i.setAttribute(\"class\", \"fas fa-skull-crossbones\");\n _i.setAttribute(\"title\", \"Endangered\");\n div.appendChild(_i);\n }\n\n return div;\n}", "function initializeIcons(baseUrl, options) {\n if (baseUrl === void 0) { baseUrl = ''; }\n var subset = {\n style: {\n MozOsxFontSmoothing: 'grayscale',\n WebkitFontSmoothing: 'antialiased',\n fontStyle: 'normal',\n fontWeight: 'normal',\n speak: 'none'\n },\n fontFace: {\n fontFamily: \"\\\"FabricMDL2Icons-12\\\"\",\n src: \"url('\" + baseUrl + \"fabric-icons-12-7e945a1e.woff') format('woff')\"\n },\n icons: {\n 'FinancialSolid': '\\uF346',\n 'FinancialMirroredSolid': '\\uF347',\n 'HeadsetSolid': '\\uF348',\n 'PermissionsSolid': '\\uF349',\n 'ParkingSolid': '\\uF34A',\n 'ParkingMirroredSolid': '\\uF34B',\n 'DiamondSolid': '\\uF34C',\n 'AsteriskSolid': '\\uF34D',\n 'OfflineStorageSolid': '\\uF34E',\n 'BankSolid': '\\uF34F',\n 'DecisionSolid': '\\uF350',\n 'Parachute': '\\uF351',\n 'ParachuteSolid': '\\uF352',\n 'FiltersSolid': '\\uF353',\n 'ColorSolid': '\\uF354',\n 'ReviewSolid': '\\uF355',\n 'ReviewRequestSolid': '\\uF356',\n 'ReviewRequestMirroredSolid': '\\uF357',\n 'ReviewResponseSolid': '\\uF358',\n 'FeedbackRequestSolid': '\\uF359',\n 'FeedbackRequestMirroredSolid': '\\uF35A',\n 'FeedbackResponseSolid': '\\uF35B',\n 'WorkItemBar': '\\uF35C',\n 'WorkItemBarSolid': '\\uF35D',\n 'Separator': '\\uF35E',\n 'NavigateExternalInline': '\\uF35F',\n 'PlanView': '\\uF360',\n 'TimelineMatrixView': '\\uF361',\n 'EngineeringGroup': '\\uF362',\n 'ProjectCollection': '\\uF363',\n 'CaretBottomRightCenter8': '\\uF364',\n 'CaretBottomLeftCenter8': '\\uF365',\n 'CaretTopRightCenter8': '\\uF366',\n 'CaretTopLeftCenter8': '\\uF367',\n 'DonutChart': '\\uF368',\n 'ChevronUnfold10': '\\uF369',\n 'ChevronFold10': '\\uF36A',\n 'DoubleChevronDown8': '\\uF36B',\n 'DoubleChevronUp8': '\\uF36C',\n 'DoubleChevronLeft8': '\\uF36D',\n 'DoubleChevronRight8': '\\uF36E',\n 'ChevronDownEnd6': '\\uF36F',\n 'ChevronUpEnd6': '\\uF370',\n 'ChevronLeftEnd6': '\\uF371',\n 'ChevronRightEnd6': '\\uF372',\n 'ContextMenu': '\\uF37C',\n 'AzureAPIManagement': '\\uF37F',\n 'AzureServiceEndpoint': '\\uF380',\n 'VSTSLogo': '\\uF381',\n 'VSTSAltLogo1': '\\uF382',\n 'VSTSAltLogo2': '\\uF383',\n 'FileTypeSolution': '\\uF387',\n 'WordLogoInverse16': '\\uF390',\n 'WordLogo16': '\\uF391',\n 'WordLogoFill16': '\\uF392',\n 'PowerPointLogoInverse16': '\\uF393',\n 'PowerPointLogo16': '\\uF394',\n 'PowerPointLogoFill16': '\\uF395',\n 'ExcelLogoInverse16': '\\uF396',\n 'ExcelLogo16': '\\uF397',\n 'ExcelLogoFill16': '\\uF398',\n 'OneNoteLogoInverse16': '\\uF399',\n 'OneNoteLogo16': '\\uF39A',\n 'OneNoteLogoFill16': '\\uF39B',\n 'OutlookLogoInverse16': '\\uF39C',\n 'OutlookLogo16': '\\uF39D',\n 'OutlookLogoFill16': '\\uF39E',\n 'PublisherLogoInverse16': '\\uF39F',\n 'PublisherLogo16': '\\uF3A0',\n 'PublisherLogoFill16': '\\uF3A1',\n 'VisioLogoInverse16': '\\uF3A2',\n 'VisioLogo16': '\\uF3A3',\n 'VisioLogoFill16': '\\uF3A4',\n 'TestBeaker': '\\uF3A5',\n 'TestBeakerSolid': '\\uF3A6',\n 'TestExploreSolid': '\\uF3A7',\n 'TestAutoSolid': '\\uF3A8',\n 'TestUserSolid': '\\uF3A9',\n 'TestImpactSolid': '\\uF3AA',\n 'TestPlan': '\\uF3AB',\n 'TestStep': '\\uF3AC',\n 'TestParameter': '\\uF3AD',\n 'TestSuite': '\\uF3AE',\n 'TestCase': '\\uF3AF',\n 'Sprint': '\\uF3B0',\n 'SignOut': '\\uF3B1',\n 'TriggerApproval': '\\uF3B2',\n 'Rocket': '\\uF3B3',\n 'AzureKeyVault': '\\uF3B4',\n 'Onboarding': '\\uF3BA',\n 'Transition': '\\uF3BC',\n 'LikeSolid': '\\uF3BF',\n 'DislikeSolid': '\\uF3C0',\n 'CRMCustomerInsightsApp': '\\uF3C8',\n 'EditCreate': '\\uF3C9',\n 'PlayReverseResume': '\\uF3E4',\n 'PlayReverse': '\\uF3E5',\n 'SearchData': '\\uF3F1',\n 'UnSetColor': '\\uF3F9',\n 'DeclineCall': '\\uF405'\n }\n };\n (0,_fluentui_style_utilities__WEBPACK_IMPORTED_MODULE_0__.registerIcons)(subset, options);\n}", "function initializeIcons(baseUrl, options) {\n if (baseUrl === void 0) { baseUrl = ''; }\n var subset = {\n style: {\n MozOsxFontSmoothing: 'grayscale',\n WebkitFontSmoothing: 'antialiased',\n fontStyle: 'normal',\n fontWeight: 'normal',\n speak: 'none'\n },\n fontFace: {\n fontFamily: \"\\\"FabricMDL2Icons-12\\\"\",\n src: \"url('\" + baseUrl + \"fabric-icons-12-7e945a1e.woff') format('woff')\"\n },\n icons: {\n 'FinancialSolid': '\\uF346',\n 'FinancialMirroredSolid': '\\uF347',\n 'HeadsetSolid': '\\uF348',\n 'PermissionsSolid': '\\uF349',\n 'ParkingSolid': '\\uF34A',\n 'ParkingMirroredSolid': '\\uF34B',\n 'DiamondSolid': '\\uF34C',\n 'AsteriskSolid': '\\uF34D',\n 'OfflineStorageSolid': '\\uF34E',\n 'BankSolid': '\\uF34F',\n 'DecisionSolid': '\\uF350',\n 'Parachute': '\\uF351',\n 'ParachuteSolid': '\\uF352',\n 'FiltersSolid': '\\uF353',\n 'ColorSolid': '\\uF354',\n 'ReviewSolid': '\\uF355',\n 'ReviewRequestSolid': '\\uF356',\n 'ReviewRequestMirroredSolid': '\\uF357',\n 'ReviewResponseSolid': '\\uF358',\n 'FeedbackRequestSolid': '\\uF359',\n 'FeedbackRequestMirroredSolid': '\\uF35A',\n 'FeedbackResponseSolid': '\\uF35B',\n 'WorkItemBar': '\\uF35C',\n 'WorkItemBarSolid': '\\uF35D',\n 'Separator': '\\uF35E',\n 'NavigateExternalInline': '\\uF35F',\n 'PlanView': '\\uF360',\n 'TimelineMatrixView': '\\uF361',\n 'EngineeringGroup': '\\uF362',\n 'ProjectCollection': '\\uF363',\n 'CaretBottomRightCenter8': '\\uF364',\n 'CaretBottomLeftCenter8': '\\uF365',\n 'CaretTopRightCenter8': '\\uF366',\n 'CaretTopLeftCenter8': '\\uF367',\n 'DonutChart': '\\uF368',\n 'ChevronUnfold10': '\\uF369',\n 'ChevronFold10': '\\uF36A',\n 'DoubleChevronDown8': '\\uF36B',\n 'DoubleChevronUp8': '\\uF36C',\n 'DoubleChevronLeft8': '\\uF36D',\n 'DoubleChevronRight8': '\\uF36E',\n 'ChevronDownEnd6': '\\uF36F',\n 'ChevronUpEnd6': '\\uF370',\n 'ChevronLeftEnd6': '\\uF371',\n 'ChevronRightEnd6': '\\uF372',\n 'ContextMenu': '\\uF37C',\n 'AzureAPIManagement': '\\uF37F',\n 'AzureServiceEndpoint': '\\uF380',\n 'VSTSLogo': '\\uF381',\n 'VSTSAltLogo1': '\\uF382',\n 'VSTSAltLogo2': '\\uF383',\n 'FileTypeSolution': '\\uF387',\n 'WordLogoInverse16': '\\uF390',\n 'WordLogo16': '\\uF391',\n 'WordLogoFill16': '\\uF392',\n 'PowerPointLogoInverse16': '\\uF393',\n 'PowerPointLogo16': '\\uF394',\n 'PowerPointLogoFill16': '\\uF395',\n 'ExcelLogoInverse16': '\\uF396',\n 'ExcelLogo16': '\\uF397',\n 'ExcelLogoFill16': '\\uF398',\n 'OneNoteLogoInverse16': '\\uF399',\n 'OneNoteLogo16': '\\uF39A',\n 'OneNoteLogoFill16': '\\uF39B',\n 'OutlookLogoInverse16': '\\uF39C',\n 'OutlookLogo16': '\\uF39D',\n 'OutlookLogoFill16': '\\uF39E',\n 'PublisherLogoInverse16': '\\uF39F',\n 'PublisherLogo16': '\\uF3A0',\n 'PublisherLogoFill16': '\\uF3A1',\n 'VisioLogoInverse16': '\\uF3A2',\n 'VisioLogo16': '\\uF3A3',\n 'VisioLogoFill16': '\\uF3A4',\n 'TestBeaker': '\\uF3A5',\n 'TestBeakerSolid': '\\uF3A6',\n 'TestExploreSolid': '\\uF3A7',\n 'TestAutoSolid': '\\uF3A8',\n 'TestUserSolid': '\\uF3A9',\n 'TestImpactSolid': '\\uF3AA',\n 'TestPlan': '\\uF3AB',\n 'TestStep': '\\uF3AC',\n 'TestParameter': '\\uF3AD',\n 'TestSuite': '\\uF3AE',\n 'TestCase': '\\uF3AF',\n 'Sprint': '\\uF3B0',\n 'SignOut': '\\uF3B1',\n 'TriggerApproval': '\\uF3B2',\n 'Rocket': '\\uF3B3',\n 'AzureKeyVault': '\\uF3B4',\n 'Onboarding': '\\uF3BA',\n 'Transition': '\\uF3BC',\n 'LikeSolid': '\\uF3BF',\n 'DislikeSolid': '\\uF3C0',\n 'CRMCustomerInsightsApp': '\\uF3C8',\n 'EditCreate': '\\uF3C9',\n 'PlayReverseResume': '\\uF3E4',\n 'PlayReverse': '\\uF3E5',\n 'SearchData': '\\uF3F1',\n 'UnSetColor': '\\uF3F9',\n 'DeclineCall': '\\uF405'\n }\n };\n (0,_fluentui_style_utilities__WEBPACK_IMPORTED_MODULE_0__.registerIcons)(subset, options);\n}", "function initializeIcons(baseUrl, options) {\n if (baseUrl === void 0) { baseUrl = ''; }\n var subset = {\n style: {\n MozOsxFontSmoothing: 'grayscale',\n WebkitFontSmoothing: 'antialiased',\n fontStyle: 'normal',\n fontWeight: 'normal',\n speak: 'none'\n },\n fontFace: {\n fontFamily: \"\\\"FabricMDL2Icons-17\\\"\",\n src: \"url('\" + baseUrl + \"fabric-icons-17-0c4ed701.woff') format('woff')\"\n },\n icons: {\n 'CustomizeToolbar': '\\uF828',\n 'DuplicateRow': '\\uF82A',\n 'RemoveFromTrash': '\\uF82B',\n 'MailOptions': '\\uF82C',\n 'Childof': '\\uF82D',\n 'Footer': '\\uF82E',\n 'Header': '\\uF82F',\n 'BarChartVerticalFill': '\\uF830',\n 'StackedColumnChart2Fill': '\\uF831',\n 'PlainText': '\\uF834',\n 'AccessibiltyChecker': '\\uF835',\n 'DatabaseSync': '\\uF842',\n 'ReservationOrders': '\\uF845',\n 'TabOneColumn': '\\uF849',\n 'TabTwoColumn': '\\uF84A',\n 'TabThreeColumn': '\\uF84B',\n 'BulletedTreeList': '\\uF84C',\n 'MicrosoftTranslatorLogoGreen': '\\uF852',\n 'MicrosoftTranslatorLogoBlue': '\\uF853',\n 'InternalInvestigation': '\\uF854',\n 'AddReaction': '\\uF85D',\n 'ContactHeart': '\\uF862',\n 'VisuallyImpaired': '\\uF866',\n 'EventToDoLogo': '\\uF869',\n 'Variable2': '\\uF86D',\n 'ModelingView': '\\uF871',\n 'DisconnectVirtualMachine': '\\uF873',\n 'ReportLock': '\\uF875',\n 'Uneditable2': '\\uF876',\n 'Uneditable2Mirrored': '\\uF877',\n 'BarChartVerticalEdit': '\\uF89D',\n 'GlobalNavButtonActive': '\\uF89F',\n 'PollResults': '\\uF8A0',\n 'Rerun': '\\uF8A1',\n 'QandA': '\\uF8A2',\n 'QandAMirror': '\\uF8A3',\n 'BookAnswers': '\\uF8A4',\n 'AlertSettings': '\\uF8B6',\n 'TrimStart': '\\uF8BB',\n 'TrimEnd': '\\uF8BC',\n 'TableComputed': '\\uF8F5',\n 'DecreaseIndentLegacy': '\\uE290',\n 'IncreaseIndentLegacy': '\\uE291',\n 'SizeLegacy': '\\uE2B2'\n }\n };\n (0,_fluentui_style_utilities__WEBPACK_IMPORTED_MODULE_0__.registerIcons)(subset, options);\n}", "function initializeIcons(baseUrl, options) {\n if (baseUrl === void 0) { baseUrl = ''; }\n var subset = {\n style: {\n MozOsxFontSmoothing: 'grayscale',\n WebkitFontSmoothing: 'antialiased',\n fontStyle: 'normal',\n fontWeight: 'normal',\n speak: 'none'\n },\n fontFace: {\n fontFamily: \"\\\"FabricMDL2Icons-17\\\"\",\n src: \"url('\" + baseUrl + \"fabric-icons-17-0c4ed701.woff') format('woff')\"\n },\n icons: {\n 'CustomizeToolbar': '\\uF828',\n 'DuplicateRow': '\\uF82A',\n 'RemoveFromTrash': '\\uF82B',\n 'MailOptions': '\\uF82C',\n 'Childof': '\\uF82D',\n 'Footer': '\\uF82E',\n 'Header': '\\uF82F',\n 'BarChartVerticalFill': '\\uF830',\n 'StackedColumnChart2Fill': '\\uF831',\n 'PlainText': '\\uF834',\n 'AccessibiltyChecker': '\\uF835',\n 'DatabaseSync': '\\uF842',\n 'ReservationOrders': '\\uF845',\n 'TabOneColumn': '\\uF849',\n 'TabTwoColumn': '\\uF84A',\n 'TabThreeColumn': '\\uF84B',\n 'BulletedTreeList': '\\uF84C',\n 'MicrosoftTranslatorLogoGreen': '\\uF852',\n 'MicrosoftTranslatorLogoBlue': '\\uF853',\n 'InternalInvestigation': '\\uF854',\n 'AddReaction': '\\uF85D',\n 'ContactHeart': '\\uF862',\n 'VisuallyImpaired': '\\uF866',\n 'EventToDoLogo': '\\uF869',\n 'Variable2': '\\uF86D',\n 'ModelingView': '\\uF871',\n 'DisconnectVirtualMachine': '\\uF873',\n 'ReportLock': '\\uF875',\n 'Uneditable2': '\\uF876',\n 'Uneditable2Mirrored': '\\uF877',\n 'BarChartVerticalEdit': '\\uF89D',\n 'GlobalNavButtonActive': '\\uF89F',\n 'PollResults': '\\uF8A0',\n 'Rerun': '\\uF8A1',\n 'QandA': '\\uF8A2',\n 'QandAMirror': '\\uF8A3',\n 'BookAnswers': '\\uF8A4',\n 'AlertSettings': '\\uF8B6',\n 'TrimStart': '\\uF8BB',\n 'TrimEnd': '\\uF8BC',\n 'TableComputed': '\\uF8F5',\n 'DecreaseIndentLegacy': '\\uE290',\n 'IncreaseIndentLegacy': '\\uE291',\n 'SizeLegacy': '\\uE2B2'\n }\n };\n (0,_fluentui_style_utilities__WEBPACK_IMPORTED_MODULE_0__.registerIcons)(subset, options);\n}", "function getPaletteIcon()\n {\n\n return {\n key: \"svg\",\n val: display({\n id: `${className}-pal-disp`,\n x: 25,\n y: 25,\n width: 35,\n ledgerLine_y: [],\n accidental: false\n })\n }\n }" ]
[ "0.653394", "0.64948696", "0.6324698", "0.6131527", "0.61132276", "0.6077673", "0.60317254", "0.5997315", "0.59818953", "0.59696025", "0.59612584", "0.5942439", "0.59236854", "0.5912766", "0.5911654", "0.5897362", "0.58966035", "0.5868933", "0.5854789", "0.58000994", "0.5790217", "0.5740484", "0.57335544", "0.57196236", "0.5709848", "0.5708152", "0.5704889", "0.57018626", "0.56843007", "0.5673986", "0.5665826", "0.56470144", "0.5645902", "0.56424266", "0.5641941", "0.5637645", "0.5636728", "0.5620856", "0.5619719", "0.5611581", "0.56073785", "0.5604318", "0.56020474", "0.56020474", "0.55926394", "0.5584536", "0.55826664", "0.5582404", "0.5582404", "0.5580226", "0.5580226", "0.5573849", "0.5573849", "0.5573503", "0.5572644", "0.5569235", "0.55684435", "0.5566824", "0.5566824", "0.5566824", "0.5562882", "0.5562882", "0.5557348", "0.5551104", "0.55493635", "0.55493635", "0.5548758", "0.5547857", "0.55475307", "0.55475307", "0.5541589", "0.5541589", "0.55411476", "0.5525969", "0.55229527", "0.55193", "0.5499739", "0.5499066", "0.5495338", "0.5495338", "0.5493706", "0.54924726", "0.5486099", "0.5486099", "0.5483052", "0.5481759", "0.5481759", "0.5479365", "0.5469507", "0.54657745", "0.54657745", "0.5464807", "0.54619944", "0.54619944", "0.54579335", "0.545559", "0.545559", "0.5454179", "0.5454179", "0.5453833" ]
0.5676443
29
Middleware that checks if a user is logged in. If so, the request continues to be processed, otherwise a 403 is returned.
function isLoggedIn(req, res, next) { if (res.locals.currentUser) { next(); } else { res.sendStatus(403); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async allowIfLoggedIn(req, res, next) {\n try {\n const user = res.locals.loggedInUser;\n if (!user) {\n return res\n .status(401)\n .json(new Error(\"BAD_REQUEST\", \"You need to be logged in\"));\n }\n req.user = user;\n next();\n } catch (error) {\n next(error);\n }\n }", "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next()\n\n console.log('El usuario no esta autentificado. Requiere logearse')\n res.status(403).json({\n status: 'not_access',\n message: 'El usuario no esta autentificado. Requiere logearse'\n })\n}", "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next()\n\n\t console.log('El usuario no esta autentificado. Requiere logearse')\n\t res.status(403).json({\n\t status: 'not_access',\n\t message: 'El usuario no esta autentificado. Requiere logearse'\n\t })\n}", "function restrictMiddleware(req, res, next) {\n // if path contains '/api/restricted', no matter what follows, runs check for valid session and cookie info\n if (req.path.includes(\"/api/restricted\")) {\n // verifies if user is logged in. if yes, points to next middleware (the endpoint, in this case)\n if (req.session && req.session.userId) {\n next();\n } else {\n // not logged in, kill request\n res.status(401).json({ message: \"You shall not pass!\" });\n }\n } else {\n // path doesn't contain '/api/restricted', so runs the next middleware(endpoint) as it's written\n next();\n }\n}", "function ensureAuthenticated(req, res, next) {\n if (req.user) {\n return next();\n }\n else {\n //issue a status code of 403 if the user is not logged in\n res.status(403).json({ error: \"the user is not logged in\" });\n }\n}", "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next()\n\n console.log('El usuario no esta autentificado. Requiere logearse')\n res.status(403).json({\n status: 'not_access',\n message: 'El usuario no esta autentificado. Requiere logearse'\n })\n}", "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next()\n\n\t \tconsole.log('El usuario no esta autentificado. Requiere logearse')\n\t res.status(403).json({\n\t status: 'not_access',\n\t message: 'El usuario no esta autentificado. Requiere logearse'\n\t })\n}", "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n return res.status(400).json({authenticated: false})\n}", "function isAuthenticated(req, res, next) {\n if (req.isAuthenticated()) {\n return next();\n }\n return res.sendStatus(403);\n}", "UsersOnly(req, res, next) {\n if (req.user && req.user.role === 1) {\n next();\n } else {\n res.status(403).json({\n success: false,\n });\n }\n }", "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated()) {\n return next();\n } else {\n res.sendStatus(401);\n }\n }", "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next()\n\n res.status(401).json(createErrorResponse('Please login'))\n}", "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n res.sendStatus(401);\n}", "function restricted(req, res, next) {\n console.log(req.session)\n if (req.session && req.session.loggedIn) {\n next()\n } else {\n res.status(401).json({ message: 'This route is restricted. Please login to gain access' })\n }\n}", "function checkIfUserIsAuthenticated(request, response, next) {\n if(request.isAuthenticated()) {\n return next();\n } else {\n request.flash(\"danger\", \"Access denied. Please login.\");\n response.redirect(\"/user/login\");\n }\n}", "function isLoggedIn(req, res, next){\n console.log('res.locals.currentUser = ', res.locals.currentUser);\n if(res.locals.currentUser){\n next();\n }else{\n res.sendStatus(403);\n }\n}", "function isLoggedIn(req, res, next) {\n\tif (req.isAuthenticated())\n\t\treturn next();\n\n res.location(\"/login\");\n res.send(403);\n}", "function restrict(req, res, next) {\n if (req.session.user) {\n next();\n } else {\n res.redirect('/LoginGateway');\n }\n}", "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n\n res.send(\"You are not authorized\");\n}", "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated()) { // user is already authenticated\n return next() // do the next thing in the request i.e. continue with the calling function\n }\n\n res.redirect('/login') // anonymous user tried to access a private method => go to login\n}", "function isLogged(req, res, next) {\n req.session.loggedIn ? next() : res.status(401).json('You must be logged in!');\n}", "function isAuthenticated(req, res, next) {\n if(req.user) return next();\n return res.status(401).json({ msg: 'Not Authorized'})\n}", "function authorizedUser(req, res, next) {\n const userID = req.session.user;\n if (userID) {\n next();\n } else {\n res.render('restricted');\n }\n}", "function isLoggedIn(req, res, next) {\n\t \n if (req.isAuthenticated())\n\treturn next();\t \n res.json({message : 'restricted area'});\n return undefined;\t \t \n}", "function checkUserAuth(req, res, next) {\n if (req.session.isUserAuth) {\n return next();\n } else {\n return res.status(403).redirect('/');\n }\n}", "function protect(req, res, next) {\n console.log('hiii', req.session.currentUser);\n console.log(req.session);\n if (req.session.currentUser) {\n next();\n } else {\n res.status(403).json({ message: 'not logged in' });\n // res.status(500).json(err);\n }\n}", "function restrict(req, res, next) {\n if (req.session.user) {\n next();\n } else {\n req.session.error = 'Access denied!';\n res.redirect('/login');\n }\n}", "function isLoggedIn(request, response, next){\n // If they are authenticated, carry on\n if(request.isAuthenticated()){ return next();}\n // If they aren't, redirect them to the home page\n response.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n if (!req.isAuthenticated())\n return res.send(401);\n\n return next();\n}", "function isUser(req, res, next) {\n if (req.user) {\n return next()\n }\n res.send('Please login to use this feature')\n}", "function restrictedUser(req, res, next) {\n if(req.session && req.session.user) {\n next();\n } else {\n res.status(401).json({message: 'No Credentials Provided!'})\n }\n \n}", "function isLoggedIn(req, res, next) {\n if (req.user) return next();\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n\tconsole.log('isLoggedIn middleware');\n if (req.isAuthenticated()) {\n \treturn next();\n } else {\n \tres.redirect('/users');\n }\n}", "function isSignedIn(req, res, next){\n if (req.isAuthenticated()){\n return next();\n }\n else {\n res.status(401);\n res.send('need authorization to access this path');\n }\n}", "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated()) {\n return next();\n } else {\n console.log(\"You are not logged in!\");\n res.statusCode = 401;\n res.setHeader(\"Content-Type\", \"application/json\");\n res.json({ success: false, status: \"You are not logged in!\" });\n }\n}", "requiresLogin(req, res, next) {\n if (req.isAuthenticated()) {\n next();\n } else {\n res.status(401).send({\n error: 'User is not logged in'\n });\n }\n }", "function isLoggedIn(req, res, next) {\n\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated())\n return next();\n\n // if they aren't redirect them to the home page\n res.redirect('/accessdenied');\n}", "function isLoggedIn(req, res, next) {\n if (req.decoded) {\n return next();\n }\n res.status(401).json({message: \"Auth failed\"});\n}", "function isLoggedIn(req, res, next){\n \n if(req.isAuthenticated()){\n \n return next();\n }\n \n res.redirect(\"/login\");\n }", "function isLoggedIn(req, res, next){\r\n //if user is authenticated, carry on\r\n if (req.isAuthenticated()){\r\n return next();\r\n } else {\r\n req.flash('info', 'Please log in.')\r\n res.redirect('/login');\r\n }\r\n}", "function requiresLogin(req, res, next) {\n if (req.session && req.session.userId) {\n return next();\n } else {\n var unauthorized = new Error('Must be logged in');\n unauthorized.status = 401;\n return next(unauthorized);\n }\n}", "function requiresLogin (req, res, next) {\r\n if (req.session && req.session.userId) {\r\n return next();\r\n } else {\r\n const err = new Error('You must be logged in to view this page.');\r\n err.status = 401;\r\n return next(err);\r\n }\r\n}", "function isLoggedIn(req, res, next) {\n console.log(req.isAuthenticated());\n // if user is authenticated in the session, carry on\n if (req.isAuthenticated()) {\n console.log(\"res\", req.user);\n return next();\n } else {\n console.log(\"res\", req.user);\n // if they aren't redirect them to the home page\n res.status(403).send('failed authentication');\n }\n}", "function loginRequired(req, res, next) {\n if (!req.user) return res.status(401).json({ status: 'Please log in' });\n return next();\n}", "function checkIfLoggedIn(req, res, next) {\n if (!req.isAuthenticated()) {\n return next();\n }\n return res.redirect('/');\n}", "function anyUserLoggedIn(req, res, next) {\n if(req.isAuthenticated()) {\n return next();\n }\n else {\n req.flash('error', 'You need to be logged in to access this page');\n res.redirect('/auth/login');\n }\n}", "function isLoggedIn(req, res, next) {\n // if not authenticated, return error message\n if (!(req.isAuthenticated())) {\n return res.status(401)\n .send({ ErrorMessage: 'You need to be logged in to call this function' });\n }\n // check-in passed\n return next();\n}", "function ensureLoggedIn(req, res, next) {\n if (!req.user) {\n return next({ status: 401, message: \"Unauthorized Logged\" });\n } else {\n return next();\n }\n}", "function restricted(req, res, next) {\n if (req.url.match('/api/restricted')) {\n verifySession(req, res, next)\n } else {\n next()\n }\n}", "function restrict(req,res, next){\n\tconsole.log(req.session.user);\n\tif (req.session.user) {\n \tnext();\n \t} else {\n \tres.redirect('/');\n \t}\n}", "function isLoggedIn(req, res, next) {\n // if user is authenticated in the session, carry on \n if (req.isAuthenticated() && req.user){ return next(); }\n\n // if they aren't, send 401: Unauthorized\n res.sendStatus(401);\n}", "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated()) \n \n return next();\n\n res.redirect(\"/\");\n }", "function ensureLoggedIn(req, res, next) {\n try {\n if (!res.locals.user) throw new UnauthorizedError();\n return next();\n } catch (err) {\n return next(err);\n }\n}", "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n res.redirect('/');\n }", "function isLoggedIn(request, response, next) {\n // if user is authenticated in the session, carry on\n if (request.isAuthenticated())\n return next();\n // if they aren't redirect them to the starting page\n response.redirect('/');\n}", "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated()) {\n console.log(\"YES\");\n return next();\n }else res.sendStatus(401);\n}", "function isLoggedIn(req, res, next) {\n console.log('isLoggedIn middleware'); \n if (req.isAuthenticated()) {\n console.log(\"successful login!\")\n return next(); \n } else { \n console.log(\"BAD LOGIN\")\n res.redirect('/');\n }\n}", "function isLoggedIn(req, res, next) {\n // if the user is authenticated, proceed to the request route\n if (req.isAuthenticated()) return next()\n // Otherwise, return them to the login page\n res.redirect('/users/login');\n}", "function isUserAuthenticated(req, res, next) {\n if (req.user) {\n next();\n } else {\n res.send('You must login!');\n }\n}", "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated()) {\n if(req.user.ban==false){\n return next();\n }\n else{\n console.log('You are banned');\n res.redirect('/');\n } \n }\n else{\n console.log('User not authenticated in isLoggedIn');\n res.redirect('/');\n }\n\n}", "function isLoggedIn(req, res, next){\n if(req.user){\n next();\n } else {\n res.redirect('/login');\n }\n}", "function isLoggedIn(req, res, next){\n if (req.isAuthenticated()){\n return next();\n } else {\n req.flash(\"error\", \"Please login\");\n res.redirect(\"/login\");}\n}", "function isLoggedIn(request, response, next) {\n if(request.isAuthenticated()){\n return next();\n }\n response.redirect(\"/catalog/login\");\n}", "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n res.redirect('/#/');\n }", "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated())\n return next();\n \n res.redirect('/');\n}", "function requiresLogin(req, res, next){\n if (req.session && req.session.userId){\n return next();\n } else {\n var err = new Error('You must be logged in to view this page');\n err.status = 401;\n return next(err);\n }\n}", "function isUserAuthenticated(req, res, next) {\n if (req.user) {\n next();\n } else {\n res.send('You must login!');\n }\n }", "function isLoggedIn(req, res, next) {\n\n if (req.isAuthenticated())\n\n return next();\n\n res.redirect('/login');\n\n }", "function isLoggedIn(req,res,next){\n console.log(\"isLoggedIn called!\");\n if(req.isAuthenticated()){\n console.log(\"user \" + req.body.username + \" is authenicated!\")\n return next();\n }\n res.redirect(\"/login\");\n}", "function isLoggedIn(req, res, next) {\n console.log('res.locals.currentUser = ' , res.locals.currentUser);\n\tif(res.locals.currentUser) {\n\t\tnext();\n\t}\n\telse {\n\t\tres.sendStatus(403);\n\t}\n}", "function isloggedIn(req,res,next){\n if (req.isAuthenticated()) return next();\n res.redirect('/users/login');\n}", "function isLoggedIn(req, res, next){\r\n if(req.isAuthenticated()){\r\n return next();\r\n }\r\n res.redirect(\"/login\");\r\n}", "function isLoggedIn(req, res, next){ \r\n if(req.isAuthenticated()){\r\n return next(); //short circuit by return\r\n }\r\n res.redirect(\"/login\");\r\n\r\n}", "function isLoggedIn (req, res, next) {\n if (req.isAuthenticated()) {\n return next()\n }\n res.redirect('/login')\n}", "function isLoggedIn(req, res, next) {\r\n if (req.isAuthenticated()) {\r\n return next();\r\n }\r\n res.redirect('/');\r\n}", "function isLoggedIn (req, res, next) {\n if (req.isAuthenticated()) return next()\n res.redirect('/')\n}", "function isLoggedIn(req, res, next){\n if (req.isAuthenticated())\n return next();\n res.redirect('/signin');\n }", "function hasAccess(req, res, next) {\n if (req.isAuthenticated()) {\n return next();\n } \n else\n {\n return res.redirect('/'); \n }\n}", "function isLoggedIn(req, res, next)\n{\n if(req.isAuthenticated()){\n return next();\n }\n \n res.redirect(\"/login\");\n}", "function isLoggedIn(req, res, next){\n if(req.isAuthenticated()){\n console.log(\"yup\");\n return next();\n }\n req.flash(\"error\",\"You need to be logged in to do that\");\n res.redirect(\"/login\");\n}", "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated()) return next();\n else res.redirect('/signin');\n }", "function isLoggedIn(req, res, next){\n if(req.isAuthenticated()){\n return next();\n }\n res.redirect(\"/login\")\n}", "isLoggedIn(req, res, next) {\n if (req.isAuthenticated()) return next();\n res.redirect(\"/login\");\n }", "function isLoggedIn(req, res, next) {\n\tif(req.isAuthenticated()) return next()\n\treturn res.status(401).send({ success : false, message : 'authentication failed' });\n}", "function isLoggedIn(req,res,next){\n\n //if user is authenticated, go on\n if(req.isAuthenticated()){\n console.log(\"User is authenticated\")\n return next();\n }\n else{ //if not authenticated, redirect to homepage\n res.redirect(\"/\");\n }\n}", "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated()) \n return next();\n \n res.redirect('/');\n}", "function checkAuthenticated(req, res, next) {\n if (req.isAuthenticated()) {\n return next()\n }\n \n res.redirect('/ratings/admin/login')\n}", "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated()) {\n return next();\n }\n req.flash('error', 'You need to be logged in to do that');\n res.redirect('/login');\n}", "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated()){\n return next();\n }\n res.redirect(\"/login\");\n}", "function isLoggedIn(req, res, next){\n if(req.isAuthenticated()){\n return next();\n }\n res.redirect(\"/login\");\n}", "function isLoggedIn(req, res, next){\n if(req.isAuthenticated()){\n return next();\n }\n res.redirect(\"/login\");\n}", "function isLoggedIn(req, res, next){\n if(req.isAuthenticated()){\n return next();\n }\n res.redirect(\"/login\");\n}", "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated()) {\n return next();\n }\n res.redirect(\"/login\");\n}", "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated()) {\n return next();\n }\n res.redirect(\"/login\");\n}", "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated()) {\n return next();\n }\n res.redirect('/login');\n}", "function isLoggedIn(req, res, next) {\n if (req.isAuthenticated()) return next();\n res.redirect('/');\n}", "function isLoggedIn(req, res, next) {\r\n if (req.isAuthenticated()) {\r\n console.log(\"user is logged in\");\r\n return next();\r\n }\r\n console.log(\"user is not logged in\");\r\n res.redirect(\"/login\");\r\n}", "function isLoggedIn(req, res, next) {\r\n if (req.isAuthenticated()) {\r\n return next();\r\n } else {\r\n res.redirect(\"/\");\r\n }\r\n}", "function isLoggedIn(req, res, next) {\n console.log('000');\n if (req.isAuthenticated())\n return next();\n\n res.redirect('/');\n}", "function ensureLoggedIn(req, res, next) {\n\tif (!req.user) {\n\t\tconst err = new ExpressError(`Unauthorized`, 401);\n\t\treturn next(err);\n\t} else {\n\t\treturn next();\n\t}\n}" ]
[ "0.7827452", "0.77530235", "0.7675514", "0.76472944", "0.7637547", "0.76310486", "0.7608536", "0.74873734", "0.7468612", "0.7465361", "0.74617076", "0.74407274", "0.743438", "0.7419489", "0.7409926", "0.7403108", "0.73996663", "0.73903835", "0.7380974", "0.73611355", "0.731523", "0.7309307", "0.7301669", "0.7284585", "0.72766936", "0.7266371", "0.7264218", "0.7256152", "0.7245178", "0.72378325", "0.7228141", "0.7227104", "0.7225576", "0.7221289", "0.72196525", "0.720545", "0.72047204", "0.7203611", "0.7197904", "0.7192947", "0.71842045", "0.7183604", "0.71741354", "0.7173969", "0.7167439", "0.7162741", "0.71608436", "0.7156542", "0.7155925", "0.7141636", "0.71358234", "0.7133429", "0.71326935", "0.713214", "0.71255726", "0.7123294", "0.7122867", "0.71220696", "0.7119322", "0.71163315", "0.7114282", "0.7113014", "0.7111942", "0.7110894", "0.71101356", "0.71082854", "0.7096636", "0.7095869", "0.709565", "0.709433", "0.70935506", "0.7092705", "0.70912725", "0.70905995", "0.7090383", "0.7090187", "0.7090177", "0.708238", "0.70818", "0.70804375", "0.70797217", "0.7077839", "0.7077469", "0.70774275", "0.7075774", "0.7075626", "0.7073974", "0.7072105", "0.7072031", "0.70712537", "0.70712537", "0.70712537", "0.70702296", "0.70702296", "0.7068095", "0.7067527", "0.7067361", "0.70661706", "0.7065383", "0.7065301" ]
0.79686546
0
Middleware that loads a users tasks if they are logged in.
function loadUserTasks(req, res, next) { if (!res.locals.currentUser) { return next(); } Tasks.find({}).or([ {owner:res.locals.currentUser}, {collaborators: res.locals.currentUser.email}]) .exec (function(err, tasks) { if (!err) { res.locals.tasks = tasks; } next(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadUserTasks(req, res, next) {\n if(!res.locals.currentUser){\n return next();\n }\n Tasks.find({}).or([\n {owner: res.locals.currentUser},\n {collaborators: res.locals.currentUser.email}])\n .exec(function(err, tasks){\n if(!err){\n res.locals.tasks = tasks;\n }\n next();\n });\n}", "function getTasks(){\n if(currentUser._id){\n API.getTasks({author_id:currentUser._id})\n .then(response=>{\n const data = response.data;\n setTasks([]);\n const task = data.tasks;\n setTasks([...task]);\n });\n }else{\n history.push(\"/login\");\n }\n }", "function loadTasks(userInfoInput) {\n API.getTasks()\n .then(res => {\n\n // Map tasks that don't belong to the logged in user into othersTasks.\n // Set othersTasks to tasks state.\n let othersTasks = [];\n res.data.map(task => {\n if (userInfoInput.toLowerCase() !== task.user.toLowerCase()) {\n othersTasks.push(task)\n console.log(\"test line\")\n }\n })\n\n setTasks(othersTasks)\n console.log(\"tasks: \", tasks);\n })\n .catch(err => console.log(err));\n }", "function AuthAndAskForTaskLists() {\n loader.Load(true);\n}", "function isUser(req, res, next) {\n if(!req.session.passport.user) {\n next();\n }\n else {\n res.redirect(\"/tasks\");\n }\n}", "function requireAuth(to, from, next) {\n if (store.getters['login/getUserLoadStatus'] != 2) {\n // User not loaded\n store.commit('login/pending');\n\n // Watch user to be loaded\n store.watch(\n () => store.getters['login/getUserLoadStatus'],\n () => {\n if (store.getters['login/getUserLoadStatus'] == 2) {\n proceed(next);\n }\n },\n );\n } else {\n proceed(next);\n }\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}", "user({user_id}, _, {loaders: {Users}, user}) {\n if (user && (user.hasRole('ADMIN') || user_id === user.id)) {\n return Users.getByID.load(user_id);\n }\n }", "function requireAuth(to, from, next) {\n\t/*\n\t\tDetermines where we should send the user.\n\t*/\n function proceed() {\n\t\t/*\n\t\t\tIf the user has been loaded determine where we should\n\t\t\tsend the user.\n\t\t*/\n if (store.getters.getUserLoadStatus == 2) {\n next();\n } else if (store.getters.getUserLoadStatus == 3) {\n //user is not logged in\n console.log('you are not logged in');\n }\n }\n\n proceed();\n}", "function topTasks(req, res, next) {\n var authToken = req.cookies.ejorp_auth;\n var userId = req.cookies.ejorp_userid;\n Step(\n function lookUpUser() {\n Auth.lookUpUser(userId, authToken, this);\n },\n function requestDocument(err, user) {\n if (err) {\n // TODO: Test dealing with unauthorized response\n res.json(Auth.unauthorizedResponse());\n return next();\n }\n var docId = user.userId + \"#top-tasks\";\n DocCache.getDocument(docId, this);\n },\n function returnDocument(err, document) {\n if (err) {\n // TODO: Make request to ejorp engine if we couldn't find it in the doc cache\n }\n res.json(document, 200);\n return next();\n }\n );\n}", "function requestHandler(req, res) {\n User.findById(req.userId, function(err, user) {\n if (err) {\n res.send(err)\n } else {\n Tasks.findById(user.tasksId, function(err, tasks) {\n if (err) {\n return res.send(err)\n } else {\n tasks.completed = true\n tasks.save(function(err) {\n if (err) {\n return res.send(err)\n } else {\n res.send('Task completed')\n }\n })\n }\n })\n }\n })\n}", "run(navigationInstruction, next) {\n //if we find a setting in the routes with auth=true, lets use this pipeline\n //if user needs to be logged in - check for login\n\n /* if (navigationInstruction, getAllInstructions().some(i => i.config.settings.auth)) {\n //check for login\n //if user is not logged in - send them to login page\n if (!this.authService.currentUser) {\n //pretend login check fails - redirect to login page\n return next.cancel(new Redirect(\"login\"));\n } \n } */\n return next();\n }", "function middlewareCallback(data){\n console.log('setOfTasks',setOfTasks);\n callback(null,setOfTasks);\n return;\n }", "function load(req, res, next, id) {\n _user2.default.get(id).then(function (user) {\n req.user = user; // eslint-disable-line\n return next();\n }).catch(function (e) {\n return next(e);\n });\n}", "function loadTasks() {\n\ttasksCollection.fetch().done(function() {\n\t\ttasksCollection.each(function(task) {\n\t\t\tnew TaskView({model: task});\n\t\t});\n\t});\n}", "function load(req, res, next, id) {\n AdminUser.get(id)\n .then((user) => {\n req.user = user; // eslint-disable-line no-param-reassign\n return next();\n })\n .catch(e => next(e));\n}", "function load(req, res, next, id) {\n User.get(id)\n .then((user) => {\n req.user = user; // eslint-disable-line no-param-reassign\n return next();\n })\n .catch(e => next(e));\n}", "function load(req, res, next, id) {\n User.get(id)\n .then((user) => {\n req.user = user; // eslint-disable-line no-param-reassign\n return next();\n })\n .catch(e => next(e));\n}", "function load(req, res, next, id) {\n User.get(id)\n .then((user) => {\n req.user = user; // eslint-disable-line no-param-reassign\n return next();\n })\n .catch(e => next(e));\n}", "function load (req, res, next, id) {\n User.get(id)\n .then(user => {\n req.user = user // eslint-disable-line no-param-reassign\n return next()\n })\n .catch(e => next(e))\n}", "function load(req, res, next, id) {\n User.get(id)\n .then(user => {\n req.user = user; // eslint-disable-line no-param-reassign\n return next();\n })\n .error(e => next(e));\n}", "function load(req, res, next, id) {\n User.get(id)\n .then((foundUser) => {\n req.user = foundUser; // eslint-disable-line no-param-reassign\n return next();\n }).catch(e => next(e));\n}", "function load(req, res, next, id) {\n Task.findById(id)\n .exec()\n .then((task) => {\n if (!task) {\n return next(err)\n } else {\n req.task = task\n return next()\n }\n }, (e) => next(e))\n .catch((e) => next(e))\n}", "function optionalAuth(req, res, next) {\n if (req.isAuthenticated()) {\n res.locals.user = req.user;\n }\n return next();\n}", "async function checkIfLoggedIn() {\n // let's see if we're logged in\n const token = localStorage.getItem(\"token\");\n const username = localStorage.getItem(\"username\");\n\n // if there is a token in localStorage, call User.getLoggedInUser\n // to get an instance of User with the right details\n // this is designed to run once, on page load\n currentUser = await User.getLoggedInUser(token, username);\n await generateStories();\n\n if (currentUser) {\n showNavForLoggedInUser();\n fillUserInfo();\n $userProfile.show();\n }\n else{\n $userProfile.hide();\n }\n }", "async function checkIfLoggedIn() {\n // let's see if we're logged in\n const token = localStorage.getItem(\"token\");\n const username = localStorage.getItem(\"username\");\n\n // if there is a token in localStorage, call User.getLoggedInUser\n // to get an instance of User with the right details\n // this is designed to run once, on page load\n currentUser = await User.getLoggedInUser(token, username);\n if (currentUser) {\n await showNavForLoggedInUser();\n }\n await generateStories();\n }", "async function checkIfLoggedIn() {\n // let's see if we're logged in\n const token = localStorage.getItem(\"token\");\n const username = localStorage.getItem(\"username\");\n\n // if there is a token in localStorage, call User.getLoggedInUser\n // to get an instance of User with the right details\n // this is designed to run once, on page load\n currentUser = await User.getLoggedInUser(token, username);\n await generateStories();\n\n if (currentUser) {\n showNavForLoggedInUser(currentUser);\n }\n }", "function load(req, res, next, id) {\n User.get(id)\n .then((user) => {\n req.user = user;\n return next();\n })\n .catch(e => next(e));\n}", "initUser() {\n this.app.use(function (req, res, next) {\n res.locals.user = req.user || null;\n next();\n });\n }", "function resolve_user_from_locals_token(request, callback){\n user_controller.findUser(request.locals.authenticated_user.id, request.locals.authenticated_user.is_admin, function(data){\n callback(data);\n });\n}", "load() {\n // Check if any tasks are saved in localStorage\n if (localStorage.getItem(\"tasks\")) {\n // Get the JSON string of tasks in localStorage\n const tasksJson = localStorage.getItem(\"tasks\");\n\n // Convert it to an array and store it in our TaskManager\n this.tasks = JSON.parse(tasksJson);\n }\n\n // Check if the currentId is saved in localStorage\n if (localStorage.getItem(\"currentId\")) {\n // Get the currentId string in localStorage\n const currentId = localStorage.getItem(\"currentId\");\n\n // Convert the currentId to a number and store it in our TaskManager\n this.currentId = Number(currentId);\n }\n }", "load() {\n // Check if any tasks are saved in localStorage\n if (localStorage.getItem(\"tasks\")) {\n // Get the JSON string of tasks in localStorage\n const tasksJson = localStorage.getItem(\"tasks\");\n\n // Convert it to an array and store it in our TaskManager\n this.tasks = JSON.parse(tasksJson);\n }\n\n // Check if the currentId is saved in localStorage\n if (localStorage.getItem(\"currentId\")) {\n // Get the currentId string in localStorage\n const currentId = localStorage.getItem(\"currentId\");\n\n // Convert the currentId to a number and store it in our TaskManager\n this.currentId = Number(currentId);\n }\n }", "function isLoggedIn(req, res, next){\n console.log('res.locals.currentUser = ', res.locals.currentUser);\n if(res.locals.currentUser){\n next();\n }else{\n res.sendStatus(403);\n }\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 load (req, res, next, id) {\n User.get(id)\n .then((result) => {\n req.user = result;\n return next()\n })\n .catch(e => next(e))\n}", "function requireAuth (to, from, next) {\n\t/*\n\t\tDetermines where we should send the user.\n\t*/\n\tfunction proceed () {\n\t\t/*\n\t\t\tIf the user has been loaded determine where we should\n\t\t\tsend the user.\n\t\t*/\n if ( store.getters.getUserLoadStatus() == 2 ) {\n\t\t\t/*\n\t\t\t\tIf the user is not empty, that means there's a user\n\t\t\t\tauthenticated we allow them to continue. Otherwise, we\n\t\t\t\tsend the user back to the home page.\n\t\t\t*/\n\t\t\tif( store.getters.getUser != '' ){\n \tnext();\n\t\t\t}else{\n\t\t\t\tnext('/cafes');\n\t\t\t}\n }\n\t}\n\n\t/*\n\t\tConfirms the user has been loaded\n\t*/\n\tif ( store.getters.getUserLoadStatus != 2 ) {\n\t\t/*\n\t\t\tIf not, load the user\n\t\t*/\n\t\tstore.dispatch( 'loadUser' );\n\n\t\t/*\n\t\t\tWatch for the user to be loaded. When it's finished, then\n\t\t\twe proceed.\n\t\t*/\n\t\tstore.watch( store.getters.getUserLoadStatus, function(){\n\t\t\tif( store.getters.getUserLoadStatus() == 2 ){\n\t\t\t\tproceed();\n\t\t\t}\n\t\t});\n\t} else {\n\t\t/*\n\t\t\tUser call completed, so we proceed\n\t\t*/\n\t\tproceed()\n\t}\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}", "async function checkIfLoggedIn() {\n // let's see if we're logged in\n const token = localStorage.getItem(\"token\");\n const username = localStorage.getItem(\"username\");\n\n // if there is a token in localStorage, call User.getLoggedInUser\n // to get an instance of User with the right details\n // this is designed to run once, on page load\n currentUser = await User.getLoggedInUser(token, username);\n\n hideElements();\n\n $allStoriesList.removeClass(\"hidden\");\n $loadMore.removeClass(\"hidden\");\n\n await generateStories();\n\n if (currentUser) {\n showNavForLoggedInUser();\n }\n }", "load_() {\n const url = `${this.baseUrl_}/${RouteSuffix.IS_LOGGED_IN}`;\n this.$http_.get(url, {withCredentials: true}).then(\n this.handleLogin_.bind(this, true)\n );\n }", "async function ensureValidUser(req, res, next) {\n\ttry {\n\t\tlet userProjects;\n\t\t// check is user_type if \"user\" or \"tradesman\" - used to determine which model to call\n\t\tif (req.user.user_type === \"user\") {\n\t\t\tuserProjects = await Projects.allUser(req.user.id);\n\t\t} else {\n\t\t\tuserProjects = await Projects.allTradesman(req.user.id);\n\t\t}\n\n\t\t// checks if the project id is included in the userProjects list.\n\t\t// only allow user to proceed if a valid id is found\n\t\tfor (let project of userProjects) {\n\t\t\tif (project.id === +req.params.id) {\n\t\t\t\treturn next();\n\t\t\t}\n\t\t}\n\t\tconst err = new ExpressError(`Unauthorized`, 401);\n\t\treturn next(err);\n\t} catch (e) {\n\t\t// errors would happen here if we made a request and req.user is undefined\n\t\tconst err = new ExpressError(`Unauthorized`, 401);\n\t\treturn next(err);\n\t}\n}", "function loadTasks() {\n\n notificationService.sendMessage('Loading tasks...', 0);\n $scope.reviewTasks = null;\n $scope.reviewTableParams.filter()['search'] = $rootScope.reviewTaskFilter.searchStr ? $rootScope.reviewTaskFilter.searchStr : '';\n if ($rootScope.reviewTaskFilter.showPromoted) {\n $scope.showPromotedReviews = $rootScope.reviewTaskFilter.showPromoted;\n }\n if ($rootScope.reviewTaskFilter.showNewEdits) {\n $scope.showNewEdits = $rootScope.reviewTaskFilter.showNewEdits;\n }\n scaService.getReviewTasks($scope.showPromotedReviews ? false : true).then(function (response) {\n $scope.reviewTasks = response;\n $scope.matchTasksToProjects();\n if ($scope.reviewTasks) {\n notificationService.sendMessage('All tasks loaded', 5000);\n }\n });\n\n }", "load() {\n if (localStorage.getItem('tasks')) {\n const tasksJson = localStorage.getItem('tasks');\n this.tasks = JSON.parse(tasksJson);\n }\n if (localStorage.getItem('currentId')) {\n const currentId = localStorage.getItem('currentId');\n this.currentId = Number(currentId);\n }\n }", "async loadUser({ commit, dispatch }) {\n let user = await dispatch(\"getUser\");\n if (user) {\n commit(\"setUser\", user);\n }\n }", "function isUserAuthenticated(req, res, next) {\n if (req.user) next();\n else res.send(\"No autenticado\");\n}", "render() {\n return (\n <UserContext.Consumer>\n {\n contextUserName => {\n return (\n <div className=\"tasks\">\n <h4 className=\"section-headline\">{`${contextUserName}'s Tasks`}</h4>\n\n <NewTaskSection\n today={this.state.today}\n loadTasks={() => { this.loadTasks(); }} />\n\n <article id=\"task__list\">\n {this.state.allTasks.map(singleTask => {\n return (\n <TaskCard\n key={singleTask.id.toString()}\n today={this.state.today}\n currentTask={singleTask}\n loadTasks={() => {\n this.loadTasks();\n }}\n />\n );\n })}\n </article>\n </div>\n )\n }\n }\n </UserContext.Consumer>\n\n\n );\n }", "function loadTasks(){\n return fetch(\"/task/json\").then(response=>response.json());\n }", "UsersOnly(req, res, next) {\n if (req.user && req.user.role === 1) {\n next();\n } else {\n res.status(403).json({\n success: false,\n });\n }\n }", "function isLoggedIn(req, res, next) {\n if (res.locals.currentUser) {\n next();\n } else {\n res.sendStatus(403);\n }\n}", "function loadTasks() {\n return JSON.parse(localStorage.getItem(KEY_TASKS) || \"[]\");\n}", "function isLoggedIn(req, res, next) {\n console.log('res.locals.currentUser = ' , res.locals.currentUser);\n\tif(res.locals.currentUser) {\n\t\tnext();\n\t}\n\telse {\n\t\tres.sendStatus(403);\n\t}\n}", "function requiresLoggedIn (req, res, next) {\n const data = getSessionData(req);\n if (!data || (data && !data.loggedIn)) {\n return res.send(data);\n }\n return next();\n}", "async login(req, res, next){\n passport.authenticate('local', function(err, user, info) {\n if (!user) {\n var message = \"Invalid credentials\";\n return res.render('login', {message: message, isLoggedIn: req.isAuthenticated()});\n }\n req.logIn(user, function(err) {\n if (err) { return next(err); }\n req.session.user = req.user;\n res.redirect('/posts');\n });\n })(req, res, next);\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 }", "async allowIfLoggedIn(req, res, next) {\n try {\n const user = res.locals.loggedInUser;\n if (!user) {\n return res\n .status(401)\n .json(new Error(\"BAD_REQUEST\", \"You need to be logged in\"));\n }\n req.user = user;\n next();\n } catch (error) {\n next(error);\n }\n }", "beforeRouteEnter(to, from, next){\n const loggedIn = true;\n if(loggedIn) next();\n else next('*')\n }", "requireAuth(req, res, next){\n if(!req.session.userId){\n return res.redirect('/signin');\n }\n next();\n }", "function userMiddleware({ user }, { locals }, next) {\n // eslint-disable-next-line no-param-reassign\n locals.user = user;\n next();\n}", "async function checkIfLoggedIn() {\n // let's see if we're logged in\n const token = localStorage.getItem(\"token\");\n const username = localStorage.getItem(\"username\");\n\n // if there is a token in localStorage, call User.getLoggedInUser\n // to get an instance of User with the right details\n // this is designed to run once, on page load\n if (token && username){\n currentUser = await User.getLoggedInUser(token, username);\n }\n \n await generateStories(); // generate main story feed\n\n if (currentUser) {\n // if user logged in, show custom logged in components\n showNavForLoggedInUser();\n $submitForm.show();\n await generateFavorites();\n $favoriteArticles.show();\n // updated user information at the bottom of the page\n $(\"#profile-name\").append(currentUser.name);\n $(\"#profile-username\").append(currentUser.username);\n $(\"#profile-account-date\").append(currentUser.createdAt);\n }\n }", "tryLoadAuthData() {\n const userType = this.getUserTypeByName(this.localStorage.getItem('userType'));\n if (userType) {\n this.userType.next(userType);\n }\n this.getAuthDataFromStorage();\n if (this.activatedRoute) {\n this.getAuthDataFromParams();\n }\n // if (this.authData) {\n // this.validateToken();\n // }\n }", "function getTask(req, res, next) {\r\n\r\n log.info('getTask was called for: ', owner);\r\n Task.find({\r\n owner: owner\r\n }, function(err, data) {\r\n if (err) {\r\n req.log.warn(err, 'get: unable to read %s', owner);\r\n next(err);\r\n return;\r\n }\r\n\r\n res.json(data);\r\n });\r\n\r\n return next();\r\n}", "hasAccess(req, res, next) {\n let token = req.headers['x-access-token']\n if(!token) return res.status(403).end('forbidden')\n\n this.sessionStore.getSession(token).then(function(session) {\n return this.userStore.getUser(session.userId)\n }.bind(this)).then(function(user) {\n req.user = user\n const roles = ['admin', 'volunteer', 'respondent']\n if(roles.indexOf(user.role) > -1) {\n next()\n } else {\n return res.status(403).end('forbidden')\n }\n })\n }", "function hasSesion(req, res, next)\n {\n if (req.user) return res.redirect('/dashboard');\n next();\n }", "componentDidMount() {\n const user_id = this.state.user_id\n fetch(`http://localhost:9393/users/${user_id}/tasks`)\n .then(response => response.json())\n .then(tasks => this.setState({tasks}))\n }", "function proceed() {\n\t\t/*\n\t\t\tIf the user has been loaded determine where we should\n\t\t\tsend the user.\n\t\t*/\n if (store.getters.getUserLoadStatus == 2) {\n next();\n } else if (store.getters.getUserLoadStatus == 3) {\n //user is not logged in\n console.log('you are not logged in');\n }\n }", "async function requiresLogin(req, res, next) {\n if (!req.session.userID) {\n return res.redirect('/welcome');\n }\n return next();\n}", "function getTask() {\n\tlet tasks;\n\tif(localStorage.getItem('tasks')===null) {\n\t\ttasks = []; \n\t} else {\n\t\ttasks =JSON.Parse(localStorage.getItem('tasks'));\n\t}\n}", "function isAuthenticated() {\n return compose()\n .use(function(req, res, next) { // used to validate jwt of user session\n if(req.query && req.query.hasOwnProperty('access_token')) { // allows 'access_token' to be passed through 'req.query' if necessary\n req.headers.authorization = 'Bearer ' + req.query.access_token;\n }\n validateJwt(req, res, next);\n })\n .use(function(req, res, next) { //used to attach 'user' to 'req'\n User.findById(req.user._id, function (err, user) {\n if (err) return next(err);\n if (!user) return res.status(401).send('Unauthorized');\n\n req.user = user;\n console.log('user auth success');\n next();\n });\n });\n}", "function requestHandler(req, res) {\n User.findById(req.userId)\n .then(function(user) {\n return Tasks.findById(user.tasksId)\n })\n .then(function(tasks) {\n tasks.completed = true\n return tasks.save()\n })\n .then(function() {\n res.send('Task completed')\n })\n .catch(function(errors) {\n res.send(errors)\n //*the same errors we used for all callbacks !!\n })\n}", "requireAuth(req, res, next) {\n if(!req.session.userId) {\n return res.redirect('/signin');\n }\n next();\n }", "async index(req, res) {\n const tasks = await Task.findAll({\n // ser_id: req.userId: Retorna as tasks da pessoa logada\n // check: false: que estão marcadas como false/ não concluida\n where: { user_id: req.userId, check: false },\n });\n\n return res.json(tasks);\n }", "function authorizedUser(req, res, next) {\n const userID = req.session.user;\n if (userID) {\n next();\n } else {\n res.render('restricted');\n }\n}", "function userCheck(req, res, next) {\n if(new ObjectId(req.params.user_id).equals(req.user._id)){\n next();\n }else {\n res.status(401).send('You trying to access others data');\n }\n }", "function getTasks() {\n console.log( 'getTasks' );\n $.ajax({\n type: 'GET',\n url: '/todo'\n }).then (function (response) {\n console.log('get server says', response);\n loadTasks(response);\n }).catch (err => {\n console.log('get error', err);\n });\n }", "function proceed () {\n\t\t\t/*\n\t\t\t\tIf the user has been loaded determine where we should\n\t\t\t\tsend the user.\n\t\t\t*/\n\t\t\tif (store.getters.getBearerToken) {\n\t\t\t\tnext();\n\t\t\t} else {\n\t\t\t\t//user is not logged in\n\t\t\t\tconsole.log('you are not logged in');\n\t\t\t}\n\t\t}", "hasSuperAccess(req, res, next) {\n let token = req.headers['x-access-token']\n if(!token) return res.status(403).end('forbidden')\n\n this.sessionStore.getSession(token).then(function(session) {\n return this.userStore.getUser(session.userId)\n }.bind(this)).then(function(user) {\n req.user = user\n if(user.role === 'admin') {\n next()\n } else {\n return res.status(403).end('forbidden')\n }\n })\n }", "async logIn({ commit, dispatch }) {\n var portal = await newPortalInstance()\n // Setting authMode to immediate signs the user in once loaded\n portal.authMode = 'immediate'\n\n // Once portal is loaded, user signed in\n await portal.load() // error will be throw if the promise fail\n commit('SET_CURRENT_PORTAL', portal) // if promise respond we store the new portal instance\n dispatch('items/getUserItems', null, {\n root: true,\n })\n return portal.user !== null\n }", "getTaskByUserID(req, res) {\n con.query(\"SELECT * FROM `task` where assignedTo=?\", [req.query.id], function (err, result) {\n console.log('response from get tasks by user id----', result)\n if (err)\n throw err;\n else {\n\n return res.status(200).json({\n tasks: result\n })\n }\n })\n\n }", "async function isAuthenticated(to, from, next) {\n try {\n await store.dispatch('entities/users/load');\n return true;\n } catch (e) {\n Vue.$log.error(`[router][isAuthenticated] ${e}`);\n return false;\n }\n}", "function proceed(next) {\n // Check load status\n if (store.getters['login/getUserLoadStatus'] === 2) {\n // Check if the user is logged in & cookies have not expired\n if (\n store.getters['login/isLoggedIn']\n && browserCookies.get('token')\n && browserCookies.get('user_id')\n ) {\n // Clear search bar\n store.commit('dashboard/setSearchTerm', '');\n next();\n } else {\n next({ path: '/login' });\n }\n }\n}", "function addUser() {\n const getParams = new URLSearchParams(location.search);\n const taskID = getParams.get('taskID');\n const userID = 1; // Get current userID from cookies?\n const params = new URLSearchParams('taskID=' + taskID + '&userID=' + userID);\n console.log('/task-add-user', params);\n fetch('/task-add-user', {method: 'post', body: params})\n .then(() => getTaskInfo());\n}", "requireAuth(req, res, next) {\n\t\tif (!req.session.userId) {\n\t\t\treturn res.redirect('/signin');\n\t\t}\n\t\tnext();\n\t}", "function getTasks(req, res) {\n let SQL = 'SELECT * from tasks;';\n\n return client.query(SQL)\n .then(results => res.render('index', { results: results.rows }))\n .catch(handleError);\n}", "function getTaskByIdForUser(req, res, done) {\n task.findTaskById(req.params.taskId, (e, r) => {\n if(e) return done(new HttpError(500, e));\n if(!r) return done(new HttpError(400, 'Task with this id does not exists'));\n\n res.send({\n id: r._id,\n name: r.name,\n desc: r.desc,\n shortInfo: r.shortInfo,\n chatType: r.chatType,\n character: {\n name: r.character.name,\n desc: r.character.desc,\n image: r.character.image\n },\n location: {\n name: r.location.name,\n desc: r.location.desc,\n lon: r.location.lon,\n lat: r.location.lat,\n image: r.location.image\n },\n dueDate: r.dueDate,\n chat: _.map(r.chat, (e) => {\n // create audio bindings for specific user\n var audio = new Schema.Audio({\n uploaded: false\n });\n audio.save();\n\n return {\n _type: e._type,\n text: e.text,\n audioId: e.audioId,\n answers: e.answers,\n audioResponseId: audio._id\n }\n })\n })\n })\n}", "function ensureAuth(req, res, next) {\n if (req.isAuthenticated()) {\n if (req.user && USERS.indexOf(req.user) == -1) {\n res.status(403).send('You are not authorized to view this content.');\n } else {\n return next();\n }\n } else {\n res.redirect(LOGIN_URL);\n }\n}", "function isLoggedIn(req, res, next){\n console.log('User is auth ', req.user);\n if(req.isAuthenticated()){\n res.locals.username = res.user.local.username;\n next();\n }else {\n res.redirect('/auth');\n }\n}", "function isLoggedIn(req, res, next) {\n if (req.session.currentUser && req.session.currentUser.role === \"authorized\" || req.session.currentUser && req.session.currentUser.role === \"administrator\") {\n console.log(req.session.currentUser);\n next();\n } else {\n res.redirect('/');\n }\n\n}", "async loadUser () {\n const token = getLocalStorage('token');\n\n // if (token && !this.token) {\n // this.token = token\n // }\n\n if (token && !this.user) {\n try {\n const user = await this.getUser();\n this.user = user\n } catch (e) {\n console.error(e)\n signout()\n }\n }\n\n // const authSuccess = !!this.user && !!this.token;\n\n return this.user;\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 authProjectAccessMiddleware(req, res, next, fail = undefined) {\n authProjectAccess(req.params.id, req.cookies.u, next, () => { defaultProjectFail(req, res, fail) });\n}", "function requireLogin(req, res, next) { // we create a middleware function, to pass it in the route.\n if (req.session.currentUser) { // If this exists, means we are authenticated.\n next();\n } else {\n res.redirect('/login')\n }\n}", "static getTasks() {\n let tasks;\n if (localStorage.getItem('tasks') === null) {\n tasks = [];\n } else {\n tasks = JSON.parse(localStorage.getItem('tasks'));\n }\n\n return tasks;\n }", "async function requestHandler(req, res) {\n try {\n const user = await User.findById(req.userId)\n const tasks = await Task.findById(user.tasksId)\n tasks.completed = true\n await tasks.save()\n res.send('Task completed')\n } catch (error) {\n res.send(error)\n }\n}", "beforeEachRoute(userFunc, to, from) {\n return new Promise((resolve, reject) => {\n if (!userFunc)\n resolve();\n userFunc(to, from, resolve);\n });\n }", "loadTask() {\n \n //check if the localStoge is empty\n if (localStorage.getItem('tasks')) {\n const tasksJson = localStorage.getItem('tasks');\n // convert into array\n this.tasks = JSON.parse(tasksJson);\n }\n //check if the currentId is save in localStorage\n if (localStorage.getItem('currentId')) {\n const currentId = localStorage.getItem('currentId');\n\n //convert the currentId to a Number and store in taskManager\n this.currentId = Number(currentId);\n\n }\n}", "async function addUserToLocals(req, res, next) {\r\n const user = await userDao.retrieveUserWithAuthToken(req.cookies.authToken);\r\n // You can use \"user\" in every where now (e.g. handlebars: {{user.username}}; route handler: res.locals.user)\r\n res.locals.user = user;\r\n next();\r\n}", "async isLoggedIn(req,res,next) {\n try {\n let loggedIn = await this.controller.isLoggedIn(req.params.uid)\n res.status(loggedIn ? httpStatus.OK : httpStatus.NOT_FOUND).end()\n } catch (e) {\n next(e)\n }\n }", "async function load(req, res, next, id) {\n try {\n let user = await User.findByPk(id);\n\n if (!user) {\n const err = new APIError('No such user exists!', HTTPStatus.NOT_FOUND, true);\n return next(err);\n }\n\n req.user = user;\n return next();\n } catch (err) {\n return next(err);\n }\n}", "function resolveAuthenticatedUser(data){\n\t\t\tif(data == true){\n\t\t\t\tloaderService.toggle(false);\n\t\t\t\t$state.go('otp');\n\t\t\t}\n\t\t}", "async function loadPrivateTasks() {\n const response = await fetch(url + '/api/tasks/filter=private');\n if (!response.ok) {\n throw new ResponseException(response.status + \" \" + response.statusText);\n }\n\n const tasks = await response.json();\n return tasks.map(t => {\n t = ({ ...t, important: (Boolean(t.important)), priv: (Boolean(t.private)), deadline: t.deadline !== null ? dayjs(t.deadline) : undefined, completed: (Boolean(t.completed)) });\n delete t.user;\n delete t.private;\n return t;\n });\n}", "function ifLoggedin (req, res, next) {\n const token = req.cookies.jwt;\n if (token) {\n jwt.verify(token, process.env.JWT_SECRET, async (err, decodedToken) => {\n if (err) {\n res.redirect('/login');\n }\n else {\n let user = await User.findById(decodedToken.id);\n res.locals.user = user;\n next();\n }\n });\n }\n else {\n res.redirect('/login');\n }\n}" ]
[ "0.7552267", "0.63138", "0.6076081", "0.59633875", "0.5859155", "0.57973707", "0.5749827", "0.57380086", "0.5675299", "0.56383246", "0.5515433", "0.5482063", "0.5480782", "0.54631424", "0.54522187", "0.5445917", "0.5397883", "0.5397883", "0.5397883", "0.53881", "0.53676164", "0.5348128", "0.5329656", "0.5329025", "0.5328156", "0.52993715", "0.52901375", "0.5285608", "0.527208", "0.52639943", "0.5240034", "0.5240034", "0.5236558", "0.5234291", "0.5215961", "0.52151614", "0.52113974", "0.5206019", "0.52012074", "0.51830107", "0.5158056", "0.5145222", "0.5143634", "0.51368725", "0.512517", "0.5122613", "0.5118877", "0.51173455", "0.51132214", "0.5105853", "0.5103843", "0.51012504", "0.5098734", "0.5095137", "0.5089668", "0.506821", "0.5066149", "0.5045397", "0.50330526", "0.5028228", "0.50228214", "0.50218254", "0.5020161", "0.5019716", "0.50192785", "0.5011985", "0.50079185", "0.49947298", "0.4993869", "0.4992966", "0.49892157", "0.49891692", "0.49852562", "0.49803993", "0.49711064", "0.4962533", "0.4943913", "0.4939865", "0.49373934", "0.49370164", "0.49243262", "0.49206418", "0.4910087", "0.4905181", "0.4902437", "0.48981887", "0.48962605", "0.48954037", "0.48953104", "0.48919103", "0.48917463", "0.48871508", "0.48864013", "0.48852196", "0.48812723", "0.48785496", "0.48767078", "0.48632166", "0.48616827", "0.48583513" ]
0.7532927
1
Lifecycle methods On connect, setup the initial views
async connectedCallback() { super.connectedCallback && super.connectedCallback(); this.addEventListener('select-scene', this[$onSelectScene]); this.addEventListener('select-entity', this[$onSelectEntity]); this.addEventListener('select-renderer', this[$onSelectRenderer]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "initViews() {\n this.views = this.generateViews();\n this.prepareViewsModelsFields();\n }", "init() {\n // call the base component's init function\n UIComponent.prototype.init.apply(this, arguments)\n\n // set the device model\n this.setModel(models.createDeviceModel(), 'device')\n\n // set the todo model\n this.setModel(models.createTodoModel(), 'todo')\n\n // create the views based on the url/hash\n this.getRouter().initialize()\n }", "init() {\n // call the base component's init function\n UIComponent.prototype.init.apply(this, arguments)\n\n // set the device model\n this.setModel(models.createDeviceModel(), 'device')\n\n\n this.attachProgress();\n\n let currentUserModel = new JSONModel();\n this.setModel(currentUserModel, \"currentUser\");\n\n\n // create the views based on the url/hash\n this.getRouter().initialize()\n }", "setup() {\n this.setupLayout();\n this.setupNotifications();\n }", "initialise_view(user) {\n this.refresh_view(user);\n }", "_initializeViews()\n {\n this._layoutViewMaster = new LayoutViewMaster();\n }", "function initialize() {\n $.get(\"views/AdminHomePage.html\")\n .done(setup)\n .fail(error);\n }", "initialize() {\n log('initialized');\n\n // Start listening to initialize events\n new Initializer();\n\n /**\n * App was initialized but hasn't started yet.\n *\n * @event App#init\n */\n this.channel.trigger('init');\n\n // Render the layout\n this.layout.render();\n }", "init() {\n if (this.initialised) {\n return;\n }\n\n // Set initialise flag\n this.initialised = true;\n // Create required elements\n this._createTemplates();\n // Generate input markup\n this._createInput();\n // Subscribe store to render method\n this.store.subscribe(this.render);\n // Render any items\n this.render();\n // Trigger event listeners\n this._addEventListeners();\n\n const callback = this.config.callbackOnInit;\n // Run callback if it is a function\n if (callback && isType('Function', callback)) {\n callback.call(this);\n }\n }", "function init() {\r\n // Set up the items that are needed for the controller to run\r\n }", "constructor() {\n this._view = new WelcomeView();\n }", "function setup(div) {\n\n var model = Model();\n var controller = Controller(model);\n view = View(div, model, controller);\n exports.view = view;\n\n }", "_setup() {\n this._controller.setup();\n }", "function _init() {\r\n // set page <title>\r\n Metadata.set(home.title);\r\n\r\n // activate controller\r\n _activate();\r\n }", "function initialise() \r\n{\r\n\tconnectToRelay();\r\n\tloadSlidePreview();\r\n}", "setup() {\n this.projectController.setup();\n this.filterController.setup();\n }", "init() {\n\n this.assignPlayer();\n gameView.init(this);\n gameView.hide();\n scoreBoardView.init(this);\n registerView.init(this);\n this.registerSW();\n }", "setView(initView) {\n this.view = initView;\n }", "_startUp()\n {\n // Check debug.\n if (RodanClientCore.config.DEBUG)\n {\n Radio.tuneIn('rodan');\n }\n\n this._initializeRadio();\n this._initializeControllers();\n this._initializeBehaviors();\n this._initializeDateTimeFormatter();\n this.addRegions({regionMaster: '#region-master'});\n this._initializeViews();\n require('./.plugins');\n }", "function init() {\n // Creating views\n trackBank = host.createMainTrackBank (1, 0, 0), host.createCursorTrack (\"AIIOM_CTRL\", \"Cursor Track\", 0, 0, true);\n cursorTrack = host.createArrangerCursorTrack(1, 1); // Track cursor\n trackBank.followCursorTrack(cursorTrack); // Sync cursor track of view and script\n\n host.getMidiInPort(0).setMidiCallback(onMidi); // Configuring MIDI device\n\n // Initializing controller sections\n midiListeners = [\n initTransport(),\n initTrack(),\n initDevice(),\n initNote(),\n initNavigation(),\n initLoopback()\n ];\n}", "configureView() {\n // Store various UI elements\n this.loadingContainer = document.getElementById('loading');\n this.signedInContainer = document.getElementById('signed-in');\n this.signedOutContainer = document.getElementById('signed-out');\n this.walletAddressContainer = document.getElementById('wallet-address');\n this.errorContainer = document.getElementById('error');\n // Set up connect button\n const connectElement = document.getElementById('connect-button');\n this.connectButton = this.bitski.getConnectButton(connectElement);\n this.connectButton.callback = (error, user) => {\n if (error) {\n this.setError(error);\n }\n this.validateUser(user);\n }\n // Set up log out button\n this.logOutButton = document.getElementById('log-out');\n this.logOutButton.addEventListener('click', (event) => {\n event.preventDefault();\n this.signOut();\n });\n\n // Set up send test button\n this.sendTestButton = document.getElementById('send-test');\n this.sendTestButton.addEventListener('click', (event) => {\n event.preventDefault();\n this.testSend();\n });\n\n // Set up list-items\n this.listItemsElement = document.getElementById('list-items');\n this.cabinetElement = document.getElementById('cabinet');\n this.listItemsElement.addEventListener('click', (event) => {\n event.preventDefault();\n this.showItems();\n });\n }", "function init(){\n recipeView.addhandlerRender(controlRecipes);\n searchView.addhandlerRender(controlSearchResults);\n paginationView.addhandlerRender(controlPagination);\n recipeView.addhandlerUpdateServings(controlServings);\n recipeView.addhandlerBookmark(controlBookmarks);\n bookMarksView.addhandlerRender(loadBookmarks);\n addRecipeView.addhandlerupload(addrecipe)\n console.log('hello');\n}", "setup(data) {\n const self = this;\n //Load the welcome-content into memory\n this.shopView = $(data);\n\n app.getNavbar().setBalance().then(() => self.initializeButtons());\n\n this.shopView.find(\".cursor\").on(\"click\", function () {\n self.clickedOnCursor($(this));\n });\n\n //Empty the content-div and add the resulting view to the page\n $(\".content\").empty().append(this.shopView);\n\n // Set top to not let it overlap the navbar\n $(\".loading\").css(\"top\", $(\".sidebar\").height());\n $(\"main\").hide();\n }", "function initialize(){\n\n\t\t//sets all needed components, listeners, etc\n\t\tformatBodyPages();\n\t\tsetBodyTransitions();\n\n\t}", "init() {\n // Action to execute on load of the app\n }", "function init(vew) {\n\n // the view this controller is controlling\n view = vew;\n\n // put the view in an initial state\n view.init();\n }", "function oninitialized() {\n\t // focus once ready\n\t this.once(this.options.mode + ' ready', bind(this.focusInput, this));\n\t\n\t // resolve view\n\t if ('signin' === this.options.mode) {\n\t // if user in AD ip range\n\t if (this.$ssoData && this.$ssoData.connection) {\n\t return this._kerberosPanel(this.options, callback);\n\t }\n\t\n\t // if user logged in show logged in experience\n\t if (this.options._shouldShowLastLogin()) {\n\t return this._loggedinPanel(this.options, callback);\n\t }\n\t\n\t // otherwise, just show signin\n\t this._signinPanel();\n\t }\n\t\n\t if ('signup' === this.options.mode) {\n\t this._signupPanel();\n\t }\n\t\n\t if ('reset' === this.options.mode) {\n\t this._resetPanel(this.options, callback);\n\t }\n\t\n\t }", "async start() {\n // Navbar in header\n this.navbar = new Navbar();\n this.navbar.render('header');\n\n // Footer renderin\n this.footer = new Footer();\n this.footer.render('footer');\n\n this.myFavorites = new Favorites();\n\n setTimeout(() => {\n this.router = new Router(this.myFavorites);\n }, 0)\n }", "function startup() {\n // Set initial UI data for our app and Vue\n // App data will be populated after updateUI is called in onMessage EVENT_BRIDGE_OPEN_MESSAGE \n dynamicData = deepCopy(CONFIG.INITIAL_DYNAMIC_DATA);\n defaultMaterialProperties = {\n shadeless: deepCopy(CONFIG.INITIAL_DYNAMIC_DATA[STRING_MATERIAL].shadeless),\n pbr: deepCopy(CONFIG.INITIAL_DYNAMIC_DATA[STRING_MATERIAL].pbr)\n };\n \n // Create the tablet app\n ui = new AppUi({\n buttonName: CONFIG.BUTTON_NAME,\n home: URL,\n onMessage: onMessage, // UI event listener \n // Icons are located in graphicsDirectory\n // AppUI is looking for icons named with the BUTTON_NAME \"avatar-101\" \n // For example: avatar-101-a.svg for active button icon, avatar-101-i.svg for inactive button icon\n graphicsDirectory: Script.resolvePath(\"./resources/icons/\"), \n onOpened: onOpened,\n onClosed: onClosed\n });\n\n // Connect unload function to the script ending\n Script.scriptEnding.connect(unload);\n // Connect function callback to model url changed signal\n MyAvatar.skeletonModelURLChanged.connect(onAvatarModelURLChanged);\n }", "initialize()\n {\n // Initialize the web server\n this.express = express();\n this.express.use(bodyParser.urlencoded({ extended: true }));\n this.express.use(bodyParser.json());\n\n this.initializeRoutes();\n this.express.listen(8080);\n\n nunjucks.configure(__dirname + \"/../frontend/templates\", {\n autoescape: false,\n express: this.express\n });\n }", "function _init () {\n $log.debug('AboutController init');\n\n // ...\n }", "initialize() {\n\n\t\t\t\t// Load the HTML used for the desktop\n\t\t\t\tthis.$el.html( CustomerFormHtml );\n\n\t\t\t\tthis.render();\n\t\t\t\tBackbone.View.prototype.initialize.call( this );\n\t\t\t}", "function initialize() {\n console.log('setting the view of the webpage.');\n}", "function initViewData() {\n loadDataChart();\n displayLogIn();\n}", "async _init() {\n // load the container from DOM, and check it\n const loaded = this._loadContainer(this._options.container);\n\n if (!loaded) return;\n\n // init html templates\n this._initContainer();\n this._initControls();\n this._renderControls();\n\n // init listeners\n this._initListeners();\n\n // first data load\n await this._fetchCards(this._maxDisplayedCards);\n this._loadCurrentPage();\n }", "function init() {\n if ($('.scheduled-page').length > 0) {\n setPageUrl();\n bindEvents();\n renderSwitcher();\n renderActions();\n switchPage(scheduled.currentView);\n }\n }", "function initViews() {\n \n for(var view in window.map.views) {\n self.views[view] = setTransition(view);\n }\n }", "function initViews() {\n\n for(var view in window.map.views) {\n self.views[view] = setTransition(view);\n }\n }", "init() {\n\n // call the base component's init function\n UIComponent.prototype.init.apply(this, arguments);\n\n // create the views based on the url/hash\n this.getRouter().initialize();\n\n // set the device model\n this.setModel(models.createDeviceModel(), 'device');\n\n // initialize store\n this.__store = this._configureStore(rootReducer);\n\n // sync router with store\n\n // a) sync ui5 routing information (is fired befor hashchange)\n this.getRouter().attachRouteMatched(oEvent => {\n const { name, arguments: args } = oEvent.getParameters();\n this.__store.dispatch(updateRoute({\n routeName: name,\n routeArgs: {\n ...args\n }\n }));\n });\n\n // b) sync location information\n $(window).on('hashchange', () => {\n this.__store.dispatch(updateLocation(this._parseRoutingInformation()));\n });\n\n // initialize the main model with initial state\n const oMainModel = new JSONModel(this.__store.getState());\n oMainModel.setDefaultBindingMode(sap.ui.model.BindingMode.OneWay);\n this.setModel(oMainModel);\n\n // subscribe to store\n this.__store.subscribe(() => {\n\n const oNewState = this.__store.getState();\n\n // update window location from store (only for debugging purpose), usually this is a no go in the reducer\n // const { hash, pathname, query, search } = oNewState.routing;\n // if (query['sap-ui-debug'] === 'true') {\n // if (window.location.hash !== hash) { window.location.hash = hash; }\n // if (window.location.pathname !== pathname) { window.location.pathname = pathname; }\n // if (window.location.search !== search) { window.location.search = search; }\n // }\n\n // update main model with new state\n // TODO: check if only bindings with changed attribute values are updated\n this.getModel().setData( oNewState );\n\n });\n\n }", "onLoggedIn() {\r\n this.controller = new MainController(this.login.pryvUserConnection, \"event-view\", \"category-events\");\r\n this.controller.init();\r\n }", "function init() {\n\t\t\tagendaService.view().then(function (response) {\n\t\t\t\tcontroller.days = {};\n\t\t\t\t// Order by begin date\n\t\t\t\tcontroller.appointments = response.sort(function (a, b) {\n\t\t\t\t\treturn a.begin - b.begin;\n\t\t\t\t});\n\t\t\t\tcontroller.appointments.forEach(function (appointment) {\n\t\t\t\t\tcontroller.addDay(appointment);\n\t\t\t\t\tcontroller.show[appointment.id] = false;\n\t\t\t\t});\n\t\t\t});\n\t\t}", "function setupMain() {\n setupMenu();\n setupTreeView();\n setupAnnotations();\n\n // Add initial pane\n pm.registerPane();\n pm.renderPane();\n}", "initialize() {\n this.emit('initialize');\n }", "ready() {\n super.ready();\n\n afterNextRender(this, function() {});\n }", "ready() {\n super.ready();\n\n afterNextRender(this, function() {});\n }", "ready() {\n super.ready();\n\n afterNextRender(this, function() {});\n }", "initialize() {\n this.render();\n }", "function init() {\n if (window.APPLICATION.DATA) {\n if (!window.APPLICATION.INITIALIZED) {\n Router.run(Routes, Router.HistoryLocation, function(Handler, state) {\n if (window.APPLICATION.INITIALIZED) {\n resolveRoute(context, state).then(function(data) {\n render(Handler, data);\n });\n } else {\n render(Handler, window.APPLICATION.DATA);\n }\n });\n }\n window.APPLICATION.INITIALIZED = true;\n }\n}", "created() {\n this.__initEvents();\n }", "function init() {\n setStore();\n handleHistory();\n }", "onInitialize() {}", "requestView(){\t\t\n\t\tthis.trigger('requestView');\n\t}", "function initializeViews(modules, views) {\n log.debug('Initialising Backbone.js view ...');\n views.page = new Views.Page(modules);\n /* Only pass those modules which should be displayed in the menu. */\n views.modulesMenu = new Views.ModulesMenu(new Models.ModulesList(modules.where({ menu: true })));\n views.modulesMenu.render();\n}", "setAsReady() {\n this.logger.debug('Page is ready to use');\n this.controller.store();\n }", "init() {\n this.router.post('/general', this.updateGeneralSettings);\n this.router.get('/general', this.getGeneralSettings);\n this.router.get('/version', this.getVersion);\n }", "initialize() {\n ParentView.prototype.initialize.apply(this, arguments);\n\n this._reviewViews = null;\n }", "function initialize() {\n configureClientsGrid();\n getClientsForSetup();\n }", "function initialize() {\n configureClientsGrid();\n getClientsForSetup();\n }", "function startDemo() {\n View.set('Demo');\n }", "function initilizeController(){\n }", "async initialize() {\n const configPromise = ATDPApplication.initializeClientConfig(this.options);\n const i18nPromise = I18nextManager.getInstance().initI18n();\n await Promise.all([configPromise, i18nPromise]);\n // Prefill the token manager with authorization configurations\n if (this.options.clientConfig?.tokenManager?.authorizationConfigurations) {\n await TDPTokenManager.addAuthorizationConfiguration(Object.entries(this.options.clientConfig.tokenManager.authorizationConfigurations).map(([id, config]) => ({ id, ...config })));\n }\n await this.build(document.body, { replaceBody: false });\n this.tourManager = new TourManager({\n doc: document,\n header: () => this.header,\n app: () => this.app,\n });\n if (this.options.showTourLink && this.tourManager.hasTours()) {\n const button = this.header.addRightMenu('<i class=\"fas fa-question-circle fa-fw\"></i>', (evt) => {\n evt.preventDefault();\n return false;\n }, '#');\n button.dataset.bsToggle = 'modal';\n button.tabIndex = -1;\n button.dataset.bsTarget = `#${this.tourManager.chooser.id}`;\n }\n }", "function init() {\n\tlocationHashChanged();\n\tdisplayHeader();\n\tcheckRoute();\n\thandleDropDownClicked();\n\thandleAddMeal();\n\thandleCloseMeal();\n\thandleAddDish();\n\thandleRemoveDish();\n\thandleMealSave();\n\thandleMealEdit();\n\thandleMealDelete();\n}", "createdCallback() {\r\n this.init()\r\n }", "init() {\n // Make sure we've got an exchange client for the request handling.\n this.router.use(this.initialiseExchangeClient.bind(this));\n this.router.get('/', this.query);\n this.router.post('/', this.create);\n this.router.get('/:id', this.get);\n this.router.delete('/:id', this.delete);\n }", "function initializeController() {\n }", "function initializeController() {\n }", "constructor(core) {\n\t\t//\tExpose the View type for type checks.\n\t\tView.log = new Logger('views');\n\t\tcore.View = View;\n\t\tcore.ModalMixin = ModalMixin;\n\n\t\t//\tPreset component definitions require access to this instance.\n\t\tViewProvider.instance = this;\n\n\t\t//\tCreate page parts.\n\t\tcore.header = new PagePart('header.header');\n\t\tcore.mainPage = new PagePart('div.page');\n\t\tcore.footer = new PagePart('footer.footer');\n\t}", "init() {\n this._super(...arguments);\n this.set('config', Ember.getOwner(this).resolveRegistration('config:environment').APP.recognition);\n // Set up the observer to take a picture when the component is ready\n this.addObserver('component', this, this.componentSet);\n }", "ready() {\n this.vue = createVUE(this[\"$mainDiv\"]);\n Editor.log(\"ConvertHelper view ready\");\n }", "function initializeVisualizer(session_, viewportSelector, pipelineSelector, proxyEditorSelector, fileSelector, sourceSelector, filterSelector, dataInfoSelector) {\n session = session_;\n\n // Initialize data and DOM behavior\n updatePaletteNames();\n addScrollBehavior();\n addDefaultButtonsBehavior();\n addFixHeightBehavior();\n addTimeAnimationButtonsBehavior();\n addPreferencePanelBehavior();\n\n // Create panels\n createFileManagerView(fileSelector);\n createCreationView(sourceSelector, 'sources');\n createCreationView(filterSelector, 'filters');\n createViewportView(viewportSelector);\n createPipelineManagerView(pipelineSelector);\n createProxyEditorView(proxyEditorSelector);\n createDataInformationPanel(dataInfoSelector);\n\n // Set initial state\n $('.need-input-source').hide();\n proxyEditor.empty();\n activePipelineInspector();\n }", "connectedCallback () {\n console.log('connected')\n\n this.render()\n }", "initialise(){\n this._initialise(this._body)\n this._initEvents()\n this._dispatchOnInit()\n }", "function init() {\n bindEvents();\n $('body').append(publish.template.publishModal());\n }", "_init() {\r\n app.whenReady().then(() => {\r\n this.setLoadingWindow();\r\n this.setWindowMain();\r\n });\r\n this.beforeCloseFunctions();\r\n }", "function startApp() {\n connection.connect(function (err) {\n if (err) throw err;\n console.log('connected as id ' + connection.threadId);\n console.log('\\n');\n managerView();\n });\n}", "function ViewManager() { }", "_init() {\n \t\n \tthis.events = new Siteapp.sys.EventManager(this);\n\t this._events();\n \t\n \tthis._initPanelAdapter();\n\n\t\t// usually: earthTheme.Ui.initialize(this) ,but in this case lets call the alias\n \t// because, we are 'connecting' a '(screen)layer' to a '(UI)manager'\n var layerName = Siteapp.sys.functionName(this);\n this.manager.connectLayer(this, layerName);\n\t \n }", "init() {\n this._super(...arguments);\n this._createPages();\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 }", "_start() {\n\n this._menuView = new MenuView(\n document.querySelector('nav'),\n this.sketches\n );\n\n for (var key in this.sketches) {\n this.DEFAULT_SKETCH = key;\n break;\n }\n\n this._setupScroll();\n this._setupWindow();\n this._onHashChange();\n }", "setupView() {\n if (this.view === null) { // If this is called, then user has not overwritten this function\n throw new Error(\"RealtimeMultiplayerGame.AbstractClientGame.setupView - Override this method, then call MyClientGame.superclass.setupView()\");\n }\n this.fieldController.setView(this.view);\n }", "start() {\n Backend.init();\n Sessions.init();\n }", "function _init() {\n vm.loading = true;\n vm.success = false;\n vm.errmsg = null;\n _loadHome();\n }", "async onInitialized(settings, userData) {}", "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 }", "async initialize() {\n this.setLectureName();\n\n this.#eventController = new EventController();\n this.#video = new Video(this.#lecture, this.#eventController);\n this.#postIconFeedback = new PostIconFeedback(this.#lecture, this.#video);\n this.#transcript = new TranscriptArea(this.#lecture, this.#eventController);\n this.#discussion = new DiscussionArea(\n this.#lecture, this.#eventController, this.#transcript);\n\n await this.#video.loadVideoApi();\n await this.#transcript.initialize();\n await this.#discussion.initialize();\n this.#postIconFeedback.initialize();\n }", "render() {\n if (!this.initialized) {\n this.init();\n }\n }", "function init() {\n populateFeautured();\n populateFaq();\n id(\"logo\").addEventListener(\"click\", function() {\n directView(\"featured-view\");\n });\n id(\"men\").addEventListener(\"click\", populateMain);\n id(\"women\").addEventListener(\"click\", populateMain);\n id(\"sale\").addEventListener(\"click\", populateMain);\n id(\"all\").addEventListener(\"click\", populateMain);\n id(\"cart\").addEventListener(\"click\", function() {\n directView(\"cart-view\");\n });\n id(\"contact-us\").addEventListener(\"click\", contactView);\n id(\"faq\").addEventListener(\"click\", faqView);\n id(\"submit-btn\").addEventListener(\"click\", function(event) {\n event.preventDefault();\n storeFeedback();\n });\n }", "function initializeMapViews() {\n // Webmap\n app.webmap = new Webmap({\n portalItem: {\n id: app.webmapId\n }\n });\n // 2D - MapView\n app.mapView = new MapView({\n container: app.mapDiv,\n map: app.webmap,\n zoom: app.zoom,\n center: app.lonlat,\n padding: app.padding,\n ui: app.uiPadding,\n popup: new Popup(app.popupOptions),\n visible: true\n });\n // Set active view\n app.activeView = app.mapView;\n // 3D - SceneView\n app.sceneView = new SceneView({\n container: app.sceneDiv,\n map: app.webmap,\n zoom: app.zoom,\n center: app.lonlat,\n padding: app.padding,\n ui: app.uiPadding,\n popup: new Popup(app.popupOptions),\n visible: false\n });\n\n // Listen for view breakpoint changes and update control location\n app.mapView.watch(\"widthBreakpoint\", function(newVal, oldVal) {\n function setPadding(newVal, oldVal) {\n if (!app.panelSettings) {\n return;\n }\n if (newVal === \"small\" && oldVal === \"medium\") {\n app.panelSettings.setPadding(app.panelSettings.activeLayout.viewPaddingSmallScreen, app.panelSettings.activeLayout.uiPadding);\n } else if (newVal === \"medium\" && oldVal === \"small\") {\n app.panelSettings.setPadding(app.panelSettings.activeLayout.viewPadding, app.panelSettings.activeLayout.uiPadding);\n }\n }\n // Set padding for navs that change height\n if (app.panelSettings.activeLayout.viewPaddingSmallScreen) {\n setPadding(newVal, oldVal);\n }\n });\n}", "function init () {\n\t\t//Get the unique [charity] userId so we know \n\t\t//which url to used for the server-side API\n\t\tvar userId = $('[data-event-config=\"userId\"]').val();\n\t\t\n\t\t//Initialise events collection\n\t\tfunction initCollection () {\n\t\t\tvar evts = new Evts({\n\t\t\t\tuserId: userId\n\t\t\t});\n\n\t\t\tinitFormView(evts);\n\t\t\tinitEventsBoard(evts);\n\t\t}\n\n\t\t//Initialise event form view\n\t\tfunction initFormView (evts) {\n\t\t\tvar $el = $('[data-event=\"configure\"]');\n\t\t\tnew EventForm({\n\t\t\t\tel: $el,\n\t\t\t\tcollection: evts\n\t\t\t});\n\t\t}\n\n\t\t//Initialise events board with persisted events\n\t\tfunction initEventsBoard (evts) {\n\t\t\tvar $el = $('[data-events-board]');\n\t\t\tnew EventBoard({\n\t\t\t\tel: $el,\n\t\t\t\tcollection: evts\n\t\t\t});\n\t\t}\n\n\t\t//Start up everything\n\t\tinitCollection();\n\t}", "function setup(data) {\n //Load the welcome-content into memory\n registreerView = $(data);\n\n if (session.get(\"gebruiker_admin\") == 0) {\n header.ingelogd();\n }\n else if (session.get(\"gebruiker_admin\") == 1) {\n header.ingelogdAdmin();\n }\n else {\n header.uitgelogd();\n }\n\n //Empty the content-div and add the resulting view to the page\n $(\".content\").empty().append(registreerView);\n }", "function init() {\r\n\t// Get the template views from the server to better separate views from model\r\n\t// They're loaded before the document is actually ready for better performance\r\n\tvar signInTemplate = $(\"<div>\").load(\"templates/signIn.html\");\r\n\tvar signUpTemplate = $(\"<div>\").load(\"templates/signUp.html\");\r\n\r\n\t// Get the properties according to the URL's \"lan\" parameter\r\n\tloadProperties(language);\r\n\r\n\t$(document).ready(function() {\r\n\t\t// Populate the templates according to the configuration and URL data\r\n\t\tpopulateBasePage();\r\n\t\tsignInTemplate = populateSignInTemplate(signInTemplate);\r\n\t\tsignUpTemplate = populateSignUpTemplate(signUpTemplate);\r\n\r\n\t\t// Put the templates in the document\r\n\t\t$(\"#wrap\").append(signInTemplate);\r\n\t\t$(\"#wrap\").append(signUpTemplate);\r\n\r\n\t\t// Prepare the modals to close when the required conditions are met\r\n\t\tprepareModals();\r\n\t});\r\n}", "initRouter() {\n Router.config(AppConfig.get('routes'));\n \n Router.onBeforeAction((r, p) => {\n const token = Accounts.getToken()\n if(!r.ignoreLogin && !token) Accounts.logout()\n })\n\n /** Login **/\n Router.on('login', (rota, req) => {\n this.component(<LoginComponent />);\n });\n Router.on('/logout', () => {\n Accounts.logout('/login');\n });\n\n /** Inicio **/\n Router.on('home', (rota, req) => {\n Router.redirect(rota.submenu[0].path);\n });\n Router.on('profile', (rota, req) => {\n this.component(<NewsFeed jsonUrl='/feed' userName={req.params.username}/>);\n });\n Router.on('/novidades', (rota, req) => {\n this.component(<NewsFeed jsonUrl='/feed'/>);\n });\n\n Router.on('messages', (rota, req) => {\n Router.redirect(rota.submenu[0].path);\n });\n Router.on('/social/conversations', (rota, req) => {\n this.component(<MessagesList />);\n });\n\n Router.on('settings', (rota, req) => {\n page.redirect(rota.submenu[0].path);\n });\n Router.on('/social/privacy', (rota, req) => {\n this.component(<h1>Privacy</h1>);\n });\n Router.notFound((rota, req) => {\n this.component(<h1>404 {rota.path}</h1>);\n });\n Router.init();\n }", "render() {\n if (!this.initialized) this.init();\n }", "show ()\n\t{\n\t\t//if the view hasn't been initialised, call setup (of the concrete view e.g. LOView)\n\t\tif(!this.initialised)\n\t\t{\n\t\t\tthis.setup();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//unhide the elements of the scene\n\t\t\tthis.root.style.display = 'block';\n\t\t}\n\t}", "initialize() {\n //\n }", "function initController() {\n }", "constructor() { \n \n KycQuestionsStepView.initialize(this);\n }", "function Controller(){\r\n\t\tvar scope = this;\r\n\t\tvar view = new View({controller: this});\t\t\r\n\t\tvar currentContentController = undefined;\t\r\n\t\tvar pageRootPath = ''; // is set to page's root path (form where it is served)\r\n\t\t\r\n\t\t// new content must register controller here, type: BaseContentController\r\n\t\tvar contentRegister = {\r\n\t\t\t'simulations' : 'contents/simulations/SimulationsContentController',\r\n\t\t\t'complexes': 'contents/complexes/ComplexesContentController'\r\n\t\t};\t\t\r\n\t\t\r\n\t\tfunction init(){\r\n\t\t\tasync.series([\r\n\t\t\t webSocketController.init.bind(null, {}),\r\n\t\t\t utils.asTask(initRouter)\r\n\t\t\t ], function(err){\r\n\t\t\t\terr && handleError(err);\r\n\t\t\t});\t\t\t\t\t\r\n\t\t}\t\t\r\n\t\t\r\n\t\tfunction initRouter(){\r\n\t\t\tvar Router = Backbone.Router.extend({\r\n\t\t\t\t routes: {\r\n\t\t\t\t\t '*path': showContent, // matches all path and splits query-part\t \r\n\t\t\t\t\t }});\r\n\t\t\trouter = new Router();\r\n\t\t\tBackbone.history.start({pushState: true});\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Based on the given parameters requires for the corresponding controller,\r\n\t\t * initiates and triggers page-transition on pageView.\r\n\t\t * @param path : url-path\r\n\t\t * @param query : query-params, the 'content' is used to extract view, the rest is given the content-controller as argument\r\n\t\t */\r\n\t\tfunction showContent(path, query){\r\n\t\t\tpageRootPath = pageRootPath || path; // first time-set\r\n\t\t\tvar urlState = jQuery.parseQuery(query);\r\n\t\t\turlState.content = urlState.content || 'simulations';\r\n\t\t\tvar controllerUri = contentRegister[urlState.content];\t\t\t\r\n\t\t\tif(!controllerUri){\r\n\t\t\t\tthrow new Error('This content-name is not registered, '+urlState.content);\r\n\t\t\t}\r\n\t\t\trequire([controllerUri], function(Controller){\t\t\r\n\t\t\t\tvar formerContentController = currentContentController;\r\n\t\t\t\tcurrentContentController = new Controller(urlState);\r\n\t\t\t\tcurrentContentController\r\n\t\t\t\t .on(BaseContentController.READY, function(){\r\n\t\t\t\t \tasync.series([view.createHideContentTask(formerContentController),\r\n\t\t\t\t \t view.createShowContentTask(currentContentController)]);\t\t\t\t\t\r\n\t\t\t\t\t })\r\n\t\t\t\t\t.init();\r\n\t\t\t});\r\n\t\t}\t\r\n\t\t\r\n\t\t/**\r\n\t\t * @param navTarget : via name as registered in 'contentRegister'\r\n\t\t */\r\n\t\tthis.handleMenuItemClicked = function(navTarget){\r\n\t\t\trouter.navigate(pageRootPath+'?'+jQuery.param({content:navTarget}), {trigger: true});\r\n\t\t};\r\n\t\t\r\n\t\tinit();\r\n\t}", "function init() {\n\t\t//console.log(\"app.init()\");\n\t\tif(initDone) {\n\t\t\t//console.log(\"init already done.\");\n\t\t\treturn;\n\t\t} else {\n\t\t\tinitDone = true;\n\t\t}\n\n\t\t// Init HTML layout and from there the GUI/UI with interaction.\n\t\tlayout.init();\n\t\tscene.init();\n\t\t//ui.init();\n\t\t// Proceed directly to startup of the loop.\n\t\t//start();\n\t}", "function setup(data) {\n //Load the welcome-content into memory\n gegevensWijzigenView = $(data);\n\n // Check of de gebruiker is ingelogd en veranderd de header dan\n // als gebruiker admin is, laat zien de adminpagina\n if (session.get(\"gebruiker_admin\") == 0) {\n header.ingelogd();\n } else if (session.get(\"gebruiker_admin\") == 1) {\n header.ingelogdAdmin();\n } else {\n header.uitgelogd();\n }\n\n gegevensWijzigenView.find(\".updatebutton\").on(\"click\", function () {\n updateGegevens();\n //Return false to prevent the form submission from reloading the page.\n return false;\n });\n\n gegevensWijzigenView.find(\"#account-verwijderen\").on(\"click\", function () {\n var bevestig = confirm(\"Weet u zeker dat u uw account wilt verwijderen?\");\n if (bevestig) {\n deleteAccount();\n handleLogout();\n }\n });\n\n //Empty the content-div and add the resulting view to the page\n $(\".content\").empty().append(gegevensWijzigenView);\n }" ]
[ "0.70371205", "0.6850621", "0.6842083", "0.68247706", "0.67924404", "0.67113656", "0.6603565", "0.65922785", "0.6552805", "0.6542487", "0.6528293", "0.65077037", "0.64928514", "0.64866334", "0.646086", "0.6371092", "0.6370404", "0.6363772", "0.63458115", "0.6337986", "0.63329023", "0.63232875", "0.63113606", "0.6295363", "0.62950104", "0.6235265", "0.6209279", "0.61920935", "0.6143058", "0.6136599", "0.61287665", "0.6117599", "0.6108846", "0.6106644", "0.6081693", "0.6077733", "0.60729825", "0.6046831", "0.6026941", "0.6024508", "0.60231954", "0.60109395", "0.6001365", "0.60012674", "0.60012674", "0.60012674", "0.5995733", "0.59729356", "0.59678525", "0.5962563", "0.5961223", "0.59586334", "0.5952244", "0.59511447", "0.5943115", "0.5932889", "0.5931342", "0.5931342", "0.5929448", "0.5927807", "0.592404", "0.59206235", "0.5916248", "0.59081787", "0.59076047", "0.59076047", "0.59039664", "0.5895791", "0.58954185", "0.58925134", "0.5892416", "0.5890686", "0.58873224", "0.5873465", "0.5873095", "0.5873094", "0.58694124", "0.5868987", "0.58656734", "0.58529395", "0.5852191", "0.58493584", "0.5843088", "0.5839548", "0.58347344", "0.5825351", "0.5823163", "0.58223784", "0.5817259", "0.5816326", "0.58158857", "0.58139616", "0.5812895", "0.5805285", "0.58041924", "0.5803729", "0.57894343", "0.5788026", "0.5787957", "0.5786272", "0.578173" ]
0.0
-1
Fired when content is initially loaded
[$onContentLoad](e) { this.activeScene = undefined; this.activeEntity = undefined; this.activeRenderer = undefined; this.needsReload = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loaded() {\n\taddElements();\n\tosScroll();\n\t// initiate tabs\n\t$('#tabs').tab();\n\t// set event listeners\n\tsetOneTimeEventListeners();\n\t//updateChecked();\n}", "function cb_contentLoaded(cb) {}", "function onInit() {\n Event.onDOMReady(onDOMReady, this.cfg.getProperty(\"container\"), this);\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 }", "function onInit() {\r\n\r\n Event.onDOMReady(onDOMReady, this.cfg.getProperty(\"container\"), this);\r\n\r\n }", "function on_dom_content_loaded () {\n //remove this handler\n document.removeEventListener(\"DOMContentLoaded\", on_dom_content_loaded, false);\n\n //call the onLoad function\n Survana.Workflow.OnPageLoad();\n }", "function onLoaded()\n\t{\n\t\twindow.initExhibitorsList();\n\t\twindow.initFloorPlans();\n\t\twindow.initConciege();\n\t\twindow.initAmenities();\n\t\twindow.initVisas();\n\t}", "function initialize(){\n replaceContent(baseContent, homeContainer);\n}", "function init()\n {\n $(document).on(\"loaded:everything\", runAll);\n }", "function pageFullyLoaded () {}", "function init() {\n if ($('.detail-page').length > 0) {\n renderLoader();\n setArticleParams();\n getArticle();\n bindEvents();\n }\n }", "init() {\n document.addEventListener('DOMContentLoaded', this.loadContent);\n }", "function pageInitalize(){\n\n articleContainer.empty();//Empties article container.//\n $.get(\"/api/headlines?saved=false\").then(function(data){//Runs AJAX request for unsaved\n if (data && data.length) {//Renders found headlines to the page.//\n renderArticles(data);\n }else{\n renderEmpty();//Renders no articles message.//\n }\n });\n }", "function init() {\n\t\t$(document).on('pageBeforeInit', function (e) {\n\t\t\tvar page = e.detail.page;\n\t\t\tload(page.name, page.query);\n\t\t});\n }", "function initPage() {\n $.get('/api/headlines?saved=true').done((data) => {\n articleContainer.empty();\n\n if (data && data.length > 0) {\n renderArticles(data);\n\n // Activate tooltips for the action buttons.\n $('[data-toggle=\"tooltip\"]').tooltip();\n } else {\n renderEmpty();\n }\n });\n }", "function contentLoaded (){\n\t\t//_story.buildSlides()\n\t\t/// send story to be managed by navigator\n\n\t\t_navigator = new Navigator( _story );\n\t\t_navigator.setButtons(_back, _next);\n\t\t\n\t\t$.storyStage.add(_navigator.init() );\n\t\t\n\t\t$.storyViewer.removeEventListener('android:back', pageBack);\n\n\n\t}", "function initPage() {\n $.get('/api/headlines?saved=false').done((data) => {\n articleContainer.empty();\n if (data && data.length > 0) {\n renderArticles(data);\n\n // Activate tooltips for the action buttons.\n $('[data-toggle=\"tooltip\"]').tooltip();\n } else {\n renderEmpty();\n }\n });\n }", "_didLoad () {\n // Clear the height cache\n this._lastHeight = 0\n \n // Post-process content\n this._unescapeImageURLs()\n \n // Setup event listeners\n this._addHeightListener('details', 'toggle')\n this._addHeightListener('img, svg', 'load')\n }", "function initContent() {\n var msHide = document.querySelectorAll('.ms-hide');\n\n /**\n * Place the Yellow ribbon after the header.\n */\n $('#s4-workspace').prepend($('#DeltaPageStatusBar'));\n\n if (msHide.length > 0) {\n /**\n * Hide all right section web parts that are marked as \"hidden\".\n */\n if ($('.ms-hide').closest('.right-section')) {\n $('.right-section .ms-hide').parent().hide();\n }\n checkContentTypes();\n checkOrgChartZone();\n checkGatewayPage();\n }\n\n adjustArticleImageBlock();\n adjustWireStories();\n collapsibleList();\n customCheckboxes();\n howDoI();\n articleComments();\n startMyVMSNet();\n startUserControls();\n\n /**\n * Window Load Events.\n */\n window.addEventListener('load', function () {\n introText();\n wireStories();\n wireCatagory();\n updateMoreSearchText();\n });\n }", "function initOnDomReady() {}", "onLoad () {\n this.content = this.scrollView.content;\n //this.populateList();\n }", "function qodeOnWindowLoad() {\n qodeInitElementorCoverBoxes();\n }", "function init() {\r\n\taddListeners();\r\n\t// Polite loading\r\n\tif (Enabler.isPageLoaded()) {\r\n\t\tshow();\r\n\t}\r\n\telse {\r\n\t\tEnabler.addEventListener(studio.events.StudioEvent.PAGE_LOADED, show);\r\n\t\t//Enabler.addEventListener(studio.events.StudioEvent.VISIBLE, show);\r\n\t}\r\n}", "function initialLoad() {\n $('ul.sf-menu').superfish({\n delay: 500,\n animation: {opacity:'show',height:'show'},\n speed: 'slow',\n autoArrows: true,\n dropShadows: false\n });\n $('.toolTipCls').tooltip();\n ITL.view.datePicker($(\".datepicker\"));\n }", "function startatLoad(){\r\n\tloadNavbar(function(){\r\n\t\tsetSelectMenuesValues(function(){\r\n\t\t\t\tgetXMLData(function(){\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t});\r\n}", "function qodeOnWindowLoad() {\n qodeInitElementorCardsSlider();\n }", "function onPageLoaded() {\n}", "onContentLoading() {\r\n // Stub\r\n }", "onload() {\n this.init();\n }", "onPageReady () {}", "function loadStart() {\n // Prepare the screen and load new content\n collapseHeader(false);\n wipeContents();\n loadHTML('#info-content', 'ajax/info.html');\n loadHTML('#upper-content', 'ajax/texts.html #welcome-text');\n loadHTML('#burger-container', 'ajax/burger-background.html #burger-flags', function() {\n loadScript(\"js/flag-events.js\");\n });\n}", "didInit() { }", "onContentDomReady(event) {\r\n // Stub\r\n }", "function oninitialized() {\n\t // focus once ready\n\t this.once(this.options.mode + ' ready', bind(this.focusInput, this));\n\t\n\t // resolve view\n\t if ('signin' === this.options.mode) {\n\t // if user in AD ip range\n\t if (this.$ssoData && this.$ssoData.connection) {\n\t return this._kerberosPanel(this.options, callback);\n\t }\n\t\n\t // if user logged in show logged in experience\n\t if (this.options._shouldShowLastLogin()) {\n\t return this._loggedinPanel(this.options, callback);\n\t }\n\t\n\t // otherwise, just show signin\n\t this._signinPanel();\n\t }\n\t\n\t if ('signup' === this.options.mode) {\n\t this._signupPanel();\n\t }\n\t\n\t if ('reset' === this.options.mode) {\n\t this._resetPanel(this.options, callback);\n\t }\n\t\n\t }", "onContentLoaded() {\r\n // Stub\r\n }", "function onInit() {}", "function startatLoad(){\r\n\tloadNavbar(function(){\r\n\t\tgetPT1000XMLData(function(){\r\n\t\t\tshowPT1000values();\r\n\t\t});\r\n\t});\r\n}", "function initial() {\n\t$('.load-to-content').off('click');\n\t$('.load-to-content').on('click', function (event) {\n\t\tevent.preventDefault();\n\t\tlet url = $(this).attr('href');\n\t\tloadContent(url, 'get');\n\t});\n\n\t// Ketika form di submit\n\t$('form.form-load-to-content').on('submit', function (event) {\n\t\tevent.preventDefault();\n\t\tlet url = $(this).attr('action');\n\t\tloadContent(url, 'post', new FormData(this));\n\t});\n}", "onInit() {}", "function init() {\n if ($('.scheduled-page').length > 0) {\n setPageUrl();\n bindEvents();\n renderSwitcher();\n renderActions();\n switchPage(scheduled.currentView);\n }\n }", "function init() {\n // THIS IS THE CODE THAT WILL BE EXECUTED ONCE THE WEBPAGE LOADS\n }", "function init() {\n documentReady(documentLoaded);\n}", "ready() {\n const that = this;\n\n super.ready();\n\n that._isParentPositionStatic = window.getComputedStyle(that.parentElement || document.querySelector('body')).position === 'static';\n that._handleSelector(that.selector);\n\n if (that.visible) {\n that._applyPosition();\n }\n\n that._handleEventListeners();\n that._handleResize();\n\n that.value = that.$.content.innerHTML = that.value ? that.value : that.innerHTML;\n that._handleTemplate();\n }", "function loaded(){\n\t\tipcRenderer.send('asynchronous-message', {\"tag\":\"loaded\"});\n\t\t$( document ).tooltip();\n\t}", "function page_shown(e) {\n if (e.persisted) post_load_setup();\n}", "onPageLoaded() {\n window.clearTimeout(this.animationTimeout_);\n window.clearTimeout(this.loadingTimeout_);\n this.setUIStep(AssistantLoadingUIState.LOADED);\n }", "function qodeOnWindowLoad() {\n\t qodeInitNewsShortcodesPagination().init();\n }", "function eltdfOnWindowLoad() {\n\t eltdfWooCommerceStickySidebar().init();\n\t eltdfInitButtonLoading();\n eltdfInitProductListMasonryShortcode();\n }", "_triggerLoaded() {\n\t if (this._alreadyLoaded) {\n\t // Do not trigger event twice\n\t this._triggerUpdated();\n\t return;\n\t }\n\t this._alreadyLoaded = true;\n\t const registry = storage.getRegistry(this._instance);\n\t const events = registry.events;\n\t events.fire('view-loaded', this);\n\t // Trigger onLoad event for child view\n\t if (this.onLoad !== null) {\n\t const onLoad = this.onLoad;\n\t this.onLoad = null;\n\t onLoad();\n\t }\n\t }", "function onloadHandler(){\n console.info(\"Nick Cage is ready!\");\n // where the magic happens\n replaceAllElements();\n }", "function loadContent () {\n\t\t$feedOverlay.removeClass(\"hidden\");\n\t\tMassIdea.loadHTML(SEL_CONTENT, URL_LOAD_FEED, function () {\n\t\t\t$feedOverlay.addClass(\"hidden\");\n\t\t\tresetTimer();\n\t\t});\n\t}", "ready() {\r\n\t\t// Override this\r\n\t\tthis.updateTitle();\r\n\t}", "function onLoadHook() {\n g_finished_loading = true;\n initialUpdate();\n g_initial_collapsed = {};\n g_prev_entries = [];\n}", "function startOnLoad() {\n}", "function startOnLoad() {\n}", "complete() {\n this.trigger('load_complete');\n }", "function pageReady() {\n svg4everybody();\n initScrollMonitor();\n initModals();\n }", "function init() {\n setDomEvents();\n }", "function onLoad() {\n document.documentElement.removeAttribute('viewBox');\n readFrames();\n sozi.events.fire('documentready');\n }", "function onLoad() {\n document.documentElement.removeAttribute(\"viewBox\");\n readFrames();\n sozi.events.fire(\"documentready\");\n }", "function page_loaded() {\n post_load_setup();\n}", "function ajax_Load() {\n //$(\".consoleLogOutput\").append('<div class=\"consoleLog_helm\">ajax_Load() event starting.</div>');\n \n if (helm.alreadyInitialized && helm.RefreshHelmDataAfterUpdatePanelPostBack) {\n helm.jQueryBindEvents();\n helm.Initialize(true); //true -> because this is after ajax request\n } else {\n //reset the refresh overrides\n helm.alreadyInitialized = true;\n helm.RefreshHelmDataAfterUpdatePanelPostBack = true;\n }\n \n }", "function init() {\n if (!ready) {\n ready = true;\n initElements();\n }\n }", "function onBodyLoad() {\n document.querySelector('.presentation').classList.add('visible')\n\n // Set up\n getSlideNumberFromUrlFragment()\n showSlide(true, true)\n onSlideEnter(slideEls[currentSlideNumber], true)\n\n // Slide manipulation\n hyphenateSlides()\n setUpBetterPunctuation()\n\n document.body.addEventListener('keydown', onKeyDown)\n document.body.focus()\n}", "function tabLoad() {\n // Tab load safety check\n if (tabHasLoaded) {\n return;\n }\n tabHasLoaded = true;\n\n setupPage();\n\n getAlerts();\n }", "function onHtmlLoaded(){\n \n // move article if header height changes during browser resize\n\t$(window).resize(positionArticle);\n\t\n\t//Create top menu (buttons and username)\n addTopMenu();\n \n //initial positioning of articles based on header size \n positionArticle();\n \n currentArticleId = getUrlParam(\"id\"); //Get selected article ID\n \n var article = new Article(); //Create new article object \n article.getArticleById(currentArticleId).done(displayArticle); //Request article by id and display it\n \n}//END onHtmlLoaded function", "function initLazyElements() {\n $window.lazyLoadXT();\n }", "function initLazyElements() {\n $window.lazyLoadXT();\n }", "function initLazyElements() {\n $window.lazyLoadXT();\n }", "function onPageLoad()\n\t{\n\t\t//Set page size\n\t\tSetSize();\n\t\tloadPreferences();\n\t}", "function qodefOnDocumentReady() {\n\t\tqodefInitItemShowcase();\n\t}", "ngAfterContentInit() {\n this._isInitialized = true;\n }", "ngAfterContentInit() {\n this._isInitialized = true;\n }", "ngAfterContentInit() {\n this._isInitialized = true;\n }", "ngAfterContentInit() {\n this._isInitialized = true;\n }", "onLoad() {\n\n // Do something when a section instance is loaded\n this.init();\n }", "function alwaysRunOnload () {\n\t\n\t}", "function init() {\n console.debug(\"Document Load and Ready\");\n\n listener();\n initGallery();\n cargarAlumnos();\n\n // mejor al mostrar la modal\n // cargarCursos();\n}", "ready() {\n super.ready();\n\n afterNextRender(this, function() {});\n }", "ready() {\n super.ready();\n\n afterNextRender(this, function() {});\n }", "ready() {\n super.ready();\n\n afterNextRender(this, function() {});\n }", "function init() {\n var content = $('content');\n if(content) {\n new CastAway(content).resize();\n new AutoSaveForm(content.parentNode.parentNode);\n }\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 setContent(contentUrl) {\n\n $(document).ready(function () {\n\n $('#Main2-container').load(contentUrl);\n\n });\n\n //window.scrollTo(0, 0); //move the view back to the top of the window\n}", "function OnLoaded(){\n const sections=document.getElementsByTagName(\"section\");\n buildNavigationBar(sections);\n buildSectionArray(sections)\n createScrollToTopView();\n}", "function loaded() {\r\n\r\n const $loginForm = classifyForm('.login-popup');\r\n\r\n if ($loginForm.length) {\r\n registerLoginValidation($loginForm);\r\n }\r\n\r\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 eltdfOnWindowLoad() {\n eltdfDropDownMenu();\n eltdfSetDropDownMenuPosition();\n eltdfInitDividedHeaderMenu();\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 }", "init() {\n\t\treturn this.loadContent();\n\t}", "function contentLoaded(element) {\n setTimeout(function() {\n hide(\".es-progress-indicator\");\n //hide(loadingContentElement);\n show(element);\n // show(articleDisplay);\n if (searchInput[0].value !== '') {\n show(clearSearchIcon);\n }\n }, 600);\n }", "function _init() {\r\n // set page <title>\r\n Metadata.set(home.title);\r\n\r\n // activate controller\r\n _activate();\r\n }", "ready() {\n this._root = this._createRoot();\n super.ready();\n this._firstRendered();\n }", "function onPageLoad() {\r\n\t// although jQuery already has an on page load, \r\n\t// this function was added for sake of organization.\r\n\tvar trigger = \"load\";\r\n}", "async componentWillLoad() {\n if (this.src) {\n await this.fetchContent();\n }\n this.initObserver(); // track dom changes to re-apply content\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 }", "componentDidLoad() {\r\n this.contentItemsChangeHandler();\r\n const dxpContentListItemsWithSlot = this.element.querySelectorAll(CONTENT_LIST_ITEM).length ?\r\n this.element.querySelectorAll(CONTENT_LIST_ITEM)\r\n :\r\n this.element.querySelectorAll(CONTENT_LIST_ITEM);\r\n const ele = dxpContentListItemsWithSlot.length - 1;\r\n if (dxpContentListItemsWithSlot.length !== 0) {\r\n dxpContentListItemsWithSlot[ele].classList.add('margin-bottom-0');\r\n dxpContentListItemsWithSlot[ele].componentOnReady().then(res => {\r\n res.querySelector('.dxp-content-list-item').classList.add('margin-bottom-0');\r\n });\r\n }\r\n }", "function WebBrowser_NotifyLoaded()\n{\n\t//forward to update content\n\tWebBrowser_UpdateContent(this.InterpreterObject.DataObject.Id);\n}", "function initialize() {\n $.get(\"views/AdminHomePage.html\")\n .done(setup)\n .fail(error);\n }", "function initialDisplay() {\n \tcountLinks();\n \tgetDropDowns();\n \tgetList(\"id\");\n }", "function onLoad() {\n sozi.events.listen('framechange', onFrameChange);\n }" ]
[ "0.7462758", "0.73048556", "0.7154768", "0.712948", "0.7107197", "0.7094617", "0.7086776", "0.70827293", "0.70110893", "0.7003444", "0.69913834", "0.6972502", "0.69507337", "0.69409984", "0.6928354", "0.6907729", "0.6904762", "0.68920195", "0.6811773", "0.6784577", "0.6770408", "0.6749952", "0.67492944", "0.67396915", "0.6733422", "0.67299175", "0.6709714", "0.66824", "0.66751444", "0.66575855", "0.6653429", "0.6614562", "0.65977365", "0.6596244", "0.6583724", "0.6568335", "0.6565704", "0.65623033", "0.6561569", "0.6560313", "0.6555002", "0.65476215", "0.6542486", "0.6531227", "0.6508288", "0.650376", "0.65032315", "0.64834625", "0.64741254", "0.64726406", "0.6460167", "0.64599377", "0.6440104", "0.64291203", "0.64291203", "0.6423879", "0.64183074", "0.6401347", "0.6399887", "0.63969946", "0.63965183", "0.6396473", "0.6390534", "0.6388075", "0.63848007", "0.6383119", "0.6382476", "0.6382476", "0.6382476", "0.63771874", "0.6374612", "0.6363366", "0.6363366", "0.6363366", "0.6363366", "0.63621134", "0.63574547", "0.6341979", "0.63412243", "0.63412243", "0.63412243", "0.6326078", "0.63150555", "0.63125867", "0.6304304", "0.6300085", "0.62949085", "0.6293957", "0.62935895", "0.62926507", "0.62913907", "0.62790555", "0.62758166", "0.6275484", "0.62754273", "0.62729055", "0.62708324", "0.627079", "0.6269676", "0.6268954", "0.62475896" ]
0.0
-1
A command from a descendant node. Process here.
[$onCommand](e) { const { type } = e.detail; switch (type) { case 'update-property': const { uuid, property, value, dataType } = e.detail; this.content.updateProperty(uuid, property, value, dataType); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "executeNode(msg) {\n if(msg.author.id === this.discordCli.user.id)\n return;\n\n let commObj = this.root.crawl(msg.content);\n if(!commObj) return;\n \n if(commObj.Node.Type === \"command\")\n commObj.Node.execute(this, commObj, msg);\n else this.emit(\"nodeNotCommand\", commObj, msg);\n }", "function doCommandInContext(node, command) {\n\t\tvar parent = node.parent;\n\t\tvar side = utils.getSide(node);\n\t\tnode = command(node);\n\t\tif (node !== null) { utils.setChild(node, parent, side); }\n\t\treturn node;\n\t}", "childDown(node, defaultNode) {\n throw new Error(\"You must define childDown().\")\n }", "function perform(m, command) {\n\n if(has(m, command))\n domNode(m)[command]();\n\n }", "function node() {\n invoke(this);\n }", "function execute_tree() {\n root.Execute();\n}", "function processNode(node){\n processChild(node);\n for( i in node.children )\n processNode(node.children[i]);\n }", "function handleCommand() {}", "exec() {\n this.event.preventDefault();\n let node = false;\n\n if (this.item.getDepth() > 1) {\n this.event.stopPropagation();\n this.parentNav.closeSubNav();\n node = this.getElement('parentItem');\n }\n else {\n this.masterNav.closeAllSubNavs();\n node = this.getElement('first', this.item.parentNode);\n }\n\n if (node) {\n node.focus();\n }\n }", "function Command(action, nid, args)\r\n{\r\n this.action = action;\r\n this.nid = nid;\r\n this.args = args;\r\n\r\n}", "function Command () {}", "function node(){}", "function postOrderWalk( node, cb ) {\n\n // traverse children\n if( typeof node == 'object' ) {\n if( 'op1' in node){ postOrderWalk( node.op1, cb ); }\n if( 'op2' in node){ postOrderWalk( node.op2, cb ); }\n }\n\n // execute callback\n cb( node );\n\n }", "function getCmdNode(fullCmd, cmdTree, depth=0, fullCmdList=undefined) {\n if (depth==0) {\n fullCmdList = fullCmd.split(' ').filter(arg=>arg!=\"\");\n }\n if (cmdTree.cmd['cmd']==fullCmdList[depth]) {\n if (cmdTree.next!==undefined && (depth+1)!=fullCmdList.length) {\n for (let currentCmd of cmdTree.next) {\n let retCmd = getCmdNode(undefined, currentCmd, depth+1, fullCmdList);\n if (retCmd!==undefined) {\n return retCmd;\n } \n }\n } else {\n return cmdTree;\n }\n }\n return; \n}", "function childNode(node, action){\n log += \"CHILD [\" + action + \"] OF: (\" + node.x + \",\" + node.y + \"): <br />\\n\";\n\n switch(action) {\n case 1:\n log += \"----> (\" + node.x + \",\" + (node.y - 1) + \"): <br />\\n\";\n return {x: node.x, y: node.y - 1};\n break;\n\n case 2:\n log += \"----> (\" + (node.x + 1) + \",\" + node.y + \"): <br />\\n\";\n return {x: node.x + 1, y: node.y};\n break;\n\n case 3:\n log += \"----> (\" + node.x + \",\" + (node.y + 1) + \"): <br />\\n\";\n return {x: node.x, y: node.y + 1};\n break;\n\n case 4:\n log += \"----> (\" + (node.x - 1) + \",\" + node.y + \"): <br />\\n\";\n return {x: node.x - 1, y: node.y};\n break;\n }\n}", "function processNode(node) {\n // add a toString method for debugging\n node.toString = function() {\n var string = \"<\" + this.nodeName;\n for (var i = 0; i < this.attributes.length; i++) {\n string += \" \" + this.attributes.item(i).nodeName + \"=\" + this.attributes.item(i).nodeValue;\n }\n string += \">\";\n return string;\n };\n \n // connect the appropriate renderer\n if (renderers.hasOwnProperty(node.tagName)) {\n node.render = renderers[node.tagName];\n }\n \n // connect the appropriate notifier\n if (notifiers.hasOwnProperty(node.tagName)) {\n node.notifyChildDone = notifiers[node.tagName];\n }\n \n scrubAttributes(node);\n }", "function cmd( command, field, cb ){\n\t\t\texec(command, function (err, stdout, stderr) {\n\t\t\t\tif (err) return console.log(err); \n\t\t\t\tburstData[field] = stdout;\n\t\t\t\tcb();\n\t\t\t})\n\t\t}", "function _execCommand(doc, command, nodeName, className) {\n if (className) {\n var eventListener = dom.observe(doc, \"DOMNodeInserted\", function(event) {\n var target = event.target,\n displayStyle;\n if (target.nodeType !== wysihtml5.ELEMENT_NODE) {\n return;\n }\n displayStyle = dom.getStyle(\"display\").from(target);\n if (displayStyle.substr(0, 6) !== \"inline\") {\n // Make sure that only block elements receive the given class\n target.className += \" \" + className;\n }\n });\n }\n doc.execCommand(command, false, nodeName);\n if (eventListener) {\n eventListener.stop();\n }\n }", "function _execCommand(doc, command, nodeName, className) {\n if (className) {\n var eventListener = dom.observe(doc, \"DOMNodeInserted\", function(event) {\n var target = event.target,\n displayStyle;\n if (target.nodeType !== wysihtml5.ELEMENT_NODE) {\n return;\n }\n displayStyle = dom.getStyle(\"display\").from(target);\n if (displayStyle.substr(0, 6) !== \"inline\") {\n // Make sure that only block elements receive the given class\n target.className += \" \" + className;\n }\n });\n }\n doc.execCommand(command, false, nodeName);\n if (eventListener) {\n eventListener.stop();\n }\n }", "function receiveCommand (_command) {\n\n\n\t\tvar target\t\t= cursor.getCurrent(),\n\t\t\tcmd\t\t\t= _command.name,\n\t\t\targs\t\t= _command.args,\n\t\t\tinfo\t\t= commandBank[cmd];\n\n\t\t// console.log(\"Executing: \" + cmd + \" with\", (args.length) ? args : \"no arguments\");\n\n\t\t// Check command metadata exists\n\t\tif (typeof info === 'undefined') {\n\n\t\t\tApp.console.error(\"Interface.receiveCommand: No entry for '\" + cmd + \"'.\");\n\t\t\treturn;\n\n\t\t}\n\n\t\t// Check node types\n\t\tif (!hasType(target, info.types)) {\n\n\t\t\tApp.console.error(\"Interface.receiveCommand: Node type '\" + target.type + \"' does not accept '\" + cmd + \"'.\");\n\t\t\treturn;\n\n\t\t}\n\n\t\t// Check function arity\n\t\tif (args.length > info.arity) { \n\n\t\t\tApp.console.error(\"Interface.receiveCommand: Too many arguments (\" + args.length + \") for '\" + cmd + \"'.\");\n\t\t\treturn;\n\n\t\t}\n\n\t\t// Check command implementation exists\n\t\tif (typeof commandFunctions[cmd] === 'undefined') {\n\n\t\t\tApp.console.error(\"Interface.receiveCommand: Command implementation not found: '\" + cmd + \"'.\");\n\t\t\treturn;\n\n\t\t}\n\n\t\t// Apply the command\n\t\tcommandFunctions[cmd].apply(target, args);\n\n\n\t\t// Post-execution cleanup\n\t\tif (info.refresh) {\n\n\t\t\tcursor.refreshList();\n\n\t\t}\n\n\t\t// Perform callback if present\n\t\tif (_command.callback) {\n\n\t\t\t_command.callback();\n\n\t\t}\n\n\t}", "childUp(node, defaultNode) {\n throw new Error(\"You must define childUp().\")\n }", "descendant(root, path) {\n var node = Node.get(root, path);\n\n if (Editor.isEditor(node)) {\n throw new Error(\"Cannot get the descendant node at path [\".concat(path, \"] because it refers to the root editor node instead: \").concat(node));\n }\n\n return node;\n }", "descendant(root, path) {\n var node = Node.get(root, path);\n\n if (Editor.isEditor(node)) {\n throw new Error(\"Cannot get the descendant node at path [\".concat(path, \"] because it refers to the root editor node instead: \").concat(node));\n }\n\n return node;\n }", "function click(d)\n {\n toggleChildren(d);\n printNodeInfo(d);\n }", "goToChild(id) {\n // sets the current node to the child whose id matches id\n // resets the children array\n // gathers all the info (comments and similar things) on the current thing and saves it\n // sets the tracker of whether we're currently at a thing to true\n this.thing = true;\n this.node = this.currentThing(id);\n this.children = [];\n const self = this;\n this.fetchThingInfo(id).then(function() {\n self.emit('change');\n })\n }", "msgHandler(e) {\n if ( e.data.type === \"parent\"){\n this.currentSearch(e.data.term, 1);\n }\n }", "function interpret_command(content) {\n UDGE.onInterpretCommand(content);\n}", "function one(node) {\n if (node.type === type) {\n callback.call(context, node);\n }\n\n var children = node.children;\n var index = -1;\n var length = children ? children.length : 0;\n\n while (++index < length) {\n one(children[index]);\n }\n }", "async run () {\n const { args, argv } = this.parse(BaseIndexCommand) // need `parse` to trigger args check\n\n // subcommand topics (colon separated) are routed directly and never get here\n // there will always be a subCommand because of the args check above\n\n const subCommand = args['sub-command']\n const topic = `${this.id}:${subCommand}`\n const index = argv.indexOf(subCommand)\n if (index !== -1) {\n argv[index] = topic\n }\n\n // the second parameter is the root path to the CLI containing the command\n return run(argv, this.config.options)\n }", "function processCommand(c) {\n var cmd = c[\"cmd\"]\n var key = c[\"key\"]\n\n switch (cmd) {\n case \"add\": add(key, c[\"title\"], c[\"x\"], c[\"y\"]); break;\n case \"move\": move_to(key, c[\"x\"], c[\"y\"]); break;\n //case \"set_pos_to\": set_pos_to(key, c[\"x\"], c[\"y\"]); break;\n case \"remove\": remove(key); break;\n case \"link\": add_link(c[\"from\"], c[\"to\"]); break;\n case \"change\": change(c[\"key\"], c[\"title\"])\n }\n}", "function patchCommand(arg, messageReceived){\n \n}", "descendantStartMethod(){\n //start them moving, if they move from start\n //NOTE calling this here instead of the parent class to make sure it uses the movesFromTheStart of the descendant\n if(this.movesFromTheStart){\n this.setMovementInRandomDirection();\n }\n\n //keep them from changing direction at interval if told not to\n if(this.dontChangeDirectionUntilTold){\n this.randomMovementEvent.destroy();\n }\n }", "decorate() {\n let commandId;\n if ((commandId = this.getAttribute('command'))) {\n this.setCommand(commandId);\n }\n\n this.addEventListener('click', this.handleClick_.bind(this));\n }", "function NodeHandler() { }", "function selectNode(event){\n item = $(event.toElement).closest('.literal-sequence, .literal, .capture-group, .charset, .digit, .non-digit, .word, .non-word, .white-space, .non-white-space, .start, .end, .space, .any-character, .word-boundary ');\n\n itemID = item.attr('id');\n }", "anchoredNodeRemoved(node) {}", "get node() { return this._node; }", "processCommand(command, message) {\n const entityKey = command.split('/')[0]\n switch (command) {\n case 'outlet1/command':\n if (this.entity.hasOwnProperty(entityKey)) {\n this.setOutletState(message, 'outlet1')\n }\n break;\n case 'outlet2/command':\n if (this.entity.hasOwnProperty(entityKey)) {\n this.setOutletState(message, 'outlet2')\n }\n break;\n default:\n this.debug(`Received message to unknown command topic: ${command}`)\n }\n }", "function walker() {\n\n}", "visitNode(node) { }", "function executeMe (event)\n{\n if (!event && window.event) { log('ie event'); event = window.event; }\n var target = event.target || event.srcElement;\n commands[target.id].method();\n}", "function click(d) {\n// use the following to superficially change the text of the node.\n// this.getElementsByTagName('text')[0].textContent = \"clicked all over\"\n\n if (d.children) {\n d._children = d.children;\n d.children = null;\n } else {\n d.children = d._children;\n d._children = null;\n }\n update(d);\n}", "function _getCommandForSubCommand(_cmd, _argv){\n \n switch (_cmd) {\n case MBIX_SUBCOMMANDS.SHOW : \n return new Show(commandLineArgs, _argv);\n\n case MBIX_SUBCOMMANDS.MOUNT : \n return new Mount(commandLineArgs, _argv);\n \n case MBIX_SUBCOMMANDS.UMOUNT : \n return new Umount(commandLineArgs, _argv);\n \n case MBIX_SUBCOMMANDS.FIND : \n return new Find(commandLineArgs, _argv);\n\n default:\n return false;\n }\n}", "function getCmds(node)\n\t\tconst cmds = {}", "onChildMsg(msg){\n \n console.log('> Vino de un children:',msg);\n\n }", "function _execCommand(doc, composer, command, nodeName, className) {\n var ranges = composer.selection.getOwnRanges();\n for (var i = ranges.length; i--;) {\n composer.selection.getSelection().removeAllRanges();\n composer.selection.setSelection(ranges[i]);\n if (className) {\n var eventListener = dom.observe(doc, \"DOMNodeInserted\", function (event) {\n var target = event.target,\n displayStyle;\n if (target.nodeType !== wysihtml5.ELEMENT_NODE) {\n return;\n }\n displayStyle = dom.getStyle(\"display\").from(target);\n if (displayStyle.substr(0, 6) !== \"inline\") {\n // Make sure that only block elements receive the given class\n target.className += \" \" + className;\n }\n });\n }\n doc.execCommand(command, false, nodeName);\n\n if (eventListener) {\n eventListener.stop();\n }\n }\n }", "function _execCommand(doc, composer, command, nodeName, className) {\n var ranges = composer.selection.getOwnRanges();\n for (var i = ranges.length; i--;){\n composer.selection.getSelection().removeAllRanges();\n composer.selection.setSelection(ranges[i]);\n if (className) {\n var eventListener = dom.observe(doc, \"DOMNodeInserted\", function(event) {\n var target = event.target,\n displayStyle;\n if (target.nodeType !== wysihtml5.ELEMENT_NODE) {\n return;\n }\n displayStyle = dom.getStyle(\"display\").from(target);\n if (displayStyle.substr(0, 6) !== \"inline\") {\n // Make sure that only block elements receive the given class\n target.className += \" \" + className;\n }\n });\n }\n doc.execCommand(command, false, nodeName);\n\n if (eventListener) {\n eventListener.stop();\n }\n }\n }", "function _execCommand(doc, composer, command, nodeName, className) {\n var ranges = composer.selection.getOwnRanges();\n for (var i = ranges.length; i--;){\n composer.selection.getSelection().removeAllRanges();\n composer.selection.setSelection(ranges[i]);\n if (className) {\n var eventListener = dom.observe(doc, \"DOMNodeInserted\", function(event) {\n var target = event.target,\n displayStyle;\n if (target.nodeType !== wysihtml5.ELEMENT_NODE) {\n return;\n }\n displayStyle = dom.getStyle(\"display\").from(target);\n if (displayStyle.substr(0, 6) !== \"inline\") {\n // Make sure that only block elements receive the given class\n target.className += \" \" + className;\n }\n });\n }\n doc.execCommand(command, false, nodeName);\n\n if (eventListener) {\n eventListener.stop();\n }\n }\n }", "function Node(){}", "_executeSubCommand(subcommand, args) {\n args = args.slice();\n let launchWithNode = false; // Use node for source targets so do not need to get permissions correct, and on Windows.\n const sourceExt = ['.js', '.ts', '.tsx', '.mjs', '.cjs'];\n\n // Not checking for help first. Unlikely to have mandatory and executable, and can't robustly test for help flags in external command.\n this._checkForMissingMandatoryOptions();\n\n // Want the entry script as the reference for command name and directory for searching for other files.\n let scriptPath = this._scriptPath;\n // Fallback in case not set, due to how Command created or called.\n if (!scriptPath && require.main) {\n scriptPath = require.main.filename;\n }\n\n let baseDir;\n try {\n const resolvedLink = fs.realpathSync(scriptPath);\n baseDir = path.dirname(resolvedLink);\n } catch (e) {\n baseDir = '.'; // dummy, probably not going to find executable!\n }\n\n // name of the subcommand, like `pm-install`\n let bin = path.basename(scriptPath, path.extname(scriptPath)) + '-' + subcommand._name;\n if (subcommand._executableFile) {\n bin = subcommand._executableFile;\n }\n\n const localBin = path.join(baseDir, bin);\n if (fs.existsSync(localBin)) {\n // prefer local `./<bin>` to bin in the $PATH\n bin = localBin;\n } else {\n // Look for source files.\n sourceExt.forEach((ext) => {\n if (fs.existsSync(`${localBin}${ext}`)) {\n bin = `${localBin}${ext}`;\n }\n });\n }\n launchWithNode = sourceExt.includes(path.extname(bin));\n\n let proc;\n if (process.platform !== 'win32') {\n if (launchWithNode) {\n args.unshift(bin);\n // add executable arguments to spawn\n args = incrementNodeInspectorPort(process.execArgv).concat(args);\n\n proc = childProcess.spawn(process.argv[0], args, { stdio: 'inherit' });\n } else {\n proc = childProcess.spawn(bin, args, { stdio: 'inherit' });\n }\n } else {\n args.unshift(bin);\n // add executable arguments to spawn\n args = incrementNodeInspectorPort(process.execArgv).concat(args);\n proc = childProcess.spawn(process.execPath, args, { stdio: 'inherit' });\n }\n\n const signals = ['SIGUSR1', 'SIGUSR2', 'SIGTERM', 'SIGINT', 'SIGHUP'];\n signals.forEach((signal) => {\n // @ts-ignore\n process.on(signal, () => {\n if (proc.killed === false && proc.exitCode === null) {\n proc.kill(signal);\n }\n });\n });\n\n // By default terminate process when spawned process terminates.\n // Suppressing the exit if exitCallback defined is a bit messy and of limited use, but does allow process to stay running!\n const exitCallback = this._exitCallback;\n if (!exitCallback) {\n proc.on('close', process.exit.bind(process));\n } else {\n proc.on('close', () => {\n exitCallback(new CommanderError(process.exitCode || 0, 'commander.executeSubCommandAsync', '(close)'));\n });\n }\n proc.on('error', (err) => {\n // @ts-ignore\n if (err.code === 'ENOENT') {\n const executableMissing = `'${bin}' does not exist\n - if '${subcommand._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name`;\n throw new Error(executableMissing);\n // @ts-ignore\n } else if (err.code === 'EACCES') {\n throw new Error(`'${bin}' not executable`);\n }\n if (!exitCallback) {\n process.exit(1);\n } else {\n const wrappedError = new CommanderError(1, 'commander.executeSubCommandAsync', '(error)');\n wrappedError.nestedError = err;\n exitCallback(wrappedError);\n }\n });\n\n // Store the reference to the child process\n this.runningCommand = proc;\n }", "_executeSubCommand(subcommand, args) {\n args = args.slice();\n let launchWithNode = false; // Use node for source targets so do not need to get permissions correct, and on Windows.\n const sourceExt = ['.js', '.ts', '.tsx', '.mjs', '.cjs'];\n\n // Not checking for help first. Unlikely to have mandatory and executable, and can't robustly test for help flags in external command.\n this._checkForMissingMandatoryOptions();\n\n // Want the entry script as the reference for command name and directory for searching for other files.\n let scriptPath = this._scriptPath;\n // Fallback in case not set, due to how Command created or called.\n if (!scriptPath && require.main) {\n scriptPath = require.main.filename;\n }\n\n let baseDir;\n try {\n const resolvedLink = fs.realpathSync(scriptPath);\n baseDir = path.dirname(resolvedLink);\n } catch (e) {\n baseDir = '.'; // dummy, probably not going to find executable!\n }\n\n // name of the subcommand, like `pm-install`\n let bin = path.basename(scriptPath, path.extname(scriptPath)) + '-' + subcommand._name;\n if (subcommand._executableFile) {\n bin = subcommand._executableFile;\n }\n\n const localBin = path.join(baseDir, bin);\n if (fs.existsSync(localBin)) {\n // prefer local `./<bin>` to bin in the $PATH\n bin = localBin;\n } else {\n // Look for source files.\n sourceExt.forEach((ext) => {\n if (fs.existsSync(`${localBin}${ext}`)) {\n bin = `${localBin}${ext}`;\n }\n });\n }\n launchWithNode = sourceExt.includes(path.extname(bin));\n\n let proc;\n if (process.platform !== 'win32') {\n if (launchWithNode) {\n args.unshift(bin);\n // add executable arguments to spawn\n args = incrementNodeInspectorPort(process.execArgv).concat(args);\n\n proc = childProcess.spawn(process.argv[0], args, { stdio: 'inherit' });\n } else {\n proc = childProcess.spawn(bin, args, { stdio: 'inherit' });\n }\n } else {\n args.unshift(bin);\n // add executable arguments to spawn\n args = incrementNodeInspectorPort(process.execArgv).concat(args);\n proc = childProcess.spawn(process.execPath, args, { stdio: 'inherit' });\n }\n\n const signals = ['SIGUSR1', 'SIGUSR2', 'SIGTERM', 'SIGINT', 'SIGHUP'];\n signals.forEach((signal) => {\n // @ts-ignore\n process.on(signal, () => {\n if (proc.killed === false && proc.exitCode === null) {\n proc.kill(signal);\n }\n });\n });\n\n // By default terminate process when spawned process terminates.\n // Suppressing the exit if exitCallback defined is a bit messy and of limited use, but does allow process to stay running!\n const exitCallback = this._exitCallback;\n if (!exitCallback) {\n proc.on('close', process.exit.bind(process));\n } else {\n proc.on('close', () => {\n exitCallback(new CommanderError(process.exitCode || 0, 'commander.executeSubCommandAsync', '(close)'));\n });\n }\n proc.on('error', (err) => {\n // @ts-ignore\n if (err.code === 'ENOENT') {\n const executableMissing = `'${bin}' does not exist\n - if '${subcommand._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name`;\n throw new Error(executableMissing);\n // @ts-ignore\n } else if (err.code === 'EACCES') {\n throw new Error(`'${bin}' not executable`);\n }\n if (!exitCallback) {\n process.exit(1);\n } else {\n const wrappedError = new CommanderError(1, 'commander.executeSubCommandAsync', '(error)');\n wrappedError.nestedError = err;\n exitCallback(wrappedError);\n }\n });\n\n // Store the reference to the child process\n this.runningCommand = proc;\n }", "processCommand(command, message) {\n const entityKey = command.split('/')[0]\n switch (command) {\n case 'light/command':\n if (this.entity.hasOwnProperty(entityKey)) {\n this.setLightState(message)\n }\n break;\n case 'light/brightness_command':\n if (this.entity.hasOwnProperty(entityKey)) {\n this.setLightLevel(message)\n }\n break;\n case 'beam_duration/command':\n if (this.entity.hasOwnProperty(entityKey)) {\n this.setLightDuration(message)\n }\n break;\n default:\n this.debug(`Received message to unknown command topic: ${command}`)\n }\n }", "function executeShifts(node) {\n\t var children = node.children;\n\t var n = children.length;\n\t var shift = 0;\n\t var change = 0;\n\t\n\t while (--n >= 0) {\n\t var child = children[n];\n\t child.hierNode.prelim += shift;\n\t child.hierNode.modifier += shift;\n\t change += child.hierNode.change;\n\t shift += child.hierNode.shift + change;\n\t }\n\t }", "getFirstChild() {}", "_executeSubCommand(subcommand, args) {\n args = args.slice();\n let launchWithNode = false; // Use node for source targets so do not need to get permissions correct, and on Windows.\n const sourceExt = ['.js', '.ts', '.tsx', '.mjs'];\n\n // Not checking for help first. Unlikely to have mandatory and executable, and can't robustly test for help flags in external command.\n this._checkForMissingMandatoryOptions();\n\n // Want the entry script as the reference for command name and directory for searching for other files.\n let scriptPath = this._scriptPath;\n // Fallback in case not set, due to how Command created or called.\n if (!scriptPath && process.mainModule) {\n scriptPath = process.mainModule.filename;\n }\n\n let baseDir;\n try {\n const resolvedLink = fs.realpathSync(scriptPath);\n baseDir = path.dirname(resolvedLink);\n } catch (e) {\n baseDir = '.'; // dummy, probably not going to find executable!\n }\n\n // name of the subcommand, like `pm-install`\n let bin = path.basename(scriptPath, path.extname(scriptPath)) + '-' + subcommand._name;\n if (subcommand._executableFile) {\n bin = subcommand._executableFile;\n }\n\n const localBin = path.join(baseDir, bin);\n if (fs.existsSync(localBin)) {\n // prefer local `./<bin>` to bin in the $PATH\n bin = localBin;\n } else {\n // Look for source files.\n sourceExt.forEach((ext) => {\n if (fs.existsSync(`${localBin}${ext}`)) {\n bin = `${localBin}${ext}`;\n }\n });\n }\n launchWithNode = sourceExt.includes(path.extname(bin));\n\n let proc;\n if (process.platform !== 'win32') {\n if (launchWithNode) {\n args.unshift(bin);\n // add executable arguments to spawn\n args = incrementNodeInspectorPort(process.execArgv).concat(args);\n\n proc = spawn(process.argv[0], args, { stdio: 'inherit' });\n } else {\n proc = spawn(bin, args, { stdio: 'inherit' });\n }\n } else {\n args.unshift(bin);\n // add executable arguments to spawn\n args = incrementNodeInspectorPort(process.execArgv).concat(args);\n proc = spawn(process.execPath, args, { stdio: 'inherit' });\n }\n\n const signals = ['SIGUSR1', 'SIGUSR2', 'SIGTERM', 'SIGINT', 'SIGHUP'];\n signals.forEach((signal) => {\n // @ts-ignore\n process.on(signal, () => {\n if (proc.killed === false && proc.exitCode === null) {\n proc.kill(signal);\n }\n });\n });\n\n // By default terminate process when spawned process terminates.\n // Suppressing the exit if exitCallback defined is a bit messy and of limited use, but does allow process to stay running!\n const exitCallback = this._exitCallback;\n if (!exitCallback) {\n proc.on('close', process.exit.bind(process));\n } else {\n proc.on('close', () => {\n exitCallback(new CommanderError(process.exitCode || 0, 'commander.executeSubCommandAsync', '(close)'));\n });\n }\n proc.on('error', (err) => {\n // @ts-ignore\n if (err.code === 'ENOENT') {\n const executableMissing = `'${bin}' does not exist\n - if '${subcommand._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name`;\n throw new Error(executableMissing);\n // @ts-ignore\n } else if (err.code === 'EACCES') {\n throw new Error(`'${bin}' not executable`);\n }\n if (!exitCallback) {\n process.exit(1);\n } else {\n const wrappedError = new CommanderError(1, 'commander.executeSubCommandAsync', '(error)');\n wrappedError.nestedError = err;\n exitCallback(wrappedError);\n }\n });\n\n // Store the reference to the child process\n this.runningCommand = proc;\n }", "_executeSubCommand(subcommand, args) {\n args = args.slice();\n let launchWithNode = false; // Use node for source targets so do not need to get permissions correct, and on Windows.\n const sourceExt = ['.js', '.ts', '.tsx', '.mjs'];\n\n // Not checking for help first. Unlikely to have mandatory and executable, and can't robustly test for help flags in external command.\n this._checkForMissingMandatoryOptions();\n\n // Want the entry script as the reference for command name and directory for searching for other files.\n let scriptPath = this._scriptPath;\n // Fallback in case not set, due to how Command created or called.\n if (!scriptPath && process.mainModule) {\n scriptPath = process.mainModule.filename;\n }\n\n let baseDir;\n try {\n const resolvedLink = fs.realpathSync(scriptPath);\n baseDir = path.dirname(resolvedLink);\n } catch (e) {\n baseDir = '.'; // dummy, probably not going to find executable!\n }\n\n // name of the subcommand, like `pm-install`\n let bin = path.basename(scriptPath, path.extname(scriptPath)) + '-' + subcommand._name;\n if (subcommand._executableFile) {\n bin = subcommand._executableFile;\n }\n\n const localBin = path.join(baseDir, bin);\n if (fs.existsSync(localBin)) {\n // prefer local `./<bin>` to bin in the $PATH\n bin = localBin;\n } else {\n // Look for source files.\n sourceExt.forEach((ext) => {\n if (fs.existsSync(`${localBin}${ext}`)) {\n bin = `${localBin}${ext}`;\n }\n });\n }\n launchWithNode = sourceExt.includes(path.extname(bin));\n\n let proc;\n if (process.platform !== 'win32') {\n if (launchWithNode) {\n args.unshift(bin);\n // add executable arguments to spawn\n args = incrementNodeInspectorPort(process.execArgv).concat(args);\n\n proc = spawn(process.argv[0], args, { stdio: 'inherit' });\n } else {\n proc = spawn(bin, args, { stdio: 'inherit' });\n }\n } else {\n args.unshift(bin);\n // add executable arguments to spawn\n args = incrementNodeInspectorPort(process.execArgv).concat(args);\n proc = spawn(process.execPath, args, { stdio: 'inherit' });\n }\n\n const signals = ['SIGUSR1', 'SIGUSR2', 'SIGTERM', 'SIGINT', 'SIGHUP'];\n signals.forEach((signal) => {\n // @ts-ignore\n process.on(signal, () => {\n if (proc.killed === false && proc.exitCode === null) {\n proc.kill(signal);\n }\n });\n });\n\n // By default terminate process when spawned process terminates.\n // Suppressing the exit if exitCallback defined is a bit messy and of limited use, but does allow process to stay running!\n const exitCallback = this._exitCallback;\n if (!exitCallback) {\n proc.on('close', process.exit.bind(process));\n } else {\n proc.on('close', () => {\n exitCallback(new CommanderError(process.exitCode || 0, 'commander.executeSubCommandAsync', '(close)'));\n });\n }\n proc.on('error', (err) => {\n // @ts-ignore\n if (err.code === 'ENOENT') {\n const executableMissing = `'${bin}' does not exist\n - if '${subcommand._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name`;\n throw new Error(executableMissing);\n // @ts-ignore\n } else if (err.code === 'EACCES') {\n throw new Error(`'${bin}' not executable`);\n }\n if (!exitCallback) {\n process.exit(1);\n } else {\n const wrappedError = new CommanderError(1, 'commander.executeSubCommandAsync', '(error)');\n wrappedError.nestedError = err;\n exitCallback(wrappedError);\n }\n });\n\n // Store the reference to the child process\n this.runningCommand = proc;\n }", "function TelegramCommandNode(config) {\r\n RED.nodes.createNode(this, config);\r\n let node = this;\r\n let command = config.command;\r\n\r\n let registerCommand = config.registercommand;\r\n let description = config.description || '';\r\n let language = config.language || '';\r\n let scope = config.scope || 'default';\r\n\r\n let useRegex = config.useregex || false;\r\n let removeRegexCommand = config.removeregexcommand || false;\r\n\r\n let regEx;\r\n if (useRegex) {\r\n try {\r\n regEx = new RegExp(command);\r\n } catch (ex) {\r\n node.status({ fill: 'red', shape: 'ring', text: ex.message });\r\n node.warn(ex.message);\r\n return;\r\n }\r\n }\r\n\r\n let strict = config.strict;\r\n let hasresponse = config.hasresponse;\r\n if (hasresponse === undefined) {\r\n hasresponse = true;\r\n }\r\n\r\n this.bot = config.bot;\r\n\r\n // If the command should not be registered, then we invalidate the language.\r\n if (!registerCommand) {\r\n language = undefined;\r\n }\r\n\r\n this.start = function () {\r\n let telegramBot = this.config.getTelegramBot();\r\n if (telegramBot) {\r\n this.config.registerCommand(node.id, command, description, language, scope, registerCommand);\r\n\r\n node.botname = this.config.botname;\r\n\r\n if (telegramBot._polling !== null || telegramBot._webHook !== null) {\r\n node.status({\r\n fill: 'green',\r\n shape: 'ring',\r\n text: 'connected',\r\n });\r\n\r\n telegramBot.on('message', (botMsg) => this.processMessage(botMsg));\r\n } else {\r\n node.status({\r\n fill: 'grey',\r\n shape: 'ring',\r\n text: 'send only mode',\r\n });\r\n }\r\n } else {\r\n node.warn('bot not initialized.');\r\n node.status({\r\n fill: 'red',\r\n shape: 'ring',\r\n text: 'bot not initialized',\r\n });\r\n }\r\n };\r\n\r\n this.stop = function () {\r\n let telegramBot = this.config.getTelegramBot();\r\n if (telegramBot) {\r\n telegramBot.off('message');\r\n }\r\n\r\n node.status({\r\n fill: 'red',\r\n shape: 'ring',\r\n text: 'disconnected',\r\n });\r\n };\r\n\r\n this.processMessage = function (botMsg) {\r\n node.status({\r\n fill: 'green',\r\n shape: 'ring',\r\n text: 'connected',\r\n });\r\n\r\n let username = botMsg.from.username;\r\n let chatid = botMsg.chat.id;\r\n let userid = botMsg.from.id;\r\n if (node.config.isAuthorized(node, chatid, userid, username)) {\r\n let msg;\r\n let messageDetails;\r\n if (botMsg.text) {\r\n let message = botMsg.text;\r\n let tokens = message.split(' ');\r\n\r\n // check if this is a command at all first\r\n let commandToken = tokens[0];\r\n let isCommandMessage = commandToken.startsWith('/');\r\n let isGroupChat = chatid < 0;\r\n let toBot = '@' + node.botname;\r\n\r\n // preprocess regex\r\n let command1 = command;\r\n let command2;\r\n\r\n let isRegExMatch;\r\n let isChatCommand = false;\r\n let isDirectCommand = false;\r\n if (useRegex) {\r\n let match = regEx.exec(commandToken);\r\n if (match !== null) {\r\n isRegExMatch = true;\r\n isChatCommand = true;\r\n isDirectCommand = commandToken.endsWith(toBot);\r\n\r\n if (removeRegexCommand) {\r\n command1 = match[0];\r\n }\r\n\r\n if (!command1.endsWith(toBot)) {\r\n command2 = command1 + toBot;\r\n } else {\r\n command2 = command1;\r\n }\r\n }\r\n } else {\r\n isRegExMatch = false;\r\n\r\n isChatCommand = commandToken === command1;\r\n command2 = command1 + toBot;\r\n isDirectCommand = commandToken === command2;\r\n }\r\n\r\n // then if this command is meant for this node\r\n\r\n if (isDirectCommand || (isChatCommand && !isGroupChat) || (isChatCommand && isGroupChat && !strict) || (useRegex && isRegExMatch)) {\r\n let remainingText;\r\n if (isDirectCommand) {\r\n remainingText = message.replace(command2, '');\r\n } else {\r\n remainingText = message.replace(command1, '');\r\n }\r\n\r\n messageDetails = {\r\n chatId: botMsg.chat.id,\r\n messageId: botMsg.message_id,\r\n type: 'message',\r\n content: remainingText,\r\n };\r\n msg = {\r\n payload: messageDetails,\r\n originalMessage: botMsg,\r\n };\r\n\r\n if (hasresponse) {\r\n node.send([msg, null]);\r\n node.config.setCommandPending(command1, username, chatid);\r\n } else {\r\n node.send(msg);\r\n }\r\n } else {\r\n // Here we check if the received message is probably a resonse to a pending command.\r\n if (!isCommandMessage) {\r\n if (hasresponse) {\r\n let isPending = node.config.isCommandPending(command1, username, chatid);\r\n if (isPending) {\r\n messageDetails = {\r\n chatId: botMsg.chat.id,\r\n messageId: botMsg.message_id,\r\n type: 'message',\r\n content: botMsg.text,\r\n };\r\n msg = {\r\n payload: messageDetails,\r\n originalMessage: botMsg,\r\n };\r\n node.send([null, msg]);\r\n node.config.resetCommandPending(command1, username, chatid);\r\n }\r\n }\r\n } else {\r\n // Here we just ignore what happened as we do not know if another node is registered for that command.\r\n }\r\n }\r\n } else {\r\n // unknown type --> no output\r\n }\r\n } else {\r\n // ignoring unauthorized calls\r\n if (node.config.verbose) {\r\n node.warn('Unauthorized incoming call from ' + username);\r\n }\r\n }\r\n };\r\n\r\n this.config = RED.nodes.getNode(this.bot);\r\n if (this.config) {\r\n node.status({ fill: 'red', shape: 'ring', text: 'not connected' });\r\n node.onStatusChanged = function (status, nodeStatus) {\r\n node.status(nodeStatus);\r\n switch (status) {\r\n case 'started':\r\n node.start();\r\n break;\r\n case 'stopped':\r\n node.stop();\r\n break;\r\n default:\r\n break;\r\n }\r\n };\r\n node.config.addListener('status', node.onStatusChanged);\r\n\r\n node.start();\r\n } else {\r\n node.warn('config node failed to initialize.');\r\n node.status({\r\n fill: 'red',\r\n shape: 'ring',\r\n text: 'config node failed to initialize',\r\n });\r\n }\r\n\r\n this.on('close', function (removed, done) {\r\n node.stop();\r\n\r\n if (node.onStatusChanged) {\r\n node.config.removeListener('status', node.onStatusChanged);\r\n }\r\n\r\n node.config.unregisterCommand(node.id);\r\n node.status({});\r\n done();\r\n });\r\n }", "function _nodeClickHandler(options, pid, el) {\n var container = el.parent();\n var child = container.children('ul');\n if (child.size() > 0) {\n if (child.is(':hidden')) {\n child.show();\n el.addClass('ui-tree-root-expanded').removeClass('ui-tree-root');\n } else {\n child.hide();\n el.addClass('ui-tree-root').removeClass('ui-tree-root-expanded');\n }\n } else {\n el.addClass('ui-tree-root-expanded').removeClass('ui-tree-root');\n $.ajax({\n url: options.url,\n beforeSend: options.beforeOpen,\n error: options.openError,\n dataType: options.dataType,\n data: (options.nodeParameterName + '=' + pid),\n success: function(data) {\n if (options.dataType = 'json') {\n _buildFromJson(data, container, options);\n if (options.openingFinished) {\n options.openingFinished(pid);\n }\n } else {\n alert('data type not implemented');\n }\n }\n });\n }\n }", "function RNode(){}", "function commandMe(command, commandArg){\n switch(command){\n case 'my-tweets':\n twit.twitterLogic();\n break;\n case 'spotify-this-song':\n spot.spotifyLogic(commandArg);\n break;\n case 'movie-this':\n omdb.omdbLogic(commandArg);\n break;\n case 'do-what-it-says':\n case 'obey':\n obey.readFromRandom();\n break;\n default:\n console.log('Follow the directions.');\n }\n}", "processCommand(command, message) {\n switch (command) {\n case 'siren/command':\n this.setSirenState(message)\n break;\n case 'volume/command':\n if (this.entity.hasOwnProperty('volume')) {\n this.setVolumeLevel(message)\n }\n break;\n default:\n this.debug(`Received message to unknown command topic: ${command}`)\n }\n }", "get command() {\n return this.i.command;\n }", "send(code, data) {\n let msg = { cmd: code, data: data };\n if (this.child.connected) {\n this.child.send(msg);\n }\n else {\n log.logger().warn(this.log_prefix + 'Skipping send (child process not connected): ' + intf.ParentMsgCode[code]);\n }\n }", "function postOrderTraversal(node) {}", "function click(d) {\n if(d.name == \"GO:0003700\"){\n r_click(r_root);\n n_click(d);\n }else if(d.name == \"Groups\"){\n toggleGroups();\n if(expanded == false){\n root.children.forEach(collapse);\n r_click(r_root);\n }\n else{\n root.children.forEach(expand);\n r_click(r_root);\n }\n update(root);\n }else {\n n_click(d);\n }\n}", "function Node() {}", "function walk(node) {\n console.log(node.nodeName);\n for (var i = 0; i < node.childNodes.length; i++) {\n walk(node.childNodes[i]);\n }\n}", "function tree_node_click(d) {\n if (d.children) {\n d._children = d.children;\n d.children = null;\n } else {\n d.children = d._children;\n d._children = null;\n }\n update(d);\n}", "function CustomNode(config) {\n\t\t/*Initialisation des fonctionnalités de bases*/\n\t\tRED.nodes.createNode(this, config);\n\t\t\n\t\t/*Recupération des parametres configurer dans le noeud*/\n\t\tthis.nomImage = config.nomImage;\n\t\tthis.commandeRun = config.commandeRun;\n\t\t\n\t\t/*Traitement souhaite*/\n\t\tthis.on('input', function(msg) {\n\t\t\tthis.send(msg);\n\t\t});\n\t\tthis.log(\"CustomNode executed !\");\n\t\t\n\t}", "function execute(command) {\n //passing an argument into a 'switch' function that evaluates the firts arugment ('command') to determine which function to call\n switch (command) {\n case \"my-tweets\":\n getTwitter();\n break;\n\n case \"spotify-my-song\":\n getSpotify(argument);\n break;\n\n case \"movie-this\":\n getOMBD(argument);\n break;\n\n case \"do-what-it-says\":\n getFS();\n break;\n }\n}", "echoNodes() {\n this.logger.info('start echo nodes');\n this.tendermintService\n .echo()\n .then(() => this.logger.info('node is fine'))\n .catch((error) => this.logger.warn('node is not fine', error));\n }", "runCmd() {\n switch(this.command) {\n case \"concert-this\":\n this.concertThis();\n break;\n case \"spotify-this-song\":\n this.spotifyThisSong();\n break;\n case \"movie-this\":\n this.movieThis();\n break;\n case \"do-what-it-says\":\n this.doWhatItSays();\n break;\n case undefined:\n this.usage();\n return false;\n default:\n console.log(`Unable to understand the command \"${this.command}\"\\n`);\n this.usage();\n return false;\n }\n\n return true;\n }", "function performCommand() {\n var PlanningGenerator = require('../lib/PlanningGenerator');\n\n var generator = new PlanningGenerator();\n var json = utils.createJsonObject(program.json, program);\n\n var connectionProperties = { user: program.user, password: program.password, groupId: json.groupId };\n\n generator.generate(json, connectionProperties);\n}", "function executeShifts(node) {\n var children = node.children;\n var n = children.length;\n var shift = 0;\n var change = 0;\n\n while (--n >= 0) {\n var child = children[n];\n child.hierNode.prelim += shift;\n child.hierNode.modifier += shift;\n change += child.hierNode.change;\n shift += child.hierNode.shift + change;\n }\n}", "exec (msg, args) {\n const { command } = args\n if (command) return msg.util.send(command.description)\n const channel = msg.channel.type === 'dm' ? msg.channel : msg.author\n\n const text = this.handler.categories\n .map(cat => {\n const filtered = cat.filter(cmd => !cmd.ownerOnly && cmd.enabled)\n if (filtered.size === 0) return null\n const list = filtered\n .map(cmd => {\n let string = `**${cmd.id}** | ${cmd.description.split('\\n')[0]}`\n if (cmd.aliases.length > 1) {\n string += `\\nAliases: ${cmd.aliases\n .slice(1)\n .map(a => `\\`${a}\\``)\n .join(', ')}`\n }\n return string\n })\n .join('\\n\\n')\n\n return `__**${cat.id}**__\\n\\n${list}`\n })\n .filter(cat => cat)\n .join(`\\n\\n\\n`)\n\n if (msg.channel.type !== 'dm') msg.util.info('sent you a DM with info.')\n return channel.send(stripIndents`\n **Haku commands**:\n Use \\`help <command>\\` to view more detailed info on a command.\n\n ${text}\n `)\n }", "function click(d) {\n if (d.classe_id || d.root) {\n if (d.children) {\n //console.log(\"->1\")\n d._children = d.children;\n d.children = null;\n } else {\n if (d._children != null) {\n d.children = d._children;\n d._children = null;\n //console.log(\"anes\")\n //console.log(d.node_id)\n d.children.forEach(function (children) {\n expand(children);\n });\n }\n }\n update(d);\n } else {\n //código para mostrar os gráficos\n tooltip_tablle(d);\n }\n}", "function TSplit_doRecursiveDrillDown(){\n\tHelpList.add(this.UpNode);\n\tHelpList.add(this.DownNode);\n\t\t\t\t\n\tif (this.UpNode.HasChild){this.UpNode.Child.doRecursiveDrillDown()}\n\tif (this.DownNode.HasChild){this.DownNode.Child.doRecursiveDrillDown()}\n}", "removeNodeCommand(node, _isFirst) {\n // TODO SageMath fait automatiquement ça\n let isFirst = _isFirst;\n this.links.forEach(edge => {\n if (edge.source === node || edge.target === node) {\n CommandePatern_1.myManager.Execute(CommandePatern_1.CommandsRepository.SupprEdgeCommand(this, edge, isFirst));\n isFirst = false;\n }\n });\n this.loops.forEach(loop => {\n if (loop.source === node)\n CommandePatern_1.myManager.Execute(CommandePatern_1.CommandsRepository.SupprLoopCommand(this, loop, false));\n });\n CommandePatern_1.myManager.Execute(CommandePatern_1.CommandsRepository.SupprNodeCommand(this, node, false));\n }", "function command(com,callback) {\n var html;\n exec(com, function(error, stdout, stderr){\n var child = stdout;\n var raw = child.match(/^.*([]+|$)/gm);\n var len = raw.length;\n var arr = new Array(len);\n for (i=0;i<=len;i++){\n arr[i] = \"<br><a href = '\"+raw[i] + \"'>\" + raw[i] +\"</a>\";\n }\n html = arr.join(\"\\n\");\n console.log(\"this is command \"+html);\n callback(html);\n\n });\n}", "function listener(string) {\n var command = io.JSON.parse(string),\n data = command.data;\n\n if (command.target === \"c\" || command.target === \"p&c\") {\n switch (command.type) {\n case \"parentConnect\":\n //setTimeout(function() {\n //\t\t\tself.onconnect(false);\n //\t\t}, 50);\n break;\n case \"parentDisconnect\":\n // do nothing\n break;\n case \"parentClose\":\n if (Apush._loglevel === \"info\") {\n Apush.util.info(\n \"parent close:\" + data.parentId + \",heir:\" + data.heir\n );\n }\n if (!trace || data.parentId == trace.parentId) {\n if (!orphan) {\n orphan = true;\n //clearInterval(traceTimer);\n // Gives the heir some time to reconnect\n if (data.heir == self.guid) {\n self.createSocket();\n } else {\n setTimeout(function() {\n self.createSocket();\n }, 100);\n }\n }\n }\n break;\n case \"message\":\n if (data.parentId == trace.parentId) {\n self.dealMsg(data.data);\n }\n break;\n case \"localMessage\":\n if (data.fromId != self.guid) {\n self.dealLocalMsg(data.eventType, data.data);\n }\n break;\n }\n }\n }", "constructor()\n {\n super();\n\n this.name = \"dev\";\n this.description = \"Commands for only my developer\";\n this.usage = \"<subcommand>\";\n this.permissions = [\"dev\"];\n\n this.addCommand(\"./dev/PermCommand.js\");\n this.addCommand(\"./dev/PermsCommand.js\");\n this.addCommand(\"./dev/AvatarCommand.js\");\n this.addCommand(\"./dev/SayCommand.js\");\n this.addCommand(\"./dev/TestCommand.js\");\n }", "commandProcess (state, getters) {\n if (state.alive) {\n return COMMAND_PROCESS\n } else {\n return null\n }\n }", "function RNode() {}", "function RNode() {}", "function RNode() {}", "function nextCommand() {\r\n if (!this.started) {\r\n this.started = true;\r\n this.debugIndex = testCase.startPoint ? testCase.commands.indexOf(testCase.startPoint) : 0;\r\n }\r\n else {\r\n if (branchIdx != null) {\r\n LOG.info(\"Selblocks branch => \" + fmtCmdRef(branchIdx));\r\n this.debugIndex = branchIdx;\r\n branchIdx = null;\r\n }\r\n else\r\n this.debugIndex++;\r\n }\r\n // skip over comments\r\n for (; this.debugIndex < testCase.commands.length; this.debugIndex++) {\r\n var command = testCase.commands[this.debugIndex];\r\n if (command.type == \"command\") {\r\n return command;\r\n }\r\n }\r\n return null;\r\n}", "function runCommand (argOne, argTwo) {\n commands(argOne, argTwo);\n}", "function onMessageHandler (target, context, msg, self) {\n if (self) { return; } // Ignore messages from the bot\n\n // Remove whitespace from chat message\n // const commandName = msg.trim();\n\n // getting args from message\n const args = msg.slice(1).split(' ');\n\n // If the command is known, let's execute it\n if (msg.startsWith('!getrank')) {\n\n // accounting for user error only entering '!getrank' with no args\n if(args.length < 2){\n return client.say(target, `Please specify a username and gametype (default td): !getrank danku ra`)\n }\n\n // '40' default for Danku player-id\n const rank = getRank(args[1], args[2])\n rank.then(res => {\n // handle success\n if(res.data.length === 0){\n console.log(`* Executed !${args[0]} command -> Failed to find ${args[1]} on leaderboard`)\n return client.say(target, `No leaderboard results found for user: ${args[1]}`)\n } else {\n console.log(`* Executed !${args[0]} command -> Rank for ${res.data[0].player_name}: ${res.data[0].rank}. Total points: ${Math.ceil(res.data[0].points)}. Games won: ${res.data[0].wins}. Games lost: ${res.data[0].losses}.`);\n // assumption result[0] in array is the most accurate and only using that one\n return client.say(target, `Current ${args[2] || 'td' } rank for ${res.data[0].player_name}: ${res.data[0].rank}; Total points: ${Math.ceil(res.data[0].points)}; Games won: ${res.data[0].wins}; Games lost: ${res.data[0].losses}.`)\n }\n }\n )\n .catch(err => {\n console.log(err)\n return console.log(`Error running !${args[0]} command`);\n }\n )\n }\n}", "function Node(){\n\t\tthis.setup();\n\t\tthis;\n\t}", "process() {}", "process() {}", "function toCommand(commandName,action,res){\n if(!action) console.error(commandName,' does not have an \"action\" to perform, please assign it one');\n /* exit process on command action of 'exit' */\n if(!action || action.toLowerCase() === 'exit'){\n console.error('Exiting process due to command; ',commandName);\n process.exit(1);\n }\n\n /* go to final task command with values upon seeing an 'end' action */\n else if(action.toLowerCase() === 'end'){\n _command(_values);\n }\n\n /* go the the next command specified in 'action' */\n else{\n _currentTaskCommand = action;\n if(_taskCommands[_currentTaskCommand] === undefined){\n console.error('No command exists by the name of ',_currentTaskCommand);\n process.exit(1);\n }\n\n if(_values[_currentTaskCommand] === undefined || typeof _values[_currentTaskCommand] === 'object' || _taskCommands[_currentTaskCommand].repeatable){\n runCommand(_currentTaskCommand,_taskCommands[_currentTaskCommand]);\n }\n else{\n res = _values[_currentTaskCommand];\n toCommand(_currentTaskCommand,(typeof _taskCommands[_currentTaskCommand].action === 'function' ? _taskCommands[_currentTaskCommand].action(res,_values) : _taskCommands[_currentTaskCommand].action),res);\n }\n }\n }", "function cmdEditPasteFirstChild() {}", "traverse(fn) {\n fn(this)\n\n const children = this._children\n for (let i = 0, l = children.length; i < l; i++) {\n children[i].traverse(fn)\n }\n }", "function GetObjectTorrentCommand(input) {\n var _this = \n // Start section: command_constructor\n _super.call(this) || this;\n _this.input = input;\n return _this;\n // End section: command_constructor\n }", "childDown(node, defaultNode) {\n if(this.parent !== null) {\n return this.parent.childDown(this, defaultNode);\n } else {\n return defaultNode;\n }\n }", "function click(d) {\n var mode;\n if (d.children) {\n d._children = d.children;\n d.children = null;\n mode = \"close\";\n } else {\n d.children = d._children;\n d._children = null;\n mode = \"open\";\n }\n update(d);\n dispatch.nodeClicked({depth: d.depth, id: d.id, mode: mode, cmap: colorMap });\n }", "function onQueryAnimal(node) {\n $(\"p\").text(\"Is it a(n) \" + node.value + \"?\");\n $(\"button\").click(function () {\n if ($(this).text() == \"yes\") {\n $(\"p\").text(\"It took me \" + queCount + \" question(s) to guess right animal!!\");\n $(\"div.myButton\").hide(); //hide YES or NO buttons\n $(\"div.menuClass\").show();\n }\n if ($(this).text() == \"no\") {\n updateTree(node);\n }\n });\n}", "function click(d) {\n if (d.parentId != 0) { //Makes it so you can't collapse the root node\n if (d.children) {\n d._children = d.children;\n d.children = null;\n } else {\n d.children = d._children;\n d._children = null;\n }\n update(d);\n }\n //Make it so the selected node is highlighted\n}", "function visitInheritanceTreeNodeEmitText(treeNode, _a, context) {\n var line = _a.line, start = _a.start;\n var inherits = arrayFlat(treeNode.map(function (n) { return n.inherits || []; })).sort(function (a, b) { return (a.kind === b.kind ? 0 : a.kind === \"interface\" ? 1 : -1); });\n return visitInheritanceTreeClauseEmitText(inherits, { line: line, start: start }, context);\n}", "function l(e, t) {\n c.processChildrenUpdates(e, t);\n }" ]
[ "0.64110625", "0.6034039", "0.578237", "0.56419116", "0.54777205", "0.54163957", "0.53817046", "0.5350749", "0.53096783", "0.52692664", "0.5247834", "0.52113336", "0.5188026", "0.51648444", "0.5055249", "0.50030017", "0.49994463", "0.49942243", "0.49942243", "0.49925396", "0.49776474", "0.49595746", "0.49595746", "0.49476987", "0.4919912", "0.4880618", "0.48594344", "0.4855638", "0.48527056", "0.48454455", "0.48021755", "0.4795277", "0.4792586", "0.47892478", "0.4785379", "0.47815228", "0.47728455", "0.47654325", "0.4751901", "0.47469333", "0.4744999", "0.47425824", "0.47396225", "0.47374457", "0.47348878", "0.4730408", "0.47292176", "0.47292176", "0.472355", "0.47228816", "0.47228816", "0.4711681", "0.4711154", "0.47009918", "0.46906772", "0.46906772", "0.4688903", "0.46845928", "0.46609652", "0.4657261", "0.46557307", "0.46551776", "0.46526748", "0.46488532", "0.46411332", "0.46407816", "0.46323684", "0.46297154", "0.46235374", "0.4620537", "0.46190646", "0.4618368", "0.4599492", "0.4596878", "0.4585924", "0.4582861", "0.45758763", "0.45720762", "0.4568862", "0.45586866", "0.4550161", "0.45499313", "0.45484397", "0.45484397", "0.45484397", "0.4548388", "0.4544389", "0.45441377", "0.45435968", "0.45408034", "0.45408034", "0.45381373", "0.45319542", "0.4531101", "0.45299613", "0.45247975", "0.45230234", "0.45228595", "0.4519359", "0.45086765", "0.4506839" ]
0.0
-1
Write password to the password input
function writePassword() { var password = generatePassword(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function writePassword() {}", "function writePassword() {\n var password = getPasswordOptions();\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\n passwordText.value = password;\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 var password = buildPassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\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 var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n\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 var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n \n passwordText.value = password;\n }", "function writePassword() {\n let password = generatePassword(passwordlength).join(\"\");\n let passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n getUserInputs();\n\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\n passwordText.value = password;\n\n // Reset variables\n passwordLength = 0;\n selectedCharacters = \"\";\n includeLowercase = false;\n includeUppercase = false;\n includeNumbers = false;\n includeSpecialChar = false;\n}", "function writePassword() {\n\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\n passwordText.value = password;\n\n }", "function writePassword() {\n var length = getPasswordLength();\n length = parseInt(length);\n ensureCharacterType();\n var password = generatePassword(length);\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\n }", "function writePassword() {\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n\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 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 // 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 let newOptions = { ...options };\n setOptions(newOptions);\n var password = generatePassword(newOptions);\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n\tvar passwordText = document.querySelector('#password');\n\n\tpasswordText.value = finalPassword;\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n\n //prompt(password)\n }", "function _3writePassword(password) {\n console.log(\"writing password\")\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n \n}", "function writePassword() {\n const password = generatePassword();\n const passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n}", "function writePassword() {\n const password = generatePassword();\n const passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n}", "function writePassword() {\n var criteria = passwordCriteria();\n var password = generatePassword(criteria);\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 \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 \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 // If password is empty string, return without printing\n if (!password) {\n return;\n }\n var passwordText = document.querySelector('#password');\n\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n if (password !== undefined) {\n var passwordText = document.querySelector(\"#password\");\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}", "function writePassword () {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\")\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword().join(\"\");\n // console.log(password);\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = pwCriteria();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\n}", "function writePassword(password) {\n var passwordText = document.querySelector(\"#password\");\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 userPassword = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = userPassword;\n }", "function writePassword() {\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 passwordText.value = password;\n}", "function writePassword() {\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 passwordText.value = password;\n}", "function writePassword() {\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 passwordText.value = password;\n}", "function writePassword() {\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 passwordText.value = password;\n}", "function writePassword() {\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 passwordText.value = password;\n}", "function writePassword() {\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 passwordText.value = password;\n}", "function writePassword() {\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 passwordText.value = password;\n}", "function writePassword() {\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 passwordText.value = password;\n}", "function writePassword() {\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 passwordText.value = password;\n}", "function writePassword() {\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 passwordText.value = password;\n}", "function writePassword() {\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 passwordText.value = password;\n}", "function writePassword() {\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 passwordText.value = password;\n}", "function writePassword() {\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 passwordText.value = password;\n}", "function writePassword() {\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 passwordText.value = password;\n}", "function writePassword() {\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 passwordText.value = password;\n}", "function writePassword() {\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 passwordText.value = password;\n}", "function writePassword() {\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 passwordText.value = password;\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 \n passwordText.value = password;\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\n passwordText.value = password;\n return;\n}", "function writePassword() {\n var password = createPassword();\n var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\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 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}", "function writePassword() {\n var password = generatePassword();\n passwordText.value = password;\n passwordEngine.reset();\n}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\n}", "function writePassword() {\n var password = generatePassword();\n\n var passwordText = document.querySelector(\"#password\");\n passwordText.value = password;\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 var passwordText = document.querySelector(\"#password\");\n\n passwordText.value = password;\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\n passwordText.value = password;\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\n passwordText.value = password;\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\n passwordText.value = password;\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\n passwordText.value = password;\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\n passwordText.value = password;\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\n passwordText.value = password;\n}" ]
[ "0.88605946", "0.85434437", "0.8511256", "0.8500835", "0.84896296", "0.84846", "0.84719414", "0.84686357", "0.8454292", "0.8443738", "0.8431387", "0.8419759", "0.8418786", "0.8406216", "0.8403772", "0.8400314", "0.8392802", "0.83758265", "0.8370068", "0.83642554", "0.836013", "0.8358564", "0.8357296", "0.8355442", "0.8354251", "0.83408403", "0.83408403", "0.8301905", "0.8292826", "0.8292826", "0.8292826", "0.8292826", "0.828747", "0.8274406", "0.8269479", "0.82615584", "0.8256443", "0.82556236", "0.82519406", "0.8250689", "0.82503533", "0.8244716", "0.8244716", "0.8244716", "0.8244716", "0.8244716", "0.8244716", "0.8244716", "0.8244716", "0.8244716", "0.8244716", "0.8244716", "0.8244716", "0.8244716", "0.8244716", "0.8244716", "0.8244716", "0.8244716", "0.8244716", "0.8244716", "0.8244716", "0.8244716", "0.8244716", "0.8244716", "0.8244716", "0.8244716", "0.8244716", "0.8244716", "0.8244716", "0.8244716", "0.8244716", "0.8244716", "0.8244716", "0.8244716", "0.8244716", "0.82437736", "0.82437736", "0.82437736", "0.8240616", "0.8238806", "0.8238588", "0.8236282", "0.82324123", "0.82302624", "0.82299846", "0.8229535", "0.8229535", "0.82283163", "0.82256293", "0.82256293", "0.82256293", "0.82256293", "0.82256293", "0.82256293", "0.82256293", "0.82256293", "0.82256293", "0.82256293", "0.82256293", "0.82256293", "0.82256293" ]
0.0
-1
Wrap the callback in a function that ignores failures
function unloader() { try { callback(); } catch(ex) {} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "wrapCallback(callback) {\r\n return (error, value) => {\r\n if (error) {\r\n this.reject(error);\r\n }\r\n else {\r\n this.resolve(value);\r\n }\r\n if (typeof callback === 'function') {\r\n // Attaching noop handler just in case developer wasn't expecting\r\n // promises\r\n this.promise.catch(() => { });\r\n // Some of our callbacks don't expect a value and our own tests\r\n // assert that the parameter length is 1\r\n if (callback.length === 1) {\r\n callback(error);\r\n }\r\n else {\r\n callback(error, value);\r\n }\r\n }\r\n };\r\n }", "callbackWrapper() {\n if (this.error == \"obstruction_error\") {\n this.error = false\n this.callback('obstruction_error')\n } else if (this.error == 'outofbounds_error') {\n this.error = false\n this.callback('outofbounds_error')\n } else\n this.callback()\n }", "function failureCB(){}", "adoptedCallback() {}", "adoptedCallback() {}", "function callback(){}", "function no_callback(){}", "function try_callback(callback, reply) {\n try {\n callback(null, reply);\n } catch (err) {\n process.nextTick(function () {\n throw err;\n });\n }\n}", "function protectedCallback( callback ) {\n return function() {\n try{\n return callback.apply(oboeApi, arguments);\n }catch(e) {\n setTimeout(function() {\n throw e;\n });\n }\n }\n }", "function protectedCallback( callback ) {\n return function() {\n try{\n return callback.apply(oboeApi, arguments);\n }catch(e) {\n setTimeout(function() {\n throw e;\n });\n }\n }\n }", "function protectedCallback( callback ) {\n return function() {\n try{\n return callback.apply(oboeApi, arguments);\n }catch(e) {\n setTimeout(function() {\n throw e;\n });\n }\n }\n }", "function protectedCallback( callback ) {\n return function() {\n try{\n return callback.apply(oboeApi, arguments);\n }catch(e) {\n setTimeout(function() {\n throw e;\n });\n }\n }\n }", "function protectedCallback( callback ) {\n return function() {\n try{\n return callback.apply(oboeApi, arguments);\n }catch(e) {\n setTimeout(function() {\n throw e;\n });\n }\n }\n }", "function protectedCallback( callback ) {\n return function() {\n try{\n return callback.apply(oboeApi, arguments);\n }catch(e) {\n setTimeout(function() {\n throw e;\n });\n }\n }\n }", "function protectedCallback( callback ) {\n return function() {\n try{\n return callback.apply(oboeApi, arguments);\n }catch(e) {\n setTimeout(function() {\n throw e;\n });\n }\n }\n }", "function protectedCallback( callback ) {\n return function() {\n try{\n return callback.apply(oboeApi, arguments);\n }catch(e) {\n setTimeout(function() {\n throw e;\n });\n }\n }\n }", "function protectedCallback (callback) {\n return function () {\n try {\n return callback.apply(oboeApi, arguments)\n } catch (e) {\n setTimeout(function () {\n throw new Error(e.message)\n })\n }\n }\n }", "adoptedCallback() { }", "adoptedCallback() {\n // nop\n }", "function callback() {}", "function callback() {}", "function callback() {}", "function callback() {}", "function callback() {}", "function protectedCallback( callback ) {\n return function() {\n try{\n return callback.apply(oboeApi, arguments);\n }catch(e) {\n setTimeout(function() {\n throw new Error(e.message);\n });\n }\n }\n }", "function protectedCallback( callback ) {\n return function() {\n try{\n return callback.apply(oboeApi, arguments);\n }catch(e) {\n setTimeout(function() {\n throw new Error(e.message);\n });\n }\n }\n }", "function protectedCallback( callback ) {\n return function() {\n try{\n return callback.apply(oboeApi, arguments);\n }catch(e) {\n setTimeout(function() {\n throw new Error(e.message);\n });\n }\n }\n }", "function protectedCallback( callback ) {\n return function() {\n try{\n return callback.apply(oboeApi, arguments);\n }catch(e) {\n setTimeout(function() {\n throw new Error(e.message);\n });\n }\n }\n }", "function protectedCallback( callback ) {\n return function() {\n try{\n return callback.apply(oboeApi, arguments);\n }catch(e) {\n setTimeout(function() {\n throw new Error(e.message);\n });\n }\n }\n }", "function doSomething (cb) {\n cb(null, 'success')\n}", "function wrapCallback(callback, convertResult) {\n return callback && function (error, result) {\n if (error) {\n callback(error);\n } else if (typeof convertResult === \"function\") {\n callback(error, convertResult(result));\n } else {\n callback(error, result);\n }\n };\n }", "function mockCallBack() {\n}", "function failureCB() { }", "adoptedCallback() {\n\n }", "wrap(callback) {\n\t\t\treturn ((...args) => {\n\t\t\t\ttry {\n\t\t\t\t\tconst res = callback.apply(null, [...args]);\n\t\t\t\t\tif (res instanceof Promise) {\n\t\t\t\t\t\tres.catch(this.handleBound);\n\t\t\t\t\t}\n\t\t\t\t\treturn res;\n\t\t\t\t} catch (err) {\n\t\t\t\t\tthis.handle(err);\n\t\t\t\t\tthrow err;\n\t\t\t\t}\n\t\t\t});\n\t\t}", "function doSomething(callback) {\n callback(1) //callback must be something if it is getting invoked\n}", "function _psuccess(callback) {\n return function(values) {\n callback(null, values);\n };\n}", "function callbackWrapper(callback) {\n return function(err, result){\n if(err) {\n callback(err);\n } else {\n callback(null, resultToArray(result));\n }\n };\n }", "function callbackWrapper(ch, cb) {\n return cb\n ? function (err, ok) {\n if (err === null) {\n cb(null, ok);\n } else cb(err);\n }\n : function () {};\n}", "run (f, callback) {\n f().then(() => {\n callback(null)\n }, (error) => {\n callback(new Error(error))\n }).catch((error) => {\n throw error\n })\n }", "function failToDoSomething (cb) {\n cb(new Error('failed'))\n}", "function wrap(fn) {\n return function(cb) { fn.call(null, cb.bind(null, null)); };\n }", "function _callback(err, data) { _call(callback, err, data); }", "function handleCallback(callback, err, result) {\n try {\n callback(err, result);\n } catch (err) {\n process.nextTick(function() {\n throw err;\n });\n }\n}", "function handleCallback(callback, err, result) {\n try {\n callback(err, result);\n } catch (err) {\n process.nextTick(function() {\n throw err;\n });\n }\n}", "function callback(){\n cb();\n callback = ()=>{};\n }", "fail(callback) {\n return this.then(null, callback);\n }", "function catchFunc(callback) {\n if (!resolved) {\n callback.call(null, result);\n }\n return this;\n }", "function mycallback() {}", "function wrap_cb (fn, P) {\n return function (params) {\n return new P(function (resolve, reject) {\n fn(params, function (err) { return !err ? resolve() : reject(err) })\n })\n }\n}", "function makeCallback(callback) {\n return _.isFunction(callback) ? callback : function () {\n return callback;\n };\n }", "function makeCallback(callback) {\n return _.isFunction(callback) ? callback : function () {\n return callback;\n };\n }", "wrap (cb) {\n return function () {\n var args = Array.prototype.slice.call(arguments)\n var next = args.pop()\n\n args.push(function () {\n // if (err) return next(err)\n var iargs = Array.prototype.slice.call(arguments)\n\n next.apply(this, iargs)\n })\n cb.apply(this, args)\n }\n }", "function makeSafe(aCallback) {\n return function(...aArgs) {\n try {\n aCallback(...aArgs);\n }\n catch(ex) {\n logger.warn(\"XPI Database callback failed\", ex);\n }\n }\n}", "function getCallback(done) {\n return function(err, success){\n if (err) {\n grunt.log.error(err.message);\n return done(false);\n }\n grunt.log.writeln(success);\n done(true);\n }\n }", "function callbackified(){var args=[];for(var i=0;i<arguments.length;i++){args.push(arguments[i]);}var maybeCb=args.pop();if(typeof maybeCb!=='function'){throw new TypeError('The last argument must be of type Function');}var self=this;var cb=function(){return maybeCb.apply(self,arguments);};// In true node style we process the callback on `nextTick` with all the\n // implications (stack, `uncaughtException`, `async_hooks`)\n original.apply(this,args).then(function(ret){process.nextTick(cb.bind(null,null,ret));},function(rej){process.nextTick(callbackifyOnRejected.bind(null,rej,cb));});}", "adoptedCallback () {\n //! Not sure what to do.\n }", "function doSomethingElse (input, successCallback, failureCallback) {\n setTimeout(\n () => {\n console.log(`doSomethingElse is done with input ${input}`)\n if (foo === true) return successCallback(`${input} => DO_SOMETHING_ELSE_RESULT`)\n else failureCallback(new Error('DO_SOMETHING_ELSE_ERROR'))\n },\n 0)\n}", "function oneShot(callback) {\n var done = false;\n return function (err) {\n if (!done) {\n done = true;\n return callback.apply(this, arguments);\n }\n if (err) console.error(err.stack);\n }\n}", "function fail(callback) {\n queue[queue.length - 1].fail = callback;\n return ctx.$loader;\n }", "function wrap(fn) {\n return function wrapper() {\n var cb = arguments[arguments.length - 1]\n try {\n var result = fn.apply(\n null,\n Array.prototype.slice.call(arguments, 0, arguments.length - 1)\n )\n cb(null, result)\n } catch (e) {\n cb(e)\n }\n }\n }", "function callbackified(){var args=[];for(var i=0;i<arguments.length;i++){args.push(arguments[i])}var maybeCb=args.pop();if(typeof maybeCb!==\"function\"){throw new TypeError(\"The last argument must be of type Function\")}var self=this;var cb=function(){return maybeCb.apply(self,arguments)};// In true node style we process the callback on `nextTick` with all the\n// implications (stack, `uncaughtException`, `async_hooks`)\noriginal.apply(this,args).then(function(ret){process.nextTick(cb.bind(null,null,ret))},function(rej){process.nextTick(callbackifyOnRejected.bind(null,rej,cb))})}", "function callback(err) {\n if (err != null) {\n error = err;\n }\n --count || fn(error);\n }", "function catcher () { return fn }", "function wrap(funct) {\n return function () {\n // return objects and throw errors\n var outcome = funct.apply(null, arguments).wait();\n if (outcome instanceof Error) {\n throw outcome;\n } else {\n return outcome;\n }\n };\n}", "function _errorOr(value, callback) {\n return function(err) {\n if (err) {\n return callback(err);\n }\n return callback(null, value);\n };\n}", "function callback(err) {\n if (err) {\n error = err;\n }\n --count || fn(error);\n }", "function callback(err) {\n if (err) {\n error = err;\n }\n --count || fn(error);\n }", "function callback(err) {\n if (err) {\n error = err;\n }\n --count || fn(error);\n }", "function none(_, callback) {\n return callback(); \n}", "function callbackDriver() {\n cb();\n }", "function doSomething (successCallback, failureCallback) {\n setTimeout(\n () => {\n console.log('doSomething is done')\n if (foo === true) return successCallback('DO_SOMETHING_RESULT')\n else failureCallback(new Error('DO_SOMETHING_ERROR'))\n },\n 0)\n}", "function passThru (fn) {\n return fn();\n}", "function getCallback(done) {\n return function(err, success){\n if (err) {\n return grunt.log.error(err);\n } else if (success) {\n grunt.log.writeln(success);\n done();\n }\n }\n }", "function _perror(callback) {\n return function(err) {\n callback(err);\n };\n}", "function callback(fn) {\n return function () {\n fn.apply(this, arguments);\n };\n }", "function trywrap (done, f) {\n return function () {\n try {\n f.apply(null, arguments);\n done();\n } catch (e) {\n done(new Error('trywrap ' + e.message));\n }\n }\n }", "function yankError(callback) {\n\t return function (err, results) {\n\t if (err || (results[0] && results[0].error)) {\n\t callback(err || results[0]);\n\t } else {\n\t callback(null, results.length ? results[0] : results);\n\t }\n\t };\n\t}", "function safe_callback(callback, error, data) {\r\n try {\r\n callback(error, data);\r\n } catch (err) {\r\n process.nextTick(function () {\r\n throw err;\r\n });\r\n }\r\n}", "function callbackified() {\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n\n var maybeCb = args.pop();\n if (typeof maybeCb !== 'function') {\n throw new TypeError('The last argument must be of type Function');\n }\n var self = this;\n var cb = function() {\n return maybeCb.apply(self, arguments);\n };\n // In true node style we process the callback on `nextTick` with all the\n // implications (stack, `uncaughtException`, `async_hooks`)\n original.apply(this, args)\n .then(function(ret) { process.nextTick(cb.bind(null, null, ret)) },\n function(rej) { process.nextTick(callbackifyOnRejected.bind(null, rej, cb)) });\n }", "function callbackified() {\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n\n var maybeCb = args.pop();\n if (typeof maybeCb !== 'function') {\n throw new TypeError('The last argument must be of type Function');\n }\n var self = this;\n var cb = function() {\n return maybeCb.apply(self, arguments);\n };\n // In true node style we process the callback on `nextTick` with all the\n // implications (stack, `uncaughtException`, `async_hooks`)\n original.apply(this, args)\n .then(function(ret) { process.nextTick(cb.bind(null, null, ret)) },\n function(rej) { process.nextTick(callbackifyOnRejected.bind(null, rej, cb)) });\n }", "function callbackified() {\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n\n var maybeCb = args.pop();\n if (typeof maybeCb !== 'function') {\n throw new TypeError('The last argument must be of type Function');\n }\n var self = this;\n var cb = function() {\n return maybeCb.apply(self, arguments);\n };\n // In true node style we process the callback on `nextTick` with all the\n // implications (stack, `uncaughtException`, `async_hooks`)\n original.apply(this, args)\n .then(function(ret) { process.nextTick(cb.bind(null, null, ret)) },\n function(rej) { process.nextTick(callbackifyOnRejected.bind(null, rej, cb)) });\n }", "function callbackified() {\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n\n var maybeCb = args.pop();\n if (typeof maybeCb !== 'function') {\n throw new TypeError('The last argument must be of type Function');\n }\n var self = this;\n var cb = function() {\n return maybeCb.apply(self, arguments);\n };\n // In true node style we process the callback on `nextTick` with all the\n // implications (stack, `uncaughtException`, `async_hooks`)\n original.apply(this, args)\n .then(function(ret) { process.nextTick(cb.bind(null, null, ret)) },\n function(rej) { process.nextTick(callbackifyOnRejected.bind(null, rej, cb)) });\n }", "function callbackified() {\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n\n var maybeCb = args.pop();\n if (typeof maybeCb !== 'function') {\n throw new TypeError('The last argument must be of type Function');\n }\n var self = this;\n var cb = function() {\n return maybeCb.apply(self, arguments);\n };\n // In true node style we process the callback on `nextTick` with all the\n // implications (stack, `uncaughtException`, `async_hooks`)\n original.apply(this, args)\n .then(function(ret) { process.nextTick(cb.bind(null, null, ret)) },\n function(rej) { process.nextTick(callbackifyOnRejected.bind(null, rej, cb)) });\n }", "function callbackified() {\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n\n var maybeCb = args.pop();\n if (typeof maybeCb !== 'function') {\n throw new TypeError('The last argument must be of type Function');\n }\n var self = this;\n var cb = function() {\n return maybeCb.apply(self, arguments);\n };\n // In true node style we process the callback on `nextTick` with all the\n // implications (stack, `uncaughtException`, `async_hooks`)\n original.apply(this, args)\n .then(function(ret) { process.nextTick(cb.bind(null, null, ret)) },\n function(rej) { process.nextTick(callbackifyOnRejected.bind(null, rej, cb)) });\n }", "function callbackified() {\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n\n var maybeCb = args.pop();\n if (typeof maybeCb !== 'function') {\n throw new TypeError('The last argument must be of type Function');\n }\n var self = this;\n var cb = function() {\n return maybeCb.apply(self, arguments);\n };\n // In true node style we process the callback on `nextTick` with all the\n // implications (stack, `uncaughtException`, `async_hooks`)\n original.apply(this, args)\n .then(function(ret) { process.nextTick(cb.bind(null, null, ret)) },\n function(rej) { process.nextTick(callbackifyOnRejected.bind(null, rej, cb)) });\n }", "function callbackified() {\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n\n var maybeCb = args.pop();\n if (typeof maybeCb !== 'function') {\n throw new TypeError('The last argument must be of type Function');\n }\n var self = this;\n var cb = function() {\n return maybeCb.apply(self, arguments);\n };\n // In true node style we process the callback on `nextTick` with all the\n // implications (stack, `uncaughtException`, `async_hooks`)\n original.apply(this, args)\n .then(function(ret) { process.nextTick(cb.bind(null, null, ret)) },\n function(rej) { process.nextTick(callbackifyOnRejected.bind(null, rej, cb)) });\n }", "function callbackified() {\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n\n var maybeCb = args.pop();\n if (typeof maybeCb !== 'function') {\n throw new TypeError('The last argument must be of type Function');\n }\n var self = this;\n var cb = function() {\n return maybeCb.apply(self, arguments);\n };\n // In true node style we process the callback on `nextTick` with all the\n // implications (stack, `uncaughtException`, `async_hooks`)\n original.apply(this, args)\n .then(function(ret) { process.nextTick(cb.bind(null, null, ret)) },\n function(rej) { process.nextTick(callbackifyOnRejected.bind(null, rej, cb)) });\n }", "function callbackified() {\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n\n var maybeCb = args.pop();\n if (typeof maybeCb !== 'function') {\n throw new TypeError('The last argument must be of type Function');\n }\n var self = this;\n var cb = function() {\n return maybeCb.apply(self, arguments);\n };\n // In true node style we process the callback on `nextTick` with all the\n // implications (stack, `uncaughtException`, `async_hooks`)\n original.apply(this, args)\n .then(function(ret) { process.nextTick(cb.bind(null, null, ret)) },\n function(rej) { process.nextTick(callbackifyOnRejected.bind(null, rej, cb)) });\n }", "function callbackified() {\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n\n var maybeCb = args.pop();\n if (typeof maybeCb !== 'function') {\n throw new TypeError('The last argument must be of type Function');\n }\n var self = this;\n var cb = function() {\n return maybeCb.apply(self, arguments);\n };\n // In true node style we process the callback on `nextTick` with all the\n // implications (stack, `uncaughtException`, `async_hooks`)\n original.apply(this, args)\n .then(function(ret) { process.nextTick(cb.bind(null, null, ret)) },\n function(rej) { process.nextTick(callbackifyOnRejected.bind(null, rej, cb)) });\n }", "function callbackified() {\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n\n var maybeCb = args.pop();\n if (typeof maybeCb !== 'function') {\n throw new TypeError('The last argument must be of type Function');\n }\n var self = this;\n var cb = function() {\n return maybeCb.apply(self, arguments);\n };\n // In true node style we process the callback on `nextTick` with all the\n // implications (stack, `uncaughtException`, `async_hooks`)\n original.apply(this, args)\n .then(function(ret) { process.nextTick(cb.bind(null, null, ret)) },\n function(rej) { process.nextTick(callbackifyOnRejected.bind(null, rej, cb)) });\n }", "function defaultcallback(){\n} // end defaultcallback()", "function callbackified(){var args=[];for(var i=0;i<arguments.length;i++){args.push(arguments[i]);}var maybeCb=args.pop();if(typeof maybeCb!=='function'){throw new TypeError('The last argument must be of type Function');}var self=this;var cb=function cb(){return maybeCb.apply(self,arguments);};// In true node style we process the callback on `nextTick` with all the\n// implications (stack, `uncaughtException`, `async_hooks`)\noriginal.apply(this,args).then(function(ret){process.nextTick(cb,null,ret);},function(rej){process.nextTick(callbackifyOnRejected,rej,cb);});}", "function yankError(callback) {\n return function (err, results) {\n if (err || (results[0] && results[0].error)) {\n callback(err || results[0]);\n } else {\n callback(null, results.length ? results[0] : results);\n }\n };\n}", "function yankError(callback) {\n return function (err, results) {\n if (err || (results[0] && results[0].error)) {\n callback(err || results[0]);\n } else {\n callback(null, results.length ? results[0] : results);\n }\n };\n}", "function yankError(callback) {\n return function (err, results) {\n if (err || (results[0] && results[0].error)) {\n callback(err || results[0]);\n } else {\n callback(null, results.length ? results[0] : results);\n }\n };\n}", "function yankError(callback) {\n return function (err, results) {\n if (err || (results[0] && results[0].error)) {\n callback(err || results[0]);\n } else {\n callback(null, results.length ? results[0] : results);\n }\n };\n}", "function yankError(callback) {\n return function (err, results) {\n if (err || (results[0] && results[0].error)) {\n callback(err || results[0]);\n } else {\n callback(null, results.length ? results[0] : results);\n }\n };\n}", "function yankError(callback) {\n return function (err, results) {\n if (err || (results[0] && results[0].error)) {\n callback(err || results[0]);\n } else {\n callback(null, results.length ? results[0] : results);\n }\n };\n}", "function yankError(callback) {\n return function (err, results) {\n if (err || (results[0] && results[0].error)) {\n callback(err || results[0]);\n } else {\n callback(null, results.length ? results[0] : results);\n }\n };\n}", "function yankError(callback) {\n return function (err, results) {\n if (err || (results[0] && results[0].error)) {\n callback(err || results[0]);\n } else {\n callback(null, results.length ? results[0] : results);\n }\n };\n}" ]
[ "0.7130556", "0.70233274", "0.6992538", "0.6796988", "0.6796988", "0.67850184", "0.67459124", "0.6743518", "0.67404836", "0.67404836", "0.67404836", "0.67404836", "0.67404836", "0.67404836", "0.67404836", "0.67404836", "0.6726263", "0.66969687", "0.66800034", "0.6672507", "0.6672507", "0.6672507", "0.6672507", "0.6672507", "0.664977", "0.664977", "0.664977", "0.664977", "0.664977", "0.66198975", "0.6581143", "0.6572807", "0.6543449", "0.6530539", "0.6433494", "0.6406088", "0.6394646", "0.63613915", "0.63529617", "0.6332537", "0.6325352", "0.6293913", "0.62693", "0.62512827", "0.62512827", "0.62437767", "0.62203777", "0.6209388", "0.6206245", "0.6189261", "0.6188848", "0.6188848", "0.6171459", "0.61419106", "0.61204535", "0.61185867", "0.6118442", "0.6107924", "0.6101409", "0.6079591", "0.6070618", "0.60441595", "0.60440516", "0.60099584", "0.5990582", "0.59890026", "0.5984413", "0.5984413", "0.5984413", "0.59746516", "0.5970133", "0.5968429", "0.5964323", "0.59640104", "0.59613323", "0.5958727", "0.59470886", "0.593676", "0.5933109", "0.59152675", "0.59152675", "0.59152675", "0.59152675", "0.59152675", "0.59152675", "0.59152675", "0.59152675", "0.59152675", "0.59152675", "0.59152675", "0.59152675", "0.5913463", "0.58917415", "0.58839804", "0.58839804", "0.58839804", "0.58839804", "0.58839804", "0.58839804", "0.58839804", "0.58839804" ]
0.0
-1
Provide a way to remove the unloader
function removeUnloader() { let index = unloaders.indexOf(unloader); if (index != -1) unloaders.splice(index, 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeUnloader() {\n let index = unloaders.indexOf(unloader);\n if (index != -1)\n unloaders.splice(index, 1);\n }", "function unloader() {\n try {\n callback();\n }\n catch(ex) {}\n }", "function unloader() {\n try {\n callback();\n }\n catch(ex) {}\n }", "function unloader() {\n try {\n callback();\n }\n catch(ex) {}\n }", "function unloader() {\n try {\n callback();\n }\n catch(ex) {}\n }", "destroyLoader(loaderName) {\n loaderName = false;\n }", "function removeLoader() {\r\n $(\"#loader-container\").remove();\r\n }", "function _unhook() {\n\t// set the original loader\n\tModule._load = _load;\n\t// reset hooking time\n\t_hookedAt = undefined;\n}", "function _unhook() {\n\t// set the original loader\n\tModule._load = _load;\n\t// reset hooking time\n\t_hookedAt = undefined;\n}", "function removeLoader() {\n\tvar loader = document.getElementById('directory-loading');\n\tloader.parentNode.removeChild(loader);\n}", "function removePageLoader() {\n pageLoader.remove();\n}", "function removePageLoader() {\n pageLoader.remove();\n}", "function fsUnloaded() {\n\t// framescript on unload\n\tconsole.log('fsInaly.js framworker unloading');\n\tbootstrapCallbacks.destroySelf();\n\n}", "unobserve() {\n window.removeEventListener('api-process-link', this._assetHandler);\n window.removeEventListener('api-process-file', this._fileHandler);\n window.removeEventListener('api-resolve-model', this._resolveHandler);\n }", "_dispose() {\n\n delete window.FlowUI['_loaders'][this.id];\n\n }", "detach() {\n _commons__WEBPACK_IMPORTED_MODULE_0__[\"finalizeResources\"].call(this);\n }", "function removePreloader() {\n const loader = document.querySelector('.progress');\n if(loader) {\n loader.remove();\n }\n}", "loaded () {\n this.page.loader.remove()\n }", "unload () {\n this.#timers.off()\n this.#display.off()\n this.#logFile.off()\n }", "onUnload() {\n\t\tthis.$container.off(this.namespace);\n\t}", "unload() {}", "unMount() {\n this.removeListeners();\n SimpleBar.instances.delete(this.el);\n }", "unMount() {\n this.removeListeners();\n SimpleBar.instances.delete(this.el);\n }", "function unload() {\n // clean up any globals or other cruft before being removed before i get killed.\n }", "Unload() {}", "destroy() {\n \tthis._unload();\n \tsuper.destroy();\n \tthis.unregisterCallback();\n \tdelete this._element;\n \tthis._elementURL = undefined;\n \tthis._state = STATE.waiting;\n \tthis._currentTime = 0;\n \tthis._startTime = NaN;\n \tthis._stopTime = Infinity;\n \tthis._ready = false;\n \tthis._loadCalled = false;\n \tthis._gl.deleteTexture(this._texture);\n \tthis._texture = undefined;\n }", "function removeLoader () {\r\n $('#player-loader').fadeOut(600, function(){\r\n $(this).addClass('hidden');\r\n });\r\n }", "function _remove() {\n $('button.recommend').off('click', _checkin);\n $('section header a').last().off('click', _drawer.removeWindow);\n if (_checkinPromise !== undefined &&\n typeof (_checkinPromise.abort) === 'function') {\n _checkinPromise.abort();\n }\n }", "unmount() {\n this.jquery(\"#\" + this.id).remove();\n this.jquery(window).off(\"click\");\n }", "unload() {\n this.element.unmount();\n }", "static removeL() {\n let bodyEl = document.querySelector(\"body\");\n bodyEl.removeChild(document.querySelector(\".loading\"))\n }", "unregister(d) {\n const index = this._disposables.indexOf(d);\n if (index !== -1) {\n this._disposables.splice(index, 1);\n }\n }", "_destroy() {\n $(window).off(\".\" + this.options.namespace);\n this.element.off(\".\" + this.options.namespace);\n this.element.removeClass([this.options.classes.disabled, this.options.classes.root, this.options.classes.completed]);\n this.element.insertAfter(this.wrapperEl);\n this.wrapperEl.remove();\n }", "removeLoadingScreen() {\n\t\tconst dummy = document.querySelector('.LoadingScreen')\n\t\tif (!dummy) {\n\t\t\treturn\n\t\t}\n\t\tdummy.parentNode.removeChild(dummy)\n\t}", "_unload () {\n forEach(this.queue, f => f(this.vendor))\n this.queue.splice(0, this.queue.length)\n }", "removeAll() {\n this.loaderCounter = 0;\n this.errorCounter = 0;\n this._remove(true);\n }", "function unload() {\n // clean up any globals or other cruft before being removed before i get killed.\n console.log('unload layout plugin');\n }", "removePageLoader() {\n this.elem.loader.classList.add(this.class.loader.fadeOut);\n setTimeout(() => {\n this.elem.loader.classList.add(this.class.loader.hidden);\n }, this.animDur.loader);\n }", "function unload() {\n}", "remove () {\n // cleanup\n }", "function unInitImpl(){\n\tif(listenerRunning){\n\t\tbndwr.cancelDiscovery();\n\t\tclearTimeout(whoIsTimerTask);\n\t}\n}", "function unload() {\n deleteStatusOverlays();\n Controller.mousePressEvent.disconnect(onMousePressEvent);\n Window.geometryChanged.disconnect(onWindowResize);\n MyAvatar.wentAway.disconnect(onWentAway);\n MyAvatar.wentActive.disconnect(onWentActive);\n MyAvatar.displayNameChanged.disconnect(updateStatus);\n HMD.displayModeChanged.disconnect(onDisplayModeChanged);\n Window.domainChanged.disconnect(onDomainChanged);\n if (heartbeat) {\n Script.clearTimeout(heartbeat);\n heartbeat = false;\n }\n }", "unload() {\n\t\tthis.currentlyUpdatingTile = null;\n\t\tthis.tilesForTextureUpdate = [];\n\t\tthis.tiles = [];\n\t}", "function removeLoader()\n\t{\n\t\t$(\".loading\").fadeOut();\n\t\t\n\t\t$(\".overslider\").fadeIn(\"normal\",function(){\n\t\t\n\t\t\t$(\".overslider\").css(\"margin-top\", windowH);\n\t\t});\n\t\t\n\t}", "_onRemove() {\n RB.DnDUploader.instance.unregisterDropTarget(this.$el);\n }", "deInit () {\n const me = this;\n\n if (me.eventsInitialized) {\n me.events.forEach(event => process.removeListener(event, me.exec));\n\n me.eventsInitialized = false;\n }\n }", "static deregister() {\n delete __WEBPACK_IMPORTED_MODULE_0__common_plugin__[\"a\" /* PLUGINS */][\"FSStorage\"];\n }", "stopLoading () {\n this.$element.find('.loading-wrapper').remove()\n this.$element.removeClass('loading')\n }", "function removeLoad(loadId) {\n loadId = \"#\" + loadId;\n $(loadId).remove();\n}", "function g(){X.removeEventListener(\"DOMContentLoaded\",g),a.removeEventListener(\"load\",g),fa.ready()}", "function o(){ne.removeEventListener(\"DOMContentLoaded\",o),_.removeEventListener(\"load\",o),me.ready()}", "stopLoading() {\n if (!this.loadingInstance) return;\n Vue.nextTick(() => {\n this.loadingInstance.close();\n this.loadingInstance = null;\n });\n }", "function stopLoadingAnimation () {\r\n $('#root-loading-wheel').remove();\r\n $('#root-loading-text').remove();\r\n}", "function removeLoading($element) {\n $element.removeClass(\"loading\");\n }", "function pluginUnload() {\n\t\n\t\t\t// List of plugins that require detachment\n\t\t\tvar pluginList = ['.datepicker', '.rangepicker', '.colorpicker', '.rgbapicker', '.timepicker', '#graph'];\n\t\t\t\n\t\t\t// Cycle through each plugin and detach its handler\n\t\t\t$.each(pluginList, function(i, e) {\n\t\t\t\tif ($(e).length) {\n\t\t\t\t $(e).detach();\n\t\t\t\t};\n\t\t\t});\n\t\t}", "function teardown () {\n\t removeNativeEventListeners()\n\t removeNativeElement()\n\t app.off('unmount', onunmount)\n\t app.off('mount', onmount)\n\t app.off('source', onupdate)\n\t }", "function hideLoader() {\n const loadScreen = document.getElementById(\"loadScreen\");\n loadScreen?.remove()\n}", "function removeLoader(){\n\n fadeInElements([\"main-wrapper\"], 1000);\n fadeOutElements([\"loading\"], 100);\n\n}", "function cleanup() {\n $.off();\n}", "removeLoadingIndicator() {\n let loadingIndicatorClass =\n this.get('ember-load-config.loadingIndicatorClass') ||\n 'ember-load-indicator';\n const elems = document.querySelectorAll(`.${loadingIndicatorClass}`);\n /**\n * Very important to iterate over the NodeList this way,\n * and remove the DOM elements via removeChild to maintain ie11\n * compatibility\n */\n for (let i = 0; i < elems.length; i++) {\n elems[i].parentNode.removeChild(elems[i]);\n }\n }", "function removeLoading() {\n const elem = document.getElementById('app-loading');\n elem.className = 'app-loading hide-loading';\n\n setTimeout(() => {\n elem.parentNode.removeChild(elem);\n disableScroll.off();\n }, 500);\n}", "function teardown () {\n removeNativeEventListeners()\n removeNativeElement()\n app.off('unmount', onunmount)\n app.off('mount', onmount)\n app.off('source', onupdate)\n }", "unloadTrack () {\n if (this.howlHandler) {\n this.howlHandler.unload();\n }\n }", "function removeLoader() {\n $(\".overlay-loader\").fadeOut(500, function () {\n // fadeOut complete. Remove the loading div\n $(\"#overlay-loader\").remove(); //removes loader after set time\n $('.movieList').css(\"display\", \"inline-block\") //displays movie list again\n });\n }", "function unsetPreviewLoading()/*:void*/ {\n if (this.previewLoadMask$67CD) {\n this.previewLoadMask$67CD.hide();\n this.previewLoadMask$67CD.disable();\n\n this.previewLoadMask$67CD.getEl().removeListener('click',AS3.bind( this,\"unsetPreviewLoading\"));\n }\n }", "componentWillUnmount() {\n Object.keys(this.eventCallbacks).forEach((key) => {\n const eventName = key.substring(2).toLowerCase();\n const handler = this.eventCallbacks[key];\n\n this.pathNavigator.off(eventName, handler);\n });\n\n this.pathNavigator.destroy();\n this.pathNavigator = null;\n }", "onShutdown () {\n unload()\n }", "function cleanup() {\r\n observer && observer.disconnect();\r\n removeEvent(wheelEvent, wheel);\r\n removeEvent('mousedown', mousedown);\r\n removeEvent('keydown', keydown);\r\n removeEvent('resize', refreshSize);\r\n removeEvent('load', init);\r\n}", "function cleanup() {\r\n observer && observer.disconnect();\r\n removeEvent(wheelEvent, wheel);\r\n removeEvent('mousedown', mousedown);\r\n removeEvent('keydown', keydown);\r\n removeEvent('resize', refreshSize);\r\n removeEvent('load', init);\r\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 resetLoader() {\n program = compilerHost = AOTMode = undefined;\n}", "onListItemComponentWillUnmount(_this) {\n if (_this.removeFetcher instanceof Promise) {\n _this.removeFetcher.cancel();\n }\n }", "function cleanUp() {\n subModulePromises[subModuleName] = null;\n }", "function deregister(){var index=instances.indexOf(instance);if(index!==-1){instances.splice(index,1);}}", "detach() {\n this.draggable.off('mirror:created', this[onMirrorCreated]).off('mirror:destroy', this[onMirrorDestroy]).off('drag:over', this[onDragOver]).off('drag:over:container', this[onDragOver]);\n }", "_clearState(){\n\t\tthis._isLoaded = null;\n\t}", "removeLoading () {\n this.loading.style.display = \"none\";\n }", "function deleteLoading(username){\n $(\"#user-frame-box-\" + username + \" .loader\").remove();\n }", "async unload() {\n if (this.buildTimestampsLock) {\n await this.buildTimestampsLock()\n this.buildTimestampsLock = null\n }\n }", "function cleanup() {\n\t\t\t\ttry {\n\t\t\t\t\t// do the cleanup\n\t\t\t\t\tKilauea.removeEvent(node, type, fn, capt);\n\t\t\t\t\t// cleanup the cleanup\n\t\t\t\t\tKilauea.removeEvent(window, 'unload', cleanup);\n\t\t\t\t\tnode = type = fn = null;\n\t\t\t\t} catch (e) {\n\t\t\t\t\t// tinyMCE: IE may produce access denied exception on unload\n\t\t\t\t}\n\t\t\t}", "function unload() {\n $.unblockUI();\n}", "componentWillUnmount() {\n cssAPI.unload(this.bootstrap);\n cssAPI.unload(this.bootstrapTheme);\n\n if (this.mp4Player) {\n this.mp4Player.dispose()\n }\n\n if (this.m3u8Player) {\n this.m3u8Player.dispose()\n }\n }", "Unload()\n {\n // TODO: Unload buffers\n }", "function detach() {\n if (document.addEventListener) {\n document.removeEventListener(\"DOMContentLoaded\", completed);\n window.removeEventListener(\"load\", completed);\n } else {\n document.detachEvent(\"onreadystatechange\", completed);\n window.detachEvent(\"onload\", completed);\n }\n }", "componentWillUnmount() {\n this.state.element.removeEventListener('load', this.centerImage);\n\n // # Allow body scolling\n $('body').removeClass('bdy is_overlay-visible');\n }", "function g(){Z.removeEventListener(\"DOMContentLoaded\",g,!1),a.removeEventListener(\"load\",g,!1),_.ready()}", "destroy() {\n // unbind (texture) asset references\n for (const asset in this._assetReferences) {\n this._assetReferences[asset]._unbind();\n }\n this._assetReferences = null;\n\n super.destroy();\n }", "unload() {\n renderer.dispose();\n }", "unload() {\n renderer.dispose();\n }", "onRemove() {\n super.onRemove()\n SpellJSFile.registry.clear(this.path)\n SpellLocation.registry.clear(this.path)\n }", "unload () {\n renderer.dispose();\n }", "unmount() {\n if (this._iFrameEl) {\n this._iFrameEl.parentNode.removeChild(this._iFrameEl);\n this._iFrameEl = null;\n this._iFrameOrigin = null;\n this._containerEl = null;\n this._debugMode = false;\n this.removeMessageListener()\n }\n BlueInkEmbed._mounted = false;\n }", "destroy() {\n if (this.ticking) {\n Ticker_1.Ticker.system.remove(this.tick, this);\n }\n this.ticking = false;\n this.addHooks = null;\n this.uploadHooks = null;\n this.renderer = null;\n this.completes = null;\n this.queue = null;\n this.limiter = null;\n this.uploadHookHelper = null;\n }", "function hideLoader() {\n $('#loader').fadeOut('normal', function() {\n $(this).remove();\n });\n}", "function clear() {\n internal.loader.clear();\n internal.index = null;\n internal.count = 0;\n }", "function cleanup() {\n observer && observer.disconnect();\n removeEvent(wheelEvent, wheel);\n removeEvent('mousedown', mousedown);\n removeEvent('keydown', keydown);\n removeEvent('resize', refreshSize);\n removeEvent('load', init);\n}", "function cleanup() {\n observer && observer.disconnect();\n removeEvent(wheelEvent, wheel);\n removeEvent('mousedown', mousedown);\n removeEvent('keydown', keydown);\n removeEvent('resize', refreshSize);\n removeEvent('load', init);\n}", "function cleanup() {\n observer && observer.disconnect();\n removeEvent(wheelEvent, wheel);\n removeEvent('mousedown', mousedown);\n removeEvent('keydown', keydown);\n removeEvent('resize', refreshSize);\n removeEvent('load', init);\n }", "function cleanup() {\n observer && observer.disconnect();\n removeEvent(wheelEvent, wheel);\n removeEvent('mousedown', mousedown);\n removeEvent('keydown', keydown);\n removeEvent('resize', refreshSize);\n removeEvent('load', init);\n }", "function cleanup() {\n observer && observer.disconnect();\n removeEvent(wheelEvent, wheel);\n removeEvent('mousedown', mousedown);\n removeEvent('keydown', keydown);\n removeEvent('resize', refreshSize);\n removeEvent('load', init);\n }" ]
[ "0.8408761", "0.79491895", "0.7903677", "0.7877581", "0.7877581", "0.7701299", "0.7543409", "0.7223334", "0.7223334", "0.71700823", "0.7098222", "0.7098222", "0.70753145", "0.7031964", "0.7005381", "0.6834327", "0.6819188", "0.67495775", "0.67100435", "0.6699955", "0.66456705", "0.66383785", "0.6623259", "0.6557387", "0.654765", "0.65370995", "0.648565", "0.6480167", "0.6478949", "0.64741313", "0.64682543", "0.64370275", "0.6422619", "0.6415833", "0.64133567", "0.64027447", "0.63951534", "0.63695", "0.6362973", "0.6359833", "0.6358599", "0.63525385", "0.6340441", "0.6311657", "0.62649286", "0.6253432", "0.6237444", "0.6232636", "0.62124807", "0.62005204", "0.6194626", "0.6183828", "0.61792123", "0.6176057", "0.6175003", "0.6174881", "0.61569613", "0.61549556", "0.61388624", "0.6133262", "0.6123451", "0.61233675", "0.6105076", "0.6096525", "0.6095532", "0.60797304", "0.60762864", "0.60745233", "0.60745233", "0.60724413", "0.6064281", "0.6057117", "0.6052639", "0.60487735", "0.6046194", "0.604547", "0.6043905", "0.6037706", "0.60363686", "0.60334295", "0.6033298", "0.60271823", "0.60266733", "0.6025157", "0.602243", "0.60211515", "0.601943", "0.6014696", "0.6014696", "0.6013944", "0.60133326", "0.6010071", "0.6008081", "0.6006516", "0.60035795", "0.5998689", "0.5998689", "0.5996792", "0.5996792", "0.5996792" ]
0.8381989
1
Adding the event Handler
function workerMessageHandler(event) { let [rgb, uuid] = JSON.parse(event.data); for (let doc of getImageDocuments()) { if (doc.body.getAttribute("standalone-image-backgrounds-uuid") == uuid) { doc.body.style.background = rgb; return; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "add() {\n this.target.addEventListener(this.eventType, this.fn, false);\n }", "on(handler) {\n this.addEventListener(handler);\n }", "_events() {\n \tthis._addKeyHandler();\n \tthis._addClickHandler();\n }", "handlerWillAdd (event, when, handler) {\n\n }", "_addMessageListener({\n eventHandler,\n eventName,\n frameId\n }) {\n\n if (typeof eventHandler === 'function') {\n\n handlers.add({\n componentId: this.componentId,\n eventName: eventName,\n eventHandler: eventHandler,\n frameId,\n });\n\n }\n\n }", "function _registerEventHandler() {\n\t\t$.$TASMA.find('.button.new').on('click', TaskManager.add);\n\t\t$.$TASMA.find('.tasks-list').on('click', '.button.remove', TaskManager.remove);\n\t\t$.$TASMA.find('.button.remove-all').on('click', TaskManager.removeAll);\n\t\t$.$TASMA.find('.button.save').on('click', TaskManager.save);\n\t\t$.$TASMA.find('.button.cancel').on('click', TaskManager.cancel);\n\t}", "function addEvent() {\n sendLog(\"Add Event\")\n selectEvent(0);\n handleShow();\n }", "addHandler(handler) {\n handlers.push(handler);\n }", "onEvent(handler) {\n return this.on('Event', handler);\n }", "function FsEventsHandler() {}", "addEventHandlers() {\n\n\t\tthis.elementConfig.addButton.on(\"click\",this.handleAdd);\n\t\tthis.elementConfig.cancelButton.on(\"click\",this.handleCancel);\n\t\tthis.elementConfig.retrieveButton.on(\"click\",this.retrieveData);\n\n\n\t}", "onEvent() {\n \n }", "function registerEvents() {\n}", "on(sEventName, f) {\n\t\tthis.getEventHandlers(sEventName).push(f);\n\t}", "bindEvents() {\n }", "handleEvents() {\n }", "addEventHandler() {\n super.addEventHandler();\n if(this.componentElement != null){\n let buttonEl = this.componentElement.querySelector(\"input[type='button']\");\n buttonEl.addEventListener(\"click\", (e) => { this.clickHandler(e); });\n }\n }", "function initEventHandler() {\n // initSortable();\n initFormEvents(fb);\n initListEvents(fb);\n}", "listen() {\n [\"change\"].forEach(name => {\n this.el_.addEventListener(name, this.handler_, false)\n })\n }", "function setAddEventHandlerInQuickView() {\n const button = nodeSelectors.quickViewBody.querySelector(selectors.add);\n on('click', button, (event) => handleAddEvent(event));\n }", "function evtHandler() {\n // console.log(\"event handler initialized\");\n //jQuery('#editbox').dialog({'autoOpen': false});\n\n jQuery('#list-usePref li').click(function () {\n\n resetClass(jQuery(this), 'active');\n jQuery(this).addClass('active');\n // console.log(\"colorSelector: \",colorSelector);\n triggerViz(styleVal);\n\n });\n\n }", "addHandler (handler, type) {\n\t\tthis.handlers.push(handler)\n\t}", "function addEventListeners() {\n\n}", "function addEventHandler() {\n //this.buttonMode = true;\n //this.mouseChildren = false;\n p.tabObj[p._id].buttonMode = true;\n /* this.addEventListener(MouseEvent.MOUSE_UP, eventHandler, false, 0, true)\n this.addEventListener(MouseEvent.MOUSE_OVER, eventHandler, false, 0, true)\n this.addEventListener(MouseEvent.MOUSE_OUT, eventHandler, false, 0, true)\n this.addEventListener(MouseEvent.CLICK, eventHandler, false, 0, true) */\n bindEvents(p._id);\n\n if (!p._disabled && p._handCursor) {\n //this.useHandCursor = true;\n p.tabObj[p._id].useHandCursor = true;\n } else {\n //this.useHandCursor = false;\n p.tabObj[p._id].useHandCursor = false;\n updateState('_disable');\n }\n }", "addListener(eventName, handler) {\r\n if (eventName in this.events === false) this.events[eventName] = [];\r\n\r\n this.events[eventName].push(handler);\r\n }", "function handleEvent(event) {\n\n }", "addHandler(handler) {\n this.handlers.add(handler);\n handler(this.state);\n }", "addHandler(handler) {\n this.handlers.add(handler);\n handler(this.state);\n }", "applyEventHandler(data = {}) {\n this.handler(data);\n }", "on ( event, handler ) {\n\n this.addEventListener\n (event, this.renderable (handler))\n }", "addHandlerNavBtn(handler) {\n this._addRecipeNavBtn.addEventListener('click', handler);\n }", "function _bindEventHandlers() {\n\t\t\n helper.bindEventHandlers();\n }", "handleEvent() {}", "handleEvent() {}", "_handleEvent(event) {\n\t\tconst sHandlerName = `on${event.type}`;\n\n\t\tif (this[sHandlerName]) {\n\t\t\tthis[sHandlerName](event);\n\t\t}\n\t}", "function initEventListener() {\n \n }", "function bindEvents() {\n\t\t\teManager.on('showForm', function() {\n\t\t\t\tshowForm();\n\t\t\t});\n\t\t\teManager.on('csvParseError', function() {\n\t\t\t\tshowError();\n\t\t\t});\n\t\t}", "function bindAddHandlers() {\n $(\".add-button\").bind(\"click\", function(event) {\n $(this).attr(\"disabled\", \"disabled\");\n $(this).closest('li').hide('blind', { direction: 'vertical' }, ANIMATION_TIMEOUT);\n var url = ('/playlists/edit/' + encodeURIComponent(playlistId) +\n '/add_playlist_entry?video_id=' + encodeURIComponent(event.target.id) +\n '&uuid=' + encodeURIComponent(uuid));\n $.ajax({ type: 'POST', url: url });\n });\n }", "_addEventsListeners ()\n {\n this._onChange();\n }", "function T(e,t,n){Q.reference.addEventListener(e,t),n.push({eventType:e,handler:t})}", "function EventHandler() {\n this._binds = [];\n }", "function addEventHandler(handler) {\n document.addEventListener('click', handler);\n}", "render() {\n this._addChooserHandler();\n this._addLoggerListeners();\n this._addButtonHandler();\n }", "function AddEventHandlers() {\n intervalTimer = setInterval(HeartBeat, $.ConsonaChat.options.pollInterval);\n if($.ConsonaChat.options.inputNode) {\n $($.ConsonaChat.options.inputNode).addClass(\"ccInputBox\");\n if($.ConsonaChat.options.sendButton) $($.ConsonaChat.options.sendButton).click(SendEvent);\n if($.ConsonaChat.options.sendOnEnter) {\n $($.ConsonaChat.options.inputNode).keydown(function(event) {\n if (event.which == $.ConsonaChat.keyCode.ENTER) {\n event.preventDefault();\n SendEvent();\n }\n });\n }\n }\n if($.ConsonaChat.options.closeButton) {\n $($.ConsonaChat.options.closeButton).click(CloseEvent);\n }\n}", "on(event, handler, options) {\n return this.addListener(event, handler, options);\n }", "get eventHandler() {\n return this._eventHandler;\n }", "get eventHandler() {\n return this._eventHandler;\n }", "get eventHandler() {\n return this._eventHandler;\n }", "function handleBindEventHandlers(){\n handleAddBookmark();\n handleFilterRating();\n handleDeleteBookmark();\n handleAddForm();\n handleDescExpand();\n handleCloseButton();\n }", "function Handler() {}", "function Handler() {}", "function Handler() {}", "function Handler() {}", "function Handler() {}", "function Handler() {}", "function Handler() {}", "function Handler() {}", "function Handler() {}", "function Handler() {}", "function Handler() {}", "function GetResourceEventHandler(sender){this.sender=sender;}", "addHandlerRender(handler) {\n // to run multiple events that use the same function\n ['hashchange', 'load'].forEach(ev => window.addEventListener(ev, handler));\n }", "on(eventName, handler) {\n this.eventsMap[eventName] = handler;\n }", "function addEventHandler(obj, eventName, handler)\n{\n\t//store adding events to use when confirm div is shown\n\teventHandlerArray[eventHandlerArray.length] = [obj, eventName, handler];\n\taddEventHandlerWithOutSaving(obj, eventName, handler);\n\t\n}", "_addWebContentsCreatedHandler() {\n\t\tthis.app.on('web-contents-created', this._onWebContentsCreated);\n\t}", "bindStartGame(handler){\n let startbutton = this.getElement(\"#start\");\n startbutton.addEventListener('click',MemoryEvent =>{\n handler();\n })\n }", "function init () {\n bindEventHandlers();\n}", "_addEventListener() {\n this._wave.waveElement.addEventListener('click', () =>\n this._addBubbles(this._config.app.bubblesAddedOnClick.count, 2, 1, false)\n );\n }", "addListener(event, handler) {\n this.on(event, handler);\n return this;\n }", "addListener(event, handler) {\n this.on(event, handler);\n return this;\n }", "addHandler(handler) {\n if (Handler.validate(handler)) {\n this.handlers[handler.id] = handler;\n }\n }", "init(){\n this.newsSourceControls.addEventListener('click', this.clickHandler);\n }", "addUpdateListener(f) {\n if (this._handlers.indexOf(f) === -1) {\n this._handlers.push(f);\n }\n }", "function addEvent(el, type, handler) {\r\n if (el.attachEvent) el.attachEvent('on' + type, handler);\r\n else el.addEventListener(type, handler);\r\n }", "constructor(eventType, handler) {\n this.eventType = eventType;\n this.handler = handler;\n }", "_events() {\n this._addKeyHandler();\n this._addClickHandler();\n this._setHeightMqHandler = null;\n\n if (this.options.matchHeight) {\n this._setHeightMqHandler = this._setHeight.bind(this);\n\n $(window).on('changed.zf.mediaquery', this._setHeightMqHandler);\n }\n\n if(this.options.deepLink) {\n $(window).on('popstate', this._checkDeepLink);\n }\n }", "addEventListeners() {\n\t\tthis.container.addEventListener( 'click', this.handleClick, false );\n\t}", "setupHandlers () {\n this.rs.on('connected', () => this.eventHandler('connected'));\n this.rs.on('ready', () => this.eventHandler('ready'));\n this.rs.on('disconnected', () => this.eventHandler('disconnected'));\n this.rs.on('network-online', () => this.eventHandler('network-online'));\n this.rs.on('network-offline', () => this.eventHandler('network-offline'));\n this.rs.on('error', (error) => this.eventHandler('error', error));\n\n this.setEventListeners();\n this.setClickHandlers();\n }", "function registerHandlers()\n {\n component.click(showInput);\n component.click(function(){\n list.children('li').removeClass('mt-selected');\n });\n input.on('change',inputOnchange);\n $(document).on('click','.mt-token-erase', function() {\n $(this).parent().remove();\n });\n input.on('keydown',inputKeydown);\n document.getElementById('mailtoken').addEventListener(\"keydown\", documentKeydown); //or however you are calling your method\n\n }", "function bindEventHandlers () {\n $('#createHaiku').on('click', createHaiku);\n $('#clearOutput').on('click', clearOutput);\n }", "on(eventName, handler) {\n // Note: this method only exists to define the types; we delegate the impl\n // to EventEmitter.\n return super.on(eventName, handler);\n }", "_events() {\n var _this = this;\n\n this._updateMqHandler = this._update.bind(this);\n\n $(window).on('changed.zf.mediaquery', this._updateMqHandler);\n\n this.$toggler.on('click.zf.responsiveToggle', this.toggleMenu.bind(this));\n }" ]
[ "0.7136425", "0.7136425", "0.7136425", "0.7136425", "0.7136425", "0.7136425", "0.7136425", "0.7136425", "0.7136425", "0.7136425", "0.7136425", "0.7136425", "0.7136425", "0.7136425", "0.7136425", "0.7136425", "0.7136425", "0.7136425", "0.7136425", "0.7024205", "0.7020167", "0.70048785", "0.68571085", "0.6856307", "0.682534", "0.6799145", "0.6765676", "0.67099917", "0.6688882", "0.66850865", "0.6643544", "0.6638481", "0.6636777", "0.66166687", "0.6606546", "0.6576354", "0.6569538", "0.6562653", "0.65584373", "0.6508335", "0.6495799", "0.64934164", "0.648989", "0.64614695", "0.6447536", "0.6434097", "0.6434097", "0.64317566", "0.64297754", "0.64191175", "0.640615", "0.64000934", "0.64000934", "0.63929516", "0.6372308", "0.6321291", "0.6308422", "0.63079935", "0.63032645", "0.6303247", "0.6253544", "0.62527317", "0.624988", "0.6248626", "0.62430835", "0.62430835", "0.62430835", "0.62422055", "0.6239605", "0.6239605", "0.6239605", "0.6239605", "0.6239605", "0.6239605", "0.6239605", "0.6239605", "0.6239605", "0.6239605", "0.6239605", "0.62395674", "0.6239548", "0.6239349", "0.6180136", "0.6171683", "0.616961", "0.6152523", "0.6147781", "0.61391973", "0.61391973", "0.6137687", "0.61316866", "0.6125177", "0.6122371", "0.6120469", "0.61108357", "0.6106571", "0.61060727", "0.6100152", "0.6097224", "0.60895044", "0.6085995" ]
0.0
-1
Save and new players
savePlayers() { var data = { name: this.state.name, year: this.state.year, major: this.state.major, position: this.state.position, hometown: this.state.hometown, }; PlayersDataService.create(data) .then(response => { this.setState({ id: response.data.id, name: response.data.name, year: response.data.year, major: response.data.major, position: response.data.position, hometown: response.data.hometown, submitted:true }); console.log("response", response.data); }).catch(e => { console.log(e, data); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function savePlayer() {\n window.localStorage.setItem('players',\n JSON.stringify(players));\n}", "function savePlayer()\n\t{\n\t\tlet playerNumber = $('#number').val();\n\t\tlet dataPlayer = {\n\t\t\tname : $('#name').val(),\n\t\t\tmail: $('#mail').val(),\n\t\t\tnumber: playerNumber,\n\t\t\tposition: $('#position option:selected').text()\n\t\t}\n\n\t\t/* Validando que no halla registro con el mismo numero */\n\t\tdb.orderByChild('number')\n\t\t\t.equalTo(playerNumber)\n\t\t\t.once('value', function(snapshot){\n\t\t\t\tif(snapshot.hasChildren()){\n\t\t\t\t\t$('#myModal').modal('show');\n\t\t\t\t}else{\n\t\t\t\t\t//agrego a el player en la base de datos.\n\t\t\t\t\tdb.push().set(dataPlayer, function(error){\n\t\t\t\t\t\tif(error){\n\t\t\t\t\t\t\tconsole.log(error,' fallo');\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tconsole.log(error,' exito');\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 storePlayer() {\n localStorage.setItem(\"player names\", JSON.stringify(playerName));\n localStorage.setItem(\"player scores\", JSON.stringify(hiscoreList));\n}", "function Save() \n{\n /* var savearr = [holdname, playerlvl, health, mana, gold, savecoord];\n var savedata = JSON.stringify(savearr);*/\n savedatasw = 1;\n playerinfo.playername=playername;\n playerinfo.playerlvl=playerlvl;\n playerinfo.health=health;\n playerinfo.mana=mana;\n playerinfo.gold=gold;\n playerinfo.savecoord=savecoord;\n playerinfo.savedatasw=savedatasw;\n \n fs.writeFileSync(\"save.json\", JSON.stringify(playerinfo));\n \n return;\n}", "async function savePlayer(playerObj){\n let jsonObj = {...playerObj, score:getScore(), level: getLevel()}\n return collections.players.insertOne(jsonObj)\n}", "function savePlayerData() {\n\n\tconsole.log(\"building json\");\n\n\tGameProfile = {\n\t\t\"name\" : pName,\n\t\t\"id\" : pId,\n\t\t\"total_time\" : pTtime,\n\t\t\"rank\" : pRank,\n\t\t\"difficulty\" : pDiff,\n\t\t\"game_stats\" : gameStats,\n\t\t\"calibration_arm\" : armCalibration,\n\t\t\"posture_data\" : postureData,\n\t\t\"reymenta_progress\" : reyMentaProgress,\n\t\t\"soundgrip_progress\" : soundGripProgress,\n\t\t\"treedog_progress\" : treeDogProgress,\n\t\t\"spacedog_progress\" : spaceDogProgress,\n\t\t\"rocketdog_progress\" : rocketDogProgress,\n\t\t\"featherweight_progress\" : featherWeightProg,\n\t\t\"achievements\" : CheevoNames\n\t};\n\t// /// console.log(\"UPDATED PLAYER DATA-- global: \" +\n\t// JSON.stringify(GameProfile));\n\tsaveJsonFile();\n}", "static update(player){\n localStorage.setItem('player',JSON.stringify(player));\n\n }", "function createPlayer(player) {\n fetch(\"http://localhost:3000/players\", {\n method: \"POST\",\n body: JSON.stringify(player),\n headers: {\n \"Content-Type\": \"application/json\"\n }\n }).then(res => res.json())\n .then(data => {\n currentPlayer[\"name\"] = data.name;\n currentPlayer[\"id\"] = data.id;\n currentPlayer[\"points\"] = data.points;\n })\n}", "function addPlayer(playersData) {\n $.post(\"/api/player\", playersData).then(function(createdPlayerData) {\n console.log(\"New Player\", createdPlayerData);\n renderPlayer(createdPlayerData);\n });\n }", "function saveFile() {\n\tlet item = { 'Player': Player1 };\n\tfs.writeFile('Save.json', JSON.stringify(item, null, '\\t'), (err) => {\n\t\tconsole.log(err);\n\t});\n}", "function create_Player(){\n\t\n\taddOn_db = loadDB(\"addOnDB\")\n\tvar json = JSON.parse(localStorage[\"addOnDB\"]);\n\t\n\tif(json.length == 2){\n\t\tvar num = 3;\n\t}\n\telse {\n\t\tfor(i=0;i<json.length;i++){\n\t\t\tif (json[i].id == 3) {\n\t\t\tvar num = 4;\n\t\t\t} else {\n\t\t\tvar num = 3;\n\t\t\t}\n\t\t}\n\t}\n\t\n \t//Create player array with elements\n\t\tvar newPlayer = {\n\t\t\tid: num,\n\t\t\tnumber:\"−\",\n\t\t\tname:\"\",\n\t\t\tcolor:\"\"\n\t\t}\n\t\t//add array to database\n\t\taddOn_db.push(newPlayer)\n\t\t//add player row in html\n\t\tplayers.append(create_Row(newPlayer));\n\t\t//save database\n\t\tsaveDB(\"addOnDB\", addOn_db)\n\t\t//update the players\n\t\t//updatePlayers()\n\t\tcheck_Add()\n\t}", "function save_points() {\r\n var update = {\r\n endpoint : 'actualizarPuntos',\r\n method:'POST',\r\n body :{\r\n ID_Facebook : JSON.parse(localStorage.getItem('user_information')).id,\r\n Partidas_Ganadas : $scope.player.totalWins,\r\n Partidas_Empatadas : $scope.player.totalTies,\r\n Partidas_Perdidas : $scope.player.totalLoses\r\n }\r\n };\r\n HttpRequest.player_vs_system(update,function (response) {\r\n //no va hacer nada\r\n });\r\n }", "function save() {\n\tvar save = {\n\t\t// Player attributes\n\t\texp: exp,\n\t\tlevel: level,\n\t\tbaseDamage: baseDamage,\n\t\ttotalDamageGain: totalDamageGain,\n\t\t\n\t\t// Monster attributes\n\t\thealth: health,\n\t\tcurrentHealth: currentHealth,\n\t\tcurrentMonster: currentMonster,\n\t\tmonsterLevel: monsterLevel,\n\t\t\n\t\t// Global attributes\n\t\tinventory: inventory,\n\t\tdamageBonus: damageBonus,\n\t\t\n\t};\n\tlocalStorage.setItem(\"save\",JSON.stringify(save)); \n}", "function savePlayerName(event) {\n event.preventDefault();\n var playerName = player.value.trim();\n var user = {\n name: playerName,\n score: score,\n }\n leaderboard.push(user);\n localStorage.setItem(\"leaderboard\", JSON.stringify(leaderboard));\n var target = document.querySelector('#playerName');\n while (target.firstChild) {\n target.removeChild(target.firstChild);\n }\n createLeaderboard();\n}", "function saveGame() {\n _curr.gameArray = createGameArray();\n console.log(\"current object\");\n console.log(_curr.songFile);\n\n var postParameters = {\n title: _curr.songTitle,\n artist: _curr.artistName,\n length: _curr.songLength,\n mp3File: _curr.songFile.name,\n imgFile: _curr.songImage.name,\n keyStrokes: JSON.stringify(_curr.gameArray)\n };\n\n $.post(\"/storesong\", postParameters, function(responseJSON){\n _newSongID = responseJSON;\n console.log(_newSongID);\n\n $(\"#overLayMessage\").text(\"SAVED\");\n $(\"#recordButt\").css (\"visibility\", \"hidden\");\n $(\"#restartButt\").css(\"visibility\", \"hidden\");\n $(\"#saveNowButt\").css(\"visibility\", \"hidden\");\n $(\"#restartButt2\").css(\"display\", \"none\");\n $(\"#saveButt\").css(\"display\", \"none\");\n $(\"#playButt\").css(\"display\", \"block\");\n $(\"#createButt\").css(\"display\", \"block\");\n })\n }", "function createPlayer(playerData){\n Player.create(playerData, function(err, newlyCreated){\n if(err){\n console.log(err);\n } else {\n console.log(\"Player \" +playerData.bnetID+ \" was added to the DB\");\n }\n });\n}", "entrarEnLaSala()\n {\n let playerName = $(\"#RoomIdInput\").val();\n playerName = playerName.toUpperCase();\n\n this.addPlayer(new Player(playerName));\n\n this.refreshPanel();\n\n $(\"#RoomIdInput\").val(\"\");\n $(\"#closeModal\").click();\n\n\n }", "function savePlayerName(){\n let form = document.querySelector(\"#frmcontacto\")\n //console.log(form)\n let player_name=\"\"\n player_name=form.querySelector(\"[name='txtname']\").value\n //console.log(player_name)\n document.querySelector(\"#player_name\").textContent=player_name\n document.querySelector(\".play_screen\").style.display=\"flex\"\n document.querySelector(\".modal\").style.display=\"none\"\n window.localStorage.setItem(\"nombre\",player_name)\n}", "async setPlayer(player) {\r\n\t\tconst existingPlayer = await sql.get(`SELECT ID FROM Players WHERE ID = $id`, { $id: player.id });\r\n\t\tif(existingPlayer) {\r\n\t\t\tawait sql.run(`UPDATE Players SET Username = $username, User_ID = $userId, Name = $name, Channel = $channel, Coins = $coins, Last_Active = $lastActive\r\n\t\t\t\tWHERE ID = $id`,\r\n\t\t\t\t{\r\n\t\t\t\t\t$id: player.id,\r\n\t\t\t\t\t$username: player.username, \r\n\t\t\t\t\t$userId: player.userId, \r\n\t\t\t\t\t$name: player.name, \r\n\t\t\t\t\t$channel: player.channel, \r\n\t\t\t\t\t$coins: player.coins,\r\n\t\t\t\t\t$lastActive: player.lastActive\r\n\t\t\t\t});\r\n\t\t\tfor(var i in player.config) {\r\n\t\t\t\tthis.setConfig(player.channel, player.id, i, player.config[i]);\r\n\t\t\t}\r\n\t\t\treturn player.id;\r\n\t\t} else {\r\n\t\t\tconst result = await sql.run(`INSERT INTO Players (Username, User_ID, Name, Channel, Coins, Last_Active)\r\n\t\t\t\tVALUES ($username, $userId, $name, $channel, $coins, $lastActive)`,\r\n\t\t\t\t{\r\n\t\t\t\t\t$username: player.username, \r\n\t\t\t\t\t$userId: player.userId, \r\n\t\t\t\t\t$name: player.name, \r\n\t\t\t\t\t$channel: player.channel, \r\n\t\t\t\t\t$coins: player.coins,\r\n\t\t\t\t\t$lastActive: player.lastActive\r\n\t\t\t\t});\r\n\t\t\tlet playerId = result.lastID;\r\n\t\t\tfor(var i in player.config) {\r\n\t\t\t\tthis.setConfig(player.channel, playerId, i, player.config[i]);\r\n\t\t\t}\r\n\t\t\treturn playerId;\r\n\t\t}\r\n\t}", "function save() {\nlet m = JSON.stringify(game)\nlocalStorage.setItem(\"save\",m)\n}", "function loadPlayers() {\n //console.log('IN LOAD PLAYERS');\n\n\n storedPlayers =\n JSON.parse(window.localStorage.getItem('players'));\n\n if (storedPlayers !== 0) {\n\n players = storedPlayers;\n }\n else {\n player.cheeseBricks = 100;\n player.currentCheeseBricks = 100;\n players.push(player);\n savePlayer();\n\n }\n}", "function preparePlayerInfo(newPlayer) {\n // var newPlayer = $(\".playerName-input\");\n console.log(\"theLeague II: \", theLeague);\n\n newPlayerObj = {\n playerName: newPlayer.val().trim(),\n commander: 0,\n points: 0,\n LeagueId: theLeague.id\n };\n newPlayer.val(\"\");\n addPlayer(newPlayerObj);\n }", "function saveName(){\n me.game.mainPlayerName = ChatManager.setMainPlayerName(nickNameInput.value);\n if(me.game.mainPlayerName){\n $.ajax({\n url : '/login',\n type : 'POST',\n dataType : 'json', // On désire recevoir du HTML,\n data : 'name=' + nickNameInput.value + '&password=' + passwordInput.value,\n success : function(user){ // code_html contient le HTML renvoyé\n me.game.mainPlayer = {};\n me.game.mainPlayer.user = user;\n\n me.cleanDom();\n me.game.state.start('play');\n }\n });\n\n }\n nickNameInput.value = '';\n }", "function upsertPlayer(playerData) {\n $.post(\"/api/players\", playerData)\n .then(getPlayers);\n }", "function addPlayer(player) {\n ws.send(JSON.stringify({\n type: \"addPlayer\",\n player: player\n }));\n\n view.clearPlayer();\n }", "function uploadData() {\n\t\tvar player = {\n\t\t\tname: userName, // Player's name\n\t\t\tcountry: userCountry, // Player's country\n\t\t\tflag: userCountryFlag, // URL to flag\n\t\t\ttries,\n\t\t\tlevel,\n\t\t\toverallTime,\n\t\t\toverallTries,\n\t\t};\n\n\t\t// Adding user data into database\n\t\tdb.collection(mode).add(player);\n\t}", "function saveListPlayers() {\n let savedListPlayers = \"\";\n listPlayers.forEach((player) => {\n savedListPlayers +=\n player.name +\n \",\" +\n player.ranking +\n \",\" +\n Object.values(player.darts).join() +\n \",\" +\n player.score;\n savedListPlayers += \";\";\n });\n if (savedListPlayers !== \"\") {\n localStorage.setItem(\n \"listPlayers\",\n savedListPlayers.slice(0, savedListPlayers.length - 1)\n );\n } else {\n localStorage.removeItem(\"listPlayers\");\n }\n}", "function save(){\n localStorage.setItem(\"game\",Base64.encode(JSON.stringify(game)));\n console.log(\"Game saved\");\n }", "function savingMe(){\n\tvar onfield = [];\t\t//holds the ids of on field players after change\n\tfor(var saveteamh = 0; saveteamh<=3; saveteamh++){\t\t//looping through all positions\n\t\tfor(var saveteami = 1; saveteami<=5; saveteami++){\t//from precise positions 1-5 in the formation\n\t\t\tif(document.getElementById('c2'+positions[saveteamh]+saveteami)){\t//if a player is in this position (c2gk1, ...)\n\t\t\t\t//extract the id of this player from (myteamid45, ...) and append this to onfield \n\t\t\t\tonfield.push(document.getElementById('c2'+positions[saveteamh]+saveteami).firstChild.lastChild.id.substring(8));\n\t\t\t}\n\t\t}\n\t}\n\t//ajax call to save the changes\n\t$.ajax({\n\t\turl: \"loggedin.php\",\n\t\tdata: {\n\t\t\tSAVECHANGES: onfield, CURRGW: currentgameweek, USN: usn\t//send the onfield array, current gw and username\n\t\t},\n\t\tsuccess: \n\t\tfunction(result){\n\t\t\t//alert the user about changes being saved and reload the page\n\t\t\talert('changes saved');\n\t\t\tlocation.reload();\n\t\t}\n\t});\n}", "save() {\n\t\t\tupdate(bs => {\n\t\t\t\tStorage.local.put('commander', bs);\n\t\t\t\treturn bs;\n\t\t\t});\n\t\t}", "function saveGame () {\n console.log('PROTOCOL saveGame()', vm.game);\n gameService.push(vm.game)\n .then(handlePrompt.bind(this, 'push'))\n .then(restoreDefaults);\n }", "static createPlayer() {\n let newPlayerForm = document.getElementById('new-player-form')\n newPlayerForm.addEventListener('submit', function (e){\n e.preventDefault();\n fetch('http://localhost:3000/api/v1/players', {\n method: 'POST',\n headers: {\n 'Content-Type' : 'application/json',\n 'Accept' : 'application/json'\n },\n body: JSON.stringify({\n player: {\n name: e.target.children[1].value,\n city: e.target.children[3].value,\n state: e.target.children[5].value\n }\n })\n })\n .then(res => {\n if (!res.ok) {\n throw new Error();\n }\n return res.json();\n })\n .then (player => {\n let newPlayer = new Player(player)\n console.log(player)\n newPlayer.displayPlayer();\n })\n .catch(error => {\n console.error('Player class Error' , error)\n })\n })\n }", "function onNewPlayer (data) {\n \n}", "function saveGame() {\n\n}", "function Save() {\n win.name = JSON.stringify(store);\n }", "function saveGame() {\n if (store.getState().lastAction == 'GAME_SAVE' && store.getState().currentPage == 'LOAD_SAVED') {\n localStorage.setItem('kr_xp_save', JSON.stringify(store.getState().savedData));\n savedData = JSON.parse(localStorage.getItem('kr_xp_save'));\n loadGameStateChangeStarter();\n setTimeout(function(){\n loadSavedMenuGameslotDisplayHandler();\n }, 600);\n }\n }", "function addPlayer() {\n \t\tvar p = $(\"#add\").val();\n \t\tif (p) {\n \t\t\tmodel.addPlayer(p);\n \t\t} else {\n \t\t\talert(\"The player field is required\");\n \t\t}\n \t}", "function updatePlayers(){\n \n database.ref().set({\n players: {\n player1, \n player2,\n gameOver},\n \n });\n }", "function getSaveState() {\n return new Player(\"Bede\", DEFAULT_LOCATION, DEFAULT_MONEY, DEFAULT_HINTS);\n}", "function onNewPlayer (data) {\n // Create a new player\n var newPlayer = new Client(data.name);\n newPlayer.id = this.id;\n newPlayer.setPercentage(0);\n\n var tempSessions = SearchServices.getSessions();\n // Send existing clients to the new player\n for (var i = 0; i < tempSessions.length; i++) {\n this.emit(\"new session\", {name: tempSessions[i].name, playerCount: tempSessions[i].players.length, state: tempSessions[i].getState()});\n }\n\n // Send details\n this.emit(\"connect details\", {id: newPlayer.id});\n\n // Add new player to the clients array\n SearchServices.addClient(newPlayer);\n}", "function save() {\n localStorage.setItem(\"user\", JSON.stringify(user));\n localStorage.setItem(\"score\", JSON.stringify(score));\n}", "function saveGame() {\n var file = {\n update: gameData.update,\n beer: gameData.beer,\n beerPerClick: gameData.beerPerClick,\n beerPerClickCost: gameData.beerPerClickCost,\n grain: gameData.grain,\n money: gameData.money,\n moneyPerBeer: gameData.moneyPerBeer,\n grainCapacity: gameData.grainCapacity,\n grainCost: gameData.grainCost,\n grainPerMin: gameData.grainPerMin\n };\n\n localStorage.setItem('saveFile', JSON.stringify(file));\n}", "function addPlayer() {\n console.log('add');\n\n // Ask the player for a name\n var playerName = prompt('Choose a Username', '');\n\n // Add the player's name to the players window\n $('#player-window').append('<p>' + playerName + '</p>');\n\n // Add the player to the correct object\n if (playersAll.length === 0) {\n playerOne.name = playerName;\n playersAll.push(playerOne);\n } else if (playersAll.length === 1) {\n playerTwo.name = playerName;\n playersAll.push(playerTwo);\n } else if (playersAll.length >= 2) {\n playersWaiting.push(playerName);\n }\n\n console.log(playersAll);\n\n database.ref().set({\n players: playersAll\n });\n\n checkPlayers();\n}", "_updatePlayerList (players) {\n // add all new players, including host, to playersData\n Object.keys(players).forEach(playerId => {\n if (!this.playersData[playerId]) {\n players[playerId].name = playerId;\n players[playerId].color = this.playerColorCodes.shift();\n\n let playerDetails = new Player(players[playerId]);\n this.playersData[playerId] = playerDetails;\n\n this.uiService.updatePlayerList(playerDetails);\n }\n });\n }", "function addPlayer(player) {\n ws.send(JSON.stringify({\n action: \"addPlayer\",\n player: player\n }));\n\n view.clearPlayer();\n }", "function storeNewEntrySucceeded() {\r\n topPlayers[newPosition - 1] = new TopPlayer(newName, \r\n\t\t\tnewRotations.length);\r\n render();\r\n }", "addPlayer(no,firstName,lastName,pos,bat,thw,age,ht,wt,birthplace) {\n let player = {\n No: no,\n firstName: firstName,\n lastName: lastName,\n POS: pos,\n BAT: bat,\n THW: thw,\n AGE: age,\n HT: ht,\n WT: wt,\n birthPlace: birthplace\n };\n //add the each of new player in the list.\n this._players.push(player);\n }", "save() {}", "function saveGame() {\n localStorage.setItem('battleshipGameInstance', JSON.stringify(game));\n}", "function onNewPlayer (data) {\n\n var newPlayer;\n // Create a new player\n if(playerById(this.id)){\n newPlayer = playerById(this.id);\n } else {\n newPlayer = new Player(this.id)\n }\n\n if(pcByPlayerName(data.name) == false){\n //newPlayer.PC = pcByPlayerName('TEMPDEFAULT');\n //console.log('USING TEMPDEFAULT USER ' + newPlayer.PC.name);\n console.log('USER ' + this.id + ' NEEDS TO CREATE NEW CHARACTER');\n\n socket.to(this.id).emit('create new character', {id: newPlayer.id});\n return;\n } else {\n //newPlayer.PC = pcByPlayerName(data.name);\n //players.push(newPlayer)\n //newPlayer.PC = pcByPlayerName(data.name);\n socket.to(this.id).emit('start mud', {id: this.id}); //Goes to onPlayerStarted\n\n }\nreturn;\n}", "async saveGameData() {\n // Download preview image\n if (this._info.previewSource) {\n const imageName = await this._downloadGamePreview(\n this._info.name,\n this._info.previewSource\n );\n if (imageName) this._info.previewSource = imageName;\n }\n\n // Save the serialized JSON\n window.IO.write(await this._getDataJSONPath(), JSON.stringify(this._info));\n }", "function save(){\n Cookies.set(\"save-data\",JSON.stringify(gameData),{expires: 3650});\n notify(\"Game saved\");\n}", "function saveData(readyPlayers, boardId, readyPlayersSent, boards){\r\n\t\tlet readyPlayersJson = {playersReady: readyPlayers};\r\n\t\tlet result = \"\";\r\n\t\tresult += JSON.stringify(readyPlayersJson) + \"\\n\";\r\n\t\tresult += boardId + \"\\n\";\r\n\t\tresult += readyPlayersSent + \"\\n\";\r\n\t\tfor (let j = 0; j < boards.length; j++){\r\n\t\t\t\tresult += boards[j] + \"\\n\";\r\n\t\t}\r\n\t\tfs.writeFileSync(\"boards.txt\", result);\r\n\t}", "function onNewPlayer (data) {\n var newPlayer = new Player(data.x, data.y, data.name) // Create a new player\n newPlayer.id = this.id\n\n // Broadcast new player to connected socket clients\n this.broadcast.emit('new player', {id: newPlayer.id, x: newPlayer.getX(), y: newPlayer.getY(), name: newPlayer.getName()})\n\n // Send existing players to the new player\n var i, existingPlayer\n for (i = 0; i < players.length; i++) {\n existingPlayer = players[i]\n var playerData = {\n id: existingPlayer.id,\n x: existingPlayer.getX(), \n y: existingPlayer.getY(), \n direction: existingPlayer.getDir(),\n name: existingPlayer.getName(),\n health: existingPlayer.getHealth()\n }\n this.emit('new player', playerData)\n }\n players.push(newPlayer) // Add new player to the players array\n}", "function setPlayerStorage() {\r\n sessionStorage.setItem(\"players\", JSON.stringify(players));\r\n}", "function saveSomeData() {\n localStorage.setItem(\"name\", $('#stringPlayerName').val());\n //localStorage.setItem()\n}", "function saveGameLocal() {\n uncheckAllButtons();\n let dt = new Date();\n dt.getDate();\n let text = parseSaveFile();\n let filename = 'skateboarding_'+(dt.getFullYear() + 1).toString()+'_'+\n (dt.getMonth() + 1).toString()+'_'+(dt.getDate() + 1).toString()+'.txt';\n\n let pom = document.createElement('a');\n pom.setAttribute('href', 'data:text/plain;charset=utf-8,' +\n encodeURIComponent(text));\n pom.setAttribute('download', filename);\n if (document.createEvent) {\n let event = document.createEvent('MouseEvents');\n event.initEvent('click', true, true);\n pom.dispatchEvent(event);\n } else {\n pom.click();\n }\n}", "function saveGame() {\r\n\tlocalStorage.setItem(\"Bread\", bread);\r\n\tlocalStorage.setItem(\"Eggs\", eggs);\r\n\tlocalStorage.setItem(\"Gold\", gold);\r\n\tlocalStorage.setItem(\"Demand\", demand);\r\n\tlocalStorage.setItem(\"Inflation\", inflation);\r\n\tlocalStorage.setItem(\"Clicks\", clicks);\r\n\tlocalStorage.setItem('CritRate', critRate);\r\n\tlocalStorage.setItem('Multiple_Combos', multipleCombos);\r\n\tlocalStorage.setItem(\"Birds\", birds);\r\n\tlocalStorage.setItem(\"Machines\", machines);\r\n}", "function saveAutoUpgrades() {\n //save to local storage\n window.localStorage.setItem('player.autoInventory', JSON.stringify(player.autoInventory));\n\n}", "save() {\n\t\tlet dir = `./polls/${this.server}`;\n\t\tif (!fs.existsSync(dir)) fs.mkdirSync(dir);\n\t\tfs.writeFile(`${dir}/${this.number}.json`, JSON.stringify(this), function(err) {\n\t\t\tif (err) {\n\t\t\t\tconsole.log(err);\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t});\n\t}", "save_inventory()\n\t{\n\t\tvar Player = this;\n\t\t\n\t\t$( \"#inventory > li\" ).each(function( index ) {\n\t\t\tlet name = \"\";\n\t\t\tlet desc = \"\";\n\t\t\tlet nb = \"\";\n\n\t\t\tname = $(this).find(\"#name_item\").text();\n\t\t\tdesc = $(this).find(\"#desc_item\").text();\n\t\t\tnb = $(this).find(\"#nb_item\").val();\n\t\t\tif (nb == \"\" ||nb == null)\n\t\t\t\tnb = 0;\n\t\t\tPlayer.inventory[name].desc = desc;\n\t\t\tPlayer.inventory[name].nb = nb;\n\t\t});\n\t}", "function onNewPlayer (data) {\n // Create a new player\n var newPlayer = new Player(data.x, data.y, data.angle, data.ver, data.health, data.team, data.username)\n console.log('New player ' + newPlayer.id + ' uses: ' + newPlayer.getVer())\n\n // Broadcast new player to connected socket clients\n this.broadcast.emit('new player', {id: newPlayer.id, x: newPlayer.getX(), y: newPlayer.getY(), angle: newPlayer.getAngle(), ver: newPlayer.getVer(), health: newPlayer.getHealth(), team: newPlayer.getTeam(), username: newPlayer.getUsername()})\n\n // Send existing players to the new player\n var i, existingPlayer\n for (i = 0; i < players.length; i++) {\n existingPlayer = players[i]\n this.emit('new player', {id: existingPlayer.id, x: existingPlayer.getX(), y: existingPlayer.getY(), angle: existingPlayer.getAngle(), ver: existingPlayer.getVer(), health: existingPlayer.getHealth(), team: existingPlayer.getTeam(), num_of_players: num_of_players, username: existingPlayer.getUsername()})\n console.log('Existing player ' + existingPlayer.id + ' uses: ' + existingPlayer.getVer())\n }\n \n // Add new player to the players array\n players.push(newPlayer)\n}", "function addNewPlayer() {\n addPlayerText = document.getElementById(\"add-player-text\");\n listPlayers.push(new Player(addPlayerText.value, 0));\n addPlayerText.value = \"\";\n comput_ranking();\n rebuilt_list_player();\n saveListPlayers();\n buildPlayerPanel();\n alert(-1);\n}", "function saveFile() {\n // console.log(playList);\n var data = JSON.stringify(playlist);\n\n // console.log(\"The data being weritting is\" + data);\n console.log(\"The data being weritting!\" );\n\n //Write data to a file\n fs.writeFile('schedule/playList.json', data, function (err) {\n if (err) {\n console.log(err.message);\n return;\n }\n console.log('Saved the new playList profile.');\n });\n}", "save() {\n localStorage.setItem(\"game\", JSON.stringify(state))\n }", "recordToLocalStorage(playerName, time, difficulty, rank) {\n localStorage.setItem(\n `${difficulty}_${rank}`,\n JSON.stringify({\n playerName: `${playerName}`,\n time: `${time}`,\n })\n );\n }", "function _saveLocalRecord() {\n\n // get all vars (don't worry if they've been changed).\n var columnList = [];\n columnList.push({ column: \"playername\", value: firstname });\n columnList.push({ column: \"coachname\", value: coachname });\n columnList.push({ column: \"clubname\", value: clubname });\n columnList.push({ column: \"path\", value: path });\n columnList.push({ column: \"thumbnail\", value: thumbnail });\n columnList.push({ column: \"shottype\", value: viewModel.get(\"shotTypeIndex\") });\n columnList.push({ column: \"ratingtype\", value: viewModel.get(\"ratingTypeIndex\") });\n columnList.push({ column: \"playerid\", value: playerId });\n columnList.push({ column: \"coachid\", value: coachId });\n columnList.push({ column: \"clubid\", value: clubId });\n var dateCheck = viewModel.get(\"date\");\n var timeCheck = viewModel.get(\"time\");\n columnList.push({ column: \"date\", value: new Date(dateCheck + \" \" + timeCheck) });\n \n // build query. Add each item to the query procedurally\n var query = \"INSERT INTO \" + LocalSave._tableName + \" (\";\n var first = true;\n for (var i = 0; i < columnList.length; i++) {\n var item = columnList[i];\n if (!first) {\n query += \", \";\n }\n query += item.column;\n first = false;\n }\n query += \") VALUES (\";\n first = true;\n var valList = [];\n for (var i = 0; i < columnList.length; i++) {\n var item = columnList[i];\n if (!first) {\n query += \", \";\n }\n query += \"?\";\n first = false;\n valList.push(item.value);\n }\n query += \");\";\n\n // run query.\n var complete = new Promise(function (resolve, reject) {\n db.queryExec(query, valList,\n function (id) {\n console.log(\"Saved new shot with id \" + id);\n resolve(id);\n },\n function (err) {\n reject(err);\n });\n });\n\n // handle query after it has completed\n complete.then(\n function (val) {\n if (page.android) {\n var Toast = android.widget.Toast;\n Toast.makeText(application.android.context, \"New Shot Saved\", Toast.LENGTH_SHORT).show();\n }\n // leave page\n var navigationOptions = {\n moduleName: \"record-shot-page\",\n backstackVisible: false\n };\n frameModule.topmost().navigate(navigationOptions);\n },\n function (err) {\n _unlockFunctionality();\n });\n}", "function gameOver() {\n $(\"#modalEnd\").modal(\"show\");\n \n // end rendering ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ find better solution\n delete player.sprite\n \n $(\".modal-title\").text(\"Game Over\");\n\n let gameOverText = document.createElement(\"div\");\n gameOverText.setAttribute(\"id\", \"gameOverText\");\n gameOverText.textContent = `Congratulations! You scored ${points} points!`;\n $(\"#endMessage\").append(gameOverText);\n\n let playerNameText = document.createElement(\"label\");\n playerNameText.setAttribute(\"id\", \"playerNameText\");\n playerNameText.textContent = \"To see whether you made the top 5, enter your name here: \";\n $(\"#endMessage\").append(playerNameText);\n\n let playerName = document.createElement(\"input\");\n playerName.setAttribute(\"type\", \"text\");\n playerName.setAttribute(\"placeholder\", \" Your player name\");\n playerName.setAttribute(\"id\", \"playerName\");\n playerName.setAttribute(\"maxlength\", \"12\");\n $(\"#endMessage\").append(playerName);\n\n let playerNameButton = document.createElement(\"button\");\n playerNameButton.setAttribute(\"id\", \"playerNameButton\");\n playerNameButton.setAttribute(\"type\", \"submit\");\n playerNameButton.setAttribute(\"class\", \"btn btn-secondary\");\n playerNameButton.textContent = \"OK\";\n $(\"#endMessage\").append(playerNameButton);\n\n let newGameButton = document.createElement(\"button\");\n newGameButton.setAttribute(\"id\", \"newGameButton\");\n newGameButton.setAttribute(\"type\", \"button\");\n newGameButton.setAttribute(\"class\", \"btn btn-danger\");\n newGameButton.textContent = \"New Game\";\n $(\"#modalEnd .modal-footer\").append(newGameButton);\n\n $(\"#newGameButton\").one(\"click\", function() {\n console.log(\"persil\");\n player.newGame();\n });\n\n // when clicked, save modal input and player data in local storage \n $(\"#playerNameButton\").one(\"click\", function() { \n const newEntry = {\n name: playerName.value,\n score: points\n }\n\n //get leaderboard from local storage\n leaderboard = JSON.parse(localStorage.getItem(\"leaderboard\"));\n // add result to leaderboard\n if (leaderboard === null) {\n leaderboard = [];\n leaderboard.push(newEntry);\n } \n else {\n leaderboard.push(newEntry)\n }\n // sort leaderboard entries\n leaderboard.sort(function (a, b) {\n if (a.score < b.score) {\n return 1;\n }\n else {\n return -1\n }\n });\n // cut off excess leaderboard entries \n if (leaderboard.length > 5) {\n leaderboard.pop();\n }\n \n // save updated top 5 to localstorage \n localStorage.setItem(\"leaderboard\", JSON.stringify(leaderboard));\n \n // build leaderboard structure\n $(\"#playerName\").val(\"\");\n $(\".modal-title\").text(\"Leaderboard\");\n $(\"#endMessage\").html(\"<table><tr><td><b>Name</b></td><td><b>Score</b></td></tr></table>\");\n\n // fill leaderboard with entries\n for (i = 0; i < leaderboard.length; i++) {\n if (leaderboard[i].name == \"\") {\n const newRow = $(\"<tr><td>-</td><td>\" + leaderboard[i].score + \"</td></tr>\");\n $(\"#endMessage table\").append(newRow);\n }\n else {\n const newRow = $(\"<tr><td>\" + leaderboard[i].name + \"</td><td>\" + leaderboard[i].score + \"</td></tr>\");\n $(\"#endMessage table\").append(newRow);\n }\n }\n })\n}", "function saveHighscore() {\n var name = document.getElementById(\"user-name\").value;\n console.log(\"new player name: \"+name);\n var Name = JSON.parse(localStorage.getItem(\"Name\"));\n var Score = JSON.parse(localStorage.getItem(\"Score\"))\n console.log(\"stored player names: \"+Name);\n console.log(\"stored player scores: \"+Score);\n if(Name !== null){\n playerName = Name;\n }\n if(Score !== null){\n playerScore = Score;\n }\n \n playerName.push(name);\n console.log(\"latest player names: \"+playerName);\n playerScore.push(score);\n console.log(\"latest player scores: \"+playerScore);\n localStorage.setItem(\"Name\",JSON.stringify(playerName));\n localStorage.setItem(\"Score\",JSON.stringify(playerScore));\n\n\n\n location.replace(\"highscores.html\");\n \n /*\n @TODO: write your function code here\n */\n \n}", "function setLocalStorage(){\r\n var playerSetter = JSON.stringify(allPlayers);\r\n localStorage.setItem('players', playerSetter);\r\n}", "gameEndProtocol() {\n this.saveToDatabase();\n this.updatePlayerStats();\n }", "function choosePlayerCreateNewClickHandler( e ) {\n\tif( currentGameScreen != gameScreens.choosePlayer ) return;\n\tnewPlayerBeingCreated = true;\n\tswitchToScreen( gameScreens.editPlayer );\n\t}", "function setPlayer(name) {\n window.localStorage.setItem('currentPlayer', name);\n renderPlayer();\n }", "create(req, res) {\n Player.create(req.body)\n .then(Player => res.json(Player))\n .catch(err => res.status(400).json(err));\n }", "addPlayer (id, name, home) {\n // create entry for player in 'this._players' list\n this._players[id] = new Player(name, home)\n console.log('new player added ---')\n console.log(this._players[id])\n\n this.updateTurns(id, home)\n }", "function storePlayers(JSONText)\n{\n\tvar players = [];\n\t//only store data when defined\n\tif (typeof(JSONText) != 'undefined')\n\t{\n\t\tplayers = JSON.parse(JSONText);\n\t\tplayer1.model = players[0];\n\t\tplayer2.model = players[1];\n\t\t//print recived players name for debugging purposes\n\t\tlog(['storePlayers','player1.model.name'],player1.model.name);\n\t\tlog(['storePlayers','player1.model.name'],player1.model.name);\n\t}\n\telse\n\t\talert('Could not store player data : undefined');\n}", "saveTrackForNextTime() {\n\t\tif (PlayerUi.hasFailed()) {\n\t\t\treturn;\n\t\t}\n\n\t\tlocalStorage.setItem(this.lastTrack.title, `${this.currentTrack}`);\n\t\tlocalStorage.setItem(this.lastTrack.playTime, `${timeToSeconds(PlayerUi.getCurrentTime())}`);\n\t}", "function addToLocalStorage(data) {\n let new_pokemon = {};\n new_pokemon.id = data.id;\n new_pokemon.sprite = data.sprite;\n new_pokemon.types = data.types;\n\n let team = []\n team = JSON.parse(localStorage.getItem(\"team\")) || []\n team.push(new_pokemon)\n localStorage.setItem(\"team\", JSON.stringify(team))\n $(\"#save-team\").show()\n}", "function onNewPlayer(data)\n{\n playerList = data;\n\n console.log(data[0].id);\n \n for (i = 0; i < playerList.length; i++)\n {\n var existingPlayer = new Player(playerList[i].id, playerList[i].username, playerList[i].chips, playerList[i].index);\n if (existingPlayer.getUsername() != \"INVALID_USER\")\n {\n if (existingPlayer.getUsername() == currentPlayer.getUsername())\n {\n currentPlayer = existingPlayer;\n playerAmount(currentPlayer.getUsername(), currentPlayer.getChips());\n console.log(\"Found the current player. His username is \" + currentPlayer.getUsername() + \" and his tableIndex is \" + currentPlayer.getTableIndex());\n }\n currentPlayers[existingPlayer.getTableIndex()] = existingPlayer;\n }\n }\n\n console.log(currentPlayers);\n\n var localIndex;\n \n localIndex = currentPlayer.getTableIndex();\n console.log(\"The player tableIndex is: \" + currentPlayer.getTableIndex());\n var nextPlayerIndex;\n var nextPlayerIterator = 0;\n\n for (i = 0; i< maxPlayers - 1; i++)\n {\n\t// Increase the Iterator by one to indicate the next Player\n nextPlayerIterator++;\n\t// modulo with the current length of players\n nextPlayerIndex = (localIndex + nextPlayerIterator) % currentPlayers.length;\n\tconsole.log(\"The nextPlayerIndex is: \" + nextPlayerIndex);\n //console.log(currentPlayers)\n //console.log(currentPlayers[nextPlayerIndex].getUsername() != \"INVALID_USER\");\n if (currentPlayers[nextPlayerIndex].getUsername() != \"INVALID_USER\")\n {\n console.log(\"got thru\" + nextPlayerIndex + \" fdsfds\" + i);\n drawPlayerAt(nextPlayerIndex, i);\n }\n }\n \n numPlayers++;\n}", "function initial(){\n\n\tvar newPlayer1 = {\n\t\tid: 1,\n\t\tnumber:\"1\",\n\t\tname:\"\",\n\t\tcolor:\"\"\n\t}\n\t\n\tvar newPlayer2 = {\n\t\tid: 2,\n\t\tnumber:\"2\",\n\t\tname:\"\",\n\t\tcolor:\"\"\n\t}\n\t\n\taddOn_db.push(newPlayer1)\n\taddOn_db.push(newPlayer2)\n\tplayers.append(create_Row(newPlayer1));\n\tplayers.append(create_Row(newPlayer2));\n\tsaveDB(\"addOnDB\", addOn_db)\n\t//updatePlayers()\n\n\t\n}", "function setData() {\n\n if (localStorage.length != 0) {\n loadData();\n document.getElementById('name').value = playerData.name;\n document.getElementById('l1').innerHTML = playerData.live;\n }\n if (playerData.close == \"true\") {\n document.getElementById('name').value = playerData.name;\n gewLevel = playerData.diff;\n document.getElementById('level').innerHTML = playerData.level;\n document.getElementById('l1').innerHTML = playerData.live;\n document.getElementById('score').innerHTML = playerData.highscore;\n gewModus = playerData.design;\n document.getElementById('a1').innerHTML = playerData.alien1;\n document.getElementById('a2').innerHTML = playerData.alien2;\n document.getElementById('a3').innerHTML = playerData.alien3;\n document.getElementById('a4').innerHTML = playerData.alien4;\n document.getElementById('a5').innerHTML = playerData.alien5;\n }\n }", "async addPlayer( gameId, { name, dateOfBirth, height, isProfessional } ) {\n return new Promise((resolve, reject) => {\n \t this.find({id: gameId}).then(game => {\n \t\t new PlayerAPI({store: this.store}).add( { name, dateOfBirth, height, isProfessional } ).then(player => {\n \t\t\t game.setPlayer(player).then(() => {\n\t\t\t\t resolve( game );\n\t\t\t })\n\t\t\t })\n\t })\n });\t \t \n }", "function setProfilePlayerDataFromValues(){\n \tgameData.data.player.profile.name = $(\"#name\").val();\n \tgameData.data.player.profile.surname = $(\"#surname\").val();\n \tgameData.data.player.profile.sex = $(\"#sex\").val();\n \tgameData.data.player.profile.age = $(\"#age\").val(); \n \tgameData.data.player.profile.mobile = $(\"#mobile\").val();\n \tgameData.data.synch.profile = CORE.getCurrentTime();\n \tgameData.saveLocal();\n \t\n \tgameData.pushProfile();\n \tCORE.LOG.addInfo(\"PROFILE_PAGE:setProfilePlayerDataFromValues\");\n }", "addPlayer(firstName, lastName, age) {\n let player = {\n firstName: firstName,\n lastName: lastName,\n age: age\n }\n this.players.push(player);\n }", "static getPlayer(){\n //instantiates the player object\n let player;\n if(localStorage.getItem('player')===null){\n player={\n name:'NEW PLAYER',\n wins:0,\n losses:0,\n ties:0,\n piece:'',\n opponent:'',\n status:false\n }\n }\n else{\n player=JSON.parse(localStorage.getItem('player'));\n }\n return player;\n }", "function addPlayer() {\n players.push({\n name: $(\"#nameInput\").val(),\n balance: START_BALANCE\n });\n userEntry.dialog(\"close\");\n updatePlayerTable();\n}", "function createGames(){\n var Game = Parse.Object.extend(\"Games\");\n var gameFront = new game;\n\n gameFront.nome = jQuery(\"#valNG\").val();\n gameFront.valor = jQuery(\"#valVL\").val();\n gameFront.faixaEtaria = jQuery(\"#valFE\").val();\n\n var gameSend = setObjectBase(new Game(), gameFront);\n\n gameSend.save(null, {\n success: function(gameScore) {\n console.log(\"Create executado com sucesso.\");\n jQuery(\"#valNG\").val(\"\");\n jQuery(\"#valVL\").val(\"\");\n jQuery(\"#valFE\").val(\"\");\n readGames();\n },\n error: function(gameScore, error) {\n console.log(\"Create falhou. Erro: \"+ error.message);\n }\n });\n}", "function saveGameClient() {\n // The global variable gameState is updated with a new object\n // representing the state of play (ie the values of the set of\n // global variables representing the state of play) after every\n // corrent guess. It is also updated with saving to the cloud.\n gameState = {\n gameAnswers,\n gamePangrams,\n maxScore,\n gameLevels,\n outerLetters,\n centerLetter,\n answerList,\n gameScore,\n gameRank,\n gameWeekday,\n gameDate,\n timestamp: Date.now(),\n };\n localStorage.gameState = JSON.stringify(gameState);\n}", "addNewPlayer(playerName) {\n if (!this.started) {\n let newPlayer = new Player(playerName, this);\n this.players[newPlayer.id] = newPlayer;\n this.emit('userchange');\n return newPlayer;\n }\n }", "function saveData() {\n\tlet data = new gameData();\n\tfs.writeFile(DATA_FILENAME, JSON.stringify(data), function(err) {\n\t if(err) {\n\t return console.log(err);\n\t }\n\t});\n}", "function save(success, error){\r\n\r\n gameLoader.save(savedGameFile).then(function(message){ \r\n // Save success\r\n if(success) success();\r\n // console.log(message); \r\n }, function(err){\r\n if(error) error();\r\n // Save failure\r\n console.log(err)\r\n });\r\n}", "function saveRank(){\n let name = currentPlayer[0];\n let getTime = timer.innerText;\n let getMove = move.innerText;\n\n if(name !== \"\" && getTime !==\"\")\n {\n let ranks = getData();\n let rankList = new saveToLocal(name,getTime,getMove);\n ranks.push(rankList);\n localStorage.setItem(\"ranks\", JSON.stringify(ranks));\n \n }\n}", "function save() {\n localStorage.setItem(\"toys\", toys);\n localStorage.setItem(\"click\", mClickUpgrade.amount);\n localStorage.setItem(\"autoClicker\", mAutoClicker.amount);\n localStorage.setItem(\"multiplier\", mMultiplier.amount);\n localStorage.setItem(\"toyShop\", mToyShop.amount);\n localStorage.setItem(\"toyFactory\", mToyFactory.amount);\n localStorage.setItem(\"hiddenToyLayer\", mHiddenToyLayer.amount);\n}", "function addPlayer(self, playerInfo) {\n console.log('localPlayerInfo at addPlayer Function = ', localPlayerInfo);\n console.log(\n playerInfo.playerId, 'Has entered the Character Creation screen with the following default values: ', '\\n',\n 'Set head Sprite to: ', playerInfo.head.sprite, '\\n',\n 'Set head Color to: ', playerInfo.head.color, '\\n',\n 'Set head Secondary Sprite to: ', playerInfo.head.secondarySprite, '\\n',\n 'Set head Secondary Color to: ', playerInfo.head.secondaryColor, '\\n',\n 'Set head Accent Sprite to: ', playerInfo.head.accentSprite, '\\n',\n 'Set head Accent Color to: ', playerInfo.head.accentColor, '\\n',\n 'Set body Sprite to: ', playerInfo.body.sprite, '\\n',\n 'Set body Color to: ', playerInfo.body.color, '\\n',\n 'Set body Secondary Sprite to: ', playerInfo.body.secondarySprite, '\\n',\n 'Set body Secondary Color to: ', playerInfo.body.secondaryColor, '\\n',\n 'Set body Accent Sprite to: ', playerInfo.body.accentSprite, '\\n',\n 'Set body Accent Color to: ', playerInfo.body.accentColor, '\\n',\n 'Set tail Sprite to: ', playerInfo.tail.sprite, '\\n',\n 'Set tail Color to: ', playerInfo.tail.color, '\\n',\n 'Set tail Secondary Sprite to: ', playerInfo.tail.secondarySprite, '\\n',\n 'Set tail Secondary Color to: ', playerInfo.tail.secondaryColor, '\\n',\n 'Set tail Accent Sprite to: ', playerInfo.tail.accentSprite, '\\n',\n 'Set tail Accent Color to: ', playerInfo.tail.accentColor, '\\n',\n 'Set hair Sprite to: ', playerInfo.hair.sprite, '\\n',\n 'Set hair Color to: ', playerInfo.hair.color, '\\n',\n 'Set ear Sprite to: ', playerInfo.ear.sprite, '\\n',\n 'Set ear Color to: ', playerInfo.ear.color, '\\n',\n 'Set outer eyes sprite to:', playerInfo.eyes.outer, '\\n',\n 'Set irises to:', playerInfo.eyes.iris, '\\n',\n 'Set eye color to:', playerInfo.eyes.color, '\\n',\n 'Set genitles to:', playerInfo.genitles.sprite\n );\n\n //self.container = self.add.container(0, 0).setSize(109, 220).setInteractive();\n self.container = self.add.container(playerInfo.x, playerInfo.y).setSize(109, 220).setInteractive();\n\n self.head = self.physics.add.sprite(0, 0, playerInfo.head.sprite).setInteractive();\n self.head.setTint(playerInfo.head.color);\n self.secondaryHead = self.physics.add.sprite(0, 0, playerInfo.head.secondarySprite).setInteractive();\n self.secondaryHead.setTint(playerInfo.head.secondaryColor);\n self.accentHead = self.physics.add.sprite(0, 0, playerInfo.head.accentSprite).setInteractive();\n self.accentHead.setTint(playerInfo.head.accentColor);\n\n self.body = self.physics.add.sprite(0, 0, playerInfo.body.sprite).setInteractive();\n self.body.setTint(playerInfo.body.color);\n self.secondaryBody = self.physics.add.sprite(0, 0, playerInfo.body.secondarySprite).setInteractive();\n self.secondaryBody.setTint(playerInfo.body.secondaryColor);\n self.accentBody = self.physics.add.sprite(0, 0, playerInfo.body.accentSprite).setInteractive();\n self.accentBody.setTint(playerInfo.body.accentColor);\n\n self.tail = self.physics.add.sprite(0, 0, playerInfo.tail.sprite).setInteractive();\n self.tail.setTint(playerInfo.tail.color);\n self.secondaryTail = self.physics.add.sprite(0, 0, playerInfo.tail.secondarySprite).setInteractive();\n self.secondaryTail.setTint(playerInfo.tail.secondaryColor);\n self.accentTail = self.physics.add.sprite(0, 0, playerInfo.tail.accentSprite).setInteractive();\n self.accentTail.setTint(playerInfo.tail.accentColor);\n\n self.hair = self.physics.add.sprite(0, 0, playerInfo.hair.sprite).setInteractive();\n self.hair.setTint(playerInfo.hair.color);\n\n self.ear = self.physics.add.sprite(0, 0, playerInfo.ear.sprite).setInteractive();\n self.ear.setTint(playerInfo.ear.color);\n\n self.eyes = self.physics.add.sprite(0, 0, playerInfo.eyes.outer).setInteractive();\n self.iris = self.physics.add.sprite(0, 0, playerInfo.eyes.iris).setInteractive();\n self.iris.setTint(playerInfo.eyes.color);\n\n self.genitles = self.physics.add.sprite(0, 0, playerInfo.genitles.sprite).setInteractive();\n //self.genitles.setTint(playerInfo.genitles.color);\n\n\n self.container.add([\n self.tail,\n self.secondaryTail,\n self.accentTail,\n self.head,\n self.ear,\n self.secondaryHead,\n self.accentHead,\n self.eyes,\n self.iris,\n self.hair,\n self.body,\n self.secondaryBody,\n self.accentBody,\n self.genitles\n ]);\n self.container.sendToBack(self.tail);\n\n //self.container.visible = false;\n //localPlayerInfo.sprite = self.stack\n\n let cam1 = self.cameras.main.setSize(920, 920).startFollow(self.container).setName('Camera 1');\n\n self.container.setSize(8, 8);\n //self.container.setOffset(11, 40);\n //self.container.setCollideWorldBounds(false);\n\n document.getElementById('phaserApp').focus();\n\n self.body.on('pointerdown', function (pointer) {\n if (pointer.rightButtonDown()) {\n clicked = playerInfo;\n } else {\n console.log('sprite was Left clicked');\n }\n });\n\n avatarSelected = true;\n }", "function finish(savePath, ownedGames) {\n var i;\n for (i = 0; i < gameInfo.length; i++) {\n delete gameInfo[i].path;\n }\n\n //add games pulled from steam that have not been found to the object\n for (i in ownedGames) {\n if (ownedGames.hasOwnProperty(i)) {\n var game = ownedGames[i].replace(/[|&;:\\\\/$%@\"<>()+,]/g, \"\");\n if (!gameInfo[game.toLowerCase()]) {\n gameInfo[game.toLowerCase()] = {\n \"name\": game,\n \"date\": null,\n \"notes\": null\n };\n }\n }\n }\n\n fs.writeFile(savePath + \"/backedUpGames.json\", JSON.stringify(gameInfo, null, 2), (err) => {\n if (err) {\n throw err;\n }\n\n console.log(\"Wrote game JSON!\");\n });\n}", "addNewPlayer(name, id) {\n this.players.push(new Player(id, name));\n }", "activatePlayer(request, response) {\n // console.log('in the create method ..................................................................' )\n Game.activePlayers.add(request.body)\n .then(player => response.json(player))\n .catch(error => response.json(error));\n }", "function saveAction(){\n\t\tvar data = getInput();\n\t\tif(data.id == \"\") {\n\t\t\t// delete the id property as it's\n\t\t\t// automatically set by database.\n\t\t\tdelete data.id;\n\t\t\tupdateDB(\"add\", data);\n\t\t}\n\t\telse {\n\t\t\tdata.id = Number(data.id);\n\t\t\tupdateDB(\"edit\", data);\n\t\t}\n\t\tclearInput();\n\t}", "function updatePlayer(name,wins,loses){\n var db = getPlayersDatabase();\n var res = \"\";\n db.transaction(\n function(tx) {\n var rs = tx.executeSql('INSERT OR REPLACE INTO players_storage VALUES (?,?,?);', [name,wins,loses]);\n if (rs.rowsAffected > 0) {\n res = \"OK\";\n } else {\n res = \"Error\";\n }\n });\n // The function returns “OK” if it was successful, or “Error” if it wasn't\n return res;\n}", "function Load()\n{\n // The file *does* exist\n if (fs.existsSync(\"save.json\"))\n {\n savedatasw = 1;\n const importdata = fs.readFileSync('save.json', 'utf8');\n const playerdata = JSON.parse(importdata);\n playername=playerdata.playername;\n playerlvl=playerdata.playerlvl;\n health=playerdata.health;\n mana=playerdata.mana;\n gold=playerdata.gold;\n savecoord=playerdata.savecoord;\n savedatasw=playerdata.savedatasw;\n playerinfo.playername=playername;\n playerinfo.playerlvl=playerlvl;\n playerinfo.health=health;\n playerinfo.mana=mana;\n playerinfo.gold=gold;\n playerinfo.savecoord=savecoord;\n playerinfo.savedatasw=savedatasw;\n return;\n }\n\n return;\n }" ]
[ "0.77751213", "0.7435508", "0.7104197", "0.70841295", "0.69330937", "0.6861676", "0.6847475", "0.6840494", "0.6759647", "0.6746505", "0.67310685", "0.67263496", "0.664336", "0.6626201", "0.65870696", "0.64921266", "0.64840263", "0.64775723", "0.6455494", "0.6432882", "0.64294654", "0.6371892", "0.6346389", "0.63355196", "0.6334466", "0.63223195", "0.6297219", "0.62884116", "0.6283807", "0.62826806", "0.62747663", "0.623205", "0.62304586", "0.6229243", "0.62288296", "0.62184703", "0.62164205", "0.62102956", "0.62102777", "0.62058884", "0.61940074", "0.6186066", "0.6185469", "0.61840034", "0.61754537", "0.61656433", "0.61236966", "0.6116668", "0.6097736", "0.60877585", "0.60806584", "0.6067623", "0.60645366", "0.6063838", "0.6035956", "0.60306513", "0.60274553", "0.60242003", "0.60193175", "0.6018814", "0.60159916", "0.60153955", "0.60138637", "0.60102266", "0.6004603", "0.600191", "0.59962857", "0.5994158", "0.59915984", "0.59901446", "0.59632397", "0.59626806", "0.5961857", "0.5960803", "0.5952724", "0.59493077", "0.5938894", "0.593742", "0.59289074", "0.59248894", "0.59226733", "0.59220797", "0.5915102", "0.5908436", "0.58983874", "0.5893215", "0.58912456", "0.5890172", "0.5887457", "0.58839333", "0.5879616", "0.58775574", "0.58772135", "0.5872819", "0.58705837", "0.5866576", "0.58514684", "0.5836154", "0.58135504", "0.5811565" ]
0.6084212
50
INICIO: FUNCION PARA OBTENER DATOS DE LA TABLA
function mgrilla_item_obtener_datos_01(){ tblregistro_vista_data = $("#grdregistro_vista_data").dataTable({ "aProcessing": true, "aServerSide": true, dom: "Bfrtip", "searching": true, lengthChange: false, colReorder: true, buttons: [ "copyHtml5", "excelHtml5", "csvHtml5", { extend: "pdfHtml5", orientation: "landscape", download: "open", pageSize: "A4", text: "PDF" }, "colvis" ], "ajax":{ url: "../../controller/arc_producto.php?caso=ctrl_obtener_vista_00", type : "post", dataType : "json", error: function(e){ console.log(e.responseText); } }, "bDestroy": true, "responsive": true, "bInfo":true, "iDisplayLength": 10, "language": { "url": "//cdn.datatables.net/plug-ins/1.10.21/i18n/Spanish.json" } }).DataTable(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function obtener_datos_por_establecimiento() {\n var lista = conexion_resultados();\n //var promedios = conexion_resultados_promedio_por_fecha();\n var contenido = \"\";\n var fecha = \"\";\n\n //removemos los datos previos de la tabla\n\n //checamos si la tabla tiene datos\n if (lista.length > 0) {\n $(\".celda_tabla_res\").remove();\n $.each(lista, function (index, item) {\n\n //obtenemos el nombre de usuario por medio de una consulta\n //var nombre_cuest = nombres_cuestionarios_por_folio(item.zona);\n var cuestionario = resultados_cuestionario_por_dia(item.fecha, item.id_cuestionario);\n\n if (index == 0) {\n fecha = item.fecha;\n // console.log(fecha + \">\");\n //creamos el contenido\n contenido = \" <tr class='celda_tabla_res fecha'> <td id='indice'colspan='6' > \" + nombre_fecha(fecha) + \"<td></tr><tr class='celda_tabla_res'> <th>#</th><th>CUESTIONARIO</th> <th>LIMPIEZA %</th> <th>SURTIDO % </th> <th>IMAGEN %</th> <th>APLICADOR</th> </tr>\"\n // $(\"#tabla_res\").append(contenido);\n }//fin if\n if (fecha == item.fecha) {\n\n //creamos el contenido\n contenido += \" <tr class='celda_tabla_res dato' onclick='llenar_modal_cuestionarios(\\\"\" + item.fecha + \"\\\",\" + item.id_cuestionario + \")'> <td id='indice'>\" + item.id_cuestionario + \"</td><td class='nombre' >\" + cuestionario.cuestionario + \"</td> <td id='zona_lim' >\" + cuestionario.limpieza + \"</td> <td id='zona_surt' >\" + cuestionario.surtido + \"</td> <td id='zona_imag' >\" + cuestionario.imagen + \"</td> <td id='zona_aplicador'>\" + item.aplicador + \"</td> </tr>\";\n //$(\"#tabla_res\").append(contenido);\n //llenamos los datos de pie\n }//fin if\n else if (fecha != item.fecha) {\n\n //$(\"#tabla_res\").append(contenido);\n\n var promedio = conexion_resultados_promedio_por_fecha(fecha);\n\n // console.log(promedios[contador_fecha].fecha + \":\" + promedios[contador_fecha].aspecto+\":\"+promedios[contador_fecha].aspecto);\n fecha = item.fecha;\n //creamos el contenido\n contenido += \" <tr class='celda_tabla_res'><th colspan='2'>Total:</th> <th>\" + promedio.limpieza + \"</th> <th>\" + promedio.surtido + \"</th> <th>\" + promedio.imagen + \"</th><th>\" + promedio.total + \"</th> </tr><tr class='celda_tabla_res fecha'> <td id='indice'colspan='6' > \" + nombre_fecha(fecha) + \"<td> <tr class='celda_tabla_res'> <th>#</th><th>CUESTIONARIO</th> <th>LIMPIEZA %</th> <th>SURTIDO %</th> <th>IMAGEN %</th> <th>APLICADOR</th> </tr> </tr><tr class='celda_tabla_res dato' onclick='llenar_modal_cuestionarios(\\\"\" + item.fecha + \"\\\",\" + item.id_cuestionario + \")' > <td id='indice'>\" + item.id_cuestionario + \"</td><td class='nombre' >\" + cuestionario.cuestionario + \"</td> <td id='zona_lim' >\" + cuestionario.limpieza + \"</td> <td id='zona_surt' >\" + cuestionario.surtido + \"</td> <td id='zona_imag' >\" + cuestionario.imagen + \"</td> <td id='zona_aplicador'>\" + item.aplicador + \"</td> <</tr>\"\n // $(\"#tabla_res\").append(contenido);\n \n }//fin if\n\n });\n var promedio = conexion_resultados_promedio_por_fecha(fecha);\n contenido += \" <tr class='celda_tabla_res'><th colspan='2'>Total:</th> <th>\" + promedio.limpieza + \"</th> <th>\" + promedio.surtido + \"</th> <th>\" + promedio.imagen + \"</th><th>\" + promedio.total + \"</th></tr>\"\n $(\"#tabla_res\").append(contenido);\n //ajustamos los decimales de total \n // total_limpieza = r(total_limpieza) ;\n //total_limpieza = Math.round(total_limpieza);\n //total_limpieza = total_limpieza / 100;\n var totales = conexion_resultados_ckl_total_por_fechas_establecimiento();\n //console.log(r(total_limpieza / contador) + \":\" + r(total_surtido / contador) + \":\" + r(total_imagen / contador));\n $(\"#total_limpieza\").val(totales.limpieza), $(\"#total_surtido\").val(totales.surtido), $(\"#total_imagen\").val(totales.imagen);\n var res = (total_limpieza + total_surtido + total_imagen);\n //console.log(res);\n $(\"#total_neto\").val(totales.total);\n\n }//fin\n //si no hay datos manda una advertencia\n else {\n alert(\"No Hay Datos...\");\n }\n\n}//fin", "function consultaAperturaYCorteDelDia(fecha){\n // debugger;\n \t\tvar datos = {\n \t\t\t\tfecha : fecha,\n \t\t }\n \t\t$.ajax({\n url: base_url+'Cajero/CorteCaja/consultarApertura',\n type: \"post\",\n dataType: \"json\",\n \t\t\tdata : (datos),\n \t\t\tsuccess : function(response){\n $(\"#tbl_consultaCortesDelDia\").DataTable({\n data: response,\n responsive: true,\n columns: [\n {\n data: \"monto\",\n \"className\": \"text-center\",\n // \"visible\": false, // ocultar la columna\n render: function(data, type, row, meta) {\n var hayApertura = `${row.monto}`;\n var idApertura = `${row.id_apertura}`;\n if (hayApertura == 'null'){\n var a = '<div text-white\">'+'No hay apertura'+'</div>';\n $(\"#id_ventas\").val(\"No hay apertura\");\n }else {\n $(\"#id_apertura\").val(idApertura);\n $(\"#monto_apertura\").val(hayApertura);\n var a = '<div text-white\">'+hayApertura+'</div>';\n }\n return a;\n },\n },\n {\n data: \"monto_entregado\",\n \"className\": \"text-center\",\n },\n {\n data: \"gastos\",\n \"className\": \"text-center\",\n },\n {\n data: \"ventas\",\n // \"visible\": false, // ocultar la columna\n },\n {\n data: \"diferencia\",\n \"className\": \"text-center\",\n },\n {\n data: \"fecha\",\n \"className\": \"text-center\",\n },\n {\n data: \"usuario\",\n \"className\": \"text-center\",\n },\n\n ],\n \"language\" : language_espaniol,\n });\n \t\t\t }\n \t\t});\n }", "function agregarDato() {\n\n // Usamos el atributo getElementById('iddelelemento')\n // nos retorna con objeto html el cual podremos acceder a sus atributos\n // un de ellos es .value con el cual obtendremos el valor que ingresamos\n\n // Una vez obtenido el valor lo pasamos a una variable para cada tipo\n nombre = document.getElementById('nombre').value;\n apellido = document.getElementById('apellido').value;\n edad = document.getElementById('edad').value;\n profesion = document.getElementById('profesion').value;\n\n // Limpiamos el documento html\n document.body.innerHTML = '';\n\n // Creamos un array con los datos previamente obtenidos\n var newDato = new Array(nombre, apellido, edad, profesion);\n \n // Agregamos los datos obtenidos al array que declaramos de manera global\n tablas.push(newDato);\n\n // Llamamos a la funcion crearTabla() para que imprima \n // la tabla con los datos actualizados\n crearTabla();\n}", "function campos_fecha(tabla)\n{\n\tswitch(tabla)\n\t\t\t\t{\n\t\t\t\tcase \"facturacion\":\n\t\t\t\t\t{\n\t\t\t\t\t\tCalendar.setup({\n \t\t\tinputField : 'finicio', // id of the input field\n \t\t\tifFormat : '%d-%m-%Y', // format of the input field\n \t\t\tshowsTime : true, // will display a time selector\n \t\t\tbutton : 'f_trigger_finicio', // trigger for the calendar (button ID)\n \t\t\tsingleClick : false, // double-click mode\n \t\t\tstep : 1 // show all years in drop-down boxes (instead of every other year as default)\n\t\t\t\t\t})\n\t\t\t\t\t\tCalendar.setup({\n \t\t\tinputField : 'duracion', // id of the input field\n \t\t\tifFormat : '%d-%m-%Y', // format of the input field\n \t\t\tshowsTime : true, // will display a time selector\n \t\t\tbutton : 'f_trigger_duracion', // trigger for the calendar (button ID)\n \t\t\tsingleClick : false, // double-click mode\n \t\t\tstep : 1 // show all years in drop-down boxes (instead of every other year as default)\n\t\t\t\t\t})\n\t\t\t\t\t\tCalendar.setup({\n \t\t\tinputField : 'renovacion', // id of the input field\n \t\t\tifFormat : '%d-%m-%Y', // format of the input field\n \t\t\tshowsTime : true, // will display a time selector\n \t\t\tbutton : 'f_trigger_renovacion', // trigger for the calendar (button ID)\n \t\t\tsingleClick : false, // double-click mode\n \t\t\tstep : 1 // show all years in drop-down boxes (instead of every other year as default)\n\t\t\t\t\t})\n\t\t\t\t\t\n\t\t\t\t\t}break\n\t\t\t\t\tcase \"pcentral\":\n\t\t\t\t\t{\n\t\t\t\t\t\tCalendar.setup({\n \t\t\tinputField : 'cumple', // id of the input field\n \t\t\tifFormat : '%d-%m-%Y', // format of the input field\n \t\t\tshowsTime : true, // will display a time selector\n \t\t\tbutton : 'f_trigger_cumple', // trigger for the calendar (button ID)\n \t\t\tsingleClick : false, // double-click mode\n \t\t\tstep : 1 // show all years in drop-down boxes (instead of every other year as default)\n\t\t\t\t\t})\n\t\t\t\t\t}break\n\t\t\t\t\tcase \"pempresa\":\n\t\t\t\t\t{\n\t\t\t\t\t\tCalendar.setup({\n \t\t\tinputField : 'cumple', // id of the input field\n \t\t\tifFormat : '%d-%m-%Y', // format of the input field\n \t\t\tshowsTime : true, // will display a time selector\n \t\t\tbutton : 'f_trigger_cumple', // trigger for the calendar (button ID)\n \t\t\tsingleClick : false, // double-click mode\n \t\t\tstep : 1 // show all years in drop-down boxes (instead of every other year as default)\n\t\t\t\t\t})\n\t\t\t\t\t}break\n\t\t\t\t\tcase \"z_facturacion\":\n\t\t\t\t\t{\n\t\t\t\t\t\tCalendar.setup({\n \t\t\tinputField : 'finicio', // id of the input field\n \t\t\tifFormat : '%d-%m-%Y', // format of the input field\n \t\t\tshowsTime : true, // will display a time selector\n \t\t\tbutton : 'f_trigger_finicio', // trigger for the calendar (button ID)\n \t\t\tsingleClick : false, // double-click mode\n \t\t\tstep : 1 // show all years in drop-down boxes (instead of every other year as default)\n\t\t\t\t\t})\n\t\t\t\t\t\t\n\t\t\t\t\t\tCalendar.setup({\n \t\t\tinputField : 'renovacion', // id of the input field\n \t\t\tifFormat : '%d-%m-%Y', // format of the input field\n \t\t\tshowsTime : true, // will display a time selector\n \t\t\tbutton : 'f_trigger_renovacion', // trigger for the calendar (button ID)\n \t\t\tsingleClick : false, // double-click mode\n \t\t\tstep : 1 // show all years in drop-down boxes (instead of every other year as default)\n\t\t\t\t\t})\n\t\t\t\t\t}break\n\t\t\t\t\tcase \"empleados\":\n\t\t\t\t\t{\n\t\t\t\t\t\tCalendar.setup({\n \t\t\tinputField : 'fnac', // id of the input field\n \t\t\tifFormat : '%d-%m-%Y', // format of the input field\n \t\t\tshowsTime : true, // will display a time selector\n \t\t\tbutton : 'f_trigger_fnac', // trigger for the calendar (button ID)\n \t\t\tsingleClick : false, // double-click mode\n \t\t\tstep : 1 // show all years in drop-down boxes (instead of every other year as default)\n\t\t\t\t\t})\n\t\t\t\t\t\t\n\t\t\t\t\t\tCalendar.setup({\n \t\t\tinputField : 'fcon', // id of the input field\n \t\t\tifFormat : '%d-%m-%Y', // format of the input field\n \t\t\tshowsTime : true, // will display a time selector\n \t\t\tbutton : 'f_trigger_fcon', // trigger for the calendar (button ID)\n \t\t\tsingleClick : false, // double-click mode\n \t\t\tstep : 1 // show all years in drop-down boxes (instead of every other year as default)\n\t\t\t\t\t})\n\t\t\t\t\t}break\n case \"entradas_salidas\":\n\t\t\t\t\t{\n\t\t\t\t\t\tCalendar.setup({\n \t\t\tinputField : 'entrada', // id of the input field\n \t\t\tifFormat : '%d-%m-%Y', // format of the input field\n \t\t\tshowsTime : true, // will display a time selector\n \t\t\tbutton : 'f_trigger_entrada', // trigger for the calendar (button ID)\n \t\t\tsingleClick : false, // double-click mode\n \t\t\tstep : 1 // show all years in drop-down boxes (instead of every other year as default)\n\t\t\t\t\t})\n\n\t\t\t\t\t\tCalendar.setup({\n \t\t\tinputField : 'salida', // id of the input field\n \t\t\tifFormat : '%d-%m-%Y', // format of the input field\n \t\t\tshowsTime : true, // will display a time selector\n \t\t\tbutton : 'f_trigger_salida', // trigger for the calendar (button ID)\n \t\t\tsingleClick : false, // double-click mode\n \t\t\tstep : 1 // show all years in drop-down boxes (instead of every other year as default)\n\t\t\t\t\t})\n\t\t\t\t\t}break\n\t\t\t\t}\n\t\t\t\t//editor()\n}", "function dataAjusteInv(){\n let rangodeFecha = $(\"#daterange-btn-Ajuste span\").html();\n console.log(\"Rango de Fecha:\",rangodeFecha);\n if(rangodeFecha==undefined || rangodeFecha==null){\n var FechDev1=moment().format('YYYY-MM-DD');\n var FechDev2=moment().format('YYYY-MM-DD');\n }else{\n\t let arrayFecha = rangodeFecha.split(\" \", 3);\n\t let f1=arrayFecha[0].split(\"-\");\n\t let f2=arrayFecha[2].split(\"-\");\n\n\t var FechDev1=f1[2].concat(\"-\").concat(f1[1]).concat(\"-\").concat(f1[0]); //armar la fecha año-mes-dia\n\n\t var FechDev2=f2[2].concat(\"-\").concat(f2[1]).concat(\"-\").concat(f2[0]);\n }\t \n \n //console.log(FechDev1, FechDev2);\n\n tablaAjusteInv=$('#datatableAI').dataTable(\n\t{\n\t\t\"aProcessing\": true,//Activamos el procesamiento del datatables\n\t \"aServerSide\": true,//Paginación y filtrado realizados por el servidor\n \"lengthMenu\": [ [10, 25, 50,100, -1], [10, 25, 50, 100, \"Todos\"] ],\n \"language\": {\n\t\t\"sProcessing\": \"Procesando...\",\n \"sLengthMenu\": \"Mostrar _MENU_ registros &nbsp\",\n \"sZeroRecords\": \"No se encontraron resultados\",\n \"sEmptyTable\": \"Ningún dato disponible en esta tabla\",\n \"sInfo\": \"Mostrar registros del _START_ al _END_ de un total de _TOTAL_\",\n\t\t\"sInfoFiltered\": \"(filtrado de un total de _MAX_ registros)\",\n\t\t\"sInfoPostFix\": \"\", \n \"sSearch\": \"Buscar:\",\n \"sInfoThousands\": \",\",\n \"sLoadingRecords\": \"Cargando...\",\n \"oPaginate\": {\n\t\t\"sFirst\": \"Primero\",\n\t\t\"sLast\": \"Último\",\n\t\t\"sNext\": \"Siguiente\",\n\t\t\"sPrevious\": \"Anterior\"}\n },\n\t\t\"oAria\": {\n\t\t\t\"sSortAscending\": \": Activar para ordenar la columna de manera ascendente\",\n\t\t\t\"sSortDescending\": \": Activar para ordenar la columna de manera descendente\"\n\t\t},\n dom: '<clear>Bfrtip',\n buttons: [\n {\n text: 'Copiar',\n extend: 'copy'\n },\n 'excelHtml5',\n 'csvHtml5',\n {\n extend: 'pdfHtml5',\n orientation: 'landscape',\n title: \"AdminLTE\",\n customize: function ( doc ) {\n pdfMake.createPdf(doc).open();\n },\n },\n \n {\n extend: 'print',\n text: 'Imprimir',\n className: 'btn btn-success btn-sm',\n autoPrint: false //TRUE para abrir la impresora\n }\n ],\n initComplete: function () {\n var btns = $('.dt-button');\n btns.removeClass('dt-button');\n btns.addClass('btn btn-success btn-sm');\n },\n\t\t\"ajax\":\n\t\t\t\t{\n url: 'ajax/ajusteinventario.ajax.php?op=listar',\n data: {\"FechDev1\": FechDev1, \"FechDev2\": FechDev2}, \n\t\t\t\t\ttype : \"POST\",\n\t\t\t\t\tdataType : \"json\",\t\t\t\t\t\t\n\t\t\t\t\terror: function(e){\n\t\t\t\t\t\tconsole.log(e.responseText);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\"bDestroy\": true,\n\t\t\"iDisplayLength\": 10,//Paginación\n\t \"order\": [[ 0, \"desc\" ]]//Ordenar (columna,orden)\n\t}).DataTable(); \n \n}", "function MostrarLista(){\n //declaramos una viable para guardar los datos\n var listaregistro=Mostrar();\n //selecciono el tbody de la tabla donde voy a mostrar la informacion\n var tbody=document.querySelector(\"#tbAlumno tbody\");\n tbody.innerHTML=\"\";\n //agregamos al tbody las filas que se registren\n for(var i=0;i<listaregistro.length;i++){\n //declaramos una variable para las filas\n var fila=tbody.insertRow(i);\n //declaramos variables para los titulos\n var titulonom=fila.insertCell(0);\n var tituloape=fila.insertCell(1);\n var titulodni=fila.insertCell(2);\n var titulocur=fila.insertCell(3);\n var titulotur=fila.insertCell(4);\n var tituloest=fila.insertCell(5);\n //agregamos los valores\n titulonom.innerHTML=listaregistro[i].nombre;\n tituloape.innerHTML=listaregistro[i].apellido;\n titulodni.innerHTML=listaregistro[i].dni;\n titulocur.innerHTML=listaregistro[i].curso;\n titulotur.innerHTML=listaregistro[i].turno;\n tituloest.innerHTML=listaregistro[i].estado;\n tbody.appendChild(fila); \n }\n}", "function listar() {\n tabla = $(\"#inventario\").DataTable({\n serverSide: true,\n responsive: true,\n ajax: \"api/reporte/inventario\",\n dom: \"Bfrtip\",\n iDisplayLength: 10,\n buttons: [\n \"pageLength\",\n \"copyHtml5\",\n {\n extend: \"excelHtml5\",\n autoFilter: true,\n sheetnombre: \"Exported data\"\n },\n \"csvHtml5\",\n {\n extend: \"pdfHtml5\",\n orientation: \"landscape\",\n pageSize: \"LEGAL\"\n }\n ],\n columns: [\n { data: \"nombre\", name: \"ingrediente.nombre\" },\n { data: \"disponible\", name: \"inventario.disponible\" },\n { data: \"costo\", name: \"inventario.costo\"},\n { data: \"nota\", name: \"inventario.nota\"},\n { data: \"fecha_ingreso\", name: \"inventario.fecha_ingreso\"},\n ],\n order: [[1, \"asc\"]]\n // rowGroup: {\n // dataSrc: \"role\"\n // }\n });\n }", "function cargarCuerpoElectrico(data, fila, enfoque, bandera) {\n var tr = '<tr id=\"detalles-tr-' + fila + '\" data-value=\"' + fila + '0\" >';\n tr = tr + ' <th class=\"text-center\" data-encabezado=\"Número\" scope=\"row\" id=\"row-' + fila + '\">' + fila + '</th>';\n tr = tr + ' <td data-encabezado=\"Columna 01\">';\n tr = tr + ' <div class=\"form-group m-0\">';\n tr = tr + ' <select class=\"form-control form-control-sm text-right\" id=\"cbo-det-1-' + fila + '\" onchange=\"fn_calcular(' + fila + ')\">';\n tr = tr + ' <option value=\"2018\">2018</option>';\n tr = tr + cargarAnio();\n tr = tr + ' </select>';\n tr = tr + ' </div>';\n tr = tr + ' </td>';\n tr = tr + ' <td data-encabezado=\"Columna 04\">';\n tr = tr + ' <div class=\"form-group m-0\">';\n tr = tr + ' <input class=\"form-control form-control-sm text-right\" type=\"date\" placeholder=\"\" id=\"dat-det-1-' + fila + '\" onBlur=\"fn_calcular(' + fila + ')\">';\n tr = tr + ' </div>';\n tr = tr + ' </td>';\n tr = tr + ' <td data-encabezado=\"Columna 02\">';\n tr = tr + ' <div class=\"form-group m-0\">';\n tr = tr + ' <select class=\"form-control form-control-sm text-right\" id=\"cbo-det-2-' + fila + '\" onchange=\"fn_calcular(' + fila + ')\">';\n tr = tr + ' <option value=\"0\">Seleccione</option>';\n tr = tr + ' </select>';\n tr = tr + ' </div>';\n tr = tr + ' </td>';\n tr = tr + ' <td data-encabezado=\"Columna 03\">';\n tr = tr + ' <div class=\"form-group m-0\">';\n tr = tr + ' <select class=\"form-control form-control-sm text-right\" id=\"cbo-det-3-' + fila + '\" onchange=\"fn_calcular(' + fila + ')\">';\n tr = tr + ' <option value=\"0\">Seleccione</option>';\n tr = tr + ' </select>';\n tr = tr + ' </div>';\n tr = tr + ' </td>';\n tr = tr + ' <td data-encabezado=\"Columna 04\">';\n tr = tr + ' <div class=\"form-group m-0\">';\n tr = tr + ' <input class=\"form-control form-control-sm text-right\" type=\"text\" placeholder=\"\" id=\"txt-det-1-' + fila + '\" onBlur=\"fn_calcular(' + fila + ')\">';\n tr = tr + ' </div>';\n tr = tr + ' </td>';\n tr = tr + ' <td data-encabezado=\"Columna 05\">';\n tr = tr + ' <div class=\"form-group m-0\">';\n tr = tr + ' <input class=\"form-control form-control-sm text-right\" type=\"text\" placeholder=\"\" id=\"txt-det-2-' + fila + '\" onBlur=\"fn_calcular(' + fila + ')\">';\n tr = tr + ' </div>';\n tr = tr + ' </td>';\n tr = tr + ' <td data-encabezado=\"Columna 06\">';\n tr = tr + ' <div class=\"form-group m-0\">';\n tr = tr + ' <input class=\"form-control form-control-sm text-right\" type=\"text\" placeholder=\"\" id=\"txt-det-3-' + fila + '\" onBlur=\"fn_calcular(' + fila + ')\">';\n tr = tr + ' </div>';\n tr = tr + ' </td>';\n tr = tr + ' <td data-encabezado=\"Columna 04\">';\n tr = tr + ' <div class=\"form-group m-0\">';\n tr = tr + ' <input class=\"form-control form-control-sm text-right\" type=\"text\" placeholder=\"\" id=\"txt-det-4-' + fila + '\">';\n tr = tr + ' </div>';\n tr = tr + ' </td>';\n tr = tr + ' <td data-encabezado=\"Columna 07\">';\n tr = tr + ' <div class=\"form-group m-0\">';\n tr = tr + ' <input class=\"form-control form-control-sm text-right\" type=\"text\" placeholder=\"\" id=\"txt-det-5-' + fila + '\" disabled>';\n tr = tr + ' </div>';\n tr = tr + ' </td>';\n tr = tr + ' <td data-encabezado=\"Columna 07\">';\n tr = tr + ' <div class=\"form-group m-0\">';\n tr = tr + ' <input class=\"form-control form-control-sm text-right\" type=\"text\" placeholder=\"\" id=\"txt-det-6-' + fila + '\" disabled>';\n tr = tr + ' </div>';\n tr = tr + ' </td>';\n tr = tr + ' <td data-encabezado=\"Subtotal\">';\n tr = tr + ' <div class=\"form-group m-0\">';\n tr = tr + ' <input class=\"form-control form-control-sm text-right\" type=\"text\" id=\"txt-det-7-' + fila + '\" disabled>';\n tr = tr + ' </div>';\n tr = tr + ' </td>';\n tr = tr + ' <td class=\"text-center text-xs-right\" data-encabezado=\"Acciones\">';\n tr = tr + ' <div class=\"btn-group\">';\n tr = tr + ' <div class=\"acciones fase-01 dropdown-toggle\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\"><i class=\"fas fa-ellipsis-h\"></i></div>';\n tr = tr + ' <div class=\"dropdown-menu dropdown-menu-right\">';\n tr = tr + ' <a class=\"dropdown-item agregarFila\" href=\"#\">';\n tr = tr + ' <i class=\"fas fa-plus-circle\"></i>&nbsp;Agregar';\n tr = tr + ' </a><a class=\"dropdown-item quitarCampos\" href=\"#\" onclick=\"fn_restarTotal(7, 8);\">';\n tr = tr + ' <i class=\"fas fa-minus-circle\"></i>&nbsp;Eliminar';\n tr = tr + ' </a>';\n tr = tr + ' </div>';\n tr = tr + ' </div>';\n tr = tr + ' </td>';\n\n tr = tr + ' <td class=\"text-hide\" data-encabezado=\"ID_INDICADOR\" style=\"display:none;\">';\n tr = tr + ' <div class=\"form-group m-0\">';\n tr = tr + ' <input class=\"form-control form-control-sm text-right\" type=\"text\" id=\"txt-det-8-' + fila + '\" disabled>';\n tr = tr + ' </div>';\n tr = tr + ' </td>';\n\n tr = tr + '</tr>';\n $(\"#cuerpoTablaIndicador\").append(tr);\n if (bandera == 1) {\n fn_CargarListaTipoVehiculo(data, (fila - 1), enfoque);\n }\n //return tr;\n}", "function MostrarRegistro(){\n //declaramos una variable para guardar los datos\n var listaproductos=Mostrar();\n //selecciono el tbody de la tabla donde voy a guardar\n tbody = document.querySelector(\"#tbRegistro tbody\");\n tbody.innerHTML=\"\";\n //Agregamos las columnas que se registren\n for(var i=0; i<listaproductos.length;i++){\n //Declaramos una variable para la fila\n var fila=tbody.insertRow(i);\n //declaramos variables para los titulos\n var titulonombre = fila.insertCell(0);\n var tituloprecio = fila.insertCell(1);\n var titulocategoria = fila.insertCell(2);\n var titulocantidad = fila.insertCell(3);\n //agregamos valores\n titulonombre.innerHTML = listaproductos[i].nombre;\n tituloprecio.innerHTML = listaproductos[i].precio;\n titulocategoria.innerHTML = listaproductos[i].categoria;\n titulocantidad.innerHTML = listaproductos[i].cantidad;\n tbody.appendChild(fila);\n }\n}", "function obtenerDatosEditar()\n {\n //OBTIENE LOS DATOS DE LA FILA CUANDO DÁ CLICK EN EL BOTON EDITAR\n $('#integrantes').on('click', '#datos .editar', function(e){\n e.preventDefault();\n id = $(this).parent().parent().attr('id');\n nombres = $(this).parent().parent().children('td:eq(0)').text();\n apellidos = $(this).parent().parent().children('td:eq(1)').text();\n parentesco = $(this).parent().parent().children('td:eq(2)').text();\n fecha_nacimiento = $(this).parent().parent().children('td:eq(3)').text();\n profesion = $(this).parent().parent().children('td:eq(4)').text();\n lugar_trabajo = $(this).parent().parent().children('td:eq(5)').text();\n tel_trabajo = $(this).parent().parent().children('td:eq(6)').text();\n salario = $(this).parent().parent().children('td:eq(7)').text();\n depende = $(this).parent().parent().children('td:eq(8)').text();\n grado = $(this).parent().parent().children('td:eq(9)').text();\n institucion = $(this).parent().parent().children('td:eq(10)').text();\n cuota = $(this).parent().parent().children('td:eq(11)').text();\n\n //CONVIERTE LA FECHA A FORMATO yyyy-MM-dd\n fechaconvert = fecha_nacimiento.replace('/', '-');\n fecha_nacimiento = fechaconvert.replace('/', '-')\n\n //ENVIA LOS DATOS A LOS INPUTS\n $('#id_integrante').val(id);\n $('#nombres_inte').val(nombres);\n $('#apellidos_inte').val(apellidos);\n $('#parentesco').val(parentesco);\n $('#fecha_naci_inte').val(fecha_nacimiento);\n $('#profesion').val(profesion);\n $('#lugar_trabajo').val(lugar_trabajo);\n $('#tel_trabajo').val(tel_trabajo);\n $('#salario').val(salario);\n $('#grado').val(grado);\n $('#institucion').val(institucion);\n $('#cuota_inte').val(cuota);\n\n if(grado != \"\" || institucion != \"\")\n {\n $('#si_integran').prop('checked', true);\n $(\"#depende\").show(1000);\n $(\"#Grado\").show(1000);\n $(\"#Institucion\").show(1000);\n $(\"#Cuota_inte\").show(1000);\n }\n else\n {\n //Sirve para resetear los radio button\n $('.estudiante').prop('checked', false);\n $('.depende').prop('checked', false);\n \n //Para que se oculten los campos\n $(\"#depende\").hide(1000);\n $(\"#Grado\").hide(1000);\n $(\"#Institucion\").hide(1000);\n $(\"#Cuota_inte\").hide(1000);\n }\n if(depende != \"\")\n {\n if(depende == \"si\")\n {\n $('#si2').prop('checked', true);\n }\n else\n {\n $('#no2').prop('checked', true);\n }\n }\n $('#modificar').show(0);\n $('#agregar').hide(0);\n $('#cancelar').show(0);\n });\n }", "function tabla_cargar_visual(){\n\n var d_pag = [];\n\n thisClass.state.datos_lista_pagina.map((value,key) => (\n d_pag.push(<tr key={key} className=\"col-lg-4 col-md-6 contenedor_taller\">\n {thisClass.props.datos_tabla_colum.map((v,k)=> (\n <td key={k}>{value[k]}</td>\n ))}\n \n {thisClass.props.api_tabla_dato.localeCompare(\"caducidad_cursos\")===0?\n <>\n <td><span id={value[0].split(\")\")[0].substring(2,value[0].split(\")\")[0].lenght)+\"╚\"+value[1].split(\")\")[0].substring(2,value[1].split(\")\")[0].lenght)} onClick={thisClass.handle_editar_datos_tabla} className={`font-weight-bold mt-0 opciones_edit_delete ${thisClass.props.api_tabla_dato.localeCompare(\"preguntas_cuestionarios\")===0?\"disabled grey-text\":\"blue-text\"} ${thisClass.props.api_tabla_dato.includes(\"notas\")?\"disabled grey-text\":\"\"}`}>Editar</span></td> \n <td><span id={value[0].split(\")\")[0].substring(2,value[0].split(\")\")[0].lenght)+\"╚\"+value[1].split(\")\")[0].substring(2,value[1].split(\")\")[0].lenght)} onClick={thisClass.handle_eliminar_dato_tabla} className={`font-weight-bold mt-0 blue-text opciones_edit_delete ${thisClass.state.modal3?\"eliminar_disabled\":\"\"}`}>Eliminar</span></td>\n </>\n :\n <>\n <td><span id={value[0]} onClick={thisClass.handle_editar_datos_tabla} className={`font-weight-bold mt-0 opciones_edit_delete ${thisClass.props.api_tabla_dato.localeCompare(\"preguntas_cuestionarios\")===0?\"disabled grey-text\":\"blue-text\"} ${thisClass.props.api_tabla_dato.includes(\"notas\")?\"disabled grey-text\":\"\"}`}>Editar</span></td>\n <td><span id={value[0]} onClick={thisClass.handle_eliminar_dato_tabla} className={`font-weight-bold mt-0 blue-text opciones_edit_delete ${thisClass.state.modal3?\"eliminar_disabled\":\"\"}`}>Eliminar</span></td> \n </>\n }\n \n </tr>)\n ));\n\n return(\n <>\n <MDBCol md=\"12\">\n \n {thisClass.props.api_tabla_dato.includes(\"notas\")?\n <MDBRow className=\"pt-2\">\n <MDBCol size=\"12\" md=\"6\" className=\"text-right justify-content-center align-self-center\">\n <div className=\"padreSelects_notasby\">\n <select name=\"buscador_notas_by\" className=\"browser-default custom-select\" \n onChange={thisClass.handleChange_selects}\n value={thisClass.state.buscador_notas_by}\n >\n <option value=\"0\">Busqueda por estudiante (email) :</option>\n <option value=\"1\">Busqueda por cursos (nombre) :</option>\n <option value=\"2\">Busqueda por cursos (ID) :</option>\n <option value=\"3\">Busqueda por talleres (nombre):</option>\n <option value=\"4\">Busqueda por talleres (ID):</option>\n <option value=\"5\">Busqueda por ID nota:</option>\n </select>\n </div>\n </MDBCol>\n <MDBCol size=\"12\" md=\"6\">\n <div className=\"form-inline mt-2 mb-4 formulario_search_notas d-flex align-items-center justify-content-end\">\n <MDBIcon icon=\"search\" className=\"icono_busqueda\" onClick={thisClass.handle_search_datos}/>\n <MDBInput className=\"form-control form-control-sm ml-3 w-100 test\" \n getValue={value => thisClass.get_Inputs_Values(value, \"search_value\")} \n value={thisClass.state.search_value}\n onKeyUp={thisClass.handleSearchUp} \n type=\"text\" placeholder=\"Buscar por email\" aria-label=\"Search\" />\n </div> \n </MDBCol>\n </MDBRow>\n :\n <div className=\"form-inline mt-2 mb-4 formulario_search d-flex align-items-center justify-content-end\">\n <MDBIcon icon=\"search\" className=\"icono_busqueda\" onClick={thisClass.handle_search_datos}/>\n <MDBInput className=\"form-control form-control-sm ml-3 w-100 test\" \n getValue={value => thisClass.get_Inputs_Values(value, \"search_value\")} \n value={thisClass.state.search_value}\n onKeyUp={thisClass.handleSearchUp} \n type=\"text\" placeholder=\"Buscar por email\" aria-label=\"Search\" />\n </div>\n }\n \n </MDBCol>\n <MDBTable className=\"mt-4 tabla_estudiantes text-center\">\n <MDBTableHead color=\"primary-color\" textWhite>\n <tr>\n {thisClass.props.datos_tabla_colum.map((v,k)=> (\n <th key={k}>{v}</th>\n ))}\n <th>Editar</th>\n <th>Eliminar</th>\n </tr>\n </MDBTableHead>\n <MDBTableBody>\n {d_pag}\n </MDBTableBody>\n </MDBTable>\n\n <MDBRow>\n <MDBCol md=\"12\">\n <MDBPagination className={`mb-5 justify-content-center ${thisClass.state.search_value.trim().localeCompare(\"\")===0?\"\":\"disabled_pagination\"}`}>\n\n {thisClass.state.number_pagina_actual === 1 || thisClass.state.loading_tabla===true ?\n <MDBPageItem disabled className = \"pagina_actual_estilo\" onClick={thisClass.atras_paginacion_button}>\n <MDBPageNav aria-label=\"Previous\">\n <span aria-hidden=\"true\">Anterior</span>\n </MDBPageNav>\n </MDBPageItem>\n : \n <MDBPageItem className = \"pagina_actual_estilo\" onClick={thisClass.atras_paginacion_button}>\n <MDBPageNav aria-label=\"Previous\">\n <span aria-hidden=\"true\">Anterior</span>\n </MDBPageNav>\n </MDBPageItem>}\n \n \n\n <MDBPageItem className=\"ml-4 mr-4\">\n <span className=\"pagina_actual_estilo\" >Paguina: {thisClass.state.number_pagina_actual}/{thisClass.state.number_paginas_recorrer}</span>\n </MDBPageItem>\n \n {thisClass.state.number_pagina_actual >= thisClass.state.number_paginas_recorrer || thisClass.state.loading_tabla===true ?\n <MDBPageItem disabled className = \"pagina_actual_estilo\" onClick={thisClass.adelante_paginacion_button}>\n <MDBPageNav aria-label=\"Previous\">\n <span aria-hidden=\"true\">Siguiente</span>\n </MDBPageNav>\n </MDBPageItem>\n : \n <MDBPageItem className = \"pagina_actual_estilo\" onClick={thisClass.adelante_paginacion_button}>\n <MDBPageNav aria-label=\"Previous\">\n <span aria-hidden=\"true\">Siguiente</span>\n </MDBPageNav>\n </MDBPageItem>\n }\n </MDBPagination>\n </MDBCol>\n \n \n <MDBContainer>\n <MDBModal modalStyle=\"danger\" className=\"text-white\" size=\"sm\" side position=\"top-right\" backdrop={true} isOpen={thisClass.state.modal3}\n toggle={thisClass.togle_modal_delete_dato}>\n <MDBModalHeader className=\"text-center\" titleClass=\"w-100\" tag=\"p\" toggle={thisClass.togle_modal_delete_dato}>\n Seguro que desea eliminar {thisClass.props.msg_eliminacion} #{thisClass.state.usuario_eliminar}\n </MDBModalHeader>\n <MDBModalBody className=\"text-center\">\n <MDBIcon icon=\"times\" size=\"4x\" className=\"animated pulse infinite\" />\n </MDBModalBody>\n <MDBModalFooter className=\"justify-content-center\">\n <MDBBtn color=\"danger\" className={thisClass.state.eliminando_usuario?\"disabled\":\"\"} onClick={thisClass.confirmado_delete}>SI</MDBBtn>\n <MDBBtn color=\"danger\" outline className={thisClass.state.eliminando_usuario?\"disabled\":\"\"} onClick={thisClass.togle_modal_delete_dato}>NO</MDBBtn>\n </MDBModalFooter>\n </MDBModal>\n </MDBContainer>\n \n\n {thisClass.state.editando_dato?\n thisClass.props.api_tabla_dato.localeCompare(\"talleres\")===0?\n <ModuloEditarTaller\n dato_id={thisClass.state.dato_editar} \n callback_closed={thisClass.callback_module_editar}\n inputs_datos={thisClass.state.arreglo_construir_editar}\n typo_edicion={thisClass.props.api_tabla_dato}\n nombre_visualtypo={thisClass.props.msg_eliminacion}\n error_function={thisClass.props.error_function}\n />\n :\n <ModuloEditar \n dato_id={thisClass.state.dato_editar} \n callback_closed={thisClass.callback_module_editar}\n inputs_datos={thisClass.state.arreglo_construir_editar}\n typo_edicion={thisClass.props.api_tabla_dato}\n nombre_visualtypo={thisClass.props.msg_eliminacion}\n error_function={thisClass.props.error_function}\n />\n :\n <></>\n }\n\n\n </MDBRow>\n\n </>\n );\n }", "function listarArticulos(){\n\ttabla=$('#tblarticulos').dataTable({\n\t\t\"aProcessing\": true,//activamos el procedimiento del datatable\n\t\t\"aServerSide\": true,//paginacion y filrado realizados por el server\n\t\tdom: 'Bfrtip',//definimos los elementos del control de la tabla\n\t\tbuttons: [\n\n\t\t],\n\t\t\"ajax\":\n\t\t{\n\t\t\turl:'../ajax/venta.php?op=listarArticulos',\n\t\t\ttype: \"get\",\n\t\t\tdataType : \"json\",\n\t\t\terror:function(e){\n\t\t\t\tconsole.log(e.responseText);\n\t\t\t}\n\t\t},\n\t\t\"bDestroy\":true,\n\t\t\"iDisplayLength\":5,//paginacion\n\t\t\"order\":[[0,\"desc\"]]//ordenar (columna, orden)\n\t}).DataTable();\n}", "function ControlloDataInserita(datadafiltrare,campo,dt,colore,sfondo) {\r\n\r\nvar gg; //variabile per i giorni\r\nvar mm; // variabile per i mesi\r\nvar yy; // variabile per l'anno\r\nvar dateNow = new Date(); // assegna la data corrente (presa dal pc locale)\r\nvar yearNow = dateNow.getFullYear(); //assegna l'anno corente\r\nvar indice=0; // variabile di servizio\r\n\r\nvar nrgiorni = new Array();\r\n\tnrgiorni[0]=29; // febbraio bisestile\r\n\tnrgiorni[1]=31; // gennaio\r\n\tnrgiorni[2]=28; // febbraio\r\n\tnrgiorni[3]=31; // marzo\r\n\tnrgiorni[4]=30;\t// aprile\r\n\tnrgiorni[5]=31; // maggio\r\n\tnrgiorni[6]=30; // giugno\r\n\tnrgiorni[7]=31; // luglio\r\n\tnrgiorni[8]=31; // agosto\r\n\tnrgiorni[9]=30; // settembre\r\n\tnrgiorni[10]=31; // ottobre\r\n\tnrgiorni[11]=30; // novembre\r\n\tnrgiorni[12]=31; // dicembre\r\n\r\nif (datadafiltrare==null || datadafiltrare==\"\") { //se il campo è vuoto esce dalla funzione\r\n document.getElementById(campo).style.color=colore;\r\n document.getElementById(campo).style.background=\"white\";\r\n return;\r\n}\r\n\r\nswitch (datadafiltrare.length) { //analizza il formato della data e prepara le variabili gg, mm, yy\r\n case is = 6: //formato data breve\r\n gg = datadafiltrare.slice(0,2);\r\n mm = datadafiltrare.slice(2,4);\r\n yy = datadafiltrare.slice(4,6);\r\n break; \r\n \r\n case is = 8: //formato data a 8 caratteri\r\n if (datadafiltrare.indexOf(\"/\") >= 0 || datadafiltrare.indexOf(\"-\")>=0) { //con separatori\r\n gg = datadafiltrare.slice(0,2);\r\n mm = datadafiltrare.slice(3,5);\r\n yy = datadafiltrare.slice(6,8);\r\n } else { //data a 8 cifre senza separatori\r\n gg = datadafiltrare.slice(0,2);\r\n mm = datadafiltrare.slice(2,4);\r\n yy = datadafiltrare.slice(4,8);\r\n }\r\n break;\r\n \r\n case is = 10: //formato data completa\r\n gg = datadafiltrare.slice(0,2);\r\n mm = datadafiltrare.slice(3,5);\r\n yy = datadafiltrare.slice(6,10);\r\n break;\r\n\r\n default: //negli altri formati inseriti la routine genera un errore\r\n alert(\"Attenzione! La data che hai inserito e' errata. Sono validi i seguenti formati: 'ggmmaa','gg/mm/aa','ggmmaaaa' e 'gg/mm/aaaa'\");\r\n document.getElementById(campo).focus();\r\n //datadafiltrare.focus();\r\n datadafiltrare=\"\";\r\n return datadafiltrare;\r\n}\r\n\r\n//controlla che i dati di riferimento al giorno, al mese e all'anno siano dati numerici \r\nif (isNaN(gg) || isNaN(mm) || isNaN(yy)) {\r\n\talert(\"Attenzione! La data che hai inserito e' errata.\");\r\n document.getElementById(campo).focus();\r\n //datadafiltrare.focus();\r\n datadafiltrare=\"\";\r\n return datadafiltrare;\r\n}\r\n\r\n//controlla che siano stati inseriti giusti tutti gli elementi che compongono la data\r\nif (Number(gg) <= 0 || Number(mm) <= 0 || Number(mm) > 12 || Number(yy) < 0) { \r\n alert(\"Attenzione! La data che hai inserito e' errata.\");\r\n document.getElementById(campo).focus();\r\n //datadafiltrare.focus();\r\n datadafiltrare=\"\";\r\n return datadafiltrare;\r\n}\r\n\r\n//porta l'anno a quattro cifre calcolando il cambio del millennio\r\nif (Number(yy) <= (Number(yearNow)-2000)) { \r\n yy = (Number(yy)+2000); \r\n } else if (Number(yy) < 100 && Number(yy) > (Number(yearNow)-2000)){\r\n yy = (Number(yy)+1900);\r\n }\r\n\r\n//controlla che l'anno non sia maggiore o uguale a quello corrente\r\n//(dt e dn significano data tesseramento e data di nascita)\r\nif (dt==\"dn\") {\r\n if (Number(yy) >= Number(yearNow)) { \r\n alert(\"Attenzione! L'anno che hai inserito e' errato!\");\r\n document.getElementById(campo).focus;\r\n //datadafiltrare.focus();\r\n datadafiltrare=\"\";\r\n return datadafiltrare;\r\n }\r\n}\r\n// controlla che l'anno inserito non sia bisestile e assegna il valore alla variabile indice\r\nif ((Number(yy) % 4) == 0 && Number(mm)==2) {\r\n\tindice=0;\r\n} else {\r\n\tindice=Number(mm);\r\n}\r\n\r\n// controlla che l'utente non abbia inserito un numero giorni del mese errato\r\nif (Number(gg) > nrgiorni[indice]) {\t\r\n\talert(\"Attenzione! La data che hai inserito e' errata.\");\r\n document.getElementById(campo).focus();\r\n //datadafiltrare.focus();\r\n datadafiltrare=\"\";\r\n return datadafiltrare;\r\n}\r\n// ricompone e stampa la data filtrata\r\ndatadafiltrare=gg+\"/\"+mm+\"/\"+yy;\r\ndocument.getElementById(campo).value=datadafiltrare;\r\ndocument.getElementById(campo).style.color=colore;\r\ndocument.getElementById(campo).style.background=\"white\";\r\nreturn;\r\n}", "function getOrdenes() {\n\tvar tabla = $(\"#ordenes_trabajo\").anexGrid({\n\t class: 'table-striped table-bordered table-hover',\n\t columnas: [\n\t \t{ leyenda: 'Acciones', style: 'width:100px;', columna: 'Sueldo' },\n\t \t{ leyenda: 'ID', style:'width:20px;', columna: 'id', ordenable:true},\n\t { leyenda: 'Clave de orden de trabajo', style: 'width:200px;', columna: 'o.clave', filtro:true},\n\t { leyenda: 'Tipo de orden', style: 'width:100px;', columna: 'o.t_orden', filtro:function(){\n\t \treturn anexGrid_select({\n\t data: [\n\t { valor: '', contenido: 'Todos' },\n\t { valor: '1', contenido: 'INSPECCIÓN' },\n\t { valor: '2', contenido: 'VERIFICACIÓN' },\n\t { valor: '3', contenido: 'SUPERVISIÓN' },\n\t { valor: '4', contenido: 'INVESTIGACIÓN' },\n\t ]\n\t });\n\t }},\n\t { leyenda: 'Número de oficio', style: 'width:200px;', columna: 'of.no_oficio',filtro:true},\n\t { leyenda: 'Fecha', columna: 'o.f_creacion', filtro: function(){\n \t\treturn anexGrid_input({\n \t\t\ttype: 'date',\n \t\t\tattr:[\n \t\t\t\t'name=\"f_ot\"'\n \t\t\t]\n \t });\n\t } },\n\t //{ leyenda: 'Participantes', style: 'width:300px;', columna: 'Correo' },\n\t { leyenda: 'Estado', style: 'width:120px;', columna: 'o.estatus', filtro:function(){\n\t \treturn anexGrid_select({\n\t data: [\n\t { valor: '', contenido: 'Todos' },\n\t { valor: '1', contenido: 'Cumplida' },\n\t { valor: '2', contenido: 'Parcial sin resultado' },\n\t { valor: '3', contenido: 'Parcial con resultado' },\n\t { valor: '4', contenido: 'Cumplida sin resultado' },\n\t { valor: '5', contenido: 'Cancelada' },\n\t ]\n\t });\n\t }},\n\t \n\t ],\n\t modelo: [\n\t \t\n\t \t{ class:'',formato: function(tr, obj, valor){\n\t \t\tvar acciones = [];\n\t \t\tif (obj.estatus == 'Cancelada') {\n\t \t\t\tacciones = [\n { href: \"javascript:open_modal('modal_ot_upload',\"+obj.id+\");\", contenido: '<i class=\"glyphicon glyphicon-cloud\"></i> Adjuntar documento' },\n { href: \"javascript:open_modal('modal_add_obs');\", contenido: '<i class=\"glyphicon glyphicon-comment\"></i>Agregar observaciones' },\n { href: 'index.php?menu=detalle&ot='+obj.id, contenido: '<i class=\"glyphicon glyphicon-eye-open\"></i>Ver detalle' },\n ];\n\t \t\t}else{\n\t \t\t\tacciones = [\n { href: \"javascript:open_modal('modal_ot_upload',\"+obj.id+\");\", contenido: '<i class=\"glyphicon glyphicon-cloud\"></i> Adjuntar documento' },\n { href: \"javascript:open_modal('modal_add_obs');\", contenido: '<i class=\"glyphicon glyphicon-comment\"></i>Agregar observaciones' },\n { href: 'index.php?menu=detalle&ot='+obj.id, contenido: '<i class=\"glyphicon glyphicon-eye-open\"></i>Ver detalle' },\n { href: \"javascript:open_modal('modal_cancelar_ot',\"+obj.id+\");\", contenido: '<i class=\"fa fa-ban text-red\"></i><b class=\"text-red\">Cancelar</b> '},\n ];\n\t \t\t}\n\t return anexGrid_dropdown({\n contenido: '<i class=\"glyphicon glyphicon-cog\"></i>',\n class: 'btn btn-primary ',\n target: '_blank',\n id: 'editar',\n data: acciones\n });\n\t }},\n\t \t\n\t { class:'',formato: function(tr, obj, valor){\n\t \t\tvar acciones = [];\n\t \t\tif (obj.estatus == 'Cancelada') {\n\t \t\t\ttr.addClass('bg-red-active');\n\t \t\t}\n\t return obj.id;\n\t }},\n\t { propiedad: 'clave' },\n\t { propiedad: 't_orden' },\n\t { propiedad: 'oficio' },\n\t { propiedad: 'f_creacion' },\n\t //{ propiedad: 'id'},\n\t { propiedad: 'estatus'}\n\t \n\t \n\t ],\n\t url: 'controller/puente.php?option=8',\n\t filtrable: true,\n\t paginable: true,\n\t columna: 'id',\n\t columna_orden: 'DESC'\n\t});\n\treturn tabla;\n}", "function llenarTabla() {\n const usuario = document.getElementById('idRegistrador').value;\n const rol = document.getElementById('rolRegistrador').value;\n const tipo = \"llenarTabla\";\n\n var table = $('#tablaRegistros').DataTable({\n \"ajax\": {\n type: \"POST\",\n url: \"inc/modelos/modelo-lista-registros.php\", \n data: {\n 'usuario' : usuario,\n 'rol' : rol,\n 'tipo': tipo\n }\n }, \n \"autoWidth\": false,\n \"columns\": [\n {\n \"className\": 'details-control',\n \"orderable\": false,\n \"data\": null,\n \"defaultContent\": '<span title=\"Ver Más\" style=\"opacity:0\">Tip</span>'\n },\n {\n \"className\": 'cerrarReg',\n \"orderable\": false,\n \"data\":null,\n \"defaultContent\": '<span title=\"Cerrar\" style=\"opacity:0\">Tip</span>'\n },\n {\n \"className\": 'editarReg',\n \"orderable\": false,\n \"data\":null,\n \"defaultContent\": '<span title=\"Editar\" style=\"opacity:0\">Tip</span>'\n },\n {\n \"className\": 'borrarReg',\n \"orderable\": false,\n \"data\":null,\n \"defaultContent\": '<span title=\"Borrar\" style=\"opacity:0\">Tip</span>'\n },\n { \"data\": \"id_reg_act\" },\n { \"data\": \"consecutivo\" },\n { \"data\": \"ost\" },\n { \"data\": \"siga\" },\n { \"data\": \"numero_servicio\" },\n { \"data\": \"actividad\" },\n { \"data\": \"cantidad_eventos\" },\n { \"data\": \"peso_total\" },\n { \"data\": \"fecha_hora_apertura\" },\n { \"data\": \"nombre\" },\n { \"data\": \"detalle\" },\n { \"data\": \"grupo\" }\n ],\n \"columnDefs\": [\n {\n \"targets\": [4],\n \"visible\": false,\n \"searchable\": false\n },\n {\n \"targets\": [6],\n \"visible\": false,\n },\n {\n \"targets\": [7],\n \"visible\": false,\n },\n {\n \"targets\": [8],\n \"visible\": false,\n },\n {\n \"targets\": [11],\n \"visible\": false,\n \"searchable\": false\n },\n {\n \"targets\": [14],\n \"visible\": false,\n },\n {\n \"targets\": [15],\n \"visible\": false,\n \"searchable\": false\n }\n ],\n \"order\": [[4, \"desc\"]],\n \"language\": {\n \"sProcessing\": \"Procesando...\",\n \"sLengthMenu\": \"Mostrar _MENU_ registros\",\n \"sZeroRecords\": \"No se encontraron resultados\",\n \"sEmptyTable\": \"Ningún dato disponible en esta tabla\",\n \"sInfo\": \"Mostrando registros del _START_ al _END_ de un total de _TOTAL_ registros\",\n \"sInfoEmpty\": \"Mostrando registros del 0 al 0 de un total de 0 registros\",\n \"sInfoFiltered\": \"(filtrado de un total de _MAX_ registros)\",\n \"sInfoPostFix\": \"\",\n \"sSearch\": \"Buscar:\",\n \"sUrl\": \"\",\n \"sInfoThousands\": \",\",\n \"sLoadingRecords\": \"Cargando...\",\n \"oPaginate\": {\n \"sFirst\": \"Primero\",\n \"sLast\": \"Último\",\n \"sNext\": \"Siguiente\",\n \"sPrevious\": \"Anterior\"\n },\n \"oAria\": {\n \"sSortAscending\": \": Activar para ordenar la columna de manera ascendente\",\n \"sSortDescending\": \": Activar para ordenar la columna de manera descendente\"\n },\n \"buttons\": {\n \"copy\": \"Copiar\",\n \"colvis\": \"Visibilidad\"\n },\n \"select\": {\n \"rows\": {\n _: \"You have selected %d rows\",\n 0: \"\",\n 1: \"1 fila seleccionada\"\n }\n }\n },\n \"select\": 'single'\n });\n\n // Si el rol del usuario es vista o tecnico, se ocultan las siguientes opciones\n if(rol === \"Vista\" || rol === \"Tecnico\"){\n // Oculta opcion de cerrar registros\n table.column( 1 ).visible( false );\n table.column( 2 ).visible( false );\n table.column( 3 ).visible( false );\n } else if(rol === \"Operador\"){\n table.column( 3 ).visible( false );\n }\n\n // Se agrega el evento para mostrar u ocultar los detalles\n $('#tablaRegistros tbody').on('click', 'td.details-control', function () {\n var tr = $(this).closest('tr');\n var row = table.row(tr);\n\n if (row.child.isShown()) {\n // Si la fila se está mostrando, se oculta\n row.child.hide();\n tr.removeClass('shown');\n }\n else {\n // Muestra ésta fila\n row.child(format(row.data())).show();\n tr.addClass('shown');\n }\n });\n\n // Se agrega el evento para cerrar un registro\n $('#tablaRegistros tbody').on( 'click', 'td.cerrarReg', function () {\n var data = table.row( $(this).parents('tr') ).data();\n var todos = table.data();\n let tipo = \"cerrar\";\n modalAccionesRegistro(data, todos, tipo);\n } );\n\n // Se agrega el evento para editar un registro\n $('#tablaRegistros tbody').on( 'click', 'td.editarReg', function () {\n var data = table.row( $(this).parents('tr') ).data();\n var todos = table.data();\n let tipo = \"editar\";\n modalAccionesRegistro(data, todos, tipo);\n } );\n\n // Se agrega el evento para editar un registro\n $('#tablaRegistros tbody').on( 'click', 'td.borrarReg', function () {\n var data = table.row( $(this).parents('tr') ).data();\n var todos = table.data();\n let tipo = \"borrar\";\n modalAccionesRegistro(data, todos, tipo);\n } );\n\n}", "function mostrarCursosAsociados() {\n\n let listaCheckboxCursos = document.querySelectorAll('#tblCursos tbody input[type=checkbox]:checked');\n\n let cursosAsociados = [];\n let infoCurso;\n\n for (let i = 0; i < listaCheckboxCursos.length; i++) {\n infoCurso = listaCheckboxCursos[i].dataset.codigo;\n cursosAsociados.push(buscarCursoPorCod(infoCurso));\n }\n\n\n let sBuscar = document.querySelector('#txtBuscarCursosPeriodo').value;\n let cuerpoTabla = document.querySelector('#tblCursosPeriodo tbody');\n cuerpoTabla.innerHTML = '';\n\n for (let i = 0; i < cursosAsociados.length; i++) {\n // if (listaCursos[i][1].toLowerCase().includes(sBuscar.toLowerCase())) {\n\n if (cursosAsociados[i][5] == true) {\n let fila = cuerpoTabla.insertRow();\n fila.dataset.id = cursosAsociados[i][0];\n\n let checkSeleccion = document.createElement('input');\n checkSeleccion.setAttribute('type', 'checkbox');\n checkSeleccion.addEventListener('click', verificarCheckCursos);\n checkSeleccion.dataset.codigo = cursosAsociados[i][0];\n checkSeleccion.addEventListener('click', mostrarProfCurso);\n\n let cSeleccion = fila.insertCell();\n let cCodigo = fila.insertCell();\n let cNombre = fila.insertCell();\n\n let sCodigo = document.createTextNode(cursosAsociados[i][0]);\n let sNombre = document.createTextNode(cursosAsociados[i][1]);\n\n let listaCheckboxCursos = document.querySelectorAll('#tblCursosPeriodo tbody input[type=checkbox]');\n\n cSeleccion.appendChild(checkSeleccion);\n cCodigo.appendChild(sCodigo);\n cNombre.appendChild(sNombre);\n }\n }\n}", "function obtener_datos_todos_establecimiento() {\n var lista_datos = conexion_cuestionarios_resuelto();\n var contenido = \"\";\n var sucursal = \"\";\n var indice = 1;\n if (lista_datos.length > 0 ) {\n $.each(lista_datos, function (index, item) {\n if (index == 0) {\n contenido = \"<tr class='celda_tabla_res' style='background-color:#cbf1f5' ><th style='width:60px'>#</th><th style='width:30%'>\"+item.establecimiento+\"</th><th style='width:60px' >limpieza %</th><th style='width:60px'>Surtido %</th><th style='width:60px'>Imagen %</th><th style='width:60px'>Total %</th></tr>\"\n $(\"#tabla_res\").append(contenido);\n sucursal=item.establecimiento;\n }//fin if\n if (sucursal == item.establecimiento) {\n contenido = \"<tr class='celda_tabla_res dato'><td style='width:60px'>\" + indice + \"</td><td class='nombre' style='width:30%'>\" + item.cuestionario + \"</td><td style='width:90px' >\" + item.limpieza + \"</td><td style='width:90px'>\" + item.surtido + \"</td><td style='width:90px'>\" + item.imagen + \"</td><td style='width:60px'>\" + item.total + \"</td></tr>\"\n $(\"#tabla_res\").append(contenido);\n indice++;\n }\n else {\n indice = 1;\n contenido = \"<tr class='celda_tabla_res' style='background-color:#cbf1f5' ><th style='width:60px'>#</th><th style='width:30%'>\" + item.establecimiento + \"</th><th style='width:60px' >limpieza %</th><th style='width:60px'>Surtido %</th><th style='width:60px'>Imagen %</th><th style='width:60px'>Total %</th></tr>\"\n $(\"#tabla_res\").append(contenido);\n contenido = \"<tr class='celda_tabla_res dato'><td style='width:60px'>\" + indice + \"</td><td class='nombre' style='width:30%'>\" + item.cuestionario + \"</td><td style='width:90px' >\" + item.limpieza + \"</td><td style='width:90px'>\" + item.surtido + \"</td><td style='width:90px'>\" + item.imagen + \"</td><td style='width:60px'>\" + item.total + \"</td></tr>\"\n $(\"#tabla_res\").append(contenido);\n sucursal = item.establecimiento;\n indice++;\n }//fin if\n });\n }//fin\n else alert(\"No Hay Datos...\");\n}//fin", "function MostrarRegistro(){\n // declaramos una variable para guardar los datos\n var listaregistro=Mostrar();\n // selecciono el tbody de la tabla donde voy a guardar\n tbody=document.querySelector(\"#tbRegistro tbody\");\n tbody.innerHTML=\"\";\n // agregamos las columnas que se registren\n for(var i=0; i<listaregistro.length;i++){\n // declaramos una variable para la fila\n var fila=tbody.insertRow(i);\n // declaramos variables para los titulos\n var titulonombre=fila.insertCell(0);\n var tituloprecio=fila.insertCell(1);\n var titulocategoria=fila.insertCell(2);\n var titulocantidad=fila.insertCell(3);\n // agregamos los valores\n titulonombre.innerHTML=listaregistro[i].nombre;\n tituloprecio.innerHTML=listaregistro[i].precio;\n titulocategoria.innerHTML=listaregistro[i].categoria\n titulocantidad.innerHTML=listaregistro[i].cantidad;\n tbody.appendChild(fila);\n }\n}", "function cargarTablas() {\n\n\n\n var dataTableRutas_const = function () {\n if ($(\"#dt_rutas\").length) {\n $(\"#dt_rutas\").DataTable({\n dom: \"Bfrtip\",\n bFilter: true,\n ordering: false,\n buttons: [\n {\n extend: \"copy\",\n className: \"btn-sm\",\n text: \"Copiar\"\n },\n {\n extend: \"csv\",\n className: \"btn-sm\",\n text: \"Exportar a CSV\"\n },\n {\n extend: \"print\",\n className: \"btn-sm\",\n text: \"Imprimir\"\n }\n\n ],\n \"columnDefs\": [\n {\n targets: 4,\n className: \"dt-center\",\n render: function (data, type, row, meta) {\n var botones = '<button type=\"button\" class=\"btn btn-default btn-xs\" aria-label=\"Left Align\" onclick=\"showRutasByID(\\''+row[0]+'\\');\">Cargar</button> ';\n botones += '<button type=\"button\" class=\"btn btn-default btn-xs\" aria-label=\"Left Align\" onclick=\"deleteRutasByID(\\''+row[0]+'\\');\">Eliminar</button>';\n return botones;\n }\n }\n\n ],\n pageLength: 2,\n language: dt_lenguaje_espanol,\n ajax: {\n url: '../backend/agenda/controller/rutasController.php',\n type: \"POST\",\n data: function (d) {\n return $.extend({}, d, {\n action: \"showAll_rutas\"\n });\n }\n },\n drawCallback: function (nRow, aData, iDisplayIndex, iDisplayIndexFull) {\n $('#dt_rutas').DataTable().columns.adjust().responsive.recalc();\n }\n });\n }\n };\n\n\n\n TableManageButtons = function () {\n \"use strict\";\n return {\n init: function () {\n dataTableRutas_const();\n $(\".dataTables_filter input\").addClass(\"form-control input-rounded ml-sm\");\n }\n };\n }();\n\n TableManageButtons.init();\n}", "function mostrarDescendente() {\n\n\n let listaCursos = getListaCursosActii();\n\n listaCursos.reverse(); // copiar esto abajo\n\n let cuerpoTabla = document.querySelector('#table tbody');\n cuerpoTabla.innerHTML = '';\n\n for (let i = 0; i < listaCursos.length; i++) {\n let fila = cuerpoTabla.insertRow(i);\n let cSeleccionar = fila.insertCell();\n let cNombre = fila.insertCell();\n let cCodigo = fila.insertCell();\n let cCantidad = fila.insertCell();\n let cCosto = fila.insertCell();\n\n\n let sSeleccionar = document.createTextNode(\"\");\n let sNombre = document.createTextNode(listaCursos[i][0]);\n let sCodigo = document.createTextNode(listaCursos[i][1]);\n let sCantidad = document.createTextNode(listaCursos[i][2]);\n let sCosto = document.createTextNode(listaCursos[i][3]);\n\n cSeleccionar.appendChild(sSeleccionar);\n cNombre.appendChild(sNombre);\n cCodigo.appendChild(sCodigo);\n cCantidad.appendChild(sCantidad);\n cCosto.appendChild(sCosto);\n\n\n // inicio boton Editar \n let botonEditar = document.createElement(\"button\");\n botonEditar.innerText = \"Editar\";\n botonEditar.dataset.codigo = (listaCursos[i][2]);\n botonEditar.classList.add (\"botonTabla\");\n botonEditar.classList.add (\"botonNormal\");\n\n\n botonEditar.addEventListener(\"click\", editar);\n\n cSeleccionar.appendChild(botonEditar);\n\n\n\n // inicio boton deshabilitar \n let botonDeshabilitar = document.createElement(\"button\");\n botonDeshabilitar.innerText = \"Desactivar\";\n botonDeshabilitar.dataset.codigo = (listaCursos[i][2]);\n botonDeshabilitar.classList.add(\"botonTabla\");\n botonDeshabilitar.classList.add(\"botonDesactivar\");\n\n botonDeshabilitar.addEventListener(\"click\",deshabilitar);\n \n cSeleccionar.appendChild(botonDeshabilitar);\n \n\n \n }\n }", "function CargarTablaPorFechasRegistro()\n {\n var table = $(\"#TablaPolizaPorFecha\").DataTable({\n //Especificacion de Ancho y Alto de la tabla\n \"rowCallback\": function( row, data, index ) {\n if ( data.Activo == \"1\" ) \n {\n $('td:eq(3)', row).html( '<b>Activo</b>' );\n $('td:eq(3)', row).css('background-color', '#98FEE6');\n }\n else\n {\n $('td:eq(3)', row).html( '<b>Inactivo</b>' );\n $('td:eq(3)', row).css('background-color', '#FEE698');\n }\n $('td:eq(0)', row).css('background-color', '#ECECEC');\n },\n \"scrollY\": \"200px\",\n \"scrollX\": \"600px\",\n \"destroy\": true,\n //Especificaciones de las Columnas que vienen y deben mostrarse\n \"columns\" : [\n { data : 'Idn' },\n { data : 'Codigo' },\n { data : 'Cliente.CedulaRif' },\n { data : 'Cliente.Nombre' },\n { data : 'Cliente.Apellido' },\n { data : 'Analista.CedulaRif' },\n { data : 'Analista.Nombre' },\n { data : 'Aseguradora.Nombre' },\n { data : 'Relacionado.Cedula' },\n { data : 'Relacionado.Nombre' },\n { data : 'Relacionado.Apellido' },\n { data : 'Producto.Nombre' },\n { data : 'Productor.RIF' },\n { data : 'Productor.Nombre' },\n { data : 'Moneda.Nombre' },\n { data : 'TipoPoliza.Nombre' },\n { data : 'TipoPago.Nombre' },\n { data : 'EstatusPoliza.Nombre' },\n { data : 'Comision' },\n { data : 'FechaEmision' },\n { data : 'FechaInicio' },\n { data : 'FechaRegistro' },\n { data : 'FechaVencimiento' },\n { data : 'Observacion' },\n { data : 'Deducible' },\n { data : 'SumaAseguradora' },\n { data : 'PrimaAseguradora' }\n \n ,\n { data : 'Activo' }\n ], \n //Especificaciones de la URL del servicio para cargar la tabla\n \"ajax\": {\n url: \"\"+ global + \"/Polizas/FechaEmision\",\n dataSrc : ''\n }\n\n }); \n //Al hacer clic en la tabla carga los campos en los TXT\n\n\n }", "function TraerEstadisticas(){\n var fechaInicio = $(\"#fechaInicio\").val();\n var fechaFinal = $(\"#fechaFinal\").val();\n var urlEstadisticas = 'http://localhost/ESTACIONAMIENTO_2017/APIREST/Estadisticas';\n \n if(fechaInicio != \"\" && fechaFinal != \"\"){\n urlEstadisticas += '/' + fechaInicio + '/'+ fechaFinal;\n }\n $.ajax({\n url: urlEstadisticas,\n method: 'GET',\n dataType: 'json',\n async: true\n }).done(function(result){\n $(\"#tablaEstadisticas\").DataTable({\n \"bDestroy\": true,\n \"order\": [[ 5, \"asc\"]],\n \"language\": {\n url:'dataTablesSpanish.json'\n },\n data: result[\"Usadas\"],\n columns: [\n { data: 'Piso'},\n { data: 'Numero'},\n { data: 'Patente'},\n { data: 'Marca'},\n { data: 'Color'},\n { data: 'Fecha_Ingreso'},\n { data: 'Fecha_Salida'},\n { data: 'Importe'}\n ]\n });\n \n var div = $(\"#estadisticasCocheras\");\n div.html(\"\");\n\n // Verifico que se haya usado alguna cochera\n if(!$.isEmptyObject(result[\"cocheraMasUsada\"])){\n div.append(\"<h2>Cochera mas usada</h2>\" + \"Numero \" + result[\"cocheraMasUsada\"][\"Numero\"] + \" piso \" + result[\"cocheraMasUsada\"][\"Piso\"]);\n }\n\n // Verifico que se haya usado alguna cochera\n if(!$.isEmptyObject(result[\"cocheraMenosUsada\"])){\n div.append(\"<h2>Cochera menos usada</h2>\" + \"Numero \" + result[\"cocheraMenosUsada\"][\"Numero\"] + \" piso \" + result[\"cocheraMenosUsada\"][\"Piso\"]);\n }\n\n // Verifico que haya cocheras sin usar\n if(result[\"cocherasSinUsar\"].length > 0){\n div.append(\"<h2>Cocheras no usadas</h2>\");\n var listado = '<ul class=\"list-group\">';\n result[\"cocherasSinUsar\"].forEach(function(element) {\n listado += '<li class=\"list-group-item\">';\n listado += element[\"Numero\"] + \" Piso \" + element[\"Piso\"];\n listado += '</li>';\n }, this);\n listado += '</ul>';\n div.append(listado);\n }\n $(\"#divResultado\").show();\n }).fail(function(result){\n $(\"#divContenido\").prepend('<div class=\"alert alert-danger alert-dismissable\"><a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>Error al comunicarse con la API</div>');\n });\n \n \n}", "function cargarTablaApuestasPlayer(fechaInicial,fechaFinal,empresa,usuario) {\n\n$('.tablaApuestasPlayer').DataTable({\n \"ajax\": \"ajax/apuestas/tabla-apuestas-player.ajax.php?perfil=\"+$(\"#perfilOculto\").val() + \"&fechaInicial2=\" + fechaInicial + \"&fechaFinal2=\" + fechaFinal+ \"&empresa=\" + $(\"#empresaDate\").val() + \"&usuario=\" + $(\"#userDate\").val(),\n \"deferRender\": true,\n \"retrieve\": true,\n \"processing\": true,\n \"order\": [[7, \"desc\"]],\n\t\"pageLength\": 20,\n\t\"lengthMenu\": [[20, 40, 60, -1], [20, 40, 60, 'Todos']],\n \"language\": {\n \"sProcessing\": \"Procesando...\",\n \"sLengthMenu\": \"Mostrar _MENU_ registros\",\n \"sZeroRecords\": \"No se encontraron resultados\",\n \"sEmptyTable\": \"Ningún dato disponible en esta tabla\",\n \"sInfo\": \"Mostrando registros del _START_ al _END_ de un total de _TOTAL_\",\n \"sInfoEmpty\": \"Mostrando registros del 0 al 0 de un total de 0\",\n \"sInfoFiltered\": \"(filtrado de un total de _MAX_ registros)\",\n \"sInfoPostFix\": \"\",\n \"sSearch\": \"Buscar:\",\n \"sUrl\": \"\",\n \"sInfoThousands\": \",\",\n \"sLoadingRecords\": \"Cargando...\",\n \"oPaginate\": {\n \"sFirst\": \"Primero\",\n \"sLast\": \"Último\",\n \"sNext\": \"Siguiente\",\n \"sPrevious\": \"Anterior\"\n },\n \"oAria\": {\n \"sSortAscending\": \": Activar para ordenar la columna de manera ascendente\",\n \"sSortDescending\": \": Activar para ordenar la columna de manera descendente\"\n }\n },\n});\n\n}", "function tablaresultadosordencompra(limite)\r\n{\r\n \r\n \r\n var decimales = document.getElementById('decimales').value;\r\n var base_url = document.getElementById('base_url').value;\r\n var controlador = base_url+'orden_compra/buscar_ordenescompra';\r\n let parametro = \"\";\r\n if(limite == 2){\r\n parametro = document.getElementById('filtrar').value;\r\n }else if(limite == 3){\r\n parametro = \"\";\r\n }\r\n //document.getElementById('loader').style.display = 'block'; //muestra el bloque del loader\r\n $.ajax({url: controlador,\r\n type:\"POST\",\r\n data:{parametro:parametro},\r\n success:function(respuesta){\r\n var registros = JSON.parse(respuesta);\r\n var color = \"\";\r\n if (registros != null){\r\n //var formaimagen = document.getElementById('formaimagen').value;\r\n var n = registros.length; //tamaño del arreglo de la consulta\r\n $(\"#encontrados\").html(n);\r\n html = \"\";\r\n for (var i = 0; i < n ; i++){\r\n html += \"<tr>\";\r\n html += \"<td style='padding: 2px;' class='text-center'>\"+(i+1)+\"</td>\";\r\n html += \"<td style='padding: 2px;'>\"+registros[i]['usuario_nombre']+\"</td>\";\r\n html += \"<td style='padding: 2px;' class='text-center'>\"+registros[i]['ordencompra_id']+\"</td>\";\r\n html += \"<td style='padding: 2px;' class='text-center'>\";\r\n html += moment(registros[i][\"ordencompra_fecha\"]).format(\"DD/MM/YYYY\");\r\n html += \"</td>\";\r\n html += \"<td style='padding: 2px;' class='text-center'>\"+registros[i]['ordencompra_hora']+\"</td>\";\r\n html += \"<td style='padding: 2px;' class='text-center'>\";\r\n html += moment(registros[i][\"ordencompra_fechaentrega\"]).format(\"DD/MM/YYYY\");\r\n html += \"</td>\";\r\n html += \"<td style='padding: 2px;' class='text-center'>\"+registros[i]['proveedor_nombre']+\"</td>\";\r\n html += \"<td style='padding: 2px;' class='text-right'>\"+Number(registros[i]['ordencompra_totalfinal']).toFixed(decimales)+\"</td>\";\r\n html += \"<td style='padding: 2px;' class='text-center'>\"+registros[i]['estado_descripcion']+\"</td>\";\r\n html += \"<td style='padding: 2px;' class='no-print'>\";\r\n html += \"<a href='\"+base_url+\"orden_compra/edit/\"+registros[i][\"ordencompra_id\"]+\"' class='btn btn-info btn-xs' title='Modificar orden compra' ><span class='fa fa-pencil'></span></a>&nbsp;\";\r\n html += \"<a class='btn btn-success btn-xs' onclick='mostrar_reciboorden(\"+registros[i]['ordencompra_id']+\")' title='Ver reporte orden compra'><fa class='fa fa-print'></fa></a>&nbsp;\";\r\n html += \"<a class='btn btn-facebook btn-xs' onclick='mostrar_reciboordenp(\"+registros[i]['ordencompra_id']+\")' title='Ver reporte orden compra para proveedor'><fa class='fa fa-print'></fa></a>&nbsp;\";\r\n if(registros[i]['estado_id'] == 33){\r\n html += \"<a class='btn btn-danger btn-xs' onclick='modal_ejecutarordencompra(\"+registros[i]['ordencompra_id']+\")' title='Ejecutar orden compra'><fa class='fa fa-bolt'></fa></a>&nbsp;\";\r\n html += \"<a class='btn btn-warning btn-xs' onclick='modal_anularordencompra(\"+registros[i]['ordencompra_id']+\")' title='Anular orden compra'><fa class='fa fa-minus-circle'></fa></a>\";\r\n }/*else if(registros[i]['estado_id'] == 35){\r\n html += \"<a class='btn btn-warning btn-xs' onclick='modal_anularordencmpra(\"+registros[i]['ordencompra_id']+\")' title='Anular orden compra'><fa class='fa fa-minus-circle'></fa></a>\";\r\n }*/\r\n \r\n html += \"</td>\";\r\n html += \"</tr>\";\r\n }\r\n $(\"#tablaresultados\").html(html);\r\n //document.getElementById('loader').style.display = 'none';\r\n }\r\n //document.getElementById('loader').style.display = 'none'; //ocultar el bloque del loader\r\n },\r\n error:function(respuesta){\r\n // alert(\"Algo salio mal...!!!\");\r\n html = \"\";\r\n $(\"#tablaresultados\").html(html);\r\n },\r\n complete: function (jqXHR, textStatus) {\r\n //document.getElementById('loader').style.display = 'none'; //ocultar el bloque del loader \r\n //tabla_inventario();\r\n }\r\n });\r\n}", "function CargarTablaPorFechasEmision()\n {\n var table = $(\"#TablaPolizaPorFecha\").DataTable({\n //Especificacion de Ancho y Alto de la tabla\n \"rowCallback\": function( row, data, index ) {\n if ( data.Activo == \"1\" ) \n {\n $('td:eq(3)', row).html( '<b>Activo</b>' );\n $('td:eq(3)', row).css('background-color', '#98FEE6');\n }\n else\n {\n $('td:eq(3)', row).html( '<b>Inactivo</b>' );\n $('td:eq(3)', row).css('background-color', '#FEE698');\n }\n $('td:eq(0)', row).css('background-color', '#ECECEC');\n },\n \"scrollY\": \"200px\",\n \"scrollX\": \"600px\",\n \"destroy\": true,\n //Especificaciones de las Columnas que vienen y deben mostrarse\n \"columns\" : [\n { data : 'Idn' },\n { data : 'Codigo' },\n { data : 'Cliente.CedulaRif' },\n { data : 'Cliente.Nombre' },\n { data : 'Cliente.Apellido' },\n { data : 'Analista.CedulaRif' },\n { data : 'Analista.Nombre' },\n { data : 'Aseguradora.Nombre' },\n { data : 'Relacionado.Cedula' },\n { data : 'Relacionado.Nombre' },\n { data : 'Relacionado.Apellido' },\n { data : 'Producto.Nombre' },\n { data : 'Productor.RIF' },\n { data : 'Productor.Nombre' },\n { data : 'Moneda.Nombre' },\n { data : 'TipoPoliza.Nombre' },\n { data : 'TipoPago.Nombre' },\n { data : 'EstatusPoliza.Nombre' },\n { data : 'Comision' },\n { data : 'FechaEmision' },\n { data : 'FechaInicio' },\n { data : 'FechaRegistro' },\n { data : 'FechaVencimiento' },\n { data : 'Observacion' },\n { data : 'Deducible' },\n { data : 'SumaAseguradora' },\n { data : 'PrimaAseguradora' }\n \n ,\n { data : 'Activo' }\n ], \n //Especificaciones de la URL del servicio para cargar la tabla\n \"ajax\": {\n url:''+ global + '/Poliza/Fecha',\n dataSrc : ''\n }\n\n }); \n //Al hacer clic en la tabla carga los campos en los TXT\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}", "function listar() {\n\n\t\ttabla=$('#resolucion_data').dataTable({\n\t\t\t\"aProcessing\":true,//Activamos procesamiento de datatable\n\t\t\t\"aServerSide\":true,//Paginacion y filtrado realizados por el servidor\n\t\t\tdom:'Bfrtip',//Definimos los elementos del control de table\n\t\t\tbuttons:[\n\t\t\t\t'copyHtml5',\n\t\t\t\t'excelHtml5',\n\t\t\t\t'pdf'//para los botones en el datatable\n\t\t\t\t],\n\t\t\t\"ajax\":\n\t\t\t{\n\t\t\t\turl:'../ajax/resolucion.php?op=buscar_resolucion',//enviamos el parametro \n\t\t\t\ttype:\"get\",//el tipo del parametro\n\t\t\t\tdataType:\"json\",//formato de la data\n\n\t\t\t\terror: function (e) {\n\t\t\t\t\tconsole.log(e.responseText);//para hacer la verificacion de errores\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"bDestroy\":true,\n\t\t\t\"responsive\":true,\n\t\t\t\"bInfo\":true,//informacion del los datatable\n\t\t\t\"iDisplayLength\":20,//Pora cada 10 registros hace una paginacion\n\t\t\t\"order\":[[0,\"desc\"]],//Ordenar (Columna,orden)\n \t\t\t\n \t\t\t\"language\": {\n \n\t\t\t \"sProcessing\": \"Procesando...\",\n\t\t\t \n\t\t\t \"sLengthMenu\": \"Mostrar _MENU_ registros\",\n\t\t\t \n\t\t\t \"sZeroRecords\": \"No se encontraron resultados\",\n\t\t\t \n\t\t\t \"sEmptyTable\": \"Ningún dato disponible en esta tabla\",\n\t\t\t \n\t\t\t \"sInfo\": \"Mostrando un total de _TOTAL_ registros\",\n\t\t\t \n\t\t\t \"sInfoEmpty\": \"Mostrando un total de 0 registros\",\n\t\t\t \n\t\t\t \"sInfoFiltered\": \"(filtrado de un total de _MAX_ registros)\",\n\t\t\t \n\t\t\t \"sInfoPostFix\": \"\",\n\t\t\t \n\t\t\t \"sSearch\": \"Buscar:\",\n\t\t\t \n\t\t\t \"sUrl\": \"\",\n\t\t\t \n\t\t\t \"sInfoThousands\": \",\",\n\t\t\t \n\t\t\t \"sLoadingRecords\": \"Cargando...\",\n\t\t\t \n\t\t\t \"oPaginate\": {\n\t\t\t \n\t\t\t \"sFirst\": \"Primero\",\n\t\t\t \n\t\t\t \"sLast\": \"Último\",\n\t\t\t \n\t\t\t \"sNext\": \"Siguiente\",\n\t\t\t \n\t\t\t \"sPrevious\": \"Anterior\"\n\t\t\t \n\t\t\t },\n\t\t\t \n\t\t\t \"oAria\": {\n\t\t\t \n\t\t\t \"sSortAscending\": \": Activar para ordenar la columna de manera ascendente\",\n\t\t\t \n\t\t\t \"sSortDescending\": \": Activar para ordenar la columna de manera descendente\"\n\t\t\t\n\t\t\t }\n\n\t\t\t }//cerrando language\n\t\t}).DataTable();\n\t}", "function getCombustivelTable() {\n //Populates Table with Json\n tableCombustivel = $('table#table-combustivel').DataTable({\n ajax: {\n url: urlApi + \"combustivel\",\n contentType: 'application/json; charset=UTF-8',\n dataType: 'json'\n },\n columns: [{\n data: \"id\"\n }, {\n data: \"tipo\"\n }],\n columnDefs: [\n {\n width: '20%',\n targets: 'combIdCol'\n }\n ],\n select: true,\n lengthChange: false,\n pageLength: 5,\n dom: 'lrti<\"right\"p>',\n language: {\n url: \"../../doc/Portuguese-Brasil.json\"\n }\n });\n}", "function cargaComplementos(){\n //Cargado del DataTables\n if($('table').length>0){\n $('table').DataTable();\n }\n \n //Cargado del DatePicker\n if($(\".date-picker\").toArray().length>0){\n $('.date-picker').datepicker({\n format : \"dd/mm/yyyy\"\n });\n }\n \n //Cargado del Input Mask con el formato \"dd/mm/yyyy\"\n if($('.input-date').toArray().length>0){\n $(\".input-date\").inputmask(\"dd/mm/yyyy\");\n }\n if($('.select2').toArray().length>0){\n $(\".select2\").select2({\n placeholder : \"Seleccione una opción\"\n });\n }\n}", "function mostrarXDocente(){\r\n let alumnosDocente = buscarAlumnosPorDocente(usuarioLoggeado);\r\n let mensaje = alumnosDocente;\r\n if (mensaje !== \"\"){\r\n document.querySelector(\"#divMostrarTablaXDocente\").innerHTML = mensaje;\r\n let filasDeTabla = document.querySelectorAll(\".tabFilaAsignarNivel\"); //Sumo funcionalidad para que pueda seleccionar un alumno de la tabla para asignar nivel\r\n for(let i=0; i<filasDeTabla.length; i++){\r\n const element = filasDeTabla[i];\r\n element.addEventListener(\"click\", setValuetxtNomAlumno);\r\n }\r\n }else{\r\n document.querySelector(\"#errorMostrarAlumnosXDocente\").innerHTML = \"No tiene alumnos asignados\";\r\n }\r\n}", "function cargarDataT(){\n\t$(\"#TDataEstu\").DataTable({\n\t\t\"ajax\":{\n\t\t\t\"method\" : \"Get\",\n\t\t\t\"url\" : \"/estudiantes/allEstudiantes\"\n\t\t},\n\t\t\"columns\" :[{\n\t\t\t\"data\" : \"id_estudiante\",\n\t\t\t\"width\" : \"5%\"\n\t\t},{\n\t\t\t\"data\" : \"institucion\",\n\t\t\t\"width\" : \"20%\"\n\t\t},{\n\t\t\t\"data\" : \"nombre\",\n\t\t\t\"width\" : \"12%\"\n\t\t},{\n\t\t\t\"data\" : \"apellido\",\n\t\t\t\"width\" : \"12%\"\n\t\t},{\n\t\t\t\"data\" : \"email\",\n\t\t\t\"width\" : \"15%\"\n\t\t},{\n\t\t\t\"data\" : \"telefono\",\n\t\t\t\"width\" : \"10%\"\n\t\t},{\n\t\t\t\"data\" : \"opciones\",\n\t\t\t\"width\" : \"26%\"\n\t\t}],\n\t\t\"scrollY\":400,\n\t\t\n\t\t\"language\" : {\n \"lengthMenu\" : \"Mostrar _MENU_ \",\n \"zeroRecords\" : \"Datos no encontrados\",\n \"info\" : \"Mostar páginas _PAGE_ de _PAGES_\",\n \"infoEmpty\" : \"Datos no encontrados\",\n \"infoFiltered\" : \"(Filtrados por _MAX_ total registros)\",\n \"search\" : \"Buscar:\",\n \"paginate\" : {\n \"first\" : \"Primero\",\n \"last\" : \"Anterior\",\n \"next\" : \"Siguiente\",\n \"previous\" : \"Anterior\"\n },\n }\n\t});\n}", "function obtener_cursos_guardados() {\n var consulta = conexion_ajax(\"/servicios/dh_cursos.asmx/obtener_datos_cursos\")\n $(\".datos_curso\").remove()\n $.each(consulta, function (index, item) {\n\n var filla = $(\"<tr class='datos_curso'></tr>\")\n filla.append($(\"<td></td>\").append(item.id_curso).css({\"width\":\"30px\",\"text-align\":\"center\"}))\n filla.append($(\"<td></td>\").append(item.nombre_curso))\n filla.append($(\"<td></td>\").append(item.puesto_pertenece).css({ \"text-align\": \"center\" }))\n filla.append($(\"<td></td>\").append(\n (function (valor) {\n var dato;\n $(\"#puestos option\").each(function (index, item) {\n if (valor == parseInt($(this).attr(\"name\")))\n dato = $(this).val();\n })\n return dato;\n }(item.puesto_pertenece))\n ))\n filla.append($(\"<td></td>\").append(\n (function (estatus) {\n if (estatus == \"v\" || estatus==\"V\")\n return \"vigente\";\n else if (estatus == \"c\" || estatus == \"C\")\n return \"cancelado\"\n else return \"indefinido\"\n }(item.estatus))\n ).css({ \"text-align\": \"center\" }))\n $(\"#tabla_cursos\").append(filla)\n })\n filtrar_tabla_cursos();\n //funcion onclick tabla Cursos\n $(\".datos_curso\").on(\"click\", function () {\n Habilitar_bloquear_controles(true);\n var consulta = { \n id_curso: \"\"\n , nombre_curso: \"\"\n , estatus: \"\"\n , puesto_pertenece: \"\"\n };\n $(this).children(\"td\").each(function (index, item) {\n switch (index) {\n case 0:\n consulta.id_curso = $(this).text();\n case 1:\n consulta.nombre_curso = $(this).text();\n case 3:\n consulta.puesto_pertenece = $(this).text();\n case 4:\n consulta.estatus = $(this).text();\n } \n })\n\n $(\"#folio_curso\").val(consulta.id_curso)\n $(\"#Nombre_curso\").val(consulta.nombre_curso)\n $(\"#estatus_cusro\").val(\n (function (estatus) {\n if (estatus == \"vigente\")\n return \"V\";\n else if (estatus == \"cancelado\")\n return \"C\"\n else return \"\"\n }(consulta.estatus))\n )\n $(\"#selector_puestos\").val(consulta.puesto_pertenece)\n $(\".datos_curso\").removeClass(\"seleccio_curso\")\n $(this).toggleClass(\"seleccio_curso\")\n // checar_imagen_cambio();\n obtener_imagen()\n })\n \n}", "function mostrarEstAlumnosParaDocente(){\r\n let contadorEjXNivel = 0;//variable para contar cuantos ejercicios planteo el docente para el nivel del alumno\r\n let contadorEntXNivel = 0;//variable para contar cuantos ejercicios de su nivel entrego el alumno\r\n let alumnoSeleccionado = document.querySelector(\"#selEstAlumnos\").value;\r\n let posicionUsuario = alumnoSeleccionado.charAt(1);\r\n let usuario = usuarios[posicionUsuario];\r\n let nivelAlumno = usuario.nivel;\r\n for (let i = 0; i < ejercicios.length; i++){\r\n const element = ejercicios[i].Docente.nombreUsuario;\r\n if(element === usuarioLoggeado){\r\n if(ejercicios[i].nivel === nivelAlumno){\r\n contadorEjXNivel ++;\r\n }\r\n }\r\n }\r\n for (let i = 0; i < entregas.length; i++) {\r\n const element = entregas[i].Alumno.nombreUsuario;\r\n if(element === usuario.nombreUsuario){\r\n if(entregas[i].Ejercicio.nivel === nivelAlumno){\r\n contadorEntXNivel++;\r\n }\r\n }\r\n }\r\n document.querySelector(\"#pMostrarEstAlumnos\").innerHTML = `El alumno ${usuario.nombre} tiene ${contadorEjXNivel} ejercicios planteados para su nivel (${nivelAlumno}) sobre los cuales a realizado ${contadorEntXNivel} entrega/s. `;\r\n}", "function cargarTableEstu(){\n\t$(\"#TDataEstudiante\").DataTable({\n\t\t\"ajax\": {\n\t\t\t\"method\" : \"Get\",\n\t\t\t\"url\" : \"/grupoestudiantes/allEstudiantes\"\n\t\t\t\t},\n\t\t\"columns\" :[{\n\t\t\t\"data\" : \"id_estudiante\"\n\t\t},{\n\t\t\t\"data\" : \"nombre\"\n\t\t},{\n\t\t\t\"data\" : \"apellido\"\n\t\t},{\n\t\t\t\"data\" : \"id_institucion\"\n\t\t},{\n\t\t\t\"data\" : \"opciones\"\n\t\t}],\n\t\t\n\t\t\"language\" : {\n \"lengthMenu\" : \"Mostrar _MENU_ \",\n \"zeroRecords\" : \"Datos no encontrados\",\n \"info\" : \"Mostar páginas _PAGE_ de _PAGES_\",\n \"infoEmpty\" : \"Datos no encontrados\",\n \"infoFiltered\" : \"(Filtrados por _MAX_ total registros)\",\n \"search\" : \"Buscar:\",\n \"paginate\" : {\n \"first\" : \"Primero\",\n \"last\" : \"Anterior\",\n \"next\" : \"Siguiente\",\n \"previous\" : \"Anterior\"\n },\n }\n\t});\n}", "function agregarFilas(estados){\n $('#estado_data').DataTable().clear().draw();\n for(var i=0 ; estados[i] ; i++){\n var estado = estados[i],\n nombre = estado.nombre,\n codigo = estado.codestado,\n estatus = estado.estatus,\n nombre_pais = estado.nombre_pais;\n getFilas(nombre, codigo, estatus,nombre_pais)\n }\n $('#estado_data').DataTable().draw();\n}", "function listar_ar_venta(){\n tabla_ar_venta=$('#lista_ar_ventas_data').dataTable(\n {\n \"aProcessing\": true,//Activamos el procesamiento del datatables\n \"aServerSide\": true,//Paginación y filtrado realizados por el servidor\n dom: 'Bfrtip',//Definimos los elementos del control de tabla\n responsive: true,\n buttons: [\n 'copyHtml5',\n 'excelHtml5',\n 'csvHtml5',\n 'pdf'\n ],\n \"ajax\":\n {\n url: 'ajax/productos.php?op=listar_ar_venta',\n type : \"get\",\n dataType : \"json\",\n error: function(e){\n console.log(e.responseText);\n }\n },\n \"bDestroy\": true,\n \"responsive\": true,\n \"bInfo\":true,\n \"iDisplayLength\": 10,//Por cada 10 registros hace una paginación\n \"order\": [[ 0, \"desc\" ]],//Ordenar (columna,orden)\n\n \"language\": {\n\n \"sProcessing\": \"Procesando...\",\n\n \"sLengthMenu\": \"Mostrar _MENU_ registros\",\n\n \"sZeroRecords\": \"No se encontraron resultados\",\n\n \"sEmptyTable\": \"Ningún dato disponible en esta tabla\",\n\n \"sInfo\": \"Mostrando un total de _TOTAL_ registros\",\n\n \"sInfoEmpty\": \"Mostrando un total de 0 registros\",\n\n \"sInfoFiltered\": \"(filtrado de un total de _MAX_ registros)\",\n\n \"sInfoPostFix\": \"\",\n\n \"sSearch\": \"Buscar:\",\n\n \"sUrl\": \"\",\n\n \"sInfoThousands\": \",\",\n\n \"sLoadingRecords\": \"Cargando...\",\n\n \"oPaginate\": {\n\n \"sFirst\": \"Primero\",\n\n \"sLast\": \"Último\",\n\n \"sNext\": \"Siguiente\",\n\n \"sPrevious\": \"Anterior\"\n\n },\n\n \"oAria\": {\n\n \"sSortAscending\": \": Activar para ordenar la columna de manera ascendente\",\n\n \"sSortDescending\": \": Activar para ordenar la columna de manera descendente\"\n\n }\n\n }//cerrando language\n\n }).DataTable();\n}", "function cargarInformacionEnTabla(data)\n{\n\t\t\n\t\t//se destruye el datatable al inicio\n\tif(typeof table !== \"undefined\")\n\t{\n\t\t\n table.destroy(); \n $('#tablaModulos').empty();\n }\n\t\t\n\t\t\t\n\t\t table = $('#tablaModulos').DataTable({\n\t\t\t\"data\": data,\n\t\t\tcolumns: [\n\t\t\t{ data: \"bloques\"},\n\t\t\t{ data: \"LUNES\"},\n\t\t\t{ data: \"MARTES\"},\n\t\t\t{ data: \"MIERCOLES\" },\n\t\t\t{ data: \"JUEVES\" },\n\t\t\t{ data: \"VIERNES\" },\n\t\t\t{ data: \"SABADO\" },\n\t\t\t{ data: \"DOMINGO\" },\n\t\t\t\n\t\t\t// {data: null, className: \"center\", defaultContent: '<a id=\"view-link\" class=\"edit-link\" href=\"#\" title=\"Edit\">Estudiantes por Salón </a>'},\n\t\t\t// {data: null, className: \"center\", defaultContent: '<a id=\"asistencias-link\" class=\"asistencias-link\" href=\"#\" title=\"Edit\">Asistencias</a>'}\n\t\t\t],\n\t\t\t\"info\": false,\n\t\t\t\"order\": [[ 0, \"asc\" ]],\n\t\t\t\"scrollY\": \"300px\",\n\t\t\t\"scrollX\": true,\n\t\t\t\"bDestroy\": true,\n\t\t\t\"bSort\": false,\n\t\t\t\"scrollCollapse\": true,\n\t\t\t\"searching\": false,\n\t\t\t\"paging\": false,\n\t\t\t\"filter\":false,\n\t\t\t\"columnDefs\": [\n\t\t\t// {\"targets\": [ 0 ],\"visible\": true,\"searchable\": true},\n\t\t\t// {\"targets\": [ 1 ],\"visible\": true,\"searchable\": false},\n\t\t\t// {\"targets\": [ 3 ],\"visible\": false,\"searchable\": false},\n\t\t\t// {\"targets\": [ 5 ],\"visible\": false,\"searchable\": false},\n\t\t\t// {\"targets\": [ 15 ],\"visible\": false,\"searchable\": false},\n\t\t\t// {\"targets\": [ 13 ],\"visible\": false,\"searchable\": false},\n\t\t\t// {\"targets\": [ 16 ],\"visible\": false,\"searchable\": false},\n\t\t\t// {\"targets\": [ 17 ],\"visible\": false,\"searchable\": false}\n\t\t\t],\n\t\t\t\"language\": {\n\t\t\t\t\"url\": \"//cdn.datatables.net/plug-ins/9dcbecd42ad/i18n/Spanish.json\",\n \"sProcessing\": \"Procesando...\",\n\t\t\t\t\"sSearch\": \"Filtrar:\",\n\t\t\t\t\"zeroRecords\": \"Ningún resultado encontrado\",\n\t\t\t\t\"infoEmpty\": \"No hay registros disponibles\",\n\t\t\t\t\"Search:\": \"Filtrar\"\n\t\t\t}\n\t\t});\n\t\t\n}", "function listar(cuadro){\n\t\t$('#tabla tbody').off('click');\n\t\tcuadros(cuadro, \"#cuadro1\");\n\t\tvar url=document.getElementById('ruta').value; //obtiene la ruta del input hidden con la variable <?=base_url()?>\n\t\tvar table=$(\"#tabla\").DataTable({\n\t\t\t\"destroy\":true,\n\t\t\t\"stateSave\": true,\n\t\t\t\"serverSide\":false,\n\t\t\t\"ajax\":{\n\t\t\t\t\"method\":\"POST\",\n\t\t\t\t\"url\": url + \"EsquemaComision/listado_esquema_comision\",\n\t\t\t\t\"dataSrc\":\"\"\n\t\t\t},\n\t\t\t\"columns\":[\n\t\t\t\t{\"data\": \"id_esquema_comision\",\n\t\t\t\t\trender : function(data, type, row) {\n\t\t\t\t\t\treturn \"<input type='checkbox' class='checkitem chk-col-blue' id='item\"+data+\"' value='\"+data+\"'><label for='item\"+data+\"'></label>\"\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{\"data\":\"idVendedor\"},\n\t\t\t\t{\"data\":\"tipoVendedor\"},\n\t\t\t\t{\"data\":\"num_ventas_mes\"},\n\t\t\t\t{\"data\":\"tipoPlazo\"},\n\t\t\t\t{\"data\":\"porctj_comision\",\n\t\t\t\t\trender : function(data, type, row) {\n\t\t\t\t\t\treturn data.replace('.',',') + \" %\";\n\t \t\t}\n\t\t\t\t},\n\t\t\t\t{\"data\":\"fec_regins\",\n\t\t\t\t\trender : function(data, type, row) {\n\t\t\t\t\t\treturn cambiarFormatoFecha(data);\n\t \t\t}\n\t\t\t\t},\n\t\t\t\t{\"data\":\"correo_usuario\"},\n\t\t\t\t{\"data\": null,\n\t\t\t\t\trender : function(data, type, row) {\n\t\t\t\t\t\tvar botones = \"\";\n\t\t\t\t\t\tif(consultar == 0)\n\t\t\t\t\t\t\tbotones += \"<span class='consultar btn btn-xs btn-info waves-effect' data-toggle='tooltip' title='Consultar'><i class='fa fa-eye' style='margin-bottom:5px'></i></span> \";\n\t\t\t\t\t\tif(actualizar == 0)\n\t\t\t\t\t\t\tbotones += \"<span class='editar btn btn-xs btn-primary waves-effect' data-toggle='tooltip' title='Editar'><i class='fa fa-pencil-square-o' style='margin-bottom:5px'></i></span> \";\n\t\t\t\t\t\tif(data.status == 1 && actualizar == 0)\n\t\t\t\t\t\t\tbotones += \"<span class='desactivar btn btn-xs btn-warning waves-effect' data-toggle='tooltip' title='Desactivar'><i class='fa fa-unlock' style='margin-bottom:5px'></i></span> \";\n\t\t\t\t\t\telse if(data.status == 2 && actualizar == 0)\n\t\t\t\t\t\t\tbotones += \"<span class='activar btn btn-xs btn-warning waves-effect' data-toggle='tooltip' title='Activar'><i class='fa fa-lock' style='margin-bottom:5px'></i></span> \";\n\t\t\t\t\t\tif(borrar == 0)\n\t\t \t\tbotones += \"<span class='eliminar btn btn-xs btn-danger waves-effect' data-toggle='tooltip' title='Eliminar'><i class='fa fa-trash-o' style='margin-bottom:5px'></i></span>\";\n\t\t \t\treturn botones;\n\t\t \t}\n\t\t\t\t}\n\t\t\t],\n\t\t\t\"language\": idioma_espanol,\n\t\t\t\"dom\": 'Bfrtip',\n\t\t\t\"responsive\": true,\n\t\t\t\"buttons\":[\n\t\t\t\t'copy', 'csv', 'excel', 'pdf', 'print'\n\t\t\t]\n\t\t});\n\t\tver(\"#tabla tbody\", table);\n\t\teditar(\"#tabla tbody\", table);\n\t\teliminar(\"#tabla tbody\", table);\n\t\tdesactivar(\"#tabla tbody\", table);\n\t\tactivar(\"#tabla tbody\", table);\n\t}", "function listar()\n{\n\t tabla=$('#listado').dataTable(\n\t{\n\t\t\"aProcessing\": true,//Activamos el procesamiento del datatables\n\t \"aServerSide\": true,//Paginación y filtrado realizados por el servidor\n\t dom: 'Bfrtip',//Definimos los elementos del control de tabla\n\t buttons: [\t\t \n\t \n\t\t 'copyHtml5',\n\t\t 'excelHtml5',\n\t\t 'csvHtml5',\n\t\t 'pdf'\n\t\t ],\n\t\t\"ajax\":\n\t\t\t\t{\n\n\t\t\turl: '../controller/persona.php?op=listarc',\n type: \"GET\",\n\t\t\t\t\tdataType : \"json\",\t\t\t\t\t\t\n\t\t\t\t\terror: function(e){\n\t\t\t\t\t\tconsole.log(e.responseText);\t\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\"bDestroy\": true,\n\t\t\"iDisplayLength\": 5,//Paginación\n\t \"order\": [[ 0, \"desc\" ]]//Ordenar (columna,orden)\n\t}).DataTable();\n}", "function carregarDadosEscola(fk_escola){\n\n //Busca dos dados da escola \n var xhr = new XMLHttpRequest(); \n\n xhr.open(\"GET\", \"http://localhost:8080/escolas/\"+fk_escola);\n\n xhr.addEventListener(\"load\", function(){\n var resposta = xhr.responseText; \n dadosEscola = JSON.parse(resposta);\n\n //Pega o nome da escola \n document.getElementById('idEditEscola').value = dadosEscola.nome;\n\n //Pega a data de inicio do ano letivo \n var dataInicio = dadosEscola.dataInicioLetivo;\n if(dataInicio != null){\n var data = new Date(dataInicio);\n var dataInicioLetivo = dataFormatada1(data);\n document.getElementById('idInicioAnoLetivo').value = dataInicioLetivo;\n }\n\n //Pega a data de fim do ano letivo \n var dataFinal = dadosEscola.dataFinalLetivo;\n if(dataFinal != null){\n var data = new Date(dataFinal);\n var dataFinalLetivo = dataFormatada1(data);\n document.getElementById('idFinalAnoLetivo').value = dataFinalLetivo;\n }\n })\n\n xhr.send();\n}", "function cargaTabla(){\n\tvar fecha = $('#txtFecha').val();\n\tvar fechaInicio = $('#txtFechaInicio').val();\n\tvar fechaFinal = $('#txtFechaFinal').val();\n\tfiltro = $('input[name=\"rbFiltro\"]:checked').val();\n\tmensaje = \"\";\n\tif(filtro == \"4\"){\n\t\tif(fecha == \"\"){\n\t\t\tmensaje = \"Seleccione correctamente la fecha a buscar.\";\n\t\t}\n\t}else if(filtro == \"5\"){\n\t\tif(fechaInicio == \"\" || fechaFinal ==\"\"){\n\t\t\tmensaje = \"Seleccione correctamente el rango de fecha a buscar.\";\n\t\t}\n\t}else{\n\t\tmensaje = \"\";\n\t}\n\tif(mensaje!=\"\"){\n\t\t$.msgbox(msboxTitle, mensaje);\n\t}else{\n\t\truta = \"/ordenventa/listaxvendedor/\";\n\t\t$.post(ruta, {filtro: filtro, fecha: fecha, fechaInicio: fechaInicio, fechaFinal: fechaFinal}, function(data){\n\t\t\t$('#tblOrdenVenta tbody').html(data);\n\t\t\t$('#tblOrdenVenta').show();\n\t\t});\n\t}\n}", "function listar_lentes_venta(){\n tabla_lentes_venta=$('#lista_lentes_ventas_data').dataTable(\n {\n \"aProcessing\": true,//Activamos el procesamiento del datatables\n \"aServerSide\": true,//Paginación y filtrado realizados por el servidor\n dom: 'Bfrtip',//Definimos los elementos del control de tabla\n responsive: true,\n buttons: [\n 'copyHtml5',\n 'excelHtml5',\n 'csvHtml5',\n 'pdf'\n ],\n \"ajax\":\n {\n url: 'ajax/productos.php?op=listar_lentes_venta',\n type : \"get\",\n dataType : \"json\",\n error: function(e){\n console.log(e.responseText);\n }\n },\n \"bDestroy\": true,\n \"responsive\": true,\n \"bInfo\":true,\n \"iDisplayLength\": 10,//Por cada 10 registros hace una paginación\n \"order\": [[ 0, \"desc\" ]],//Ordenar (columna,orden)\n\n \"language\": {\n\n \"sProcessing\": \"Procesando...\",\n\n \"sLengthMenu\": \"Mostrar _MENU_ registros\",\n\n \"sZeroRecords\": \"No se encontraron resultados\",\n\n \"sEmptyTable\": \"Ningún dato disponible en esta tabla\",\n\n \"sInfo\": \"Mostrando un total de _TOTAL_ registros\",\n\n \"sInfoEmpty\": \"Mostrando un total de 0 registros\",\n\n \"sInfoFiltered\": \"(filtrado de un total de _MAX_ registros)\",\n\n \"sInfoPostFix\": \"\",\n\n \"sSearch\": \"Buscar:\",\n\n \"sUrl\": \"\",\n\n \"sInfoThousands\": \",\",\n\n \"sLoadingRecords\": \"Cargando...\",\n\n \"oPaginate\": {\n\n \"sFirst\": \"Primero\",\n\n \"sLast\": \"Último\",\n\n \"sNext\": \"Siguiente\",\n\n \"sPrevious\": \"Anterior\"\n\n },\n\n \"oAria\": {\n\n \"sSortAscending\": \": Activar para ordenar la columna de manera ascendente\",\n\n \"sSortDescending\": \": Activar para ordenar la columna de manera descendente\"\n\n }\n\n }//cerrando language\n\n }).DataTable();\n}", "function cargarTablaApuestas(fechaInicial,fechaFinal,empresa) {\n$('.tablaApuestas').DataTable({\n \"ajax\": \"ajax/apuestas/tabla-apuestas.ajax.php?perfil=\"+$(\"#perfilOculto\").val()+ \"&fechaInicial=\" + fechaInicial + \"&fechaFinal=\" + fechaFinal+ \"&empresa=\" +$(\"#empresaDate2\").val(),\n \"deferRender\": true,\n \"retrieve\": true,\n \"processing\": true,\n \"order\": [[7, \"desc\"]],\n\t\"pageLength\": 20,\n\t\"lengthMenu\": [[20, 40, 60, -1], [20, 40, 60, 'Todos']],\n \"language\": {\n \"sProcessing\": \"Procesando...\",\n \"sLengthMenu\": \"Mostrar _MENU_ registros\",\n \"sZeroRecords\": \"No se encontraron resultados\",\n \"sEmptyTable\": \"Ningún dato disponible en esta tabla\",\n \"sInfo\": \"Mostrando registros del _START_ al _END_ de un total de _TOTAL_\",\n \"sInfoEmpty\": \"Mostrando registros del 0 al 0 de un total de 0\",\n \"sInfoFiltered\": \"(filtrado de un total de _MAX_ registros)\",\n \"sInfoPostFix\": \"\",\n \"sSearch\": \"Buscar:\",\n \"sUrl\": \"\",\n \"sInfoThousands\": \",\",\n \"sLoadingRecords\": \"Cargando...\",\n \"oPaginate\": {\n \"sFirst\": \"Primero\",\n \"sLast\": \"Último\",\n \"sNext\": \"Siguiente\",\n \"sPrevious\": \"Anterior\"\n },\n \"oAria\": {\n \"sSortAscending\": \": Activar para ordenar la columna de manera ascendente\",\n \"sSortDescending\": \": Activar para ordenar la columna de manera descendente\"\n }\n },\n});\n}", "function muestraHistorial(tipo) {\n var tamanio = historial.length;\n var html =\n `<table id=\"myTable\" class=\"table table-bordered table-striped\">\n <thead>\n <tr>\n <th>No. de nomina</th>\n <th>Fecha</th>\n <th>Elaborada por</th>\n <th class=\"text-center\">Acciones</th>\n </tr>\n </thead>\n <tfoot>\n <tr>\n <th>No. de nomina</th>\n <th>Fecha</th>\n <th>Elaborada por</th>\n <th>Acciones</th>\n </tr>\n </tfoot>\n <tbody>`;\n for(var x=0; x<tamanio; x++) {\n\n html += `<tr>\n <td>${historial[x].Semana}</td>\n <td><i class=\"fa fa-clock-o\"></i> ${historial[x].Fecha}</td>\n <td>${historial[x].usuario}</td>\n <td class=\"text-center\">\n <a href=\"nomina${tipo}/detalles/${historial[x].Semana}\" data-toggle=\"tooltip\" data-original-title=\"Ver detalles\"> <i class=\"icon-eye \"></i> </a>\n </td>\n\n </tr>`;\n }\n html += `<tbody>\n </table>`;\n $( \".tablaHistorial\" ).append(html);\n $('#myTable').DataTable({\n \"order\": [[ 1, \"desc\" ]]\n });\n}", "function renderizarTabla(datos){\n elementoId = datos.atributos.elementoId;\n url = `${datos.config.ENTORNO.URL_BASE}Vistas/tabla_estructura.php`;\n xhr = new XMLHttpRequest();\n xhr.open('POST', url, true);\n xhr.setRequestHeader('content-type', 'application/json; charset=UTF-8');\n xhr.send(JSON.stringify(datos));\n xhr.onreadystatechange = () => {\n if(xhr.readyState == 4){\n document.getElementById(`tabla${elementoId}`).innerHTML = xhr.responseText;\n barraCargando(`barra-cargando${elementoId}`, false);\n }\n }\n}", "function listar() {\n\ttabla = $('#tbllistado').dataTable({\n\t\t\"aProcessing\": true,\n\t\t\"aServerSide\": true,\n\t\tdom: 'Bfrtip',\n\t\tbuttons: ['copyHtml5', 'excelHtml5', 'csvHtml5', 'pdf', 'print'],\n\t\t\"ajax\": {\n\t\t\turl: '../ajax/venta.php?op=listar',\n\t\t\ttype: \"get\",\n\t\t\tdataType: \"json\",\n\t\t\terror: function(e) {\n\t\t\t\tconsole.log(e.responseText);\n\t\t\t}\n\t\t},\n\t\t\"bDestroy\": true,\n\t\t\"iDisplayLength\": 5,\n\t\t\"order\": [\n\t\t\t[0, \"desc\"]\n\t\t]\n\t}).DataTable();\n}", "function datatableLenguaje(data){\n var data = {\n \"lengthMenu\": 'Mostrar <select class=\"form-control input-sm\">'+\n '<option value=\"5\">5</option>'+\n '<option value=\"10\">10</option>'+\n '<option value=\"15\">15</option>'+\n '<option value=\"20\">20</option>'+\n '<option value=\"30\">30</option>'+\n '<option value=\"-1\">Todos</option>'+\n '</select> registros',\n \"search\": \"Buscar:\",\n \"searchPlaceholder\": data.placeholder,\n \"zeroRecords\": \"No se encontraron registros coincidentes\",\n \"infoEmpty\": \"No hay registros para mostrar\",\n \"infoFiltered\": \" - filtrado de MAX registros\",\n \"info\": \"Mostrando _START_ a _END_ de _TOTAL_ registros\",\n \"paginate\": {\n \"previous\": \"Anterior\",\n \"next\": \"Siguiente\"\n }\n };\n return data;\n }", "function carregarTabelaLoteAnt()\n{\n $.getJSON('../api/bndes/v1/siaf_amortizacoes_lote_anterior', function(json){\n\n $.each(json, function (key, value){\n \n linha = atualizaTabela(value);\n $('#tabelaLoteAnterior>tbody').append(linha);\n\n });\n \n $('#tabelaLoteAnterior').DataTable();\n \n });\n \n}", "function RealizarCorte() {\r\n let date = getDate();\r\n let count = 0;\r\n let usuario = \"\";\r\n for (let i = 0; i < ventaBD.length; i++) {\r\n for (let j = 0; j < usuariosBD.length; j++) {\r\n if (ventaBD[i].id_usuario === usuariosBD[j].id) {\r\n usuario = usuariosBD[j].nombre + \" \" + usuariosBD[j].apellido;\r\n }\r\n }\r\n if (ventaBD[i].fecha === date) {\r\n count++;\r\n document.getElementById(\r\n \"tabla-corte-body\"\r\n ).innerHTML += `<tr><td>${ventaBD[i].fecha}</td><td>${ventaBD[i].id_venta}</td><td>${ventaBD[i].id_usuario}</td><td>${usuario}</td><td>$${ventaBD[i].total}</td></tr>`;\r\n }\r\n }\r\n\r\n if (count === 0) {\r\n document.getElementById(\"div-tablacorte\").style.display = \"none\";\r\n document.getElementById(\"none-alert\").style.display = \"block\";\r\n document.getElementById(\"btn-realizar-corte\").disabled = false;\r\n } else {\r\n document.getElementById(\"div-tablacorte\").style.display = \"block\";\r\n document.getElementById(\"none-alert\").style.display = \"none\";\r\n document.getElementById(\"btn-realizar-corte\").disabled = true;\r\n }\r\n}", "function listarEmpresa() {\n\tvar estado = 1;\n\t$(document).ready(function () {\n\t\t$('#tablaempresa').DataTable({\n\t\t\t\"destroy\": true,\n\t\t\t\"searching\": true,\n\t\t\t\"ajax\": \"../models/empresa/listar.php\",\n\t\t\t\"dataSrc\": \"\",\n\t\t\t\"method\": \"POST\",\n\t\t\t\"columns\": [{\n\t\t\t\t\t\"data\": \"nit\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"data\": \"nombre\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"data\": \"marca\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"data\": \"telefono\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"data\": \"correo\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"data\": \"estado\",\n\t\t\t\t\trender: function (data) {\n\t\t\t\t\t\testado = data;\n\t\t\t\t\t\tif (data == 'Activo') {\n\t\t\t\t\t\t\treturn \"<span class='badge badge-success badge-pill text-center'>Activo</span>\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn \"<span class='badge badge-danger badge-pill text-center'>Inactivo</span>\";\n\t\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\t\"data\": \"codigo\",\n\t\t\t\t\trender: function (data) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (estado == 'Activo') {\n\t\t\t\t\t\t\treturn \"<div class='dropdown dropdown-action'><a href='#'' class='action-icon dropdown-toggle' data-toggle='dropdown' aria-expanded='false'><i class='fa fa-ellipsis-v'></i></a><div class='dropdown-menu dropdown-menu-right'><a class='dropdown-item' href='#' onclick='preparar(\" + data + \")' data-toggle='modal' data-target='#editarempresa'><i class='si si-pencil'></i> Editar</a><a class='dropdown-item' href='#' onclick='eliminar(\" + data + \")'><i class='si si-trash'></i> Eliminar</a></div></div>\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn \"<div class='dropdown dropdown-action'><a href='#'' class='action-icon dropdown-toggle' data-toggle='dropdown' aria-expanded='false'><i class='fa fa-ellipsis-v'></i></a><div class='dropdown-menu dropdown-menu-right'><a class='dropdown-item' href='#'' value=\" + data + \" onclick='renovar(\" + data + \")'><i class='fa fa-undo'></i> Renovar</a></div></div>\";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t]\n\t\t});\n\t});\n}", "function llenaTabla(){\n\t\n $(\".fila_usuario\").remove();\n \n\t\n $.ajax({\n data:{},\n url:\"GET_USUARIO\",\n type:\"POST\",\n success: function (response) {\n \t\n\n var ESTADO=\"\";\n $.each( response, function( key, value ) {\n \t \n \t if(value.ESTADO===true){\n \t\t \n \t\t ESTADO=\"ACTIVO\";\n \t\t \n \t }else{\n \t\t ESTADO=\"INACTIVO\";\n \t\t \n \t }\n \t \n \t \n $(\"#tb_usuario\").append('<tr id='+value.OID_USUARIO+' class=fila_usuario><td>'+value.OID_USUARIO+'</td><td>'+value.USUARIO+'</td><td><a onclick=changeState('+value.OID_USUARIO+','+value.ESTADO+')>'+ESTADO+'</a></td><td><a onclick=update('+value.OID_USUARIO+',\"'+value.USUARIO+'\")>ACTUALIZAR</a></td></tr>');\n\n \t\t});\n \n \t/*PAGINACION DE LA TABLA*/\n table= $('#table_usuario').DataTable();\n\n \n }, error: function (err) {\n alert(\"Error en el AJAX LLena tabla\" + err.statusText);\n }\n });\n \n\t\n\t\n\t\n}", "function listarTablas(){\n //var idCedente = $('#cedente').val(); \n //var idCedente = GlobalData.id_cedente;\n if (typeof GlobalData.id_cedente == \"undefined\"){\n idCedente = \"\";\n }else{\n idCedente = GlobalData.id_cedente;\n }\n var data = \"idCedente=\"+idCedente;\n $.ajax({\n type: \"POST\",\n url: \"../includes/estrategia/GetListar_periodo.php\",\n data: data,\n dataType: \"json\",\n success: function(data){ \n // si no tengo un cedente seleccionado desactivo el boton --- si el cedente ya tiene un periodo desactivo el boton \n if((((idCedente == \"\")) || ((data.length != 0) && (idCedente != \"\")))){\n $('#AddPeriodo').attr('disabled', 'disabled');\n }else{\n $('#AddPeriodo').removeAttr(\"disabled\");\n } \n TablaPeriodo = $('#listaPeriodo').DataTable({\n data: data, // este es mi json\n paging: false,\n columns: [\n { data : 'fechaInicio' }, // campos que trae el json\n { data : 'fechaTermino' },\n { data: 'Actions' }\n ],\n \"columnDefs\": [\n \n {\n \"targets\": 2,\n \"data\": 'Actions',\n \"render\": function( data, type, row ) {\n return \"<div style='text-align: center;' id='\"+data+\"'><i style='cursor: pointer; margin: 0 10px;' class='btn eliminar fa fa-trash btn-danger btn-icon icon-lg'></i></div>\";\n }\n }\n ]\n }); \n },\n error: function(){\n alert('error');\n }\n });\n }", "function tabla_tecnicos(){\n var tabla_html = $(\"#datatable-tecnicos\")\n\n // Inicializacion y referencia al DataTable, con la config ajax de cada columna\n var dtabla = tabla_html.DataTable({\n // \"ajax\": {'url':'localhost:8000/orden/lista_clientes'},//tabla_html.attr('data-ajax_url'),\n \"autoWidth\": false,\n \"columns\": [\n {\"data\":\"\"},\n {\"data\": \"nombre\"},\n ],\n \"dom\": \"Bfrtip\",\n \"buttons\": [{\n extend: \"copy\",\n text: \"Copiar tabla\",\n className: \"btn-sm\"\n }, {\n extend: \"csv\",\n text: \"Exportar tabla a CSV\",\n className: \"btn-sm\"\n }, {\n extend: \"print\",\n text: \"Imprimir tabla\",\n className: \"btn-sm\"\n }, ],\n });\n\n // Click en la fila para seleccionar\n tabla_html.on('click', 'tr', function() {\n var radio = $(this).find('input');\n if (radio[0]) {\n dtabla.$('tr.row_selected').removeClass('row_selected');\n $(this).addClass('row_selected');\n radio.iCheck('checked');\n }\n });\n \n return dtabla\n}", "function listar_aros_creados(){\n tabla_aros_creados=$('#data_lista_aros_creados').dataTable(\n {\n \"aProcessing\": true,//Activamos el procesamiento del datatables\n \"aServerSide\": true,//Paginación y filtrado realizados por el servidor\n dom: 'Bfrtip',//Definimos los elementos del control de tabla\n buttons: ['copyHtml5', {\n extend: 'excelHtml5',\n text: 'Descargar Excel',\n filename: function() {\n var date_edition = 'Productos creados '+moment().format(\"DD-MM-YYYY HH[h]mm\")\n var selected_machine_name = $(\"#output_select_machine select option:selected\").text()\n return date_edition + ' - ' + selected_machine_name\n },\n sheetName: 'Output logiciel complet',\n title : null\n }],\n \"ajax\":\n {\n url: 'ajax/productos.php?op=listar_aros_creados',\n type : \"get\",\n dataType : \"json\",\n error: function(e){\n console.log(e.responseText);\n }\n },\n \"bDestroy\": true,\n \"responsive\": true,\n \"bInfo\":true,\n \"iDisplayLength\": 10,//Por cada 10 registros hace una paginación\n \"order\": [[ 0, \"desc\" ]],//Ordenar (columna,orden)\n\n \"language\": {\n\n \"sProcessing\": \"Procesando...\",\n\n \"sLengthMenu\": \"Mostrar _MENU_ registros\",\n\n \"sZeroRecords\": \"No se encontraron resultados\",\n\n \"sEmptyTable\": \"Ningún dato disponible en esta tabla\",\n\n \"sInfo\": \"Mostrando un total de _TOTAL_ registros\",\n\n \"sInfoEmpty\": \"Mostrando un total de 0 registros\",\n\n \"sInfoFiltered\": \"(filtrado de un total de _MAX_ registros)\",\n\n \"sInfoPostFix\": \"\",\n\n \"sSearch\": \"Buscar:\",\n\n \"sUrl\": \"\",\n\n \"sInfoThousands\": \",\",\n\n \"sLoadingRecords\": \"Cargando...\",\n\n \"oPaginate\": {\n\n \"sFirst\": \"Primero\",\n\n \"sLast\": \"Último\",\n\n \"sNext\": \"Siguiente\",\n\n \"sPrevious\": \"Anterior\"\n\n },\n\n \"oAria\": {\n\n \"sSortAscending\": \": Activar para ordenar la columna de manera ascendente\",\n\n \"sSortDescending\": \": Activar para ordenar la columna de manera descendente\"\n\n }\n\n }//cerrando language\n\n }).DataTable();\n}", "function listar() {\n var fecha_inicio = $(\"#fecha_inicio\").val();\n var fecha_fin = $(\"#fecha_fin\").val();\n var idcliente = $(\"#idcliente\").val();\n tabla = $('#tbllistado').dataTable({\n \"aProcessing\": true, //Activamos el procesamiento del datatables\n \"sServerSide\": true, //paginaciion y filtrado realizados por el servidor\n \"sSearch\": true,\n dom: 'Bfrtip', //definimos los elementos del control de tablas\n \n \n buttons: [{\n //Botón para Excel\n extend: 'excel',\n footer: true,\n title: 'Archivo',\n filename: 'Consultas_Ventas',\n \n //Aquí es donde generas el botón personalizado\n text: '<button class=\"btn btn-success \">Exportar a Excel <i class=\"fas fa-file-excel\"></i></button>'\n },\n //Botón para PDF\n {\n extend: 'pdf',\n footer: true,\n title: 'Archivo PDF',\n filename: 'Consultas_Ventas',\n text: '<button class=\"btn btn-danger\">Exportar a PDF <i class=\"far fa-file-pdf\"></i></button>'\n }\n ],\n \n\n \"ajax\": \n {\n url: '../ajax/consultas.php?op=ventasfechascliente',\n data:{fecha_inicio: fecha_inicio,fecha_fin: fecha_fin,idcliente: idcliente},\n type: \"get\",\n dataType: \"json\",\n error: function(e){\n console.log(e.responseText);\n }\n },\n language: {\n \"sProcessing\": \"Procesando...\",\n \"sLengthMenu\": \"Mostrar _MENU_ registros\",\n \"sZeroRecords\": \"No se encontraron resultados\",\n \"sEmptyTable\": \"Ningún dato disponible en esta tabla =(\",\n \"sInfo\": \"Mostrando registros del _START_ al _END_ de un total de _TOTAL_ registros\",\n \"sInfoEmpty\": \"Mostrando registros del 0 al 0 de un total de 0 registros\",\n \"sInfoFiltered\": \"(filtrado de un total de _MAX_ registros)\",\n \"sInfoPostFix\": \"\",\n \"sSearch\": \"Buscar:\",\n \"sUrl\": \"\",\n \"sInfoThousands\": \",\",\n \"sLoadingRecords\": \"Cargando...\",\n \"oPaginate\": {\n \"sFirst\": \"Primero\",\n \"sLast\": \"Último\",\n \"sNext\": \"Siguiente\",\n \"sPrevious\": \"Anterior\"\n },\n \n \n },\n \"bDestroy\": true,\n \"iDisplayLength\": 7, //paginacion\n \"order\":[[0, \"desc\"]], //ordenar (columna,orden)\n\n \n\n \n }).DataTable();\n\n}", "function listar_lentes_tratamientos()\n{\n tabla_lentes_tratamientos=$('#data_lente_tratamientos').dataTable(\n {\n \"aProcessing\": true,//Activamos el procesamiento del datatables\n \"aServerSide\": true,//Paginación y filtrado realizados por el servidor\n dom: 'Bfrtip',//Definimos los elementos del control de tabla\n responsive: true,\n buttons: [\n 'copyHtml5',\n 'excelHtml5',\n 'csvHtml5',\n 'pdf'\n ],\n \"ajax\":\n {\n url: 'ajax/productos.php?op=lista_lentes_tratamientos',\n type : \"get\",\n dataType : \"json\",\n error: function(e){\n console.log(e.responseText);\n }\n },\n \"bDestroy\": true,\n \"responsive\": true,\n \"bInfo\":true,\n \"iDisplayLength\": 10,//Por cada 10 registros hace una paginación\n \"order\": [[ 0, \"desc\" ]],//Ordenar (columna,orden)\n\n \"language\": {\n\n \"sProcessing\": \"Procesando...\",\n\n \"sLengthMenu\": \"Mostrar _MENU_ registros\",\n\n \"sZeroRecords\": \"No se encontraron resultados\",\n\n \"sEmptyTable\": \"Ningún dato disponible en esta tabla\",\n\n \"sInfo\": \"Mostrando un total de _TOTAL_ registros\",\n\n \"sInfoEmpty\": \"Mostrando un total de 0 registros\",\n\n \"sInfoFiltered\": \"(filtrado de un total de _MAX_ registros)\",\n\n \"sInfoPostFix\": \"\",\n\n \"sSearch\": \"Buscar:\",\n\n \"sUrl\": \"\",\n\n \"sInfoThousands\": \",\",\n\n \"sLoadingRecords\": \"Cargando...\",\n\n \"oPaginate\": {\n\n \"sFirst\": \"Primero\",\n\n \"sLast\": \"Último\",\n\n \"sNext\": \"Siguiente\",\n\n \"sPrevious\": \"Anterior\"\n\n },\n\n \"oAria\": {\n\n \"sSortAscending\": \": Activar para ordenar la columna de manera ascendente\",\n\n \"sSortDescending\": \": Activar para ordenar la columna de manera descendente\"\n\n }\n\n }//cerrando language\n\n }).DataTable();\n}", "async obtieneDatos (tabla, filtro) {\n try {\n tabla = tabla + ((filtro !== undefined) ? '/' + filtro : '') + '.json'\n const res = await fetch((API_URL + tabla), {\n method: 'GET',\n headers: {\n 'content-Type': 'application/json'\n }\n })\n const datoDb = await res.json()\n return datoDb\n } catch (error) {\n console.log(error)\n }\n }", "function getEstadoCielo(estCielo){\n var tableColumns = new Array();\n var estCieloData = new Array();\n for(var i = 0; i < estCielo.length; i++){\n if(estCielo[i].periodo == \"00-24\" || estCielo[i].periodo == \"00-12\" || estCielo[i].periodo == \"12-24\"){\n continue;\n }\n tableColumns.push(estCielo[i].periodo + \"h\");\n pushDataToArray(estCieloData, estCielo[i].descripcion);\n }\n return [tableColumns, estCieloData];\n }", "function renderDataPrestamos(data){\n\n var databodyPre = document.querySelector('#databody-prestamos-pendientes');\n databodyPre.innerHTML = '';\n\n\n if (data[0].cedula == 'false') {\n \n databodyPre.innerHTML = data[0].mensaje;\n \n \n }else{\n\n data.forEach(item => { \n\n switch (item.estado) {\n \n case \"pendiente\":\n \n databodyPre.innerHTML += `<tr>\n <td data-titulo=\"ID Prestamo:\">${item.id_prestamo}</td data-titulo=\"Numero:\">\n <td data-titulo=\"Nombre:\">${item.nombre}</td data-titulo=\"Numero:\">\n <td data-titulo=\"Fecha Creacion:\">${item.fecha_creacion}</td data-titulo=\"Numero:\">\n <td data-titulo=\"Monto:\">¢${item.monto}</td data-titulo=\"Numero:\">\n <td data-titulo=\"Estado:\">${item.estado}</td data-titulo=\"Numero:\">\n <td>\n <a class=\"btnVer show\" id=\"btnVerItem_pre_${item.id_prestamo}\" href=\"#\" onclick=\"verPrestamo(${item.id_prestamo})\">Ver</a>\n </td>\n </tr>\n <tr>\n <div class=\"planilla-container hide\" id=\"info_pre_${item.id_prestamo}\" value=\"${item.id_prestamo}\"></div>\n </tr>\n `;\n \n \n break;\n \n default:\n databodyPre.innerHTML += `<tr>\n <td data-titulo=\"ID Prestamo:\">${item.id_prestamo}</td>\n <td data-titulo=\"Nombre:\">${item.nombre}</td>\n <td data-titulo=\"Fecha Creacion:\">${item.fecha_creacion}</td>\n <td data-titulo=\"Monto:\">¢${item.monto}</td>\n <td data-titulo=\"Estado:\">${item.estado}</td>\n <td>\n <a class=\"btnVer show\" id=\"btnVerItem_pre_${item.id_prestamo}\" href=\"#\" onclick=\"verPrestamo(${item.id_prestamo})\">Ver</a>\n </td> \n </tr>\n <div class=\"planilla-container hide\" id=\"info_pre_${item.id_prestamo}\" value=\"${item.id_prestamo}\"></div>\n `;\n \n break;\n }\n });\n\n\n } \n\n\n\n \n }", "function mostrar() {\n const divTabela = document.getElementById(\"tabela\");\n let conteudo = \"<table class>\";\n let indice = 0;\n let contador = 1;\n for (const valor of lista) {\n conteudo += `\n <tr>\n <td class=\"col-1\">${contador}</td>\n <td class=\"col-3\">${valor.des}</td>\n <td class=\"col-6\">${valor.deta}</td> \n <td class=\"col-2 text-end\"><button onclick='editar(${indice})' type=\"button\" class=\"btn btn-primary btn-sm\" onclick=\"criarconta()\"> Editar </button>\n <button onclick='apagar(${indice})' type=\"button\" class=\"btn btn-dark btn-sm\" onclick=\"entrar()\">Apagar</button></td> \n </tr> \n `;\n indice++;\n contador++;\n }\n conteudo += \"</table>\"\n divTabela.innerHTML = conteudo;\n}", "function loadTable() {\n $.ajax({\n url: 'http://localhost:9000/api/inventarios',\n method: \"GET\",\n headers: {\n \"Content-Type\": \"application/json\"\n }\n }).done(function (items) {\n var registros = \"\";\n items.forEach(function (item, index, array) {\n registros += \"<tr class='table-success'><td><a href='#' onclick='findById(\" + item.id + \")'>\" + item.id + \"</a></td><td>\" + item.cantidadActual + \"</td><td>\" + item.fecha + \"</td</tr>\";\n })\n $(\"#tbSalidaDatos\").html(registros);\n $(\"#id\").val(\"\");\n $(\"#cantidadActual\").val(\"\");\n $(\"#fecha\").val(\"\");\n $(\"#producto\").val(\"0\");\n\n\n })\n}", "function crearTablaTransicion(entrada,alfabeto,tablaTransicion){\n var tablaPadre = document.createElement('table'),\n filaTitulo = document.createElement('tr');\n for(let i=0; i<transiciones.length ; i++){\n var columnaTitulo = document.createElement('td');\n columnaTitulo.className='formatoTablaTitulo';\n columnaTitulo.textContent = transiciones[i];\n filaTitulo.appendChild(columnaTitulo);\n }\n tablaPadre.appendChild(filaTitulo);\n for(let i=0; i<entrada.length; i++){\n for(let j=0; j<alfabeto.length; j++){\n var filaDatos = document.createElement('tr'), \n columnaEstados = document.createElement('td'), \n columnaAlfabeto = document.createElement('td'),\n columnaInput = document.createElement('td'),\n input = document.createElement('input');\n //estilos y contenido a las columnas\n columnaEstados.className='formatoTabla';\n columnaEstados.textContent = entrada[i];\n columnaAlfabeto.className='formatoTabla';\n columnaAlfabeto.textContent = alfabeto[j];\n input.className='form-control';\n input.setAttribute('placeholder','Estado Destino');\n input.setAttribute('type','text');\n input.id=`${entrada[i]}-${alfabeto[j]}`;\n //agrego los elementos a sus nodos padres\n columnaInput.appendChild(input);\n filaDatos.appendChild(columnaEstados);\n filaDatos.appendChild(columnaAlfabeto);\n filaDatos.appendChild(columnaInput);\n tablaPadre.appendChild(filaDatos);\n }\n }\n tablaTransicion.appendChild(tablaPadre);\n}", "function bien_bajas() \r\n{\r\n var t = $('#tbl_bajas');\r\n if ( $.fn.dataTable.isDataTable( '#tbl_bajas' ) ) {\r\n $('#tbl_bajas').DataTable().destroy();\r\n }\r\n \r\n $.ajax({\r\n url: 'controller/puente.php',\r\n type: 'POST',\r\n dataType: 'json',\r\n data: {option: '67'},\r\n async:false,\r\n })\r\n .done(function(bajas) {\r\n $('#tbl_bajas tbody').empty();\r\n //console.log(bajas);\r\n if (bajas.length > 0 ) \r\n {\r\n $.each(bajas, function(i, baja) {\r\n var accion,detalle ,clase_row;\r\n //saber el tipo de baja\r\n if (baja.t_baja == 'Temporal') \r\n {\r\n accion = \r\n '<div class=\"btn-group\">'+\r\n '<button type=\"button\" class=\"btn btn-success btn-flat dropdown-toggle\" data-toggle=\"dropdown\" aria-expanded=\"false\">'+\r\n '<span class=\"caret\"></span>'+\r\n '<span class=\"sr-only\">Toggle Dropdown</span>'+\r\n '</button>'+\r\n '<ul class=\"dropdown-menu\" role=\"menu\">'+\r\n '<li><a href=\"#\" onclick=\"UpdateBajaDefinitiva('+baja.baja_id+');\">Baja definitiva</a></li>'+\r\n '</ul>'+\r\n '</div>' ;\r\n clase_row = 'class=\"bg-yellow \"';\r\n }\r\n else\r\n {\r\n accion = '';\r\n clase_row= 'class=\"bg-red-active \"';\r\n }\r\n //Formar la lista de caracteristicas del bien\r\n detalle = \r\n '<ul>'+\r\n '<li><label>Serie: </label> '+baja.serie+'</li>'+\r\n '<li><label>Inventario: </label> '+baja.inventario+'</li>'+\r\n '<li><label>Marca: </label> '+baja.marca+'</li>'+\r\n '<li><label>Grupo: </label> '+baja.grupo+'</li>'+\r\n '<li><label>Modelo: </label> '+baja.modelo+'</li>'+\r\n '<li><label>Color: </label> '+baja.color+'</li>'+\r\n '<li><label>Material: </label> '+baja.material+'</li>'+\r\n '<li><label>Comentario: </label> '+baja.comentario+'</li>'+\r\n '<li><label>Estatus: </label> '+baja.status+'</li>'+\r\n '</ul>' ;\r\n t.append(\r\n '<tr '+clase_row+'>'+\r\n '<td>'+accion+'</td>'+\r\n '<td>'+baja.id+'</td>'+\r\n '<td>'+detalle+'</td>'+\r\n '<td>'+baja.t_baja+'</td>'+\r\n '</tr>'\r\n );\r\n\r\n });\r\n\r\n }else{\r\n t.append('<tr> <td colspan=\"4\"> <center>NO HAY BIENES DADOS DE BAJA</center> </td> </tr>');\r\n }\r\n })\r\n .fail(function() {\r\n console.log(\"error\");\r\n })\r\n .always(function() {\r\n $('#tbl_bajas').DataTable(\r\n {\r\n 'language':\r\n {\r\n 'url':'//cdn.datatables.net/plug-ins/1.10.19/i18n/Spanish.json'\r\n },\r\n 'lengthMenu': [[10, 25, 50,100, -1], [10, 25, 50, 100, 'Todos']],\r\n \r\n dom: '<<\"col-md-3\"B><\"#buscar.col-sm-4\"f><\"pull-right\"l><t>pr>',\r\n buttons:{\r\n buttons: [\r\n { extend: 'pdf', className: 'btn btn-flat btn-warning',text:' <i class=\"fa fa-file-pdf-o\"></i> Exportar a PDF' },\r\n { extend: 'excel', className: 'btn btn-success btn-flat',text:' <i class=\"fa fa-file-excel-o\"></i> Exportar a Excel' }\r\n ]\r\n } \r\n }\r\n );\r\n });\r\n \r\n return false;\r\n}", "function litarAlumnosConBaucherRegistrados() {\n console.log(\"Lista de alumnos con baucher...!\");\n debugger;\n var datos = {\n tipoPago : $(\"#tipoPago\").val(),\n }\n var url = base_url+'Finanzas/HabilitarAlumnos/listaDeAlumnosConBaucherRegistrado/'+datos.tipoPago;\n\n $.ajax({\n type: \"post\",\n // url: base_url+'Finanzas/HabilitarAlumnos/listaDeAlumnosConBaucherRegistrado',\n url: url,\n dataType: \"json\",\n success: function(response) {\n var i = \"1\";\n $(\"#tbl_listAlumConBaucher\").DataTable({\n data: response,\n responsive: true,\n columns: [\n {\n data: \"id_alta_baucher_banco\",\n \"visible\": false, // ocultar la columna\n },\n {\n data: \"nombre_completo\",\n },\n {\n data: \"carrera_descripcion\",\n },\n {\n data: \"numero_control\",\n },\n {\n data: \"fecha_registro\",\n },\n {\n data: \"archivo\",\n render: function(data, type, row, meta) {\n // Se consulta el file.pdf x el no. de control\n var a = `\n <a title=\"Descarga Baucher\" href=\"verBaucher/${row.numero_control}\" target=\"_blank\"><i class=\"far fa-file-pdf fa-2x\"></i></a>\n `;\n return a;\n },\n },\n\n {\n // Es el estatus de la tabla de alumnos\n data: \"estatus\",\n orderable: false,\n searchable: false,\n \"render\" : function(data, type, row) {\n var habilitarAlumno = `${row.estatus}`;\n var string = '<input type=\"checkbox\" ';\n if(habilitarAlumno == 1){\n string = string + `checked onclick=habilitaRegistro(0,'${row.numero_control}','${row.id_alta_baucher_banco}')>`;\n }else {\n string = string +`onclick=habilitaRegistro(1,'${row.numero_control}','${row.id_alta_baucher_banco}')>`;\n }\n return string;\n\t\t\t },\n },\n\n// DEBE ESTAR disabled , ASTA K SE ACTIVE EL CHECK DE DAR ACCESO AL ALUMNO SE DEBE DE ACTIVE ESTE CHECK PARA GENERAR EL RECIVO PDF\n {\n data: \"cantidad\",\n orderable: false,\n searchable: false,\n \"render\" : function(data, type, row) {\n var hayCantidad = `${row.cantidad}`;\n var hayDescConcepto = `${row.desc_concepto}`;\n debugger;\n if(hayCantidad != \"null\" && hayDescConcepto!= \"null\"){\n var a = `\n <a title=\"Descarga Recibo\" href=\"generaPdfRcibo/${row.numero_control}\" target=\"_blank\"><i class=\"far fa-file-pdf fa-2x\"></i></a>\n `;\n // var a = `\n // <a title=\"Descarga Recibo\" onclick=mostrarDocumento('${row.numero_control}')><i class=\"far fa-file-pdf fa-2x\"></i></a>\n // `;\n }else {\n var a = 'No hay recibo';\n }\n return a;\n },\n },\n {\n orderable: false,\n searchable: false,\n \"render\" : function(data, type, row) {\n return `\n <button type='button' class=\"btn btn-danger\" onclick=noAplicaRegistro('${row.numero_control}','${row.id_alta_baucher_banco}')>No Aplica</button>\n `;\n },\n },\n {\n orderable: false,\n searchable: false,\n \"render\" : function(data, type, row) {\nvar a = `\n <a title=\"Agregar Recibo Valido\" onclick=recuperarDocumentos('${row.numero_control}','${row.id_alta_baucher_banco}','${row.id_recibo}')><i class=\"fa fa-upload iconbig azul fa-2x\"></i></a>\n`;\nreturn a;\n\n },\n },\n ],\n \"language\" : language_espaniol,\n });\n },\n });\n }", "function cargarDatosExpediente() {\n let obtenerDatos = JSON.parse(localStorage.getItem(\"Guardar_Cita\")) || []\n obtenerDatos.forEach(element => {\n $(\"#tbl_expediente\").append(`<tr><td>${element.date}</td><td>${element.hora}</td><td>${element.nombre}</td><td>${element.servicio}</td><td>${element.consultorio}</td></tr>`);\n });\n }", "function modificado(t) {\n datos();\n}", "function obtenerActividad(seleccionado){\n var table = $('#lista-actividad').DataTable();\n var celda = $(seleccionado).parent();\n var rowData = table.row(celda).data();\n var id = rowData['id'];\n var nombre = rowData['nombre_actividad'];\n var direccion = rowData['direccion'];\n var telefono = rowData['telefono'];\n var email = rowData['email'];\n var celular = rowData['celular'];\n var ciudad = rowData['ciudad'];\n\n\n $('#id-actividad').val(id);\n $('#nombre-actividad').val(nombre);\n $('#direccion-actividad').val(direccion);\n $('#telefono-actividad').val(telefono);\n $('#email-actividad').val(email);\n $('#celular-actividad').val(celular);\n $('#ciudad-actividad').val(ciudad);\n}", "function listar_servicios_venta(){\n tabla_servicios_venta=$('#lista_servicios_ventas_data').dataTable(\n {\n \"aProcessing\": true,//Activamos el procesamiento del datatables\n \"aServerSide\": true,//Paginación y filtrado realizados por el servidor\n dom: 'Bfrtip',//Definimos los elementos del control de tabla\n responsive: true,\n buttons: [\n 'copyHtml5',\n 'excelHtml5',\n 'csvHtml5',\n 'pdf'\n ],\n \"ajax\":\n {\n url: 'ajax/productos.php?op=listar_servicios_venta',\n type : \"get\",\n dataType : \"json\",\n error: function(e){\n console.log(e.responseText);\n }\n },\n \"bDestroy\": true,\n \"responsive\": true,\n \"bInfo\":true,\n \"iDisplayLength\": 10,//Por cada 10 registros hace una paginación\n \"order\": [[ 0, \"desc\" ]],//Ordenar (columna,orden)\n\n \"language\": {\n\n \"sProcessing\": \"Procesando...\",\n\n \"sLengthMenu\": \"Mostrar _MENU_ registros\",\n\n \"sZeroRecords\": \"No se encontraron resultados\",\n\n \"sEmptyTable\": \"Ningún dato disponible en esta tabla\",\n\n \"sInfo\": \"Mostrando un total de _TOTAL_ registros\",\n\n \"sInfoEmpty\": \"Mostrando un total de 0 registros\",\n\n \"sInfoFiltered\": \"(filtrado de un total de _MAX_ registros)\",\n\n \"sInfoPostFix\": \"\",\n\n \"sSearch\": \"Buscar:\",\n\n \"sUrl\": \"\",\n\n \"sInfoThousands\": \",\",\n\n \"sLoadingRecords\": \"Cargando...\",\n\n \"oPaginate\": {\n\n \"sFirst\": \"Primero\",\n\n \"sLast\": \"Último\",\n\n \"sNext\": \"Siguiente\",\n\n \"sPrevious\": \"Anterior\"\n\n },\n\n \"oAria\": {\n\n \"sSortAscending\": \": Activar para ordenar la columna de manera ascendente\",\n\n \"sSortDescending\": \": Activar para ordenar la columna de manera descendente\"\n\n }\n\n }//cerrando language\n\n }).DataTable();\n}", "function ObtenerGestiones() {\n $.ajax({\n type: \"post\",\n url: 'gestion/ajax/gestionAjax.php',\n data: { funcion: 'datos' },\n success: function(res) {\n let html = '';\n res = JSON.parse(res);\n for (let x in res) {\n html += `\n <tr>\n <td>${Number(x)+1}</td>\n <td>${res[x][1]}</td>\n <td>${res[x][2]}</td>\n <td>${res[x][3]}</td>\n <td>${res[x][5]}</td>\n </tr>\n `;\n }\n tabla.find('tbody').html(html);\n }\n });\n }", "function listarAlumnosBec() {\n\ttablabecAlm = $(\"#tbListadoBecadosAlm\").dataTable({\n\t\t\"aProcessing\" : true,\n\t\t\"aServerSide\" : true,\n\t\tdom : 'Bftrip',\n\t\tbuttons: [\n\t\t],\n\t\t\"ajax\" : {\n\t\t\turl : \"../ajax/doc/tutFunctions.php?oper=listarAlumnosBec\",\n\t\t\ttype : \"GET\",\n\t\t\tdataType : \"json\",\n\t\t\terror : function(e) {\n\t\t\t\tconsole.log(e.responseText);\n\t\t\t}\n\t\t},\n\t\t\"bDestroy\" : true,\n\t\t\"iDisplayLength\" : 5,\n\t\t\"order\" : [[0, \"desc\"]]\n\t}).DataTable();\n}", "function cargarTablaProduccionTrusas(fechaInicial,fechaFinal) {\n\t$('.tablaProduccionTrusas').DataTable( {\n\t\t\"ajax\": \"ajax/produccion/tabla-producciontrusas.ajax.php?perfil=\"+$(\"#perfilOculto\").val() +\"&fechaInicial=\" + fechaInicial + \"&fechaFinal=\" + fechaFinal,\n\t\t\"deferRender\": true,\n\t\t\"retrieve\": true,\n\t\t\"processing\": true,\n\t\t\"order\": [[1, \"desc\"]],\n\t\t\"pageLength\": 20,\n\t\t\"lengthMenu\": [[20, 40, 60, -1], [20, 40, 60, 'Todos']],\n\t\t\"language\": {\n\n\t\t\t\t\"sProcessing\": \"Procesando...\",\n\t\t\t\t\"sLengthMenu\": \"Mostrar _MENU_ registros\",\n\t\t\t\t\"sZeroRecords\": \"No se encontraron resultados\",\n\t\t\t\t\"sEmptyTable\": \"Ningún dato disponible en esta tabla\",\n\t\t\t\t\"sInfo\": \"Mostrando registros del _START_ al _END_ de un total de _TOTAL_\",\n\t\t\t\t\"sInfoEmpty\": \"Mostrando registros del 0 al 0 de un total de 0\",\n\t\t\t\t\"sInfoFiltered\": \"(filtrado de un total de _MAX_ registros)\",\n\t\t\t\t\"sInfoPostFix\": \"\",\n\t\t\t\t\"sSearch\": \"Buscar:\",\n\t\t\t\t\"sUrl\": \"\",\n\t\t\t\t\"sInfoThousands\": \",\",\n\t\t\t\t\"sLoadingRecords\": \"Cargando...\",\n\t\t\t\t\"oPaginate\": {\n\t\t\t\t\"sFirst\": \"Primero\",\n\t\t\t\t\"sLast\": \"Último\",\n\t\t\t\t\"sNext\": \"Siguiente\",\n\t\t\t\t\"sPrevious\": \"Anterior\"\n\t\t\t\t},\n\t\t\t\t\"oAria\": {\n\t\t\t\t\t\"sSortAscending\": \": Activar para ordenar la columna de manera ascendente\",\n\t\t\t\t\t\"sSortDescending\": \": Activar para ordenar la columna de manera descendente\"\n\t\t\t\t}\n\n\t\t},\n\t\t\"drawCallback\":function(){\n\t\t\tvar api=this.api();\n\t\t\t$(api.column(18).footer()).html(\n\t\t\t\tapi.column(18,{page:'current'}).data().sum().toFixed(2)\n\t\t\t)\n\t\t\t$(api.column(19).footer()).html(\n\t\t\t\tapi.column(19,{page:'current'}).data().sum().toFixed(2)\n\t\t\t)\n\t\t} \n\t} );\n}", "function auditorias(fecha, codigo){\n\t\t$.ajax({\t\t\t\t\t \n\t\t\t\t\t type:\"POST\",\n\t\t\t\t\t url: \"auditoria5_epl.php\",\n\t\t\t\t\t data: \"fecha=\"+fecha+\"&codigo=\"+codigo,\n\t\t\t\t\t\t\t beforeSend:function(){\n\t\t\t\t\t\t\t$(\"#contenido2\").html(\"\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t },\n\t\t\t\t\t success: function (datos){\n\t\t\t\t\t \n\t\t\t\t\t\t\t//console.log(datos);return false;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t//INICIO DE TABLA\t \n\t\t\t\t\t\n\t\t\t\t\t\t\t//THEAD\n\t\t\t\t\t\t\tvar table=\"<div style='width:30%'><table style='color: rgb(41, 76, 139) !important; width: 100%' cellpadding='0' cellspacing='0' border='1' class='display' id='example2'>\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttable+=\"<thead style='background-color: rgb(41, 76, 139); font-size: 13px; color: #fff; font-weight:bold;'>\";\t\n\n\t\t\t\t\t\t\ttable+=\"<tr>\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttable+=\"<td align='center'>Turno</td><td align='center'>Hora Inicio</td><td align='center'>Hora Fin&nbsp;&nbsp;&nbsp;</td><td align='center'>Horas</td>\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttable+=\"</tr>\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttable+=\"</thead>\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//FIN THEAD\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//TBODY\n\t\t\t\t\t\t\t\t\ttable+=datos;\n\t\t\t\t\t\t\t\t\t//console.log(datos);\n\t\t\t\t\t\t\t\t\t//return false;\n\t\t\t\t\t\t\t//FIN TBODY\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\ttable+=\"</table></div><br><br>\";\n\t\t\t\t\t\n\t\t\t\t\t\t\t//FIN TABLA\n\t\t\t\t\t\n\t\t\t\t\t\t\t$(\"#contenido2\").html(table);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//Aca va el datable porque se crea example y ahi si con ese example hagame esta accion\n\t\t\t\t\t\t\t$('#example2').dataTable({\n\n\t\t\t\t\t\t\t\t\"bLengthChange\": false,\n\t\t\t\t\t\t\t\t\"bSort\": false,\n\t\t\t\t\t\t\t\t\"bPaginate\": true,\n\t\t\t\t\t\t\t\t\"bInfo\": false,\n\t\t\t\t\t\t\t\t\"bFilter\": false,\n\t\t\t\t\t\t\t\t\"oLanguage\": {\n\t\t\t\t\t\t\t\t\t\t\"sProcessing\": \"Procesando...\",\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\"sZeroRecords\": \"No se encontraron resultados\",\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\"sInfoEmpty\": \"No existen registros\",\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\"oPaginate\": {\n\t\t\t\t\t\t\t\t\t\t\t\"sFirst\": \"Primero\",\n\t\t\t\t\t\t\t\t\t\t\t\"sPrevious\": \"Anterior\",\n\t\t\t\t\t\t\t\t\t\t\t\"sNext\": \"Siguiente\",\n\t\t\t\t\t\t\t\t\t\t\t\"sLast\": \"Último\"\n\t\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\n\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\t\n\t\t\t\t});\t\t\n}", "function solicitudesRecividasDictamenesListado(){\n\tdocument.getElementById(\"titleSDL\").innerHTML = \"<h1>Dictamenes y Solicitudes Recibidas</h1>\";\n\tdocument.getElementById(\"SolicitudesSolicitadas\").innerHTML = \"\";\n\tdocument.getElementById(\"SolicitudesSolicitadas\").innerHTML = \"<img src='img/Loading_icon.gif'>\";\n\tsetTimeout(function(){\n\t\tdocument.getElementById(\"SolicitudesSolicitadas\").innerHTML = \"<table class='table table-striped' id='tablaEmployesSDLC'><tr class='info'><th>Fecha</th><th>Hora</th><th>Cargo</th><th>Dependencia</th><th>Titular</th><th>Motivo</th><th>Propuesta</th><th>Observaciones</th><th>DDI</th></tr></table>\";\n\t\tdatos[0] = \"<tr><td>12/01/2017</td><td>13:18:09</td><td>Oficial III</td><td>Juzgado de Familia</td><td>Rodrigo Macario</td><td>Licencia Estudios</td><td>Dionicio Lopez</td><td>Papeleria Completa</td><td><a id='1' onclick='verListado(this.id);' ><span class = 'glyphicon glyphicon-user'></span> Ver Candidatos</a></td></tr>\";\n\t\tdatos[1] = \"<tr><td>16/01/2017</td><td>12:18:09</td><td>Comisario</td><td>Juzgado de Sentencia</td><td>Pablo Sac</td><td>Suspencion</td><td>Marcos Tax</th><td>Papeleria Completa</td><td><a id='2' onclick='verListado(this.id);' ><span class = 'glyphicon glyphicon-user'></span> Ver Candidatos</a></td></tr>\";\n\t\tdatos[2] = \"<tr><td>19/01/2017</td><td>11:18:09</td><td>Secretario</td><td>Juzgado de Femicidio</td><td>Raul Velasco</td><td>Traslado</td><td>Juan Carlos</td><td>Papeleria Completa</td><td><a id='3' onclick='verListado(this.id);' ><span class = 'glyphicon glyphicon-user'></span> Ver Candidatos</a></td></tr>\";\n\t\tdatos[3] = \"<tr><td>17/01/2017</td><td>14:18:09</td><td>Oficial II</td><td>Juzgado de Paz</th><td>Mariano Galvez</td><td>Destitucion</td><td>Pedro Barreno</td><td>Papeleria Completa</td><td><a id='4' onclick='verListado(this.id);' ><span class = 'glyphicon glyphicon-user'></span> Ver Candidatos</a></td></tr>\";\n\t\tdatos[4] = \"<tr><td>20/01/2017</td><td>16:18:09</td><td>Notificador</td><td>Juzgado de la Niñez</td><td>Saul Tale</td><td>Fallecimiento</td><td>Dionicio Lopez</td><td>Papeleria Completa</td><td><a id='5' onclick='verListado(this.id);' ><span class = 'glyphicon glyphicon-user'></span> Ver Candidatos</a></td></tr>\";\n\t\tfor(var i in datos){\n\t\t\t$(\"#tablaEmployesSDLC\").append(datos[i]);\t\n\t\t}\n\t},500);\n}", "function fn_CargarEgresos(json_Filtro){\n $(\"#tbl_Egresos\").dataTable().fnDestroy();\n $('#tbl_Egresos tbody').empty();\n\n if(json_Filtro === undefined){\n\t\tjson_Filtro = 0;\n\t}\n\n $.post('models/Modulos/Contabilidad/sel_Egreso.php', {fn_Funcion:'CargarPanel', json_Filtro:json_Filtro}, function(res){\n var json_Egresos = $.parseJSON(res);\n \n if(json_Egresos){\n $(\"#lbl_EgresosTotales\").html(\"$ \" + fn_FormatearNumero(json_Egresos[0]['egreso_Total']));\n } \n\n $('#tbl_Egresos').dataTable({\n\t\t\t\"sDom\": \"Tflt<'row DTTTFooter'<'col-sm-6'i><'col-sm-6'p>>\",\n\t\t\t\"iDisplayLength\": 25,\n\t\t\t\"oTableTools\": {\n\t\t\t\t\"aButtons\": [\n\t\t\t\t\t\"xls\"\n\t\t\t\t],\n\t\t\t\t\"sSwfPath\": \"assets/swf/copy_csv_xls_pdf.swf\"\n\t\t\t},\n\t\t\t\"language\": {\n\t\t\t\t\"search\": \"\",\n\t\t\t\t\"emptyTable\": \"No hay registros.\",\n\t\t\t\t\"zeroRecords\": \"No existe ninguna coincidencias en los registros.\",\n\t\t\t\t\"sLengthMenu\": \"_MENU_\",\n\t\t\t\t\"oPaginate\": {\n\t\t\t\t\t\"sPrevious\": \"Ant\",\n\t\t\t\t\t\"sNext\": \"Sig\"\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"data\": json_Egresos,\n\t\t\t\"aoColumns\": [\n {\"data\": \"egreso_Fecha\"},\n {\"data\": \"egreso_NroDoc\"},\n {\"data\": \"tipoDoc_Nombre\"},\n {\"data\": \"cliente_Nombre\"},\n {\"data\": \"categoria_Nombre\"},\n {\"data\": \"egreso_Monto\"},\n {\"data\": \"egreso_Estado\"},\n {\"data\": \"egreso_Acciones\"}\n\t\t\t],\n columnDefs : [\n {\"targets\": 0, \"width\": \"90px\"},\n {\"targets\": 1, \"width\": \"60px\"},\n {\"targets\": 7, \"width\": \"50px\", \"orderable\": false}\n ],\n\t\t\t\"aaSorting\": [0, 'desc']\n\t\t});\n });\n}", "function getVientoDataForTable(viento){\n var tableColumns = new Array();\n var vientoDirData = new Array();\n var vientoVelData = new Array();\n for(var i = 0; i < viento.length; i++){\n if(viento[i].periodo == \"00-24\"){\n continue;\n }\n tableColumns.push(viento[i].periodo + \"h\");\n pushDataToArray(vientoDirData, viento[i].direccion);\n pushDataToArray(vientoVelData, viento[i].velocidad);\n }\n return [tableColumns, vientoDirData, vientoVelData];\n }", "function show(data) {\n // console.log(data)\n var inserir = data.map(function (item, indice) {\n\n return `<tr>\n <td>${item.date}</td>\n <td>${item.weekday}</td>\n <td>${item.max + '°C'}</td>\n <td>${item.min + '°C'}</td>\n <td>${item.description}</td>\n </tr>`;\n });\n\n\n document.querySelector(\"#tbPodio tbody\").innerHTML = inserir.join(\"\");\n}", "function getDataTable() {\n const table = document.getElementById(\"dataTable\").getElementsByTagName(\"tbody\")[0];\n const name = document.getElementById(\"name\").value;\n const gender = document.getElementById(\"gender\").value;\n const inputBornDate = document.getElementById(\"datePicker\").value; //get date YYYY-DD-MM\n const transformedBornDate = inputBornDate.split('-').reverse().join('.'); //transform date: YYYY-DD-MM -> DD.MM.YYYY for print in table\n const ageCount = calculateAgeCount(inputBornDate);\n if (name) {\n if (name.length < 5 || name.length > 50) {\n alert(\"Введено некорректное имя!\")\n } else {\n let inputParams = [name, gender, transformedBornDate, ageCount];\n addNewRow(table, inputParams);\n }\n } else {\n alert(\"Имя нужно обязательно заполнить!\");\n }\n calculateAverage();\n}", "function recargarTabla(){\n\tvar table = $('#TDataEstu').DataTable();\n\t\n\ttable.ajax.reload( function ( json ) {\n\t $('#TDataEstu').val( json.lastInput );\n\t});\n}", "function datosUsuario () {\n let valorNumeroDatos = numeroDatos ();\n\n //trae los datos a js y los agrega a la\n for (let i = 1; i < (valorNumeroDatos + 1); i++){\n let id = i;\n let dato = document.getElementById(id);\n let valueDato = parseInt(dato.value);\n lista.push(valueDato);\n }\n}", "function cargaDiaria() {\n entradas = [];\n $('#Div3 :input').each(function () {\n entradas.push($(this).val());\n });\n console.log(entradas);\n if (entradas[0] != \"\") {\n GuardarVentaDiaria();\n algo = document.getElementById(\"Table1\");\n inputs = algo.getElementsByTagName(\"input\");\n for (i = 0; i < inputs.length; i++) {\n inputs[i].value = \"\";\n }\n } else {\n alert(\"Debe ingresar una fecha\");\n }\n function GuardarVentaDiaria() {\n if ($(\"#regNuevo\")[0]) {\n var myRows = [];\n var $headers = $(\".head\");\n var $rows = $(\"#regNuevo\").each(function (index) {\n $cells = $(this).find(\"td\");\n myRows[index] = {};\n $cells.each(function (cellIndex) {\n myRows[index][$($headers[cellIndex]).html()] = $(this).html();\n });\n });\n var data = {};\n data.tabla = myRows;\n\n $.ajax({\n url: 'registroVentas.aspx/datosDiarios',\n data: JSON.stringify(data),\n type: 'post',\n contentType: 'application/json; charset=utf-8',\n dataType: 'json',\n success: function (r) {\n\n if (r.d === 'bien') {\n $(\"#ventaDiaria tr\").remove();\n itemsGuardados();\n\n\n } else {\n alert(\"ocurrio un error al momento de registrar la informacion\");\n }\n },\n error: function () {\n alert(\"No puede existir mas de un registro con una misma fecha\");\n }\n });\n } else {\n alert(\"No existen datos nuevos para ingresar\");\n }\n\n }\n\n}", "function cargarEventos(){\r\n document.querySelector(\"#btnMuestroRegistro\").addEventListener(\"click\", mostrarRegistro);\r\n document.querySelector(\"#btnRegistrarse\").addEventListener(\"click\", registro);\r\n document.querySelector(\"#btnPaginaPrincipal\").addEventListener(\"click\", paginaPrincipal);\r\n document.querySelector(\"#btnMuestroIngresar\").addEventListener(\"click\", mostrarIngresar);\r\n document.querySelector(\"#btnAcceder\").addEventListener(\"click\", acceder);\r\n document.querySelector(\"#btnCierroSesion\").addEventListener(\"click\", paginaPrincipal);\r\n document.querySelector(\"#btnAsignarNivel\").addEventListener(\"click\", asignarNivel); \r\n document.querySelector(\"#btnMostrarXDocente\").addEventListener(\"click\", mostrarXDocente); \r\n document.querySelector(\"#selPerfil\").addEventListener(\"change\", alumnoRegistro);\r\n document.querySelector(\"#aAsignarNivel\").addEventListener(\"click\",mostrarAsignarNivel);\r\n document.querySelector(\"#aPlantearEje\").addEventListener(\"click\",mostrarPlantearEje);\r\n document.querySelector(\"#aDevoluciones\").addEventListener(\"click\",mostrarDevoluciones);\r\n document.querySelector(\"#aEstDocentes\").addEventListener(\"click\",mostrarEstDocente);\r\n document.querySelector(\"#aEjAlumnos\").addEventListener(\"click\", mostrarEjAlumnos);\r\n document.querySelector(\"#aEstAlumnos\").addEventListener(\"click\", mostrarEstAlumnos);\r\n document.querySelector(\"#aEntAlumnos\").addEventListener(\"click\", mostrarEntAlumnos);\r\n document.querySelector(\"#buscaEjAlumno\").addEventListener(\"click\", realizarBusqueda);\r\n document.querySelector(\"#subirEjercicio\").addEventListener(\"click\", plantearEj);\r\n document.querySelector(\"#btnMostrarEntregas\").addEventListener(\"click\", generarTablaEntregasSinDevolucion); \r\n document.querySelector(\"#btnMostrarAlumno\").addEventListener(\"click\",mostrarAlumnoConMasEjerciciosResueltos);\r\n document.querySelector(\"#btnEjeResueltos\").addEventListener(\"click\", mostrarCantEjResueltos);\r\n document.querySelector(\"#btnEjexNivel\").addEventListener(\"click\", mostrarEstAlumnosParaDocente);\r\n}", "function fijasAdministrativas(){\n\tdocument.getElementById(\"titleSDL\").innerHTML = \"<h1>Folios Vacantes Fijas Administrativas </h1>\";\n\tdocument.getElementById(\"SolicitudesSolicitadas\").innerHTML = \"\";\n\tdocument.getElementById(\"SolicitudesSolicitadas\").innerHTML = \"<img src='img/Loading_icon.gif'>\";\n\tsetTimeout(function(){\n\t\tdocument.getElementById(\"SolicitudesSolicitadas\").innerHTML = \"<table class='table table-striped' id='tablaEmployesSDLC'><tr class='info'><th>Fecha</th><th>Hora</th><th>Cargo</th><th>Dependencia</th><th>Titular</th><th>Motivo</th><th>Propuesta</th><th>Observaciones</th><th>Opcion</th></tr></table>\";\n\t\tdatos[0] = \"<tr><td>12/01/2017</td><td>13:18:09</td><td>Oficial III</td><td>Area Administrativa</td><td>Rodrigo Macario</td><td>Licencia Estudios</td><td>Dionicio Lopez</td><td>Papeleria Completa</td><td><a id='1' onclick='verListadoFolio(this.id);' ><span class = 'glyphicon glyphicon-user'></span> Ver Folio</a></td></tr>\";\n\t\tdatos[1] = \"<tr><td>16/01/2017</td><td>12:18:09</td><td>Comisario</td><td>Juzgado de Sentencia</td><td>Pablo Sac</td><td>Suspencion</td><td>Marcos Tax</th><td>Papeleria Completa</td><td><a id='2' onclick='verListadoFolio(this.id);' ><span class = 'glyphicon glyphicon-user'></span> Ver Folio</a></td></tr>\";\n\t\tdatos[2] = \"<tr><td>19/01/2017</td><td>11:18:09</td><td>Secretario</td><td>Area Administrativa</td><td>Raul Velasco</td><td>Traslado</td><td>Juan Carlos</td><td>Papeleria Completa</td><td><a id='3' onclick='verListadoFolio(this.id);' ><span class = 'glyphicon glyphicon-user'></span> Ver Folio</a></td></tr>\";\n\t\tdatos[3] = \"<tr><td>17/01/2017</td><td>14:18:09</td><td>Oficial II</td><td>Juzgado de Paz</th><td>Mariano Galvez</td><td>Destitucion</td><td>Pedro Barreno</td><td>Papeleria Completa</td><td><a id='4' onclick='verListadoFolio(this.id);' ><span class = 'glyphicon glyphicon-user'></span> Ver Folio</a></td></tr>\";\n\t\tdatos[4] = \"<tr><td>20/01/2017</td><td>16:18:09</td><td>Notificador</td><td>Area Administrativa</td><td>Saul Tale</td><td>Fallecimiento</td><td>Dionicio Lopez</td><td>Papeleria Completa</td><td><a id='5' onclick='verListadoFolio(this.id);' ><span class = 'glyphicon glyphicon-user'></span> Ver Folio</a></td></tr>\";\n\t\tfor(var i in datos){\n\t\t\t$(\"#tablaEmployesSDLC\").append(datos[i]);\t\n\t\t}\n\t},500);\n}", "function iniciareditaringresos(datos) {\n\n document.getElementById(\"idti\").value = datos[0][\"idtipoingresosganancias\"]\n document.getElementById(\"nombreingresoseditar\").value = datos[0][\"nombre\"];\n document.getElementById(\"descripcioningresoseditar\").value = datos[0][\"descripcion\"];\n document.getElementById(\"ayudaingresoseditar\").value = datos[0][\"ayuda\"];\n\n}", "function js_descuentofactura_carga_busquedaCliente(div,url){\n var spanish_in=\"//cdn.datatables.net/plug-ins/f2c75b7247b/i18n/Spanish.json\";\n document.getElementById(div).innerHTML='<br><div align=\"center\" style=\"height:100%;\"><i style=\"font-size:large;color:#E55A2F;\" class=\"fa fa-cog fa-spin\"></i></div>';\n var data = new FormData();\n data.append('event', 'buscar_clientes'); \n var xhr = new XMLHttpRequest();\n xhr.open('POST', url , true);\n xhr.onreadystatechange=function(){\n if (xhr.readyState==4 && xhr.status==200){\n document.getElementById(div).innerHTML=xhr.responseText;\n $('#clientes_table').DataTable({\n \"info\": false,\n \"ordering\": true,\n \"searching\":false,\n \"lengthChange\":false,\n \"paging\":true,\n \"language\": {\n \"url\":spanish_in\n }\n });\n } \n };\n xhr.send(data);\n}", "function llenarTabla(data, j, enfoque) {\n if (enfoque == 1) {\n $(\"#cbo-det-1-\" + (j + 1)).val(data[j][\"ANNO_BASE\"]);\n $(\"#cbo-det-2-\" + (j + 1)).val(data[j][\"ID_TIPO_VEHICULO_BASE\"]);\n $(\"#cbo-det-3-\" + (j + 1)).val(data[j][\"ID_TIPO_COMBUSTIBLE_BASE\"]);\n $(\"#dat-det-1-\" + (j + 1)).val(data[j][\"FECHA\"]);\n $(\"#txt-det-1-\" + (j + 1)).val(data[j][\"KRV_BASE\"]);\n $(\"#txt-det-2-\" + (j + 1)).val(data[j][\"CANT_BASE\"]);\n $(\"#txt-det-3-\" + (j + 1)).val(data[j][\"F_RENDIMIENTO\"]);\n $(\"#txt-det-4-\" + (j + 1)).val(data[j][\"PLACA\"]);\n $(\"#txt-det-5-\" + (j + 1)).val(data[j][\"TOTAL_GEI_BASE\"]);\n $(\"#txt-det-6-\" + (j + 1)).val(data[j][\"TOTAL_GEI_INIMIT\"]);\n $(\"#txt-det-7-\" + (j + 1)).val(data[j][\"TOTAL_GEI_REDUCIDO\"]);\n $(\"#txt-det-8-\" + (j + 1)).val(data[j][\"ID_INDICADOR\"]);\n //$(\"#detalles-tr-\" + (j + 1)).data(\"value\", data[j][\"ID_INDICADOR\"]);\n } else if (enfoque == 2) {\n $(\"#cbo-det-1-\" + (j + 1)).val(data[j][\"ANNO_BASE\"]);\n $(\"#cbo-det-2-\" + (j + 1)).val(data[j][\"ID_TIPO_VEHICULO_BASE\"]);\n $(\"#cbo-det-3-\" + (j + 1)).val(data[j][\"ID_TIPO_COMBUSTIBLE_BASE\"]);\n $(\"#dat-det-1-\" + (j + 1)).val(data[j][\"FECHA\"]);\n $(\"#txt-det-1-\" + (j + 1)).val(data[j][\"KRV_BASE\"]);\n $(\"#txt-det-2-\" + (j + 1)).val(data[j][\"KRV_COMBUSTIBLE\"]);\n $(\"#txt-det-3-\" + (j + 1)).val(data[j][\"CANT_BASE\"]);\n $(\"#txt-det-4-\" + (j + 1)).val(data[j][\"F_RENDIMIENTO\"]);\n $(\"#txt-det-5-\" + (j + 1)).val(data[j][\"PLACA\"]);\n $(\"#txt-det-6-\" + (j + 1)).val(data[j][\"TOTAL_GEI_BASE\"]);\n $(\"#txt-det-7-\" + (j + 1)).val(data[j][\"TOTAL_GEI_INIMIT\"]);\n $(\"#txt-det-8-\" + (j + 1)).val(data[j][\"TOTAL_GEI_REDUCIDO\"]);\n $(\"#txt-det-9-\" + (j + 1)).val(data[j][\"ID_INDICADOR\"]);\n } else if (enfoque == 3) {\n $(\"#cbo-det-1-\" + (j + 1)).val(data[j][\"ANNO_BASE\"]);\n $(\"#cbo-det-2-\" + (j + 1)).val(data[j][\"ID_TIPO_VEHICULO_BASE\"]);\n $(\"#cbo-det-3-\" + (j + 1)).val(data[j][\"ID_TIPO_COMBUSTIBLE_BASE\"]);\n $(\"#dat-det-1-\" + (j + 1)).val(data[j][\"FECHA\"]);\n $(\"#txt-det-1-\" + (j + 1)).val(data[j][\"CONSUMO_ELECTRICIDAD\"]);\n $(\"#txt-det-2-\" + (j + 1)).val(data[j][\"PLACA\"]);\n $(\"#txt-det-3-\" + (j + 1)).val(data[j][\"TOTAL_GEI_BASE\"]);\n $(\"#txt-det-4-\" + (j + 1)).val(data[j][\"TOTAL_GEI_INIMIT\"]);\n $(\"#txt-det-5-\" + (j + 1)).val(data[j][\"TOTAL_GEI_REDUCIDO\"]);\n $(\"#txt-det-6-\" + (j + 1)).val(data[j][\"ID_INDICADOR\"]);\n } else if (enfoque == 4) {\n $(\"#cbo-det-1-\" + (j + 1)).val(data[j][\"ANNO_BASE\"]);\n $(\"#cbo-det-2-\" + (j + 1)).val(data[j][\"ID_TIPO_VEHICULO_BASE\"]);\n $(\"#cbo-det-3-\" + (j + 1)).val(data[j][\"ID_TIPO_COMBUSTIBLE_BASE\"]);\n $(\"#dat-det-1-\" + (j + 1)).val(data[j][\"FECHA\"]);\n $(\"#txt-det-1-\" + (j + 1)).val(data[j][\"CONSUMO_ELECTRICIDAD\"]);\n $(\"#txt-det-2-\" + (j + 1)).val(data[j][\"CONSUMO_COMBUSTIBLE\"]);\n $(\"#txt-det-3-\" + (j + 1)).val(data[j][\"PLACA\"]);\n $(\"#txt-det-4-\" + (j + 1)).val(data[j][\"TOTAL_GEI_BASE\"]);\n $(\"#txt-det-5-\" + (j + 1)).val(data[j][\"TOTAL_GEI_INIMIT\"]);\n $(\"#txt-det-6-\" + (j + 1)).val(data[j][\"TOTAL_GEI_REDUCIDO\"]);\n $(\"#txt-det-7-\" + (j + 1)).val(data[j][\"ID_INDICADOR\"]);\n }\n\n //$(\"#cuerpoTablaIndicador\").data(\"total\", $(\"#cuerpoTablaIndicador\").data(\"total\") + data[j][\"TOTAL_GEI_REDUCIDO\"]);\n //$(\"#total-detalle #total\").remove();\n //$(\"#total-detalle\").append('<strong id=\"total\">' + (Math.round($(\"#cuerpoTablaIndicador\").data(\"total\") * 100) / 100) + ' tCO<sub>2</sub>eq</strong>');\n //$(\"#total-detalle2 #total2\").remove();\n //$(\"#total-detalle2\").append('<strong id=\"total2\">' + (Math.round($(\"#cuerpoTablaIndicador\").data(\"total\") * 100) / 100) + ' tCO<sub>2</sub>eq</strong>');\n}", "function getEmpleadosTabla() {\n $http.post(\"EmpleadosTabla/getEmpleadosTabla\").then(function (r) {\n if (r.data.cod == \"OK\") {\n vm.lista.data = r.data.d.tablaEmpleado\n vm.lista.disp = [].concat(vm.lista.data);\n }\n })\n }", "function seleccionarOrden(productos){\n \n\n let rowProductos = document.querySelector(\".buzos__row\");\n\n rowProductos.innerHTML=\"\";\n\n let select = document.querySelector(\".selectOrdenProductos\");\n \n switch(select.value){\n\n case 'date':\n getPaginacion(ordenarProductosFecha(productos));\n break;\n \n case 'price-asc':\n getPaginacion(ordenarProductosPrecio(productos, \"asc\"));\n break;\n\n case 'price-des':\n getPaginacion(ordenarProductosPrecio(productos, \"des\"));\n break;\n\n }\n \n}", "function tratarDados() {\n\t\t\t\n\t\t\tif( final_pag ) {\n pagina_atual = 1;\n pagina_inc = 0;\n return false;\n }\n\n var campo_pesquisa = $('.btn-oc-filtro');\n var campo_pendencia = $('.filtro-pendencia');\n var campo_pendentes = $('.filtro-pendentes');\n var campo_autorizadas = $('.filtro-autorizadas');\n var campo_reprovadas = $('.filtro-reprovadas');\n var campo_mes_inicial = $('.filtro-mes-inicial');\n var campo_ano_inicial = $('.filtro-ano-inicial');\n var campo_mes_final = $('.filtro-mes-final');\n var campo_ano_final = $('.filtro-ano-final');\n\n var pesquisa = campo_pesquisa.val();\n var pendencia = campo_pendencia.is(\":checked\");\n var pendentes = campo_pendentes.is(\":checked\");\n var autorizadas = campo_autorizadas.is(\":checked\");\n var reprovadas = campo_reprovadas.is(\":checked\");\n var mes_inicial = campo_mes_inicial.val();\n var ano_inicial = campo_ano_inicial.val();\n var mes_final = campo_mes_final.val();\n var ano_final = campo_ano_final.val();\n var data_inicial = new Date(ano_inicial, mes_inicial-1,01);\n var data_final = lastDate(new Date(ano_final, mes_final-1,01));\n var data_1 = data_inicial.getFullYear()+'.'+(data_inicial.getMonth()+1)+'.'+data_inicial.getDate();\n var data_2 = data_final .getFullYear()+'.'+(data_final .getMonth()+1)+'.'+data_final .getDate();\n var dados;\n \n dados = {\n 'qtd_por_pagina': qtd_por_pag,\n 'pagina' : pagina_inc, \n 'filtro' : pesquisa,\n 'pendencia' : pendencia,\n 'pendentes' : pendentes,\n 'autorizadas' : autorizadas,\n 'reprovadas' : reprovadas,\n 'data_1' : data_1,\n 'data_2' : data_2 \n }; \n\n function success(data) {\t\t\t\t\t\t\n if(data) {\n var html = $('table.lista-obj tbody').html();\n $('table.lista-obj tbody').html(html + data);\n show();\n bootstrapInit();\n addEventBtn();\n\n } else {\n final_pag = true;\n }\n }\n function complete() {\n $('.btn-oc-filtrar').button('reset'); \n }\n $('.btn-oc-filtrar').button('loading');\n execAjax1('POST','/_13050/paginacaoScroll',dados,success,null,complete);\n }", "function generarDatos() {\n let librosPrecargados = [{\n \"titulo\": \"Bullying y abuso infantil\",\n \"autor\": \"Tere Vale\",\n \"año\": \"2020\"\n },\n {\n \"titulo\": \"Marinka una rusa niña vasca\",\n \"autor\": \"Rodolfo Luna Almeida\",\n \"año\": \"2019\"\n },\n {\n \"titulo\": \"Camino a una tierra extraña\",\n \"autor\": \"David Park\",\n \"año\": \"2018\"\n },\n {\n \"titulo\": \"El sueño del retorno\",\n \"autor\": \"Firulais\",\n \"año\": \"2017\"\n },\n {\n \"titulo\": \"Humanos\",\n \"autor\": \"Dios\",\n \"año\": \"2020\"\n }\n ];\n return librosPrecargados;\n}", "function fct_AtualizaInputsTabela() {\n\n fct_Index(\"Codigo\", \"Codigo\");\n\n fct_Index(\"InicioVigencia\", \"DtInicioVigencia\");\n\n fct_Index(\"FimVigencia\", \"DtFimVigencia\");\n\n fct_Index(\"DiaDaSemana\", \"DiaDaSemana\");\n\n fct_Index(\"HoraInicio\", \"HoraDeInicioDasAulas\");\n\n fct_Index(\"HoraFim\", \"HoraDeFimDasAulas\");\n\n function fct_Index(id, campo) {\n\n var contador = 0;\n\n $('input[id=' + id + ']').each(function () {\n $(this).prop(\"name\", \"AulaPaa[\" + contador + \"].\" + campo);\n contador++;\n });\n }\n}", "function dtProductos() {\n var table = $(\"#tabla-productos\").DataTable({\n destroy: true,\n responsive: true,\n ajax: { //Datatables usa Jquery, por lo que tiene incorporado AJAX para cargar datos\n method: \"POST\",\n url: \"frmAdministrarProductos.aspx/obtenerProductos\", //llama al web method de la ruta\n contentType: \"application/json; charset=utf-8\",\n dataType: \"json\",\n data: function (d) {\n return JSON.stringify(d); //convierte json a string\n },\n dataSrc: \"d.data\" //usa la data (convertida a string) del json como fuente de datos para llenar la tabla\n },\n columns: [\n { \"data\": \"idProducto\" },\n { \"data\": \"Nombre\" },\n { \"data\": \"Marca\" },\n { \"data\": \"Contenido\" },\n { \"data\": \"Categoria\" },\n { \"data\": \"Descripcion\" },\n { \"data\": \"Foto\" },\n { \"data\": \"Estatus\" }\n ]\n });\n}", "function golist() {\n /*Ajustar la petición para mostrar la tabla de resultados procesos*/\n var columnasdata = [{ \"data\": \"AA\" },\n { \"data\": \"BB\" },\n { \"data\": \"CC\" },\n { \"data\": \"ACCIONES\" }];\n\n /*Consultar procesos y mostrar*/\n autogenDatatablesminHeaders(columnasdata, \"DT_listado\", \"JFunctionData\", \"listas\", \"{}\");\n document.getElementById(\"FW_resultados\").style.display = \"block\";\n}", "function preecheTabela(){\n\t\t//acessa a pagina /frequencia.php\n\t\t$.ajax({\n\t\t\tmethod: 'get',\n\t\t\turl: 'select.php',\n\t\t\t//obtem dados dos campos de select, através dos ids dos elementos e\n\t\t\t//funcao val() do jquery\n\t\t\tdata: {cur_id: $('#turma').val()},\n\t\t\tdataType: 'json',\n\t\t\tsuccess: function(dados){\n\t\t\t\t//verifica se a variavel \"dados\" possui as informações de data e nomes\n\t\t\t\tvar data = dados.hasOwnProperty('data') ? dados.data : null;\n\t\t\t\tvar nomes = dados[0];\n\t\t\t\t\n\t\t\t\t//limpa e adiciona dados em campos ...\n\t\t\t\t$('#dataCabecalho').html('');\n\t\t\t\t$('#dataCabecalho').append('Data - ' + data);\n\t\t\t\t\n\t\t\t\tvar listaNomes = $('#listaNomes');\n\t\t\t\t\n\t\t\t\tlistaNomes.html('');\n\t\t\t\tvar j=1;\n\t\t\t\t//adiciona nomes na tabela\n\t\t\t\tfor(var i = 0; i < nomes.length; i++){\n\t\t\t\t\t//adiciona linhas com e colunas com td. \n\t\t\t\t\tlistaNomes.append('<tr>'+\n\t\t\t\t\t\t\t'<td>' + \n\t\t\t\t\t\t\tj +'</td>' +\n\t\t\t\t\t\t\t'<td>' + \n\t\t\t\t\t\t\tnomes[i].alu_nome +'</td>' +\n\t\t\t\t\t\t\t'<td>' + '<input type=\"number\" name=\"' + \n\t\t\t\t\t\t\tnomes[i].alu_id + '\"' + '></td>'\n\t\t\t\t\t\t\t+'</tr>');\n\t\t\t\t\t\t\tj++;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "function construirTabla() {\n let tabla = document.createElement(\"table\");\n let body = document.getElementById(\"paraTablas\");\n body.appendChild(tabla);\n tabla.setAttribute(\"id\", \"table\");\n tabla.setAttribute(\"class\", \"table table-hover\");\n let trheadcabeza = document.createElement(\"thead\");\n tabla.appendChild(trheadcabeza);\n trheadcabeza.setAttribute(\"class\", \"tabla_primerFila\");\n let trhead = document.createElement(\"tr\");\n trheadcabeza.appendChild(trhead);\n let tdhead0 = document.createElement(\"td\");\n tdhead0.innerHTML = \"Número de cuota\";\n trhead.appendChild(tdhead0);\n let tdhead1 = document.createElement(\"td\");\n tdhead1.innerHTML = \"Saldo pendiente al inicio\";\n trhead.appendChild(tdhead1);\n let tdhead2 = document.createElement(\"td\");\n tdhead2.innerHTML = \"Intereses sobre saldo\";\n trhead.appendChild(tdhead2);\n let tdhead3 = document.createElement(\"td\");\n tdhead3.innerHTML = \"Saldo con intereses\";\n trhead.appendChild(tdhead3);\n let tdhead4 = document.createElement(\"td\");\n tdhead4.innerHTML = \"Cuota a pagar\";\n trhead.appendChild(tdhead4);\n let tdhead5 = document.createElement(\"td\");\n tdhead5.innerHTML = \"Remanente post pago\";\n trhead.appendChild(tdhead5);\n let tbody = document.createElement(\"tbody\");\n tabla.appendChild(tbody);\n let prestamo = datosDePrestamo.length;\n for (let i = 0; i < prestamo; i++) {\n let tr1 = document.createElement(\"tr\");\n tbody.appendChild(tr1);\n let info0 = document.createElement(\"td\");\n info0.innerHTML = i + 1;\n tr1.appendChild(info0);\n let info = document.createElement(\"td\");\n info.innerHTML = redondear(datosDePrestamo[i].capital);\n tr1.appendChild(info);\n let info4 = document.createElement(\"td\");\n info4.innerHTML = redondear(datosDePrestamo[i].intereses);\n tr1.appendChild(info4);\n let info5 = document.createElement(\"td\");\n info5.innerHTML = redondear(datosDePrestamo[i].capitalPostInt);\n tr1.appendChild(info5);\n let info2 = document.createElement(\"td\");\n info2.innerHTML = redondear(datosDePrestamo[i].cuota);\n tr1.appendChild(info2);\n let info3 = document.createElement(\"td\");\n info3.innerHTML = redondear(datosDePrestamo[i].saldoRem);\n tr1.appendChild(info3);\n }\n $(\"#paraTablas\").append(`<button id=\"solicitarPrestamo\" class=\"btn btn-dark btn-align btn-margin\" onclick=\"solicitarPrestamo()\">Solicitar prestamo</button>`)\n $(\".tablaa\").fadeIn(\"slow\");\n}", "async function preencheTabela() {\n\n let moduloSelecionado = document.getElementById('selecionaModulo').value\n \n const dadosRecebidos = await recebeDadosTabela();\n \n removeTr();\n \n dadosRecebidos.forEach(dadoRecebido => {\n if (dadoRecebido.modulo === moduloSelecionado) {\n infoTables(\n dadoRecebido.nome,\n dadoRecebido.matriculados,\n dadoRecebido.desistentes,\n dadoRecebido.aptos,\n dadoRecebido.naoAptos.total); \n }\n\n });\n\n}", "function inicializarActividades() {\n\t//Creamos actividades por defecto\n\tactividad1 = new Actividad(\"Yoga\", 60, 1);\n\tactividad2 = new Actividad(\"Cross-Fit\", 45, 2);\n\tactividad3 = new Actividad(\"Zumba\", 30, 1);\n\n\tvectorActividades.push(actividad1);\n\tvectorActividades.push(actividad2);\n\tvectorActividades.push(actividad3);\n\n\t//Aniadimos las actividades a una tabla\n\tvar tablaActividades = document.getElementById(\"actividades\");\n\t\n\tfor (var i = 0; i < vectorActividades.length; i++){\n\t\tvar nuevaActividad = tablaActividades.insertRow(-1);\n\t\tnuevaActividad.innerHTML = \"<td>\" + vectorActividades[i].nombre + \"</td><td>\" \n\t\t+ vectorActividades[i].duracion + \"</td>\"\n\t\t+ \"<td>\" + vectorActividades[i].sala + \"</td>\";\n\t}\n\t\n}", "function fnc_tables_cargar_caracteristicas() {\n\n\t$('table').on('keypress', 'input.f_imp, input.f_sin, input.f_tpc, input.f_num', function () {\n\t\treturn filterFloat(event, this);\n\t});\n\n $('table tbody').on('click', 'td.dtr-control', function () {\n\t\tfnc_dataTable_recalc($(this).closest('table').attr('id'));\n });\n\n\t$(\".dataTables_info\").click(function () {\n\t\tvar pc_id = $(this).attr('id');\n\t\tpc_table_select_export = pc_id.substring(0, pc_id.length - 5);\n\t\t$('#mdl_exportar').modal('open');\n\t});\n\n\t// Table Input, Select, etc.\n\t$('table').on('change', 'input', function () {\n\t\tfc_table_id = $(this).closest('table.dataTable').attr('id');\n\t\tfo_table = $('#' + fc_table_id).DataTable();\n\t\tfr_row_data = fo_table.row($(this).parents('tr')).data();\n\t\tfo_columns = fo_table.settings().init().columns;\n\t\tfn_rowIndex = fo_table.cell($(this).parents('td')).index().row;\n\t\tfn_colIndex = fo_table.cell($(this).parents('td')).index().column;\n\t\tfc_colName = fo_columns[fn_colIndex].data;\n\t\t\n\t\tfc_cellData_fnc = $(this).parents('td').data('fnc');\n\t\tfc_cellData_value = fnc_get_value_cell_function(fc_colName, $(this).val(), fc_cellData_fnc);\n\t});\n\n\t$('table').on('focus', 'input', function () {\n\t\t$(this).select();\n\t});\t\n\t\n\t/* --------------------------------- Botones de Navegacion: Inicio --------------------------------- */\n\t//var var_ = 2;\n\tfunction f_dtrg_group_cont(){\n\t\tvar v_dtrg_group_cont = 0;\t\n\t\t$('#grid_lista > tbody > tr.dtrg-group').each(function() {v_dtrg_group_cont++;});\n\t\treturn v_dtrg_group_cont;\n\t}\n\tfunction select_(){\n\t\tt1 = $('#grid_lista').DataTable();\n\t\tvar rowSelected = t1.row().$('tr.selected');\n\t\t$('#grid_lista').DataTable().row( $(rowSelected).closest('tr') ).select();\n\t}\n\t \n\tfunction p_registro(){\n\t\t// <!-- $('#grid_lista').DataTable().rows('.parent').nodes().to$().find('td:first-child').trigger('click'); -->\n\n\t\tvar fila = 1;\n\t\t\n\t\t$('#grid_lista').find('tr.selected').removeClass('selected');\n\t\t$(\"#grid_lista tbody tr:eq(\" + fila + \")\").addClass(\"selected\");\n\t\t$(\"#grid_lista tbody tr:eq(\" + fila + \") td:not(td:first-child)\")[0].click();\n\n\t\tselect_();\n\t}\n\t\t\n\tfunction u_registro(fila){\n\t\t// <!-- $('#grid_lista').DataTable().rows('.parent').nodes().to$().find('td:first-child').trigger('click'); -->\n\n\t\t$('#grid_lista').find('tr.selected').removeClass('selected');\n\t\t$(\"#grid_lista tbody tr:eq(\" + fila + \")\").addClass(\"selected\");\n\t\t$(\"#grid_lista tbody tr:eq(\" + fila + \") td:not(td:first-child)\")[0].click();\n\n\t\tselect_();\n\t};\n\t \n\t$(\"#btn_p_row\").click(function () {\n\t\tt1 = $(\"#grid_lista\").DataTable();\n\t\tif (t1.page.info().recordsDisplay == 0)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$('#grid_lista').DataTable().rows('.parent').nodes().to$().find('td:first-child').trigger('click');\n\t\t\n\t\tvar rowSelected = t1.row().$('tr.selected');\n\t\tvar rowIndex = $('#grid_lista tr').index($(rowSelected).closest('tr'));\n\n\t\tif (t1.page.info().page == 0 && (rowIndex - var_) == 1)\n\t\t{\n\t\t\t// f_msj('No existen mas registros!','','e','bottomRight','');\n\t\t\tf_msj('El primer registro esta seleccionado!!!','','e','bottomRight','');\n\t\t\treturn;\n\t\t}\n\t\t// <!-- ------------------------------------------------- -->\n\t\t\t\n\t\t$('#grid_lista').dataTable().fnPageChange(0);\n\t\tp_registro();\n\t\t\n\t\tfnc_dataTable_recalc();\n\t});\n\t\t\n\t$(\"#btn_u_row\").click(function () {\n\t\tt1 = $(\"#grid_lista\").DataTable();\n\t\tif (t1.page.info().recordsDisplay == 0)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$('#grid_lista').DataTable().rows('.parent').nodes().to$().find('td:first-child').trigger('click');\n\n\t\tvar rowSelected = t1.row().$('tr.selected');\n\t\tvar rowIndex = $('#grid_lista tr').index($(rowSelected).closest('tr'));\n\n\t\t// <!-- ------------------------------------------------- -->\n\t\tvar limite_x_page_;\n\t\tvar length_ = t1.page.info().length;\n\t\tif (length_ == -1 || t1.page.info().pages == 1)\n\t\t{\n\t\t\tlength_ = t1.page.info().end;\n\t\t\tlimite_x_page_ = length_ + f_dtrg_group_cont() - 1;\n\t\t}\n\t\tif (t1.page.info().pages > 1)\n\t\t{\n\t\t\tlimite_x_page_ = t1.page.info().recordsDisplay % length_;\n\t\t}\n\t\t// <!-- ----------------------------------------------------------- -->\n\t\tif (t1.page.info().page == t1.page.info().pages - 1 && (rowIndex - var_) == limite_x_page_)\n\t\t{\n\t\t\t// f_msj('No existen mas registros!','','e','bottomRight','');\n\t\t\tf_msj('El ultimo registro esta seleccionado!!!','','e','bottomRight','');\n\t\t\treturn;\n\t\t}\n\t\t// <!-- ----------------------------------------------------------- -->\n\t\t\n\t\t//FALTA AGREGAR CONDICIONAL AND QUE SEA PAGINA IGUAL AL TOTAL DE PAGINAS\n\t\tif (t1.page.info().pages > 1)\n\t\t{\n\t\t\t$('#grid_lista').dataTable().fnPageChange($('#grid_lista').DataTable().page.info().pages - 1);\n\t\t}\n\t\t\n\t\trowIndex = limite_x_page_;\n\t\tu_registro(rowIndex);\n\t\t\n\t\tfnc_dataTable_recalc();\n\t});\n\n\t$(\"#btn_a_row\").click(function () {\n\t\tt1 = $(\"#grid_lista\").DataTable();\n\t\tif (t1.page.info().recordsDisplay == 0)\n\t\treturn;\n\n\t\t$('#grid_lista').DataTable().rows('.parent').nodes().to$().find('td:first-child').trigger('click');\n\t\t\n\t\tvar rowSelected = t1.row().$('tr.selected');\n\t\tvar rowIndex = $('#grid_lista tr').index($(rowSelected).closest('tr'));\n\t\trowIndex = parseInt(rowIndex) - var_;\n\t\t\n\t\tif (rowIndex < 0)\n\t\t{\n\t\t\tvar limite_x_page_;\n\t\t\tvar length_ = t1.page.info().length;\n\t\t\tif (length_ == -1 || t1.page.info().pages == 1)\n\t\t\t{\n\t\t\t\tlength_ = t1.page.info().end;\n\t\t\t\tlimite_x_page_ = length_ + f_dtrg_group_cont() - 1;\n\t\t\t}\n\t\t\tif (t1.page.info().pages > 1)\n\t\t\t{\n\t\t\t\tif ((t1.page.info().page + 1) == t1.page.info().pages)\n\t\t\t\t{\n\t\t\t\t\tlimite_x_page_ = t1.page.info().recordsDisplay % length_;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tlimite_x_page_ = length_ + f_dtrg_group_cont() - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\trowIndex = limite_x_page_;\n\t\t\tu_registro(rowIndex);\n\t\t\treturn;\n\t\t// <!-- --------------------------------------------------------------------- -->\n\t\t\n\t\t}\n\t\t//FER77\n\t\tif (t1.page.info().page == 0)\n\t\t{\n\t\t\tif (rowIndex == 1)\n\t\t\t{\n\t\t\t\t// f_msj('No existen mas registros!','','e','bottomRight','');\n\t\t\t\tf_msj('El primer registro esta seleccionado!!!','','e','bottomRight','');\n\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tif (rowIndex == 1)\n\t\t{\n\t\t\t// <!-- t1.fnPageChange(t1.page.info().page+1); -->\n\t\t\t$('#grid_lista').dataTable().fnPageChange(t1.page.info().page-1);\n\t\t\t\t\t\t\t\n\t\t\trowIndex = t1.page.info().length + f_dtrg_group_cont() - 1;\n\t\t\tu_registro(rowIndex);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar row_class = t1.row(rowIndex).$(rowSelected).prev('tr').attr('class');\n\t\t\trowSelected.removeClass('selected');\n\t\t\tvar f_tipo_row = row_class.indexOf(\"dtrg-group\");\n\t\t\t\n\t\t\tif (f_tipo_row == -1) {\n\t\t\t\trowIndex = parseInt(rowIndex) - 1;\n\t\t\t\tt1.row(rowIndex).$(rowSelected).prev('tr').addClass(\"selected\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\trowIndex = parseInt(rowIndex) - var_;\n\t\t\t\t$(\"#grid_lista tbody tr:eq(\" + rowIndex + \")\").addClass(\"selected\");\n\t\t\t}\n\t\t\t\n\t\t\t$(\"#grid_lista tbody tr:eq(\" + rowIndex + \") td:not(td:first-child)\")[0].click();\n\t\t\tselect_();\n\t\t}\n\t\t\n\t\tfnc_dataTable_recalc();\n\t});\n\n\t$(\"#btn_s_row\").click(function () {\n\n\t\tt1 = $(\"#grid_lista\").DataTable();\n\t\tif (t1.page.info().recordsDisplay == 0)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$('#grid_lista').DataTable().rows('.parent').nodes().to$().find('td:first-child').trigger('click');\n\t\t\n\t\tvar dtrg_group_cont = f_dtrg_group_cont();\n\t\t\t\n\t\tvar rowSelected = t1.row().$('tr.selected');\n\t\tvar rowIndex = $('#grid_lista tr').index($(rowSelected).closest('tr'));\n\t\trowIndex = parseInt(rowIndex) - var_;\n\t\t\n\t\tif (rowIndex < 0)\n\t\t{\n\t\t\tp_registro();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// <!-- ----------------------------------------------------------- -->\n\t\tvar length_ = t1.page.info().length;\n\t\tif (length_ == -1) {length_ = t1.page.info().end;}\n\t\t// <!-- ----------------------------------------------------------- -->\n\t\t\t\t\n\t\tif ((t1.page.info().page + 1) == t1.page.info().pages)\n\t\t{\n\t\t\tvar limite_x_page_ = (t1.page.info().recordsDisplay % length_) + f_dtrg_group_cont() - 1;\n\t\t\tif (t1.page.info().length == -1) {\n\t\t\t\tlimite_x_page_ = length_ + f_dtrg_group_cont() - 1;\n\t\t\t}\n\t\t\tif (rowIndex == limite_x_page_)\n\t\t\t{\n\t\t\t\t// f_msj('No existen mas registros!','','e','bottomRight','');\n\t\t\t\tf_msj('El ultimo registro esta seleccionado!!!','','e','bottomRight','');\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (rowIndex - dtrg_group_cont == length_ - 1)\n\t\t{\n\t\t\t$('#grid_lista').dataTable().fnPageChange(t1.page.info().page + 1);\n\t\t\tp_registro();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar row_class = t1.row(rowIndex).$(rowSelected).next('tr').attr('class');\n\t\t\trowSelected.removeClass('selected');\n\t\t\tvar f_tipo_row = row_class.indexOf(\"dtrg-group\");\n\n\t\t\tif (f_tipo_row == -1) {\n\t\t\t\trowIndex = parseInt(rowIndex) + 1;\n\t\t\t\tt1.row(rowIndex).$(rowSelected).next('tr').addClass(\"selected\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\trowIndex = parseInt(rowIndex) + var_;\n\t\t\t\t$(\"#grid_lista tbody tr:eq(\" + rowIndex + \")\").addClass(\"selected\");\n\t\t\t}\n\t\t\t\n\t\t\t$(\"#grid_lista tbody tr:eq(\" + rowIndex + \") td:not(td:first-child)\")[0].click();\n\t\t\tselect_();\n\t\t}\n\t\t\n\t\tfnc_dataTable_recalc();\n\t});\n\t/* --------------------------------- Botones de Navegacion: Fin --------------------------------- */\n\n\t//fer77\n\t// $(Obj_Col('', 'grid_lista_length_select', 'select')).change(function() {\n\t$('.grid_length_change').change(function() {\n\t\t\n\t\tvar ac_object = fnc_get_object_caracteristicas(this);\n\t\t\n\t\t//f_obj_validar_vacio(ac_object[0].form, ac_object[0].col, ac_object[0].type, '');\n\t\t\n\t\t// alert(ac_object[0].form);\n\t\tpc_select_col = ac_object[0].col;\n\t\tpc_select_col = pc_select_col.substring(4, pc_select_col.length);\n\t\t$(\"select[name='\" + pc_select_col + \"']\") .val($(this).find(':selected').text()).trigger('change');\n\t});\n\n\t\n\t/*\n\t$('.dataTables_length').each(function() {\n\t\tvar obj_id_ = $(this).attr('id');\n\t\tif ($(Obj_Col('', obj_id_ + '_c')).exists()) {\n\t\t\tvar po_contenedor = document.querySelector('[data-col=\"' + obj_id_ + '_c' + '\"]');\n\t\t\tpo_contenedor.appendChild(this);\n\t\t}\n\t});\n\t*/\n\n\t$('table').each(function() {\n\t\tvar obj_id_ = $(this).attr('id');\n\t\tvar f_grid = $(this).DataTable();\n\t\n\t\t// Manejar el evento cuando la celda se enfoca a traves de el teclado\n\t\t$('#' + obj_id_).on('key-focus.dt', function(e, datatable, cell) {\n\t\t\tf_grid.row(cell.index().row).select();\n\t\t});\n\t\t// Manejar clic en celda de tabla\n\t\t$('#' + obj_id_).on('click', 'tbody td:not([colspan]):not(.child)', function(e) {\n\t\t\tif ($('#' + obj_id_).DataTable().page.info().recordsDisplay === 0)\n\t\t\treturn;\n\n\t\t\te.stopPropagation();\n\t\t\t\n\t\t\tvar rowIdx = f_grid.cell(this).index().row;\n\t\t\tf_grid.row(rowIdx).select();\n\t\t});\n\t\t\n\t\t// Key presionado en la tabla (Modal)\n\t\t//$('#' + pi_grid_id + '[data-row_data] tbody').on('click', 'td', function () {\n\t\t//$('#' + obj_id_ + '[data-row_data]').on('key.dt', function(e, datatable, key, cell, originalEvent) {\n\t\t//$('#' + obj_id_ + '[data-row_data] tbody').on('key.dt', function(e, datatable, key, cell, originalEvent) {\n\t\t$('#' + obj_id_).on('key.dt', function(e, datatable, key, cell, originalEvent) {\n\t\t\tif (key === 13) {\n\t\t\t\t/*\n\t\t\t\tvar funcion_ = 'fnc_add_' + obj_id_;\n\t\t\t\teval(funcion_ + '()');\n\t\t\t\t*/\n\t\t\t\tif ($(\"button[data-lnk='_lnk_add_\" + obj_id_ + \"']\").prop('disabled') === false) {\n\t\t\t\t\t$(\"button[data-lnk='_lnk_add_\" + obj_id_ + \"']\")[0].click();\n\t\t\t\t}\n\t\t\t\t// Agregar para el grid_lista y verificar el enter para los que no son grid lista\n\t\t\t}\n\t\t});\n\t\t\n\t\t// Habilitar - Deshabilitar boton add (Modal)\n\t\tf_grid.on('select deselect', function () {\n\t\t\tvar selectedRows = f_grid.rows( { selected: true } ).count();\n\t\t\t//$('#btn_add_' + obj_id_).prop('disabled', selectedRows === 0);\n\t\t\t$(\"button[data-lnk='_lnk_add_\" + obj_id_ + \"']\").prop('disabled', selectedRows === 0);\n\t\t});\n\n\t\t\n\t});\n\n\n}", "function listarTodosEvaluacionGenerico(metodo){\r\n\r\n\tvar idCuerpoTabla = $(\"#cuerpoTablaEvaluacion\");\r\n\tvar idLoaderTabla = $(\"#loaderTablaEvaluacion\");\t\r\n\tvar idAlertaTabla = $(\"#alertaTablaEvaluacion\");\r\n\r\n\tlimpiarTabla(idCuerpoTabla,idLoaderTabla,idAlertaTabla);\r\n\r\n\tloaderTabla(idLoaderTabla,true);\r\n\r\n\r\n\tconsultar(\"evaluacion\",metodo,true).done(function(data){\r\n\t\t\r\n\t\tvar cantidadDatos = data.length;\r\n\t\tvar contador = 1;\r\n\r\n\t\tdata.forEach(function(item){\r\n\r\n\t\t\tvar datoNumero = $(\"<td></td>\").text(contador);\r\n\t\t\tvar datoAprendiz = $(\"<td></td>\").text(item.aprendiz.nombreCompleto);\r\n\t\t\tvar datoInstructor = $(\"<td></td>\").text(item.instructor.nombreCompleto);\r\n\t\t\tvar datoPregunta = $(\"<td></td>\").text(item.pregunta.nombre);\r\n\t\t\tvar datoPeriodo = $(\"<td></td>\").text(item.detallePeriodo.nombre);\r\n\t\t\tvar datoEstado = $(\"<td></td>\").text(item.detalleEstado.nombre);\r\n\t\t\tvar datoRespuesta = $(\"<td></td>\").text(item.respuesta);\r\n\t\t\tvar datoObservaciones = $(\"<td></td>\").text(item.observaciones);\r\n\t\t\tvar datoFecha = $(\"<td></td>\").text(devolverFecha(item.fecha));\r\n\r\n\t\t\tvar datoOpciones = \"<td>\"+\r\n\t\t\t'<button id=\"btnModificarAprendiz'+contador+'\" class=\"btn btn-table espacioModificar\" data-toggle=\"modal\" data-target=\"#modalModificarAprendiz\"><i class=\"fa fa-pencil-square-o\" aria-hidden=\"true\"></i></button>'+\r\n\t\t\t\"</td>\";\r\n\r\n\r\n\r\n\t\t\tvar fila = $(\"<tr></tr>\").append(datoNumero,datoAprendiz,datoInstructor,datoPregunta,datoPeriodo,datoEstado,datoRespuesta,datoObservaciones,datoFecha);\r\n\r\n\t\t\tidCuerpoTabla.append(fila);\r\n\r\n\t\t\t\r\n//\t\t\tasignarEventoClickAprendiz(item.id,item.identificacion,item.nombreCompleto,item.ficha.id,item.detalleEstado.id,contador);\r\n\r\n\t\t\tcontador++; \t\r\n\t\t})\r\n\t\t\r\n\t\tloaderTabla(idLoaderTabla,false);\r\n\t\tverificarDatosTabla(idAlertaTabla,cantidadDatos);\r\n\r\n\t}).fail(function(){\t\r\n\t\tloaderTabla(idLoaderTabla,false);\r\n\t\tagregarAlertaTabla(idAlertaTabla,\"error\");\r\n\t})\r\n}", "function setData() {\n\tvar rows = db.execute('SELECT * FROM igreja where igreja.id NOT IN (SELECT pregacao.igreja FROM igreja INNER JOIN pregacao ON igreja.id = pregacao.igreja WHERE pregacao.sermao =\"' + idSermao + '\") ');\n\tvar dataArray = [];\n\twhile (rows.isValidRow()) {\n\t\tvar vnome = rows.fieldByName('nome');\n\t\tvar vid = rows.fieldByName('id');\n\t\tdataArray.push({\n\t\t\ttitle : vnome,\n\t\t\thasCheck : false,\n\t\t\tid : vid,\n\t\t});\n\n\t\trows.next();\n\t\ttableview.setData(dataArray);\n\t};\n\tdb.close();\n}", "function cargarCuerpoTabla(id) {\n var n = $(\".tabla-detalle-indicadores\").find(\"tbody\").find(\"th\").length + 1;\n if (id == 1) {\n cargarCuerpoElectrico(\"\", n, 0, 0);\n } else if (id == 2) {\n cargarCuerpoHibrido(\"\", n, 0, 0)\n } else if (id == 3) {\n cargarCuerpoElectricoConsumo(\"\", n, 0, 0);\n } else if (id == 4) {\n cargarCuerpoHibridoConsumo(\"\", n, 0, 0);\n }\n //$(\"#cuerpoTablaIndicador\").append(t);\n MRV.CargarSelect(baseUrl + \"Gestion/ListarTipoVehiculo\", \"#cbo-det-2-\" + n + \"\", \"ID_TIPO_VEHICULO\", \"DESCRIPCION\");\n MRV.CargarSelect(baseUrl + \"Gestion/ListarTipoCombustible\", \"#cbo-det-3-\" + n + \"\", \"ID_TIPO_COMBUSTIBLE\", \"DESCRIPCION\");\n}" ]
[ "0.66968024", "0.6579337", "0.6579223", "0.6562613", "0.6553101", "0.6532155", "0.65128386", "0.64807796", "0.6453171", "0.64436877", "0.64122856", "0.640908", "0.63985884", "0.63939595", "0.63822573", "0.6377218", "0.63661706", "0.63648486", "0.635815", "0.6351869", "0.6349866", "0.6338766", "0.6332935", "0.63278407", "0.63204277", "0.63159364", "0.63117987", "0.63071173", "0.6306044", "0.6302727", "0.6293713", "0.62920964", "0.62896085", "0.62884885", "0.6286005", "0.6278612", "0.62754315", "0.6261039", "0.62425774", "0.62168807", "0.62147766", "0.620939", "0.62078387", "0.6202526", "0.61964214", "0.61932915", "0.61753327", "0.61586314", "0.615724", "0.61542094", "0.61392003", "0.6138122", "0.61378884", "0.6135744", "0.61236775", "0.61160284", "0.61031824", "0.6097081", "0.6096668", "0.6092113", "0.6088011", "0.6084039", "0.6081124", "0.60705143", "0.6067225", "0.60661095", "0.60609764", "0.6051556", "0.60510355", "0.60490566", "0.6048736", "0.6045426", "0.6023387", "0.6022499", "0.60145235", "0.6013143", "0.60129696", "0.60125273", "0.60122234", "0.6009624", "0.6008945", "0.6007806", "0.6004068", "0.600354", "0.60021645", "0.6001191", "0.6001043", "0.5999769", "0.5999603", "0.5989856", "0.5986986", "0.5980412", "0.59783757", "0.5974662", "0.59691477", "0.59685403", "0.59685045", "0.5968334", "0.59670603", "0.59664536" ]
0.6589488
1
FIN: FUNCION PARA OBTENER DATOS DE LA TABLA / INICIO: FUNCION PARA ELIMINAR UN REGISTRO
function mgrilla_item_eliminar(scodigo_aleatorio){ var lscodigo_aleatorio = scodigo_aleatorio.toString().replace("/","").slice(0, -1); var lsauditoria_usuario = $("#VGL_susuario_codigo").val(); console.log("lscodigo_aleatorio : " + lscodigo_aleatorio); console.log("lsauditoria_usuario : " + lsauditoria_usuario); swal({ title: "Eliminar", text: "�Est� seguro de eliminar el registro seleccionado?", icon: "warning", buttons: { cancel: { text: "Cancelar", value: null, visible: true, className: "btn btn-default", closeModal: true, }, confirm: { text: "Eliminar", value: true, visible: true, className: "btn btn-warning", closeModal: true } } }).then((result) => { if (result==true) { /** BUSCAR SI OTRAS TABLAS DEPENDEN DE ESTE REGISTRO */ $.post("../../controller/arc_producto.php?caso=ctrl_buscar_dependencia",{ pscodigo_aleatorio:lscodigo_aleatorio}, function(data, status){ data = JSON.parse(data); /** console.log(data); */ var lnnumero_registros = data.nnumero_registros; /** console.log("lnnumero_registros: " + lnnumero_registros); */ if (lnnumero_registros == "0") { $.post("../../controller/arc_producto.php?caso=ctrl_eliminar",{ pscodigo_aleatorio:lscodigo_aleatorio, psauditoria_usuario:lsauditoria_usuario, },function(data, status){ $("#grdregistro_vista_data").DataTable().ajax.reload(); swal( "Eliminar!", "El registro se elimin� correctamente.", "success" ); }); } else { swal( "Aviso!", "No puede eliminar este registro porque est� asociado con otra informaci�n.", "success" ); }; }); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ControlloDataInserita(datadafiltrare,campo,dt,colore,sfondo) {\r\n\r\nvar gg; //variabile per i giorni\r\nvar mm; // variabile per i mesi\r\nvar yy; // variabile per l'anno\r\nvar dateNow = new Date(); // assegna la data corrente (presa dal pc locale)\r\nvar yearNow = dateNow.getFullYear(); //assegna l'anno corente\r\nvar indice=0; // variabile di servizio\r\n\r\nvar nrgiorni = new Array();\r\n\tnrgiorni[0]=29; // febbraio bisestile\r\n\tnrgiorni[1]=31; // gennaio\r\n\tnrgiorni[2]=28; // febbraio\r\n\tnrgiorni[3]=31; // marzo\r\n\tnrgiorni[4]=30;\t// aprile\r\n\tnrgiorni[5]=31; // maggio\r\n\tnrgiorni[6]=30; // giugno\r\n\tnrgiorni[7]=31; // luglio\r\n\tnrgiorni[8]=31; // agosto\r\n\tnrgiorni[9]=30; // settembre\r\n\tnrgiorni[10]=31; // ottobre\r\n\tnrgiorni[11]=30; // novembre\r\n\tnrgiorni[12]=31; // dicembre\r\n\r\nif (datadafiltrare==null || datadafiltrare==\"\") { //se il campo è vuoto esce dalla funzione\r\n document.getElementById(campo).style.color=colore;\r\n document.getElementById(campo).style.background=\"white\";\r\n return;\r\n}\r\n\r\nswitch (datadafiltrare.length) { //analizza il formato della data e prepara le variabili gg, mm, yy\r\n case is = 6: //formato data breve\r\n gg = datadafiltrare.slice(0,2);\r\n mm = datadafiltrare.slice(2,4);\r\n yy = datadafiltrare.slice(4,6);\r\n break; \r\n \r\n case is = 8: //formato data a 8 caratteri\r\n if (datadafiltrare.indexOf(\"/\") >= 0 || datadafiltrare.indexOf(\"-\")>=0) { //con separatori\r\n gg = datadafiltrare.slice(0,2);\r\n mm = datadafiltrare.slice(3,5);\r\n yy = datadafiltrare.slice(6,8);\r\n } else { //data a 8 cifre senza separatori\r\n gg = datadafiltrare.slice(0,2);\r\n mm = datadafiltrare.slice(2,4);\r\n yy = datadafiltrare.slice(4,8);\r\n }\r\n break;\r\n \r\n case is = 10: //formato data completa\r\n gg = datadafiltrare.slice(0,2);\r\n mm = datadafiltrare.slice(3,5);\r\n yy = datadafiltrare.slice(6,10);\r\n break;\r\n\r\n default: //negli altri formati inseriti la routine genera un errore\r\n alert(\"Attenzione! La data che hai inserito e' errata. Sono validi i seguenti formati: 'ggmmaa','gg/mm/aa','ggmmaaaa' e 'gg/mm/aaaa'\");\r\n document.getElementById(campo).focus();\r\n //datadafiltrare.focus();\r\n datadafiltrare=\"\";\r\n return datadafiltrare;\r\n}\r\n\r\n//controlla che i dati di riferimento al giorno, al mese e all'anno siano dati numerici \r\nif (isNaN(gg) || isNaN(mm) || isNaN(yy)) {\r\n\talert(\"Attenzione! La data che hai inserito e' errata.\");\r\n document.getElementById(campo).focus();\r\n //datadafiltrare.focus();\r\n datadafiltrare=\"\";\r\n return datadafiltrare;\r\n}\r\n\r\n//controlla che siano stati inseriti giusti tutti gli elementi che compongono la data\r\nif (Number(gg) <= 0 || Number(mm) <= 0 || Number(mm) > 12 || Number(yy) < 0) { \r\n alert(\"Attenzione! La data che hai inserito e' errata.\");\r\n document.getElementById(campo).focus();\r\n //datadafiltrare.focus();\r\n datadafiltrare=\"\";\r\n return datadafiltrare;\r\n}\r\n\r\n//porta l'anno a quattro cifre calcolando il cambio del millennio\r\nif (Number(yy) <= (Number(yearNow)-2000)) { \r\n yy = (Number(yy)+2000); \r\n } else if (Number(yy) < 100 && Number(yy) > (Number(yearNow)-2000)){\r\n yy = (Number(yy)+1900);\r\n }\r\n\r\n//controlla che l'anno non sia maggiore o uguale a quello corrente\r\n//(dt e dn significano data tesseramento e data di nascita)\r\nif (dt==\"dn\") {\r\n if (Number(yy) >= Number(yearNow)) { \r\n alert(\"Attenzione! L'anno che hai inserito e' errato!\");\r\n document.getElementById(campo).focus;\r\n //datadafiltrare.focus();\r\n datadafiltrare=\"\";\r\n return datadafiltrare;\r\n }\r\n}\r\n// controlla che l'anno inserito non sia bisestile e assegna il valore alla variabile indice\r\nif ((Number(yy) % 4) == 0 && Number(mm)==2) {\r\n\tindice=0;\r\n} else {\r\n\tindice=Number(mm);\r\n}\r\n\r\n// controlla che l'utente non abbia inserito un numero giorni del mese errato\r\nif (Number(gg) > nrgiorni[indice]) {\t\r\n\talert(\"Attenzione! La data che hai inserito e' errata.\");\r\n document.getElementById(campo).focus();\r\n //datadafiltrare.focus();\r\n datadafiltrare=\"\";\r\n return datadafiltrare;\r\n}\r\n// ricompone e stampa la data filtrata\r\ndatadafiltrare=gg+\"/\"+mm+\"/\"+yy;\r\ndocument.getElementById(campo).value=datadafiltrare;\r\ndocument.getElementById(campo).style.color=colore;\r\ndocument.getElementById(campo).style.background=\"white\";\r\nreturn;\r\n}", "function cargaDiaria() {\n entradas = [];\n $('#Div3 :input').each(function () {\n entradas.push($(this).val());\n });\n console.log(entradas);\n if (entradas[0] != \"\") {\n GuardarVentaDiaria();\n algo = document.getElementById(\"Table1\");\n inputs = algo.getElementsByTagName(\"input\");\n for (i = 0; i < inputs.length; i++) {\n inputs[i].value = \"\";\n }\n } else {\n alert(\"Debe ingresar una fecha\");\n }\n function GuardarVentaDiaria() {\n if ($(\"#regNuevo\")[0]) {\n var myRows = [];\n var $headers = $(\".head\");\n var $rows = $(\"#regNuevo\").each(function (index) {\n $cells = $(this).find(\"td\");\n myRows[index] = {};\n $cells.each(function (cellIndex) {\n myRows[index][$($headers[cellIndex]).html()] = $(this).html();\n });\n });\n var data = {};\n data.tabla = myRows;\n\n $.ajax({\n url: 'registroVentas.aspx/datosDiarios',\n data: JSON.stringify(data),\n type: 'post',\n contentType: 'application/json; charset=utf-8',\n dataType: 'json',\n success: function (r) {\n\n if (r.d === 'bien') {\n $(\"#ventaDiaria tr\").remove();\n itemsGuardados();\n\n\n } else {\n alert(\"ocurrio un error al momento de registrar la informacion\");\n }\n },\n error: function () {\n alert(\"No puede existir mas de un registro con una misma fecha\");\n }\n });\n } else {\n alert(\"No existen datos nuevos para ingresar\");\n }\n\n }\n\n}", "function obtenerDatosEditar()\n {\n //OBTIENE LOS DATOS DE LA FILA CUANDO DÁ CLICK EN EL BOTON EDITAR\n $('#integrantes').on('click', '#datos .editar', function(e){\n e.preventDefault();\n id = $(this).parent().parent().attr('id');\n nombres = $(this).parent().parent().children('td:eq(0)').text();\n apellidos = $(this).parent().parent().children('td:eq(1)').text();\n parentesco = $(this).parent().parent().children('td:eq(2)').text();\n fecha_nacimiento = $(this).parent().parent().children('td:eq(3)').text();\n profesion = $(this).parent().parent().children('td:eq(4)').text();\n lugar_trabajo = $(this).parent().parent().children('td:eq(5)').text();\n tel_trabajo = $(this).parent().parent().children('td:eq(6)').text();\n salario = $(this).parent().parent().children('td:eq(7)').text();\n depende = $(this).parent().parent().children('td:eq(8)').text();\n grado = $(this).parent().parent().children('td:eq(9)').text();\n institucion = $(this).parent().parent().children('td:eq(10)').text();\n cuota = $(this).parent().parent().children('td:eq(11)').text();\n\n //CONVIERTE LA FECHA A FORMATO yyyy-MM-dd\n fechaconvert = fecha_nacimiento.replace('/', '-');\n fecha_nacimiento = fechaconvert.replace('/', '-')\n\n //ENVIA LOS DATOS A LOS INPUTS\n $('#id_integrante').val(id);\n $('#nombres_inte').val(nombres);\n $('#apellidos_inte').val(apellidos);\n $('#parentesco').val(parentesco);\n $('#fecha_naci_inte').val(fecha_nacimiento);\n $('#profesion').val(profesion);\n $('#lugar_trabajo').val(lugar_trabajo);\n $('#tel_trabajo').val(tel_trabajo);\n $('#salario').val(salario);\n $('#grado').val(grado);\n $('#institucion').val(institucion);\n $('#cuota_inte').val(cuota);\n\n if(grado != \"\" || institucion != \"\")\n {\n $('#si_integran').prop('checked', true);\n $(\"#depende\").show(1000);\n $(\"#Grado\").show(1000);\n $(\"#Institucion\").show(1000);\n $(\"#Cuota_inte\").show(1000);\n }\n else\n {\n //Sirve para resetear los radio button\n $('.estudiante').prop('checked', false);\n $('.depende').prop('checked', false);\n \n //Para que se oculten los campos\n $(\"#depende\").hide(1000);\n $(\"#Grado\").hide(1000);\n $(\"#Institucion\").hide(1000);\n $(\"#Cuota_inte\").hide(1000);\n }\n if(depende != \"\")\n {\n if(depende == \"si\")\n {\n $('#si2').prop('checked', true);\n }\n else\n {\n $('#no2').prop('checked', true);\n }\n }\n $('#modificar').show(0);\n $('#agregar').hide(0);\n $('#cancelar').show(0);\n });\n }", "function agregarDato() {\n\n // Usamos el atributo getElementById('iddelelemento')\n // nos retorna con objeto html el cual podremos acceder a sus atributos\n // un de ellos es .value con el cual obtendremos el valor que ingresamos\n\n // Una vez obtenido el valor lo pasamos a una variable para cada tipo\n nombre = document.getElementById('nombre').value;\n apellido = document.getElementById('apellido').value;\n edad = document.getElementById('edad').value;\n profesion = document.getElementById('profesion').value;\n\n // Limpiamos el documento html\n document.body.innerHTML = '';\n\n // Creamos un array con los datos previamente obtenidos\n var newDato = new Array(nombre, apellido, edad, profesion);\n \n // Agregamos los datos obtenidos al array que declaramos de manera global\n tablas.push(newDato);\n\n // Llamamos a la funcion crearTabla() para que imprima \n // la tabla con los datos actualizados\n crearTabla();\n}", "function muestraDatosPatrona(datos){\n\tvar data=eval(datos);\n\tconsole.log(data.numInteriorFiscalPatrona);\n\tconsole.log(data.actaNotarioPatrona);\n\t$(\"#idPatrona\").val(data.idPatrona);\n\t$(\"#nombrePatrona\").val(data.nombreCortoPatrona);\n\t$(\"#razonSocial\").val(data.razonSocialPatrona);\n\t$(\"#rfc\").val(data.rfcPatrona);\n\t$(\"#folioMerc\").val(data.folioMercantilPatrona);\n\tif (data.esIntermediariaPatrona){\n\t\t\n\t\t$(\"#intermediaria\").attr(\"checked\",true);\n\t}\n\t$(\"#calle\").val(data.calleFiscalPatrona);\n\t$(\"#colonia\").val(data.coloniaFiscalPatrona);\n\t$(\"#numExt\").val(data.numExteriorFiscalPatrona);\n\t$(\"#numInt\").val(data.numInteriorFiscalPatrona);\n\t$(\"#cp\").val(data.cpFiscalPatrona);\n\t$(\"#municipio\").val(data.municipioFiscalPatrona);\n\t$(\"#entidadFed\").val(data.estadoFiscalPatrona);\n\t$(\"#telContacto\").val(data.telContactoPatrona);\n\t$(\"#numActaConst\").val(data.actaNumeroPatrona);\n\t$(\"#numNotaria\").val(data.actaNotariaPatrona);\n\t$(\"#fecha\").val(data.actaFechaPatrona);\n\t$(\"#notario\").val(data.actaNotarioPatrona);\n\t$(\"#ciudad\").val(data.actaCiudadPatrona);\n\t$(\"#estado\").val(data.actaEstadoPatrona);\n\t$(\"#tipoReg\").val(data.tipoRegimen.idTipoRegimen);\n\tconsole.log(data.tipoRegimen.idTipoRegimen);\n\t\n\tfor (i=0;i<data.domVirtuales.length;i++){\n\t\tconsole.log(data.domVirtuales[i].domVirtual);\n\t\tvar x = document.getElementById(\"selectMult\");\n\t\tvar option = document.createElement(\"option\");\n\t\toption.id = (i+1);\n\t\toption.text = data.domVirtuales[i].domVirtual;\n\t\tx.add(option); \n\t}\n\t\n\tfor (i=0;i<data.accionistas.length;i++){\n\t\tconsole.log(data.accionistas[i].nombreAccionista);\n\t\tvar x = document.getElementById(\"selectMultAccionista\");\n\t\tvar option = document.createElement(\"option\");\n\t\toption.id = (i+1);\n\t\toption.text = data.accionistas[i].nombreAccionista;\n\t\tx.add(option); \n\t}\n\n\tfor (i=0;i<data.representantesLegalesPleitosCobranzas.length;i++){\n\t\tconsole.log(data.representantesLegalesPleitosCobranzas[i].nombreRepLegPleiCob);\n\t\tvar x = document.getElementById(\"selectMultRepresentantes\");\n\t\tvar option = document.createElement(\"option\");\n\t\toption.id = (i+1);\n\t\toption.text = data.representantesLegalesPleitosCobranzas[i].nombreRepLegPleiCob;\n\t\tx.add(option); \n\t}\n\n\tfor (i=0;i<data.representantesLegalesLaborales.length;i++){\n\t\tconsole.log(data.representantesLegalesLaborales[i].nombreRepLegLab);\n\t\tvar x = document.getElementById(\"selectMultRepresentantesLegLab\");\n\t\tvar option = document.createElement(\"option\");\n\t\toption.id = (i+1);\n\t\toption.text = data.representantesLegalesLaborales[i].nombreRepLegLab;\n\t\tx.add(option); \n\t} \n\tconsole.log(\"bjr\");\n\tconsole.log(data.poderesNotarialesPleitosCobranzas.length);\n\tconsole.log(data.poderesNotarialesLaborales.length);\n\t\n\tfor (i=0;i<data.poderesNotarialesPleitosCobranzas.length;i++){\t\t\t\t\t\t\t\t\t\t\t\t\t\t \n\t\tdocument.getElementById(\"numeroPoderesNot\").value=data.poderesNotarialesPleitosCobranzas[i].numero;\n\t\tdocument.getElementById(\"notariaPoderesNot\").value=data.poderesNotarialesPleitosCobranzas[i].notaria;\n\t\tdocument.getElementById(\"notarioPoderesNot\").value=data.poderesNotarialesPleitosCobranzas[i].notario;\n\t\taddRow(\"tablaPodNotPleitos\",1);\n\t}\n\tconsole.log(\"VALORES:\"+i);\n\tfor (i=0;i<data.poderesNotarialesLaborales.length;i++){\t\t\t\t\t\t\t\t\t\t\t\t\t\t \n\t\tdocument.getElementById(\"numeroPoderesNotLab\").value=data.poderesNotarialesLaborales[i].numero;\n\t\tdocument.getElementById(\"notariaPoderesNotLab\").value=data.poderesNotarialesLaborales[i].notaria;\n\t\tdocument.getElementById(\"notarioPoderesNotLab\").value=data.poderesNotarialesLaborales[i].notario;\n\t\taddRow(\"tablaPodNotLab\",2); \n\t}\n\n}", "function MostrarRegistro(){\n // declaramos una variable para guardar los datos\n var listaregistro=Mostrar();\n // selecciono el tbody de la tabla donde voy a guardar\n tbody=document.querySelector(\"#tbRegistro tbody\");\n tbody.innerHTML=\"\";\n // agregamos las columnas que se registren\n for(var i=0; i<listaregistro.length;i++){\n // declaramos una variable para la fila\n var fila=tbody.insertRow(i);\n // declaramos variables para los titulos\n var titulonombre=fila.insertCell(0);\n var tituloprecio=fila.insertCell(1);\n var titulocategoria=fila.insertCell(2);\n var titulocantidad=fila.insertCell(3);\n // agregamos los valores\n titulonombre.innerHTML=listaregistro[i].nombre;\n tituloprecio.innerHTML=listaregistro[i].precio;\n titulocategoria.innerHTML=listaregistro[i].categoria\n titulocantidad.innerHTML=listaregistro[i].cantidad;\n tbody.appendChild(fila);\n }\n}", "function actualizarRegistos() {\n\n /* Obtiene el texto y lo modifica */\n var registros = document.getElementById(\"registros\").textContent;\n registros = contador_registros + \" de \" + agenda.length;\n document.getElementById(\"registros\").textContent = registros;\n\n /* Impide aumentar los registos si no existen en la Agenda */\n var max = document.getElementById(\"ver\");\n max.setAttribute(\"max\", agenda.length);\n\n /* Si nos movemos entre los diferentes registros, tambien cambiamos el valor del Imput 'ver' */\n ver.value = contador_registros;\n\n /* Al cargar la Agenda muestra por defecto e contacto indicado en la variable contador, en este caso la posicion 0 */\n document.getElementById(\"nombre\").value = agenda[contador_registros].nombre;\n document.getElementById(\"apellidos\").value = agenda[contador_registros].apellidos;\n document.getElementById(\"telefono\").value = agenda[contador_registros].telefono;\n document.getElementById(\"fecha\").value = agenda[contador_registros].fecha;\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 MostrarRegistro(){\n //declaramos una variable para guardar los datos\n var listaproductos=Mostrar();\n //selecciono el tbody de la tabla donde voy a guardar\n tbody = document.querySelector(\"#tbRegistro tbody\");\n tbody.innerHTML=\"\";\n //Agregamos las columnas que se registren\n for(var i=0; i<listaproductos.length;i++){\n //Declaramos una variable para la fila\n var fila=tbody.insertRow(i);\n //declaramos variables para los titulos\n var titulonombre = fila.insertCell(0);\n var tituloprecio = fila.insertCell(1);\n var titulocategoria = fila.insertCell(2);\n var titulocantidad = fila.insertCell(3);\n //agregamos valores\n titulonombre.innerHTML = listaproductos[i].nombre;\n tituloprecio.innerHTML = listaproductos[i].precio;\n titulocategoria.innerHTML = listaproductos[i].categoria;\n titulocantidad.innerHTML = listaproductos[i].cantidad;\n tbody.appendChild(fila);\n }\n}", "function rellenoBusqueda()\n{\tcampoId\t\t= this.id;\n\tcampoId\t\t= $('#'+campoId).attr('campo');\n\tcampoVal \t= this.title;\n\tprocesando(\"Buscando Informacions ...\");\n\ttabla\t= $(\"#tabla\").attr('value');\n\tcadena\t= \"sstm__tabla=\"+tabla+\"&campoId=\"+campoId+\"&campoVal=\"+campoVal;\n\t// Lanzo el Ajax para Insertar Registro\n\tajaxTablas\t= $.ajax({\n \turl: 'index.php?ctr=FormularioAcciones&acc=getId',\n \ttype: 'POST',\n \tasync: true,\n \tdata: cadena,\n\tsuccess: cargarConsulta\n\t}); // dataType: 'json',\n}", "function resultado_detalle(id_asoc, operacion)\r\n{\r\n var base_url = document.getElementById('base_url').value;\r\n var consumo_lec = operacion;\r\n var controlador = base_url+'lectura/obtenertarifa/';\r\n $.ajax({url: controlador,\r\n type:\"POST\",\r\n data:{id_asoc:id_asoc, consumo_lec:consumo_lec},\r\n success:function(respuesta){\r\n \r\n //$(\"#encontrados\").val(\"- 0 -\");\r\n var registros = JSON.parse(respuesta);\r\n \r\n \r\n html = \"\";\r\n html += \"<div class='col-md-12'>\";\r\n html += \"<div class='box'>\";\r\n html += \"<div class='box-body table-responsive'>\";\r\n html += \"<table class='table table-striped'>\";\r\n html += \"<tr>\";\r\n html += \"<th class='text-center'>#</th>\";\r\n html += \"<th class='text-center'>DETALLE</th>\";\r\n html += \"<th class='text-center'>MONTO</th>\";\r\n html += \"</tr>\";\r\n \r\n html += \"<tr>\";\r\n html += \"<td>\"+1+\"</td>\";\r\n html += \"<td class='text-right' style='align-items: center'>Consumo Agua</td>\";\r\n html += \"<td>\";\r\n html += \"<input id='consumo_agua\"+id_asoc+\"' type='text' value='\"+registros[1]+\"' class='form-control' autocomplete='off' >\";\r\n html += \"</td>\";\r\n html += \"</tr>\";\r\n html += \"<tr>\";\r\n html += \"<td>\"+2+\"</td>\";\r\n html += \"<td class='text-right' style='align-items: center'>Aportes</td>\";\r\n html += \"<td>\";\r\n html += \"<input id='aportes\"+id_asoc+\"' type='text' value='\"+registros[2]+\"' class='form-control' autocomplete='off' >\";\r\n html += \"</td>\";\r\n html += \"</tr>\";\r\n html += \"<tr>\";\r\n html += \"<td>\"+3+\"</td>\";\r\n html += \"<td class='text-right' style='vertical-align: central'>Multas</td>\";\r\n html += \"<td>\";\r\n html += \"<input id='multas\"+id_asoc+\"' type='text' value='\"+registros[3]+\"' class='form-control' autocomplete='off' >\";\r\n html += \"<input id='tipo_asoc\"+id_asoc+\"' type='hidden' value='\"+registros[4]+\"'>\";\r\n html += \"</td>\";\r\n html += \"</tr>\";\r\n \r\n \r\n html += \"</table>\";\r\n html += \"</div>\";\r\n html += \"</div>\";\r\n html += \"</div>\";\r\n \r\n $(\"#eldetalle\"+id_asoc).html(html);\r\n },\r\n error:function(respuesta){\r\n // alert(\"Algo salio mal...!!!\");\r\n html = \"\";\r\n //$(\"#tablaresultados\").html(html);\r\n },\r\n complete: function (jqXHR, textStatus) {\r\n //document.getElementById('loader').style.display = 'none'; //ocultar el bloque del loader \r\n //tabla_inventario();\r\n }\r\n \r\n }); \r\n}", "function cargarCuerpoElectrico(data, fila, enfoque, bandera) {\n var tr = '<tr id=\"detalles-tr-' + fila + '\" data-value=\"' + fila + '0\" >';\n tr = tr + ' <th class=\"text-center\" data-encabezado=\"Número\" scope=\"row\" id=\"row-' + fila + '\">' + fila + '</th>';\n tr = tr + ' <td data-encabezado=\"Columna 01\">';\n tr = tr + ' <div class=\"form-group m-0\">';\n tr = tr + ' <select class=\"form-control form-control-sm text-right\" id=\"cbo-det-1-' + fila + '\" onchange=\"fn_calcular(' + fila + ')\">';\n tr = tr + ' <option value=\"2018\">2018</option>';\n tr = tr + cargarAnio();\n tr = tr + ' </select>';\n tr = tr + ' </div>';\n tr = tr + ' </td>';\n tr = tr + ' <td data-encabezado=\"Columna 04\">';\n tr = tr + ' <div class=\"form-group m-0\">';\n tr = tr + ' <input class=\"form-control form-control-sm text-right\" type=\"date\" placeholder=\"\" id=\"dat-det-1-' + fila + '\" onBlur=\"fn_calcular(' + fila + ')\">';\n tr = tr + ' </div>';\n tr = tr + ' </td>';\n tr = tr + ' <td data-encabezado=\"Columna 02\">';\n tr = tr + ' <div class=\"form-group m-0\">';\n tr = tr + ' <select class=\"form-control form-control-sm text-right\" id=\"cbo-det-2-' + fila + '\" onchange=\"fn_calcular(' + fila + ')\">';\n tr = tr + ' <option value=\"0\">Seleccione</option>';\n tr = tr + ' </select>';\n tr = tr + ' </div>';\n tr = tr + ' </td>';\n tr = tr + ' <td data-encabezado=\"Columna 03\">';\n tr = tr + ' <div class=\"form-group m-0\">';\n tr = tr + ' <select class=\"form-control form-control-sm text-right\" id=\"cbo-det-3-' + fila + '\" onchange=\"fn_calcular(' + fila + ')\">';\n tr = tr + ' <option value=\"0\">Seleccione</option>';\n tr = tr + ' </select>';\n tr = tr + ' </div>';\n tr = tr + ' </td>';\n tr = tr + ' <td data-encabezado=\"Columna 04\">';\n tr = tr + ' <div class=\"form-group m-0\">';\n tr = tr + ' <input class=\"form-control form-control-sm text-right\" type=\"text\" placeholder=\"\" id=\"txt-det-1-' + fila + '\" onBlur=\"fn_calcular(' + fila + ')\">';\n tr = tr + ' </div>';\n tr = tr + ' </td>';\n tr = tr + ' <td data-encabezado=\"Columna 05\">';\n tr = tr + ' <div class=\"form-group m-0\">';\n tr = tr + ' <input class=\"form-control form-control-sm text-right\" type=\"text\" placeholder=\"\" id=\"txt-det-2-' + fila + '\" onBlur=\"fn_calcular(' + fila + ')\">';\n tr = tr + ' </div>';\n tr = tr + ' </td>';\n tr = tr + ' <td data-encabezado=\"Columna 06\">';\n tr = tr + ' <div class=\"form-group m-0\">';\n tr = tr + ' <input class=\"form-control form-control-sm text-right\" type=\"text\" placeholder=\"\" id=\"txt-det-3-' + fila + '\" onBlur=\"fn_calcular(' + fila + ')\">';\n tr = tr + ' </div>';\n tr = tr + ' </td>';\n tr = tr + ' <td data-encabezado=\"Columna 04\">';\n tr = tr + ' <div class=\"form-group m-0\">';\n tr = tr + ' <input class=\"form-control form-control-sm text-right\" type=\"text\" placeholder=\"\" id=\"txt-det-4-' + fila + '\">';\n tr = tr + ' </div>';\n tr = tr + ' </td>';\n tr = tr + ' <td data-encabezado=\"Columna 07\">';\n tr = tr + ' <div class=\"form-group m-0\">';\n tr = tr + ' <input class=\"form-control form-control-sm text-right\" type=\"text\" placeholder=\"\" id=\"txt-det-5-' + fila + '\" disabled>';\n tr = tr + ' </div>';\n tr = tr + ' </td>';\n tr = tr + ' <td data-encabezado=\"Columna 07\">';\n tr = tr + ' <div class=\"form-group m-0\">';\n tr = tr + ' <input class=\"form-control form-control-sm text-right\" type=\"text\" placeholder=\"\" id=\"txt-det-6-' + fila + '\" disabled>';\n tr = tr + ' </div>';\n tr = tr + ' </td>';\n tr = tr + ' <td data-encabezado=\"Subtotal\">';\n tr = tr + ' <div class=\"form-group m-0\">';\n tr = tr + ' <input class=\"form-control form-control-sm text-right\" type=\"text\" id=\"txt-det-7-' + fila + '\" disabled>';\n tr = tr + ' </div>';\n tr = tr + ' </td>';\n tr = tr + ' <td class=\"text-center text-xs-right\" data-encabezado=\"Acciones\">';\n tr = tr + ' <div class=\"btn-group\">';\n tr = tr + ' <div class=\"acciones fase-01 dropdown-toggle\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\"><i class=\"fas fa-ellipsis-h\"></i></div>';\n tr = tr + ' <div class=\"dropdown-menu dropdown-menu-right\">';\n tr = tr + ' <a class=\"dropdown-item agregarFila\" href=\"#\">';\n tr = tr + ' <i class=\"fas fa-plus-circle\"></i>&nbsp;Agregar';\n tr = tr + ' </a><a class=\"dropdown-item quitarCampos\" href=\"#\" onclick=\"fn_restarTotal(7, 8);\">';\n tr = tr + ' <i class=\"fas fa-minus-circle\"></i>&nbsp;Eliminar';\n tr = tr + ' </a>';\n tr = tr + ' </div>';\n tr = tr + ' </div>';\n tr = tr + ' </td>';\n\n tr = tr + ' <td class=\"text-hide\" data-encabezado=\"ID_INDICADOR\" style=\"display:none;\">';\n tr = tr + ' <div class=\"form-group m-0\">';\n tr = tr + ' <input class=\"form-control form-control-sm text-right\" type=\"text\" id=\"txt-det-8-' + fila + '\" disabled>';\n tr = tr + ' </div>';\n tr = tr + ' </td>';\n\n tr = tr + '</tr>';\n $(\"#cuerpoTablaIndicador\").append(tr);\n if (bandera == 1) {\n fn_CargarListaTipoVehiculo(data, (fila - 1), enfoque);\n }\n //return tr;\n}", "function calcola_data(lingua){\n\n // parametri lingua= \"ITA\" - \"ING\" - \"FRA\" - \"TED\" - \"SAR\" - \"SPA\" - \"POR\" - \"ESP\"\n // by Salvatore Ruiu Irgoli-Sardegna (Italy) dicembre 2009.\n // utilizzo caratteri speciali ANSI.\n // restituisce la stringa DataIns.\n\n\t \n\tvar DataIns=\".\";\n var it_giorni=new Array(\"Domenica\",\"Luned&#236\",\"Marted&#236\",\"Mercoled&#236\",\"Gioved&#236\",\"Venerd&#236\",\"Sabato\");\n var it_mesi=new Array(\"Gennaio\",\"Febbraio\",\"Marzo\",\"Aprile\",\"Maggio\",\"Giugno\",\"Luglio\",\"Agosto\",\"Settembre\",\"Ottobre\",\"Novembre\",\"Dicembre\");\n\n var en_giorni=new Array(\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\");\n var en_mesi=new Array(\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\");\n\n var fr_giorni=new Array(\"Dimanche\",\"Lundi\",\"Mardi\",\"Mercredi\",\"Jeudi\",\"Vendredi\",\"Samedi\");\n var fr_mesi=new Array(\"Janvier\",\"F&#233vrier\",\"Mars\",\"Avril\",\"Mai\",\"Juin\",\"Juillet\",\"Ao&#251t\",\"Septembre\",\"Octobre\",\"Novembre\",\"D&#233cembre\");\n \n var te_giorni=new Array(\"Sonntag\",\"Montag\",\"Dienstag\",\"Mittwoch\",\"Donnerstag\",\"Freitag\",\"Samstag\");\n var te_mesi=new Array(\"Januar\",\"Februar\",\"M&#228rz\",\"April\",\"Mai\",\"Juni\",\"Juli\",\"August\",\"September\",\"Oktober\",\"November\",\"Dezember\");\n\n var sr_giorni=new Array(\"Dom&#236niga\",\"Lunis\",\"Martis\",\"M&#232;rcuris\",\"Gi&#242;bia\",\"Chen&#224;bura\",\"S&#224;badu\");\n var sr_mesi=new Array(\"Ghenn&#224rgiu\",\"Fre&#224rgiu\",\"Martzu\",\"Abrile\",\"Maju\",\"L&#224mpadas\",\"Tr&#236ulas\",\"Austu\",\"Cabudanni\",\"Santugaine\",\"Santandria\",\"Nadale\");\n\n var sp_giorni=new Array(\"Domingo\",\"Lunes\",\"Martes\",\"Mi&#233;rcoles\",\"Jueves\",\"Viernes\",\"S&#225;bado\");\n var sp_mesi=new Array(\"Enero\",\"Febrero\",\"Marzo\",\"Abril\",\"Mayo\",\"Junio\",\"Julio\",\"Agosto\",\"Septiembre\",\"Octubre\",\"Noviembre\",\"Diciembre\");\n\n var pr_giorni=new Array(\"Domingo\",\"Segunda-feira\",\"Ter&#231;a-feira\",\"Quarta-feira\",\"Quinta-feira\",\"Sexta-feira\",\"S&#225;bado\");\n var pr_mesi=new Array(\"Janeiro\",\"Fevereiro\",\"Mar&#231;o\",\"Abril\",\"Maio\",\"Junho\",\"Julho\",\"Agosto\",\"Setembro\",\"Outubro\",\"Novembro\",\"Dezembro\");\n\n var es_giorni=new Array(\"Dimanco\",\"Lundo\",\"Mardo\",\"Merkredo\",\"Ja&#249;do\",\"Vendredo\",\"Sabato\");\n var es_mesi=new Array(\"Januaro\",\"Februaro\",\"Marto\",\"Aprilo\",\"Majo\",\"Junio\",\"Julio\",\"A&#249;gusto\",\"Septembro\",\"Oktobro\",\"Novembro\",\"Decembro\");\n\n var data=new Date();\n\n var anno =data.getYear(); // anno\n var mese =data.getMonth(); // mese 0 a 11 \n var giorno=data.getDate(); // numero del giorno da 1 a 31\n var giorno_settimana=data.getDay(); // giorno della settimana 0 a 6\n var ora =data.getHours(); // ora del giorno da 0 a 23\n var minuti=data.getMinutes(); // minuti da 0 a 59\n var secondi=data.getSeconds(); // secondi da 0 a 59\n \n if (anno<1900) { anno=anno+1900; } // correzione anno\n\n if (ora<10){ ora='0'+ora;}\n \n if (minuti<10){minuti='0'+minuti;}\n\n if (secondi<10) {secondi='0'+secondi;}\n \n if (lingua==\"ING\") { DataIns=ora+':'+minuti+':'+secondi+' '+en_giorni[giorno_settimana]+\", \"+giorno+\" \"+en_mesi[mese]+\" \"+anno; }\n\n else if (lingua==\"FRA\") { DataIns=ora+':'+minuti+':'+secondi+' '+fr_giorni[giorno_settimana]+\", \"+giorno+\" \"+fr_mesi[mese]+\" \"+anno; }\n\n else if (lingua==\"TED\") { DataIns=ora+':'+minuti+':'+secondi+' '+te_giorni[giorno_settimana]+\", \"+giorno+\" \"+te_mesi[mese]+\" \"+anno; }\n\n else if (lingua==\"SAR\") { DataIns=ora+':'+minuti+':'+secondi+' '+sr_giorni[giorno_settimana]+\", \"+giorno+\" \"+sr_mesi[mese]+\" \"+anno; }\n\n else if (lingua==\"SPA\") { DataIns=ora+':'+minuti+':'+secondi+' '+sp_giorni[giorno_settimana]+\", \"+giorno+\" \"+sp_mesi[mese]+\" \"+anno; }\n\n else if (lingua==\"POR\") { DataIns=ora+':'+minuti+':'+secondi+' '+pr_giorni[giorno_settimana]+\", \"+giorno+\" \"+pr_mesi[mese]+\" \"+anno; }\n\n else if (lingua==\"ESP\") { DataIns=ora+':'+minuti+':'+secondi+' '+es_giorni[giorno_settimana]+\", \"+giorno+\" \"+es_mesi[mese]+\" \"+anno; }\n\n else { DataIns=ora+':'+minuti+':'+secondi+' '+it_giorni[giorno_settimana]+\", \"+giorno+\" \"+it_mesi[mese]+\" \"+anno; }\n \n\treturn DataIns;\n }", "validarDatos() {\n let errores = '';\n\n if (!moment($('#devolucion_venta-fecha').value).isValid()) {\n errores += '<br>Fecha inválida';\n }\n\n\n\n if (!$('#devolucion_venta-cliente').value) {\n errores += '<br>Falta seleccionar cliente';\n }\n\n if (!$('#devolucion_venta-venta').value) {\n errores += '<br>Falta seleccionar una venta';\n }\n\n if(this.tablaDevoluciones){\n let lineasDeVenta = this.tablaDevoluciones.getData();\n if (lineasDeVenta.length == 0) {\n errores += '<br>No se hallaron detalles de venta.';\n } else {\n let lineaIncompleta = false;\n lineasDeVenta.forEach((lineaVenta) => {\n if (!util.esNumero(lineaVenta.subtotal)) {\n lineaIncompleta = true;\n }\n });\n\n if (lineaIncompleta) {\n errores += '<br>Se encontró al menos un detalle de compra incompleto.';\n }\n }\n\n }\n \n\n return errores;\n }", "recorrerArbolConsulta(nodo) {\n //NODO INICIO \n if (this.tipoNodo('INICIO', nodo)) {\n this.recorrerArbolConsulta(nodo.hijos[0]);\n }\n //NODO L, ES LA LISTA DE CONSULTAS \n if (this.tipoNodo('L', nodo)) {\n //SE RECORREN TODOS LOS NODOS QUE REPRESENTAN UNA CONSULTA \n for (var i = 0; i < nodo.hijos.length; i++) {\n this.recorrerArbolConsulta(nodo.hijos[i]);\n this.reiniciar();\n // this.codigoTemporal += \"xxxxxxxxxxxxxxxxxxxx-\"+this.contadorConsola+\".\"+\"\\n\";\n }\n }\n //PARA RECORRER TODOS LOS ELEMENTOS QUE COMPONEN LA CONSULTA \n if (this.tipoNodo('CONSULTA', nodo)) {\n for (var i = 0; i < nodo.hijos.length; i++) {\n this.pathCompleto = false;\n this.controladorAtributoImpresion = false;\n this.controladorDobleSimple = false;\n this.controladorPredicado = false;\n this.recorrerArbolConsulta(nodo.hijos[i]);\n }\n }\n //PARA RECORRER TODOS LOS ELEMENTOS QUE COMPONEN LA CONSULTA \n if (this.tipoNodo('VAL', nodo)) {\n for (var i = 0; i < nodo.hijos.length; i++) {\n this.pathCompleto = false;\n this.controladorAtributoImpresion = false;\n this.controladorDobleSimple = false;\n this.controladorPredicado = false;\n this.recorrerArbolConsulta(nodo.hijos[i]);\n }\n }\n //PARA VERIFICAR EL TIPO DE ACCESO, EN ESTE CASO // \n if (this.tipoNodo('DOBLE', nodo)) {\n this.controladorDobleSimple = true;\n this.recorrerArbolConsulta(nodo.hijos[0]);\n }\n //PARA VERIFICAR EL TIPO DE ACCESO, EN ESTE CASO: /\n if (this.tipoNodo('SIMPLE', nodo)) {\n //Establecemos que se tiene un acceso de tipo DOBLE BARRA \n this.controladorDobleSimple = false;\n this.recorrerArbolConsulta(nodo.hijos[0]);\n }\n //PARA VERIFICAR SI EL ELEMENTO A BUSCAR ES UN IDENTIFICADOR \n if (this.tipoNodo('identificador', nodo)) {\n const str = nodo.hijos[0];\n this.busquedaElemento(str);\n }\n //PARA VERIFICAR SI LO QUE SE VA A ANALIZAR ES UN PREDICADO \n if (this.tipoNodo('PREDICADO', nodo)) {\n this.controladorPredicado = true;\n const identificadorPredicado = nodo.hijos[0];\n //Primero se procede a la búsqueda del predicado\n this.codigoTemporal += \"//Inicio ejecucion predicado\\n\";\n this.busquedaElemento(identificadorPredicado);\n //Seguidamente se resuelve la expresión\n let resultadoExpresion = this.resolverExpresion(nodo.hijos[1]);\n let anteriorPredicado = this.temporalGlobal.retornarString();\n this.temporalGlobal.aumentar();\n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + anteriorPredicado + \";\\n\";\n let predicadoVariable = this.temporalGlobal.retornarString();\n this.codigoTemporal += \"PXP = \" + predicadoVariable + \";\\n\";\n this.codigoTemporal += \"ubicarPredicado();\\n\";\n //SI EL RESULTADO ES DE TIPO ETIQUETA\n if (resultadoExpresion.tipo == 4) {\n let datos = resultadoExpresion.valor;\n let a = datos[0];\n let b = datos[1];\n let c = datos[2];\n let limite = this.consolaSalidaXPATH.length;\n for (var i = this.contadorConsola; i < limite; i++) {\n // salidaXPATH.getInstance().push(this.consolaSalidaXPATH[i].dameID());\n this.auxiliarPredicado(a, b, c, this.consolaSalidaXPATH[i]);\n }\n }\n //SI EL RESULTADO ES DE TIPO ETIQUETA\n if (resultadoExpresion.tipo == 1) {\n this.consolaSalidaXPATH.push(this.consolaSalidaXPATH[(this.contadorConsola + resultadoExpresion.valor) - 1]);\n this.contadorConsola = this.consolaSalidaXPATH.length - 1;\n }\n this.controladorPredicadoInicio = false;\n }\n //PARA VERIFICAR QUE ES UN PREDICADO DE UN ATRIBUTO\n if (this.tipoNodo('PREDICADO_A', nodo)) {\n //return this.recorrer(nodo.hijos[0]);\n const identificadorPredicadoAtributo = nodo.hijos[0];\n //RECORREMOS LO QUE VA DENTRO DE LLAVES PARA OBTENER EL VALOR\n //AQUI VA EL METODO RESOLVER EXPRESION DE SEBAS PUTO \n return this.recorrerArbolConsulta(nodo.hijos[1]);\n }\n //PARA VERIFICAR SI EL ELEMENTO A BUSCAR ES UN ATRIBUTO \n if (this.tipoNodo('atributo', nodo)) {\n this.controladorAtributoImpresion = true;\n const identificadorAtributo = nodo.hijos[0];\n if (this.inicioRaiz) {\n let limite = this.consolaSalidaXPATH.length;\n for (var i = this.contadorConsola; i < limite; i++) {\n let x = this.consolaSalidaXPATH[i];\n //let nodoBuscarAtributo = this.consolaSalidaXPATH[this.consolaSalidaXPATH.length - 1];\n let nodoBuscarAtributo = x;\n //CODIGO DE 3 DIRECCIONES \n this.codigoTemporal += \"P=\" + nodoBuscarAtributo.posicion + \";\\n\";\n let inicioRaizXML = this.temporalGlobal.retornarString();\n this.temporalGlobal.aumentar();\n //Ubicamos nuestra variabel a buscar en el principio del heap \n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=HXP;\\n\";\n //Escribimos dentro del heap de XPATH el nombre del identificador a buscar \n for (var z = 0; z < identificadorAtributo.length; z++) {\n this.codigoTemporal += `heapXPATH[(int)HXP] = ${identificadorAtributo.charCodeAt(z)};\\n`;\n this.codigoTemporal += `HXP = HXP+1;\\n`;\n }\n this.codigoTemporal += `heapXPATH[(int)HXP] =-1;\\n`;\n this.codigoTemporal += `HXP = HXP+1;\\n`;\n let anteriorGlobal = this.temporalGlobal.retornarString();\n this.codigoTemporal += \"stackXPATH[(int)PXP]=\" + anteriorGlobal + \";\\n\";\n this.temporalGlobal.aumentar();\n this.codigoTemporal += \"busquedaAtributo();\\n\";\n //CODIGO DE 3 DIRECCIONES \n //Se procede a la búsqueda de los atributos en todos los nodos\n for (let entry of nodoBuscarAtributo.atributos) {\n let atributoTemporal = entry;\n let nombreAbributo = atributoTemporal.dameNombre();\n if (nombreAbributo == identificadorAtributo) {\n this.atributoID = identificadorAtributo;\n this.pathCompleto = true;\n // this.contadorConsola = i;\n // this.consolaSalidaXPATH.push(nodoBuscarAtributo);\n }\n }\n /*for (let entry of nodoBuscarAtributo.hijos) {\n this.busquedaAtributo(entry, identificadorAtributo);\n }*/\n if (this.controladorDobleSimple) {\n this.busquedaAtributo(x, identificadorAtributo);\n }\n }\n }\n else {\n this.inicioRaiz = true;\n for (let entry of this.ArrayEtiquetas) {\n let temp = entry;\n //CODIGO DE 3 DIRECCIONES \n this.codigoTemporal += \"P=\" + temp.posicion + \";\\n\";\n let inicioRaizXML = this.temporalGlobal.retornarString();\n this.temporalGlobal.aumentar();\n //Ubicamos nuestra variabel a buscar en el principio del heap \n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=HXP;\\n\";\n //Escribimos dentro del heap de XPATH el nombre del identificador a buscar \n for (var z = 0; z < identificadorAtributo.length; z++) {\n this.codigoTemporal += `heapXPATH[(int)HXP] = ${identificadorAtributo.charCodeAt(z)};\\n`;\n this.codigoTemporal += `HXP = HXP+1;\\n`;\n }\n this.codigoTemporal += `heapXPATH[(int)HXP] =-1;\\n`;\n this.codigoTemporal += `HXP = HXP+1;\\n`;\n let anteriorGlobal = this.temporalGlobal.retornarString();\n this.codigoTemporal += \"stackXPATH[(int)PXP]=\" + anteriorGlobal + \";\\n\";\n this.temporalGlobal.aumentar();\n this.codigoTemporal += \"busquedaAtributo();\\n\";\n //CODIGO DE 3 DIRECCIONES \n for (let entry2 of temp.atributos) {\n let aTemp = entry2;\n let nameAtt = aTemp.dameNombre();\n if (nameAtt == identificadorAtributo) {\n this.atributoID = identificadorAtributo;\n this.pathCompleto = true;\n }\n }\n if (this.controladorDobleSimple) {\n this.busquedaAtributo(entry, identificadorAtributo);\n }\n }\n }\n }\n //PARA VERIFICAR SI EL ELEMENTO A BUSCAR ES CUALQUIER ELEMENTO \n if (this.tipoNodo('any', nodo)) {\n //SIGNIFICA ACCESO DOBLE\n if (this.controladorDobleSimple) {\n let controladorNuevoInicio = -1;\n let limite = this.consolaSalidaXPATH.length;\n for (var i = this.contadorConsola; i < limite; i++) {\n let temporal = this.consolaSalidaXPATH[i];\n for (let entry of temporal.hijos) {\n //insertamos TODOS los hijos\n this.codigoTemporal += \"P =\" + entry.posicion + \";\\n\";\n this.codigoTemporal += \"imprimirContenido();\\n\";\n this.consolaSalidaXPATH.push(entry);\n if (controladorNuevoInicio == -1)\n controladorNuevoInicio = this.consolaSalidaXPATH.length - 1;\n this.complementoAnyElement(entry);\n }\n }\n this.contadorConsola = controladorNuevoInicio;\n this.pathCompleto = true;\n }\n //SIGNIFICA ACCESO SIMPLE \n else {\n //Controlamos el nuevo acceso para cuando coloquemos un nuevo elemento en la lista \n let controladorNuevoInicio = -1;\n let limite = this.consolaSalidaXPATH.length;\n for (var i = this.contadorConsola; i < limite; i++) {\n let temporal = this.consolaSalidaXPATH[i];\n for (let entry of temporal.hijos) {\n //insertamos TODOS los hijos\n this.consolaSalidaXPATH.push(entry);\n if (controladorNuevoInicio == -1)\n controladorNuevoInicio = this.consolaSalidaXPATH.length - 1;\n }\n }\n this.contadorConsola = controladorNuevoInicio;\n this.pathCompleto = true;\n }\n }\n //PARA VERIFICAR SI EL ELEMENTO A BUSCAR ES UNA PALABRA RESERVADA que simplicaria un AXE \n if (this.tipoNodo('reservada', nodo)) {\n //return this.recorrer(nodo.hijos[0]);\n const identificador = nodo.hijos[0];\n this.auxiliarAxe = identificador;\n //VERIFICAMOS EL TIPO DE ACCESO DE AXE \n if (this.controladorDobleSimple)\n this.dobleSimpleAxe = true;\n }\n if (this.tipoNodo('AXE', nodo)) {\n //return this.recorrer(nodo.hijos[0]);\n if (this.dobleSimpleAxe)\n this.controladorDobleSimple = true;\n this.temporalGlobal.aumentar();\n //Ubicamos nuestra variabel a buscar en el principio del heap \n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=HXP;\\n\";\n //Escribimos dentro del heap de XPATH el nombre del identificador a buscar \n for (var i = 0; i < this.auxiliarAxe.length; i++) {\n this.codigoTemporal += `heapXPATH[(int)HXP] = ${this.auxiliarAxe.charCodeAt(i)};\\n`;\n this.codigoTemporal += `HXP = HXP+1;\\n`;\n }\n this.codigoTemporal += `heapXPATH[(int)HXP] =-1;\\n`;\n this.codigoTemporal += `HXP = HXP+1;\\n`;\n this.codigoTemporal += \"PXP =\" + this.temporalGlobal.retornarString() + \";\\n\";\n this.codigoTemporal += \"ejecutarAxe();\\n\";\n //Si Solicita implementar el axe child\n if (this.auxiliarAxe == \"child\") {\n //ESCRIBIMOS LOS IFS RESPECTIVOS \n this.recorrerArbolConsulta(nodo.hijos[0]);\n }\n //Si necesitsa implementar el axe attribute\n if (this.auxiliarAxe == \"attribute\") {\n //Le cambiamos la etiqueta de identificador a atributo para fines de optimizacion de codigo\n nodo.hijos[0].label = \"atributo\";\n //Escribimos el codigo en C3D para la ejecución del axe atributo \n this.recorrerArbolConsulta(nodo.hijos[0]);\n }\n //Si necesitsa implementar el ancestor\n if (this.auxiliarAxe == \"ancestor\") {\n //Va a resolver el predicado o identificador que pudiese venir \n this.recorrerArbolConsulta(nodo.hijos[0]);\n }\n if (this.auxiliarAxe == \"descendant\") {\n this.controladorDobleSimple = true;\n this.recorrerArbolConsulta(nodo.hijos[0]);\n }\n //Reiniciamos la variable cuando ya se acabe el axe\n this.auxiliarAxe = \"\";\n }\n //PARA VERIFICAR SI EL ELEMENTO A BUSCAR ES UN ATRIBUTO \n if (this.tipoNodo('X', nodo)) {\n //return this.recorrer(nodo.hijos[0]);\n //const identificadorAtributo = nodo.hijos[0] as string;\n this.controladorDobleSimple = true;\n this.recorrerArbolConsulta(nodo.hijos[0]);\n /*\n EN ESTA PARTE SE VA A PROCEDER PARA IR A BUSCAR EL ELEMENTO SEGÚN TIPO DE ACCESO\n */\n }\n //PARA VERIFICAR SI SE NECESITAN TODOS LOS ATRIBUTOS DEL NODO ACTUAL \n if (this.tipoNodo('any_att', nodo)) {\n this.controladorText = true;\n const identificadorAtributo = nodo.hijos[0];\n //Verificamos el tipo de acceso\n //Significa acceso con prioridad\n if (this.controladorDobleSimple) {\n //VERIFICAMOS DESDE DONDE INICIAMOS\n if (!this.inicioRaiz) {\n this.inicioRaiz = true;\n for (let entry of this.ArrayEtiquetas) {\n this.codigoTemporal += \"P =\" + entry.posicion + \";\\n\";\n this.codigoTemporal += \"imprimirAtributoAny();\\n\";\n for (let att of entry.atributos) {\n // salidaXPATH.getInstance().push(att.dameNombre()+\"=\"+att.dameValor());\n }\n this.complementoAnnyAtributte(entry);\n }\n }\n else {\n let limite = this.consolaSalidaXPATH.length;\n for (var i = this.contadorConsola; i < limite; i++) {\n let entry = this.consolaSalidaXPATH[i];\n this.codigoTemporal += \"P =\" + entry.posicion + \";\\n\";\n this.codigoTemporal += \"imprimirAtributoAny();\\n\";\n for (let att of entry.atributos) {\n // salidaXPATH.getInstance().push(att.dameNombre()+\"=\"+att.dameValor());\n }\n this.complementoAnnyAtributte(entry);\n }\n }\n }\n //Acceso sin prioridad\n else {\n if (!this.inicioRaiz) {\n for (let entry of this.ArrayEtiquetas) {\n this.codigoTemporal += \"P =\" + entry.posicion + \";\\n\";\n this.codigoTemporal += \"imprimirAtributoAny();\\n\";\n for (let att of entry.atributos) {\n // salidaXPATH.getInstance().push(att.dameNombre()+\"=\"+att.dameValor());\n }\n }\n }\n else {\n let limite = this.consolaSalidaXPATH.length;\n for (var i = this.contadorConsola; i < limite; i++) {\n let entry = this.consolaSalidaXPATH[i];\n this.codigoTemporal += \"P =\" + entry.posicion + \";\\n\";\n this.codigoTemporal += \"imprimirAtributoAny();\\n\";\n for (let att of entry.atributos) {\n // salidaXPATH.getInstance().push(att.dameNombre()+\"=\"+att.dameValor());\n }\n }\n }\n }\n } //FIN ANNY ATT\n //PARA VERIFICAR SI SE ESTÁ INVOCANDO A LA FUNCIÓN TEXT() \n if (this.tipoNodo('text', nodo)) {\n this.controladorText = true;\n const identificadorAtributo = nodo.hijos[0];\n //Si se necesita el texto de el actual y los descendientes\n if (this.controladorDobleSimple) {\n for (var i = this.contadorConsola; i < this.consolaSalidaXPATH.length; i++) {\n /*if (this.consolaSalidaXPATH[i].dameValor() == \"\" || this.consolaSalidaXPATH[i].dameValor() == \" \") {\n \n } else {\n // salidaXPATH.getInstance().push(this.consolaSalidaXPATH[i].dameValor());\n }*/\n this.codigoTemporal += \"P=\" + this.consolaSalidaXPATH[i].posicion + \";\\n\";\n this.codigoTemporal += \"text();\\n\";\n this.complementoText(this.consolaSalidaXPATH[i]);\n }\n }\n else {\n //si necesita solo el texto del actual \n for (var i = this.contadorConsola; i < this.consolaSalidaXPATH.length; i++) {\n /* if (this.consolaSalidaXPATH[i].dameValor() == \"\" || this.consolaSalidaXPATH[i].dameValor() == \" \") {\n \n } else {\n //salidaXPATH.getInstance().push(this.consolaSalidaXPATH[i].dameValor());\n }*/\n this.codigoTemporal += \"P=\" + this.consolaSalidaXPATH[i].posicion + \";\\n\";\n this.codigoTemporal += \"text();\\n\";\n }\n }\n }\n //PARA VERIFICAR SI ES EL TIPO DE ACCESO AL PADRE: \":\" \n if (this.tipoNodo('puntos', nodo)) {\n const cantidad = nodo.hijos[0];\n //DOSPUNTOSSSSSSSSS\n if (cantidad.length == 2) {\n this.pathCompleto = true;\n if (this.auxiliarArrayPosicionPadres == -1) {\n this.auxiliarArrayPosicionPadres = this.arrayPosicionPadres.length - 1;\n }\n for (var i = this.auxiliarArrayPosicionPadres; i >= 0; i--) {\n let contadorHermanos = this.arrayPosicionPadres[i];\n let controladorInicio = 0;\n if (i > 0) {\n while (contadorHermanos != this.arrayPosicionPadres[i - 1]) {\n this.consolaSalidaXPATH.push(this.consolaSalidaXPATH[contadorHermanos]);\n this.codigoTemporal += \"P =\" + this.consolaSalidaXPATH[contadorHermanos].posicion + \";\\n\";\n if (controladorInicio == 0) {\n this.contadorConsola = this.consolaSalidaXPATH.length - 1;\n }\n controladorInicio++;\n contadorHermanos--;\n this.auxiliarArrayPosicionPadres = contadorHermanos;\n }\n }\n else {\n while (contadorHermanos >= 0) {\n this.consolaSalidaXPATH.push(this.consolaSalidaXPATH[contadorHermanos]);\n this.codigoTemporal += \"P =\" + this.consolaSalidaXPATH[contadorHermanos].posicion + \";\\n\";\n if (controladorInicio == 0) {\n this.contadorConsola = this.consolaSalidaXPATH.length - 1;\n }\n controladorInicio++;\n contadorHermanos--;\n this.auxiliarArrayPosicionPadres = contadorHermanos;\n }\n }\n break;\n }\n this.codigoTemporal += \"busquedaSimple();\\n\";\n }\n //SIGNIFICA QUE TIENE SOLO UN PUNTO \n else {\n this.pathCompleto = true;\n }\n ///DOS PUNTOOOOOOOOOOOOOOOOS\n }\n }", "function buscarhorarios()\n{\n var data = new Array(12);\n var divhoras;\n divhoras = document.getElementById(\"divhoras\");\n fechaage = document.getElementsByName(\"calendario\")[0].value;\n str_nom_agenda = document.getElementsByName(\"str_nom_agenda\")[0].value;\n \n str_medico1 = document.getElementsByName(\"str_medico1\")[0].value;\n str_medico2 = document.getElementsByName(\"str_medico\")[0].value;\n\n //*******************ASIGNAREL VALOR DEL MÉDICOQUE SE USARAN PARA EL QUERY********************\n int_medico = str_medico1\n //*******************BUSCO EL DIA DE LA SEMANA A LA PERTENECE LA FECHA SELECCIONADA***********\n \n var cadena = fechaage.split(\"-\");\n semana = cadena[0];\n dia = cadena[1];\n mes = cadena[2];\n ano = cadena[3];\n fecha_actual = ano+\"-\"+mes+\"-\"+dia;\n\n //*******************ASIGNAR AL ARRAY DE DATOS************************************************\n\n data[0] = semana;\n data[1] = dia;\n data[2] = mes;\n data[3] = ano;\n data[4] = str_nom_agenda;\n data[5] = int_medico;\n data[6] = fecha_actual;\n \n //*******************ENVÍO CON JQUERY LA INFORMACION******************************************\n $.ajax({\n url: 'horarios',\n type: 'POST',\n data: {data: data},\n dataType: 'html',\n beforeSend: function () {\n //alert('Procesando...');\n },\n error:function( jqXHR, textStatus, errorThrown ) {\n alert( errorThrown ); \n //alert(\"Ha ocurrido un error\");\n },\n success: function (respuesta) {\n $('#divhoras').html(respuesta);\n }\n });\n}", "function verificarDT(atrib, mens, id){\n var bandera = true;\n if(atrib.value.length > 0){\n if(mens=='mtelefono' && atrib.value.length<9){\n error(atrib, mens, '<br>El numero de telefono no tiene los digitos necesarios')\n bandera = false;\n vgeneral[id]=bandera;\n }else{\n arreglo(atrib, mens);\n bandera = true;\n vgeneral[id]=bandera;\n }\n \n }else{\n error(atrib, mens, '<br>El campo esta vacio')\n bandera = false;\n vgeneral[id]=bandera;\n }\n return bandera;\n}", "function inicializareditar(datos) {\n \n tipo1informacionpersonaleditar.value = datos[0]['tipo'];\n document.getElementById('idip').value = datos[0]['id'];\n\n}", "function identificarData(codigo, tipoCodigo) {\n codigo = codigo.replace(/[^0-9]/g, '');\n const tipoBoleto = identificarTipoBoleto(codigo);\n\n let fatorData = '';\n let dataBoleto = new Date();\n\n dataBoleto.setFullYear(1997);\n dataBoleto.setMonth(9);\n dataBoleto.setDate(7);\n dataBoleto.setHours(23, 54, 59);\n\n if (tipoCodigo === 'CODIGO_DE_BARRAS') {\n if (tipoBoleto == 'BANCO') {\n fatorData = codigo.substr(5, 4)\n\n dataBoleto.setDate(dataBoleto.getDate() + Number(fatorData));\n dataBoleto.setTime(dataBoleto.getTime() + dataBoleto.getTimezoneOffset() - (3) * 60 * 60 * 1000);\n var dataBoletoform = dataBoleto.getDate() + \"/\" + (dataBoleto.getMonth() + 1) + \"/\" + dataBoleto.getFullYear()\n\n return dataBoletoform;\n } else {\n dataBoleto = null\n\n return dataBoleto;\n }\n } else if (tipoCodigo === 'LINHA_DIGITAVEL') {\n if (tipoBoleto == 'BANCO') {\n fatorData = codigo.substr(33, 4)\n dataBoleto.setDate(dataBoleto.getDate() + Number(fatorData));\n dataBoleto.setTime(dataBoleto.getTime() + dataBoleto.getTimezoneOffset() - (3) * 60 * 60 * 1000);\n var dataBoletoform = dataBoleto.getDate() + \"/\" + (dataBoleto.getMonth() + 1) + \"/\" + dataBoleto.getFullYear()\n\n return dataBoletoform;\n } else {\n dataBoleto = null\n\n return dataBoleto;\n }\n }\n}", "function buscaOrdenesDeCompraPendientesDeAprobacion(tipo_busqueda){\n\tvar error = 0;\n\tvar idSucursal = $(\"#select-sucursal\").find(\"option:selected\").val();\n\tvar idUsuarioSolicitante = $(\"#select-usuario-solicitante\").find(\"option:selected\").val();\n\tvar fecha_inicio = $(\"#fechadel\").val();\n\tvar fecha_fin = $(\"#fechaal\").val();\n\tvar idOrdenCompra = $(\"#idordencompra\").val();\n\t//var FechaInicioConv = convierteFechaJava(fecha_inicio);\n\t//var FechaFinConv = convierteFechaJava(fecha_fin);\n\t\n\t\n\tif(tipo_busqueda==1){\n\t\tif((idSucursal == '-1')&&(idUsuarioSolicitante == '-1')&&(fecha_inicio == '')&&(fecha_fin=='')){\n\t\t\talert('Debe elgir un crierio');\n\t\t\terror = 1;\n\t\t}\n\t\tif(fecha_inicio > fecha_fin){\n\t\t\talert(\"La fecha incial no puede ser mayor a la fecha final\");\n\t\t\terror = 1;\n\t\t}\n\t}else if(tipo_busqueda==2){\n\t\tif(idOrdenCompra==''){\n\t\t\talert('Debe introducir una orden de compra');\n\t\t\terror = 1;\n\t\t}\n\t}\n\tif(error == 0){\n\t\tvar FechaInicioConv = cambiarFormatoFecha(fecha_inicio,'ymd','-');\n\t\tvar FechaFinConv = cambiarFormatoFecha(fecha_fin,'ymd','-');\n\n\t\t$(\".detalle tbody tr\").remove();\n\t\tvar ruta = \"llenaTablaDetalle.php\";\n\t\tvar envio = \"idSucursal=\" + idSucursal + \"&idUsuarioSolicitante=\" + idUsuarioSolicitante + \"&fecini=\" + FechaInicioConv + \"&fecfin=\" + FechaFinConv + \"&idOrdenCompra=\"+idOrdenCompra+\"&proceso=ordenes_compra_pendientes_de_aprobacion\";\n\t\tvar respuesta = ajaxN(ruta, envio);\n\t\t$(\".detalle tbody\").append(respuesta);\n\t}\n}", "function accionModificar() {\n\tvar opcionMenu = get(\"formulario.opcionMenu\");\n\tvar oidPlantilla = null;\n\tvar numPlantilla = null;\n\tvar oidParamGrales = null;\n\tvar filaMarcada = null;\n\tvar codSeleccionados = null;\n\tvar datos = null;\t\n\n\tlistado1.actualizaDat();\n\tdatos = listado1.datos;\n\tcodSeleccionados = listado1.codSeleccionados();\n\n\tif (codSeleccionados.length > 1) {\n GestionarMensaje('8');\n\t\treturn;\n\t}\n\n\tif ( codSeleccionados.length < 1)\t{\n GestionarMensaje('4');\n\t\treturn;\n\t}\n\n\t// Obtengo el índice de la fila marcada (en este punto, solo una estará marcada)\n\tvar filaMarcada = listado1.filaSelecc;\n\n\t// Obtengo el oid de Param. Generales (oid del valor seleccionado, está al final de la lista por el tema del ROWNUM)\n\toidParamGrales = datos[filaMarcada][9]; \n\n\t// Obtengo Oid de la Entidad PlantillaConcurso (AKA Numero de Plantilla);\n\tnumPlantilla = datos[filaMarcada][3];\n\n\tvar oidVigenciaConcurso = datos[filaMarcada][10]; \n\tvar oidEstadoConcurso = datos[filaMarcada][11]; \n\tvar noVigencia = get(\"formulario.noVigencia\");\n\tvar estConcuAprobado = get(\"formulario.estConcuAprobado\");\n\n\tif((parseInt(oidVigenciaConcurso) == parseInt(noVigencia)) && \t\t\n\t(parseInt(oidEstadoConcurso)!=parseInt(estConcuAprobado))) {\n\t\tvar obj = new Object();\n\t\t// Seteo los valores obtenidos. \n\t\tobj.oidConcurso = oidParamGrales;\n\t\tobj.oidPlantilla = numPlantilla;\n\t\tobj.opcionMenu = opcionMenu;\n\t\tvar retorno = mostrarModalSICC('LPMantenerParametrosGenerales', '', obj);\n\t\taccionBuscar();\n\t}\n\telse {\n\t\tvar indDespacho = datos[filaMarcada][12];\n\t\tif (oidVigenciaConcurso == '1' && parseInt(indDespacho) == 0) {\n\t\t\tif (GestionarMensaje('3385')) {\n\t\t\t\tvar obj = new Object();\n\t\t\t\t// Seteo los valores obtenidos. \n\t\t\t\tobj.oidConcurso = oidParamGrales;\n\t\t\t\tobj.oidPlantilla = numPlantilla;\n\t\t\t\tobj.opcionMenu = opcionMenu;\n\t\t\t\tobj.oidVigenciaConcurso = oidVigenciaConcurso;\n\t\t\t\tvar retorno = mostrarModalSICC('LPMantenerParametrosGenerales', '', obj);\n\t\t\t\taccionBuscar();\n\t\t\t}\t\n\t\t}\n\t\telse {\n\t\t\t//El concurso seleccionado no puede ser modificado\n\t\t\tGestionarMensaje('INC052');\n\t\t}\n\t}\n}", "function TratarCasilla(idCelda, textoMateria, diaTarea){\r\n\t\r\n\t // si ya ha pasado la hora no se deja introducir tareas\r\n\tif ( (document.getElementById(idCelda).style.textDecoration) == \"line-through\") {\r\n\t\treturn 0;\r\n\t}\r\n\t// si había un día seleccionado se quita la marca en ese día.\r\n\tif (celdaSelec != \"\") {\r\n\t\tdocument.getElementById(celdaSelec).style.borderWidth=\"thin\";\r\n\t}\r\n\t// Se rellenan los datos de día y materia en el formulario a partir de los datos de la celda pulsada\r\n\tdocument.getElementById(\"Materia\").value = textoMateria;\r\n\tdocument.getElementById(\"DiaTarea\").value = diaTarea;\r\n\tceldaSelec = idCelda; // Se guarda el id de la celda seleccionada\r\n\tvar posicion =0;\r\n\tvar encontrado=false;\r\n\t// Se busca si había una tarea para ese día\r\n\tfor ( var i =0; i<trabajosM.length; i=i+2) {\r\n\t\tif (trabajosM[i] == idCelda) {\r\n\t\t\t// Si había una tarea se rellena el formulario con dicha tarea\r\n\t\t\tdocument.getElementById(\"Tarea\").value= trabajosM[i+1];\r\n\t\t\tencontrado = true;\r\n\t\t}\r\n\t}\r\n\t// Si no había tarea para ese día se borra lo que hubiese en el formulario\r\n\tif (encontrado == false) {\r\n\t\tdocument.getElementById(\"Tarea\").value=\"\";\r\n\t}\r\n\t// Se marca la celda como seleccionada\r\n\tdocument.getElementById(idCelda).style.borderWidth=\"thick\";\r\n}", "function LeerDatos(){\n var celdasvacias=false;\n renglonconceldasvacias=[];\n \n var data=Array();\n data.push({\"prestamoaccionistas\":LeerExcel(\"excelsituacion\",8,3)}); //nombre de la tabla, renglon(r) y columna(c) \n data.push({\"prestamolargoplazo\":LeerExcel(\"excelsituacion\",9,3)}); \n data.push({\"inversionaccionistas\":LeerExcel(\"excelsituacion\",12,3)});\n data.push({\"utilidadreservas\":LeerExcel(\"excelsituacion\",13,3)});\n \n data.push({\"porcgastos2\":$(\"#anio1gastos\").val().replace(/[\\$,]/g, \"\")});\n data.push({\"porcgastos3\":$(\"#anio2gastos\").val().replace(/[\\$,]/g, \"\")});\n \n data.push({\"oficinas\":LeerExcel(\"excelgastos\",1,1)});\n data.push({\"servpublicos\":LeerExcel(\"excelgastos\",3,1)});\n data.push({\"telefonos\":LeerExcel(\"excelgastos\",4,1)});\n data.push({\"seguros\":LeerExcel(\"excelgastos\",5,1)});\n data.push({\"papeleria\":LeerExcel(\"excelgastos\",6,1)});\n data.push({\"rentaequipo\":LeerExcel(\"excelgastos\",7,1)});\n data.push({\"costoweb\":LeerExcel(\"excelgastos\",8,1)});\n data.push({\"costoconta\":LeerExcel(\"excelgastos\",9,1)});\n \n data.push({\"honorariolegal\":LeerExcel(\"excelgastos\",1,3)});\n data.push({\"viajesysubsistencia\":LeerExcel(\"excelgastos\",2,1)});\n data.push({\"gastosautos\":LeerExcel(\"excelgastos\",3,1)});\n data.push({\"gastosgenerales\":LeerExcel(\"excelgastos\",4,1)});\n data.push({\"cargosbancarios\":LeerExcel(\"excelgastos\",5,1)});\n data.push({\"otrosservicios\":LeerExcel(\"excelgastos\",6,1)});\n data.push({\"gastosinvestigacion\":LeerExcel(\"excelgastos\",8,1)});\n data.push({\"gastosdiversos\":LeerExcel(\"excelgastos\",9,1)});\n \n data.push({\"totalgastos\":$(\"#totalgastos\").val().replace(/[\\$,]/g, \"\")});\n \n data.push({\"tasalider\":$(\"#tasalider\").val().replace(/[\\$,]/g, \"\")});\n data.push({\"primariesgo\":$(\"#primariesgo\").val().replace(/[\\$,]/g, \"\")});\n data.push({\"riesgopais\":$(\"#riesgopais\").val().replace(/[\\$,]/g, \"\")});\n \n data.push({\"tasalargoplazo\":$(\"#tasalargoplazo\").val().replace(/[\\$,]/g, \"\")});\n data.push({\"tasacortoplazo\":$(\"#tasacortoplazo\").val().replace(/[\\$,]/g, \"\")});\n data.push({\"interesexcedente\":$(\"#interesexcedente\").val().replace(/[\\$,]/g, \"\")});\n \n return data;\n}", "function fSelReg(aDato, iCol) {\n\t\n\tif(aDato[0]==\"1\"){\n\t\tfrm.iEjercicio.value=aDato[23];\n\t\tfrm.iNumSolicitud.value=aDato[24];\n\t\tfrm.iCveHist.value=\"\";\n\t\t\n\t}else{\n\t\tfrm.iEjercicio.value=-1;\n\t\tfrm.iNumSolicitud.value=-1;\n\t\tfrm.iCveHist.value=aDato[17];\n\t}\n\t\n\t if(iCol==16 && aDato[0]==\"1\"){\n\t\t fArchivosADV();\n\t }else if(iCol==16 && aDato[0]==\"0\"){\n\t\t fArchivosHist();\n\t }\n\t\n}", "function cargaComplementos(){\n //Cargado del DataTables\n if($('table').length>0){\n $('table').DataTable();\n }\n \n //Cargado del DatePicker\n if($(\".date-picker\").toArray().length>0){\n $('.date-picker').datepicker({\n format : \"dd/mm/yyyy\"\n });\n }\n \n //Cargado del Input Mask con el formato \"dd/mm/yyyy\"\n if($('.input-date').toArray().length>0){\n $(\".input-date\").inputmask(\"dd/mm/yyyy\");\n }\n if($('.select2').toArray().length>0){\n $(\".select2\").select2({\n placeholder : \"Seleccione una opción\"\n });\n }\n}", "function tablaresultadosordencompra(limite)\r\n{\r\n \r\n \r\n var decimales = document.getElementById('decimales').value;\r\n var base_url = document.getElementById('base_url').value;\r\n var controlador = base_url+'orden_compra/buscar_ordenescompra';\r\n let parametro = \"\";\r\n if(limite == 2){\r\n parametro = document.getElementById('filtrar').value;\r\n }else if(limite == 3){\r\n parametro = \"\";\r\n }\r\n //document.getElementById('loader').style.display = 'block'; //muestra el bloque del loader\r\n $.ajax({url: controlador,\r\n type:\"POST\",\r\n data:{parametro:parametro},\r\n success:function(respuesta){\r\n var registros = JSON.parse(respuesta);\r\n var color = \"\";\r\n if (registros != null){\r\n //var formaimagen = document.getElementById('formaimagen').value;\r\n var n = registros.length; //tamaño del arreglo de la consulta\r\n $(\"#encontrados\").html(n);\r\n html = \"\";\r\n for (var i = 0; i < n ; i++){\r\n html += \"<tr>\";\r\n html += \"<td style='padding: 2px;' class='text-center'>\"+(i+1)+\"</td>\";\r\n html += \"<td style='padding: 2px;'>\"+registros[i]['usuario_nombre']+\"</td>\";\r\n html += \"<td style='padding: 2px;' class='text-center'>\"+registros[i]['ordencompra_id']+\"</td>\";\r\n html += \"<td style='padding: 2px;' class='text-center'>\";\r\n html += moment(registros[i][\"ordencompra_fecha\"]).format(\"DD/MM/YYYY\");\r\n html += \"</td>\";\r\n html += \"<td style='padding: 2px;' class='text-center'>\"+registros[i]['ordencompra_hora']+\"</td>\";\r\n html += \"<td style='padding: 2px;' class='text-center'>\";\r\n html += moment(registros[i][\"ordencompra_fechaentrega\"]).format(\"DD/MM/YYYY\");\r\n html += \"</td>\";\r\n html += \"<td style='padding: 2px;' class='text-center'>\"+registros[i]['proveedor_nombre']+\"</td>\";\r\n html += \"<td style='padding: 2px;' class='text-right'>\"+Number(registros[i]['ordencompra_totalfinal']).toFixed(decimales)+\"</td>\";\r\n html += \"<td style='padding: 2px;' class='text-center'>\"+registros[i]['estado_descripcion']+\"</td>\";\r\n html += \"<td style='padding: 2px;' class='no-print'>\";\r\n html += \"<a href='\"+base_url+\"orden_compra/edit/\"+registros[i][\"ordencompra_id\"]+\"' class='btn btn-info btn-xs' title='Modificar orden compra' ><span class='fa fa-pencil'></span></a>&nbsp;\";\r\n html += \"<a class='btn btn-success btn-xs' onclick='mostrar_reciboorden(\"+registros[i]['ordencompra_id']+\")' title='Ver reporte orden compra'><fa class='fa fa-print'></fa></a>&nbsp;\";\r\n html += \"<a class='btn btn-facebook btn-xs' onclick='mostrar_reciboordenp(\"+registros[i]['ordencompra_id']+\")' title='Ver reporte orden compra para proveedor'><fa class='fa fa-print'></fa></a>&nbsp;\";\r\n if(registros[i]['estado_id'] == 33){\r\n html += \"<a class='btn btn-danger btn-xs' onclick='modal_ejecutarordencompra(\"+registros[i]['ordencompra_id']+\")' title='Ejecutar orden compra'><fa class='fa fa-bolt'></fa></a>&nbsp;\";\r\n html += \"<a class='btn btn-warning btn-xs' onclick='modal_anularordencompra(\"+registros[i]['ordencompra_id']+\")' title='Anular orden compra'><fa class='fa fa-minus-circle'></fa></a>\";\r\n }/*else if(registros[i]['estado_id'] == 35){\r\n html += \"<a class='btn btn-warning btn-xs' onclick='modal_anularordencmpra(\"+registros[i]['ordencompra_id']+\")' title='Anular orden compra'><fa class='fa fa-minus-circle'></fa></a>\";\r\n }*/\r\n \r\n html += \"</td>\";\r\n html += \"</tr>\";\r\n }\r\n $(\"#tablaresultados\").html(html);\r\n //document.getElementById('loader').style.display = 'none';\r\n }\r\n //document.getElementById('loader').style.display = 'none'; //ocultar el bloque del loader\r\n },\r\n error:function(respuesta){\r\n // alert(\"Algo salio mal...!!!\");\r\n html = \"\";\r\n $(\"#tablaresultados\").html(html);\r\n },\r\n complete: function (jqXHR, textStatus) {\r\n //document.getElementById('loader').style.display = 'none'; //ocultar el bloque del loader \r\n //tabla_inventario();\r\n }\r\n });\r\n}", "rellenarCampos(datos){\n this.tituloInput.value = datos.titulo;\n this.cuerpoInput.value = datos.cuerpo;\n this.idInput.value = datos.id;\n this.estado = \"editar\";\n this.cambiarEstado(this.estado);\n }", "function template_busquedas_getData() {\n\tvar datos = {\n\t\ttransaccion: $(\"#template_busqueda_transaccion\").find(\"p\").attr(\"data-value\"),\n\t\ttipoInmueble: $(\"#template_busqueda_tipoInmueble\").find(\"p\").attr(\"data-value\"),\n\t\testado: $(\"#template_busqueda_estado\").find(\"p\").attr(\"data-value\"),\n\t\tciudad: $(\"#template_busqueda_municipio\").find(\"p\").attr(\"data-value\"),\n\t\tcolonia: $(\"#template_busqueda_colonia\").find(\"p\").attr(\"data-value\"),\n\t\tcodigo: $(\"#template_busqueda_codigo\").val(),\n\t\tpreciosMin: $(\"#template_busqueda_precios_min\").find(\"p\").attr(\"data-value\"),\n\t\tpreciosMax: $(\"#template_busqueda_precios_max\").find(\"p\").attr(\"data-value\"),\n\t\twcs: $(\"#template_busqueda_wcs\").find(\"p\").attr(\"data-value\"),\n\t\trecamaras: $(\"#template_busqueda_recamaras\").find(\"p\").attr(\"data-value\")\n\t}\n\t\n\t\n\tvar _tempArraySelects = Array(\"template_busqueda_antiguedad\", \"template_busqueda_estadoConservacion\", \"template_busqueda_amueblado\", \"template_busqueda_dimensionTotalMin\", \"template_busqueda_dimensionTotalMax\", \"template_busqueda_dimensionConstruidaMin\", \"template_busqueda_dimensionConstruidaMax\");\n\t//agregar opcionales selects\n\tfor (var x = 0; x < _tempArraySelects.length; x++) {\n\t\tnombreElemento = _tempArraySelects[x].replace(\"template_busqueda_\", \"\");\n\t\tif (parseInt($(\"#\"+_tempArraySelects[x]+\" p\").attr(\"data-value\")) != -1) {\n\t\t\tdatos[nombreElemento] = $(\"#\"+_tempArraySelects[x]+\" p\").attr(\"data-value\");\n\t\t}\n\t}\n\t\n\t\n\tvar _tempArrayInputs = Array(\"template_busqueda_cuotaMantenimiento\", \"template_busqueda_elevador\", \"template_busqueda_estacionamientoVisitas\", \"template_busqueda_numeroOficinas\");\n\t//agregar opcionales flotantes y enteros\n\tfor (var x = 0; x < _tempArrayInputs.length; x++) {\n\t\tnombreElemento = _tempArrayInputs[x].replace(\"template_busqueda_\", \"\");\n\t\tif (!isVacio($(\"#\"+_tempArrayInputs[x]).val())) {\n\t\t\tdatos[nombreElemento] = $(\"#\"+nombreElemento).val();\n\t\t}\n\t}\n\t\n\t\n\t//agrega opcionales checkbox\n\t$(\".template_contenedorBusquedaAvanzada .opcionBusquedaAvanzada2 input[type='checkbox']\").each(function(){\n\t\tif ($(this).prop(\"checked\")) {\n\t\t\tnombreElemento = $(this).prop(\"id\").replace(\"template_busqueda_\", \"\");\n\t\t\tdatos[nombreElemento] = 1;\n\t\t}\n\t});\n\t\n\treturn datos;\n}", "function RegistrarDatos(){\n // capturando valores\n var nom=txtNom.value;\n // con el simbolo del dolar\n var pre=\"$ \"+txtPre.value;\n var cat=cboCategoria.selectedIndex;\n var can=txtCan.value;\n // reemplazar el numero de orden del 0 al 3 por texto\n switch(cat){\n case 1:\n cat = \"entretenimiento\"\n break;\n case 2:\n cat = \"tecnologia\"\n break;\n case 3:\n cat = \"linea blanca\"\n break;\n default:\n cat = \"error\"\n break;\n }\n // Cuando los valores ingresados sean diferentes de \"\" o no se haya elegido una categoria...\n if (txtNom.value != \"\" && txtPre.value != \"\" && cboCategoria.selectedIndex != 0 && txtCan.value != \"\"){\n // llamamos al procedimiento registrar\n Registrar(nom,pre,cat,can);\n MostrarRegistro();\n }\n}", "function DibujaCamposEspacio_(ID_Espacio, data, _G_ID_, f) {\n var el = '';\n var ValidarFile = new Array();\n var ValidarNumber = new Array();\n var ValidarTexto = new Array();\n var longitudMaxTexto = new Array();\n $(ID_Espacio).html('');\n var ActualLement = _G_ID_.replace('#', '');\n\n $.each(data, function (i, item) {\n var Ast = '';\n if (item.lMandatorio) {\n Mandatorios.push(item.cCampo);\n Ast = '<span id=\"' + ActualLement + 'ast_' + item.cCampo + '\" class=\"form-text\">*</span>';\n }\n switch (item.iCvetipoCampo) {\n case 7 : // Campo de Tipo Archivo\n var formatoFile = item.cTipoArchivo;\n var tamArchivo = item.iTamArchivo;\n\n if (!formatoFile || formatoFile === 0 || formatoFile === '') {\n formatoFile = '.pdf';\n }\n if (!tamArchivo || tamArchivo === 0 || formatoFile === '') {\n tamArchivo = 10;\n }\n\n el = '<label style=\"text-align: justify\" class=\"control-label \">' + item.cEtiqueta + Ast + ':</label>' +\n '<input maxtam=\"' + tamArchivo + '\" autocomplete=\"off\" name=\"' + item.cCampo + '\" placeholder=\"Seleccione archivo...\" type=\"file\" id=\"' + ActualLement + '_txt_' + item.cCampo + '\" class=\"form-control ns_\" accept=\"' + formatoFile + '\">' +\n '<small id=\"' + ActualLement + 'miniText_' + item.cCampo + '\" class=\"form-text form-text-error hidden\"></small><br>';\n ValidarFile.push(item.cCampo);\n break;\n case 1 : // Campo de Tipo Numerico\n el = '<label style=\"text-align: justify\" class=\"control-label \">' + item.cEtiqueta + Ast + ':</label>' +\n '<input autocomplete=\"off\" name=\"' + item.cCampo + '\" type=\"number\" id=\"' + ActualLement + '_txt_' + item.cCampo + '\" class=\"form-control ns_\" >' +\n '<small id=\"' + ActualLement + 'miniText_' + item.cCampo + '\" class=\"form-text form-text-error hidden\"></small><br>';\n ValidarNumber.push(item.cCampo);\n longitudMaxTexto[item.cCampo] = item.iLargo;\n break;\n case 2: // Campo de Tipo Texto\n el = '<label style=\"text-align: justify\" class=\"control-label \">' + item.cEtiqueta + Ast + ':</label>' +\n '<input autocomplete=\"off\" type=\"text\" name=\"' + item.cCampo + '\" id=\"' + ActualLement + '_txt_' + item.cCampo + '\" class=\"form-control ns_\" >' +\n '<small id=\"' + ActualLement + 'miniText_' + item.cCampo + '\" class=\"form-text form-text-error hidden\"></small> <br>';\n ValidarTexto.push(item.cCampo);\n longitudMaxTexto[item.cCampo] = item.iLargo;\n break;\n case 0: // Label\n el = ('<hr>' +\n '<h4 class=\"control-label\"> ' + item.cEtiqueta + '</h4>' +\n '<hr>');\n break;\n default:\n el = '';\n break;\n }\n $(ID_Espacio).append(el);\n if ((i + 1) == data.length) {\n $.each(ValidarFile, function (i, item) {\n validaCampoFile(item, ActualLement);\n });\n $.each(ValidarTexto, function (j, jtem) {\n validaCampoTexto(jtem, longitudMaxTexto[jtem], ActualLement);\n });\n $.each(ValidarNumber, function (k, ktem) {\n validaCampoNumero(ktem, longitudMaxTexto[ktem], ActualLement);\n });\n if (f && $.isFunction(f)) {\n f();\n }\n }\n });\n}", "function llenarTabla() {\n const usuario = document.getElementById('idRegistrador').value;\n const rol = document.getElementById('rolRegistrador').value;\n const tipo = \"llenarTabla\";\n\n var table = $('#tablaRegistros').DataTable({\n \"ajax\": {\n type: \"POST\",\n url: \"inc/modelos/modelo-lista-registros.php\", \n data: {\n 'usuario' : usuario,\n 'rol' : rol,\n 'tipo': tipo\n }\n }, \n \"autoWidth\": false,\n \"columns\": [\n {\n \"className\": 'details-control',\n \"orderable\": false,\n \"data\": null,\n \"defaultContent\": '<span title=\"Ver Más\" style=\"opacity:0\">Tip</span>'\n },\n {\n \"className\": 'cerrarReg',\n \"orderable\": false,\n \"data\":null,\n \"defaultContent\": '<span title=\"Cerrar\" style=\"opacity:0\">Tip</span>'\n },\n {\n \"className\": 'editarReg',\n \"orderable\": false,\n \"data\":null,\n \"defaultContent\": '<span title=\"Editar\" style=\"opacity:0\">Tip</span>'\n },\n {\n \"className\": 'borrarReg',\n \"orderable\": false,\n \"data\":null,\n \"defaultContent\": '<span title=\"Borrar\" style=\"opacity:0\">Tip</span>'\n },\n { \"data\": \"id_reg_act\" },\n { \"data\": \"consecutivo\" },\n { \"data\": \"ost\" },\n { \"data\": \"siga\" },\n { \"data\": \"numero_servicio\" },\n { \"data\": \"actividad\" },\n { \"data\": \"cantidad_eventos\" },\n { \"data\": \"peso_total\" },\n { \"data\": \"fecha_hora_apertura\" },\n { \"data\": \"nombre\" },\n { \"data\": \"detalle\" },\n { \"data\": \"grupo\" }\n ],\n \"columnDefs\": [\n {\n \"targets\": [4],\n \"visible\": false,\n \"searchable\": false\n },\n {\n \"targets\": [6],\n \"visible\": false,\n },\n {\n \"targets\": [7],\n \"visible\": false,\n },\n {\n \"targets\": [8],\n \"visible\": false,\n },\n {\n \"targets\": [11],\n \"visible\": false,\n \"searchable\": false\n },\n {\n \"targets\": [14],\n \"visible\": false,\n },\n {\n \"targets\": [15],\n \"visible\": false,\n \"searchable\": false\n }\n ],\n \"order\": [[4, \"desc\"]],\n \"language\": {\n \"sProcessing\": \"Procesando...\",\n \"sLengthMenu\": \"Mostrar _MENU_ registros\",\n \"sZeroRecords\": \"No se encontraron resultados\",\n \"sEmptyTable\": \"Ningún dato disponible en esta tabla\",\n \"sInfo\": \"Mostrando registros del _START_ al _END_ de un total de _TOTAL_ registros\",\n \"sInfoEmpty\": \"Mostrando registros del 0 al 0 de un total de 0 registros\",\n \"sInfoFiltered\": \"(filtrado de un total de _MAX_ registros)\",\n \"sInfoPostFix\": \"\",\n \"sSearch\": \"Buscar:\",\n \"sUrl\": \"\",\n \"sInfoThousands\": \",\",\n \"sLoadingRecords\": \"Cargando...\",\n \"oPaginate\": {\n \"sFirst\": \"Primero\",\n \"sLast\": \"Último\",\n \"sNext\": \"Siguiente\",\n \"sPrevious\": \"Anterior\"\n },\n \"oAria\": {\n \"sSortAscending\": \": Activar para ordenar la columna de manera ascendente\",\n \"sSortDescending\": \": Activar para ordenar la columna de manera descendente\"\n },\n \"buttons\": {\n \"copy\": \"Copiar\",\n \"colvis\": \"Visibilidad\"\n },\n \"select\": {\n \"rows\": {\n _: \"You have selected %d rows\",\n 0: \"\",\n 1: \"1 fila seleccionada\"\n }\n }\n },\n \"select\": 'single'\n });\n\n // Si el rol del usuario es vista o tecnico, se ocultan las siguientes opciones\n if(rol === \"Vista\" || rol === \"Tecnico\"){\n // Oculta opcion de cerrar registros\n table.column( 1 ).visible( false );\n table.column( 2 ).visible( false );\n table.column( 3 ).visible( false );\n } else if(rol === \"Operador\"){\n table.column( 3 ).visible( false );\n }\n\n // Se agrega el evento para mostrar u ocultar los detalles\n $('#tablaRegistros tbody').on('click', 'td.details-control', function () {\n var tr = $(this).closest('tr');\n var row = table.row(tr);\n\n if (row.child.isShown()) {\n // Si la fila se está mostrando, se oculta\n row.child.hide();\n tr.removeClass('shown');\n }\n else {\n // Muestra ésta fila\n row.child(format(row.data())).show();\n tr.addClass('shown');\n }\n });\n\n // Se agrega el evento para cerrar un registro\n $('#tablaRegistros tbody').on( 'click', 'td.cerrarReg', function () {\n var data = table.row( $(this).parents('tr') ).data();\n var todos = table.data();\n let tipo = \"cerrar\";\n modalAccionesRegistro(data, todos, tipo);\n } );\n\n // Se agrega el evento para editar un registro\n $('#tablaRegistros tbody').on( 'click', 'td.editarReg', function () {\n var data = table.row( $(this).parents('tr') ).data();\n var todos = table.data();\n let tipo = \"editar\";\n modalAccionesRegistro(data, todos, tipo);\n } );\n\n // Se agrega el evento para editar un registro\n $('#tablaRegistros tbody').on( 'click', 'td.borrarReg', function () {\n var data = table.row( $(this).parents('tr') ).data();\n var todos = table.data();\n let tipo = \"borrar\";\n modalAccionesRegistro(data, todos, tipo);\n } );\n\n}", "function buscadisponibilidad()\n{\n var data = new Array(7);\n divhoradisponible = document.getElementById(\"divhoradisponible\");\n str_medico = document.getElementsByName(\"str_medico\")[0].value;\n str_especialista = document.getElementsByName(\"str_especialista\")[0].value;\n str_nom_agenda = document.getElementsByName(\"str_nom_agenda\")[0].value;\n\n //*******************BUSCO EL DIA DE LA SEMANA A LA PERTENECE LA FECHA SELECCIONADA***********\n var f = new Date();\n var hoy = f.getDay();\n //***PARA ASIGNAR EL DIA DOMINGO***\n if (hoy==0){hoy = 7;}\n //*********************************\n var dia = f.getDate();\n var mes = f.getMonth()+1;\n var ano = f.getFullYear();\n var fecactual = ano+\"-\"+mes+\"-\"+dia;\n //*******************ASIGNAR AL ARRAY DE DATOS************************************************\n data[0] = str_nom_agenda;\n data[1] = str_medico;\n data[2] = str_especialista;\n data[3] = hoy;\n data[4] = fecactual;\n\n //*******************ACTIVAR LOS BOTONES*****************************************************\n $('#reserva').attr(\"disabled\", false);\n $('#masreservas').attr(\"disabled\", false);\n //*******************ENVÍO CON JQUERY LA INFORMACION******************************************\n $.ajax({\n url: '../disponibilidad',\n type: 'POST',\n data: {data: data},\n dataType: 'html',\n beforeSend: function () {\n //alert('Procesando...');\n },\n error:function( jqXHR, textStatus, errorThrown ) {\n alert( errorThrown ); \n //alert(\"Ha ocurrido un error\");\n },\n success: function (respuesta) {\n $('#divhoradisponible').html(respuesta);\n }\n });\n}", "function guardarDatosClima(e){\n\te.preventDefault();\n\n// Selectores------------------------------------\n\n\tlet ciudadUsuario = document.getElementById(\"filtroSelect\").value;\n\tlet split = ciudadUsuario.split(\",\");\n\tlet city = split[0];\n\tlet longitud = split[1];\n\tlet latitud = split[2];\n\n\t// console.log(split);\n\n\t// let ciudadUsuario = document.getElementById(\"filtroSelect\").value;\n\t// const ClimaUsuario = new Clima(city, 18, \"Parcialmente Nublado\", fechaTexto(fecha));\n\t// Url de conexion api concatenando el valor de la ciudad\n\tconst url = 'https://api.openweathermap.org/data/2.5/weather?q='+city+'&units=metric&lang=sp&appid=509a71114c79dce7fe4e067058ed0286';\n\t// console.log(url);\n\n// Selectores------------------------------------\n\n\t// ClimaDefinido.push(ClimaUsuario);\n\n\t// Imprime en mi id=ciudad lo que traiga mi Valor de ciudadUsuario\n\tciudad.textContent = city;\n\n\t// API CLIMA Openweathermap ---------------------\n\t\n\t// Conexion por fetch y agregar variables que se van a utilizar\n\n\tfetch(url).then(response => response.json())\n\t.then(data => {\n\n\t\t// console.log(url);\n\t\tlet nombreCiudadData = data['name'];\n\t\tlet idClima = data['id'];\n\n\t\tlet temperatura = data['main']['temp'];\n\t\tlet sensacionTermica = data['main']['feels_like'];\n\t\tlet humedadClima = data['main']['humidity'];\n\t\tlet temperaturaMinima = data['main']['temp_min'];\n\t\tlet temperaturaMaxima = data['main']['temp_max'];\n\n\t\tlet statusClima = data['weather'];\n\t\tlet statusClimaDescripcion = data['weather'][0]['description'];\n\t\tlet iconClimaDescripcion = data['weather'][0]['icon'];\n\n\t\tlet vientoClima = data['wind']['speed'];\n\t\t\n\n\t\t// Imprimir los datos del clima - dependiendo de la respuesta del usuario\n\t\tgradosClima.textContent = Math.round(temperatura);\n\t\tfactorClima.textContent = statusClimaDescripcion;\n\t\tclimaMax.textContent = `${Math.round(temperaturaMaxima)} °C /`;\n\t\tclimaMin.textContent = `${Math.round(temperaturaMinima)} °C`;\n\t\tviento.textContent = `${vientoClima} km/h`;\n\t\tsensacionTer.textContent = `${Math.round(sensacionTermica)} °C`;\n\t\thumedad.textContent = `${humedadClima} %`;\n\n\t\t// jQuery Animación de Imagen del Clima\n\n\t\t$(function mostrarImagen() { \n\t\t\t// console.log(iconClimaDescripcion);\n\t\t\t$(\"#imagenClima\").attr(\"src\",`http://openweathermap.org/img/wn/${iconClimaDescripcion}@2x.png`);\n\t\t});\n\t})\n\t.catch(error => alert(\"Nombre de la ciudad Invalido\"));\n\n\t// API CLIMA Openweathermap ---------------------\n\n\t// Resetear pagina despues de 2 minutos ---------\n\n\tsetTimeout(function(){\n\t\twindow.location.reload(1);\n\t}, 60000);\n\n\t// Resetear pagina despues de 2 minutos ---------\n\n\t// Funcion Clima 7 Days -------------------------\n\n\tfunction clima7Dias(){\n\n\t\tconst url7Days = 'https://api.openweathermap.org/data/2.5/onecall?lat='+latitud+'&lon='+longitud+'&units=metric&lang=sp&exclude=current,minutely,hourly,alerts&appid=509a71114c79dce7fe4e067058ed0286';\n\n\t\tfetch(url7Days).then(response => response.json())\n\t\t.then(data => {\n\n\t\t\tconsole.log(url7Days);\n\n\t\t\tlet daily = data['daily'];\n\t\t\tlet tomorrow = data['daily'][0];\n\t\t\tlet tomorrowTemp = data['daily'][0]['temp'];\n\t\t\t// console.log(tomorrowTemp);\n\t\t\tlet tomorrowTempMin = data['daily'][0]['temp']['min'];\n\t\t\t// console.log(tomorrowTempMin);\n\t\t\tlet tomorrowTempMax = data['daily'][0]['temp']['max'];\n\t\t\t// console.log(tomorrowTempMax);\n\n\t\t\tlet iconClimaTomorrowDescripcion = data['daily'][0]['weather'][0]['icon'];\n\t\t\t// console.log(iconClimaTomorrowDescripcion);\n\n\t\t\tlet postTomorrowTempMin = data['daily'][1]['temp']['min'];\n\t\t\t// console.log(postTomorrowTempMin);\n\t\t\tlet postTomorrowTempMax = data['daily'][1]['temp']['max'];\n\t\t\t// console.log(postTomorrowTempMax);\n\n\t\t\tlet iconClimaPostTomorrowDescripcion = data['daily'][1]['weather'][0]['icon'];\n\t\t\t// console.log(iconClimaPostTomorrowDescripcion);\n\n\t\t\t// Imprimir los datos del clima - dependiendo de la respuesta del usuario\n\n\t\t\ttempMaxTomorrow.textContent = `${Math.round(tomorrowTempMax)} °C /`;\n\t\t\ttempMinTomorrow.textContent = `${Math.round(tomorrowTempMin)} °C`;\n\n\t\t\ttempMaxPostTomorrow.textContent = `${Math.round(postTomorrowTempMax)} °C /`;\n\t\t\ttempMinPostTomorrow.textContent = `${Math.round(postTomorrowTempMin)} °C`;\n\t\t\t// Imprimir los datos del clima - dependiendo de la respuesta del usuario\n\n\t\t\t$(function mostrarImagenSiguientesDias() { \n\t\t\t\t// console.log(iconClimaDescripcion);\n\t\t\t\t$(\"#imagenClimaMañana\").attr(\"src\",`http://openweathermap.org/img/wn/${iconClimaTomorrowDescripcion}@2x.png`);\n\t\n\t\t\t\t$(\"#imagenClimaPostMañana\").attr(\"src\",`http://openweathermap.org/img/wn/${iconClimaPostTomorrowDescripcion}@2x.png`);\n\t\t\t});\n\t\t\t\n\t\t})\n\t\t.catch(error => alert(\"Nombre de la ciudad Invalido\"));\n\n\t\t// API CLIMA Openweathermap ---------------------\n\n\t}\n\n\tclima7Dias();\n\n\t// Funcion Clima 7 Days -------------------------\n}", "function realizarDevolucion(){\r\n let i = this.getAttribute(\"id\");\r\n i = i.charAt(1);\r\n let textoDevolucion = document.querySelector(`#devolucion${i}`).value;\r\n if(validarCampoLleno(textoDevolucion)){\r\n entregas[i].correccion = textoDevolucion;\r\n entregas[i].devolucion = true;\r\n generarTablaEntregasSinDevolucion();\r\n }else{\r\n document.querySelector(`#devolucion${i}`).value = \"Ingrese una devolución!\";\r\n }\r\n}", "function tratarDados() {\n\t\t\t\n\t\t\tif( final_pag ) {\n pagina_atual = 1;\n pagina_inc = 0;\n return false;\n }\n\n var campo_pesquisa = $('.btn-oc-filtro');\n var campo_pendencia = $('.filtro-pendencia');\n var campo_pendentes = $('.filtro-pendentes');\n var campo_autorizadas = $('.filtro-autorizadas');\n var campo_reprovadas = $('.filtro-reprovadas');\n var campo_mes_inicial = $('.filtro-mes-inicial');\n var campo_ano_inicial = $('.filtro-ano-inicial');\n var campo_mes_final = $('.filtro-mes-final');\n var campo_ano_final = $('.filtro-ano-final');\n\n var pesquisa = campo_pesquisa.val();\n var pendencia = campo_pendencia.is(\":checked\");\n var pendentes = campo_pendentes.is(\":checked\");\n var autorizadas = campo_autorizadas.is(\":checked\");\n var reprovadas = campo_reprovadas.is(\":checked\");\n var mes_inicial = campo_mes_inicial.val();\n var ano_inicial = campo_ano_inicial.val();\n var mes_final = campo_mes_final.val();\n var ano_final = campo_ano_final.val();\n var data_inicial = new Date(ano_inicial, mes_inicial-1,01);\n var data_final = lastDate(new Date(ano_final, mes_final-1,01));\n var data_1 = data_inicial.getFullYear()+'.'+(data_inicial.getMonth()+1)+'.'+data_inicial.getDate();\n var data_2 = data_final .getFullYear()+'.'+(data_final .getMonth()+1)+'.'+data_final .getDate();\n var dados;\n \n dados = {\n 'qtd_por_pagina': qtd_por_pag,\n 'pagina' : pagina_inc, \n 'filtro' : pesquisa,\n 'pendencia' : pendencia,\n 'pendentes' : pendentes,\n 'autorizadas' : autorizadas,\n 'reprovadas' : reprovadas,\n 'data_1' : data_1,\n 'data_2' : data_2 \n }; \n\n function success(data) {\t\t\t\t\t\t\n if(data) {\n var html = $('table.lista-obj tbody').html();\n $('table.lista-obj tbody').html(html + data);\n show();\n bootstrapInit();\n addEventBtn();\n\n } else {\n final_pag = true;\n }\n }\n function complete() {\n $('.btn-oc-filtrar').button('reset'); \n }\n $('.btn-oc-filtrar').button('loading');\n execAjax1('POST','/_13050/paginacaoScroll',dados,success,null,complete);\n }", "function actualizarFactura() {\n\n let fecha = document.getElementById(\"txtFecha\").value;\n let cdniCliente = document.getElementById(\"cboCliente\").value;\n let cplaVehiculo = document.getElementById(\"cboVehiculo\").value;\n\n let serie = document.getElementById(\"txtSerie\").value;\n let numero = document.getElementById(\"txtNumero\").value;\n\n let importe = document.getElementById(\"txtImporte\").value;\n\n let cliente = buscarCliente(cdniCliente);\n let vehiculo = buscarVehiculo(cplaVehiculo);\n\n for (const factura of baseFactura) {\n if (factura.numero === numero) {\n factura.fecha = fecha;\n factura.cliente=cliente;\n factura.vehiculo=vehiculo;\n factura.importe=importe;\n \n break;\n }\n }\n\n document.getElementById(\"tablaFactura\").innerHTML = \"<tr><th>Fecha</th><th>Serie</th><th>Numero</th><th>Cliente</th><th>Vehiculo</th><th>Importe</th><th>Acción</th></tr> \";\n\n for (const factura of baseFactura) {\n mostrarFacturaRegistrado(factura);\n }\n\n document.getElementById(\"txtSerie\").disabled = false;\n document.getElementById(\"txtNumero\").disabled = false;\n \n let btnRegistrar = document.getElementById(\"btnRegistrar\");\n btnRegistrar.value = \"Registrar\";\n\n registrarBaseFactura();\n}", "function datosTablaVigencia(val){\n var nombre = $(\"input[name ^= vigenciaNombre\"+val+\"]\").val(),\n paterno = $(\"input[name ^= vigenciaPaterno\"+val+\"]\").val(),\n materno = $(\"input[name ^= vigenciaMaterno\"+val+\"]\").val(),\n nacimiento = $(\"input[name ^= vigenciaNacimiento\"+val+\"]\").val(),\n curp = $(\"input[name ^= vigenciaCurp\"+val+\"]\").val(),\n agregado = $(\"input[name ^= vigenciaAgregado\"+val+\"]\").val(),\n vigencia = $(\"input[name ^= vigencia\"+val+\"]\").val(),\n delegacion = $(\"input[name ^= vigenciaDelegacion\"+val+\"]\").val(),\n umf = $(\"input[name ^= vigenciaUmf\"+val+\"]\").val(),\n sexo = $(\"input[name ^= vigenciaSexo\"+val+\"]\").val(),\n colonia = $(\"input[name ^= vigenciaColonia\"+val+\"]\").val(),\n direccion = $(\"input[name ^= vigenciaDireccion\"+val+\"]\").val(),\n /*Se cuenta el numero de caracteres de la direccion para tomar los ultimos 5 digitos correspondientes\n al codigo postal del paciente*/\n longituddireccion = direccion.length,\n cpostal = direccion.substring(longituddireccion-5,longituddireccion);\n if(sexo == \"F\"){\n sexo = \"MUJER\";\n }else if(sexo == \"M\"){\n sexo = \"HOMBRE\";\n }\n // Verifica la vigencia del usuario para indicar un estado de color verde si esta activo o rojo en caso contrario\n if(vigencia == \"NO\"){\n $(\"input[name = pia_vigencia]\").css('background-color', 'rgb(252, 155, 155)');\n }else if(vigencia == \"SI\"){\n $(\"input[name = pia_vigencia]\").css('background-color', 'rgb(144, 255, 149)');\n }\n //Se agrega los datos seleccionados del modal al formulario principal\n $(\"input[name = pum_nss_agregado]\").val(agregado);\n $(\"input[name = pia_vigencia]\").val(vigencia);\n $(\"input[name = pum_delegacion]\").val(delegacion);\n $(\"input[name = pum_umf]\").val(umf);\n $(\"input[name = triage_paciente_curp]\").val(curp);\n $(\"input[name = triage_nombre_ap]\").val(paterno);\n $(\"input[name = triage_nombre_am]\").val(materno);\n $(\"input[name = triage_nombre]\").val(nombre);\n $(\"input[name = triage_fecha_nac]\").val(nacimiento);\n $(\"select[name = triage_paciente_sexo]\").val(sexo);\n $(\"input[name = directorio_colonia]\").val(colonia);\n $(\"input[name = directorio_cp]\").val(cpostal);\n}", "function cargar(or) {\n //console.log(or);\n aguja = or;\n var orden = datosjson.filter(ordenpuntual); //filtra con la orden puntual \n console.log(orden);\n let est = document.getElementById('estado');\n let pro = document.getElementById('producto');\n let com = document.getElementById('comercio');\n let fal = document.getElementById('falla');\n let dom = document.getElementById('domicilio');\n let loc = document.getElementById('localidad');\n let tel = document.getElementById('telefono');\n let cor = document.getElementById('correo');\n let tik = document.getElementById('ticket');\n let rep = document.getElementById('rephasta');\n let asg = document.getElementById('aseg');\n\n if (orden[0].estado != null) {\n est.innerHTML = orden[0].estado;\n }\n pro.innerHTML = orden[0].producto + '-' + orden[0].marca + '-' + orden[0].marca + 'MOD ' + orden[0].modelo + '-SN:' + orden[0].serie;\n com.innerHTML = orden[0].compradoen;\n fal.innerHTML = orden[0].observaciones;\n dom.innerHTML = orden[0].domicilio;\n if (orden[0].localidad === null) {} else {\n loc.innerHTML = orden[0].localidad;\n }\n if (orden[0].telefono === null) {} else {\n tel.innerHTML = orden[0].telefono;\n }\n if (orden[0].selectseguro === null) {} else {\n asg.innerHTML = orden[0].selectseguro;\n }\n if (orden[0].selectseguro === null) {} else {\n asg.innerHTML = orden[0].selectseguro;\n }\n\n if (orden[0].repararhasta === null) {} else {\n rep.innerHTML = orden[0].repararhasta;\n }\n\n if (orden[0].email === null) {} else {\n cor.innerHTML = orden[0].email;\n }\n\n if (orden[0].ticket === null) {} else {\n cor.innerHTML = orden[0].ticket;\n }\n\n var historiaHTML = '<ul>';\n var notas = JSON.parse(orden[0].notas);\n\n for (n in notas) {\n\n historiaHTML += '<li>';\n historiaHTML += '<div class=\\\"hfecha\\\">' + notas[n].fecha + '</div>';\n historiaHTML += '<div class=\\\"hestado\\\">' + notas[n].nota + '</div>';\n historiaHTML += '<div class=\\\"hoperador\\\">' + notas[n].operador + '</div>';\n historiaHTML += '</li>';\n\n }\n\n historiaHTML += '</ul>';\n\n document.getElementById('historia').innerHTML = historiaHTML;\n //console.log(historiaHTML);\n\n var historiaHTML = '';\n\n\n\n\n\n\n modal('ver');\n\n}", "function inicializarCampos() {\r\n document.querySelector('#tipo').value = vehiculos[0].tipo;\r\n document.querySelector('#marca').value = vehiculos[0].marca;\r\n document.querySelector('#modelo').value = vehiculos[0].modelo;\r\n document.querySelector('#patente').value = vehiculos[0].patente;\r\n document.querySelector('#anio').value = vehiculos[0].anio;\r\n document.querySelector('#precio').value = vehiculos[0].precio;\r\n if (document.querySelector('#tipo').value == \"auto\") {\r\n document.querySelector('#capacidadBaul').value = vehiculos[0].capacidadBaul;\r\n }\r\n else if (document.querySelector('#tipo').value == \"camioneta\") {\r\n document.querySelector('#capacidadCarga').value = vehiculos[0].capacidadCarga;\r\n }\r\n}", "function inicial()\n { \n /*\n $(document).keydown( function(e){ \n if( e.which == 8 && ( document.activeElement.id == 'prueba') ){ \n e.preventDefault(); \n return false; \n } \n }); */ \n\n $('#datepicker').keypress(function(){ \n return false;\n }) ; \n $('#datepicker').keyup(function(){ \n return false;\n }) ; \n $('#datepicker').keydown(function(){ \n return false;\n }) ; \n \n $('#cant').val(\"1\"); \n $.ajax({\n url: $('#ruta1').val(),\n data: {id: $(\"#ordenid\").val(),\n },\n type: \"POST\",\n success: function(data){\n \n $.each(data, function(key, data) {\n \n $('#t').val(data.id); //id producto\n $('#cod').val(data.cod); //codigo producto \n $(\"#cant\").val(data.cant); //cantidad\n $(\"#precio\").val(data.precio); //precio \n $(\"#idInputSeleccionar\").val(data.desc); //descripcion\n agregarFila(document.getElementById('cant_campos'));\n \n });\n //alert('Se ha procesado la solicitud de manera correcta'); \n }\n });\n \n \n }", "function dataAjusteInv(){\n let rangodeFecha = $(\"#daterange-btn-Ajuste span\").html();\n console.log(\"Rango de Fecha:\",rangodeFecha);\n if(rangodeFecha==undefined || rangodeFecha==null){\n var FechDev1=moment().format('YYYY-MM-DD');\n var FechDev2=moment().format('YYYY-MM-DD');\n }else{\n\t let arrayFecha = rangodeFecha.split(\" \", 3);\n\t let f1=arrayFecha[0].split(\"-\");\n\t let f2=arrayFecha[2].split(\"-\");\n\n\t var FechDev1=f1[2].concat(\"-\").concat(f1[1]).concat(\"-\").concat(f1[0]); //armar la fecha año-mes-dia\n\n\t var FechDev2=f2[2].concat(\"-\").concat(f2[1]).concat(\"-\").concat(f2[0]);\n }\t \n \n //console.log(FechDev1, FechDev2);\n\n tablaAjusteInv=$('#datatableAI').dataTable(\n\t{\n\t\t\"aProcessing\": true,//Activamos el procesamiento del datatables\n\t \"aServerSide\": true,//Paginación y filtrado realizados por el servidor\n \"lengthMenu\": [ [10, 25, 50,100, -1], [10, 25, 50, 100, \"Todos\"] ],\n \"language\": {\n\t\t\"sProcessing\": \"Procesando...\",\n \"sLengthMenu\": \"Mostrar _MENU_ registros &nbsp\",\n \"sZeroRecords\": \"No se encontraron resultados\",\n \"sEmptyTable\": \"Ningún dato disponible en esta tabla\",\n \"sInfo\": \"Mostrar registros del _START_ al _END_ de un total de _TOTAL_\",\n\t\t\"sInfoFiltered\": \"(filtrado de un total de _MAX_ registros)\",\n\t\t\"sInfoPostFix\": \"\", \n \"sSearch\": \"Buscar:\",\n \"sInfoThousands\": \",\",\n \"sLoadingRecords\": \"Cargando...\",\n \"oPaginate\": {\n\t\t\"sFirst\": \"Primero\",\n\t\t\"sLast\": \"Último\",\n\t\t\"sNext\": \"Siguiente\",\n\t\t\"sPrevious\": \"Anterior\"}\n },\n\t\t\"oAria\": {\n\t\t\t\"sSortAscending\": \": Activar para ordenar la columna de manera ascendente\",\n\t\t\t\"sSortDescending\": \": Activar para ordenar la columna de manera descendente\"\n\t\t},\n dom: '<clear>Bfrtip',\n buttons: [\n {\n text: 'Copiar',\n extend: 'copy'\n },\n 'excelHtml5',\n 'csvHtml5',\n {\n extend: 'pdfHtml5',\n orientation: 'landscape',\n title: \"AdminLTE\",\n customize: function ( doc ) {\n pdfMake.createPdf(doc).open();\n },\n },\n \n {\n extend: 'print',\n text: 'Imprimir',\n className: 'btn btn-success btn-sm',\n autoPrint: false //TRUE para abrir la impresora\n }\n ],\n initComplete: function () {\n var btns = $('.dt-button');\n btns.removeClass('dt-button');\n btns.addClass('btn btn-success btn-sm');\n },\n\t\t\"ajax\":\n\t\t\t\t{\n url: 'ajax/ajusteinventario.ajax.php?op=listar',\n data: {\"FechDev1\": FechDev1, \"FechDev2\": FechDev2}, \n\t\t\t\t\ttype : \"POST\",\n\t\t\t\t\tdataType : \"json\",\t\t\t\t\t\t\n\t\t\t\t\terror: function(e){\n\t\t\t\t\t\tconsole.log(e.responseText);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\"bDestroy\": true,\n\t\t\"iDisplayLength\": 10,//Paginación\n\t \"order\": [[ 0, \"desc\" ]]//Ordenar (columna,orden)\n\t}).DataTable(); \n \n}", "function obtener_datos_por_establecimiento() {\n var lista = conexion_resultados();\n //var promedios = conexion_resultados_promedio_por_fecha();\n var contenido = \"\";\n var fecha = \"\";\n\n //removemos los datos previos de la tabla\n\n //checamos si la tabla tiene datos\n if (lista.length > 0) {\n $(\".celda_tabla_res\").remove();\n $.each(lista, function (index, item) {\n\n //obtenemos el nombre de usuario por medio de una consulta\n //var nombre_cuest = nombres_cuestionarios_por_folio(item.zona);\n var cuestionario = resultados_cuestionario_por_dia(item.fecha, item.id_cuestionario);\n\n if (index == 0) {\n fecha = item.fecha;\n // console.log(fecha + \">\");\n //creamos el contenido\n contenido = \" <tr class='celda_tabla_res fecha'> <td id='indice'colspan='6' > \" + nombre_fecha(fecha) + \"<td></tr><tr class='celda_tabla_res'> <th>#</th><th>CUESTIONARIO</th> <th>LIMPIEZA %</th> <th>SURTIDO % </th> <th>IMAGEN %</th> <th>APLICADOR</th> </tr>\"\n // $(\"#tabla_res\").append(contenido);\n }//fin if\n if (fecha == item.fecha) {\n\n //creamos el contenido\n contenido += \" <tr class='celda_tabla_res dato' onclick='llenar_modal_cuestionarios(\\\"\" + item.fecha + \"\\\",\" + item.id_cuestionario + \")'> <td id='indice'>\" + item.id_cuestionario + \"</td><td class='nombre' >\" + cuestionario.cuestionario + \"</td> <td id='zona_lim' >\" + cuestionario.limpieza + \"</td> <td id='zona_surt' >\" + cuestionario.surtido + \"</td> <td id='zona_imag' >\" + cuestionario.imagen + \"</td> <td id='zona_aplicador'>\" + item.aplicador + \"</td> </tr>\";\n //$(\"#tabla_res\").append(contenido);\n //llenamos los datos de pie\n }//fin if\n else if (fecha != item.fecha) {\n\n //$(\"#tabla_res\").append(contenido);\n\n var promedio = conexion_resultados_promedio_por_fecha(fecha);\n\n // console.log(promedios[contador_fecha].fecha + \":\" + promedios[contador_fecha].aspecto+\":\"+promedios[contador_fecha].aspecto);\n fecha = item.fecha;\n //creamos el contenido\n contenido += \" <tr class='celda_tabla_res'><th colspan='2'>Total:</th> <th>\" + promedio.limpieza + \"</th> <th>\" + promedio.surtido + \"</th> <th>\" + promedio.imagen + \"</th><th>\" + promedio.total + \"</th> </tr><tr class='celda_tabla_res fecha'> <td id='indice'colspan='6' > \" + nombre_fecha(fecha) + \"<td> <tr class='celda_tabla_res'> <th>#</th><th>CUESTIONARIO</th> <th>LIMPIEZA %</th> <th>SURTIDO %</th> <th>IMAGEN %</th> <th>APLICADOR</th> </tr> </tr><tr class='celda_tabla_res dato' onclick='llenar_modal_cuestionarios(\\\"\" + item.fecha + \"\\\",\" + item.id_cuestionario + \")' > <td id='indice'>\" + item.id_cuestionario + \"</td><td class='nombre' >\" + cuestionario.cuestionario + \"</td> <td id='zona_lim' >\" + cuestionario.limpieza + \"</td> <td id='zona_surt' >\" + cuestionario.surtido + \"</td> <td id='zona_imag' >\" + cuestionario.imagen + \"</td> <td id='zona_aplicador'>\" + item.aplicador + \"</td> <</tr>\"\n // $(\"#tabla_res\").append(contenido);\n \n }//fin if\n\n });\n var promedio = conexion_resultados_promedio_por_fecha(fecha);\n contenido += \" <tr class='celda_tabla_res'><th colspan='2'>Total:</th> <th>\" + promedio.limpieza + \"</th> <th>\" + promedio.surtido + \"</th> <th>\" + promedio.imagen + \"</th><th>\" + promedio.total + \"</th></tr>\"\n $(\"#tabla_res\").append(contenido);\n //ajustamos los decimales de total \n // total_limpieza = r(total_limpieza) ;\n //total_limpieza = Math.round(total_limpieza);\n //total_limpieza = total_limpieza / 100;\n var totales = conexion_resultados_ckl_total_por_fechas_establecimiento();\n //console.log(r(total_limpieza / contador) + \":\" + r(total_surtido / contador) + \":\" + r(total_imagen / contador));\n $(\"#total_limpieza\").val(totales.limpieza), $(\"#total_surtido\").val(totales.surtido), $(\"#total_imagen\").val(totales.imagen);\n var res = (total_limpieza + total_surtido + total_imagen);\n //console.log(res);\n $(\"#total_neto\").val(totales.total);\n\n }//fin\n //si no hay datos manda una advertencia\n else {\n alert(\"No Hay Datos...\");\n }\n\n}//fin", "function validarDatos(tipoautomata,entrada,alfabeto,inicial,final){\n var strAlert = `!! Error ¡¡\\nNo puedes ingresar una ',' (coma) al final del input.\\nDebes finalizar la entrada con el ultimo dato.`,\n strAlertAll = `!! Error ¡¡\\nPuede que hayas ingresado una palabra no valida en alguno de los input.\\nPrueba reingresando los datos.`;\n if(tipoautomata === 'AFND'){\n for(let i=0; i<inicial.length; i++){\n let existeInicial = entrada.indexOf(inicial[i]);\n if(existeInicial == -1){\n alert(`!! Error ¡¡\\nEl estado incial ' ${inicial[i]} ' no se encuentra presente en los estados ingresados.\\nPor favor ingrese un estado inicial valido.`);\n return false;\n }\n if(inicial[i]===\"\"){ \n alert(strAlert); \n return false;\n }\n if(inicial[i] == 'null' || inicial[i] == 'undefined'){ \n alert(strAlertAll); \n return false;\n }\n }\n }else{\n for(let i=0; i<inicial.length; i++){\n let existeInicial = entrada.indexOf(inicial[i]);\n if(inicial.length>1){\n alert(`!! Error ¡¡\\nSolo puedes poner un estado inicial.`); \n return false;\n }\n if(existeInicial == -1){\n alert(`!! Error ¡¡\\nEl estado incial ' ${inicial[i]} ' no se encuentra presente en los estados ingresados.\\nPor favor ingrese un estado inicial valido.`);\n return false;\n }\n if(inicial[i]===\"\"){ \n alert(strAlert); \n return false;\n }\n if(inicial[i] == 'null' || inicial[i] == 'undefined'){ \n alert(strAlertAll); \n return false;\n }\n }\n }\n for(let m=0; m<entrada.length; m++){\n if(entrada[m]===\"\"){ \n alert(strAlert); \n return false;\n }\n if(entrada[m] == 'null' || entrada[m] == 'undefined'){ \n alert(strAlertAll); \n return false;\n }\n }\n for(let m=0; m<alfabeto.length; m++){\n if(alfabeto[m]===\"\"){ \n alert(strAlert); \n return false;\n }\n if(alfabeto[m] == 'null' || alfabeto[m] == 'undefined'){ \n alert(strAlertAll); \n return false;\n }\n }\n for(let j=0; j<final.length; j++){\n var existeFinal = entrada.indexOf(final[j]);\n if(existeFinal == -1){\n alert(`!! Error ¡¡\\nEl estado incial ' ${final[j]} ' no se encuentra presente en los estados ingresados.\\nPor favor ingrese un estado final valido.`);\n return false;\n }\n if(final[j]===\"\"){ \n alert(strAlert); \n return false;}\n if(final[j] == 'null' || final[j] == 'undefined'){ \n alert(strAlertAll); \n return false;\n }\n } \n}", "function agregarFilaPrescripcion(arrayPrescripcion, categoria_safe){\n var arrayLongitud = arrayPrescripcion.length - 1;\n var tipo_medicamento = \"\";\n if(arrayPrescripcion[arrayLongitud][\"safe\"] == \"npt\"){\n tipo_medicamento = \"_npt\";\n }else if(arrayPrescripcion[arrayLongitud][\"safe\"] == \"oncologico\" || arrayPrescripcion[arrayLongitud][\"safe\"] == \"antimicrobiano\"){\n tipo_medicamento = \"_onco_antimicro\";\n }\n\n var fila =\"<tr id='fila\"+arrayLongitud+\"' >\"+\n \"<td hidden ><input name=idMedicamento\"+tipo_medicamento+\"[] size='1' class='label-input' value='\"+arrayPrescripcion[arrayLongitud][\"idMedicamento\"]+\"' /></td>\"+\n \"<td><input readonly name='nomMedicamento[]' size='8' class='label-input' value='\"+arrayPrescripcion[arrayLongitud][\"medicamento\"]+\"' /></td>\"+\n \"<td>\"+arrayPrescripcion[arrayLongitud][\"categoria_farmacologica\"]+\"</td>\"+\n \"<td><input readonly name='dosis[]' size='8' class='label-input' value='\"+arrayPrescripcion[arrayLongitud][\"dosis\"]+\" \"+arrayPrescripcion[arrayLongitud][\"unidad\"]+\"' /></td>\"+\n \"<td><input readonly name='via_admi[]' size='8' class='label-input' value='\"+arrayPrescripcion[arrayLongitud][\"via\"]+\"' /></td>\"+\n \"<td><input readonly name='frecuencia[]' size='4' class='label-input' value='\"+arrayPrescripcion[arrayLongitud][\"frecuencia\"]+\"' /></td>\"+\n \"<td><input readonly name='horaAplicacion[]' size='22' class='label-input' value='\"+arrayPrescripcion[arrayLongitud][\"horaAplicacion\"]+\"' /></td>\"+\n \"<td><input readonly name='fechaInicio[]' size='8' class='label-input' value='\"+arrayPrescripcion[arrayLongitud][\"fechaInicio\"]+\"' /></td>\"+\n \"<td><input readonly name='duracion[]' size='1' class='label-input' value='\"+arrayPrescripcion[arrayLongitud][\"duracion\"]+\"' /></td>\"+\n \"<td><input readonly name='periodo[]' size='1' class='label-input' value='\"+arrayPrescripcion[arrayLongitud][\"periodo\"]+\"' /></td>\"+\n \"<td><input readonly name='fechaFin[]' size='8' class='label-input' value='\"+arrayPrescripcion[arrayLongitud][\"fechaFin\"]+\"' /></td>\"+\n \"<td>\"+\n //\"<a href='#'><i class='fa fa-pencil icono-accion' onclick=TomarDatosTablaPrescripcion(\"+arrayLongitud+\") ></i></a>\"+\n \"<a href='#'> <i class='glyphicon glyphicon-remove icono-accion' onclick=EliminarFilaPrescripcion(\"+arrayLongitud+\") ></i> </a>\"+\n \"<a href='#'> <i class='glyphicon glyphicon-eye-open icono-accion' onclick=MostrarOcularObservacion(\"+arrayLongitud+\") ></i> </a>\"+\n \"</td>\"+\n \"</tr>\"+\n \"<tr hidden class='fila\"+arrayLongitud+\"Observacion'>\"+\n \"<td style='text-align: left; background-color:rgb(171, 171, 171);' ><strong>Observación: </strong></td>\"+\n \"<td colspan='10' style='background-color:rgb(228, 228, 228); ' ><input hidden style='text-align: left;' class='fila\"+arrayLongitud+\"Val' value='0' />\"+\n \"<input readonly name='observacion[]' style='text-align: left;' class='label-input' value='\"+arrayPrescripcion[arrayLongitud][\"observacion\"]+\"' />\"+\n \"</td>\"+\n \"</tr>\"+\n \"\";\n\n var fila_npt = \"\",\n fila_onco_antimicro = \"\",\n filas_medicamentos = \"\";\n\n if(arrayPrescripcion[arrayLongitud][\"safe\"] == \"npt\"){\n\n fila_npt = \"\"+\n\n \"<tr hidden class='fila\"+arrayLongitud+\"Observacion'><td colspan='11' ><strong>RECETA:NPT OVERFILL: 20 / Vol. TOTAL: \"+arrayPrescripcion[arrayLongitud][\"antibiotico\"][\"total_npt\"]+\" <input hidden readonly class='label-input' name=total_npt[] value='\"+arrayPrescripcion[arrayLongitud][\"antibiotico\"][\"total_npt\"]+\"' /> </strong></td></tr>\"+\n \"<tr hidden class='fila\"+arrayLongitud+\"Observacion'><td colspan='11' ><strong>SOLUCIÓN BASE</strong></td></tr>\"+\n \"<tr hidden style='background-color:rgb(228, 228, 228); ' class='fila\"+arrayLongitud+\"Observacion'>\"+//Iformacion NPT\n \"<td colspan='2' hidden><input readonly class='label-input' name='categoria_safe[]' value='\"+arrayPrescripcion[arrayLongitud][\"safe\"]+\"' /></td>\"+\n \"<td colspan='1'>Aminoacido</td>\"+\n \"<td colspan='3'>Dextrosa</td>\"+\n \"<td colspan='3'>Lipidos intravenosos</td>\"+\n \"<td colspan='4'>Agua inyectable</td>\"+\n \"</tr>\"+\n \"<tr hidden style='background-color:rgb(228, 228, 228); ' class='fila\"+arrayLongitud+\"Observacion'>\"+\n \"<td colspan='1'>\"+\n arrayPrescripcion[arrayLongitud][\"antibiotico\"][\"aminoacido\"]+\" ml\"+\n \"<input hidden readonly class='label-input' name='aminoacido[]' value='\"+arrayPrescripcion[arrayLongitud][\"antibiotico\"][\"aminoacido\"]+\"' />\"+\n \"</td>\"+\n \"<td colspan='3'>\"+\n arrayPrescripcion[arrayLongitud][\"antibiotico\"][\"dextrosa\"]+\" ml\"+\n \"<input hidden readonly class='label-input' name='dextrosa[]' value='\"+arrayPrescripcion[arrayLongitud][\"antibiotico\"][\"dextrosa\"]+\"' /> \"+\n \"</td>\"+\n \"<td colspan='3'>\"+\n arrayPrescripcion[arrayLongitud][\"antibiotico\"][\"lipidos_intravenosos\"]+\" ml\"+\n \"<input hidden readonly class='label-input' name='lipidos_intravenosos[]' value='\"+arrayPrescripcion[arrayLongitud][\"antibiotico\"][\"lipidos_intravenosos\"]+\"' /> \"+\n \"</td>\"+\n \"<td colspan='4'>\"+\n arrayPrescripcion[arrayLongitud][\"antibiotico\"][\"agua_inyectable\"]+\" ml\"+\n \"<input hidden readonly class='label-input' name='agua_inyectable[]' value='\"+arrayPrescripcion[arrayLongitud][\"antibiotico\"][\"agua_inyectable\"]+\"' /> \"+\n \"</td>\"+\n \"</tr>\"+\n \"<tr hidden class='fila\"+arrayLongitud+\"Observacion'><td colspan='10' ><strong>SALES</strong></td></tr>\"+\n \"<tr hidden style='background-color:rgb(228, 228, 228); ' class='fila\"+arrayLongitud+\"Observacion'>\"+//Iformacion NPT\n \"<td colspan='1'>Cloruro sodio</td>\"+\n \"<td colspan='2'>Sulfato magnesio</td>\"+\n \"<td colspan='3'>Cloruro potasio</td>\"+\n \"<td colspan='2'>Fosfato potasio</td>\"+\n \"<td colspan='3'>Gluconato calcio</td>\"+\n \"</tr>\"+\n \"<tr hidden style='background-color:rgb(228, 228, 228); ' class='fila\"+arrayLongitud+\"Observacion'>\"+\n \"<td colspan='1'><input readonly class='label-input' name='cloruro_sodio[]' value='\"+arrayPrescripcion[arrayLongitud][\"antibiotico\"][\"cloruro_sodio\"]+\"' /> </td>\"+\n \"<td colspan='2'>\"+\n arrayPrescripcion[arrayLongitud][\"antibiotico\"][\"sulfato_magnesio\"]+\" ml\"+\n \"<input hidden readonly class='label-input' name='sulfato_magnesio[]' value='\"+arrayPrescripcion[arrayLongitud][\"antibiotico\"][\"sulfato_magnesio\"]+\"' /> \"+\n \"</td>\"+\n \"<td colspan='3'>\"+\n arrayPrescripcion[arrayLongitud][\"antibiotico\"][\"cloruro_potasio\"]+\" ml\"+\n \"<input hidden readonly class='label-input' name='cloruro_potasio[]' value='\"+arrayPrescripcion[arrayLongitud][\"antibiotico\"][\"cloruro_potasio\"]+\"' /> \"+\n \"</td>\"+\n \"<td colspan='2'>\"+\n arrayPrescripcion[arrayLongitud][\"antibiotico\"][\"fosfato_potasio\"]+\" ml\"+\n \"<input hidden readonly class='label-input' name='fosfato_potasio[]' value='\"+arrayPrescripcion[arrayLongitud][\"antibiotico\"][\"fosfato_potasio\"]+\"' /> \"+\n \"</td>\"+\n \"<td colspan='3'>\"+\n arrayPrescripcion[arrayLongitud][\"antibiotico\"][\"gluconato_calcio\"]+\" ml\"+\n \"<input hidden readonly class='label-input' name='gluconato_calcio[]' value='\"+arrayPrescripcion[arrayLongitud][\"antibiotico\"][\"gluconato_calcio\"]+\"' /> \"+\n \"</td>\"+\n \"</tr>\"+\n \"<tr hidden class='fila\"+arrayLongitud+\"Observacion'><td colspan='10' ><strong>ADITIVOS</strong></td></tr>\"+\n \"<tr hidden style='background-color:rgb(228, 228, 228); ' class='fila\"+arrayLongitud+\"Observacion'>\"+//Iformacion NPT\n \"<td colspan='1'>Insulina humana</td>\"+\n \"<td colspan='1'>Heparina</td>\"+\n \"<td colspan='1'>MVI</td>\"+\n \"<td colspan='2'>zinc</td>\"+\n \"<td colspan='2'>Albumina</td>\"+\n \"<td colspan='2'>Oligoelementos</td>\"+\n \"<td colspan='2'>vitamina C</td>\"+\n \"</tr>\"+\n \"<tr hidden style='background-color:rgb(228, 228, 228); ' class='fila\"+arrayLongitud+\"Observacion'>\"+\n \"<td colspan='1'>\"+\n arrayPrescripcion[arrayLongitud][\"antibiotico\"][\"insulina_humana\"]+\" ml\"+\n \"<input hidden readonly class='label-input' name='insulina_humana[]' value='\"+arrayPrescripcion[arrayLongitud][\"antibiotico\"][\"insulina_humana\"]+\"' /> \"+\n \"</td>\"+\n \"<td colspan='1'>\"+\n arrayPrescripcion[arrayLongitud][\"antibiotico\"][\"heparina\"]+\" ml\"+\n \"<input hidden readonly class='label-input' name='heparina[]' value='\"+arrayPrescripcion[arrayLongitud][\"antibiotico\"][\"heparina\"]+\"' /> \"+\n \"</td>\"+\n \"<td colspan='1'>\"+\n arrayPrescripcion[arrayLongitud][\"antibiotico\"][\"mvi_adulto\"]+\" ml\"+\n \"<input hidden readonly class='label-input' name='mvi_adulto[]' value='\"+arrayPrescripcion[arrayLongitud][\"antibiotico\"][\"mvi_adulto\"]+\"' /> \"+\n \"</td>\"+\n \"<td colspan='2'>\"+\n arrayPrescripcion[arrayLongitud][\"antibiotico\"][\"zinc\"]+\" ml\"+\n \"<input hidden readonly class='label-input' name='zinc[]' value='\"+arrayPrescripcion[arrayLongitud][\"antibiotico\"][\"zinc\"]+\"' /> \"+\n \"</td>\"+\n \"<td colspan='2'>\"+\n\n arrayPrescripcion[arrayLongitud][\"antibiotico\"][\"albumina\"]+\" ml\"+\n \"<input hidden readonly class='label-input' name='albumina[]' value='\"+arrayPrescripcion[arrayLongitud][\"antibiotico\"][\"albumina\"]+\"' /> \"+\n \"</td>\"+\n \"<td colspan='2'>\"+\n arrayPrescripcion[arrayLongitud][\"antibiotico\"][\"oligoelementos\"]+\" ml\"+\n \"<input hidden readonly class='label-input' name='oligoelementos[]' value='\"+arrayPrescripcion[arrayLongitud][\"antibiotico\"][\"oligoelementos\"]+\"' /> \"+\n \"</td>\"+\n \"<td colspan='2'>\"+\n arrayPrescripcion[arrayLongitud][\"antibiotico\"][\"vitamina\"]+\" ml\"+\n \"<input hidden readonly class='label-input' name='vitamina[]' value='\"+arrayPrescripcion[arrayLongitud][\"antibiotico\"][\"vitamina\"]+\"' /> \"+\n \"</td>\"+\n \"</tr>\"+\n \"\";\n\n filas_medicamentos = fila + fila_npt;\n\n }else if(arrayPrescripcion[arrayLongitud][\"safe\"] == \"antimicrobiano\" || arrayPrescripcion[arrayLongitud][\"safe\"] == \"oncologico\"){\n\n fila_onco_antimicro =\n \"\"+\n \"<tr hidden class='fila\"+arrayLongitud+\"Observacion'>\"+\n \"<td colspan='11'><strong>RECETA: \"+arrayPrescripcion[arrayLongitud][\"safe\"].toUpperCase()+\"</strong>\"+\n \"<input hidden readonly name='tipo_antibiotico' value='\"+arrayPrescripcion[arrayLongitud][\"safe\"].toUpperCase()+\"' />\"+\n \"</td>\"+\n \"<td colspan='2' hidden><input readonly class='label-input' name='categoria_safe[]' value='\"+arrayPrescripcion[arrayLongitud][\"safe\"]+\"' /></td>\"+\n \"</tr>\"+\n \"<tr hidden class='fila\"+arrayLongitud+\"Observacion' style='background-color:rgb(171, 171, 171); '>\"+\n \"<td colspan='6'><strong>Diluyente</strong></td>\"+\n \"<td colspan='5'><strong>Vol. Diluyente</strong></td>\"+\n \"</tr>\"+\n \"<tr hidden class='fila\"+arrayLongitud+\"Observacion' style='background-color:rgb(228, 228, 228);' > \"+\n \"<td colspan='6'>\"+\n \"<input name='diluyente[]' class='label-input' value='\"+arrayPrescripcion[arrayLongitud][\"antibiotico\"][\"diluyente\"]+\"' />\"+\n \"</td>\"+\n \"<td colspan='5'>\"+\n arrayPrescripcion[arrayLongitud][\"antibiotico\"][\"vol_diluyente\"]+\" ml\"+\n \"<input hidden name='vol_diluyente[]' class='label-input' value='\"+arrayPrescripcion[arrayLongitud][\"antibiotico\"][\"vol_diluyente\"]+\"' />\"+\n \"</td>\"+\n \"</tr>\"+\n \"\";\n filas_medicamentos = fila + fila_onco_antimicro;\n }else{\n filas_medicamentos = fila;\n }\n\n $('#tablaPrescripcion').append(filas_medicamentos);\n limpiarFormularioPrescripcion();\n}", "function generarTexto(datos) {\n\n\n var texto=[];\n // texto.push(datos.tipoRegistro);\n texto.push(datos.claveServicio);\n texto.push(datos.emisora); \n texto.push(datos.txtfecha);\n texto.push(datos.consecutivo);\n texto.push(datos.check);\n texto.push(datos.totalformt);\n texto.push(datos.naenviadas);\n texto.push(datos.iaenviadas);\n texto.push(datos.nbenviadas);\n texto.push(datos.ibenviadas);\n texto.push(datos.cuentaverif);\n texto.push(datos.tipopago);\n texto.push(datos.espacios);\n texto.push(datos.fechafin);\n texto.push(datos.cuentacargo);\n texto.push(datos.filler); \n\n var yx=\"\";\n var table = $(\"#tablanueva\").DataTable();\n var data1 = table.rows('.selected').data().toArray(); \n for (var i = 0 ; i< data1.length; i++){\n\n texto.push('\\n');\n texto.push(datos.tiporegistro);\n texto.push(datos.txtfecha); \n texto.push( returnFormat(data1[i][1],10));\n texto.push(datos.refeServi);\n texto.push(datos.refeLeyeOr);\n yx=replaceAll( data1[i][4] , \".\", \"\" );\n texto.push(returnFormat(yx,15)); \n texto.push(data1[i][5]);\n texto.push(returnFormat(data1[i][6] ,2));\n texto.push(data1[i][7]);\n texto.push(datos.tipMovim);\n texto.push(datos.accion);\n texto.push(datos.importIva);\n texto.push(datos.fillerdos);\n\n }\n // Agregamos nuestro valor al arreglo\n return new Blob(texto, {\n type: 'text/plain'\n });\n }", "function mostrarEstAlumnosParaDocente(){\r\n let contadorEjXNivel = 0;//variable para contar cuantos ejercicios planteo el docente para el nivel del alumno\r\n let contadorEntXNivel = 0;//variable para contar cuantos ejercicios de su nivel entrego el alumno\r\n let alumnoSeleccionado = document.querySelector(\"#selEstAlumnos\").value;\r\n let posicionUsuario = alumnoSeleccionado.charAt(1);\r\n let usuario = usuarios[posicionUsuario];\r\n let nivelAlumno = usuario.nivel;\r\n for (let i = 0; i < ejercicios.length; i++){\r\n const element = ejercicios[i].Docente.nombreUsuario;\r\n if(element === usuarioLoggeado){\r\n if(ejercicios[i].nivel === nivelAlumno){\r\n contadorEjXNivel ++;\r\n }\r\n }\r\n }\r\n for (let i = 0; i < entregas.length; i++) {\r\n const element = entregas[i].Alumno.nombreUsuario;\r\n if(element === usuario.nombreUsuario){\r\n if(entregas[i].Ejercicio.nivel === nivelAlumno){\r\n contadorEntXNivel++;\r\n }\r\n }\r\n }\r\n document.querySelector(\"#pMostrarEstAlumnos\").innerHTML = `El alumno ${usuario.nombre} tiene ${contadorEjXNivel} ejercicios planteados para su nivel (${nivelAlumno}) sobre los cuales a realizado ${contadorEntXNivel} entrega/s. `;\r\n}", "function consultaAperturaYCorteDelDia(fecha){\n // debugger;\n \t\tvar datos = {\n \t\t\t\tfecha : fecha,\n \t\t }\n \t\t$.ajax({\n url: base_url+'Cajero/CorteCaja/consultarApertura',\n type: \"post\",\n dataType: \"json\",\n \t\t\tdata : (datos),\n \t\t\tsuccess : function(response){\n $(\"#tbl_consultaCortesDelDia\").DataTable({\n data: response,\n responsive: true,\n columns: [\n {\n data: \"monto\",\n \"className\": \"text-center\",\n // \"visible\": false, // ocultar la columna\n render: function(data, type, row, meta) {\n var hayApertura = `${row.monto}`;\n var idApertura = `${row.id_apertura}`;\n if (hayApertura == 'null'){\n var a = '<div text-white\">'+'No hay apertura'+'</div>';\n $(\"#id_ventas\").val(\"No hay apertura\");\n }else {\n $(\"#id_apertura\").val(idApertura);\n $(\"#monto_apertura\").val(hayApertura);\n var a = '<div text-white\">'+hayApertura+'</div>';\n }\n return a;\n },\n },\n {\n data: \"monto_entregado\",\n \"className\": \"text-center\",\n },\n {\n data: \"gastos\",\n \"className\": \"text-center\",\n },\n {\n data: \"ventas\",\n // \"visible\": false, // ocultar la columna\n },\n {\n data: \"diferencia\",\n \"className\": \"text-center\",\n },\n {\n data: \"fecha\",\n \"className\": \"text-center\",\n },\n {\n data: \"usuario\",\n \"className\": \"text-center\",\n },\n\n ],\n \"language\" : language_espaniol,\n });\n \t\t\t }\n \t\t});\n }", "function accion() {\n var datos = new Array();\n // document.getElementById(\"oculto\").removeAttribute(\"hidden\")\n\t\n\tlet peticion=new XMLHttpRequest();\n peticion.onreadystatechange=function(){\n if(this.readyState==4){\n\t\t\tdatos=JSON.parse(this.responseText);\n\t\t\tdocument.getElementById(\"id_tipo\").value=datos[\"id_tipo\"];\n\t\t\tdocument.getElementById('nombre').value=datos[\"nombre\"];\n\t\t\tdocument.getElementById(\"nuevo\").innerText=\"Modificando una tipo de la tabla\"\n\t\n \n }};\n peticion.open('GET', url_server+'obtenerRegistro/'+this.value);\n\tpeticion.send();\n\tbtn= document.getElementById('guardarTipo')\n btn.removeAttribute(\"value\")\n\tbtn.setAttribute(\"value\", \"Modificar\")\n \n}", "function mgrilla_item_obtener_datos_01(){\n\ttblregistro_vista_data = $(\"#grdregistro_vista_data\").dataTable({\n\t\t\"aProcessing\": true,\n\t\t\"aServerSide\": true,\n\t\tdom: \"Bfrtip\",\n\t\t\"searching\": true,\n\t\tlengthChange: false,\n\t\tcolReorder: true,\n\t\tbuttons: [\t\n\t\t\t\"copyHtml5\",\n\t\t\t\"excelHtml5\",\n\t\t\t\"csvHtml5\",\n\t\t\t{\n\t\t\t\textend: \"pdfHtml5\",\n\t\t\t\torientation: \"landscape\",\n\t\t\t\tdownload: \"open\",\n\t\t\t\tpageSize: \"A4\",\n\t\t\t\ttext: \"PDF\"\n\t\t\t},\n\t\t\t\"colvis\"\n\t\t],\n\t\t\"ajax\":{\n\t\t\turl: \"../../controller/arc_producto.php?caso=ctrl_obtener_vista_00\",\n\t\t\ttype : \"post\",\n\t\t\tdataType : \"json\",\n\t\t\terror: function(e){\n\t\t\t\tconsole.log(e.responseText);\n\t\t\t}\n\t\t},\n\t\t\"bDestroy\": true,\n\t\t\"responsive\": true,\n\t\t\"bInfo\":true,\n\t\t\"iDisplayLength\": 10,\n\t\t\"language\": { \"url\": \"//cdn.datatables.net/plug-ins/1.10.21/i18n/Spanish.json\" }\n\t}).DataTable();\n}", "function carregarDadosEscola(fk_escola){\n\n //Busca dos dados da escola \n var xhr = new XMLHttpRequest(); \n\n xhr.open(\"GET\", \"http://localhost:8080/escolas/\"+fk_escola);\n\n xhr.addEventListener(\"load\", function(){\n var resposta = xhr.responseText; \n dadosEscola = JSON.parse(resposta);\n\n //Pega o nome da escola \n document.getElementById('idEditEscola').value = dadosEscola.nome;\n\n //Pega a data de inicio do ano letivo \n var dataInicio = dadosEscola.dataInicioLetivo;\n if(dataInicio != null){\n var data = new Date(dataInicio);\n var dataInicioLetivo = dataFormatada1(data);\n document.getElementById('idInicioAnoLetivo').value = dataInicioLetivo;\n }\n\n //Pega a data de fim do ano letivo \n var dataFinal = dadosEscola.dataFinalLetivo;\n if(dataFinal != null){\n var data = new Date(dataFinal);\n var dataFinalLetivo = dataFormatada1(data);\n document.getElementById('idFinalAnoLetivo').value = dataFinalLetivo;\n }\n })\n\n xhr.send();\n}", "function campos_fecha(tabla)\n{\n\tswitch(tabla)\n\t\t\t\t{\n\t\t\t\tcase \"facturacion\":\n\t\t\t\t\t{\n\t\t\t\t\t\tCalendar.setup({\n \t\t\tinputField : 'finicio', // id of the input field\n \t\t\tifFormat : '%d-%m-%Y', // format of the input field\n \t\t\tshowsTime : true, // will display a time selector\n \t\t\tbutton : 'f_trigger_finicio', // trigger for the calendar (button ID)\n \t\t\tsingleClick : false, // double-click mode\n \t\t\tstep : 1 // show all years in drop-down boxes (instead of every other year as default)\n\t\t\t\t\t})\n\t\t\t\t\t\tCalendar.setup({\n \t\t\tinputField : 'duracion', // id of the input field\n \t\t\tifFormat : '%d-%m-%Y', // format of the input field\n \t\t\tshowsTime : true, // will display a time selector\n \t\t\tbutton : 'f_trigger_duracion', // trigger for the calendar (button ID)\n \t\t\tsingleClick : false, // double-click mode\n \t\t\tstep : 1 // show all years in drop-down boxes (instead of every other year as default)\n\t\t\t\t\t})\n\t\t\t\t\t\tCalendar.setup({\n \t\t\tinputField : 'renovacion', // id of the input field\n \t\t\tifFormat : '%d-%m-%Y', // format of the input field\n \t\t\tshowsTime : true, // will display a time selector\n \t\t\tbutton : 'f_trigger_renovacion', // trigger for the calendar (button ID)\n \t\t\tsingleClick : false, // double-click mode\n \t\t\tstep : 1 // show all years in drop-down boxes (instead of every other year as default)\n\t\t\t\t\t})\n\t\t\t\t\t\n\t\t\t\t\t}break\n\t\t\t\t\tcase \"pcentral\":\n\t\t\t\t\t{\n\t\t\t\t\t\tCalendar.setup({\n \t\t\tinputField : 'cumple', // id of the input field\n \t\t\tifFormat : '%d-%m-%Y', // format of the input field\n \t\t\tshowsTime : true, // will display a time selector\n \t\t\tbutton : 'f_trigger_cumple', // trigger for the calendar (button ID)\n \t\t\tsingleClick : false, // double-click mode\n \t\t\tstep : 1 // show all years in drop-down boxes (instead of every other year as default)\n\t\t\t\t\t})\n\t\t\t\t\t}break\n\t\t\t\t\tcase \"pempresa\":\n\t\t\t\t\t{\n\t\t\t\t\t\tCalendar.setup({\n \t\t\tinputField : 'cumple', // id of the input field\n \t\t\tifFormat : '%d-%m-%Y', // format of the input field\n \t\t\tshowsTime : true, // will display a time selector\n \t\t\tbutton : 'f_trigger_cumple', // trigger for the calendar (button ID)\n \t\t\tsingleClick : false, // double-click mode\n \t\t\tstep : 1 // show all years in drop-down boxes (instead of every other year as default)\n\t\t\t\t\t})\n\t\t\t\t\t}break\n\t\t\t\t\tcase \"z_facturacion\":\n\t\t\t\t\t{\n\t\t\t\t\t\tCalendar.setup({\n \t\t\tinputField : 'finicio', // id of the input field\n \t\t\tifFormat : '%d-%m-%Y', // format of the input field\n \t\t\tshowsTime : true, // will display a time selector\n \t\t\tbutton : 'f_trigger_finicio', // trigger for the calendar (button ID)\n \t\t\tsingleClick : false, // double-click mode\n \t\t\tstep : 1 // show all years in drop-down boxes (instead of every other year as default)\n\t\t\t\t\t})\n\t\t\t\t\t\t\n\t\t\t\t\t\tCalendar.setup({\n \t\t\tinputField : 'renovacion', // id of the input field\n \t\t\tifFormat : '%d-%m-%Y', // format of the input field\n \t\t\tshowsTime : true, // will display a time selector\n \t\t\tbutton : 'f_trigger_renovacion', // trigger for the calendar (button ID)\n \t\t\tsingleClick : false, // double-click mode\n \t\t\tstep : 1 // show all years in drop-down boxes (instead of every other year as default)\n\t\t\t\t\t})\n\t\t\t\t\t}break\n\t\t\t\t\tcase \"empleados\":\n\t\t\t\t\t{\n\t\t\t\t\t\tCalendar.setup({\n \t\t\tinputField : 'fnac', // id of the input field\n \t\t\tifFormat : '%d-%m-%Y', // format of the input field\n \t\t\tshowsTime : true, // will display a time selector\n \t\t\tbutton : 'f_trigger_fnac', // trigger for the calendar (button ID)\n \t\t\tsingleClick : false, // double-click mode\n \t\t\tstep : 1 // show all years in drop-down boxes (instead of every other year as default)\n\t\t\t\t\t})\n\t\t\t\t\t\t\n\t\t\t\t\t\tCalendar.setup({\n \t\t\tinputField : 'fcon', // id of the input field\n \t\t\tifFormat : '%d-%m-%Y', // format of the input field\n \t\t\tshowsTime : true, // will display a time selector\n \t\t\tbutton : 'f_trigger_fcon', // trigger for the calendar (button ID)\n \t\t\tsingleClick : false, // double-click mode\n \t\t\tstep : 1 // show all years in drop-down boxes (instead of every other year as default)\n\t\t\t\t\t})\n\t\t\t\t\t}break\n case \"entradas_salidas\":\n\t\t\t\t\t{\n\t\t\t\t\t\tCalendar.setup({\n \t\t\tinputField : 'entrada', // id of the input field\n \t\t\tifFormat : '%d-%m-%Y', // format of the input field\n \t\t\tshowsTime : true, // will display a time selector\n \t\t\tbutton : 'f_trigger_entrada', // trigger for the calendar (button ID)\n \t\t\tsingleClick : false, // double-click mode\n \t\t\tstep : 1 // show all years in drop-down boxes (instead of every other year as default)\n\t\t\t\t\t})\n\n\t\t\t\t\t\tCalendar.setup({\n \t\t\tinputField : 'salida', // id of the input field\n \t\t\tifFormat : '%d-%m-%Y', // format of the input field\n \t\t\tshowsTime : true, // will display a time selector\n \t\t\tbutton : 'f_trigger_salida', // trigger for the calendar (button ID)\n \t\t\tsingleClick : false, // double-click mode\n \t\t\tstep : 1 // show all years in drop-down boxes (instead of every other year as default)\n\t\t\t\t\t})\n\t\t\t\t\t}break\n\t\t\t\t}\n\t\t\t\t//editor()\n}", "function inverteData(data,campo){\ncampos = data.value.split('/');\nalert(campo);\ncampo.value = campos[1] + '/' + campos[0] + '/' + campos[2];\n}", "function recargarTabla(){\n\tvar table = $('#TDataEstu').DataTable();\n\t\n\ttable.ajax.reload( function ( json ) {\n\t $('#TDataEstu').val( json.lastInput );\n\t});\n}", "function agregaform(datos){\n \n d=datos.split('||');\n $('#codigou').val(d[0]);\n $('#nombreu').val(d[1]);\n}", "function obtener_datos (){\n\n var nombre = document.getElementById(\"NOMBRE\").value;\n\n comprobar_datos(nombre);\n}", "function compilar()\r\n{\r\n\t// limpar tabelas\r\n\tvar tabela = document.getElementById('tabela-binario');\r\n\ttbody = tabela.getElementsByTagName('tbody')[0];\r\n\ttbody.innerHTML = '';\r\n\tvar tabela = document.getElementById('tabela-verdade');\r\n\ttbody = tabela.getElementsByTagName('tbody')[0];\r\n\ttbody.innerHTML = '';\r\n\t\r\n\tvar instrucoes = document.getElementById('instrucoes'); // div com as instrucoes\r\n\tvar divs = instrucoes.getElementsByTagName('div'); // divs de dentro - cada uma eh uma instrucao\r\n\t\r\n\t// para cada instrucao\r\n\tfor (var i = 0; i < divs.length; i++) {\r\n\t\ttry {\r\n\t\t\t// select - operacao selecionada\r\n\t\t\tvar op_funct = divs[i].getElementsByTagName('select')[0];\r\n\t\t\top_funct_selected = op_funct.options[op_funct.selectedIndex];\r\n\t\t\tvar instrucao = op_funct_selected.value;\r\n\t\t\tvar op = Number(op_funct_selected.getAttribute('data-op'));\r\n\t\t\tvar funct = Number(op_funct_selected.getAttribute('data-funct'));\r\n\t\t\t\r\n\t\t\t// input - comando digitado\r\n\t\t\tvar comandos = divs[i].getElementsByTagName('input')[0].value;\r\n\t\t\tcomandos = comandos.replace(/\\$/g, '').replace(/\\s/g, ''); // remover espacos e $\r\n\t\t\t\r\n\t\t\tif (!empty(comandos)) {\r\n\t\t\t\tcomandos = comandos.split(','); // dividir comando pela virgula\r\n\t\t\t\t\r\n\t\t\t\tvar rd = 0;\r\n\t\t\t\tvar rs = 0;\r\n\t\t\t\tvar rt = 0;\r\n\t\t\t\tvar imm = 0;\r\n\t\t\t\tvar addr = 0;\r\n\t\t\t\t\r\n\t\t\t\tif (op == TIPO_R) {\r\n\t\t\t\t\trd = Number(comandos[0]);\r\n\t\t\t\t\trs = Number(comandos[1]);\r\n\t\t\t\t\tif (instrucao != 'not') {\r\n\t\t\t\t\t\trt = Number(comandos[2]);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (op == TIPO_J) {\r\n\t\t\t\t\taddr = Number(comandos[0]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\trt = Number(comandos[0]);\r\n\t\t\t\t\tif (instrucao == 'lw' || instrucao == 'sw') {\r\n\t\t\t\t\t\tvar index1 = comandos[1].indexOf('(');\r\n\t\t\t\t\t\tvar index2 = comandos[1].indexOf(')');\r\n\t\t\t\t\t\timm = comandos[1].substring(0, index1);\r\n\t\t\t\t\t\trs = comandos[1].substring(index1+1, index2);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\trs = Number(comandos[1]);\r\n\t\t\t\t\t\timm = Number(comandos[2]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\timprimir(instrucao, op, rs, rt, rd, funct, imm, addr);\r\n\t\t\t} // if empty\r\n\t\t} catch (error) {}\r\n\t} // for\r\n}", "function calcola_datan(lingua){\n\n // parametri lingua= \"ITA\" - \"ING\" \n // by Salvatore Ruiu Irgoli-Sardegna (Italy) dicembre 2009.\n // utilizzo caratteri speciali ANSI.\n // restituisce la stringa DataIns.\n // utilizzata solo per il datario delle fasi lunari\n // per la data completa utilizzare [calcola_datan2(lingua)]\n\t \n\tvar DataInsn=\".\";\n \n var data=new Date();\n\n var anno =data.getYear(); // anno\n var mese =data.getMonth(); // mese 0 a 11 \n var giorno=data.getDate(); // numero del giorno da 1 a 31\n var giorno_settimana=data.getDay(); // giorno della settimana 0 a 6\n var ora =data.getHours(); // ora del giorno da 0 a 23\n var minuti=data.getMinutes(); // minuti da 0 a 59\n var secondi=data.getSeconds(); // secondi da 0 a 59\n \n if (anno<1900) { anno=anno+1900; } // correzione anno\n\n if (ora<10){ ora='0'+ora;}\n \n if (minuti<10){minuti='0'+minuti;}\n\n if (secondi<10) {secondi='0'+secondi;}\n\n mese=mese+1;\n\n if (lingua==\"ING\") { DataInsn=mese+\":\"+giorno+\":\"+anno+\":\"+ora }\n else { DataInsn=giorno+\":\"+mese+\":\"+anno+\":\"+ora }\n\n return DataInsn;\n }", "function cargarEditCha(){\n\t//debugger;\n\t// le asigno a la variable el nombre donde se guardan las chambas\n\tvar usuario_nombre = (localStorage.getItem(\"Usuario_Actual\")) + \"chambas\";\n\t// parseo la variable para obtener los arreglos\n\tvar listChamba =JSON.parse(localStorage.getItem(usuario_nombre));\n\t// le asigno a la variable modificar el id que esta actualmente\n\tmodificar = JSON.parse(localStorage.getItem(\"id\"));\n\t// recorro el arreglo de arreglos\n\tfor (var i = 0; i < listChamba.length; i++) {\n\t\t// recorro cada uno de los arreglos\n\t\tfor (var j = 0; j < listChamba[i].length; j++) {\n\t\t\t// pregunto que si modificar es igual al id actual\n\t\t\tif(modificar == listChamba[i][j]){\n\t\t\t\t// si es asi, a la variable da1 le asigno el valor de la posicion 0\n\t\t\t\tda1 = listChamba[i][j];\n\t\t\t\t//a la variable da2 le asigno el valor de la posicion 1\n\t\t\t\tda2 = listChamba[i][j+1];\n\t\t\t\t//a la variable da3 le asigno el valor de la posicion 2\n\t\t\t\tda3 = listChamba[i][j+2];\n\t\t\t\t//a la variable da4 le asigno el valor de la posicion 3\n\t\t\t\tda4 = listChamba[i][j+3];\n\t\t\t\t//a la variable da5 le asigno el valor de la posicion 4\n\t\t\t\tda5 = listChamba[i][j+4];\n\t\t\t\t// luego obtengo el input respectivo y le asigno el valor correspondiente\n\t\t\t\tdocument.getElementById(\"numero\").value = da1;\n\t\t\t\t// luego obtengo el input respectivo y le asigno el valor correspondiente\n\t\t\t\tdocument.getElementById(\"cliente\").value = da2;\n\t\t\t\t// luego obtengo el input respectivo y le asigno el valor correspondiente\n\t\t\t\tdocument.getElementById(\"description\").value = da3;\n\t\t\t\t// luego obtengo el input respectivo y le asigno el valor correspondiente\n\t\t\t\tdocument.getElementById(\"fecha\").value = da4;\n\t\t\t\t// luego obtengo el input respectivo y le asigno el valor correspondiente\n\t\t\t\tdocument.getElementById(\"notas\").value = da5;\n\t\t\t\t\n\t\t\t}\n\t\t};\n\t};\n\t\n}", "function MostrarLista(){\n //declaramos una viable para guardar los datos\n var listaregistro=Mostrar();\n //selecciono el tbody de la tabla donde voy a mostrar la informacion\n var tbody=document.querySelector(\"#tbAlumno tbody\");\n tbody.innerHTML=\"\";\n //agregamos al tbody las filas que se registren\n for(var i=0;i<listaregistro.length;i++){\n //declaramos una variable para las filas\n var fila=tbody.insertRow(i);\n //declaramos variables para los titulos\n var titulonom=fila.insertCell(0);\n var tituloape=fila.insertCell(1);\n var titulodni=fila.insertCell(2);\n var titulocur=fila.insertCell(3);\n var titulotur=fila.insertCell(4);\n var tituloest=fila.insertCell(5);\n //agregamos los valores\n titulonom.innerHTML=listaregistro[i].nombre;\n tituloape.innerHTML=listaregistro[i].apellido;\n titulodni.innerHTML=listaregistro[i].dni;\n titulocur.innerHTML=listaregistro[i].curso;\n titulotur.innerHTML=listaregistro[i].turno;\n tituloest.innerHTML=listaregistro[i].estado;\n tbody.appendChild(fila); \n }\n}", "function registro(){ \r\n limpiarMensajesError();//Limpio todos los mensajes de error cada vez que corro la funcion\r\n let nombre = document.querySelector(\"#txtNombre\").value;\r\n let nombreUsuario = document.querySelector(\"#txtNombreUsuario\").value;\r\n let clave = document.querySelector(\"#txtContraseña\").value;\r\n let perfil = Number(document.querySelector(\"#selPerfil\").value); //Lo convierto a Number directo del html porque yo controlo qu'e puede elegir el usuario\r\n let recibirValidacion = validacionesRegistro (nombre, nombreUsuario, clave); //\r\n if(recibirValidacion && perfil != -1){ \r\n crearUsuario(nombre, nombreUsuario, clave, perfil);\r\n if(perfil === 2){\r\n usuarioLoggeado = nombreUsuario; //Guardo en la variable global el nombre de usuario ingresado (tiene que ir antes de ejecutar la funcion alumno ingreso)\r\n alumnoIngreso();\r\n }else{\r\n usuarioLoggeado = nombreUsuario; //Guardo en la variable global el nombre de usuario ingresado\r\n docenteIngreso();//Guardo en la variable global el nombre de usuario ingresado (tiene que ir antes de ejecutar la funcion alumno ingreso)\r\n }\r\n }\r\n if(perfil === -1){\r\n document.querySelector(\"#errorPerfil\").innerHTML = \"Seleccione un perfil\";\r\n }\r\n}", "function buscarEntradasDeODC(tipoBusqueda){\n\tswitch (tipoBusqueda){\n\t\tcase 1: //Cuando el criterio de buesqueda es por Almacen, Proveedor, Fecha de ODC, Fecha de Entrada de Almacen\n\t\t\tvar almacenes = []; \n\t\t\t$('#ListaAlmacenes :selected').each(function(i, selected){ \n\t\t\t almacenes[i] = $(selected).val(); \n\t\t\t});\n\n\t\t\tvar proveedores = $(\"#select-proveedor\").find(\"option:selected\").val();\n\t\t\tvar fecha_inicio_odc = $(\"#fechadel1\").val();\n\t\t\tvar fecha_fin_odc = $(\"#fechaal1\").val();\n\t\t\tvar fecha_inicio_entrada_almacen = $(\"#fechadel2\").val();\n\t\t\tvar fecha_fin_entrada_almacen = $(\"#fechaal2\").val();\n\t\t\tvar FechaInicioODC = convierteFechaJava(fecha_inicio_odc);\n\t\t\tvar FechaFinODC = convierteFechaJava(fecha_fin_odc);\n\t\t\tvar FechaInicioEntradaAlmacen = convierteFechaJava(fecha_inicio_entrada_almacen);\n\t\t\tvar FechaFinEntradaAlmacen = convierteFechaJava(fecha_fin_entrada_almacen);\n\n\t\t\tif ( (proveedores==0) && (fecha_inicio_odc==\"\") && (fecha_inicio_entrada_almacen==\"\") && (fecha_inicio_entrada_almacen==\"\") && (fecha_fin_entrada_almacen==\"\") && (almacenes.length==0) ){\n\t\t\t\talert(\"Debe elegir al menos alg\\u00fan criterio de b\\u00fasqueda\");\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif(FechaInicioODC > FechaFinODC){\n\t\t\t\talert(\"La fecha inicial no puede ser mayor a la fecha final en la fecha de orden de compra\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif(FechaInicioEntradaAlmacen > FechaFinEntradaAlmacen){\n\t\t\t\t\talert(\"La fecha inicial no puede ser mayor a la fecha final en la fecha de entrada a almacen\");\n\t\t\t\t}else{\n\t\t\t\t\t$(\".detalle tbody tr\").remove();\n\t\t\t\t\tvar ruta = \"llenaTablaDetalle.php\";\n\t\t\t\t\tvar envio = \"almacenes=\" + almacenes + \"&proveedores=\" + proveedores + \"&fecha_inicio_odc=\" + fecha_inicio_odc + \"&fecha_fin_odc=\" + fecha_fin_odc + \"&fecha_inicio_entrada_almacen=\" + fecha_inicio_entrada_almacen + \"&fecha_fin_entrada_almacen=\" + fecha_fin_entrada_almacen + \"&proceso=ad_movimientos_almacen\";\n\t\t\t\t\tvar respuesta = ajaxN(ruta, envio);\n\t\t\t\t\t$(\".detalle tbody\").append(respuesta);\n\t\t\t\t}\n\t\t\t}\n\t\tbreak;\n\t\tcase 2: //Cuando el criterio de buesqueda es por Orden de Compra o Documento de Cliente\n\t\t\tvar idOrdenCompra = $(\"#TxtOrdenCompra\").val();\n\t\t\tvar documentoCliente = $(\"#TxtDocumentoCliente\").val();\n\n\t\t\tif ((idOrdenCompra==\"\") && (documentoCliente==\"\")){\n\t\t\t\talert('Debe introducir la orden de compra o el documento del cliente');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$(\".detalle tbody tr\").remove();\n\t\t\tvar ruta = \"llenaTablaDetalle.php\";\n\t\t\tvar envio = \"idOrdenCompra=\" + idOrdenCompra + \"&documentoCliente=\" + documentoCliente+\"&proceso=ad_movimientos_almacen\";\n\t\t\tvar respuesta = ajaxN(ruta, envio);\n\t\t\t$(\".detalle tbody\").append(respuesta);\n\t\tbreak;\n\t}\n}", "function inseriscitabella(){\r\n \"use strict\";\r\n var nome = document.getElementsByClassName(\"nomelista\")[1].value;\r\n var quanto = document.getElementsByClassName(\"quantolista\")[1].value;\r\n for(var j=0; j<ingredientim.length; j++){\r\n if(nome === ingredientim[j].nome){\r\n document.getElementsByClassName(\"nomelista\")[1].value = \"\";\r\n document.getElementsByClassName(\"quantolista\")[1].value = \"\";\r\n scrivirisultato(\"ingrediente già presente\");\r\n Fallimento();\r\n return false;\r\n }\r\n }\r\n if (quanto < 0) {\r\n scrivirisultato(\"Attenzione, quantità negativa\");\r\n Fallimento();\r\n document.getElementsByClassName(\"quantolista\")[1].value = \"\";\r\n return false;\r\n }\r\n if (quanto == \"\") {\r\n scrivirisultato(\"ingrediente quantità non inserita\");\r\n Fallimento();\r\n return false;\r\n }\r\n if (nome == \"\") {\r\n scrivirisultato(\"Nome non inserito\");\r\n Fallimento();\r\n return false;\r\n } else {\r\n var xmlhttp;\r\n if (xmlhttp = CreaRichiesta()) {\r\n xmlhttp.onreadystatechange = function () {\r\n if (this.readyState == 4 && this.status == 200) {\r\n var result = JSON.parse(this.responseText);\r\n if (result.Error) {\r\n scrivirisultato(result.Error);\r\n Fallimento();\r\n return false;\r\n } else {\r\n var ingr = {nome: nome, quanto: quanto, id: result.id, prezzo: result.prezzo};\r\n ingredientim.push(ingr);\r\n var tabella = document.getElementById(\"mostraingredienti\");\r\n var input = document.createElement(\"INPUT\");\r\n input.value = quanto;\r\n input.className = \"modificaquanto\";\r\n input.type = \"number\";\r\n CreaRiga(tabella,document.createTextNode(nome) ,\r\n document.createTextNode(result.fornitore), document.createTextNode(result.prezzo) , input );\r\n cambiato = 1;\r\n }\r\n document.getElementsByClassName(\"nomelista\")[1].value = \"\";\r\n document.getElementsByClassName(\"quantolista\")[1].value = \"\";\r\n }\r\n };\r\n xmlhttp.open(\"GET\", \"php/VerificaIngrediente.php?nome=\" + nome, true);\r\n xmlhttp.send();\r\n }\r\n }\r\n}", "function agregarform_alcap(datos){\n d=datos.split('||');\n $('#codigoalcas').val(d[0]);\n $('#nombres').val(d[1]); \n $('#apellidos').val(d[2]); \n $('#tipos').val(d[3]); \n \n \n \n}", "function buscarCiudad() {\n // obtener valor ingresado\n let ciudadBuscada = document.getElementById('nombreCiudad').value;\n console.log(ciudadBuscada);\n // comprobar que se haya ingresado un valor\n if (ciudadBuscada === \"\") {\n alert(\"Ingrese una ciudad\");\n } else {\n // armar url para hacer el fetch de openweather con nombre\n let fetchNombre = tempactual + q + ciudadBuscada +idioma + grados + apiKey;\n // llamo funcion que ubica en mapa y vuelca datos de clima\n temperaturaCiudad(fetchNombre);\n }\n }", "function mostrarCursosAsociados() {\n\n let listaCheckboxCursos = document.querySelectorAll('#tblCursos tbody input[type=checkbox]:checked');\n\n let cursosAsociados = [];\n let infoCurso;\n\n for (let i = 0; i < listaCheckboxCursos.length; i++) {\n infoCurso = listaCheckboxCursos[i].dataset.codigo;\n cursosAsociados.push(buscarCursoPorCod(infoCurso));\n }\n\n\n let sBuscar = document.querySelector('#txtBuscarCursosPeriodo').value;\n let cuerpoTabla = document.querySelector('#tblCursosPeriodo tbody');\n cuerpoTabla.innerHTML = '';\n\n for (let i = 0; i < cursosAsociados.length; i++) {\n // if (listaCursos[i][1].toLowerCase().includes(sBuscar.toLowerCase())) {\n\n if (cursosAsociados[i][5] == true) {\n let fila = cuerpoTabla.insertRow();\n fila.dataset.id = cursosAsociados[i][0];\n\n let checkSeleccion = document.createElement('input');\n checkSeleccion.setAttribute('type', 'checkbox');\n checkSeleccion.addEventListener('click', verificarCheckCursos);\n checkSeleccion.dataset.codigo = cursosAsociados[i][0];\n checkSeleccion.addEventListener('click', mostrarProfCurso);\n\n let cSeleccion = fila.insertCell();\n let cCodigo = fila.insertCell();\n let cNombre = fila.insertCell();\n\n let sCodigo = document.createTextNode(cursosAsociados[i][0]);\n let sNombre = document.createTextNode(cursosAsociados[i][1]);\n\n let listaCheckboxCursos = document.querySelectorAll('#tblCursosPeriodo tbody input[type=checkbox]');\n\n cSeleccion.appendChild(checkSeleccion);\n cCodigo.appendChild(sCodigo);\n cNombre.appendChild(sNombre);\n }\n }\n}", "function localStorageListo(){\n let direcciones;\n direcciones = obtenerLocalStorage();\n direcciones.forEach(function(dato){\n\n const row = document.createElement('tr');\n row.innerHTML = `\n <td>\n <input type=\"text\" class=\"input-suscripcion\" value=\"${dato.nombre}\" name=\"recibe[]\">\n </td>\n <td>\n <input type=\"text\" class=\"input-suscripcion\" value=\"${dato.direccion}\" name=\"\">\n </td>\n <td>\n <input type=\"text\" class=\"input-suscripcion\" value=\"${dato.ciudad}\" name=\"\">\n </td>\n\n <td>\n <a href=\"#\" class=\"borrar-direccion\">X</a>\n </td>\n `;\n\n mostrar.appendChild(row);\n\n });\n\n console.log(direcciones);\n}", "function listar() {\n\n\t\ttabla=$('#resolucion_data').dataTable({\n\t\t\t\"aProcessing\":true,//Activamos procesamiento de datatable\n\t\t\t\"aServerSide\":true,//Paginacion y filtrado realizados por el servidor\n\t\t\tdom:'Bfrtip',//Definimos los elementos del control de table\n\t\t\tbuttons:[\n\t\t\t\t'copyHtml5',\n\t\t\t\t'excelHtml5',\n\t\t\t\t'pdf'//para los botones en el datatable\n\t\t\t\t],\n\t\t\t\"ajax\":\n\t\t\t{\n\t\t\t\turl:'../ajax/resolucion.php?op=buscar_resolucion',//enviamos el parametro \n\t\t\t\ttype:\"get\",//el tipo del parametro\n\t\t\t\tdataType:\"json\",//formato de la data\n\n\t\t\t\terror: function (e) {\n\t\t\t\t\tconsole.log(e.responseText);//para hacer la verificacion de errores\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"bDestroy\":true,\n\t\t\t\"responsive\":true,\n\t\t\t\"bInfo\":true,//informacion del los datatable\n\t\t\t\"iDisplayLength\":20,//Pora cada 10 registros hace una paginacion\n\t\t\t\"order\":[[0,\"desc\"]],//Ordenar (Columna,orden)\n \t\t\t\n \t\t\t\"language\": {\n \n\t\t\t \"sProcessing\": \"Procesando...\",\n\t\t\t \n\t\t\t \"sLengthMenu\": \"Mostrar _MENU_ registros\",\n\t\t\t \n\t\t\t \"sZeroRecords\": \"No se encontraron resultados\",\n\t\t\t \n\t\t\t \"sEmptyTable\": \"Ningún dato disponible en esta tabla\",\n\t\t\t \n\t\t\t \"sInfo\": \"Mostrando un total de _TOTAL_ registros\",\n\t\t\t \n\t\t\t \"sInfoEmpty\": \"Mostrando un total de 0 registros\",\n\t\t\t \n\t\t\t \"sInfoFiltered\": \"(filtrado de un total de _MAX_ registros)\",\n\t\t\t \n\t\t\t \"sInfoPostFix\": \"\",\n\t\t\t \n\t\t\t \"sSearch\": \"Buscar:\",\n\t\t\t \n\t\t\t \"sUrl\": \"\",\n\t\t\t \n\t\t\t \"sInfoThousands\": \",\",\n\t\t\t \n\t\t\t \"sLoadingRecords\": \"Cargando...\",\n\t\t\t \n\t\t\t \"oPaginate\": {\n\t\t\t \n\t\t\t \"sFirst\": \"Primero\",\n\t\t\t \n\t\t\t \"sLast\": \"Último\",\n\t\t\t \n\t\t\t \"sNext\": \"Siguiente\",\n\t\t\t \n\t\t\t \"sPrevious\": \"Anterior\"\n\t\t\t \n\t\t\t },\n\t\t\t \n\t\t\t \"oAria\": {\n\t\t\t \n\t\t\t \"sSortAscending\": \": Activar para ordenar la columna de manera ascendente\",\n\t\t\t \n\t\t\t \"sSortDescending\": \": Activar para ordenar la columna de manera descendente\"\n\t\t\t\n\t\t\t }\n\n\t\t\t }//cerrando language\n\t\t}).DataTable();\n\t}", "function agregarATabla(articulo, agregar) {\n if (agregar === true) {\n var precio = $(\"#\" + (articulo.id).replace(/\\s/g, \"\") + \"_precio\").text();\n var table = document.getElementById(\"tablee-ventas\");\n description_cell_number = 2; //2 el numero del input en cada row\n var found_repetido = false; //variable booleana para buscar un repetido\n for (var i = 1; i < table.rows.length; i++) { //loop a traves de cada row en la tabla\n var row = table.rows[i]; //variable de cada row\n var cell_descripcion = row.cells[description_cell_number]; //variable de la celda de descripcion\n if (cell_descripcion.getElementsByTagName(\"input\")[0].value === articulo.id) { //comprobacion si ya existe un articulo igual en form\n found_repetido = true; //repetido encontrado\n break;\n }\n }\n if (found_repetido) { //si articulo esta repetio\n cell_cantidad = parseInt(row.cells[1].getElementsByTagName(\"input\")[0].value) + 1; //valor cantidad actual + nuevo\n cell_precio = parseInt(row.cells[3].getElementsByTagName(\"input\")[0].value) + parseInt(precio);//valor precio + nuevo\n row.cells[1].getElementsByTagName(\"input\")[0].value = cell_cantidad; //cambair cantidad\n row.cells[3].getElementsByTagName(\"input\")[0].value = cell_precio; //cambair precio\n } else { //si no existe un repetido, generar nueva row de venta\n var button_id = (articulo.id).replace(/\\s/g, \"\") + \"_eliminar\";\n $('#tablee-ventas').append('<tr>\\n' +\n ' <td class=\"ajuste-ancho-columna10\"><button id=\"' + button_id + '\" type=\"button\" class=\"button-ajuste input_ajuste\" onclick=\"agregarATabla(this, false)\"><i\\n' +\n ' class=\"fas fa-trash\"></i></button>\\n' +\n ' <td class=\"ajuste-ancho-columna10\"><input type=\"text\" class=\"input_ajuste\" value=\"1\" readonly></td>\\n' +\n ' <td class=\"ajuste-ancho-columna60\"><input type=\"text\" class=\"input_ajuste\" value=\"' + articulo.id + '\" readonly></td>\\n' +\n ' <td><input type=\"text\" class=\"input_ajuste\" value=\"' + precio + '\" readonly></td>\\n' +\n ' </tr>')\n }\n }\n if (agregar === false) { //si no es agregar\n $(\"#\" + articulo.id).closest('tr').remove(); // remueve el row donde se encuentra el id dado\n }\n\n modificarTotalVenta();\n}", "function irsozinho() {\n\tvar inst = document.getElementById(\"manobraunicabox\").value.replace(/(?:\\r\\n|\\r|\\n|\\t)/g, '\\n');\n\tvar inst = inst.split ('Telefone')[1];\n\tvar inst = inst.split ('\\n')[1];\n\tvar inst = inst.replace(/(?:\\r\\n|\\r|\\n|\\t)/g, '');\n\t\n\tvar estado = document.getElementById(\"manobraunicabox\").value.replace(/(?:\\r\\n|\\r|\\n|\\t)/g, '\\n');\n\tvar estado = estado.split('Localidade\\nEsta')[1];\n\tvar estado = estado.split('\\n')[7];\n\tvar estado = estado.replace(/(?:\\r\\n|\\r|\\n|\\t)/g, '');\t\n\n\tvar cidade = document.getElementById(\"manobraunicabox\").value.replace(/(?:\\r\\n|\\r|\\n|\\t)/g, '\\n');\n\tvar cidade = cidade.split('Localidade\\nEsta')[1];\n\tvar cidade = cidade.split('\\n')[8];\n\tvar cidade = cidade.replace(/(?:\\r\\n|\\r|\\n|\\t)/g, '');\n\t\n\tvar ard = document.getElementById(\"manobraunicabox\").value.replace(/(?:\\r\\n|\\r|\\n|\\t)/g, '\\n');\n\tvar ard = ard.split('alimentador')[1];\n\tvar ard = ard.split ('rio')[1];\n\tvar ard = ard.split ('Porta')[0];\n\tvar ard = ard.replace(/(?:\\r\\n|\\r|\\n|\\t)/g, '');\n\t//utilizar indexOf para encontrar este trecho do ard no select\n\t\n\t\n\tvar rin = document.getElementById(\"manobraunicabox\").value.replace(/(?:\\r\\n|\\r|\\n|\\t)/g, '\\n');\n\tvar rin = rin.split('alimentador')[1];\n\tvar rin = rin.split ('Rin')[1];\n\tvar rin = rin.split ('\\n')[1];\n\tvar rin = rin.split('Encapsulamento')[0];\n\tvar rin = rin.replace(/(?:\\r\\n|\\r|\\n|\\t)/g, '');\n\t\n\tvar contagem = document.getElementById(\"manobraunicabox\").value.replace(/(?:\\r\\n|\\r|\\n|\\t)/g, '\\n');\n\tvar contagem = contagem.split('alimentador')[1];\n\tvar contagem = contagem.split ('Voz')[1];\n\tvar contagem = contagem.split ('Prim')[0];\n\tvar contagem = contagem.split ('-');\n\tvar contagemA = contagem[0];\n\tvar contagemB = contagem[1];\n\tvar contagemF = contagemA+'-'+contagemB;\n\tvar contagemF = contagemF.replace(/(?:\\r\\n|\\r|\\n|\\t)/g, '');\n\t\n\tsessionStorage.setItem('texto',document.getElementById(\"manobraunicabox\").value);\n\tsessionStorage.setItem('inst',inst);\n\tsessionStorage.setItem('estado',estado);\n\tsessionStorage.setItem('cidade',cidade);\n\tsessionStorage.setItem('ard',ard);\n\tsessionStorage.setItem('rin',rin);\n\tsessionStorage.setItem('contagem',contagemF);\n\t\n\t\n\t//console.log ('Instância: '+inst+'\\nCidade: '+cidade+'\\nArmário: '+ard+'\\nContagem: '+contagemF+'\\nRin: '+rin);\n\t\n\t\n\t\n\tsetTimeout(function (){\n\t\t//MASSIVA_PRIMARIO_AC\n\t\tif(typeof(document.getElementsByName('perfil')[0]) !== 'undefined' && document.getElementsByName('perfil')[0] !== null) {\n\t\t\tvar perfil = document.getElementsByName('perfil')[0].options.selectedIndex;\n\t\t\tif (perfil==0|perfil==null){\n\t\t\t\tfor (p=0;p<document.getElementsByName('perfil')[0].options.length;p++){\n\t\t\t\t\tif(document.getElementsByName('perfil')[0].options[p].text=='MASSIVA_PRIMARIO_'+sessionStorage.getItem('estado')){\n\t\t\t\t\t\t//console.log(document.getElementsByName('perfil')[0].options[i].text+'-'+i);\n\t\t\t\t\t\tdocument.getElementsByName('perfil')[0].options[p].selected=true;\n\t\t\t\t\t\tsessionStorage.setItem ('continuar', 'sim');\n\t\t\t\t\t\tdocument.initForm.submit();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\t\t\n\t\tvar cidadeOrigem = document.getElementsByName('cidadeOrigem.cityName')[0].options.selectedIndex;\n\t\tvar armarioOrigem = document.getElementsByName('armarioOrigem.locationId')[0].options.selectedIndex;\n\t\tvar shelfOrigem = document.getElementsByName('shelfOrigem.equipmentId')[0].options.selectedIndex;\n\n\t\tif ((cidadeOrigem==0|cidadeOrigem==null)&sessionStorage.getItem('setCidade')!='ok'){\n\t\t\tfor (i=0;i<document.getElementsByName('cidadeOrigem.cityName')[0].options.length;i++){\n\t\t\t\tif(document.getElementsByName('cidadeOrigem.cityName')[0].options[i].text==sessionStorage.getItem('cidade')){\n\t\t\t\t\t//console.log(document.getElementsByName('cidadeOrigem.cityName')[0].options[i].text+'-'+i);\n\t\t\t\t\tdocument.getElementsByName('cidadeOrigem.cityName')[0].options[i].selected=true;\n\t\t\t\t\tsessionStorage.setItem ('continuar', 'sim');\n\t\t\t\t\tsessionStorage.setItem ('setCidade','ok');\n\t\t\t\t\tVerificaCidade('Cidade');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if((armarioOrigem==0|armarioOrigem!=null)&sessionStorage.getItem('setOrigem')!='ok'){\n\t\t\tfor (j=0;j<document.getElementsByName('armarioOrigem.locationId')[0].options.length;j++){\n\t\t\t\tif (document.getElementsByName('armarioOrigem.locationId')[0].options[j].text.indexOf(sessionStorage.getItem('ard'))> -1){\n\t\t\t\t\tdocument.getElementsByName('armarioOrigem.locationId')[0].options[j].selected=true;\n\t\t\t\t\tsessionStorage.setItem ('continuar', 'sim');\n\t\t\t\t\tsessionStorage.setItem ('setOrigem','ok');\n\t\t\t\t\tverificaOrigemDestinoArmario('origem');\n\t\t\t\t}\t\t\t\t\n\t\t\t}\t\n\t\t}\n\t\telse if ((shelfOrigem==0|shelfOrigem!=null)&sessionStorage.getItem('setRin')!='ok') {\n\t\t\tfor (l=0;l<document.getElementsByName('shelfOrigem.equipmentId')[0].options.length;l++){\n\t\t\t\tif (document.getElementsByName('shelfOrigem.equipmentId')[0].options[l].text.indexOf(sessionStorage.getItem('rin'))> -1){\n\t\t\t\t\tdocument.getElementsByName('shelfOrigem.equipmentId')[0].options[l].selected=true;\n\t\t\t\t\tsessionStorage.setItem ('continuar', 'sim');\n\t\t\t\t\tsessionStorage.setItem ('setRin','ok');\n\t\t\t\t\tatualizaValorTecnologia('origem');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tsessionStorage.setItem ('continuar', 'nao');\n\t\t}\t\n\t}, 1000);\n\tdocument.getElementsByName('instancias')[0].value=sessionStorage.getItem('inst');\n}", "function llenarComboDias(nombreCombo) {\r\n\tFECHA_INICIO = new String(document.formularioFiltro.fechaInicio.value);\r\n\tFECHA_FIN = new String(document.formularioFiltro.fechaFinRegistro.value);\r\n\tvar arregloInicio = FECHA_INICIO.split(\"/\");\r\n\tvar diaInicio = arregloInicio[0];\r\n\tvar mesInicio = arregloInicio[1];\r\n\tvar annoInicio = arregloInicio[2];\r\n\tmesInicio = mesInicio - 1;\r\n\tvar fechaInicio = new Date(annoInicio, mesInicio, diaInicio);\r\n\tvar diasSiguiente = 0;\r\n\tvar stringDia = \"\";\t//Este string es una variabla auxiliar para guardar el dia y agregarlo al combo\r\n\tlimpiarCombo(document.formularioFiltro.valorDia);\t\r\n\t\r\n\t//Agregamos la primera opcion del combo vacia \r\n\tstringDia = \"\";\r\n\taddOption(document.formularioFiltro.valorDia, stringDia, 0);\r\n\tfor (var i = 0; i < 7; i++) {\r\n\t\tdiasSiguiente = fechaInicio.getTime() + ((24 * 60 * 60 * 1000) * i);\r\n\t\r\n\t\t// Cosntruimos el objeto Date con la cantidad de\r\n\t\t// miliseg que representan cada dia de la semana\r\n\t\tvar fecha = new Date(diasSiguiente);\r\n\t\tvar dia = fecha.getDate();\r\n\t\tvar mes = fecha.getMonth() + 1;\r\n\t\tvar anno = fecha.getFullYear();\r\n\t\tstringDia = dia + \"/\" + mes + \"/\" + anno;\t\t\r\n\t\t\r\n\t\t// agregamos la opcion\r\n\t\taddOption(document.formularioFiltro.valorDia, stringDia, i);\r\n\t}\r\n}", "function inicializaContadores(){\n campo.on(\"input\", function(){\n var conteudo = campo.val();\n \n // contador de palavras\n var qtdPalavras = conteudo.split(/\\S+/).length -1; \n $(\"#contador-palavras\").text(qtdPalavras);\n // >> /\\S+/ = expressão regular que busca espço vazio\n \n // contador de letras\n var qtdCaracteres = conteudo.length\n $(\"#contador-caracteres\").text(qtdCaracteres);\n });\n }", "function cargaTabla(){\n\tvar fecha = $('#txtFecha').val();\n\tvar fechaInicio = $('#txtFechaInicio').val();\n\tvar fechaFinal = $('#txtFechaFinal').val();\n\tfiltro = $('input[name=\"rbFiltro\"]:checked').val();\n\tmensaje = \"\";\n\tif(filtro == \"4\"){\n\t\tif(fecha == \"\"){\n\t\t\tmensaje = \"Seleccione correctamente la fecha a buscar.\";\n\t\t}\n\t}else if(filtro == \"5\"){\n\t\tif(fechaInicio == \"\" || fechaFinal ==\"\"){\n\t\t\tmensaje = \"Seleccione correctamente el rango de fecha a buscar.\";\n\t\t}\n\t}else{\n\t\tmensaje = \"\";\n\t}\n\tif(mensaje!=\"\"){\n\t\t$.msgbox(msboxTitle, mensaje);\n\t}else{\n\t\truta = \"/ordenventa/listaxvendedor/\";\n\t\t$.post(ruta, {filtro: filtro, fecha: fecha, fechaInicio: fechaInicio, fechaFinal: fechaFinal}, function(data){\n\t\t\t$('#tblOrdenVenta tbody').html(data);\n\t\t\t$('#tblOrdenVenta').show();\n\t\t});\n\t}\n}", "function RelData(formulario)\r\n{\r\n\tif(\r\n\t(formulario.codunidade.value !=0) &&\r\n\t(formulario.dtinicial.value == '') &&\r\n\t(formulario.dtfinal.value == '')\r\n\t\t){\r\n\t\tformulario.action = window.location.href;\r\n\t\tformulario.submit();\r\n\t\treturn true;\r\n\t\t}\r\n\t\tif (formulario.dtinicial.value == '')\r\n\t\t{\r\n\r\n\t\t\talert('O Campo \"Data Inicial\" deve ser preenchido.');\r\n\t\t\tformulario.dtinicial.focus();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif(!ValidaDt(formulario.name,'dtinicial','Data Inicial')){\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (formulario.dtfinal.value == '')\r\n\t\t{\r\n\t\t\talert('O Campo \"Data Final\" deve ser preenchido.');\r\n\t\t\tformulario.dtfinal.focus();\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif(!ValidaDt(formulario.name,'dtfinal','Data Final')){\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tformulario.action = window.location.href;\r\n\t\tformulario.submit();\r\n}", "function generarDatos() {\n let librosPrecargados = [{\n \"titulo\": \"Bullying y abuso infantil\",\n \"autor\": \"Tere Vale\",\n \"año\": \"2020\"\n },\n {\n \"titulo\": \"Marinka una rusa niña vasca\",\n \"autor\": \"Rodolfo Luna Almeida\",\n \"año\": \"2019\"\n },\n {\n \"titulo\": \"Camino a una tierra extraña\",\n \"autor\": \"David Park\",\n \"año\": \"2018\"\n },\n {\n \"titulo\": \"El sueño del retorno\",\n \"autor\": \"Firulais\",\n \"año\": \"2017\"\n },\n {\n \"titulo\": \"Humanos\",\n \"autor\": \"Dios\",\n \"año\": \"2020\"\n }\n ];\n return librosPrecargados;\n}", "function generarCosteo(tabla){\n\tvar obj = document.getElementById(tabla);\n\tvar Trs = obj.getElementsByTagName('tr');\n\tvar seleccionado = false;\n\n\t//var idDetalleMovimientoAlmacen;\n\tvar idMovimiento;\n\tvar idControlMovimiento;\n\tvar idOrdenCompra;\n\tvar idControlOrdenCompra;\n\tvar idProveedor;\n\n\t//var idDetallesMovimientosAlmacen = new Array();\n\tvar idDetalles = new Array();\n\tvar idMovimientos = new Array();\n\tvar idControlMovimientos = new Array();\n\tvar idOrdenesCompra = new Array();\n\tvar idControlOrdenesCompra = new Array();\n\tvar idProveedores = new Array();\n\tvar bandera = false;\n\tvar renglonesSeleccionados = 0;\n\n\t// VALIDACIONES --->\n\tfor(var i=1; i<Trs.length+1; i++){\n\t\tseleccionado = $('#idDetalleCheck_'+i).is(':checked');\n\t\tif(seleccionado) break;\n\t}\n\tif(seleccionado){\n\t\tfor(var i=1; i<Trs.length+1; i++){\n\t\t\tseleccionado = $('#idDetalleCheck_'+i).is(':checked');\n\t\t\tif(seleccionado){\n\t\t\t\t//idDetalleMovimientoAlmacen = $(\"#TxtIdDetalleMovimientoAlmacen\"+i).val();\n\t\t\t\tidMovimiento = $(\"#TxtIdMovimiento\"+i).val();\n\t\t\t\tidControlMovimiento = $(\"#TxtIdControlMovimiento\"+i).val();\n\t\t\t\tidOrdenCompra = $(\"#TxtIdOrdenCompra\"+i).val();\n\t\t\t\tidControlOrdenCompra = $(\"#TxtIdControlOrdenCompra\"+i).val();\n\t\t\t\tidProveedor = $(\"#TxtIdProveedor\"+i).val();\n\t\t\t\t\n\t\t\t\t//idDetallesMovimientosAlmacen.push(idDetalleMovimientoAlmacen);\n\t\t\t\tidMovimientos.push(idMovimiento);\n\t\t\t\tidControlMovimientos.push(idControlMovimiento);\n\t\t\t\tidOrdenesCompra.push(idOrdenCompra);\n\t\t\t\tidControlOrdenesCompra.push(idControlOrdenCompra);\n\t\t\t\tidProveedores.push(idProveedor);\n\n\t\t\t\trenglonesSeleccionados++;\n\t\t\t}\n\t\t}\n\t}else{\n\t\talert(\"Seleccione alg\\u00fan movimiento de almacen\");\n\t\tbandera = true;\n\t}\n\t// VALIDACIONES <---\n\n\tif(!bandera){\n\t\t//alert(idMovimientos+\" : \"+idControlMovimientos);\n\t\tvar url = \"generaCosteo.php\";\n\t\t//var envia_datos = \"renglonesSeleccionados=\"+renglonesSeleccionados+\"&idDetallesMovimientosAlmacen=\"+idDetallesMovimientosAlmacen+\"&idMovimientos=\"+idMovimientos+\"&idControlMovimientos=\"+idControlMovimientos+\"&idOrdenesCompra=\"+idOrdenesCompra+\"&idControlOrdenesCompra=\"+idControlOrdenesCompra+\"&idProveedores=\"+idProveedores;\n\t\t//var envia_datos = \"renglonesSeleccionados=\"+renglonesSeleccionados+\"&idMovimientos=\"+idMovimientos+\"&idControlMovimientos=\"+idControlMovimientos+\"&idOrdenesCompra=\"+idOrdenesCompra+\"&idControlOrdenesCompra=\"+idControlOrdenesCompra+\"&idProveedores=\"+idProveedores;\n\t\tvar envia_datos = \"idMovimientos=\"+idMovimientos+\"&idControlMovimientos=\"+idControlMovimientos+\"&idOrdenesCompra=\"+idOrdenesCompra+\"&idControlOrdenesCompra=\"+idControlOrdenesCompra+\"&idProveedores=\"+idProveedores;\n\t\tvar respuesta = ajaxN(url, envia_datos);\n\t\talert(respuesta);\n\t\tlocation.reload();\n\t}\n}", "function cargarInput(id_estudiante,nombre){\n\tgrupoestudiante.id_estudiante=id_estudiante;\n\tgrupoestudiante.nombre=nombre;\n\t\n\t$(\"#CampoidEstu\").val(grupoestudiante.id_estudiante);\n\t$(\"#CampoEstudiante\").val(grupoestudiante.nombre);\n}", "function tablaresultados_asociado(limite)\r\n{\r\n var controlador = \"\";\r\n var parametro = \"\";\r\n var consulta= \"\";\r\n var limit = limite;\r\n var base_url = document.getElementById('base_url').value;\r\n controlador = base_url+'asociado/buscar_asociado';\r\n \r\n if(limit == 1){\r\n consulta = \" limit 300\";\r\n }else if(limit == 3){\r\n consulta =\"\";\r\n }else{\r\n parametro = document.getElementById('filtrar').value;\r\n \r\n } \r\n document.getElementById('loader').style.display = 'block'; //muestra el bloque del loader\r\n \r\n\r\n $.ajax({url: controlador,\r\n type:\"POST\",\r\n data:{parametro:parametro, consulta:consulta},\r\n success:function(respuesta){\r\n \r\n //$(\"#encontrados\").val(\"- 0 -\");\r\n var registros = JSON.parse(respuesta);\r\n \r\n if (registros != null){\r\n \r\n var n = registros.length; //tamaño del arreglo de la consulta\r\n //$(\"#encontrados\").html(\"Registros Encontrados: \"+n+\" \");\r\n html = \"\";\r\n \r\n for (var i = 0; i < n ; i++){\r\n html += \"<tr>\";\r\n \r\n html += \"<td>\"+(i+1)+\"</td>\";\r\n html += \"<td>\";\r\n html += \"<div style='padding-left: 4px'>\";\r\n tam = 3;\r\n var nombre = registros[i][\"nombres_asoc\"]+\" \"+registros[i][\"apellidos_asoc\"]\r\n if(nombre.length>25){\r\n tam = 1; \r\n }\r\n html += \"<b><font face='Arial' size='\"+tam+\"' >\"+nombre+\"</font></b><br>\";\r\n html += \"<b>ZONA: </b>\"+registros[i]['zona_asoc']+\"<br>\";\r\n html += \"<b>TELF.: </b>\"+registros[i]['telefono_asoc'];\r\n html += \"</div>\";\r\n html += \"</td>\";\r\n html += \"<td>\";\r\n html += registros[i][\"codigo_asoc\"];\r\n html += \"</td>\";\r\n html += \"<td>\";\r\n html += registros[i][\"ci_asoc\"]+\" \"+registros[i][\"cudad\"];\r\n html += \"</td>\";\r\n html += \"<td>\";\r\n html += registros[i][\"direccion_asoc\"];\r\n html += \"</td>\";\r\n html += \"<td>\";\r\n html += registros[i][\"nit_asoc\"];\r\n html += \"</td>\";\r\n html += \"<td>\";\r\n html += registros[i][\"razon_asoc\"];\r\n html += \"</td>\";\r\n html += \"<td>\";\r\n html += registros[i][\"medidor_asoc\"];\r\n html += \"</td>\";\r\n html += \"<td>\";\r\n html += registros[i][\"servicios_asoc\"];\r\n html += \"</td>\";\r\n html += \"<td>\";\r\n html += registros[i][\"categoria_asoc\"];\r\n html += \"</td>\";\r\n html += \"<td>\";\r\n html += registros[i][\"estado\"];\r\n html += \"</td>\";\r\n html += \"<td>\";\r\n html += \"<a href='\"+base_url+\"asociado/edit/\"+registros[i]['id_asoc']+\"' class='btn btn-info btn-xs' title='Modificar datos'><span class='fa fa-pencil'></span></a>\";\r\n html += \"<a href='\"+base_url+\"imagen_asociado/catalogoasoc/\"+registros[i]['id_asoc']+\"' class='btn btn-soundcloud btn-xs' title='Catálogo de imagenes'><span class='fa fa-image'></span></a>\";\r\n /* html += \"<a class='btn btn-success btn-xs' data-toggle='modal' data-target='#modalecturar\"+registros[i][\"id_asoc\"]+\"' title='Lecturar'><span class='fa fa-file-text'></span></a>\";\r\n \r\n html += \"<!------------------------ INICIO modal para confirmar eliminación ------------------->\";\r\n html += \"<div class='modal fade' id='modalecturar\"+registros[i][\"id_asoc\"]+\"' tabindex='-1' role='dialog' aria-labelledby='myModalLabel\"+i+\"'>\";\r\n html += \"<div style='white-space: normal' class='modal-dialog' role='document'>\";\r\n html += \"<br><br>\";\r\n html += \"<div class='modal-content'>\";\r\n html += \"<div class='modal-header'>\";\r\n html += \"<button type='button' class='close' data-dismiss='modal' aria-label='Close'><span aria-hidden='true'>x</span></button>\";\r\n html += \"<div><span class='text-bold'>LECTURAR DE:</span><br>\";\r\n html += \"<span style='display: inherit; text-align: center !important'>\"+registros[i]['nombres_asoc']+\" \"+registros[i]['apellidos_asoc']+\"</span>\";\r\n html += \"</div>\";\r\n html += \"</div>\";\r\n html += \"<div class='modal-body'>\";\r\n html += \"<!------------------------------------------------------------------->\";\r\n html += \"<div class='col-md-12'>\";\r\n html += \"<div class='input-group' style='width: 100%'>\";\r\n html += \"<span class='input-group-addon' style='width: 20%'>Lect. Anterior</span>\";\r\n html += \"<div style='width: 70%' class='form-control' id='anterior_lec\"+registros[i]['id_asoc']+\"'>\"+registros[i]['ultima_lectura']+\"</div>\";\r\n //html += \"<input style='width: 70%' id='filtrar' type='text' class='form-control' onkeypress='buscar_asociado(event)' autocomplete='off' >\";\r\n html += \"</div>\";\r\n html += \"</div>\";\r\n html += \"<div class='col-md-12'>\";\r\n html += \"<div class='input-group' style='width: 100%'>\";\r\n html += \"<span class='input-group-addon' style='width: 20%'>Lect. Actual&nbsp;&nbsp;&nbsp;</span>\";\r\n html += \"<input style='width: 70%' id='actual_lec\"+registros[i]['id_asoc']+\"' type='text' class='form-control' onkeypress='calcular_consumo(event, \"+registros[i]['id_asoc']+\")' autocomplete='off' >\";\r\n html += \"</div>\";\r\n html += \"</div>\";\r\n html += \"<div class='col-md-12'>\";\r\n html += \"<div class='input-group' style='width: 100%'>\";\r\n html += \"<span class='input-group-addon' style='width: 20%'>Consumo&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>\";\r\n html += \"<div style='width: 70%' class='form-control' id='consumo_lec\"+registros[i]['id_asoc']+\"'></div>\";\r\n //html += \"<input style='width: 70%' id='filtrar' type='text' class='form-control' onkeypress='buscar_asociado(event)' autocomplete='off' >\";\r\n html += \"</div>\";\r\n html += \"</div>\";\r\n html += \"<div class='row' id='eldetalle\"+registros[i]['id_asoc']+\"'>\";\r\n html += \"</div>\";\r\n html += \"<input type='hidden' value='\"+registros[i]['fecha_anterior']+\"' id='fecha_anterior\"+registros[i]['id_asoc']+\"' >\";\r\n html += \"<!------------------------------------------------------------------->\";\r\n html += \"</div>\";\r\n html += \"<div class='modal-footer' style='text-align: center !important'>\";\r\n html += \"<a onclick='registrar_lectura(\"+registros[i]['id_asoc']+\")' class='btn btn-success'><span class='fa fa-check'></span> Registrar </a>\";\r\n html += \"<a href='#' class='btn btn-danger' data-dismiss='modal'><span class='fa fa-times'></span> Cancelar </a>\";\r\n html += \"</div>\";\r\n html += \"</div>\";\r\n html += \"</div>\";\r\n html += \"</div>\";\r\n html += \"<!------------------------ FIN modal para confirmar eliminación ------------------->\";\r\n */\r\n html += \"</td>\";\r\n \r\n html += \"</tr>\";\r\n\r\n }\r\n\r\n $(\"#tablaresultados\").html(html);\r\n document.getElementById('loader').style.display = 'none';\r\n }\r\n document.getElementById('loader').style.display = 'none'; //ocultar el bloque del loader\r\n },\r\n error:function(respuesta){\r\n // alert(\"Algo salio mal...!!!\");\r\n html = \"\";\r\n $(\"#tablaresultados\").html(html);\r\n },\r\n complete: function (jqXHR, textStatus) {\r\n document.getElementById('loader').style.display = 'none'; //ocultar el bloque del loader \r\n //tabla_inventario();\r\n }\r\n \r\n }); \r\n\r\n}", "function setValor(nombreDelCampo,valorDelCampo)\r\n{\r\n\t//\tSi esta siendo ejecutado para la fila de una tabla\r\n\tif(_bnEjecuntandoFuncionPorFilas_ESt)\r\n\t{\r\n\t\t//\tPasa el objeto del campo a una variable\r\n\t\tvar objetoCampo_ESt=_oTablaActual_ESt.objetoCampoTablaNoFilaNombCol[_filaActual_ESt][nombreDelCampo];\r\n\t\t//\tMira que objeto es\r\n\t\tswitch(objetoCampo_ESt.campo_ESt.queSon)\r\n\t\t{\r\n\t\t\tcase 'texto':\r\n\t\t\t\t//\tGuardamos el nuevo valor real\r\n\t\t\t\tobjetoCampo_ESt.valorReal=valorDelCampo;\r\n\t\t\t\t//\tColocamos lo que debe verse\r\n\t\t\t\tobjetoCampo_ESt.innerHTML=mascaraInput_ESt(objetoCampo_ESt.campo_ESt.tipo,valorDelCampo);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'input':\r\n\t\t\tcase 'select':\r\n\t\t\t\t//\tGuardamos el nuevo valor real\r\n\t\t\t\tobjetoCampo_ESt.valorReal=valorDelCampo;\r\n\t\t\t\t//\tColocamos lo que debe veres\r\n\t\t\t\tobjetoCampo_ESt.value=mascaraInput_ESt(objetoCampo_ESt.campo_ESt.tipo,valorDelCampo);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tobjetoCampo_ESt.value=valorDelCampo;\r\n\t\t}\r\n\t}\r\n\telse\r\n\t{\r\n\t\t//\tDevuelve el valor que hay\r\n\t\treturn document.getElementById(nombreDelCampo).value=valorDelCampo;\r\n\t}\r\n}", "function buscarPorColeccion(req, res) {\n\n // viene x los params de la url \n let busqueda = req.params.bus;\n let tabla = req.params.tabla;\n\n // busqueda es el parametro de la url \n // 'i' may y minus es insensible\n let regex = new RegExp(busqueda, 'i'); // aqui convertimos la busqueda con la ex regular\n\n let promesa;\n\n // busqueda contiene lo que busco \n // ej : coleccion/usuarios/manuel ===>>> colecccion/tabla/busqueda\n\n // pregunto por cada coleccion que viene en la tabla \n switch (tabla) {\n\n case 'usuarios':\n promesa = buscarUsuarios(busqueda, regex);\n break;\n\n case 'controles':\n promesa = buscarControles(busqueda, regex);\n break;\n\n case 'modulos':\n promesa = buscarModulos(busqueda, regex);\n break;\n\n case 'hospitales':\n promesa = buscarHospitales(busqueda, regex);\n break;\n\n case 'medicos':\n promesa = buscarMedicos(busqueda, regex);\n break; \n\n default:\n\n return res.status(400).json({\n ok: false,\n mensaje: 'los colecciones de busqueda solo son usuarios, modulos y controles',\n error: { message: 'tipo de coleccion/documento no valido' }\n })\n }\n\n // en ecma6 existe propiedades de obj computadas \n // ponemos tabla entre [] y nos da su valor , que puede ser usuarios medicos hospitales \n // si no lo ponemos entre [] imprime tabla \n\n promesa.then(data => {\n\n res.status(200).json({\n ok: true,\n [tabla]: data\n })\n })\n\n}", "function cargarEventos(){\r\n document.querySelector(\"#btnMuestroRegistro\").addEventListener(\"click\", mostrarRegistro);\r\n document.querySelector(\"#btnRegistrarse\").addEventListener(\"click\", registro);\r\n document.querySelector(\"#btnPaginaPrincipal\").addEventListener(\"click\", paginaPrincipal);\r\n document.querySelector(\"#btnMuestroIngresar\").addEventListener(\"click\", mostrarIngresar);\r\n document.querySelector(\"#btnAcceder\").addEventListener(\"click\", acceder);\r\n document.querySelector(\"#btnCierroSesion\").addEventListener(\"click\", paginaPrincipal);\r\n document.querySelector(\"#btnAsignarNivel\").addEventListener(\"click\", asignarNivel); \r\n document.querySelector(\"#btnMostrarXDocente\").addEventListener(\"click\", mostrarXDocente); \r\n document.querySelector(\"#selPerfil\").addEventListener(\"change\", alumnoRegistro);\r\n document.querySelector(\"#aAsignarNivel\").addEventListener(\"click\",mostrarAsignarNivel);\r\n document.querySelector(\"#aPlantearEje\").addEventListener(\"click\",mostrarPlantearEje);\r\n document.querySelector(\"#aDevoluciones\").addEventListener(\"click\",mostrarDevoluciones);\r\n document.querySelector(\"#aEstDocentes\").addEventListener(\"click\",mostrarEstDocente);\r\n document.querySelector(\"#aEjAlumnos\").addEventListener(\"click\", mostrarEjAlumnos);\r\n document.querySelector(\"#aEstAlumnos\").addEventListener(\"click\", mostrarEstAlumnos);\r\n document.querySelector(\"#aEntAlumnos\").addEventListener(\"click\", mostrarEntAlumnos);\r\n document.querySelector(\"#buscaEjAlumno\").addEventListener(\"click\", realizarBusqueda);\r\n document.querySelector(\"#subirEjercicio\").addEventListener(\"click\", plantearEj);\r\n document.querySelector(\"#btnMostrarEntregas\").addEventListener(\"click\", generarTablaEntregasSinDevolucion); \r\n document.querySelector(\"#btnMostrarAlumno\").addEventListener(\"click\",mostrarAlumnoConMasEjerciciosResueltos);\r\n document.querySelector(\"#btnEjeResueltos\").addEventListener(\"click\", mostrarCantEjResueltos);\r\n document.querySelector(\"#btnEjexNivel\").addEventListener(\"click\", mostrarEstAlumnosParaDocente);\r\n}", "function agregar_producto(id_prod, descrip) {\n var dataString = 'process=consultar_stock' + '&id_producto=' + id_prod;\n $.ajax({\n type: \"POST\",\n url: 'compras.php',\n data: dataString,\n dataType: 'json',\n success: function(data)\n {\n var cp = data.costop;\n var perecedero = data.perecedero;\n var select = data.select;\n var preciop = data.preciop;\n var unidadp = data.unidadp;\n var descripcionp = data.descripcionp;\n var exento =data.exento;\n var i=data.i;\n if (perecedero == 1)\n {\n caduca = \"<div class='form-group'><input type='text' class='datepicker form-control vence' value=''></div>\";\n }\n else\n {\n caduca = \"<input type='hidden' class='vence' value='NULL'>\";\n }\n var filas = 0;\n var id_previo = new Array();\n $(\"#inventable tr\").each(function(index) {\n //if($(this).hasClass('sear') == false)\n\t\t\t\t//{\n if (index >= 0) {\n var campo0 = \"\";\n $(this).children(\"td\").each(function(index2) {\n switch (index2) {\n case 0:\n campo0 = $(this).text();\n if (campo0 != undefined || campo0 != '') {\n id_previo.push(campo0);\n }\n break;\n }\n });\n filas = filas + 1;\n console.log(\"filas=\"+filas);\n }\n // } //if index>0\n });\n var unit = \"<input type='hidden' class='unidad' value='\" + unidadp + \"'>\";\n var tr_add = \"\";\n\n tr_add += \"<tr class='row100 head' id='\"+filas+\"'>\";\n tr_add += '<td class=\"cell100 column10 text-success id_p\">' + id_prod + '</td>';\n tr_add += '<td class=\"cell100 column20 text-success\">' + descrip + '</td>';\n tr_add += '<td class=\"cell100 column10 text-success\">' + select + '</td>';\n tr_add += '<td class=\"cell100 column10 text-success descp\">' + descripcionp + '</td>';\n tr_add += \"<td class='cell100 column10 text-success'><div>\" + unit + \"<input type='hidden' class='preciocanterior' value='\"+cp+\"'>\"+\"<input type='text' class='form-control precio_compra' value='\" + cp + \"' style='width:80px;'></div></td>\";\n tr_add += \"<td class='cell100 column10 text-success'><div>\"+\"<input type='hidden' class='exento' value='\"+exento+\"'>\"+\"<input type='hidden' class='preciovanterior' value='\"+preciop+\"'>\"+\"<input type='text' class='form-control precio_venta' value='\"+ preciop + \"' style='width:80px;'></div></td>\";\n tr_add += \"<td class='cell100 column10 text-success'><div><input type='text' id='cantidad' class='form-control cant' value='1' style='width:60px;'></div></td>\";\n tr_add += \"<td class='cell100 column10 text-success'>\" + caduca + '</td>';\n tr_add += '<td class=\"cell100 column10 text-success Delete\"><input id=\"delprod\" type=\"button\" class=\"btn btn-danger fa\" value=\"&#xf1f8;\"></td>';\n tr_add += '</tr>';\n if(i!=0)\n {\n if (id_prod != \"\")\n {\n $(\"#first\").remove();\n $(\"#inventable\").prepend(tr_add);\n\n $(\".sel\").select2();\n\n /*que no se vayan letras*/\n $(\".precio_compra\").numeric(\n {\n negative:false,\n decimalPlaces:5,\n });\n\n $(\".precio_venta\").numeric(\n {\n negative:false,\n decimalPlaces:5,\n });\n\n $(\".cant\").numeric(\n {\n decimal:false,\n negative:false,\n decimalPlaces:2,\n });\n }\n\n $(\"#inventable #\"+filas).find(\".sel\").select2(\"open\");\n filas++;\n }\n else\n {\n swal({\n title: \"Error, producto sin presentaciones?\",\n text: \"Si presiona OK sera redireccionado para asignar presentaciones y costos \",\n type: \"warning\",\n showCancelButton: true\n }, function() {\n // Redirect the user\n //window.location.href = \"\";\n window.open('editar_producto.php?id_producto='+id_prod, '_blank');\n });\n }\n totales();\n\n }\n\n });\n\n}", "function consultarTrasladoPresupuestario(idtraslado_presupuestario)\n{\n\n\tvar dataString = \t'idtraslado_presupuestario=' + idtraslado_presupuestario +\n\t\t\t\t\t\t'&ejecutar=consultar_traslado_presupuestario';\n\t$.ajax({\n\t\ttype: \"POST\",\n\t\turl: \"modulos/presupuesto/controlador/trasladoPresupuesto.controller.php\",\n\t\tdata: dataString,\n\t\tsuccess: function(response) {\n\n\t\t\trespuesta = response.split(\"|.|\");\n\t\t\tfecha = respuesta[2].split(\"-\");\n\t\t\tfecha_solicitud = fecha[2]+\"-\"+fecha[1]+\"-\"+fecha[0];\n\t\t\tfecha = respuesta[4].split(\"-\");\n\t\t\tfecha_resolucion = fecha[2]+\"-\"+fecha[1]+\"-\"+fecha[0];\n\n\t\t\t$('input#idTrasladoPresupuestario').val(idtraslado_presupuestario);\n\t\t\t$(\"input#numeroSolicitud\").val(respuesta[1]);\n\t\t\t$('input#datetimepicker1').val(fecha_solicitud);\n\t\t\t$('input#numeroResolucion').val(respuesta[3]);\n\t\t\t$('input#datetimepicker2').val(fecha_resolucion);\n\t\t\t$('#concepto').val(respuesta[5]);\n\t\t\t$('input#estado_oculto').val(respuesta[6]);\n\t\t\tswitch(respuesta[6]){\n\n\t\t\t\tcase 'elaboracion':\n\t\t\t\t\t$('input#estado_mostrado').val('En elaboración');\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'procesado':\n\t\t\t\t\t$('input#estado_mostrado').val('Procesado');\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'anulado':\n\t\t\t\t\t$('input#estado_mostrado').val('Anulado');\n\t\t\t\tbreak;\n\n\t\t\t}\n\t\t\t$('input#disminucionesBs').val(formatNumber.new(respuesta[7]));\n\t\t\t$('input#aumentosBs').val(formatNumber.new(respuesta[8]));\n\t\t\tmostrarDiv();\n\t\t\tmostrarPartidasDisminuidas(idtraslado_presupuestario);\n\t\t\tmostrarPartidasAumentadas(idtraslado_presupuestario);\n\t\t\tactualizarBotones();\n\t\t}\n\t});\n\n}", "formata_dados_v2( resposta_HANA ){\n const reducer = (r, row) => {\n \n const key_caminhao = `${row.ID} - ${row.Unidade} - ${row.Nome} - ${row.Placa} - ${row.Transportadora} - ${row.Modal} - ${row.Dia} - ${row.Transportadora} - ${row.Modal} -${row.Nome}`;\n const key_entrega = `${row.Item_pedido} - ${row.Cod_Material} - ${row.Material} - ${row.Remessa} - ${row.Dia} - ${row.N_nota_fiscal} - ${row.Peso}`;\n\n const caminhoes = {\n ID: parseInt(row.ID),\n Unidade: row.Unidade,\n Status: row.Status || 'Aguardando chegada do veículo',\n Nome: row.Nome,\n Placa: row.Placa,\n Transportadora: row.Transportadora,\n Modal: row.Modal,\n Dia: row.Dia,\n Material: row.Material,\n Materiais: {},\n Assinaturas: []\n };\n\n r[key_caminhao] = r[key_caminhao] || caminhoes;\n\n const entregas = {\n Item_pedido: row.Item_pedido,\n Cod_Material: row.Cod_Material,\n Material: row.Material,\n Remessa: row.Remessa,\n Dia: row.Dia,\n N_nota_fiscal: row.N_nota_fiscal,\n Peso: parseInt(row.Peso.replace('.', ''))\n };\n\n r[key_caminhao]['Materiais'][key_entrega] = r[key_caminhao]['Materiais'][key_entrega] || entregas;\n\n return r;\n };\n\n const organizado = resposta_HANA.reduce( (r, row) => reducer(r, row), {});\n\n const obj_organizado = Object.values(organizado);\n\n const obj_organizado_2 = obj_organizado.map( item => {\n item['Materiais'] = Object.values(item['Materiais']);\n\n return item\n });\n\n return obj_organizado_2;\n }", "function datos(numero1, numero2, secuencia) {\r\n this.numero_1 = numero1;\r\n this.numero_2 = numero2;\r\n this.secuencia = secuencia;\r\n}", "function nuevoAnuncio_validarCampos_inmueble() {\n\tif (!vacio($(\"#crearAnuncio_titulo\").val(), $(\"#crearAnuncio_titulo\").attr(\"placeholder\"))) {\n\t\tif (!vacio(($(\"#crearAnuncio_categoria\").val() != -1 ? $(\"#crearAnuncio_categoria\").val() : \"\"), $(\"#crearAnuncio_categoria option[value='-1']\").text())) {\n\t\t\tif (!vacio(($(\"#crearAnuncio_tipo\").val() != -1 ? $(\"#crearAnuncio_tipo\").val() : \"\"), $(\"#crearAnuncio_tipo option[value='-1']\").text())) {\n\t\t\t\tif (!vacio(($(\"#crearAnuncio_transaccion\").val() != -1 ? $(\"#crearAnuncio_transaccion\").val() : \"\"), $(\"#crearAnuncio_transaccion option[value='-1']\").text())) {\n\t\t\t\t\tif (!vacio($(\"#crearAnuncio_precio\").val(), $(\"#crearAnuncio_precio\").attr(\"placeholder\"))) {\n\t\t\t\t\t\t_precio = $(\"#crearAnuncio_precio\").val().replace(/\\$/g, \"\").replace(/,/g, \"\");\n\t\t\t\t\t\t$(\"#crearAnuncio_precio\").val(_precio);\n\t\t\t\t\t\tif (flotante($(\"#crearAnuncio_precio\").val(), $(\"#crearAnuncio_precio\").attr(\"placeholder\"))) {\n\t\t\t\t\t\t\tif (!vacio($(\"#crearAnuncio_calleNumero\").val(), $(\"#crearAnuncio_calleNumero\").attr(\"placeholder\"))) {\n\t\t\t\t\t\t\t\tif (!vacio(($(\"#crearAnuncio_estado\").val() != -1 ? $(\"#crearAnuncio_estado\").val() : \"\"), $(\"#crearAnuncio_estado option[value='-1']\").text())) {\n\t\t\t\t\t\t\t\t\tif (!vacio(($(\"#crearAnuncio_ciudad\").val() != -1 ? $(\"#crearAnuncio_ciudad\").val() : \"\"), $(\"#crearAnuncio_ciudad option[value='-1']\").text())) {\n\t\t\t\t\t\t\t\t\t\tif (!vacio(($(\"#crearAnuncio_colonia\").val() != -1 ? $(\"#crearAnuncio_colonia\").val() : \"\"), $(\"#crearAnuncio_colonia option[value='-1']\").text())) {\n\t\t\t\t\t\t\t\t\t\t\tif ($(\"#_crearAnuncioLatitud\").val() != \"\") {\n\t\t\t\t\t\t\t\t\t\t\t\tif (!vacio($(\"#crearAnuncio_descripcion\").val(), $(\"#crearAnuncio_descripcion\").attr(\"placeholder\"))) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (!vacio(($(\"#crearAnuncio_usuario\").val() != -1 ? $(\"#crearAnuncio_usuario\").val() : \"\"), $(\"#crearAnuncio_usuario option[value='-1']\").text())) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar continuar = true;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (parseInt($(\"#idInmueble2\").val()) == -1) {//nuevo\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ($(\"#imagenesTemporales .bloqueImagen\").length == 0) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\talert(\"Ingrese al menos una imágen para el inmueble\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif($(\"input[name='radioImagenPrincipal']:checked\").length == 0) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\talert(\"Selecciona una imágen como la principal\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telse {//modificar\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif($(\"input[name='radioImagenPrincipal']:checked\").length == 0) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\talert(\"Selecciona una imágen como la principal\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!isVacio($(\"#crearAnuncio_dimesionTotal\").val())) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!flotante($(\"#crearAnuncio_dimesionTotal\").val(), $(\"#crearAnuncio_dimesionTotal\").attr(\"placeholder\"))) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!isVacio($(\"#crearAnuncio_dimensionConstruida\").val())) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!flotante($(\"#crearAnuncio_dimensionConstruida\").val(), $(\"#crearAnuncio_dimensionConstruida\").attr(\"placeholder\"))) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!isVacio($(\"#crearAnuncio_cuotaMantenimiento\").val())) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t_precio = $(\"#crearAnuncio_cuotaMantenimiento\").val().replace(/\\$/g, \"\").replace(/,/g, \"\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$(\"#crearAnuncio_cuotaMantenimiento\").val(_precio);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!flotante($(\"#crearAnuncio_cuotaMantenimiento\").val(), $(\"#crearAnuncio_cuotaMantenimiento\").attr(\"placeholder\"))) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!isVacio($(\"#crearAnuncio_elevador\").val())) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!entero($(\"#crearAnuncio_elevador\").val(), $(\"#crearAnuncio_elevador\").attr(\"placeholder\"))) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!isVacio($(\"#crearAnuncio_estacionamientoVisitas\").val())) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!entero($(\"#crearAnuncio_estacionamientoVisitas\").val(), $(\"#crearAnuncio_estacionamientoVisitas\").attr(\"placeholder\"))) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!isVacio($(\"#crearAnuncio_numeroOficinas\").val())) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!entero($(\"#crearAnuncio_numeroOficinas\").val(), $(\"#crearAnuncio_numeroOficinas\").attr(\"placeholder\"))) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!isVacio($(\"#crearAnuncio_metrosFrente\").val())) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!flotante($(\"#crearAnuncio_metrosFrente\").val(), $(\"#crearAnuncio_metrosFrente\").attr(\"placeholder\"))) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!isVacio($(\"#crearAnuncio_metrosFondo\").val())) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!flotante($(\"#crearAnuncio_metrosFondo\").val(), $(\"#crearAnuncio_metrosFondo\").attr(\"placeholder\"))) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!isVacio($(\"#crearAnuncio_cajonesEstacionamiento\").val())) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!entero($(\"#crearAnuncio_cajonesEstacionamiento\").val(), $(\"#crearAnuncio_cajonesEstacionamiento\").attr(\"placeholder\"))) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//solo para casas y departamentos: wcs y recamaras son obligatorios\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ((parseInt($(\"#crearAnuncio_tipo\").val()) == 1) || (parseInt($(\"#crearAnuncio_tipo\").val()) == 2)) {//casa o departamento\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!vacio(($(\"#crearAnuncio_wcs\").val() != -1 ? $(\"#crearAnuncio_wcs\").val() : \"\"), $(\"#crearAnuncio_wcs option[value='-1']\").text())) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (vacio(($(\"#crearAnuncio_recamaras\").val() != -1 ? $(\"#crearAnuncio_recamaras\").val() : \"\"), $(\"#crearAnuncio_recamaras option[value='-1']\").text()))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!isVacio($(\"#crearAnuncio_codigo\").val())) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$.ajax({\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\turl: \"lib_php/updInmueble.php\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype: \"POST\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdataType: \"json\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tid: $(\"#idInmueble2\").val(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalidarCodigo: 1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tusuario: $(\"#crearAnuncio_usuario\").val(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcodigo: $(\"#crearAnuncio_codigo\").val()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}).always(function(respuesta_json){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (respuesta_json.isExito == 1) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnuevoAnuncio_save();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\talert(respuesta_json.mensaje);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (continuar) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnuevoAnuncio_save();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\talert(\"Agrege la posición del inmueble en el mapa.\");\n\t\t\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t\t\t}\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\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}\n\t\t\t}\n\t\t}\n\t}\n}", "function cargarEditar(posicion){\n\n document.getElementById('cedula').value= returnArr[posicion].cedula;\n document.getElementById('apellido').value= returnArr[posicion].apellido;\n document.getElementById('email').value= returnArr[posicion].email;\n document.getElementById('nombre').value= returnArr[posicion].nombre;\n document.getElementById('telefono').value= returnArr[posicion].telefono;\n document.getElementById('key_empleado').value= returnArr[posicion].key;\n\n mostrarExistente();\n}", "function cargarEditUsr(){\n\t//debugger;\n\t// parseo los usuarios para obtener los arreglos\n\tvar usuario_nombre = JSON.parse(localStorage.getItem(\"usuarios\"));\n\t// le asigno a la variable modificar el id que esta actualmente\n\tmodificar = JSON.parse(localStorage.getItem(\"id\"));\n\t// recorro el arreglo de arreglos\n\tfor (var i = 0; i < usuario_nombre.length; i++) {\n\t\t// recorro cada uno de los arreglos\n\t\tfor (var j = 0; j < usuario_nombre[i].length; j++) {\n\t\t\t// pregunto que si modificar es igual al id actual\n\t\t\tif(modificar == usuario_nombre[i][j]){\n\t\t\t\t// si es asi, a la variable da1 le asigno el valor de la posicion 0\n\t\t\t\tda1 = usuario_nombre[i][j];\n\t\t\t\t//a la variable da2 le asigno el valor de la posicion 1\n\t\t\t\tda2 = usuario_nombre[i][j+1];\n\t\t\t\t//a la variable da3 le asigno el valor de la posicion 2\n\t\t\t\tda3 = usuario_nombre[i][j+2];\n\t\t\t\t//a la variable da4 le asigno el valor de la posicion 3\n\t\t\t\tda4 = usuario_nombre[i][j+3];\n\t\t\t\t//a la variable da5 le asigno el valor de la posicion 4\n\t\t\t\tda5 = usuario_nombre[i][j+4];\n\t\t\t\t// luego obtengo el input respectivo y le asigno el valor correspondiente\n\t\t\t\tdocument.getElementById(\"numero\").value = da1;\n\t\t\t\t// luego obtengo el input respectivo y le asigno el valor correspondiente\n\t\t\t\tdocument.getElementById(\"fullName\").value = da2;\n\t\t\t\t// luego obtengo el input respectivo y le asigno el valor correspondiente\n\t\t\t\tdocument.getElementById(\"user\").value = da3;\n\t\t\t\t// luego obtengo el input respectivo y le asigno el valor correspondiente\n\t\t\t\tdocument.getElementById(\"password\").value = da4;\n\t\t\t\t// luego obtengo el input respectivo y le asigno el valor correspondiente\n\t\t\t\tdocument.getElementById(\"password_repeat\").value = da5;\n\t\t\t}\n\t\t};\n\n\t}\n}", "function dadosCadastro() {\n\tif (localStorage.cont) {\n localStorage.cont = Number(localStorage.cont)+1;\n } else {\n localStorage.cont = 1;\n }\n var nomeCompleto=document.getElementById(\"nomeCompleto\").value;\n var cpf=document.getElementById(\"cpf\").value;\n var rg=document.getElementById(\"rg\").value;\n var orgaoEmissor=document.getElementById(\"orgaoEmissor\").value;\n\n //formatação da data\n var dtNascimento=document.getElementById(\"dtNascimento\").value;\n var data = new Date(dtNascimento);\n\t var dataFormatada = data.toLocaleDateString('pt-br', {timeZone: 'UTC'});\n\t//final formatação\n\n var rua=document.getElementById(\"rua\").value;\n var numeroDaCasa=document.getElementById(\"numeroDaCasa\").value;\n \tvar bairro=document.getElementById(\"bairro\").value;\n \tvar cidade=document.getElementById(\"cidade\").value;\n \tvar estado=document.getElementById(\"estado\").value;\n \tvar cep=document.getElementById(\"cep\").value;\n \tvar telefone=document.getElementById(\"telefone\").value;\n \tvar celular=document.getElementById(\"celular\").value;\n \tvar celular2=document.getElementById(\"celular2\").value;\n \tvar materiaParaEnsinar=Number(document.getElementById(\"materiaParaEnsinar\").value);\n \tvar totalMaterias=[\"matematica\",\"portugues\",\"geo\"];\n \tvar anosEnsinando=document.getElementById(\"anosEnsinando\").value;\n \tvar cadastroEmail=document.getElementById(\"cadastroEmail\").value;\n var cadastroSenha=document.getElementById(\"cadastroSenha\").value;\n localStorage.setItem(\"nomeCompleto_\"+localStorage.cont,nomeCompleto);\n\t localStorage.setItem(\"cpf_\"+localStorage.cont,cpf);\n localStorage.setItem(\"rg_\"+localStorage.cont,rg);\n\t localStorage.setItem(\"orgaoEmissor_\"+localStorage.cont,orgaoEmissor);\n\t localStorage.setItem(\"dtNascimento_\"+localStorage.cont,dtNascimento);\n\t localStorage.setItem(\"rua_\"+localStorage.cont,rua);\n\t localStorage.setItem(\"numeroDaCasa_\"+localStorage.cont,numeroDaCasa);\n\t localStorage.setItem(\"bairro_\"+localStorage.cont,bairro);\n\t localStorage.setItem(\"cidade_\"+localStorage.cont,cidade);\n\t localStorage.setItem(\"estado_\"+localStorage.cont,estado);\n\t localStorage.setItem(\"cep_\"+localStorage.cont,cep);\n\t localStorage.setItem(\"telefone_\"+localStorage.cont,telefone);\n\t localStorage.setItem(\"celular_\"+localStorage.cont,celular);\n\t localStorage.setItem(\"celular2_\"+localStorage.cont,celular2); \n \tlocalStorage.setItem(\"materiaParaEnsinar_\"+localStorage.cont,totalMaterias[0]);\n\t localStorage.setItem(\"anosEnsinando_\"+localStorage.cont,anosEnsinando);\n\t localStorage.setItem(\"email_\"+localStorage.cont,cadastroEmail);\n\t localStorage.setItem(\"senha_\"+localStorage.cont,cadastroSenha);\n}", "function cambiar(){\n \t var compania;\n \t //Se toma el valor de la \"compañia seleccionarda\"\n \t compania = document.formulariorecargas.compania[document.formulariorecargas.compania.selectedIndex].value;\n \t //se chequea si la \"compañia\" esta definida\n \t \n \t if(compania!=0){\n \t\t //Seleccionamos las cosas correctas\n \t\t \n \t\t mis_tipos=eval(\"tipo_\" + compania);\n \t\t //se calcula el numero de compania\n \t\t num_tipos=mis_tipos.length;\n \t\t //marco el numero de tipos en el select\n \t\t document.formulariorecargas.tipo.length = num_tipos;\n \t\t //para cada tipo del array, la pongo en el select\n \t\t for(i=0; i<num_tipos; i++){\n \t\t\t document.formulariorecargas.tipo.options[i].value=mis_tipos[i];\n \t\t\t document.formulariorecargas.tipo.options[i].text=mis_tipos[i];\n \t\t }\n \t\t \n \t\t }else{\n \t\t\t //sino habia ningun tipo seleccionado,elimino las cosas del select\n \t\t\t document.formulariocompania.tipo.length = 1;\n \t\t\t //ponemos un guion en la unica opcion que he dejado\n \t\t\t document.formulariorecargas.tipo.options[0].value=\"seleccionar\";\n \t\t\t document.formulariorecargas.tipo.options[0].text=\"seleccionar\";\n \t\t\t \n \t\t }\n \t \n \t\n \t \n \t \n \t\t //hacer un reset de los tipos\n \t document.formulariorecargas.tipo.options[0].selected=true;\n\n }", "function calcola_datan2(lingua){\n\n // parametri lingua= \"ITA\" - \"ING\" \n // by Salvatore Ruiu Irgoli-Sardegna (Italy) dicembre 2009.\n // utilizzo caratteri speciali ANSI.\n // restituisce la stringa DataIns.\n \n\t \n\tvar DataInsn=\".\";\n \n var data=new Date();\n\n var anno =data.getYear(); // anno\n var mese =data.getMonth(); // mese 0 a 11 \n var giorno=data.getDate(); // numero del giorno da 1 a 31\n var giorno_settimana=data.getDay(); // giorno della settimana 0 a 6\n var ora =data.getHours(); // ora del giorno da 0 a 23\n var minuti=data.getMinutes(); // minuti da 0 a 59\n var secondi=data.getSeconds(); // secondi da 0 a 59\n \n if (anno<1900) { anno=anno+1900; } // correzione anno\n\n if (ora<10){ ora='0'+ora;}\n \n if (minuti<10){minuti='0'+minuti;}\n\n if (secondi<10) {secondi='0'+secondi;}\n\n mese=mese+1;\n\n if (lingua==\"ING\") { DataInsn=mese+\":\"+giorno+\":\"+anno+\":\"+ora+\":\"+minuti+\":\"+secondi }\n else { DataInsn=giorno+\":\"+mese+\":\"+anno+\":\"+ora+\":\"+minuti+\":\"+secondi }\n\n return DataInsn;\n }", "function inicializartipos(datos) {\n \n let editartiposif = document.getElementById('tipo1informacionpersonaleditar');\n let id;\n let tipo;\n \n datos[0]['idtipodireccionseccional'] ? tipo = \"Dirección Seccional\" : tipo = \"Actividad Economica\";\n\n editartiposif.innerHTML = `\n <option selected=\"true\" disabled=\"disabled\" class=\"noselected\">Seleccione el tipo de ${tipo}</option>`;\n datos.forEach(tipos => {\n tipos['idtipodireccionseccional'] ? id = tipos['idtipodireccionseccional'] : id = tipos['idtipoactividad'];\n editartiposif.innerHTML += `<option value=\"${id}\">${tipos['nombre']}</option>`;\n });\n\n}", "function controllaDati() {\r\n\t\tvar err=false;\r\n\t\tvar check=true;\r\n\t\tvar elem = document.getElementById(\"nomeRicetta\");\r\n\t\tif(elem.value.length == 0) {\r\n\t\t\t\tdocument.getElementById(\"nomeRicettaErr\").innerHTML= \"Inserisci il titolo\";\r\n\t\t\t\terr=true;\r\n\t\t\t\tcheck=false;\r\n\t\t} else {\r\n\t\t\t\tdocument.getElementById(\"nomeRicettaErr\").innerHTML= \"\";\r\n\t\t}\r\n\t\telem = document.getElementById(\"nomeAutore\");\r\n\t\tif( elem.value.length==0 ) {\r\n\t\t\t\tdocument.getElementById(\"nomeAutoreErr\").innerHTML= \"Inserisci il nome dell'autore\";\r\n\t\t\t\terr=true;\r\n\t\t\t\tcheck=false;\r\n\t\t} else {\r\n\t\t\t\tdocument.getElementById(\"nomeAutoreErr\").innerHTML= \"\";\r\n\t\t}\r\n\t\telem = document.getElementById(\"areaProcedimento\");\r\n\t\tif( elem.value.length==0 ) {\r\n\t\t\t\tdocument.getElementById(\"areaProcedimentoErr\").innerHTML= \"Inserisci il procedimento\";\r\n\t\t\t\terr=true;\r\n\t\t\t\tcheck=false;\r\n\t\t} else {\r\n\t\t\t\tdocument.getElementById(\"areaProcedimentoErr\").innerHTML= \"\";\r\n\t\t}\r\n\t\telem = document.getElementById(\"ingrediente0\");\r\n\t\tif( elem.value.length==0 ) {\r\n\t\t\t\tdocument.getElementById(\"ingrediente0Err\").innerHTML= \"<p>Inserisci almeno il primo ingrediente</p>\";\r\n\t\t\t\terr=true;\r\n\t\t\t\tcheck=false;\r\n\t\t} else {\r\n\t\t\t\tdocument.getElementById(\"ingrediente0Err\").innerHTML= \"\";\r\n\t\t}\r\n\t\telem = document.getElementById(\"quantita0\");\r\n\t\tif( isNaN(elem.value) || parseInt(elem.value)<0 || parseInt(elem.value) > 9999) {\r\n\t\t\t\tdocument.getElementById(\"quantitaN0Err\").innerHTML= \"La quantità deve essere numerica\";\r\n\t\t\t\terr=true;\r\n\t\t\t\tcheck=false;\r\n\t\t} else {\r\n\t\t\t\tdocument.getElementById(\"quantitaN0Err\").innerHTML= \"\";\r\n\t\t}\r\n\t\tif (check==false) {\r\n\t\t\treturn !err;\r\n\t\t}\r\n\t\t\r\n}", "function gps_verificarParametrosConsulta() {\n\n if (!cambioParametros) {\n\n var fechaIni_con = document.getElementById(\"fechaIni_con\");\n var fechaFin_con = document.getElementById(\"fechaFin_con\");\n var placa_con = document.getElementById(\"placa_con\");\n var grupo_con = document.getElementById(\"grupo_con\");\n var fechaPred_con = document.getElementById(\"fechaPred_con\");\n\n if (grupo_con != null && grupo_con.value != \"\") {\n gps_selectElement(\"sgrupo\", grupo_con.value, NORMAL);\n } else if (placa_con != null && placa_con.value != \"\") {\n gps_selectElement(\"splaca\", placa_con.value, INDEXOF);\n } \n if (fechaPred_con != null && \n parseInt(fechaPred_con.value) > 0) {\n gps_selectElement(\"sfecha\", fechaPred_con.value, NORMAL);\n }\n\n if (fechaIni_con.value != \"\" && fechaFin_con.value != \"\") {\n document.getElementById(\"fechaInicio\").value = fechaIni_con.value;\n document.getElementById(\"fechaFinal\").value = fechaFin_con.value;\n }\n } \n}", "function modificado(t) {\n datos();\n}", "interpretarContenido(texto) {\n listaErrores = new Array();\n if (texto == null)\n return document.write('Error');\n try {\n const analizador = src_app_Backend_XML_Analizador_GramaticaXML__WEBPACK_IMPORTED_MODULE_2__;\n const objetos = analizador.parse(texto);\n const tablaGlobal = new src_app_Backend_XML_Analizador_Simbolos_tablaSimbolos__WEBPACK_IMPORTED_MODULE_1__[\"default\"]();\n var Tree = new src_app_Backend_XML_Analizador_Simbolos_Arbol__WEBPACK_IMPORTED_MODULE_6__[\"default\"]([objetos]);\n Tree.settablaGlobal(tablaGlobal);\n console.log(tablaGlobal);\n // PARA GUARDAR DATOS\n // TODO FOR INTERPRETAR\n for (let i of Tree.getinstrucciones()) {\n if (i instanceof src_app_Backend_XML_Analizador_Expresiones_Objeto__WEBPACK_IMPORTED_MODULE_10__[\"default\"]) {\n var objetito = i.interpretar(Tree, tablaGlobal); //retorna simbolo\n tablaGlobal.setVariable(objetito);\n }\n }\n console.log(tablaGlobal);\n for (var [key, value] of tablaGlobal.tablaActual) {\n //alert(key + \" = \" + value);\n var atributos = \"\";\n var listaobjetitos = \"\";\n var contenido = \"\";\n var nombre = key;\n for (var [key2, value2] of value.getAtributo()) {\n //alert(key + \" = \" + value);\n atributos += `${key2}=>${value2}, `;\n }\n let objetos = value.getvalor();\n if (objetos instanceof src_app_Backend_XML_Analizador_Simbolos_tablaSimbolos__WEBPACK_IMPORTED_MODULE_1__[\"default\"]) {\n for (var [key3, value3] of objetos.tablaActual) {\n //alert(key + \" = \" + value);\n listaobjetitos += `${key3}, `;\n }\n this.llenarTablaSimbolos(objetos, Tree);\n }\n else {\n contenido = objetos.replaceAll(\"%20\", \" \");\n }\n var Reporte = new src_app_Backend_XML_Analizador_Reportes_reporteTabla__WEBPACK_IMPORTED_MODULE_11__[\"reporteTabla\"](nombre, contenido, atributos, listaobjetitos);\n Tree.listaSimbolos.push(Reporte);\n }\n // TERMINA FOR \n var init = new src_app_Backend_XML_Analizador_Abstracto_nodoAST__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"RAIZ\");\n var instrucciones = new src_app_Backend_XML_Analizador_Abstracto_nodoAST__WEBPACK_IMPORTED_MODULE_8__[\"default\"](\"HIJOS\");\n for (let i of Tree.getinstrucciones()) {\n instrucciones.agregarHijoAST(i.getNodo());\n }\n for (let i of Tree.getinstrucciones()) {\n if (i instanceof src_app_Backend_XML_Analizador_Excepciones_NodoErrores__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n listaErrores.push(i);\n }\n }\n init.agregarHijoAST(instrucciones);\n let sim_string = JSON.stringify(init);\n localStorage.setItem(\"simbolos\", sim_string);\n const gramat = src_app_Backend_XML_Analizador_XMLgraph__WEBPACK_IMPORTED_MODULE_5__;\n const gramar = gramat.parse(texto);\n localStorage.setItem(\"gramatica\", gramar);\n console.log(listaErrores);\n let errores = JSON.stringify(listaErrores);\n localStorage.setItem(\"errores\", errores);\n var reco = Tree.getSimbolos();\n let tabla = JSON.stringify(reco);\n localStorage.setItem(\"symbol\", tabla);\n /**M A N E J O E R R O R S I N T A C T I C O */\n let errorsito = src_app_Backend_XML_Analizador_GramaticaXML__WEBPACK_IMPORTED_MODULE_2__;\n let errorts = errorsito.parse(texto);\n //console.log(listaErrores);\n }\n catch (error) {\n if (error instanceof ReferenceError) {\n let errores = JSON.stringify(listaErrores);\n localStorage.setItem(\"errores\", errores);\n }\n }\n finally {\n let errores = JSON.stringify(listaErrores);\n localStorage.setItem(\"errores\", errores);\n }\n //console.log(gramar);\n }", "function gridFormata(celula,formato, grid, coluna){\n\n\tcelula.val = celula.getValue();\n\tcelula.obj = document.createElement(\"input\");\n\tcelula.obj.id = \"celulaEditada\";\n\tcelula.obj.style.width = \"100%\";\n\tcelula.obj.style.height = (celula.cell.offsetHeight-4)+\"px\";\n\tcelula.obj.style.border = \"0px\";\n\tcelula.obj.style.margin = \"0px\";\n\tcelula.obj.style.padding = \"0px\";\n\tcelula.obj.style.overflow = \"hidden\";\n\tcelula.obj.style.fontSize = \"12px\";\n\tcelula.obj.style.fontFamily = \"Arial\";\n\tcelula.obj.style.textAlign = celula.cell.align;\n\tcelula.obj.className = formato;\n\tcelula.obj.value = celula.val\n\tcelula.cell.innerHTML = \"\";\n\tcelula.cell.appendChild(celula.obj);\n\tformata(celula.obj, grid, coluna);\n\t\n\tcelula.obj.setAttribute(\"timer\",setTimeout(function(){funcSetaFoco(celula.obj);},100));\n}", "function busca_dados_CONFTXT(nome_arquivo){\n\t\t\n\t\t//var codigo_projeto = $(\"#projeto\").val();\t\t\n\t\t$.get('controle-dados.php?action=carrega_dados_CONFTXT&nome_arquivo='+nome_arquivo,\n\t\t\tfunction(data){\n\t\t\t\n\t\t\t\tif(data != \"\"){\n\t\t\t\t\t\t\tvar dados = eval(data);\t\t\t\n\t\t\t\t\t\t\tfor(campo in dados){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$(\"#\"+ campo).html( dados[campo] );\n\t\t\t\t\t\t\t\t\t\t$(\"input[name='\" + campo + \"' ]\").val( dados[campo] );\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t//if(\"#\"+FONE_CELULAR == \"\"){ $(\"#FONE_CELULAR\").html(dados.FONE_FIXO); }\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$(\"#logo_cliente\").html( dados.TITULO_PAGINA);\n\t\t\t\t\t\t\t\t\t\t$(\"meta[name='keywords']\").html( dados.PALAVRAS_CHAVE);\t\t\n\t\t\t\t\t\t\t\t\t\t$(\"#palavras_chave\").html( dados.PALAVRAS_CHAVE);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$(\"#email\").html( dados.EMAIL);\n\t\t\t\t\t\t\t\t\t\t$(\"#dados_endereco\").html( dados.ENDERECO_COMERCIAL);\n\t\t\t\t\t\t\t\t\t\t$(\"#dados_fone_fixo\").html( dados.FONE_FIXO);\n\t\t\t\t\t\t\t\t\t\t$(\"#dados_fone_celular\").html( dados.FONE_CELULAR);\n\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$(\"#div_cabecalho\").css(\"background-image\",\"url(\"+ dados.IMAGEM_BANNER +\")\");\n\t\t\t\t\t\t\t\t\t\t$(\".navbar\").css(\"background-color\", dados.COR_PRIMARIA);\n\t\t\t\t\t\t\t\t\t\t$(\".div_barra\").css(\"background-color\", dados.COR_PRIMARIA);\n\t\t\t\t\t\t\t\t\t\t$(\".footer\").css(\"background-color\", dados.COR_PRIMARIA);\n\t\t\t\t\t\t\t\t\t\t$(\".imagem_div i\").css(\"color\", dados.COR_PRIMARIA);\n\t\t\t\t\t\t\t\t\t\t$(\"#div_cabecalho h1, #div_cabecalho h2\").css(\"color\", dados.COR_LINKHOVER);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$(\"body\").css(\"background-color\", dados.COR_SECUNDARIA);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tcarrega_REDESOCIAL(\"CONF.txt\");\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t});\n\t\t\n\t}", "function CrearNota() {\n var id = document.getElementById(\"idArticulo\").value; //Obtiene el valor de Clave\n var FechaRecibo = document.getElementById(\"FechaRecibo\").value; //Obtiene el valor de Clave\n var Recibe = document.getElementById(\"Recibe\").value; //Obtiene el valor de Clave\n var ProductoSalida = document.getElementById(\"ProductoSalida\").value; //Obtiene el valor de Clave\n var Cantidad = document.getElementById(\"Cantidad\").value; //Obtiene el valor de Clave\n var Ubicacion = document.getElementById(\"Ubicacion\").value; //Obtiene el valor de Clave\n\n var OCCOmpras = document.getElementById(\"OCCOmpras\").value; //Obtiene el valor de Clave\n var OT = document.getElementById(\"OT\").value; //Obtiene el valor de Clave\n var POCliente = document.getElementById(\"POCliente\").value; //Obtiene el valor de Clave\n var ENS = document.getElementById(\"ENS\").value; //Obtiene el valor de Clave\n\n var Arreglo = [id, OCCOmpras, OT, ProductoSalida, POCliente, ENS, Cantidad, Ubicacion, FechaRecibo, Recibe];\n\n var Condicion = true; //para campos vacios\n for (var a in Arreglo) { //recorrer arreglo en busca de campos vacios\n if (Arreglo[a].length == 0) {\n Condicion = false; //si algun campo esta vacio cambia a falso\n alert(\"Faltan campos por llenar\")\n }\n }\n\n if (Condicion == true) { //si todos los campos estan llenos avanza\n var TablaAlmacen = document.getElementById('TablaSalidas').getElementsByTagName('tbody')[0];\n // inserta una fila al final de la tabla\n var newRow = TablaAlmacen.insertRow(TablaAlmacen.rows.length);\n let indice = (TablaAlmacen.rows.length + 1);\n newRow.setAttribute(\"id\", \"fila\" + indice); //se asigna id al incrementar cada fila +1 para contar el encabezado\n for (var x = 0; x < Arreglo.length; x++) {\n\n // inserta una celda en el indice 0\n var newCell = newRow.insertCell(x);\n // adjuntar el texto al nodo\n var newText = document.createTextNode(Arreglo[x]);\n newCell.appendChild(newText);\n if (x == 7) { //Si termina de registrar datos crear el boton\n var newCell = newRow.insertCell(8); //CREAR CELDA onclick=\"CrearNota()\"\n newCell.innerHTML = '<button id=\"' + x + '\" class=\"btn btn-danger\" name=\"btn\" onclick=\"EliminarFila(' + indice + ')\"> <i class=\"far fa-minus-square\"></i> </button>';\n }\n }\n //document.getElementById(\"RegistroSalida\").reset();\n document.getElementById(\"ProductoSalida\").value = \"\";\n document.getElementById(\"Cantidad\").value = \"\";\n }\n}", "function busca(busca) {\n $.ajax({\n type: \"POST\",\n url: \"acoes/select.php\",\n dataType: \"json\",\n data: {//tipo de dado\n 'busca':\"busca\"//botão pra inicia a ação\n }\n\n }).done(function (resposta) { //receber a resposta do busca\n console.log('encontrei ' + resposta.quant + ' registros');\n console.log(resposta.busca[0,'0'].id, resposta.busca[0,'0'].descri);\n if(resposta.erros){\n\n //criação das variaves apos o receber a resposta da pagina select\n for (let i = 0; i < resposta.quant; i++) {\n var id = resposta.busca[i]['0']\n var desc = resposta.busca[i]['1']\n var mar = resposta.busca[i]['2']\n var mod = resposta.busca[i]['3']\n var tpv = resposta.busca[i]['4']\n var qntp = resposta.busca[i]['5']\n var vlv = resposta.busca[i]['6']\n var vlc = resposta.busca[i]['7']\n var dtc = resposta.busca[i]['8']\n var st = resposta.busca[i]['9']\n //criação da tabela para exebição do resultado\n $('.carro td.descri').append(\" <tr><td ><p class=' text-capitalize id='des' value='\"+desc+\"'>\"+desc +'</p></td></tr>')\n $('.carro td.marca').append(\" <tr><td ><p class=' text-capitalize id='mar' value='\"+mar+\"'>\"+mar +'</p></td></tr>')\n $('.carro td.modelo').append(\" <tr><td ><p class=' text-capitalize id='mod' value='\"+mod+\"'>\"+mod +'</p></td></tr>')\n $('.carro td.tipov').append(\" <tr><td ><p class=' text-capitalize id='tpv' value='\"+tpv+\"'>\"+tpv +'</p></td></tr>')\n $('.carro td.quantp').append(\" <tr><td ><p class=' text-capitalize id='qnt' value='\"+qntp+\"'>\"+qntp +'</p></td></tr>')\n $('.carro td.vlvenda').append(\" <tr><td ><p class=' text-capitalize id='vlv' value='\"+vlv+\"'>\"+vlv +'</p></td></tr>')\n $('.carro td.vlcompra').append(\" <tr><td ><p class=' text-capitalize id='vlc' value='\"+vlc+\"'>\"+vlc +'</p></td></tr>')\n $('.carro td.dtcompra').append(\" <tr><td ><p class=' text-capitalize id='dtc' value='\"+dtc+\"'>\"+dtc +'</p></td></tr>')\n $('.carro td.estato').append(\" <tr><td ><p class=' text-capitalize id='st' value='\"+st+\"'>\"+st +'</p></td></tr>')\n $('.carro td.id').append(\" <tr><td ><button class='r btn btn-sm btn-primary nav-link' id='idvalor' type='button' data-toggle='modal' data-target='#atualFormulario' value='\"+id+\"'>\"+\"Edit\"+'</button></td></tr>')\n $('.carro td.ider').append(\"<tr><td ><button class='del btn btn-sm btn-danger nav-link' type='button' name='idel' value='\"+id+\"'>\"+\"Del\"+'</button></td></tr>')\n\n\n }\n\n\n //função pra por valores da tabela no input do formulario de atualização\n //aqui insere os o ID no formulario de atualização\n $('.r').click('button',function() {\n var idvl = $(this).val();\n $('#i1'). val(idvl);\n for (let i = 0; i < resposta.quant; i++) {\n var id = resposta.busca[i]['0']\n var desc = resposta.busca[i]['1']\n var mar = resposta.busca[i]['2']\n var mod = resposta.busca[i]['3']\n var tpv = resposta.busca[i]['4']\n var qnt = resposta.busca[i]['5']\n var vlv = resposta.busca[i]['6']\n var vlc = resposta.busca[i]['7']\n var dtc = resposta.busca[i]['8']\n var sta = resposta.busca[i]['9']\n //aqui comparamos o valor que recuperamos o id da tabela e comparfamos com o id da função busca\n if (idvl==id) {\n $('#descri1'). val(desc);\n $('#marca1'). val(mar);\n $('#modelo1'). val(mod);\n $('#tipov1'). val(tpv);\n $('#quantp1'). val(qnt);\n $('#vlvenda1'). val(vlv);\n $('#vlcompra1'). val(vlc);\n $('#dtcompra1'). val(dtc);\n $('#estato1'). val(sta);\n console.log(idvl);\n\n }\n\n\n\n\n\n }\n })\n //aqui finda\n\n //deleta via ajax\n $('.del').click('button',function() {\n var idel = $(this).val();\n console.log(idel);\n $.ajax({\n url: \"acoes/del.php\",\n type: \"POST\",\n data : { 'idel': idel },\n success: function(data)\n {\n location.reload(\".carro\");//atualiza o contener apos a execução com sucesso\n }\n });\n }); // delete close\n\n\n }\n })\n }", "function listarMaterialesCaja(id_tipo_caja) {\n var cantidad = $(\"#cantidad\").val();\n cantidad = (cantidad=='')? 0: cantidad;\n $.ajax({\n url: $.PATH + \"almacen?function=listMaterialesCaja\",\n data: {id_tipo_caja: id_tipo_caja},\n dataType: \"json\",\n cache: false,\n type: \"get\",\n success: function(response) {\n var html = \"\";\n if (response.data != null) {\n $.flgMateriales = true; // para validar envío\n var response = response.data;\n for (var i = 0; i < response.length; i++) {\n var color = '';\n if (response[i].stock_requerido == '1') {\n if (response[i].stock <= response[i].stock_minimo) {\n color = '#FAAC58';\n }\n }\n html += \"<tr style='background-color: \"+color+\"'>\";\n html += \"<td>\"+response[i].codigo+\"</td>\";\n html += \"<td>\"+response[i].nombre+\"</td>\";\n html += \"<td>\"+response[i].stock+\"</td>\";\n html += \"<td>\"+response[i].unidad_medida+\"</td>\"; \n var valor = 0;\n if (response[i].calcular == '1') {\n valor = parseFloat(cantidad)*parseFloat(response[i].multiplo);\n } else {\n valor = response[i].multiplo;\n }\n html += \"<td><input name='id_materiales[]' type='hidden' value='\"+response[i].id+\"'>\";\n html += \"<input name='materiales[]' type='text' class='decimal' style='width: 50px;' value='\"+valor+\"'></td>\";\n html += \"<td>\"+response[i].tipo+\"</td>\";\n html += \"</tr>\";\n }\n } else {\n $.flgMateriales = false; // para validar envío\n }\n $(\"#tbl-materiales tbody\").html(html);\n $(\"#tbl-materiales tbody\").css({\"color\":\"#000\"});\n $(\".decimal\").numeric(\".\");\n $(\".decimal\").blur(function (e) {\n var v = $(this).val().trim();\n v = (v == \"\")?0:parseFloat(v);\n var cantidad = $(\"#cantidad\").val().trim();\n cantidad = (cantidad == \"\")?0:parseFloat(cantidad);\n if (v == 0 && cantidad > 0) {\n //$(this).focus();\n $.flgEntrega = false;\n $(this).css({\"background-color\":\"#FF0000\"});\n } else {\n $.flgEntrega = true;\n $(this).css({\"background-color\":\"#FFFFFF\"});\n }\n });\n },\n error: function(response) {\n console.log(response);\n }\n });\n }", "function validacionCampos(nombreCampo, valorCampo, tipoCampo) {\n\n var expSoloCaracteres = /^[A-Za-zÁÉÍÓÚñáéíóúÑ]{3,10}?$/;\n var expMatricula = /^([A-Za-z]{1}?)+([1-9]{2}?)$/;\n\n if (tipoCampo == 'select') {\n valorComparar = 0;\n } else {\n valorComparar = '';\n }\n\n //validamos si el campo es rellenado.\n if (valorCampo != valorComparar) {\n $('[id*=' + nombreCampo + ']').removeClass('is-invalid');\n\n //Aplicamos validaciones personalizadas a cada campo.\n if (nombreCampo == 'contenidoPagina_nombreMedico') {\n if (expSoloCaracteres.test(valorCampo)) {\n return true;\n } else {\n mostrarMensaje(nombreCampo, 'noDisponible');\n return false;\n }\n\n }\n else if (nombreCampo == 'contenidoPagina_apellidoMedico') {\n if (expSoloCaracteres.test(valorCampo)) {\n return true;\n } else {\n mostrarMensaje(nombreCampo, 'noDisponible');\n return false;\n }\n \n }\n else if (nombreCampo == 'contenidoPagina_especialidadMedico') {\n return true;\n\n }\n else if (nombreCampo == 'contenidoPagina_matriculaMedico') {\n\n if (expMatricula.test(valorCampo)) {\n\n $(\"[id*=contenidoPagina_matriculaMedico]\").off('keyup');\n $(\"[id*=contenidoPagina_matriculaMedico]\").on('keyup', function () {\n return validarMatriculaUnica($(this).val(), matAcomparar);\n });\n\n return validarMatriculaUnica($(\"[id*=contenidoPagina_matriculaMedico]\").val(), matAcomparar);\n } else {\n mostrarMensaje(nombreCampo, 'estructuraInc');\n return false;\n } \n }\n } else {\n mostrarMensaje(nombreCampo, 'incompleto');\n return false;\n }\n }" ]
[ "0.6797313", "0.657865", "0.6565169", "0.6465045", "0.64612997", "0.634519", "0.6326708", "0.62875354", "0.62767005", "0.6266325", "0.6207428", "0.6202906", "0.61876357", "0.6163063", "0.6137261", "0.6128854", "0.6124658", "0.6122147", "0.61144793", "0.61117905", "0.61112016", "0.61065745", "0.6094735", "0.60888785", "0.60884535", "0.608572", "0.6066817", "0.6043511", "0.60330087", "0.60309273", "0.6014329", "0.60138375", "0.5994653", "0.59856844", "0.59827656", "0.5982095", "0.59802985", "0.597756", "0.59666014", "0.5962319", "0.5959844", "0.59575456", "0.5935808", "0.59181756", "0.5914685", "0.5912457", "0.5909408", "0.5909171", "0.5908954", "0.5902841", "0.5899555", "0.5894134", "0.5892737", "0.58882004", "0.58861065", "0.58831817", "0.5879222", "0.5879029", "0.5878779", "0.5874312", "0.58585334", "0.5854221", "0.5848319", "0.5836979", "0.5831607", "0.58277804", "0.5826471", "0.5824113", "0.5817033", "0.58018404", "0.5800042", "0.5797787", "0.5795995", "0.579397", "0.57900834", "0.5786694", "0.5780458", "0.57707536", "0.5765432", "0.57632583", "0.5759522", "0.57503563", "0.5748485", "0.5743558", "0.57423896", "0.572836", "0.57279384", "0.5726643", "0.5720043", "0.57145643", "0.57128376", "0.5710844", "0.57094073", "0.5709098", "0.57073087", "0.5705935", "0.57054216", "0.57042074", "0.57041895", "0.57016975", "0.56981695" ]
0.0
-1
FIN: FUNCION PARA ELIMINAR UN REGISTRO / OBJETO: grilla METODO:
function mgrilla_item_seleccion_fondocolor(){ $("#grdregistro_vista_data tbody").on( "click", "tr", function () { if ( $(this).hasClass("selected") ) { $(this).removeClass("selected"); } else { tblregistro_vista_data.$("tr.selected").removeClass("selected"); $(this).addClass("selected"); } } ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkExistRegistro(ressult){\n if(ressult.length > 0) { msjDanger('REGISTRO', '<strong>Existe un registro pendiente con esa cuenta</strong>'); }\n else {\n gestor.addLocal(\"\", \"\", \"\", 'registro');\n\n let registro = {};\n registro[\"id\"] = $(\"#usuario\").val();\n registro[\"pass\"] = gestor.stringBase64($(\"#pass\").val());\n registro[\"nombre\"] = $(\"#nombre\").val();\n registro[\"departamento\"] = $(\"#departamento\").val();\n registro[\"nivel\"] = $(\"#nivel\").val();\n\n registroManager.addRegistro(registro, 'changePageIndex');\n }\n}", "function accionModificar() {\n\tvar opcionMenu = get(\"formulario.opcionMenu\");\n\tvar oidPlantilla = null;\n\tvar numPlantilla = null;\n\tvar oidParamGrales = null;\n\tvar filaMarcada = null;\n\tvar codSeleccionados = null;\n\tvar datos = null;\t\n\n\tlistado1.actualizaDat();\n\tdatos = listado1.datos;\n\tcodSeleccionados = listado1.codSeleccionados();\n\n\tif (codSeleccionados.length > 1) {\n GestionarMensaje('8');\n\t\treturn;\n\t}\n\n\tif ( codSeleccionados.length < 1)\t{\n GestionarMensaje('4');\n\t\treturn;\n\t}\n\n\t// Obtengo el índice de la fila marcada (en este punto, solo una estará marcada)\n\tvar filaMarcada = listado1.filaSelecc;\n\n\t// Obtengo el oid de Param. Generales (oid del valor seleccionado, está al final de la lista por el tema del ROWNUM)\n\toidParamGrales = datos[filaMarcada][9]; \n\n\t// Obtengo Oid de la Entidad PlantillaConcurso (AKA Numero de Plantilla);\n\tnumPlantilla = datos[filaMarcada][3];\n\n\tvar oidVigenciaConcurso = datos[filaMarcada][10]; \n\tvar oidEstadoConcurso = datos[filaMarcada][11]; \n\tvar noVigencia = get(\"formulario.noVigencia\");\n\tvar estConcuAprobado = get(\"formulario.estConcuAprobado\");\n\n\tif((parseInt(oidVigenciaConcurso) == parseInt(noVigencia)) && \t\t\n\t(parseInt(oidEstadoConcurso)!=parseInt(estConcuAprobado))) {\n\t\tvar obj = new Object();\n\t\t// Seteo los valores obtenidos. \n\t\tobj.oidConcurso = oidParamGrales;\n\t\tobj.oidPlantilla = numPlantilla;\n\t\tobj.opcionMenu = opcionMenu;\n\t\tvar retorno = mostrarModalSICC('LPMantenerParametrosGenerales', '', obj);\n\t\taccionBuscar();\n\t}\n\telse {\n\t\tvar indDespacho = datos[filaMarcada][12];\n\t\tif (oidVigenciaConcurso == '1' && parseInt(indDespacho) == 0) {\n\t\t\tif (GestionarMensaje('3385')) {\n\t\t\t\tvar obj = new Object();\n\t\t\t\t// Seteo los valores obtenidos. \n\t\t\t\tobj.oidConcurso = oidParamGrales;\n\t\t\t\tobj.oidPlantilla = numPlantilla;\n\t\t\t\tobj.opcionMenu = opcionMenu;\n\t\t\t\tobj.oidVigenciaConcurso = oidVigenciaConcurso;\n\t\t\t\tvar retorno = mostrarModalSICC('LPMantenerParametrosGenerales', '', obj);\n\t\t\t\taccionBuscar();\n\t\t\t}\t\n\t\t}\n\t\telse {\n\t\t\t//El concurso seleccionado no puede ser modificado\n\t\t\tGestionarMensaje('INC052');\n\t\t}\n\t}\n}", "recorrerArbolConsulta(nodo) {\n //NODO INICIO \n if (this.tipoNodo('INICIO', nodo)) {\n this.recorrerArbolConsulta(nodo.hijos[0]);\n }\n //NODO L, ES LA LISTA DE CONSULTAS \n if (this.tipoNodo('L', nodo)) {\n //SE RECORREN TODOS LOS NODOS QUE REPRESENTAN UNA CONSULTA \n for (var i = 0; i < nodo.hijos.length; i++) {\n this.recorrerArbolConsulta(nodo.hijos[i]);\n this.reiniciar();\n // this.codigoTemporal += \"xxxxxxxxxxxxxxxxxxxx-\"+this.contadorConsola+\".\"+\"\\n\";\n }\n }\n //PARA RECORRER TODOS LOS ELEMENTOS QUE COMPONEN LA CONSULTA \n if (this.tipoNodo('CONSULTA', nodo)) {\n for (var i = 0; i < nodo.hijos.length; i++) {\n this.pathCompleto = false;\n this.controladorAtributoImpresion = false;\n this.controladorDobleSimple = false;\n this.controladorPredicado = false;\n this.recorrerArbolConsulta(nodo.hijos[i]);\n }\n }\n //PARA RECORRER TODOS LOS ELEMENTOS QUE COMPONEN LA CONSULTA \n if (this.tipoNodo('VAL', nodo)) {\n for (var i = 0; i < nodo.hijos.length; i++) {\n this.pathCompleto = false;\n this.controladorAtributoImpresion = false;\n this.controladorDobleSimple = false;\n this.controladorPredicado = false;\n this.recorrerArbolConsulta(nodo.hijos[i]);\n }\n }\n //PARA VERIFICAR EL TIPO DE ACCESO, EN ESTE CASO // \n if (this.tipoNodo('DOBLE', nodo)) {\n this.controladorDobleSimple = true;\n this.recorrerArbolConsulta(nodo.hijos[0]);\n }\n //PARA VERIFICAR EL TIPO DE ACCESO, EN ESTE CASO: /\n if (this.tipoNodo('SIMPLE', nodo)) {\n //Establecemos que se tiene un acceso de tipo DOBLE BARRA \n this.controladorDobleSimple = false;\n this.recorrerArbolConsulta(nodo.hijos[0]);\n }\n //PARA VERIFICAR SI EL ELEMENTO A BUSCAR ES UN IDENTIFICADOR \n if (this.tipoNodo('identificador', nodo)) {\n const str = nodo.hijos[0];\n this.busquedaElemento(str);\n }\n //PARA VERIFICAR SI LO QUE SE VA A ANALIZAR ES UN PREDICADO \n if (this.tipoNodo('PREDICADO', nodo)) {\n this.controladorPredicado = true;\n const identificadorPredicado = nodo.hijos[0];\n //Primero se procede a la búsqueda del predicado\n this.codigoTemporal += \"//Inicio ejecucion predicado\\n\";\n this.busquedaElemento(identificadorPredicado);\n //Seguidamente se resuelve la expresión\n let resultadoExpresion = this.resolverExpresion(nodo.hijos[1]);\n let anteriorPredicado = this.temporalGlobal.retornarString();\n this.temporalGlobal.aumentar();\n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + anteriorPredicado + \";\\n\";\n let predicadoVariable = this.temporalGlobal.retornarString();\n this.codigoTemporal += \"PXP = \" + predicadoVariable + \";\\n\";\n this.codigoTemporal += \"ubicarPredicado();\\n\";\n //SI EL RESULTADO ES DE TIPO ETIQUETA\n if (resultadoExpresion.tipo == 4) {\n let datos = resultadoExpresion.valor;\n let a = datos[0];\n let b = datos[1];\n let c = datos[2];\n let limite = this.consolaSalidaXPATH.length;\n for (var i = this.contadorConsola; i < limite; i++) {\n // salidaXPATH.getInstance().push(this.consolaSalidaXPATH[i].dameID());\n this.auxiliarPredicado(a, b, c, this.consolaSalidaXPATH[i]);\n }\n }\n //SI EL RESULTADO ES DE TIPO ETIQUETA\n if (resultadoExpresion.tipo == 1) {\n this.consolaSalidaXPATH.push(this.consolaSalidaXPATH[(this.contadorConsola + resultadoExpresion.valor) - 1]);\n this.contadorConsola = this.consolaSalidaXPATH.length - 1;\n }\n this.controladorPredicadoInicio = false;\n }\n //PARA VERIFICAR QUE ES UN PREDICADO DE UN ATRIBUTO\n if (this.tipoNodo('PREDICADO_A', nodo)) {\n //return this.recorrer(nodo.hijos[0]);\n const identificadorPredicadoAtributo = nodo.hijos[0];\n //RECORREMOS LO QUE VA DENTRO DE LLAVES PARA OBTENER EL VALOR\n //AQUI VA EL METODO RESOLVER EXPRESION DE SEBAS PUTO \n return this.recorrerArbolConsulta(nodo.hijos[1]);\n }\n //PARA VERIFICAR SI EL ELEMENTO A BUSCAR ES UN ATRIBUTO \n if (this.tipoNodo('atributo', nodo)) {\n this.controladorAtributoImpresion = true;\n const identificadorAtributo = nodo.hijos[0];\n if (this.inicioRaiz) {\n let limite = this.consolaSalidaXPATH.length;\n for (var i = this.contadorConsola; i < limite; i++) {\n let x = this.consolaSalidaXPATH[i];\n //let nodoBuscarAtributo = this.consolaSalidaXPATH[this.consolaSalidaXPATH.length - 1];\n let nodoBuscarAtributo = x;\n //CODIGO DE 3 DIRECCIONES \n this.codigoTemporal += \"P=\" + nodoBuscarAtributo.posicion + \";\\n\";\n let inicioRaizXML = this.temporalGlobal.retornarString();\n this.temporalGlobal.aumentar();\n //Ubicamos nuestra variabel a buscar en el principio del heap \n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=HXP;\\n\";\n //Escribimos dentro del heap de XPATH el nombre del identificador a buscar \n for (var z = 0; z < identificadorAtributo.length; z++) {\n this.codigoTemporal += `heapXPATH[(int)HXP] = ${identificadorAtributo.charCodeAt(z)};\\n`;\n this.codigoTemporal += `HXP = HXP+1;\\n`;\n }\n this.codigoTemporal += `heapXPATH[(int)HXP] =-1;\\n`;\n this.codigoTemporal += `HXP = HXP+1;\\n`;\n let anteriorGlobal = this.temporalGlobal.retornarString();\n this.codigoTemporal += \"stackXPATH[(int)PXP]=\" + anteriorGlobal + \";\\n\";\n this.temporalGlobal.aumentar();\n this.codigoTemporal += \"busquedaAtributo();\\n\";\n //CODIGO DE 3 DIRECCIONES \n //Se procede a la búsqueda de los atributos en todos los nodos\n for (let entry of nodoBuscarAtributo.atributos) {\n let atributoTemporal = entry;\n let nombreAbributo = atributoTemporal.dameNombre();\n if (nombreAbributo == identificadorAtributo) {\n this.atributoID = identificadorAtributo;\n this.pathCompleto = true;\n // this.contadorConsola = i;\n // this.consolaSalidaXPATH.push(nodoBuscarAtributo);\n }\n }\n /*for (let entry of nodoBuscarAtributo.hijos) {\n this.busquedaAtributo(entry, identificadorAtributo);\n }*/\n if (this.controladorDobleSimple) {\n this.busquedaAtributo(x, identificadorAtributo);\n }\n }\n }\n else {\n this.inicioRaiz = true;\n for (let entry of this.ArrayEtiquetas) {\n let temp = entry;\n //CODIGO DE 3 DIRECCIONES \n this.codigoTemporal += \"P=\" + temp.posicion + \";\\n\";\n let inicioRaizXML = this.temporalGlobal.retornarString();\n this.temporalGlobal.aumentar();\n //Ubicamos nuestra variabel a buscar en el principio del heap \n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=HXP;\\n\";\n //Escribimos dentro del heap de XPATH el nombre del identificador a buscar \n for (var z = 0; z < identificadorAtributo.length; z++) {\n this.codigoTemporal += `heapXPATH[(int)HXP] = ${identificadorAtributo.charCodeAt(z)};\\n`;\n this.codigoTemporal += `HXP = HXP+1;\\n`;\n }\n this.codigoTemporal += `heapXPATH[(int)HXP] =-1;\\n`;\n this.codigoTemporal += `HXP = HXP+1;\\n`;\n let anteriorGlobal = this.temporalGlobal.retornarString();\n this.codigoTemporal += \"stackXPATH[(int)PXP]=\" + anteriorGlobal + \";\\n\";\n this.temporalGlobal.aumentar();\n this.codigoTemporal += \"busquedaAtributo();\\n\";\n //CODIGO DE 3 DIRECCIONES \n for (let entry2 of temp.atributos) {\n let aTemp = entry2;\n let nameAtt = aTemp.dameNombre();\n if (nameAtt == identificadorAtributo) {\n this.atributoID = identificadorAtributo;\n this.pathCompleto = true;\n }\n }\n if (this.controladorDobleSimple) {\n this.busquedaAtributo(entry, identificadorAtributo);\n }\n }\n }\n }\n //PARA VERIFICAR SI EL ELEMENTO A BUSCAR ES CUALQUIER ELEMENTO \n if (this.tipoNodo('any', nodo)) {\n //SIGNIFICA ACCESO DOBLE\n if (this.controladorDobleSimple) {\n let controladorNuevoInicio = -1;\n let limite = this.consolaSalidaXPATH.length;\n for (var i = this.contadorConsola; i < limite; i++) {\n let temporal = this.consolaSalidaXPATH[i];\n for (let entry of temporal.hijos) {\n //insertamos TODOS los hijos\n this.codigoTemporal += \"P =\" + entry.posicion + \";\\n\";\n this.codigoTemporal += \"imprimirContenido();\\n\";\n this.consolaSalidaXPATH.push(entry);\n if (controladorNuevoInicio == -1)\n controladorNuevoInicio = this.consolaSalidaXPATH.length - 1;\n this.complementoAnyElement(entry);\n }\n }\n this.contadorConsola = controladorNuevoInicio;\n this.pathCompleto = true;\n }\n //SIGNIFICA ACCESO SIMPLE \n else {\n //Controlamos el nuevo acceso para cuando coloquemos un nuevo elemento en la lista \n let controladorNuevoInicio = -1;\n let limite = this.consolaSalidaXPATH.length;\n for (var i = this.contadorConsola; i < limite; i++) {\n let temporal = this.consolaSalidaXPATH[i];\n for (let entry of temporal.hijos) {\n //insertamos TODOS los hijos\n this.consolaSalidaXPATH.push(entry);\n if (controladorNuevoInicio == -1)\n controladorNuevoInicio = this.consolaSalidaXPATH.length - 1;\n }\n }\n this.contadorConsola = controladorNuevoInicio;\n this.pathCompleto = true;\n }\n }\n //PARA VERIFICAR SI EL ELEMENTO A BUSCAR ES UNA PALABRA RESERVADA que simplicaria un AXE \n if (this.tipoNodo('reservada', nodo)) {\n //return this.recorrer(nodo.hijos[0]);\n const identificador = nodo.hijos[0];\n this.auxiliarAxe = identificador;\n //VERIFICAMOS EL TIPO DE ACCESO DE AXE \n if (this.controladorDobleSimple)\n this.dobleSimpleAxe = true;\n }\n if (this.tipoNodo('AXE', nodo)) {\n //return this.recorrer(nodo.hijos[0]);\n if (this.dobleSimpleAxe)\n this.controladorDobleSimple = true;\n this.temporalGlobal.aumentar();\n //Ubicamos nuestra variabel a buscar en el principio del heap \n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=HXP;\\n\";\n //Escribimos dentro del heap de XPATH el nombre del identificador a buscar \n for (var i = 0; i < this.auxiliarAxe.length; i++) {\n this.codigoTemporal += `heapXPATH[(int)HXP] = ${this.auxiliarAxe.charCodeAt(i)};\\n`;\n this.codigoTemporal += `HXP = HXP+1;\\n`;\n }\n this.codigoTemporal += `heapXPATH[(int)HXP] =-1;\\n`;\n this.codigoTemporal += `HXP = HXP+1;\\n`;\n this.codigoTemporal += \"PXP =\" + this.temporalGlobal.retornarString() + \";\\n\";\n this.codigoTemporal += \"ejecutarAxe();\\n\";\n //Si Solicita implementar el axe child\n if (this.auxiliarAxe == \"child\") {\n //ESCRIBIMOS LOS IFS RESPECTIVOS \n this.recorrerArbolConsulta(nodo.hijos[0]);\n }\n //Si necesitsa implementar el axe attribute\n if (this.auxiliarAxe == \"attribute\") {\n //Le cambiamos la etiqueta de identificador a atributo para fines de optimizacion de codigo\n nodo.hijos[0].label = \"atributo\";\n //Escribimos el codigo en C3D para la ejecución del axe atributo \n this.recorrerArbolConsulta(nodo.hijos[0]);\n }\n //Si necesitsa implementar el ancestor\n if (this.auxiliarAxe == \"ancestor\") {\n //Va a resolver el predicado o identificador que pudiese venir \n this.recorrerArbolConsulta(nodo.hijos[0]);\n }\n if (this.auxiliarAxe == \"descendant\") {\n this.controladorDobleSimple = true;\n this.recorrerArbolConsulta(nodo.hijos[0]);\n }\n //Reiniciamos la variable cuando ya se acabe el axe\n this.auxiliarAxe = \"\";\n }\n //PARA VERIFICAR SI EL ELEMENTO A BUSCAR ES UN ATRIBUTO \n if (this.tipoNodo('X', nodo)) {\n //return this.recorrer(nodo.hijos[0]);\n //const identificadorAtributo = nodo.hijos[0] as string;\n this.controladorDobleSimple = true;\n this.recorrerArbolConsulta(nodo.hijos[0]);\n /*\n EN ESTA PARTE SE VA A PROCEDER PARA IR A BUSCAR EL ELEMENTO SEGÚN TIPO DE ACCESO\n */\n }\n //PARA VERIFICAR SI SE NECESITAN TODOS LOS ATRIBUTOS DEL NODO ACTUAL \n if (this.tipoNodo('any_att', nodo)) {\n this.controladorText = true;\n const identificadorAtributo = nodo.hijos[0];\n //Verificamos el tipo de acceso\n //Significa acceso con prioridad\n if (this.controladorDobleSimple) {\n //VERIFICAMOS DESDE DONDE INICIAMOS\n if (!this.inicioRaiz) {\n this.inicioRaiz = true;\n for (let entry of this.ArrayEtiquetas) {\n this.codigoTemporal += \"P =\" + entry.posicion + \";\\n\";\n this.codigoTemporal += \"imprimirAtributoAny();\\n\";\n for (let att of entry.atributos) {\n // salidaXPATH.getInstance().push(att.dameNombre()+\"=\"+att.dameValor());\n }\n this.complementoAnnyAtributte(entry);\n }\n }\n else {\n let limite = this.consolaSalidaXPATH.length;\n for (var i = this.contadorConsola; i < limite; i++) {\n let entry = this.consolaSalidaXPATH[i];\n this.codigoTemporal += \"P =\" + entry.posicion + \";\\n\";\n this.codigoTemporal += \"imprimirAtributoAny();\\n\";\n for (let att of entry.atributos) {\n // salidaXPATH.getInstance().push(att.dameNombre()+\"=\"+att.dameValor());\n }\n this.complementoAnnyAtributte(entry);\n }\n }\n }\n //Acceso sin prioridad\n else {\n if (!this.inicioRaiz) {\n for (let entry of this.ArrayEtiquetas) {\n this.codigoTemporal += \"P =\" + entry.posicion + \";\\n\";\n this.codigoTemporal += \"imprimirAtributoAny();\\n\";\n for (let att of entry.atributos) {\n // salidaXPATH.getInstance().push(att.dameNombre()+\"=\"+att.dameValor());\n }\n }\n }\n else {\n let limite = this.consolaSalidaXPATH.length;\n for (var i = this.contadorConsola; i < limite; i++) {\n let entry = this.consolaSalidaXPATH[i];\n this.codigoTemporal += \"P =\" + entry.posicion + \";\\n\";\n this.codigoTemporal += \"imprimirAtributoAny();\\n\";\n for (let att of entry.atributos) {\n // salidaXPATH.getInstance().push(att.dameNombre()+\"=\"+att.dameValor());\n }\n }\n }\n }\n } //FIN ANNY ATT\n //PARA VERIFICAR SI SE ESTÁ INVOCANDO A LA FUNCIÓN TEXT() \n if (this.tipoNodo('text', nodo)) {\n this.controladorText = true;\n const identificadorAtributo = nodo.hijos[0];\n //Si se necesita el texto de el actual y los descendientes\n if (this.controladorDobleSimple) {\n for (var i = this.contadorConsola; i < this.consolaSalidaXPATH.length; i++) {\n /*if (this.consolaSalidaXPATH[i].dameValor() == \"\" || this.consolaSalidaXPATH[i].dameValor() == \" \") {\n \n } else {\n // salidaXPATH.getInstance().push(this.consolaSalidaXPATH[i].dameValor());\n }*/\n this.codigoTemporal += \"P=\" + this.consolaSalidaXPATH[i].posicion + \";\\n\";\n this.codigoTemporal += \"text();\\n\";\n this.complementoText(this.consolaSalidaXPATH[i]);\n }\n }\n else {\n //si necesita solo el texto del actual \n for (var i = this.contadorConsola; i < this.consolaSalidaXPATH.length; i++) {\n /* if (this.consolaSalidaXPATH[i].dameValor() == \"\" || this.consolaSalidaXPATH[i].dameValor() == \" \") {\n \n } else {\n //salidaXPATH.getInstance().push(this.consolaSalidaXPATH[i].dameValor());\n }*/\n this.codigoTemporal += \"P=\" + this.consolaSalidaXPATH[i].posicion + \";\\n\";\n this.codigoTemporal += \"text();\\n\";\n }\n }\n }\n //PARA VERIFICAR SI ES EL TIPO DE ACCESO AL PADRE: \":\" \n if (this.tipoNodo('puntos', nodo)) {\n const cantidad = nodo.hijos[0];\n //DOSPUNTOSSSSSSSSS\n if (cantidad.length == 2) {\n this.pathCompleto = true;\n if (this.auxiliarArrayPosicionPadres == -1) {\n this.auxiliarArrayPosicionPadres = this.arrayPosicionPadres.length - 1;\n }\n for (var i = this.auxiliarArrayPosicionPadres; i >= 0; i--) {\n let contadorHermanos = this.arrayPosicionPadres[i];\n let controladorInicio = 0;\n if (i > 0) {\n while (contadorHermanos != this.arrayPosicionPadres[i - 1]) {\n this.consolaSalidaXPATH.push(this.consolaSalidaXPATH[contadorHermanos]);\n this.codigoTemporal += \"P =\" + this.consolaSalidaXPATH[contadorHermanos].posicion + \";\\n\";\n if (controladorInicio == 0) {\n this.contadorConsola = this.consolaSalidaXPATH.length - 1;\n }\n controladorInicio++;\n contadorHermanos--;\n this.auxiliarArrayPosicionPadres = contadorHermanos;\n }\n }\n else {\n while (contadorHermanos >= 0) {\n this.consolaSalidaXPATH.push(this.consolaSalidaXPATH[contadorHermanos]);\n this.codigoTemporal += \"P =\" + this.consolaSalidaXPATH[contadorHermanos].posicion + \";\\n\";\n if (controladorInicio == 0) {\n this.contadorConsola = this.consolaSalidaXPATH.length - 1;\n }\n controladorInicio++;\n contadorHermanos--;\n this.auxiliarArrayPosicionPadres = contadorHermanos;\n }\n }\n break;\n }\n this.codigoTemporal += \"busquedaSimple();\\n\";\n }\n //SIGNIFICA QUE TIENE SOLO UN PUNTO \n else {\n this.pathCompleto = true;\n }\n ///DOS PUNTOOOOOOOOOOOOOOOOS\n }\n }", "function RegistrarDatos(){\n // capturando valores\n var nom=txtNom.value;\n // con el simbolo del dolar\n var pre=\"$ \"+txtPre.value;\n var cat=cboCategoria.selectedIndex;\n var can=txtCan.value;\n // reemplazar el numero de orden del 0 al 3 por texto\n switch(cat){\n case 1:\n cat = \"entretenimiento\"\n break;\n case 2:\n cat = \"tecnologia\"\n break;\n case 3:\n cat = \"linea blanca\"\n break;\n default:\n cat = \"error\"\n break;\n }\n // Cuando los valores ingresados sean diferentes de \"\" o no se haya elegido una categoria...\n if (txtNom.value != \"\" && txtPre.value != \"\" && cboCategoria.selectedIndex != 0 && txtCan.value != \"\"){\n // llamamos al procedimiento registrar\n Registrar(nom,pre,cat,can);\n MostrarRegistro();\n }\n}", "function muestra(registro) //solo vale para las raices\n{\n\tvar url = \"inc/generator.php\"\n\t\n\tvar tabla = $F('tabla');\n\t//onerror=upss(registro)\n\tvar pars = \"opcion=2&registro=\"+registro+\"&tabla=\"+tabla\n\tvar myAjax = new Ajax.Request(url,\n\t {\n\t\t\tmethod:'post',\n\t\t\tparameters: pars,\n\t\t\tonComplete: function gen(t)\n\t\t\t{\n\t\t\t\t$('formulario').innerHTML = t.responseText\n\t\t\t\tcampos_fecha(tabla)\n\t\t\t\tcierra_frm_busca()\n\t\t\t\tmuestra_el_formulario()\n\t\t\t}\n\t});\n}", "function actualizarRegistos() {\n\n /* Obtiene el texto y lo modifica */\n var registros = document.getElementById(\"registros\").textContent;\n registros = contador_registros + \" de \" + agenda.length;\n document.getElementById(\"registros\").textContent = registros;\n\n /* Impide aumentar los registos si no existen en la Agenda */\n var max = document.getElementById(\"ver\");\n max.setAttribute(\"max\", agenda.length);\n\n /* Si nos movemos entre los diferentes registros, tambien cambiamos el valor del Imput 'ver' */\n ver.value = contador_registros;\n\n /* Al cargar la Agenda muestra por defecto e contacto indicado en la variable contador, en este caso la posicion 0 */\n document.getElementById(\"nombre\").value = agenda[contador_registros].nombre;\n document.getElementById(\"apellidos\").value = agenda[contador_registros].apellidos;\n document.getElementById(\"telefono\").value = agenda[contador_registros].telefono;\n document.getElementById(\"fecha\").value = agenda[contador_registros].fecha;\n}", "function registro(){ \r\n limpiarMensajesError();//Limpio todos los mensajes de error cada vez que corro la funcion\r\n let nombre = document.querySelector(\"#txtNombre\").value;\r\n let nombreUsuario = document.querySelector(\"#txtNombreUsuario\").value;\r\n let clave = document.querySelector(\"#txtContraseña\").value;\r\n let perfil = Number(document.querySelector(\"#selPerfil\").value); //Lo convierto a Number directo del html porque yo controlo qu'e puede elegir el usuario\r\n let recibirValidacion = validacionesRegistro (nombre, nombreUsuario, clave); //\r\n if(recibirValidacion && perfil != -1){ \r\n crearUsuario(nombre, nombreUsuario, clave, perfil);\r\n if(perfil === 2){\r\n usuarioLoggeado = nombreUsuario; //Guardo en la variable global el nombre de usuario ingresado (tiene que ir antes de ejecutar la funcion alumno ingreso)\r\n alumnoIngreso();\r\n }else{\r\n usuarioLoggeado = nombreUsuario; //Guardo en la variable global el nombre de usuario ingresado\r\n docenteIngreso();//Guardo en la variable global el nombre de usuario ingresado (tiene que ir antes de ejecutar la funcion alumno ingreso)\r\n }\r\n }\r\n if(perfil === -1){\r\n document.querySelector(\"#errorPerfil\").innerHTML = \"Seleccione un perfil\";\r\n }\r\n}", "function registro() {\n\n var value_re_dni = document.getElementById('re_dni').value;\n var value_re_nombre = document.getElementById('re_nombre').value;\n var value_re_apellidos = document.getElementById('re_apellidos').value;\n var value_re_num_afiliacion = document.getElementById('re_num_afiliacion').value;\n var value_re_email = document.getElementById('re_email').value;\n var value_re_direccion = document.getElementById('re_direccion').value;\n\n if (value_re_dni && value_re_nombre && value_re_apellidos && value_re_num_afiliacion && value_re_email && value_re_direccion) {\n\n var objUsuario_registro = Usuario_registro(value_re_dni, value_re_nombre, value_re_apellidos, value_re_num_afiliacion, value_re_email, value_re_direccion);\n\n global_objUsuario = objUsuario_registro;\n\n var objUsuario_registro_json = JSON.stringify(objUsuario_registro);\n \n objAjax = AJAXCrearObj();\n objAjax.open('GET', './php/registro_usuario.php?objUsuario_registro_json='+objUsuario_registro_json, true); // llamamos al php\n objAjax.send();\n objAjax.onreadystatechange=responder_registro;\n\n } else {\n\n alert(\"Rellene todos los campos de registro\");\n } \n}", "function Regla2(codigo) {\n this.codigo = codigo;\n }", "regenerar(puntos, longitud, numeroObstaculos,\r\n\t\t \t\tnumeroRecompensas = 10, maxDesplzamientoObstaculo = 5,\r\n\t\t\t\tmaxDesplzamientoRecompensa = 5) {\r\n\r\n\t\tthis.remove (this.apariencia);\t// quitar antigua representacion grafica\r\n\r\n\t\t// nuevo recorrido aleatorio\r\n\t\tthis.spline = this.generarRecorridoAleatorio(puntos, longitud);\r\n\r\n\t\t// nuevos items del camino\r\n\t\tthis.generarObstaculos(this.spline, numeroObstaculos, maxDesplzamientoObstaculo);\r\n\t\tthis.generarRecompensas(this.spline, numeroRecompensas, maxDesplzamientoRecompensa);\r\n\r\n\t\t// forma del camino\r\n\t\tvar options = {bevelEnabled: false, depth : 1 , steps : puntos * puntos , curveSegments : 25, extrudePath: this.spline};\r\n\t\tvar geometry = new THREE.ExtrudeBufferGeometry(this.forma, options);\r\n\t\tvar material = new THREE.MeshPhongMaterial({\r\n\t\t\ttransparent: true,\r\n\t\t\topacity: 0.8,\r\n\t\t\tside: THREE.BackSide,\r\n\t\t\tsmoothShading: true,\r\n\t\t\tshading: THREE.smoothShading,\r\n\t\t\tcolor: 0x0000FF,\r\n\t\t\t// wireframe: true,\r\n\t\t\t// map: textura\r\n\t\t});\r\n\r\n\t\tthis.apariencia = new THREE.Mesh( geometry, material ) ;\r\n\t\tthis.add( this.apariencia );\r\n\t}", "function cargarModificacion(grupo){\n\t\t\tvar entradaParametro = $('#parametro').val();\n\t\t\t$('#parametro').val('');\n\t\t\tvar entradaValor = $('#valor').val();\n\t\t\t$('#valor').val('');\n\t\t\tvar registro = [entradaParametro, entradaValor];\n\t\t\tvar registroCompleto = {\n\t\t\t\t\t'group': grupo,\n\t\t\t\t\t'thing': registro\n\t\t\t\t};\n\t\t\tif(parametro && valor){\n\t\t\t\t$.ajax({\n\t\t\t\t\ttype: 'POST',\n\t\t\t\t\tdataType: 'JSON',\n\t\t\t\t\tdata: JSON.stringify(registroCompleto),\n\t\t\t\t\tcontentType: 'application/json; charset=utf-8',\n\t\t\t\t\turl: 'http://web-unicen.herokuapp.com/api/create',\n\t\t\t\t\tsuccess: function(){\n\t\t\t\t\t\t\t\tleerGrupo(grupo);\n\t\t\t\t\t\t\t},\n\t\t\t\t\terror: function(){\n\t\t\t\t\t\t\t\talert('La Entrada NO Pudo ser Agregada Correctamente');\n\t\t\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\talert('Los Campos Deben Contener al Menos 1 Caracter');\n\t\t\t};\n\t\t}", "function validarReglas(){\n try{\n pnlCgg_res_beneficiario.getEl().mask('Validando...', 'x-mask-loading');\n var flagResultado = 'true'; \n\n //El auspiciante ya esta establecido en la apertura del formulario. \n crperNumDocIdentific = txtCrben_num_doc_identific.getValue(); \n cggCrperFechaNacimiento = dtCrper_fecha_nacimiento.getValue().format('d/m/Y');\n //cggcrperCodigo = txtCrben_codigo.getValue();\n var jsonData = {\n 'CRPER_CODIGO':crperCodigo,\n 'CGGCRPER_CODIGO':cggcrperCodigo,\n 'CRPER_NUM_DOC_IDENTIFIC':crperNumDocIdentific,\n 'CRPER_FECHA_NACIMIENTO':cggCrperFechaNacimiento\n };\n var param = new SOAPClientParameters();\n var tmpEvaluacion = evaluarReglasValidacion();\n param.add('inJSON_reglas_validacion',tmpEvaluacion);\n param.add('jsonData',JSON.stringify(jsonData));\n var r = SOAPClient.invoke(URL_WS+'Cgg_regla_validacion' ,'ejecutarReglaTipoSolicitud',param, false, null);\n\n var validacion = Ext.util.JSON.decode(r);\n\n if(validacion.resultadoValidacion != undefined){\n if(validacion.resultadoValidacion == 'false'){\n var objCgg_regla_validacion = new FrmListadoCgg_regla_validacion_resultado(validacion);\n objCgg_regla_validacion.loadData();\n objCgg_regla_validacion.show();\n }\n flagResultado = validacion.resultadoValidacion;\n }\n pnlCgg_res_beneficiario.getEl().unmask();\n return flagResultado;\n }catch(inErr){\n Ext.MsgPopup.msg(tituloCgg_res_beneficiario, \"No se ha podido validar la informaci\\u00f3n a almacenar.<br>Error:\"+inErr);\n pnlCgg_res_beneficiario.getEl().unmask();\n return 'false';\n }\n }", "function Usuario_registro (dni, nombre, apellidos, num_afiliacion, email, direccion) {\n \n var obj = {\n dni: dni,\n nombre: nombre,\n apellidos: apellidos,\n num_afiliacion: num_afiliacion,\n email: email,\n direccion: direccion\n };\n\n return obj; \n}", "function reglas(){\n console.log(`Bienvenido ${nombreJugador}. Las reglas son las siguientes: \\n\n -Sumaras 1 punto por cada letra acertada.\n -Si contestas \"pasapalabra\", podras responder esa pregunta en la proxima ronda.\n -CUIDADO!! Si dejas en blanco y presionas OK, se considera como errada.\n -Puedes escribir \"END\" para finalizar el juego en el momento que quieras.\n Muchas suerte ${nombreJugador}. Y recuerda...no hagas trampa, porque lo sabremos ¬¬`)\n }", "function escogerValorMasGrande(elemetos){\n\n}", "function regist()\n{\n\tthis.elementos= new Array();\n\tthis.validaciones = new Array();\n\tthis.urlRegExp = /get|[0-9]*/g;\n \tthis.primaryKeyRegExp = /[A-Za-z]*/g;\n}", "function registrar_esquema_comision(){\n\t\tenviarFormulario(\"#form_esquema_comision_registrar\", 'EsquemaComision/registrar_esquema_comision', '#cuadro2');\n\t}", "getRegistroLimpo() {\n return {\n cod_forma_pagamento_comanda: '',\n nome_forma_pagamento_comanda: '',\n status_cheque: '',\n status_troco: '',\n status_fatura: '',\n qtde_dias: '',\n cod_operadora_cartao: '',\n status_cartao: '',\n nfce_tpag: '',\n status_ativo: '',\n status_garcom_automatico: '',\n seq: '', \n };\n }", "function opcionRegistro(form, registro, modulo, accion) {\r\n\tif (registro == \"\") alert(\"¡DEBE SELECCIONAR UN REGISTRO!\");\r\n\telse if (accion == \"ELIMINAR\" && confirm(\"¿REALMENTE DESEA ELIMINAR ESTE REGISTRO?\")) {\r\n\t\t//\tCREO UN OBJETO AJAX PARA VERIFICAR QUE EL NUEVO REGISTRO NO EXISTA EN LA BASE DE DATOS\r\n\t\tvar ajax=nuevoAjax();\r\n\t\tajax.open(\"POST\", \"fphp_ajax_sia.php\", true);\r\n\t\tajax.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\r\n\t\tajax.send(\"modulo=\"+modulo+\"&accion=\"+accion+\"&registro=\"+registro);\r\n\t\tajax.onreadystatechange=function() {\r\n\t\t\tif (ajax.readyState==4)\t{\r\n\t\t\t\tvar resp = ajax.responseText;\r\n\t\t\t\tif (resp != 0) alert (resp);\r\n\t\t\t\telse cargarPagina(form, form.action);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "function actualiza_registro()\n{\n\t\tmuestra_debug()\n\t\tvar url = \"inc/generator.php\"\n\t\tvar registro = $F('numero_registro')\n\t\tvar formulario = $('formulario_actualizacion')\n\t\tvar pars = \"opcion=4&\"+Form.serialize(formulario)\n\t\tvar myAjax = new Ajax.Request(url,\n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t method:'post',\n\t\t\t\t\t\t\t\t\t parameters:pars,\n\t\t\t\t\t\t\t\t\t onComplete:function gen(t)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$('debug').innerHTML = t.responseText\n\t\t\t\t\t\t\t\t\t\t\tmuestra(registro)\n\t\t\t\t\t\t\t\t\t\t\tvar p=setTimeout(\"cierra_debug()\",2000)\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t });\n\t\n}", "function cargar_reg_emergente(){\n\tparametros\t\t\t\t\t\t\t= cargar_reg_emergente.arguments;\n\tf\t\t\t\t\t\t\t\t\t= document.form1;\t\t\t\t//alias del formulario\t\n\tcombo_codigo_emergente.value\t\t= parametros[0];\n\tcombo_texto_nombre_emergente.value\t= parametros[1];\t\n\t$(combo_texto_nombre_emergente).attr(\"readonly\",true);\n\twindow.focus();\n\tventana_emergente.close();\n}", "function CarregamentoInicial() {\n _CarregaTabelaNormalizacaoStrings();\n _CarregaTraducoes();\n _CarregaTitulos();\n CarregaPersonagens();\n _CarregaDominios();\n _CarregaFamiliares();\n _CarregaRacas();\n _CarregaTemplates();\n _CarregaBotoesVisao();\n _CarregaAtributos();\n _CarregaTalentos();\n\n // Monta a tabela de armas e cria as opcoes dinamicamente.\n _CarregaTabelaArmasArmaduras();\n _CarregaPericias();\n _CarregaFeiticos();\n\n _CarregaHandlers();\n\n // Inicia o objeto de personagem.\n IniciaPersonagem();\n\n if (document.URL.indexOf('testes.html') != -1) {\n return;\n }\n var indice_igual = document.URL.indexOf('=');\n if (indice_igual != -1) {\n // carrega pelos parametros. Caso contrario, usara a entrada padrao.\n var json_entradas = decodeURIComponent(document.URL.slice(indice_igual + 1));\n gEntradas = JSON.parse(json_entradas);\n CorrigePericias();\n }\n AtualizaGeralSemLerEntradas();\n}", "function fAgregar(){\n if (cPermisoPag != 1){\n fAlert(\"No tiene Permiso de ejecutar esta acción\");\n return;\n }\n\n if(lBandera == true){\n fAlert(\"No puede efectuar esta operación mientras se encuentre realizando otra transacción\");\n return;\n }\n frm.iCveSistema.value = \"\";\n frm.hdCveModulo.value = \"\";\n frm.iNumReporte.value = \"\";\n\n aDocDisp = FRMListadoA.fGetObjs(0);\n\n for(cont=0;cont < aDocDisp.length;cont++){\n if(aDocDisp[cont]){\n if (frm.iCveSistema.value==\"\") frm.iCveSistema.value=aResTemp[cont][0]; else frm.iCveSistema.value+=\",\"+aResTemp[cont][0];\n if (frm.hdCveModulo.value==\"\") frm.hdCveModulo.value=aResTemp[cont][1]; else frm.hdCveModulo.value += \",\" + aResTemp[cont][1];\n if (frm.iNumReporte.value==\"\" ) frm.iNumReporte.value=aResTemp[cont][2]; else frm.iNumReporte.value+=\",\"+aResTemp[cont][2];\n }\n }\n\n if (frm.iCveSistema.value == \"\"){\n fAlert ('\\nSeleccione al menos un registro para hacer esta operación.');\n return;\n }\n\n\n frm.hdBoton.value = \"Guardar\";\n frm.hdFiltro.value = \"\";\n if(fEngSubmite(\"pgGRLReporteA.jsp\",\"idAgrega\")){\n FRMPanel.fSetTraStatus(\"UpdateComplete\");\n fDisabled(true);\n FRMListado.fSetDisabled(false);\n }\n\n fCargaListadoA();\n}", "function regRutas(){\n window.location = config['url']+\"Administrador/modulo?vista=registrar_ruta\";\n}", "function Regla4(instrucciones) {\n this.instrucciones = instrucciones;\n }", "function cargarOpcion(form, pagina, target, param) {\r\n\tvar codigo=form.registro.value;\r\n\tif (codigo==\"\") msjError(1000);\r\n\telse {\r\n\t\tif (target==\"SELF\") cargarPagina(form, pagina);\r\n\t\telse { pagina=pagina+\"?limit=0&accion=VER&registro=\"+codigo; cargarVentana(form, pagina, param); }\r\n\t}\r\n}", "function cargarOpcion(form, pagina, target, param) {\r\n\tvar codigo=form.registro.value;\r\n\tif (codigo==\"\") msjError(1000);\r\n\telse {\r\n\t\tif (target==\"SELF\") cargarPagina(form, pagina);\r\n\t\telse { pagina=pagina+\"?limit=0&accion=VER&registro=\"+codigo; cargarVentana(form, pagina, param); }\r\n\t}\r\n}", "function partes_relacion(f,g) {\n\tvar objeto = [];\n\tvar text = \"\";\n\tvar hacer = false;\n\tfor (var i = 0; i < f.length; i++){\n\t\tif(f.charAt(i)==')')\n\t\t{\n\t\t\thacer = false;\n\t\t\tvar partes = text.split(\",\");\n\t\t\tobjeto.push({de:partes[0],a:partes[2],entrada:partes[1],salida:\"n\"});\n\t\t\ttext = \"\";\n\n\t\t}\n\t\tif(f.charAt(i)=='(')\n\t\t{\n\t\t\ti++;\n\t\t\thacer = true;\n\t\t}\n\t\tif(hacer)\n\t\t{\n\t\t\ttext = text + f.charAt(i);\n\t\t}\n\t}\n\tfor (var i = 0; i < g.length; i++){\n\t\tif(g.charAt(i)==')')\n\t\t{\n\t\t\thacer = false;\n\t\t\tvar partes = text.split(\",\");\n\t\t\tobjeto[buscar(objeto,partes[0],partes[1])].salida = partes[2];\n\t\t\ttext = \"\";\n\t\t}\n\t\tif(g.charAt(i)=='(')\n\t\t{\n\t\t\ti++;\n\t\t\thacer = true;\n\t\t}\n\t\tif(hacer)\n\t\t{\n\t\t\ttext = text + g.charAt(i);\n\t\t}\n\t}\n \treturn objeto; \n\n\tfunction buscar(arr,de,entrada){\n\t\tfor (var i=0;i<arr.length;i++) {\n\t\t\tif(arr[i].de==de && arr[i].entrada==entrada)\n\t\t\t\treturn i;\n\t\t}\n\t\treturn -1;\n\t}\n}", "function evalRegistro(){\n msjClean();\n\n let id = $(\"#usuario\").val();\n let pass = $(\"#pass\").val();\n let pass2 = $(\"#repetir-pass\").val();\n let nombre = $(\"#nombre\").val();\n let departamento = $(\"#departamento\").val();\n let nivel = $(\"#nivel\").val();\n\n let errores = validateRegistro(id, pass, pass2, nombre, departamento);\n\n if(errores.length == 0){ loginManager.getLogin(id, '', 'checkExistLogin'); }\n else {\n let msjError = \"\";\n for(let i = 0; i < errores.length; i++){\n msjError += errores[i];\n }\n msjDanger('Registro', msjError);\n }\n}", "function irsozinho() {\n\tvar inst = document.getElementById(\"manobraunicabox\").value.replace(/(?:\\r\\n|\\r|\\n|\\t)/g, '\\n');\n\tvar inst = inst.split ('Telefone')[1];\n\tvar inst = inst.split ('\\n')[1];\n\tvar inst = inst.replace(/(?:\\r\\n|\\r|\\n|\\t)/g, '');\n\t\n\tvar estado = document.getElementById(\"manobraunicabox\").value.replace(/(?:\\r\\n|\\r|\\n|\\t)/g, '\\n');\n\tvar estado = estado.split('Localidade\\nEsta')[1];\n\tvar estado = estado.split('\\n')[7];\n\tvar estado = estado.replace(/(?:\\r\\n|\\r|\\n|\\t)/g, '');\t\n\n\tvar cidade = document.getElementById(\"manobraunicabox\").value.replace(/(?:\\r\\n|\\r|\\n|\\t)/g, '\\n');\n\tvar cidade = cidade.split('Localidade\\nEsta')[1];\n\tvar cidade = cidade.split('\\n')[8];\n\tvar cidade = cidade.replace(/(?:\\r\\n|\\r|\\n|\\t)/g, '');\n\t\n\tvar ard = document.getElementById(\"manobraunicabox\").value.replace(/(?:\\r\\n|\\r|\\n|\\t)/g, '\\n');\n\tvar ard = ard.split('alimentador')[1];\n\tvar ard = ard.split ('rio')[1];\n\tvar ard = ard.split ('Porta')[0];\n\tvar ard = ard.replace(/(?:\\r\\n|\\r|\\n|\\t)/g, '');\n\t//utilizar indexOf para encontrar este trecho do ard no select\n\t\n\t\n\tvar rin = document.getElementById(\"manobraunicabox\").value.replace(/(?:\\r\\n|\\r|\\n|\\t)/g, '\\n');\n\tvar rin = rin.split('alimentador')[1];\n\tvar rin = rin.split ('Rin')[1];\n\tvar rin = rin.split ('\\n')[1];\n\tvar rin = rin.split('Encapsulamento')[0];\n\tvar rin = rin.replace(/(?:\\r\\n|\\r|\\n|\\t)/g, '');\n\t\n\tvar contagem = document.getElementById(\"manobraunicabox\").value.replace(/(?:\\r\\n|\\r|\\n|\\t)/g, '\\n');\n\tvar contagem = contagem.split('alimentador')[1];\n\tvar contagem = contagem.split ('Voz')[1];\n\tvar contagem = contagem.split ('Prim')[0];\n\tvar contagem = contagem.split ('-');\n\tvar contagemA = contagem[0];\n\tvar contagemB = contagem[1];\n\tvar contagemF = contagemA+'-'+contagemB;\n\tvar contagemF = contagemF.replace(/(?:\\r\\n|\\r|\\n|\\t)/g, '');\n\t\n\tsessionStorage.setItem('texto',document.getElementById(\"manobraunicabox\").value);\n\tsessionStorage.setItem('inst',inst);\n\tsessionStorage.setItem('estado',estado);\n\tsessionStorage.setItem('cidade',cidade);\n\tsessionStorage.setItem('ard',ard);\n\tsessionStorage.setItem('rin',rin);\n\tsessionStorage.setItem('contagem',contagemF);\n\t\n\t\n\t//console.log ('Instância: '+inst+'\\nCidade: '+cidade+'\\nArmário: '+ard+'\\nContagem: '+contagemF+'\\nRin: '+rin);\n\t\n\t\n\t\n\tsetTimeout(function (){\n\t\t//MASSIVA_PRIMARIO_AC\n\t\tif(typeof(document.getElementsByName('perfil')[0]) !== 'undefined' && document.getElementsByName('perfil')[0] !== null) {\n\t\t\tvar perfil = document.getElementsByName('perfil')[0].options.selectedIndex;\n\t\t\tif (perfil==0|perfil==null){\n\t\t\t\tfor (p=0;p<document.getElementsByName('perfil')[0].options.length;p++){\n\t\t\t\t\tif(document.getElementsByName('perfil')[0].options[p].text=='MASSIVA_PRIMARIO_'+sessionStorage.getItem('estado')){\n\t\t\t\t\t\t//console.log(document.getElementsByName('perfil')[0].options[i].text+'-'+i);\n\t\t\t\t\t\tdocument.getElementsByName('perfil')[0].options[p].selected=true;\n\t\t\t\t\t\tsessionStorage.setItem ('continuar', 'sim');\n\t\t\t\t\t\tdocument.initForm.submit();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\t\t\n\t\tvar cidadeOrigem = document.getElementsByName('cidadeOrigem.cityName')[0].options.selectedIndex;\n\t\tvar armarioOrigem = document.getElementsByName('armarioOrigem.locationId')[0].options.selectedIndex;\n\t\tvar shelfOrigem = document.getElementsByName('shelfOrigem.equipmentId')[0].options.selectedIndex;\n\n\t\tif ((cidadeOrigem==0|cidadeOrigem==null)&sessionStorage.getItem('setCidade')!='ok'){\n\t\t\tfor (i=0;i<document.getElementsByName('cidadeOrigem.cityName')[0].options.length;i++){\n\t\t\t\tif(document.getElementsByName('cidadeOrigem.cityName')[0].options[i].text==sessionStorage.getItem('cidade')){\n\t\t\t\t\t//console.log(document.getElementsByName('cidadeOrigem.cityName')[0].options[i].text+'-'+i);\n\t\t\t\t\tdocument.getElementsByName('cidadeOrigem.cityName')[0].options[i].selected=true;\n\t\t\t\t\tsessionStorage.setItem ('continuar', 'sim');\n\t\t\t\t\tsessionStorage.setItem ('setCidade','ok');\n\t\t\t\t\tVerificaCidade('Cidade');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if((armarioOrigem==0|armarioOrigem!=null)&sessionStorage.getItem('setOrigem')!='ok'){\n\t\t\tfor (j=0;j<document.getElementsByName('armarioOrigem.locationId')[0].options.length;j++){\n\t\t\t\tif (document.getElementsByName('armarioOrigem.locationId')[0].options[j].text.indexOf(sessionStorage.getItem('ard'))> -1){\n\t\t\t\t\tdocument.getElementsByName('armarioOrigem.locationId')[0].options[j].selected=true;\n\t\t\t\t\tsessionStorage.setItem ('continuar', 'sim');\n\t\t\t\t\tsessionStorage.setItem ('setOrigem','ok');\n\t\t\t\t\tverificaOrigemDestinoArmario('origem');\n\t\t\t\t}\t\t\t\t\n\t\t\t}\t\n\t\t}\n\t\telse if ((shelfOrigem==0|shelfOrigem!=null)&sessionStorage.getItem('setRin')!='ok') {\n\t\t\tfor (l=0;l<document.getElementsByName('shelfOrigem.equipmentId')[0].options.length;l++){\n\t\t\t\tif (document.getElementsByName('shelfOrigem.equipmentId')[0].options[l].text.indexOf(sessionStorage.getItem('rin'))> -1){\n\t\t\t\t\tdocument.getElementsByName('shelfOrigem.equipmentId')[0].options[l].selected=true;\n\t\t\t\t\tsessionStorage.setItem ('continuar', 'sim');\n\t\t\t\t\tsessionStorage.setItem ('setRin','ok');\n\t\t\t\t\tatualizaValorTecnologia('origem');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tsessionStorage.setItem ('continuar', 'nao');\n\t\t}\t\n\t}, 1000);\n\tdocument.getElementsByName('instancias')[0].value=sessionStorage.getItem('inst');\n}", "function Registrar() {\n\n //llamado a los campos de textos para que se limpien cada vez que se cargan \n\n //llamado a los id de cada control para almcacenar datoos\n divResultado = document.getElementById('lblRespuestaServidor');\n pkCodigo = document.getElementById('pkCodigo').value;\n fecha = document.getElementById('fecha').value;\n hora = document.getElementById('hora').value;\n txtdescripcion = document.getElementById('txtdescripcion').value;\n if (pkCodigo == \"\") {\n\n $('.validacion').html('<p style=\"color:red\">debe ingresar codigo</p>');\n $(\"#frmHistorialCambios\").effect(\"shake\", {times: 3, distance: 20}, 400);\n } else {\n\n ajax = objetoAjax();\n ajax.open(\"POST\", \"controller/HistorialCambios_controller.php?op=1\", true);\n ajax.onreadystatechange = function() {\n if (ajax.readyState == 4) {\n\n divResultado.innerHTML = ajax.responseText;\n $(\"#modal\").modal('hide');\n showAlert(\" <strong>¡Bien!</strong> Dato agregado Correctamente.\");\n mostrar();\n// $('#Respuesta').innerHTML = ajax.responseText;\n// window.location.href=\"view/forms/frm_registrar_historialCambios.php\";\n // window.location.reload();\n }\n\n\n }\n ajax.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n ajax.send(\"pkCodigo=\" + pkCodigo + \"&fecha=\" + fecha + \"&hora=\" + hora + \"&txtdescripcion=\" + txtdescripcion);\n }\n\n }", "busquedaElemento(nombre) {\n /*\n Se dividirá la búsqueda según el tipo de acceso / o //\n */\n if (!this.controladorDobleSimple) {\n //VERIFICAMOS SI EL OBJETO A BUSCAR PARTE DE LA RAIZ O NO \n if (!this.inicioRaiz) {\n //SE COMIENZA EN LA RAIZ \n for (let entry of this.ArrayEtiquetas) {\n //Usamos una variable auxiliar para almacenar el objeto en cuestion\n let auxiliarBusqueda = entry;\n //Dado que es la raiz, ubicamos la posición en STACK en donde se encuentra el principio de la misma Y la asignados a una variable temporal\n this.codigoTemporal += \"P=\" + auxiliarBusqueda.posicion + \";\\n\";\n let inicioRaizXML = this.temporalGlobal.retornarString();\n this.temporalGlobal.aumentar();\n //Ubicamos nuestra variabel a buscar en el principio del heap \n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=HXP;\\n\";\n //Escribimos dentro del heap de XPATH el nombre del identificador a buscar \n for (var i = 0; i < nombre.length; i++) {\n this.codigoTemporal += `heapXPATH[(int)HXP] = ${nombre.charCodeAt(i)};\\n`;\n this.codigoTemporal += `HXP = HXP+1;\\n`;\n }\n this.codigoTemporal += `heapXPATH[(int)HXP] =-1;\\n`;\n this.codigoTemporal += `HXP = HXP+1;\\n`;\n let anteriorGlobal = this.temporalGlobal.retornarString();\n this.codigoTemporal += \"stackXPATH[(int)PXP]=\" + anteriorGlobal + \";\\n\";\n this.temporalGlobal.aumentar();\n this.codigoTemporal += \"busquedaSimple();\\n\";\n //Verificamos si encontramos el elemento\n if (auxiliarBusqueda.id == nombre) {\n this.pathCompleto = true;\n //Si se encuentra, significa que la siguiente busqueda se debe hacer a partir de este elemento\n this.consolaSalidaXPATH.push(auxiliarBusqueda);\n //Establecemos que ya no comience desde la raiz\n this.inicioRaiz = true;\n }\n }\n }\n //Ahora se procede a iniciar desde el elemento padre en caso de ya haberlo encontrado en la raiz \n else {\n this.temporalGlobal.aumentar();\n //this.codigoTemporalMetodos += this.temporalGlobal.retornarString() + \"=stackXPATH[(int)PXP];\";\n //this.codigoTemporalMetodos += \"PXP = PXP + 1;\\n\";\n //Iniciamos la búsqueda en el último elementro encontrado dentro de la lista final\n let auxiliarContadorConsola = 0;\n let limite = this.consolaSalidaXPATH.length;\n for (var i = this.contadorConsola; i < limite; i++) {\n let auxiliarBusqueda = this.consolaSalidaXPATH[i];\n //C3DC3DC3DC3DC3DC3DC3DC3DC3DC3DC3DC3DC3DC3DC3DC3DC3DC3DC3DC3DC3DC3DC3DC3DC3DC3DC3DC3DC3D\n //C3DC3DC3DC3DC3DC3DC3DC3DC3DC3DC3DC3DC3DC3DC3DC3DC3DC3DC3DC3DC3DC3DC3DC3DC3DC3DC3DC3D\n //Examinamos cada uno de los hijos de ese elemento\n for (var j = 0; j < auxiliarBusqueda.hijos.length; j++) {\n //Si coincide la busqueda, se agrega a la lista final y se activan las banderas respectivas\n let temporal = auxiliarBusqueda.hijos[j];\n //C3D/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// \n this.codigoTemporal += \"encontrarPrimerHijo();\\n\";\n this.codigoTemporal += \"P=\" + temporal.posicion + \";\\n\";\n let inicioRaizXML = this.temporalGlobal.retornarString();\n this.temporalGlobal.aumentar();\n //Ubicamos nuestra variabel a buscar en el principio del heap \n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=HXP;\\n\";\n //Escribimos dentro del heap de XPATH el nombre del identificador a buscar \n for (var x = 0; x < nombre.length; x++) {\n this.codigoTemporal += `heapXPATH[(int)HXP] = ${nombre.charCodeAt(x)};\\n`;\n this.codigoTemporal += `HXP = HXP+1;\\n`;\n }\n this.codigoTemporal += `heapXPATH[(int)HXP] =-1;\\n`;\n this.codigoTemporal += `HXP = HXP+1;\\n`;\n let anteriorGlobal = this.temporalGlobal.retornarString();\n this.codigoTemporal += \"stackXPATH[(int)PXP]=\" + anteriorGlobal + \";\\n\";\n this.temporalGlobal.aumentar();\n this.codigoTemporal += \"busquedaSimple();\\n\";\n //C3D\n ///////////////////////////////////////////////////\n if (temporal.id == nombre) {\n this.pathCompleto = true;\n this.consolaSalidaXPATH.push(temporal);\n auxiliarContadorConsola = i;\n }\n }\n }\n //Fragmento que nos sirve para ir guardando los padres asi como el nuevo inicio de la lista\n this.contadorConsola = auxiliarContadorConsola;\n this.arrayPosicionPadres.push(this.contadorConsola);\n this.contadorConsola++;\n // this.codigoTemporal += \"//CONTADOR: \" + this.contadorConsola + \"\\n\";\n }\n }\n else { //ELSE PARA BUSCAR CON EL TIPO DE ACCESO //\n //nuevamente verificamos si se inicia en la raiz o en el elemento en cuestion \n if (!this.inicioRaiz) {\n //this.arrayPosicionPadres.push(0);\n //En caso de iniciar en la raiz partimos del array de etiquetas \n for (let entry of this.ArrayEtiquetas) {\n let auxiliarBusqueda = entry;\n //C3D*************************************************************************************************************\n //Dado que es la raiz, ubicamos la posición en STACK en donde se encuentra el principio de la misma Y la asignados a una variable temporal\n this.codigoTemporal += \"P=\" + auxiliarBusqueda.posicion + \";\\n\";\n let inicioRaizXML = this.temporalGlobal.retornarString();\n this.temporalGlobal.aumentar();\n //Ubicamos nuestra variabel a buscar en el principio del heap \n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=HXP;\\n\";\n //Escribimos dentro del heap de XPATH el nombre del identificador a buscar \n for (var i = 0; i < nombre.length; i++) {\n this.codigoTemporal += `heapXPATH[(int)HXP] = ${nombre.charCodeAt(i)};\\n`;\n this.codigoTemporal += `HXP = HXP+1;\\n`;\n }\n this.codigoTemporal += `heapXPATH[(int)HXP] =-1;\\n`;\n this.codigoTemporal += `HXP = HXP+1;\\n`;\n let anteriorGlobal = this.temporalGlobal.retornarString();\n this.codigoTemporal += \"stackXPATH[(int)PXP]=\" + anteriorGlobal + \";\\n\";\n this.temporalGlobal.aumentar();\n this.codigoTemporal += \"busquedaSimple();\\n\";\n //C3D*************************************************************************************************************\n //Verificamos si encontramos el elemento\n if (auxiliarBusqueda.id == nombre) {\n this.pathCompleto = true;\n //Agregamos a la lista el elementro encontrado\n this.consolaSalidaXPATH.push(auxiliarBusqueda);\n //Establecemos que ya no comience desde la raiz\n }\n //Llamamos al método recursivo ya que al ser tipo de acceso doble tiene que buscar en todos los lados posibles\n this.auxiliarDoble(auxiliarBusqueda, nombre);\n }\n //Activamos la bandera para ya no iniciar desde la raiz sino en el ultimo elementro encontrado\n this.inicioRaiz = true;\n }\n else {\n //Establecemos el limite de inicio y fin\n this.temporalGlobal.aumentar();\n let auxiliarContadorConsola = 0;\n let limite = this.consolaSalidaXPATH.length;\n for (var i = this.contadorConsola; i < limite; i++) {\n let auxiliarBusqueda = this.consolaSalidaXPATH[i];\n //Revisamos cada uno de los hijos\n for (var j = 0; j < auxiliarBusqueda.hijos.length; j++) {\n //Si coinciden los valores respectivos\n let temporal = auxiliarBusqueda.hijos[j];\n this.codigoTemporal += \"encontrarPrimerHijo();\\n\";\n this.codigoTemporal += \"P=\" + temporal.posicion + \";\\n\";\n let inicioRaizXML = this.temporalGlobal.retornarString();\n this.temporalGlobal.aumentar();\n //Ubicamos nuestra variabel a buscar en el principio del heap \n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=HXP;\\n\";\n //Escribimos dentro del heap de XPATH el nombre del identificador a buscar \n for (var x = 0; x < nombre.length; x++) {\n this.codigoTemporal += `heapXPATH[(int)HXP] = ${nombre.charCodeAt(x)};\\n`;\n this.codigoTemporal += `HXP = HXP+1;\\n`;\n }\n this.codigoTemporal += `heapXPATH[(int)HXP] =-1;\\n`;\n this.codigoTemporal += `HXP = HXP+1;\\n`;\n let anteriorGlobal = this.temporalGlobal.retornarString();\n this.codigoTemporal += \"stackXPATH[(int)PXP]=\" + anteriorGlobal + \";\\n\";\n this.temporalGlobal.aumentar();\n this.codigoTemporal += \"busquedaSimple();\\n\";\n if (temporal.id == nombre) {\n //Guardamos el nuevo elemento a mostrar o examinar y actualizamos el punto de inicio de la lista final\n this.pathCompleto = true;\n this.consolaSalidaXPATH.push(temporal);\n auxiliarContadorConsola = i;\n }\n //Se llama al método recursivo para iniciar la busqueda a fondo \n this.auxiliarDoble(temporal, nombre);\n }\n }\n //Establecemos los nuevos puntos de inicio asi como los padres\n this.contadorConsola = auxiliarContadorConsola;\n this.arrayPosicionPadres.push(this.contadorConsola);\n this.contadorConsola++;\n } //fin inicio raiz DOBLE\n } //FIN DE TIPO DE ACCESO://\n }", "resolverExpresion(nodo) {\n if (this.soyNodo('VAL', nodo)) {\n //Para verificar si lo que se va a examinar es una ruta o un elemento unicamente\n //Sí la cantidad de hijos es mayor a 1, significa que tenemos una ruta \n if (nodo.hijos.length > 1 || this.soyNodo('SIMPLE', nodo.hijos[0]) || this.soyNodo('DOBLE', nodo.hijos[0]) || this.soyNodo('identificador', nodo.hijos[0].hijos[0]) || this.soyNodo('atributo', nodo.hijos[0].hijos[0])) {\n //XQUERY07\n let instanciaResolverExpresion = new Traduccion(nodo, this.raizXML, null, null);\n //instanciaResolverExpresion.ArrayEtiquetas = this.ArrayEtiquetas;\n //instanciaResolverExpresion.ejExp();\n for (var i = this.contadorConsola; i < this.consolaSalidaXPATH.length; i++) {\n instanciaResolverExpresion.ArrayEtiquetas.push(this.consolaSalidaXPATH[i]);\n // salidaXPATH.getInstance().push(this.consolaSalidaXPATH[i].dameID());\n }\n instanciaResolverExpresion.recorrerArbolConsulta(instanciaResolverExpresion.raiz);\n this.codigoTemporal += \"///////////////////////////////////////////////////////////////////////\\n\";\n this.codigoTemporal += instanciaResolverExpresion.codigoTemporal;\n this.codigoTemporal += \"///////////////////////////////////////////////////////////////////////\\n\";\n /* let arrayRetorno = new Array<Etiqueta>();\n for (var i = instanciaResolverExpresion.contadorConsola; i < instanciaResolverExpresion.consolaSalidaXPATH.length - 1;i++)\n {\n arrayRetorno.push(instanciaResolverExpresion.consolaSalidaXPATH[i]);\n }*/\n return new Expresion_1.Expresion({ tipo_: 4 /* ETIQUETA */, valor_: instanciaResolverExpresion });\n }\n return this.resolverExpresion(nodo.hijos[0]);\n }\n if (this.soyNodo('X', nodo)) {\n return this.resolverExpresion(nodo.hijos[0]);\n }\n if (this.soyNodo('E', nodo)) {\n return this.resolverExpresion(nodo.hijos[0]);\n }\n if (this.soyNodo('entero', nodo)) {\n var valor_ = Number(nodo.hijos[0]);\n return new Expresion_1.Expresion({ tipo_: 1 /* NUMBER */, valor_: valor_ });\n }\n if (this.soyNodo('doble', nodo)) {\n var valor_ = Number(nodo.hijos[0]);\n return new Expresion_1.Expresion({ tipo_: 1 /* NUMBER */, valor_: valor_ });\n }\n if (this.soyNodo('string_s', nodo)) {\n let valor_ = nodo.hijos[0].toString();\n var result = valor_.substring(1, valor_.length - 1);\n return new Expresion_1.Expresion({ tipo_: 2 /* STRING */, valor_: result });\n }\n if (this.soyNodo('string_d', nodo)) {\n let valor_ = nodo.hijos[0].toString();\n var result = valor_.substring(1, valor_.length - 1);\n return new Expresion_1.Expresion({ tipo_: 2 /* STRING */, valor_: result });\n }\n if (this.soyNodo('last', nodo)) {\n let valor_ = (this.consolaSalidaXPATH.length) - this.contadorConsola;\n return new Expresion_1.Expresion({ tipo_: 1 /* NUMBER */, valor_: valor_ });\n }\n //NEGATIVO\n else if (this.soyNodo('negativo', nodo)) {\n let expresion1 = this.resolverExpresion(nodo.hijos[0]);\n //numero:\n if (expresion1.tipo == 1) {\n let a1 = Number(expresion1.valor.toString());\n let valor_ = a1 * -1;\n return new Expresion_1.Expresion({ tipo_: 1 /* NUMBER */, valor_: valor_ });\n }\n //erroror\n errores_1.Errores.getInstance().push(new error_1.Error({\n tipo: \"semantico\",\n linea: (Number(nodo.linea) + 1).toString(),\n descripcion: ('No es posible operar -' + this.obtenerTipo_string(expresion1)),\n }));\n } //FIN DE negativo\n //SUMA +\n if (this.soyNodo('+', nodo)) {\n let expresion1 = this.resolverExpresion(nodo.hijos[0]);\n let expresion2 = this.resolverExpresion(nodo.hijos[1]);\n this.temporalGlobal.aumentar();\n if (this.temporalPivote == \"\") {\n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + expresion1.valor.toString() + \"+\" + expresion2.valor.toString() + \";\\n\";\n this.temporalPivote = this.temporalGlobal.retornarString();\n }\n else {\n if (!this.soyNodo('VAL', nodo.hijos[0]) && !this.soyNodo('VAL', nodo.hijos[1])) {\n if (this.contadorOperacionSuprema == 3) {\n this.contadorOperacionSuprema = 1;\n if (this.operacionSuprema != \"\") {\n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + this.temporalPivote + \"+\" + this.operacionSuprema + \";\\n\";\n this.temporalPivote2 = this.temporalPivote;\n this.temporalPivote = this.temporalGlobal.retornarString();\n this.operacionSuprema = \"\";\n }\n }\n else {\n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + this.temporalPivote + \"+\" + this.temporalPivote2 + \";\\n\";\n this.temporalPivote2 = this.temporalPivote;\n this.temporalPivote = this.temporalGlobal.retornarString();\n this.contadorOperacionSuprema++;\n }\n // this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + this.temporalPivote + \"/\" + this.temporalPivote2 + \";\\n\";\n //this.temporalPivote = this.temporalGlobal.retornarString();\n }\n else if (!this.soyNodo('VAL', nodo.hijos[0])) {\n if (this.contadorOperacionSuprema == 3) {\n this.contadorOperacionSuprema = 1;\n if (this.operacionSuprema != \"\") {\n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + this.operacionSuprema + \"+\" + expresion2.valor.toString() + \";\\n\";\n this.temporalPivote2 = this.temporalPivote;\n this.temporalPivote = this.temporalGlobal.retornarString();\n this.operacionSuprema = \"\";\n }\n }\n else {\n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + this.temporalPivote + \"+\" + expresion2.valor.toString() + \";\\n\";\n this.temporalPivote2 = this.temporalPivote;\n this.temporalPivote = this.temporalGlobal.retornarString();\n this.contadorOperacionSuprema++;\n }\n }\n else if (!this.soyNodo('VAL', nodo.hijos[1])) {\n if (this.contadorOperacionSuprema == 3) {\n this.contadorOperacionSuprema = 1;\n if (this.operacionSuprema != \"\") {\n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + expresion1.valor.toString() + \"+\" + this.operacionSuprema + \";\\n\";\n this.temporalPivote2 = this.temporalPivote;\n this.temporalPivote = this.temporalGlobal.retornarString();\n this.operacionSuprema = \"\";\n }\n }\n else {\n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + expresion1.valor.toString() + \"+\" + this.temporalPivote + \";\\n\";\n this.temporalPivote2 = this.temporalPivote;\n this.temporalPivote = this.temporalGlobal.retornarString();\n this.contadorOperacionSuprema++;\n }\n }\n else {\n this.contadorOperacionSuprema = 1;\n this.operacionSuprema = this.temporalPivote;\n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + expresion1.valor.toString() + \"+\" + expresion2.valor.toString() + \";\\n\";\n this.temporalPivote2 = this.temporalPivote;\n this.temporalPivote = this.temporalGlobal.retornarString();\n this.contadorOperacionSuprema++;\n }\n }\n //this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + expresion1.valor.toString() + \"+\" + expresion2.valor.toString() + \";\\n\";\n //Si el nodo1 es numero:\n if (expresion1.tipo == 1) {\n let a1 = Number(expresion1.valor.toString());\n //Si el nodo2 es numero:\n if (expresion2.tipo == 1) {\n let a2 = Number(expresion2.valor.toString());\n let valor_ = a1 + a2;\n return new Expresion_1.Expresion({ tipo_: 1 /* NUMBER */, valor_: valor_ });\n }\n //numero + cadena\n else if (expresion2.tipo == 2) {\n let a1 = (expresion1.valor.toString());\n let b0 = expresion2.valor.toString();\n let valor_ = a1.concat(b0);\n return new Expresion_1.Expresion({ tipo_: 2 /* STRING */, valor_: valor_ });\n }\n }\n //Si nodo1 es cadena\n else if (expresion1.tipo == 2) {\n let a1 = expresion1.valor.toString();\n //Si el nodo2 es numero:\n if (expresion2.tipo == 1) {\n let b1 = expresion2.valor.toString();\n let valor_ = a1.concat(b1);\n return new Expresion_1.Expresion({ tipo_: 2 /* STRING */, valor_: valor_ });\n }\n //Si a2 es string\n else if (expresion2.tipo == 2) {\n let b1 = expresion2.valor.toString();\n let valor_ = a1.concat(b1);\n return new Expresion_1.Expresion({ tipo_: 2 /* STRING */, valor_: valor_ });\n }\n //Si string + bool\n else if (expresion2.tipo == 3) {\n let b1 = expresion2.valor.toString();\n let valor_ = a1.concat(b1);\n return new Expresion_1.Expresion({ tipo_: 2 /* STRING */, valor_: valor_ });\n }\n }\n else if (expresion1.tipo == 3) {\n let a1 = expresion1.valor.toString();\n //bool + string \n if (expresion2.tipo == 2) {\n let b1 = expresion2.valor.toString();\n let valor_ = a1.concat(b1);\n return new Expresion_1.Expresion({ tipo_: 2 /* STRING */, valor_: valor_ });\n }\n }\n //ErrorSUMA\n errores_1.Errores.getInstance().push(new error_1.Error({\n tipo: \"semantico\",\n linea: (Number(nodo.linea) + 1).toString(),\n descripcion: ('No es posible operar ' + this.obtenerTipo_string(expresion1) + \" + \" + this.obtenerTipo_string(expresion2)),\n }));\n } //FIN DE LA SUMA\n //RESTA -\n else if (this.soyNodo('-', nodo)) {\n let expresion1 = this.resolverExpresion(nodo.hijos[0]);\n let expresion2 = this.resolverExpresion(nodo.hijos[1]);\n this.temporalGlobal.aumentar();\n if (this.temporalPivote == \"\") {\n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + expresion1.valor.toString() + \"-\" + expresion2.valor.toString() + \";\\n\";\n this.temporalPivote = this.temporalGlobal.retornarString();\n }\n else {\n if (!this.soyNodo('VAL', nodo.hijos[0]) && !this.soyNodo('VAL', nodo.hijos[1])) {\n if (this.contadorOperacionSuprema == 3) {\n this.contadorOperacionSuprema = 1;\n if (this.operacionSuprema != \"\") {\n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + this.operacionSuprema + \"-\" + this.temporalPivote + \";\\n\";\n this.temporalPivote2 = this.temporalPivote;\n this.temporalPivote = this.temporalGlobal.retornarString();\n this.operacionSuprema = \"\";\n }\n }\n else {\n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + this.temporalPivote2 + \"-\" + this.temporalPivote + \";\\n\";\n this.temporalPivote2 = this.temporalPivote;\n this.temporalPivote = this.temporalGlobal.retornarString();\n this.contadorOperacionSuprema++;\n }\n // this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + this.temporalPivote + \"/\" + this.temporalPivote2 + \";\\n\";\n //this.temporalPivote = this.temporalGlobal.retornarString();\n }\n else if (!this.soyNodo('VAL', nodo.hijos[0])) {\n if (this.contadorOperacionSuprema == 3) {\n this.contadorOperacionSuprema = 1;\n if (this.operacionSuprema != \"\") {\n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + this.operacionSuprema + \"-\" + expresion2.valor.toString() + \";\\n\";\n this.temporalPivote2 = this.temporalPivote;\n this.temporalPivote = this.temporalGlobal.retornarString();\n this.operacionSuprema = \"\";\n }\n }\n else {\n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + this.temporalPivote + \"-\" + expresion2.valor.toString() + \";\\n\";\n this.temporalPivote2 = this.temporalPivote;\n this.temporalPivote = this.temporalGlobal.retornarString();\n this.contadorOperacionSuprema++;\n }\n }\n else if (!this.soyNodo('VAL', nodo.hijos[1])) {\n if (this.contadorOperacionSuprema == 3) {\n this.contadorOperacionSuprema = 1;\n if (this.operacionSuprema != \"\") {\n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + expresion1.valor.toString() + \"-\" + this.operacionSuprema + \";\\n\";\n this.temporalPivote2 = this.temporalPivote;\n this.temporalPivote = this.temporalGlobal.retornarString();\n this.operacionSuprema = \"\";\n }\n }\n else {\n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + expresion1.valor.toString() + \"-\" + this.temporalPivote + \";\\n\";\n this.temporalPivote2 = this.temporalPivote;\n this.temporalPivote = this.temporalGlobal.retornarString();\n this.contadorOperacionSuprema++;\n }\n }\n else {\n this.contadorOperacionSuprema = 1;\n this.operacionSuprema = this.temporalPivote;\n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + expresion1.valor.toString() + \"-\" + expresion2.valor.toString() + \";\\n\";\n this.temporalPivote2 = this.temporalPivote;\n this.temporalPivote = this.temporalGlobal.retornarString();\n this.contadorOperacionSuprema++;\n }\n }\n //Si el nodo1 es numero:\n if (expresion1.tipo == 1) {\n let a1 = Number(expresion1.valor.toString());\n //Si el nodo2 es numero:\n if (expresion2.tipo == 1) {\n let a2 = Number(expresion2.valor.toString());\n let valor_ = a1 - a2;\n return new Expresion_1.Expresion({ tipo_: 1 /* NUMBER */, valor_: valor_ });\n }\n }\n //ErrorRESTA\n errores_1.Errores.getInstance().push(new error_1.Error({\n tipo: \"semantico\",\n linea: (Number(nodo.linea) + 1).toString(),\n descripcion: ('No es posible operar ' + this.obtenerTipo_string(expresion1) + \" - \" + this.obtenerTipo_string(expresion2)),\n }));\n } //FIN DE LA RESTA\n //MULTIPLICACION\n else if (this.soyNodo('*', nodo)) {\n let expresion1 = this.resolverExpresion(nodo.hijos[0]);\n let expresion2 = this.resolverExpresion(nodo.hijos[1]);\n this.temporalGlobal.aumentar();\n /*if (this.temporalPivote == \"\") {\n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + expresion1.valor.toString() + \"*\" + expresion2.valor.toString() + \";\\n\";\n this.temporalPivote = this.temporalGlobal.retornarString();\n } else {\n if (!this.soyNodo('VAL', nodo.hijos[0])&&!this.soyNodo('VAL', nodo.hijos[1]))\n {\n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + this.temporalPivote + \"*\" + this.temporalPivote2 + \";\\n\";\n this.temporalPivote = this.temporalGlobal.retornarString();\n } else if (!this.soyNodo('VAL', nodo.hijos[0]))\n {\n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + this.temporalPivote + \"*\" + expresion2.valor.toString() + \";\\n\";\n this.temporalPivote2 = this.temporalPivote;\n this.temporalPivote = this.temporalGlobal.retornarString();\n \n }\n else if (!this.soyNodo('VAL', nodo.hijos[1]))\n {\n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + expresion1.valor.toString() + \"*\" + this.temporalPivote + \";\\n\";\n this.temporalPivote2 = this.temporalPivote;\n this.temporalPivote = this.temporalGlobal.retornarString();\n } else {\n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + expresion1.valor.toString() + \"*\" + expresion2.valor.toString() + \";\\n\";\n this.temporalPivote2 = this.temporalPivote;\n this.temporalPivote = this.temporalGlobal.retornarString();\n }\n }*/\n if (this.temporalPivote == \"\") {\n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + expresion1.valor.toString() + \"*\" + expresion2.valor.toString() + \";\\n\";\n this.temporalPivote = this.temporalGlobal.retornarString();\n }\n else {\n if (!this.soyNodo('VAL', nodo.hijos[0]) && !this.soyNodo('VAL', nodo.hijos[1])) {\n if (this.contadorOperacionSuprema == 3) {\n this.contadorOperacionSuprema = 1;\n if (this.operacionSuprema != \"\") {\n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + this.temporalPivote + \"*\" + this.operacionSuprema + \";\\n\";\n this.temporalPivote2 = this.temporalPivote;\n this.temporalPivote = this.temporalGlobal.retornarString();\n this.operacionSuprema = \"\";\n }\n }\n else {\n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + this.temporalPivote + \"*\" + this.temporalPivote2 + \";\\n\";\n this.temporalPivote2 = this.temporalPivote;\n this.temporalPivote = this.temporalGlobal.retornarString();\n this.contadorOperacionSuprema++;\n }\n // this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + this.temporalPivote + \"/\" + this.temporalPivote2 + \";\\n\";\n //this.temporalPivote = this.temporalGlobal.retornarString();\n }\n else if (!this.soyNodo('VAL', nodo.hijos[0])) {\n if (this.contadorOperacionSuprema == 3) {\n this.contadorOperacionSuprema = 1;\n if (this.operacionSuprema != \"\") {\n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + this.operacionSuprema + \"*\" + expresion2.valor.toString() + \";\\n\";\n this.temporalPivote2 = this.temporalPivote;\n this.temporalPivote = this.temporalGlobal.retornarString();\n this.operacionSuprema = \"\";\n }\n }\n else {\n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + this.temporalPivote + \"*\" + expresion2.valor.toString() + \";\\n\";\n this.temporalPivote2 = this.temporalPivote;\n this.temporalPivote = this.temporalGlobal.retornarString();\n this.contadorOperacionSuprema++;\n }\n }\n else if (!this.soyNodo('VAL', nodo.hijos[1])) {\n if (this.contadorOperacionSuprema == 3) {\n this.contadorOperacionSuprema = 1;\n if (this.operacionSuprema != \"\") {\n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + expresion1.valor.toString() + \"*\" + this.operacionSuprema + \";\\n\";\n this.temporalPivote2 = this.temporalPivote;\n this.temporalPivote = this.temporalGlobal.retornarString();\n this.operacionSuprema = \"\";\n }\n }\n else {\n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + expresion1.valor.toString() + \"*\" + this.temporalPivote + \";\\n\";\n this.temporalPivote2 = this.temporalPivote;\n this.temporalPivote = this.temporalGlobal.retornarString();\n this.contadorOperacionSuprema++;\n }\n }\n else {\n this.contadorOperacionSuprema = 1;\n this.operacionSuprema = this.temporalPivote;\n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + expresion1.valor.toString() + \"*\" + expresion2.valor.toString() + \";\\n\";\n this.temporalPivote2 = this.temporalPivote;\n this.temporalPivote = this.temporalGlobal.retornarString();\n this.contadorOperacionSuprema++;\n }\n }\n //Si el nodo1 es numero:\n if (expresion1.tipo == 1) {\n let a1 = Number(expresion1.valor.toString());\n //Si el nodo2 es numero:\n if (expresion2.tipo == 1) {\n let a2 = Number(expresion2.valor.toString());\n let valor_ = a1 * a2;\n return new Expresion_1.Expresion({ tipo_: 1 /* NUMBER */, valor_: valor_ });\n }\n //numero * cadena\n else if (expresion2.tipo == 2) {\n let b0 = expresion2.valor.toString();\n let b1 = \"\";\n for (var i = 0; i < a1; i++) {\n b1 = b1.concat(b0);\n }\n let valor_ = b1;\n return new Expresion_1.Expresion({ tipo_: 2 /* STRING */, valor_: valor_ });\n }\n }\n //Si el nodo1 es numero:\n if (expresion1.tipo == 2) {\n let a1 = expresion1.valor.toString();\n //numero * cadena\n if (expresion2.tipo == 1) {\n let b0 = Number(expresion2.valor.toString());\n let b1 = \"\";\n for (var i = 0; i < b0; i++) {\n b1 = b1.concat(a1);\n }\n let valor_ = b1;\n return new Expresion_1.Expresion({ tipo_: 2 /* STRING */, valor_: valor_ });\n }\n }\n //errorMulti\n errores_1.Errores.getInstance().push(new error_1.Error({\n tipo: \"semantico\",\n linea: (Number(nodo.linea) + 1).toString(),\n descripcion: ('No es posible operar ' + this.obtenerTipo_string(expresion1) + \" * \" + this.obtenerTipo_string(expresion2)),\n }));\n } //FIN DE LA MULTI\n //DIVISION\n else if (this.soyNodo('div', nodo)) {\n let expresion1 = this.resolverExpresion(nodo.hijos[0]);\n let expresion2 = this.resolverExpresion(nodo.hijos[1]);\n this.temporalGlobal.aumentar();\n if (this.temporalPivote == \"\") {\n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + expresion1.valor.toString() + \"/\" + expresion2.valor.toString() + \";\\n\";\n this.temporalPivote = this.temporalGlobal.retornarString();\n }\n else {\n if (!this.soyNodo('VAL', nodo.hijos[0]) && !this.soyNodo('VAL', nodo.hijos[1])) {\n if (this.contadorOperacionSuprema == 3) {\n this.contadorOperacionSuprema = 1;\n if (this.operacionSuprema != \"\") {\n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + this.temporalPivote + \"/\" + this.operacionSuprema + \";\\n\";\n this.temporalPivote2 = this.temporalPivote;\n this.temporalPivote = this.temporalGlobal.retornarString();\n this.operacionSuprema = \"\";\n }\n }\n else {\n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + this.temporalPivote + \"/\" + this.temporalPivote2 + \";\\n\";\n this.temporalPivote2 = this.temporalPivote;\n this.temporalPivote = this.temporalGlobal.retornarString();\n this.contadorOperacionSuprema++;\n }\n // this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + this.temporalPivote + \"/\" + this.temporalPivote2 + \";\\n\";\n //this.temporalPivote = this.temporalGlobal.retornarString();\n }\n else if (!this.soyNodo('VAL', nodo.hijos[0])) {\n if (this.contadorOperacionSuprema == 3) {\n this.contadorOperacionSuprema = 1;\n if (this.operacionSuprema != \"\") {\n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + this.operacionSuprema + \"/\" + expresion2.valor.toString() + \";\\n\";\n this.temporalPivote2 = this.temporalPivote;\n this.temporalPivote = this.temporalGlobal.retornarString();\n this.operacionSuprema = \"\";\n }\n }\n else {\n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + this.temporalPivote + \"/\" + expresion2.valor.toString() + \";\\n\";\n this.temporalPivote2 = this.temporalPivote;\n this.temporalPivote = this.temporalGlobal.retornarString();\n this.contadorOperacionSuprema++;\n }\n }\n else if (!this.soyNodo('VAL', nodo.hijos[1])) {\n if (this.contadorOperacionSuprema == 3) {\n this.contadorOperacionSuprema = 1;\n if (this.operacionSuprema != \"\") {\n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + expresion1.valor.toString() + \"/\" + this.operacionSuprema + \";\\n\";\n this.temporalPivote2 = this.temporalPivote;\n this.temporalPivote = this.temporalGlobal.retornarString();\n this.operacionSuprema = \"\";\n }\n }\n else {\n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + expresion1.valor.toString() + \"/\" + this.temporalPivote + \";\\n\";\n this.temporalPivote2 = this.temporalPivote;\n this.temporalPivote = this.temporalGlobal.retornarString();\n this.contadorOperacionSuprema++;\n }\n }\n else {\n this.contadorOperacionSuprema = 1;\n this.operacionSuprema = this.temporalPivote;\n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=\" + expresion1.valor.toString() + \"/\" + expresion2.valor.toString() + \";\\n\";\n this.temporalPivote2 = this.temporalPivote;\n this.temporalPivote = this.temporalGlobal.retornarString();\n this.contadorOperacionSuprema++;\n }\n }\n //Si el nodo1 es numero:\n if (expresion1.tipo == 1) {\n let a1 = Number(expresion1.valor.toString());\n //Si el nodo2 es numero:\n if (expresion2.tipo == 1) {\n let a2 = Number(expresion2.valor.toString());\n let valor_ = a1 / a2;\n return new Expresion_1.Expresion({ tipo_: 1 /* NUMBER */, valor_: valor_ });\n }\n }\n //errorDivi\n errores_1.Errores.getInstance().push(new error_1.Error({\n tipo: \"semantico\",\n linea: (Number(nodo.linea) + 1).toString(),\n descripcion: ('No es posible operar ' + this.obtenerTipo_string(expresion1) + \" / \" + this.obtenerTipo_string(expresion2)),\n }));\n } //FIN DE LA DIvi\n //DIVISION\n else if (this.soyNodo('mod', nodo)) {\n let expresion1 = this.resolverExpresion(nodo.hijos[0]);\n let expresion2 = this.resolverExpresion(nodo.hijos[1]);\n //Si el nodo1 es numero:\n if (expresion1.tipo == 1) {\n let a1 = Number(expresion1.valor.toString());\n //Si el nodo2 es numero:\n if (expresion2.tipo == 1) {\n let a2 = Number(expresion2.valor.toString());\n let valor_ = a1 % a2;\n return new Expresion_1.Expresion({ tipo_: 1 /* NUMBER */, valor_: valor_ });\n }\n }\n //errorMod\n errores_1.Errores.getInstance().push(new error_1.Error({\n tipo: \"semantico\",\n linea: (Number(nodo.linea) + 1).toString(),\n descripcion: ('No es posible operar ' + this.obtenerTipo_string(expresion1) + \" mod \" + this.obtenerTipo_string(expresion2)),\n }));\n } //FIN DE LA mod\n //mayorque\n else if (this.soyNodo('>', nodo)) {\n let expresion1 = this.resolverExpresion(nodo.hijos[0]);\n let expresion2 = this.resolverExpresion(nodo.hijos[1]);\n //numero:\n if (expresion1.tipo == 1) {\n let a1 = Number(expresion1.valor.toString());\n //numero > numero:\n if (expresion2.tipo == 1) {\n let a2 = Number(expresion2.valor.toString());\n let valor_ = a1 > a2;\n return new Expresion_1.Expresion({ tipo_: 3 /* BOOLEAN */, valor_: valor_ });\n }\n }\n //errormayor\n errores_1.Errores.getInstance().push(new error_1.Error({\n tipo: \"semantico\",\n linea: (Number(nodo.linea) + 1).toString(),\n descripcion: ('No es posible operar ' + this.obtenerTipo_string(expresion1) + \" > \" + this.obtenerTipo_string(expresion2)),\n }));\n } //FIN DE LA mayor\n //menorque\n else if (this.soyNodo('<', nodo)) {\n let expresion1 = this.resolverExpresion(nodo.hijos[0]);\n let expresion2 = this.resolverExpresion(nodo.hijos[1]);\n //bool:\n if (expresion1.tipo == 1) {\n let a1 = Number(expresion1.valor.toString());\n //bool and bool:\n if (expresion2.tipo == 1) {\n let a2 = Number(expresion2.valor.toString());\n let valor_ = a1 < a2;\n return new Expresion_1.Expresion({ tipo_: 3 /* BOOLEAN */, valor_: valor_ });\n }\n }\n //errormayor\n errores_1.Errores.getInstance().push(new error_1.Error({\n tipo: \"semantico\",\n linea: (Number(nodo.linea) + 1).toString(),\n descripcion: ('No es posible operar ' + this.obtenerTipo_string(expresion1) + \" < \" + this.obtenerTipo_string(expresion2)),\n }));\n } //FIN DE menor\n //mayor igual que\n else if (this.soyNodo('>=', nodo)) {\n let expresion1 = this.resolverExpresion(nodo.hijos[0]);\n let expresion2 = this.resolverExpresion(nodo.hijos[1]);\n //bool:\n if (expresion1.tipo == 1) {\n let a1 = Number(expresion1.valor.toString());\n //bool and bool:\n if (expresion2.tipo == 1) {\n let a2 = Number(expresion2.valor.toString());\n let valor_ = a1 >= a2;\n return new Expresion_1.Expresion({ tipo_: 3 /* BOOLEAN */, valor_: valor_ });\n }\n }\n //errormayor igual\n errores_1.Errores.getInstance().push(new error_1.Error({\n tipo: \"semantico\",\n linea: (Number(nodo.linea) + 1).toString(),\n descripcion: ('No es posible operar ' + this.obtenerTipo_string(expresion1) + \" >= \" + this.obtenerTipo_string(expresion2)),\n }));\n } //FIN DE mayor igual\n //menor igual que\n else if (this.soyNodo('<=', nodo)) {\n let expresion1 = this.resolverExpresion(nodo.hijos[0]);\n let expresion2 = this.resolverExpresion(nodo.hijos[1]);\n //numero:\n if (expresion1.tipo == 1) {\n let a1 = Number(expresion1.valor.toString());\n //numero <= numero:\n if (expresion2.tipo == 1) {\n let a2 = Number(expresion2.valor.toString());\n let valor_ = a1 <= a2;\n return new Expresion_1.Expresion({ tipo_: 3 /* BOOLEAN */, valor_: valor_ });\n }\n }\n //errormenor igual\n errores_1.Errores.getInstance().push(new error_1.Error({\n tipo: \"semantico\",\n linea: (Number(nodo.linea) + 1).toString(),\n descripcion: ('No es posible operar ' + this.obtenerTipo_string(expresion1) + \" <= \" + this.obtenerTipo_string(expresion2)),\n }));\n } //FIN DE menor igual\n //diferente que\n else if (this.soyNodo('!=', nodo)) {\n let expresion1 = this.resolverExpresion(nodo.hijos[0]);\n let expresion2 = this.resolverExpresion(nodo.hijos[1]);\n //numero:\n if (expresion1.tipo == 1) {\n let a1 = Number(expresion1.valor.toString());\n //numero = numero:\n if (expresion2.tipo == 1) {\n let a2 = Number(expresion2.valor.toString());\n let valor_ = a1 != a2;\n return new Expresion_1.Expresion({ tipo_: 3 /* BOOLEAN */, valor_: valor_ });\n }\n }\n //string:\n if (expresion1.tipo == 2) {\n let a1 = (expresion1.valor.toString());\n //string = string\n if (expresion2.tipo == 2) {\n let a2 = (expresion2.valor.toString());\n let valor_ = a1 != a2;\n return new Expresion_1.Expresion({ tipo_: 3 /* BOOLEAN */, valor_: valor_ });\n }\n }\n //bool:\n if (expresion1.tipo == 3) {\n let a1 = JSON.parse(expresion1.valor.toString());\n //bool = bool\n if (expresion2.tipo == 3) {\n let a2 = JSON.parse(expresion2.valor.toString());\n let valor_ = a1 != a2;\n return new Expresion_1.Expresion({ tipo_: 3 /* BOOLEAN */, valor_: valor_ });\n }\n }\n //errorigual\n errores_1.Errores.getInstance().push(new error_1.Error({\n tipo: \"semantico\",\n linea: (Number(nodo.linea) + 1).toString(),\n descripcion: ('No es posible operar ' + this.obtenerTipo_string(expresion1) + \" != \" + this.obtenerTipo_string(expresion2)),\n }));\n } //FIN DE diferente\n //igual que\n else if (this.soyNodo('=', nodo)) {\n let expresion1 = this.resolverExpresion(nodo.hijos[0]);\n let expresion2 = this.resolverExpresion(nodo.hijos[1]);\n //numero:\n if (expresion1.tipo == 1) {\n let a1 = Number(expresion1.valor.toString());\n //numero = numero:\n if (expresion2.tipo == 1) {\n let a2 = Number(expresion2.valor.toString());\n let valor_ = a1 == a2;\n return new Expresion_1.Expresion({ tipo_: 3 /* BOOLEAN */, valor_: valor_ });\n }\n }\n //string:\n if (expresion1.tipo == 2) {\n let a1 = (expresion1.valor.toString());\n //string = string\n if (expresion2.tipo == 2) {\n let a2 = (expresion2.valor.toString());\n let valor_ = a1 == a2;\n return new Expresion_1.Expresion({ tipo_: 3 /* BOOLEAN */, valor_: valor_ });\n }\n }\n //bool:\n if (expresion1.tipo == 3) {\n let a1 = JSON.parse(expresion1.valor.toString());\n //bool = bool\n if (expresion2.tipo == 3) {\n let a2 = JSON.parse(expresion2.valor.toString());\n let valor_ = a1 == a2;\n return new Expresion_1.Expresion({ tipo_: 3 /* BOOLEAN */, valor_: valor_ });\n }\n }\n //etiqueta:\n if (expresion1.tipo == 4) {\n let contador = 0;\n let datosRetorno = new Array();\n let a1 = expresion1.valor;\n // a1 = JSON.parse(expresion1.valor); //OBTENEMOS LA INSTANCIA DE LA CLASE EJECUCION\n let valorComparar = expresion2.valor.toString(); //OBTENEMOS EL VALOR A COMPARAR\n //RECORREMOS LA LISTA DE ETIQUETAS ENCONTRADAS EN LA RUTA\n for (var i = a1.contadorConsola; i < a1.consolaSalidaXPATH.length; i++) {\n //salidaXPATH.getInstance().push(\"entra\");\n //ASIGNAMOS UNA VARIABLE TEMPORAL\n let temp = a1.consolaSalidaXPATH[i];\n // salidaXPATH.getInstance().push(temp.dameID());\n //salidaXPATH.getInstance().push(temp.dameValor());\n //salidaXPATH.getInstance().push(valorComparar);\n //VERIFICAMOS SI SE BUSCA UN ATRIBUTO O ETIQUETA\n if (a1.controladorAtributoImpresion) {\n //SI ENTRAMOS ACA ES QUE SE BUSCA UN ATRIBUTO\n //ESTABLECEMOS EN LA CLASE PADRE QUE UN ATRIBUTO VAMOS A IMPRIMIR SI FUESE EL ULTIMO\n // this.controladorAtributoImpresion = true;\n for (let entry of temp.atributos) {\n //RECORREMOS CADA UNO DE LOS ATRIBUTOS\n let x = entry;\n //OBTENEMOS EL NOMBRE DEL ATRIBUTO A EXAMINAR\n let nombreAtributo = x.dameNombre();\n //CODIGO DE 3 DIRECCIONES \n this.codigoTemporal += \"P=\" + temp.posicion + \";\\n\";\n let inicioRaizXML = this.temporalGlobal.retornarString();\n this.temporalGlobal.aumentar();\n //Ubicamos nuestra variabel a buscar en el principio del heap \n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=HXP;\\n\";\n //Escribimos dentro del heap de XPATH el nombre del identificador a buscar \n for (var z = 0; z < valorComparar.length; z++) {\n this.codigoTemporal += `heapXPATH[(int)HXP] = ${valorComparar.charCodeAt(z)};\\n`;\n this.codigoTemporal += `HXP = HXP+1;\\n`;\n }\n this.codigoTemporal += `heapXPATH[(int)HXP] =-1;\\n`;\n this.codigoTemporal += `HXP = HXP+1;\\n`;\n let anteriorGlobal = this.temporalGlobal.retornarString();\n this.codigoTemporal += \"stackXPATH[(int)PXP]=\" + anteriorGlobal + \";\\n\";\n this.temporalGlobal.aumentar();\n this.codigoTemporal += \"comparacionValor();\\n\";\n //CODIGO DE 3 DIRECCIONES \n // salidaXPATH.getInstance().push(nombreAtributo);\n //VERIFICAMOS SI ES EL ATRIBUTO CORRECTO\n if (nombreAtributo == a1.atributoID) {\n //VERIFICAMOS SI ES EL VALOR INDICADO\n if (x.dameValor() == valorComparar) {\n if (contador == 0) {\n datosRetorno.push(\"atributo\");\n datosRetorno.push(nombreAtributo);\n datosRetorno.push(valorComparar);\n }\n contador++;\n }\n }\n }\n }\n else {\n this.codigoTemporal += \"P=\" + temp.posicion + \";\\n\";\n let inicioRaizXML = this.temporalGlobal.retornarString();\n this.temporalGlobal.aumentar();\n //Ubicamos nuestra variabel a buscar en el principio del heap \n this.codigoTemporal += this.temporalGlobal.retornarString() + \"=HXP;\\n\";\n //Escribimos dentro del heap de XPATH el nombre del identificador a buscar \n for (var z = 0; z < valorComparar.length; z++) {\n this.codigoTemporal += `heapXPATH[(int)HXP] = ${valorComparar.charCodeAt(z)};\\n`;\n this.codigoTemporal += `HXP = HXP+1;\\n`;\n }\n this.codigoTemporal += `heapXPATH[(int)HXP] =-1;\\n`;\n this.codigoTemporal += `HXP = HXP+1;\\n`;\n let anteriorGlobal = this.temporalGlobal.retornarString();\n this.codigoTemporal += \"stackXPATH[(int)PXP]=\" + anteriorGlobal + \";\\n\";\n this.temporalGlobal.aumentar();\n this.codigoTemporal += \"comparacionValorEtiqueta();\\n\";\n if (temp.dameValor().substring(1) === valorComparar) {\n if (contador == 0) {\n datosRetorno.push(\"etiqueta\");\n datosRetorno.push(temp.dameID());\n datosRetorno.push(valorComparar);\n }\n contador++;\n }\n }\n }\n return new Expresion_1.Expresion({ tipo_: 4 /* ETIQUETA */, valor_: datosRetorno });\n }\n //errorigual\n errores_1.Errores.getInstance().push(new error_1.Error({\n tipo: \"semantico\",\n linea: (Number(nodo.linea) + 1).toString(),\n descripcion: ('No es posible operar ' + this.obtenerTipo_string(expresion1) + \" == \" + this.obtenerTipo_string(expresion2)),\n }));\n } //FIN DE diferente\n //and\n else if (this.soyNodo('and', nodo)) {\n let expresion1 = this.resolverExpresion(nodo.hijos[0]);\n let expresion2 = this.resolverExpresion(nodo.hijos[1]);\n //bool:\n if (expresion1.tipo == 3) {\n let a1 = JSON.parse(expresion1.valor.toString());\n //bool and bool:\n if (expresion2.tipo == 3) {\n let a2 = JSON.parse(expresion2.valor.toString());\n let valor_ = a1 && a2;\n return new Expresion_1.Expresion({ tipo_: 3 /* BOOLEAN */, valor_: valor_ });\n }\n }\n //errorand\n errores_1.Errores.getInstance().push(new error_1.Error({\n tipo: \"semantico\",\n linea: (Number(nodo.linea) + 1).toString(),\n descripcion: ('No es posible operar ' + this.obtenerTipo_string(expresion1) + \" AND \" + this.obtenerTipo_string(expresion2)),\n }));\n } //FIN DE and\n //OR\n else if (this.soyNodo('or', nodo)) {\n let expresion1 = this.resolverExpresion(nodo.hijos[0]);\n let expresion2 = this.resolverExpresion(nodo.hijos[1]);\n //bool:\n if (expresion1.tipo == 3) {\n let a1 = JSON.parse(expresion1.valor.toString());\n //bool and bool:\n if (expresion2.tipo == 3) {\n let a2 = JSON.parse(expresion2.valor.toString());\n let valor_ = a1 || a2;\n return new Expresion_1.Expresion({ tipo_: 3 /* BOOLEAN */, valor_: valor_ });\n }\n }\n //erroror\n errores_1.Errores.getInstance().push(new error_1.Error({\n tipo: \"semantico\",\n linea: (Number(nodo.linea) + 1).toString(),\n descripcion: ('No es posible operar ' + this.obtenerTipo_string(expresion1) + \" OR \" + this.obtenerTipo_string(expresion2)),\n }));\n } //FIN DE or\n return new Expresion_1.Expresion({ tipo_: 0 /* ERROR */, valor_: \"0\" });\n }", "function RdatosLogistica(Material, Partidas, Destinos, Tiempo) {\n return { Material,Partidas, Destinos, Tiempo };\n}", "function LeEntradas() {\n // Modo mestre ligado ou nao.\n gEntradas.modo_mestre = Dom('input-modo-mestre').checked;\n\n // nome\n gEntradas.nome = Dom('nome').value;\n // raca\n gEntradas.raca = ValorSelecionado(Dom('raca'));\n // template\n gEntradas.template = ValorSelecionado(Dom('template'));\n // tamanho\n gEntradas.tamanho = ValorSelecionado(Dom('tamanho')) || tabelas_raca[gEntradas.raca].tamanho;\n // alinhamento\n gEntradas.alinhamento = ValorSelecionado(Dom('alinhamento'));\n // divindade\n gEntradas.divindade = Dom('divindade-patrona').value;\n // classes.\n gEntradas.classes.length = 0;\n var div_classes = Dom('classes');\n for (var i = 0; i < div_classes.childNodes.length; ++i) {\n var elemento = div_classes.childNodes[i];\n if (elemento.tagName == \"DIV\") {\n var select = elemento.getElementsByTagName(\"SELECT\")[0];\n var input = elemento.getElementsByTagName(\"INPUT\")[0];\n gEntradas.classes.push({\n classe: ValorSelecionado(select),\n nivel: parseInt(input.value)});\n }\n }\n // Dominios de clerigo.\n _LeDominios();\n // Familiares.\n _LeFamiliar();\n _LeCompanheiroAnimal();\n gEntradas.niveis_negativos = parseInt(Dom('niveis-negativos').value) || 0;\n // pontos de vida e ferimentos.\n gEntradas.pontos_vida = parseInt(Dom('pontos-vida-dados').value) || 0;\n gEntradas.pontos_vida_temporarios = parseInt(Dom('pontos-vida-temporarios').value) || 0;\n gEntradas.ferimentos = Math.abs(parseInt(Dom('ferimentos').textContent)) || 0;\n gEntradas.ferimentos_nao_letais = Math.abs(parseInt(Dom('ferimentos-nao-letais').textContent)) || 0;\n // Experiencia.\n gEntradas.experiencia = parseInt(Dom('pontos-experiencia').value) || 0;\n // atributos\n var span_bonus_atributos = Dom('pontos-atributos-gastos');\n if (span_bonus_atributos.textContent.length > 0) {\n var array_bonus = span_bonus_atributos.textContent.split(',');\n for (var i = 0; i < array_bonus.length; ++i) {\n // Trim direita.\n var nome_atributo = AjustaString(array_bonus[i]);\n array_bonus[i] = tabelas_atributos_invertidos[nome_atributo];\n }\n gEntradas.bonus_atributos = array_bonus;\n } else {\n gEntradas.bonus_atributos = [];\n }\n var atributos = [\n 'forca', 'destreza', 'constituicao', 'inteligencia', 'sabedoria', 'carisma' ];\n for (var i = 0; i < atributos.length; ++i) {\n gEntradas[atributos[i]] =\n parseInt(Dom(atributos[i] + '-valor-base').value);\n }\n\n // Estilos de luta.\n gEntradas.estilos_luta = [];\n var div_estilos_luta = Dom('div-estilos-luta');\n for (var i = 0; i < div_estilos_luta.childNodes.length; ++i) {\n gEntradas.estilos_luta.push(\n _LeEntradaEstiloLuta(div_estilos_luta.childNodes[i]));\n }\n\n _LeHabilidadesEspeciais();\n\n _LeEquipamentos();\n\n _LeTalentos();\n\n // Pericias.\n _LePericias();\n\n // Feiticos.\n _LeFeiticos();\n\n gEntradas.notas = Dom('text-area-notas').value;\n}", "function LeEntradas() {\n // Modo mestre ligado ou nao.\n gEntradas.modo_mestre = Dom('input-modo-mestre').checked;\n\n // nome\n gEntradas.nome = Dom('nome').value;\n // raca\n gEntradas.raca = ValorSelecionado(Dom('raca'));\n // template\n gEntradas.template = ValorSelecionado(Dom('template'));\n // tamanho\n gEntradas.tamanho = ValorSelecionado(Dom('tamanho')) || tabelas_raca[gEntradas.raca].tamanho;\n // alinhamento\n gEntradas.alinhamento = ValorSelecionado(Dom('alinhamento'));\n // divindade\n gEntradas.divindade = Dom('divindade-patrona').value;\n // classes.\n gEntradas.classes.length = 0;\n var div_classes = Dom('classes');\n for (var i = 0; i < div_classes.childNodes.length; ++i) {\n var elemento = div_classes.childNodes[i];\n if (elemento.tagName == \"DIV\") {\n var select = elemento.getElementsByTagName(\"SELECT\")[0];\n var input = elemento.getElementsByTagName(\"INPUT\")[0];\n gEntradas.classes.push({\n classe: ValorSelecionado(select),\n nivel: parseInt(input.value)});\n }\n }\n // Dominios de clerigo.\n _LeDominios();\n // Familiares.\n _LeFamiliar();\n _LeCompanheiroAnimal();\n gEntradas.niveis_negativos = parseInt(Dom('niveis-negativos').value) || 0;\n // pontos de vida e ferimentos.\n gEntradas.pontos_vida = parseInt(Dom('pontos-vida-dados').value) || 0;\n gEntradas.pontos_vida_temporarios = parseInt(Dom('pontos-vida-temporarios').value) || 0;\n gEntradas.ferimentos = Math.abs(parseInt(Dom('ferimentos').textContent)) || 0;\n gEntradas.ferimentos_nao_letais = Math.abs(parseInt(Dom('ferimentos-nao-letais').textContent)) || 0;\n // Experiencia.\n gEntradas.experiencia = parseInt(Dom('pontos-experiencia').value) || 0;\n // atributos\n var span_bonus_atributos = Dom('pontos-atributos-gastos');\n if (span_bonus_atributos.textContent.length > 0) {\n var array_bonus = span_bonus_atributos.textContent.split(',');\n for (var i = 0; i < array_bonus.length; ++i) {\n // Trim direita.\n var nome_atributo = AjustaString(array_bonus[i]);\n array_bonus[i] = tabelas_atributos_invertidos[nome_atributo];\n }\n gEntradas.bonus_atributos = array_bonus;\n } else {\n gEntradas.bonus_atributos = [];\n }\n var atributos = [\n 'forca', 'destreza', 'constituicao', 'inteligencia', 'sabedoria', 'carisma' ];\n for (var i = 0; i < atributos.length; ++i) {\n gEntradas[atributos[i]] =\n parseInt(Dom(atributos[i] + '-valor-base').value);\n }\n\n // Estilos de luta.\n gEntradas.estilos_luta = [];\n var div_estilos_luta = Dom('div-estilos-luta');\n for (var i = 0; i < div_estilos_luta.childNodes.length; ++i) {\n gEntradas.estilos_luta.push(\n _LeEntradaEstiloLuta(div_estilos_luta.childNodes[i]));\n }\n\n _LeHabilidadesEspeciais();\n\n _LeEquipamentos();\n\n _LeTalentos();\n\n // Pericias.\n _LePericias();\n\n // Feiticos.\n _LeFeiticos();\n\n gEntradas.notas = Dom('text-area-notas').value;\n}", "auxiliarPredicado(tipo, nombre, valor, objeto) {\n //Verificamos si lo que se buscó en el predicado es un atributo o etiqueta\n if (tipo == \"atributo\") {\n //Recorremos los atributos del objecto en cuestion\n for (let att of objeto.atributos) {\n //Si los nombres de atributos son iguales\n if (att.dameNombre() == nombre) {\n //Si los valores de los atributos son iguales al valor ingresado en el predicado\n if (att.dameValor() == valor) {\n //Guardamos el elemento que contiene el atributo\n this.consolaSalidaXPATH.push(objeto);\n //Esta linea de codigo para para verificar el nuevo punto de inicio de la consola final, para no redundar\n if (!this.controladorPredicadoInicio) {\n this.contadorConsola = this.consolaSalidaXPATH.length - 1;\n this.controladorPredicadoInicio = true;\n }\n } //Cierre comparacion valor\n } //Cierre comparacion nombre\n } //Cierre for para recorrer atributos\n for (let entry of objeto.hijos) {\n for (let att of entry.atributos) {\n //Si los nombres de atributos son iguales\n if (att.dameNombre() == nombre) {\n //Si los valores de los atributos son iguales al valor ingresado en el predicado\n if (att.dameValor() == valor) {\n //Guardamos el elemento que contiene el atributo\n this.consolaSalidaXPATH.push(objeto);\n //Esta linea de codigo para para verificar el nuevo punto de inicio de la consola final, para no redundar\n if (!this.controladorPredicadoInicio) {\n this.contadorConsola = this.consolaSalidaXPATH.length - 1;\n this.controladorPredicadoInicio = true;\n }\n } //Cierre comparacion valor\n } //Cierre comparacion nombre\n } //Ci\n }\n }\n else {\n //Si lo que se busca es una etiqueta en el predicado\n for (let entry of objeto.hijos) {\n //Recorremos cada uno de los hijos y verificamos el nombre de la etiqueta\n if (entry.dameID() == nombre) {\n //Sí hay concidencia, se procede a examinar si el valor es el buscado\n if (entry.dameValor().substring(1) == valor) {\n //Agregamos el objeto a la consola de salida\n this.consolaSalidaXPATH.push(objeto);\n //Al iguar que n fragmento anteriores, se establece el nuevo punto de inicio\n if (!this.controladorPredicadoInicio) {\n this.contadorConsola = this.consolaSalidaXPATH.length - 1;\n this.controladorPredicadoInicio = true;\n } //cierreControladorInicio\n } //CIERRE VALOR\n } //CIERREID\n } //CIERRE RECORRIDO DE HIJOS\n }\n //La siguiente linea comentada es para recursividad, pendiente de uso.\n }", "function RegistrarLista(){\n if(txtNom.value==\"\" || txtNom.value==null){\n alert(\"Coloca tu nombre\");\n txtNom.focus();\n }else if(txtApe.value==\"\" || txtApe.value==null){\n alert(\"Coloca tu apellido\");\n txtApe.focus();\n }else if(txtDni.value==\"\" || txtDni.value==null){\n alert(\"Coloca tu dni\");\n txtDni.focus();\n }else if(cboCurso.selectedIndex==0){\n alert(\"Selecciona un curso\");\n cboCurso.focus();\n }else if(rbM.checked==false && rbT.checked==false && rbN.checked==false){\n alert(\"Hey escoje un turno\");\n rbM.focus();\n }else if(chkEst.checked==false){\n alert(\"Selecciona el estado\");\n chkEst.focus();\n }else{\n //capturando valores\n var nom=txtNom.value;\n var ape=txtApe.value;\n var dni=txtDni.value;\n var cur=\"\";\n var indice=cboCurso.selectedIndex;\n switch(indice){\n case 1:\n cur=\"Diseño Web\";\n break;\n case 2:\n cur=\"Base de Datos\";\n break;\n case 3:\n cur=\"Programacion Java\";\n break;\n default:\n cur=\"\";\n break;\n }\n var turn=\"\";\n if(rbM.checked){\n turn=\"Mañana\";\n }else if(rbT.checked){\n turn=\"Tarde\";\n }else if(rbN.checked){\n turn=\"Noche\";\n }else{\n turn=\"\";\n }\n var est=\"\";\n if(chkEst.checked){\n est=\"Habilitado\";\n }else{\n alert(\"Selecciona el estado\");\n chkEst.focus()\n }\n //llamamos al procedimiento registrar\n Registrar(nom,ape,dni,cur,turn,est);\n }\n //llamamos al preocedimiento a mostrar\n MostrarLista();\n}", "function fSelReg(aDato, iCol) {\n\t\n\tif(aDato[0]==\"1\"){\n\t\tfrm.iEjercicio.value=aDato[23];\n\t\tfrm.iNumSolicitud.value=aDato[24];\n\t\tfrm.iCveHist.value=\"\";\n\t\t\n\t}else{\n\t\tfrm.iEjercicio.value=-1;\n\t\tfrm.iNumSolicitud.value=-1;\n\t\tfrm.iCveHist.value=aDato[17];\n\t}\n\t\n\t if(iCol==16 && aDato[0]==\"1\"){\n\t\t fArchivosADV();\n\t }else if(iCol==16 && aDato[0]==\"0\"){\n\t\t fArchivosHist();\n\t }\n\t\n}", "tratarDigito() {\n let numero = \"\";\n\n numero = numero.concat(this.caracter);\n this.lerCaracter();\n\n while (/[0-9]/g.test(this.caracter) === true) {\n numero = numero.concat(this.caracter);\n this.lerCaracter();\n }\n this.token.lexema = +numero\n this.token.simbolo = \"snumero\"\n this.token.linha = this.numLinha\n }", "function seleccionarOpcion(indicePregunta, indiceOpcion){\n var preguntaSeleccionada= aPreguntasActuales.Preguntas[indicePregunta];\n\n preguntaSeleccionada.solucionUsuario= indiceOpcion;\n //si la pregunta ya fue seleccionada, no se contara de nuevo para la cantidad de preguntas seleccionadas \n if(aOpcionesSeleccionadas.indexOf(indicePregunta,0)== -1){\n aOpcionesSeleccionadas.push(indicePregunta);\n }\n\n var preguntasTotales= aPreguntasActuales.Preguntas.length;\n var preguntasRestantes=aOpcionesSeleccionadas.length;\n\n return {\"Totales\": preguntasTotales,\"Restantes\": preguntasRestantes}\n}", "function ControlloDataInserita(datadafiltrare,campo,dt,colore,sfondo) {\r\n\r\nvar gg; //variabile per i giorni\r\nvar mm; // variabile per i mesi\r\nvar yy; // variabile per l'anno\r\nvar dateNow = new Date(); // assegna la data corrente (presa dal pc locale)\r\nvar yearNow = dateNow.getFullYear(); //assegna l'anno corente\r\nvar indice=0; // variabile di servizio\r\n\r\nvar nrgiorni = new Array();\r\n\tnrgiorni[0]=29; // febbraio bisestile\r\n\tnrgiorni[1]=31; // gennaio\r\n\tnrgiorni[2]=28; // febbraio\r\n\tnrgiorni[3]=31; // marzo\r\n\tnrgiorni[4]=30;\t// aprile\r\n\tnrgiorni[5]=31; // maggio\r\n\tnrgiorni[6]=30; // giugno\r\n\tnrgiorni[7]=31; // luglio\r\n\tnrgiorni[8]=31; // agosto\r\n\tnrgiorni[9]=30; // settembre\r\n\tnrgiorni[10]=31; // ottobre\r\n\tnrgiorni[11]=30; // novembre\r\n\tnrgiorni[12]=31; // dicembre\r\n\r\nif (datadafiltrare==null || datadafiltrare==\"\") { //se il campo è vuoto esce dalla funzione\r\n document.getElementById(campo).style.color=colore;\r\n document.getElementById(campo).style.background=\"white\";\r\n return;\r\n}\r\n\r\nswitch (datadafiltrare.length) { //analizza il formato della data e prepara le variabili gg, mm, yy\r\n case is = 6: //formato data breve\r\n gg = datadafiltrare.slice(0,2);\r\n mm = datadafiltrare.slice(2,4);\r\n yy = datadafiltrare.slice(4,6);\r\n break; \r\n \r\n case is = 8: //formato data a 8 caratteri\r\n if (datadafiltrare.indexOf(\"/\") >= 0 || datadafiltrare.indexOf(\"-\")>=0) { //con separatori\r\n gg = datadafiltrare.slice(0,2);\r\n mm = datadafiltrare.slice(3,5);\r\n yy = datadafiltrare.slice(6,8);\r\n } else { //data a 8 cifre senza separatori\r\n gg = datadafiltrare.slice(0,2);\r\n mm = datadafiltrare.slice(2,4);\r\n yy = datadafiltrare.slice(4,8);\r\n }\r\n break;\r\n \r\n case is = 10: //formato data completa\r\n gg = datadafiltrare.slice(0,2);\r\n mm = datadafiltrare.slice(3,5);\r\n yy = datadafiltrare.slice(6,10);\r\n break;\r\n\r\n default: //negli altri formati inseriti la routine genera un errore\r\n alert(\"Attenzione! La data che hai inserito e' errata. Sono validi i seguenti formati: 'ggmmaa','gg/mm/aa','ggmmaaaa' e 'gg/mm/aaaa'\");\r\n document.getElementById(campo).focus();\r\n //datadafiltrare.focus();\r\n datadafiltrare=\"\";\r\n return datadafiltrare;\r\n}\r\n\r\n//controlla che i dati di riferimento al giorno, al mese e all'anno siano dati numerici \r\nif (isNaN(gg) || isNaN(mm) || isNaN(yy)) {\r\n\talert(\"Attenzione! La data che hai inserito e' errata.\");\r\n document.getElementById(campo).focus();\r\n //datadafiltrare.focus();\r\n datadafiltrare=\"\";\r\n return datadafiltrare;\r\n}\r\n\r\n//controlla che siano stati inseriti giusti tutti gli elementi che compongono la data\r\nif (Number(gg) <= 0 || Number(mm) <= 0 || Number(mm) > 12 || Number(yy) < 0) { \r\n alert(\"Attenzione! La data che hai inserito e' errata.\");\r\n document.getElementById(campo).focus();\r\n //datadafiltrare.focus();\r\n datadafiltrare=\"\";\r\n return datadafiltrare;\r\n}\r\n\r\n//porta l'anno a quattro cifre calcolando il cambio del millennio\r\nif (Number(yy) <= (Number(yearNow)-2000)) { \r\n yy = (Number(yy)+2000); \r\n } else if (Number(yy) < 100 && Number(yy) > (Number(yearNow)-2000)){\r\n yy = (Number(yy)+1900);\r\n }\r\n\r\n//controlla che l'anno non sia maggiore o uguale a quello corrente\r\n//(dt e dn significano data tesseramento e data di nascita)\r\nif (dt==\"dn\") {\r\n if (Number(yy) >= Number(yearNow)) { \r\n alert(\"Attenzione! L'anno che hai inserito e' errato!\");\r\n document.getElementById(campo).focus;\r\n //datadafiltrare.focus();\r\n datadafiltrare=\"\";\r\n return datadafiltrare;\r\n }\r\n}\r\n// controlla che l'anno inserito non sia bisestile e assegna il valore alla variabile indice\r\nif ((Number(yy) % 4) == 0 && Number(mm)==2) {\r\n\tindice=0;\r\n} else {\r\n\tindice=Number(mm);\r\n}\r\n\r\n// controlla che l'utente non abbia inserito un numero giorni del mese errato\r\nif (Number(gg) > nrgiorni[indice]) {\t\r\n\talert(\"Attenzione! La data che hai inserito e' errata.\");\r\n document.getElementById(campo).focus();\r\n //datadafiltrare.focus();\r\n datadafiltrare=\"\";\r\n return datadafiltrare;\r\n}\r\n// ricompone e stampa la data filtrata\r\ndatadafiltrare=gg+\"/\"+mm+\"/\"+yy;\r\ndocument.getElementById(campo).value=datadafiltrare;\r\ndocument.getElementById(campo).style.color=colore;\r\ndocument.getElementById(campo).style.background=\"white\";\r\nreturn;\r\n}", "function partes_relacion(expresion) {\n\tvar objeto = [];\n\tvar text = \"\";\n\tvar partes = \"\";\n\tvar hacer = false;\n\n\tfor (var i = 0; i < expresion.length; i++) \n\t{\n\t\t/*\n\t\t\tcuando encuentra un partesis derecho parte por comas el text acomulado\n\t\t\ty guarda en el arreglo un object con atributo izquierda y derecha y vacia el text\n \t\t*/\n\t\tif(expresion.charAt(i)===')')\n\t\t{\n\t\t\thacer = false;\n\t\t\tpartes = text.split(\",\");\n\t\t\tobjeto.push({izquierda:partes[0],derecha:partes[1],valor:partes[2]});\n\t\t\ttext = \"\";\n\n\t\t}\n\t\t//cuando encuentra parentesis izquierdo habilita hacer para guardar el acomulado de string\n\t\tif(expresion.charAt(i)==='(')\n\t\t{\n\t\t\ti++;\n\t\t\thacer = true;\n\t\t}\n\t\t//guarda texto acomulado\n\t\tif(hacer)\n\t\t{\n\t\t\ttext = text + expresion.charAt(i);\n\t\t}\n\t}\t \n\t return objeto; \n}", "function cambiar(){\n \t var compania;\n \t //Se toma el valor de la \"compañia seleccionarda\"\n \t compania = document.formulariorecargas.compania[document.formulariorecargas.compania.selectedIndex].value;\n \t //se chequea si la \"compañia\" esta definida\n \t \n \t if(compania!=0){\n \t\t //Seleccionamos las cosas correctas\n \t\t \n \t\t mis_tipos=eval(\"tipo_\" + compania);\n \t\t //se calcula el numero de compania\n \t\t num_tipos=mis_tipos.length;\n \t\t //marco el numero de tipos en el select\n \t\t document.formulariorecargas.tipo.length = num_tipos;\n \t\t //para cada tipo del array, la pongo en el select\n \t\t for(i=0; i<num_tipos; i++){\n \t\t\t document.formulariorecargas.tipo.options[i].value=mis_tipos[i];\n \t\t\t document.formulariorecargas.tipo.options[i].text=mis_tipos[i];\n \t\t }\n \t\t \n \t\t }else{\n \t\t\t //sino habia ningun tipo seleccionado,elimino las cosas del select\n \t\t\t document.formulariocompania.tipo.length = 1;\n \t\t\t //ponemos un guion en la unica opcion que he dejado\n \t\t\t document.formulariorecargas.tipo.options[0].value=\"seleccionar\";\n \t\t\t document.formulariorecargas.tipo.options[0].text=\"seleccionar\";\n \t\t\t \n \t\t }\n \t \n \t\n \t \n \t \n \t\t //hacer un reset de los tipos\n \t document.formulariorecargas.tipo.options[0].selected=true;\n\n }", "initRegistro() {\n this.registro = new _models_register__WEBPACK_IMPORTED_MODULE_7__[\"Register\"](null, // id\n 0, // lecturaAnterior\n 0, // lectura\n 0, // consumo\n this.today.getFullYear(), // year\n this.today.getMonth(), // month\n 0, // excessconsumo\n 0, // excesscosto\n 0, // excessm3\n 0, // base\n 0, // subtotal\n false, // cancelado\n false, // facturado\n '', // meter\n '' // extra\n );\n }", "function seleccioneGlosario(elemento, limpiar){\n\t\tconsole.log(\"Seleccione con id \"+elemento.id+\" codigo=\"+limpiar);\n\t\tvar elementoOrigen = {};\n\t\tFactoryGlosario.getElementoDadoId(elemento.id,\n\t\t\t\tfunction(ouput){\n\t\t\t \telementoOrigen = ouput;\n\t\t\t\t},\n\t\t\t\tfunction(){\n\t\t\t\t\tconsole.log(\"error en seleccioneGlosario\");\n\t\t\t\t});\n\t\tcnTaxonomia.seleccionado = elemento.id;\n\t\tcnTaxonomia.enBlanco = false;\n\t\tcnTaxonomia.modificar = false;\n\t\tcnTaxonomia.disabled = true;\n\t\t\n\t\tif(limpiar){\n\t\t\tcnTaxonomia.alertPositiva = false;\n\t\t}\n\t\tcnTaxonomia.alertNegativa = false;FactoryGlosario\n\t\t\n\t\t\n//\t\tLimpio las listas\n\t\tcnTaxonomia.varEdicion.listaSubClase = [];\n\t\tcnTaxonomia.varEdicion.listaParticion = [];\n\t\tcnTaxonomia.varEdicion.listaDisjunta = [];\n\t\tcnTaxonomia.varEdicion.listaExhustiva = [];\n\t\t\n\t\t\n\t\tvar salida;\n\t\t\n//\t\tsalida = FactoryTaxonomia.verElemento(elemento.id);\n//\t\tconsole.log(\"salida es \"+salida.conceptoOrigen);\n//\t\t\n//\t\tif(salida.conceptoOrigen == 0){\n\t\t\tFactoryMensajeCarga.abrirMensaje(\"Cargando\");\n\t\t\tsalida = FactoryTaxonomia.consultarElemento(elemento.id);\n\t\t\tsalida.then(\n\t function(aux) {\n\t if(aux.succes){\n\t \tconsole.log(\"fue satisfactorio\");\n\t \tconsole.log(\" \"+aux.elemento.conceptosDestino[0].length);\n\t \tconsole.log(\" \"+aux.elemento.conceptosDestino[1].length);\n\t \tconsole.log(\" \"+aux.elemento.conceptosDestino[2].length);\n\t \tconsole.log(\" \"+aux.elemento.conceptosDestino[3].length);\n\t \tconsole.log(\"aux.elemento.conceptoOrigen \"+aux.elemento.conceptoOrigen);\n\t \tcnTaxonomia.elementoActual = {};\n\t \tcnTaxonomia.elementoActual.conceptoOrigen = {};\n\t \tFactoryGlosario.getElementoDadoId(aux.elemento.conceptoOrigen,\n\t \t\t\t\tfunction(ouput){\n\t \t\t\t\tcnTaxonomia.elementoActual.conceptoOrigen = ouput;\n\t \t\t\t\tconsole.log(\"elemento origen traido de FactoryGlosario.consultarElemento \"+cnTaxonomia.elementoActual.conceptoOrigen.id+\" \"+cnTaxonomia.elementoActual.conceptoOrigen.nombre);\n\t \t\t\t\t},\n\t \t\t\t\tfunction(){\n\t \t\t\t\t\tconsole.log(\"error en cnTaxonomia.elementoActual.conceptoOrigen\");\n\t \t\t\t\t});\n\t \tcnTaxonomia.elementoActual.relaciones = aux.elemento.relaciones.slice();\n\t \tcnTaxonomia.elementoActual.conDestinoDesDisjunta = [];\n\t \tcnTaxonomia.elementoActual.conDestinoDesExhaustiva = [];\n\t \tcnTaxonomia.elementoActual.conDestinoParticion = [];\n\t \tcnTaxonomia.elementoActual.conDestinoSubClase = [];\n\t \tvar i;\n\t \t\n\t \tfor(i=0;i<cnTaxonomia.elementoActual.relaciones.length;i++){\n\t \t\tconsole.log(\"la relacion es \"+cnTaxonomia.elementoActual.relaciones[i]);\n\t \t\tswitch(cnTaxonomia.elementoActual.relaciones[i]){\n\t \t\t\tcase \"desDisjunta\":\n\t \t\t\t\t\tvar len = aux.elemento.conceptosDestino[i].length;\n\t \t\t\t\t\tvar j;\n\t \t\t\t\t\tcnTaxonomia.elementoActual.conDestinoDesDisjunta = [];\n\t \t\t\t\t\tcnTaxonomia.varEdicion.listaDisjunta = [];\n\t \t\t\t\t\tfor(j=0;j<len;j++){\n\t \t \tFactoryGlosario.getElementoDadoId(aux.elemento.conceptosDestino[i][j],\n \t \t\t\t\tfunction(ouput){\n\t \t \t\tcnTaxonomia.elementoActual.conDestinoDesDisjunta.push(ouput);\n\t \t \t\tcnTaxonomia.varEdicion.listaDisjunta.push(ouput);\n \t \t\t\t\t},\n \t \t\t\t\tfunction(){\n \t \t\t\t\t\tconsole.log(\"error en cnTaxonomia.elementoActual.conceptoOrigen\");\n \t \t\t\t\t});\n\t \t\t\t\t\t}\n\t \t\t\t\tbreak;\n\t \t\t\tcase \"desExhaustiva\":\n\t\t \t\t\t\tvar len = aux.elemento.conceptosDestino[i].length;\n\t\t \t\t\t\t\tvar j;\n\t\t \t\t\t\t\tcnTaxonomia.elementoActual.conDestinoDesExhaustiva = [];\n\t\t \t\t\t\t\tcnTaxonomia.varEdicion.listaExhustiva = [];\n\t\t \t\t\t\t\tfor(j=0;j<len;j++){\n\t\t \t\t\t\t\t\tFactoryGlosario.getElementoDadoId(aux.elemento.conceptosDestino[i][j],\n \t \t\t\t\tfunction(ouput){\n\t\t \t\t\t\t\t\t\tcnTaxonomia.elementoActual.conDestinoDesExhaustiva.push(ouput);\n\t\t \t\t\t\t\t\t\tcnTaxonomia.varEdicion.listaExhustiva.push(ouput);\n \t \t\t\t\t},\n \t \t\t\t\tfunction(){\n \t \t\t\t\t\tconsole.log(\"error en cnTaxonomia.elementoActual.conDestinoDesExhaustiva\");\n \t \t\t\t\t});\n\t\t \t\t\t\t\t}\n\t \t\t\t\tbreak;\n\t \t\t\tcase \"particion\":\n\t\t \t\t\t\tvar len = aux.elemento.conceptosDestino[i].length;\n\t\t \t\t\t\t\tvar j;\n\t\t \t\t\t\t\tcnTaxonomia.elementoActual.conDestinoParticion = [];\n \t\t\t\t\t\t\tcnTaxonomia.varEdicion.listaParticion = [];\n\t\t \t\t\t\t\tfor(j=0;j<len;j++){\n\t\t \t\t\t\t\t\tcnTaxonomia.elementoActual.conDestinoParticion[j] = {};\n\t\t \t\t\t\t\t\tFactoryGlosario.getElementoDadoId(aux.elemento.conceptosDestino[i][j],\n \t \t\t\t\tfunction(ouput){\n\t\t \t\t\t\t\t\t\tcnTaxonomia.elementoActual.conDestinoParticion.push(ouput);\n\t\t \t\t\t\t\t\t\tcnTaxonomia.varEdicion.listaParticion = [];\n\t\t \t\t\t\t\t\t\tcnTaxonomia.varEdicion.listaParticion.push(ouput);\n \t \t\t\t\t},\n \t \t\t\t\tfunction(){\n \t \t\t\t\t\tconsole.log(\"error en cnTaxonomia.elementoActual.conDestinoParticion\");\n \t \t\t\t\t});\n\t\t \t\t\t\t\t}\n\t \t\t\t\tbreak;\n\t \t\t\tcase \"subClase\":\n\t\t \t\t\t\tvar len = aux.elemento.conceptosDestino[i].length;\n\t\t \t\t\t\t\tvar j;\n\t\t \t\t\t\t\tcnTaxonomia.elementoActual.conDestinoSubClase = [];\n\t\t \t\t\t\t\tcnTaxonomia.varEdicion.listaSubClase = [];\n\t\t \t\t\t\t\tfor(j=0;j<len;j++){\n\t\t \t\t\t\t\t\tFactoryGlosario.getElementoDadoId(aux.elemento.conceptosDestino[i][j],\n \t \t\t\t\tfunction(ouput){\n\t\t \t\t\t\t\t\t\tcnTaxonomia.elementoActual.conDestinoSubClase.push(ouput);\n\t\t \t\t\t\t\t\t\tcnTaxonomia.varEdicion.listaSubClase.push(ouput);\n\t\t \t\t\t\t\t\t},\n \t \t\t\t\tfunction(){\n \t \t\t\t\t\tconsole.log(\"error en cnTaxonomia.elementoActual.conDestinoParticion\");\n \t \t\t\t\t});\n\t\t \t\t\t\t\t}\n\t \t\t\t\tbreak;\n\t \t\t\tdefault:\n\t \t\t\t\tconsole.log(\"relacion no es valida\");\n\t \t\t\t\tbreak;\n\t \t\t}\n\t \t}\n\t \t\n\t \t\tcnTaxonomia.varEdicion.id = elementoOrigen.id;\n\t \t\tcnTaxonomia.varEdicion.nombre = elementoOrigen.nombre;\n\t \t\tcnTaxonomia.varEdicion.descripcion = elementoOrigen.descripcion;\n//\t \t\tcnTaxonomia.varEdicion.listaSubClase = cnTaxonomia.elementoActual.conDestinoSubClase.slice();\n//\t \t\tcnTaxonomia.varEdicion.listaParticion = cnTaxonomia.elementoActual.conDestinoParticion.slice();\n//\t \t\tcnTaxonomia.varEdicion.listaDisjunta = cnTaxonomia.elementoActual.conDestinoDesDisjunta.slice();\n//\t \t\tcnTaxonomia.varEdicion.listaExhustiva = cnTaxonomia.elementoActual.conDestinoDesExhaustiva.slice();\n\t \tconsole.log(\"cnTaxonomia.elementoActual.conDestinoDesDisjunta.length \"+cnTaxonomia.elementoActual.conDestinoDesDisjunta.length);\n\t \tconsole.log(\"cnTaxonomia.elementoActual.conDestinoDesExhaustiva.length \"+cnTaxonomia.elementoActual.conDestinoDesExhaustiva.length);\n\t \tconsole.log(\"cnTaxonomia.elementoActual.conDestinoParticion.length \"+cnTaxonomia.elementoActual.conDestinoParticion.length);\n\t \tconsole.log(\"cnTaxonomia.elementoActual.conDestinoSubClase.length \"+cnTaxonomia.elementoActual.conDestinoSubClase.length);\n\t \tconsole.log(\"cnTaxonomia.elementoActual.relaciones \"+cnTaxonomia.elementoActual.relaciones.length);\n\t \t//FactoryTaxonomia.agregarElemento(cnTaxonomia.elementoActual);\n\t \tFactoryMensajeCarga.cerrarMensaje();\n\t }else{\n\t \t\n\t }\n\t }\n\t );\t\n\t}", "function insere(){\n\t//SE EU ALTEREI ALGUM REGISTRO\n\tif(!Verifica_Alteracao(DIV_TABELA)){\n\t\tselecionaLinha(DIV_TABELA,$('#position').val(),2);\n\t\treturn;\n\t}\n\n\tif(empty(objTabela)){\n\t\tobjTabela = {};\n\t\tobjTabela.registros = [];\n\t\tobjTabela.total = 0;\n\t}\n\n\tvar novaPosicao = {};\n\tnovaPosicao.fa_number = '';\n\tnovaPosicao.fa_nome = '';\n\tnovaPosicao.pt_classfisc = '';\n\tnovaPosicao.ce_cest = '';\n\tnovaPosicao.fa_ipi = '0,00';\n\tnovaPosicao.fa_comiss = '0,000';\n\tnovaPosicao.fa_cstpis = '01';\n\tnovaPosicao.fa_pis = '0,00';\n\tnovaPosicao.fa_cofins = '0,00';\n\tnovaPosicao.fa_imposto = '0,00';\n\tnovaPosicao.fa_redicm7 = '0,00';\n\tnovaPosicao.fa_redicm12 = '0,00';\n\n\tobjTabela.registros.push(novaPosicao);\n\tobjTabela.total += 1;\n\n\tvar actpos = objTabela.total > 0 ? (objTabela.total - 1) : 0;\n\n\tpagination((Math.ceil(objTabela.total / LIMITE_REGISTROS)),function(){\n\t\tpintaLinha($(DIV_TABELA + \" tr[actipos=\"+actpos+\"]\"));\n\t\tsetStatus(actpos,'+',DIV_TABELA);\n\t\tBloqueia_Linhas(actpos,DIV_TABELA);\n\t\t$('#records').val(objTabela.total);\n\t\tselecionaLinha(DIV_TABELA,actpos,2);\n\t});\n}", "function generarExamenAuto() {\n //capturo del html los campos del examen\n var idExamen = $(\"#idModeloExamen\").val();\n var idCarrera = $(\"#idCarrera\").val();\n console.log(idExamen);\n console.log(idCarrera);\n\n //url donde va a ir a buscar el ws\n var url = \"/ws/ExamenWS.asmx/ObtenerPreguntas\"; //esta es una \n modelo = llamarWS({\"idCarrera\":idCarrera}, url, false); //ME VA DEVOLVER UN MODELOExamen que puse en el WS, POR ESO RETORNA EL OBJETO MODELO DEL METODO OBTENER PREGUNTAS \n //como queremos que haga la consulta y la espere, asincrono es false.\n console.log(modelo);\n\n armarColumnasTitulos();\n insertarRegistrosFilas();\n \n\n}", "function LimpiarFormulario(){\n\n if(obtener_valor( 'PLANTILLA' ) == '0'){\n OcultarCampo( 'BUSCARPL', 0 );\n asignar_valor( 'NB_PLANT' , '');\n asignar_valor( 'ID_PLANT' , '');\n asignar_valorM( 'PLANT' , '' , 1 , 1 );\n asignar_valorM( 'PLANT' , '' , 1 , 2 );\n asignar_valorM( 'PLANT' , '' , 1 , 3 );\n asignar_valorM( 'PLANT' , '' , 1 , 7 );\n }else{\n MostrarCampo( 'BUSCARPL', 0 );\n }\n\n return true;\n}", "function validarNA(atri, men, id){\n var bandera = true;\n if(atri.value!==''){\n var partes = atri.value.split(\" \");\n if(partes.length !== 2 || partes[0]=='' || partes[1]==''){\n error(atri, men, '<br>Los datos ingresados no son aceptados')\n bandera = false;\n vgeneral[id]=bandera;\n }else{\n arreglo(atri, men);\n bandera = true;\n vgeneral[id]=bandera;\n }\n }else{\n error(atri, men, '<br>Debe ingresar mas informacion')\n bandera = false;\n vgeneral[id]=bandera;\n }\n return bandera;\n}", "function mostrarRegistrarseComoColaborador(){\n mostrarComo('colaborador')\n}", "function crearTermostatoTipo0( id_term)\n{\n\tvar termostato1= new Object();\n\t\n\t\n\ttermostato1.parametros={temperatura:35.5, modo:0,temperaturaAmbiente:30.5,ValvulaAbierta:0};// datos recibidor del termostato\n\ttermostato1.configuracion={temperatura:35.5, modo:0, Caption:\"\"};// parametros que se envian al termostato \n\ttermostato1.configuracion.Caption=\"Termostato \"+id_term;\n\ttermostato1.iluminadoModo=false;\n\ttermostato1.Tipo=0;// tipo de objeto en este caso termostato sistena\n\ttermostato1.Caption=\"Termostato \"+id_term;\n\ttermostato1.visible=1;// se mira si es visible o no \n\ttermostato1.EstaMinimizado=1; // 0 maximizado, 1 minimizado\n\t//termostato1.temperatura=35.5;\n\t//termostato1.temperaturaAmbiente=30.5;\n\ttermostato1.estado=1; // donde 1 es on y 0 off \n\ttermostato1.actualizar=0; // donde 1 es que hay que enviar datos al servicio pass , 0 no hay datos actualizador\n\ttermostato1.dat=0;// ????\n\t//termostato.HayDatosCambiados=HayDatosCambiados_Term;\n\n\ttabla_valores.push(termostato1);\n\n\tvar t = document.querySelector('#termostato_tipo_1');\n\t\n\t\n\tvar clone = document.importNode(t.content, true);\n\t\n\tclone.getElementById(\"termostato\").id=\"termostato\"+id_term;\n\tclone.getElementById(\"marco_superior\").id=\"marco_superior\"+id_term;\n\tclone.getElementById(\"icono_despliegue\").id=\"icono_despliegue\"+id_term;\n\tclone.getElementById(\"caption_temp\").id=\"caption_temp\"+id_term;\n\tclone.getElementById(\"tempAmbiente\").id=\"tempAmbiente\"+id_term;\n\tclone.getElementById(\"icono_OnOffSup\").id=\"icono_OnOffSup\"+id_term;\n\tclone.getElementById(\"marco_inf\").id=\"marco_inf\"+id_term;\n\tclone.getElementById(\"zona_iconos\").id=\"zona_iconos\"+id_term;\n\tclone.getElementById(\"btn_mas\").id=\"btn_mas\"+id_term;\n\tclone.getElementById(\"icono_func_mas\").id=\"icono_func_mas\"+id_term;\n\tclone.getElementById(\"temp_grande\").id=\"temp_grande\"+id_term;\n\tclone.getElementById(\"btn_menos\").id=\"btn_menos\"+id_term;\n\tclone.getElementById(\"icono_func_menos\").id=\"icono_func_menos\"+id_term;\n\tclone.getElementById(\"icono_onoff\").id=\"icono_onoff\"+id_term;\n\tclone.getElementById(\"btn_onoff\").id=\"btn_onoff\"+id_term;\n\tclone.getElementById(\"marco_temp\").id=\"marco_temp\"+id_term;\n\tclone.getElementById(\"btn_conf\").id=\"btn_conf\"+id_term;\n\tclone.getElementById(\"temp_peque\").id=\"temp_peque\"+id_term;\n\tclone.getElementById(\"term_modo\").id=\"term_modo\"+id_term;\n\t\n\t\n\t$(\"#contenedor\").append(clone);\n\tdocument.getElementById(\"icono_despliegue\"+id_term).setAttribute( \"IdTerm\",id_term.toString());\n\tdocument.getElementById(\"icono_OnOffSup\"+id_term).setAttribute(\"IdTerm\",id_term.toString());\n\tdocument.getElementById(\"btn_mas\"+id_term).setAttribute(\"IdTerm\",id_term.toString());\n\tdocument.getElementById(\"btn_menos\"+id_term).setAttribute(\"IdTerm\",id_term.toString());\n\tdocument.getElementById(\"btn_onoff\"+id_term).setAttribute(\"IdTerm\",id_term.toString());\n\tdocument.getElementById(\"btn_conf\"+id_term).setAttribute(\"IdTerm\",id_term.toString());\n\t\n}", "function nombreFuncion(parametro){\n return \"regresan algo\"\n}", "function retroceso(e) {\n\n\n let tamano = campoDatos.value.length;\n let borrado = campoDatos.value.slice(0, tamano - 1);\n campoDatos.value = borrado;\n\n /**VALIDAMOS QUE CUANDO BORREMOS CON EL BOTON RETROCESO DE LA \n * CALCULADORA LA CANTIDAD DE PARENTESIS SE VAYA SUMANDO O RESTANDO PARA QUE \n * SIGA EL FLUJO NORMAL DE LA ESCRITURA DE PARENTESIS*/\n let listOpenParent = [];\n let listCloseParent = [];\n\n for (let i = 0; i < campoDatos.value.length; i++) {\n\n if (campoDatos.value[i] == \"(\") {\n listOpenParent.push(i);\n } else if (campoDatos.value[i] == \")\") {\n listCloseParent.push(i);\n }\n\n }\n aperturaParen = listOpenParent.length;\n cierreParen = listCloseParent.length;\n /**----------------------------------------------------------\n * CIERRE DE VALIDACION DE PARENTESIS \n * ---------------------------------------------------------*/\n}", "function continuaEscriure ()\r\n{\r\n this.borra ();\r\n this.actual=\"\";\r\n this.validate=0;\r\n}", "function seleccionarFila(campoDelFoco, noEnviarFila)\n{\n if (noEnviarFila == null) noEnviarFila=false;\n\tif (!esCampo(campoDelFoco)) return false;\n\tvar nd=buscarPadre(campoDelFoco, gId, gFila);\n var bolEnviado=true;\n gUltimoCampo = campoDelFoco.name;\n gValorCampo = valorCampo(campoDelFoco);\n if (gBolBloqueado) {\n nd=buscarHijo(gFilaActual, \"name\", campoDelFoco.name);\n seleccionarCampo(nd);\n return false;\n }\n \n gBolBloqueado=true;\n\tif (nd!=null)\n\t{\n\t\t/* Solo para el caso de que se haya cambiado de fila.\n\t\t Cambiamos el color del fondo de la fila anterior y mandamos guardar los cambios\n\t\t (si se han producido), a la vez que ocultamos la imagen de editando\n\t\t*/\n\t\tif (gFilaActual != null && nd != gFilaActual) {\n bolEnviado=deseleccionarFila();\n\t\t\tif (!bolEnviado) {\n nd=buscarHijo(gFilaActual, \"name\", campoDelFoco.name);\n seleccionarCampo(nd);\n }\n }\n\n\t\t/* Siempre que se cambie de fila y cuando no estábamos en ninguna fila anteriormente.\n\t\t Cambiamos el color de la fila en la que estamos actualmente, mostramos la imagen de\n\t\t editando y guardamos esta fila como la actual\n\t\t*/\n\t\tif (bolEnviado && (gFilaActual == null || nd != gFilaActual))\n\t\t{\n\t\t\tif (gBolEvtActivarLinea)\n\t\t\t{\n\t\t\t\tif (!alActivarLinea(campoDelFoco, nd)) {\n gBolBloqueado=false;\n\t\t\t\t\treturn false;\n }\n\t\t\t}\n\t\t\tgFilaActual = nd;\n\t\t\tif (document.layers)\n\t\t\t\tnd.bgColor = gColorSeleccionado;\n\t\t\telse\n\t\t\t\tnd.style.backgroundColor = gColorSeleccionado;\n\t\t\tnd = buscarHijo(nd,gId,gBoton);\n\t\t\tif(nd!=null)\n\t\t\t\tnd.style.visibility = \"visible\";\n\t\t}\n\t}\n\telse {\n\t\tbolEnviado=deseleccionarFila();\n if (!bolEnviado) {\n nd=buscarHijo(gFilaActual, \"name\", campoDelFoco.name);\n seleccionarCampo(nd);\n }\n }\n\t\n\t//Seleccionamos todo el campo para el caso de los textbox.\n\tif (bolEnviado && (campoDelFoco.type == \"text\" || campoDelFoco.type == \"password\"))\n\t\tcampoDelFoco.select();\n gBolBloqueado=false;\n\treturn true;\n}", "function registroUsuario(){\n\n\t$(\".alert\").remove();\n\t/*=============================================\n\tVALIDAR EL CODIGO\n\t=============================================*/\n\n\tvar nombre = $(\"#regCodigo\").val();\n\t\n\tif(nombre != \"\"){\n\n\t\tvar expresion = /^[0-9]*$/;\n\n\t\tif(!expresion.test(nombre)){\n\n\t\t\t$(\"#regCodigo\").parent().after('<div class=\"alert alert-warning\"><strong>ERROR:</strong>Solo se admite Numeros</div>')\n\n\t\t\treturn false;\n\n\t\t}else if(nombre.length != 8){\n\t\t\t\n\t\t\t$(\"#regCodigo\").parent().after('<div class=\"alert alert-warning\"><strong>ERROR:</strong>Solo Se admite 8 digitos</div>')\n\n\t\t\treturn false;\n\t\t}\n\n\t}else{\n\n\t\t$(\"#regCodigo\").parent().after('<div class=\"alert alert-warning\"><strong>ATENCIÓN:</strong> Este campo es obligatorio</div>')\n\n\t\treturn false;\n\t}\n\t\n\t/*=============================================\n\tVALIDAR EL NOMBRE\n\t=============================================*/\n\n\tvar nombre = $(\"#regUsuario\").val();\n\n\tif(nombre != \"\"){\n\n\t\tvar expresion = /^[a-zA-ZñÑáéíóúÁÉÍÓÚ ]*$/;\n\n\t\tif(!expresion.test(nombre)){\n\n\t\t\t$(\"#regUsuario\").parent().after('<div class=\"alert alert-warning\"><strong>ERROR:</strong> No se permiten números ni caracteres especiales</div>')\n\n\t\t\treturn false;\n\n\t\t}\n\n\t}else{\n\n\t\t$(\"#regUsuario\").parent().after('<div class=\"alert alert-warning\"><strong>ATENCIÓN:</strong> Este campo es obligatorio</div>')\n\n\t\treturn false;\n\t}\n\n\t/*=============================================\n\tVALIDAR EL USER\n\t=============================================*/\n\n\tvar nombre = $(\"#regUser\").val();\n\n\tif(nombre != \"\"){\n\n\t\tvar expresion = /^[a-zA-Z0-9]*$/;\n\n\t\tif(!expresion.test(nombre)){\n\n\t\t\t$(\"#regUser\").parent().after('<div class=\"alert alert-warning\"><strong>ERROR:</strong> No se permiten caracteres especiales</div>')\n\n\t\t\treturn false;\n\n\t\t}\n\t\tif(validarUserI == true){\n\t\t\t\n\t\t\t$(\"#regUser\").parent().after('<div class=\"alert alert-warning\"><strong>ERROR:</strong> El usuario ya existe en la base de datos</div>')\n\n\t\t\treturn false;\n\t\t}\n\n\t}else{\n\n\t\t$(\"#regUser\").parent().after('<div class=\"alert alert-warning\"><strong>ATENCIÓN:</strong> Este campo es obligatorio</div>')\n\n\t\treturn false;\n\t}\n\n\t/*=============================================\n\tVALIDAR EL EMAIL\n\t=============================================*/\n\n\tvar email = $(\"#regEmail\").val();\n\n\tif(email != \"\"){\n\n\t\tvar expresion = /^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,4})+$/;\n\n\t\tif(!expresion.test(email)){\n\n\t\t\t$(\"#regEmail\").parent().after('<div class=\"alert alert-warning\"><strong>ERROR:</strong> Escriba correctamente el correo electrónico</div>')\n\n\t\t\treturn false;\n\n\t\t}\n\n\t}else{\n\n\t\t$(\"#regEmail\").parent().after('<div class=\"alert alert-warning\"><strong>ATENCIÓN:</strong> Este campo es obligatorio</div>')\n\n\t\treturn false;\n\t}\n\n\n\t/*=============================================\n\tVALIDAR CONTRASEÑA\n\t=============================================*/\n\n\tvar password = $(\"#regPassword\").val();\n\n\tif(password != \"\"){\n\n\t\tvar expresion = /^[a-zA-Z0-9]*$/;\n\n\t\tif(!expresion.test(password)){\n\n\t\t\t$(\"#regPassword\").parent().after('<div class=\"alert alert-warning\"><strong>ERROR:</strong> No se permiten caracteres especiales</div>')\n\n\t\t\treturn false;\n\n\t\t}\n\n\t}else{\n\n\t\t$(\"#regPassword\").parent().after('<div class=\"alert alert-warning\"><strong>ATENCIÓN:</strong> Este campo es obligatorio</div>')\n\n\t\treturn false;\n\n\t}\n\n\treturn true;\n}", "function DibujaCamposEspacio_(ID_Espacio, data, _G_ID_, f) {\n var el = '';\n var ValidarFile = new Array();\n var ValidarNumber = new Array();\n var ValidarTexto = new Array();\n var longitudMaxTexto = new Array();\n $(ID_Espacio).html('');\n var ActualLement = _G_ID_.replace('#', '');\n\n $.each(data, function (i, item) {\n var Ast = '';\n if (item.lMandatorio) {\n Mandatorios.push(item.cCampo);\n Ast = '<span id=\"' + ActualLement + 'ast_' + item.cCampo + '\" class=\"form-text\">*</span>';\n }\n switch (item.iCvetipoCampo) {\n case 7 : // Campo de Tipo Archivo\n var formatoFile = item.cTipoArchivo;\n var tamArchivo = item.iTamArchivo;\n\n if (!formatoFile || formatoFile === 0 || formatoFile === '') {\n formatoFile = '.pdf';\n }\n if (!tamArchivo || tamArchivo === 0 || formatoFile === '') {\n tamArchivo = 10;\n }\n\n el = '<label style=\"text-align: justify\" class=\"control-label \">' + item.cEtiqueta + Ast + ':</label>' +\n '<input maxtam=\"' + tamArchivo + '\" autocomplete=\"off\" name=\"' + item.cCampo + '\" placeholder=\"Seleccione archivo...\" type=\"file\" id=\"' + ActualLement + '_txt_' + item.cCampo + '\" class=\"form-control ns_\" accept=\"' + formatoFile + '\">' +\n '<small id=\"' + ActualLement + 'miniText_' + item.cCampo + '\" class=\"form-text form-text-error hidden\"></small><br>';\n ValidarFile.push(item.cCampo);\n break;\n case 1 : // Campo de Tipo Numerico\n el = '<label style=\"text-align: justify\" class=\"control-label \">' + item.cEtiqueta + Ast + ':</label>' +\n '<input autocomplete=\"off\" name=\"' + item.cCampo + '\" type=\"number\" id=\"' + ActualLement + '_txt_' + item.cCampo + '\" class=\"form-control ns_\" >' +\n '<small id=\"' + ActualLement + 'miniText_' + item.cCampo + '\" class=\"form-text form-text-error hidden\"></small><br>';\n ValidarNumber.push(item.cCampo);\n longitudMaxTexto[item.cCampo] = item.iLargo;\n break;\n case 2: // Campo de Tipo Texto\n el = '<label style=\"text-align: justify\" class=\"control-label \">' + item.cEtiqueta + Ast + ':</label>' +\n '<input autocomplete=\"off\" type=\"text\" name=\"' + item.cCampo + '\" id=\"' + ActualLement + '_txt_' + item.cCampo + '\" class=\"form-control ns_\" >' +\n '<small id=\"' + ActualLement + 'miniText_' + item.cCampo + '\" class=\"form-text form-text-error hidden\"></small> <br>';\n ValidarTexto.push(item.cCampo);\n longitudMaxTexto[item.cCampo] = item.iLargo;\n break;\n case 0: // Label\n el = ('<hr>' +\n '<h4 class=\"control-label\"> ' + item.cEtiqueta + '</h4>' +\n '<hr>');\n break;\n default:\n el = '';\n break;\n }\n $(ID_Espacio).append(el);\n if ((i + 1) == data.length) {\n $.each(ValidarFile, function (i, item) {\n validaCampoFile(item, ActualLement);\n });\n $.each(ValidarTexto, function (j, jtem) {\n validaCampoTexto(jtem, longitudMaxTexto[jtem], ActualLement);\n });\n $.each(ValidarNumber, function (k, ktem) {\n validaCampoNumero(ktem, longitudMaxTexto[ktem], ActualLement);\n });\n if (f && $.isFunction(f)) {\n f();\n }\n }\n });\n}", "function criarLembrete(){\n\tvar conteudoTextArea = document.getElementById(\"texto\").value;\n\tif(!textoValido(conteudoTextArea)){\n\t\tmostrarError();\n\n\t}\n\n\tlimparError();\n\n\t// criar as variaveis para tempo\n\tvar referencia = new Date();\n\tvar id = referencia.getTime();\n\tvar data = referencia.toLocaleDateString();\n\tvar texto = conteudoTextArea;\n\n\t//JSON\n\tvar recordatorio = {\"id\": id, \"data\": data,\"texto\": texto};\n\n\t//função para comprovar se existe lembrete\n\tcomprovarRecordatorio(recordatorio);\n}", "function agregarComentario(id_miembro){\n\n\n res= document.getElementById(\"comentar\").value; //Se toma a traves del id, el comentario realizado(valor).\n document.getElementById(\"mostrarComentario\").innerHTML+= res + \"<br>\"; //Hace visible el comentario relizado.\n\tres= document.getElementById(\"comentar\").value= \"\";//Despues que se genera el click vuelve al valor original.\n}", "function rellenoBusqueda()\n{\tcampoId\t\t= this.id;\n\tcampoId\t\t= $('#'+campoId).attr('campo');\n\tcampoVal \t= this.title;\n\tprocesando(\"Buscando Informacions ...\");\n\ttabla\t= $(\"#tabla\").attr('value');\n\tcadena\t= \"sstm__tabla=\"+tabla+\"&campoId=\"+campoId+\"&campoVal=\"+campoVal;\n\t// Lanzo el Ajax para Insertar Registro\n\tajaxTablas\t= $.ajax({\n \turl: 'index.php?ctr=FormularioAcciones&acc=getId',\n \ttype: 'POST',\n \tasync: true,\n \tdata: cadena,\n\tsuccess: cargarConsulta\n\t}); // dataType: 'json',\n}", "function activar_registro(id, token_actual) {\n $.ajax({\n type: 'DELETE',\n data: {\"token\": token_actual, \"modulo\": \"Convocatorias\"},\n url: url_pv + 'Convocatoriasrecursos/delete/' + id\n }).done(function (data) {\n if (data == 'Si' || data == 'No')\n {\n if (data == 'Si')\n {\n notify(\"info\", \"ok\", \"Convocatoria recurso:\", \"Se activó el registro con éxito.\");\n } else\n {\n notify(\"danger\", \"ok\", \"Convocatoria recurso:\", \"Se inactivo el registro con éxito.\");\n }\n } else\n {\n if (data == 'acceso_denegado')\n {\n notify(\"danger\", \"remove\", \"Convocatorias:\", \"Acceso denegado.\");\n } else\n {\n notify(\"danger\", \"ok\", \"Convocatorias:\", \"Se registro un error en el método, comuníquese con la mesa de ayuda [email protected]\");\n }\n }\n });\n}", "function capt_nom_archivo() {\n var ruta_archivo = obtener_valorM('PLANT',1,6);\n nombre_archivo = ruta_archivo.split('/');\n asignar_valorM('PLANT',nombre_archivo[4],1,7);\n return true;\n}", "function crealista(o) {\n var aCte = new Array();\n eval(b64.decode(o.contenido));\n var tlb = document.getElementById(\"tlb\");\n while (i = tlb.firstChild) {\n tlb.removeChild(i);\n }\n if(aCte.length) {\n for (var j=0; j<aCte.length; j++) {\n var fila = zombietr.cloneNode(true);\n var primera = fila.firstChild;\n var tfolio = document.createTextNode(aCte[j][0]);\n primera.appendChild(tfolio);\n var segunda = primera.nextSibling;\n var tnombre = document.createTextNode(aCte[j][1]);\n segunda.appendChild(tnombre);\n var tercera = segunda.nextSibling;\n var tusuarios = document.createTextNode(aCte[j][2]);\n var ligausr = document.createElement(\"a\");\n ligausr.className = \"ligausr\";\n ligausr.id = \"ligausr_\" + aCte[j][0];\n ligausr.href = \"usuarios\";\n ligausr.setAttribute(\"title\",aCte[j][0]);\n ligausr.onmouseover = \"window.status='Servicios RH Global';\";\n ligausr.onclick = function() {agregausr(this.title);return false;};\n ligausrspan = document.createElement(\"span\");\n ligausrspan.appendChild(tusuarios);\n ligausr.appendChild(ligausrspan);\n tercera.appendChild(ligausr);\n var cuarta = tercera.nextSibling;\n var tacciones = new Array(\"borrar\",\"editar\");\n for (var l in tacciones) {\n nliga = document.createElement(\"a\");\n nliga.href = aCte[j][0];\n nliga.setAttribute(\"title\",tacciones[l] + \" \" + aCte[j][0]);\n nliga.onclick = function() {return accion(this.title);};\n nimg = document.createElement(\"img\");\n nimg.setAttribute(\"src\",\"/interfase/\" + tacciones[l] + \".gif\");\n nimg.setAttribute(\"alt\",tacciones[l]);\n nliga.appendChild(nimg);\n cuarta.appendChild(nliga);\n }\n fila.className = ((j+1)%2==0) ? \"even\" : \"odd\";\n tlb.appendChild(fila);\n }\n } else {\n var filavacio = document.createElement(\"tr\");\n filavacio.className=\"even\";\n var celdavacio = document.createElement(\"td\");\n celdavacio.setAttribute(\"colspan\",\"4\");\n celdavacio.colSpan = 4;\n var txtvacio = document.createTextNode(\"No hay Clientes en el Sistema\");\n var br = document.createElement(\"br\");\n celdavacio.appendChild(txtvacio);\n celdavacio.appendChild(br);\n filavacio.appendChild(celdavacio);\n tlb.appendChild(filavacio);\n }\n}", "function llamarregistrar(pagina) {\n var ajax = new XMLHttpRequest() \n const correo = document.getElementById('correo').value;\n const password = document.getElementById('password').value;\n const nombre = document.getElementById('nombre').value;\n const apellido = document.getElementById('apellido').value;\n const rol = document.getElementById('idrol').value;\n var parametros = \"correo=\" + encodeURI(correo) +\"&password=\" + encodeURI(password) +\"&nombre=\" + encodeURI(nombre) + \"&apellido=\" + encodeURI(apellido)+ \"&rol=\" + encodeURI(rol) + \"&Nocache=\" + Math.random();\n console.log(parametros);\n ajax.open(\"post\", pagina, true); \n ajax.onreadystatechange = function() { \n if (ajax.readyState == 4) {\n document.getElementById(\"contenido\").innerHTML = ajax.responseText;\n }\n }\n ajax.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\"); \n ajax.send(parametros); \n}", "function agregarGuiasRelacion(codigoGuiarem,serie,numero,color){\n\t\t\n\t\tvar total=$('input[id^=\"accionAsociacionGuiarem\"][value!=\"0\"]').length;\n\t\tn = document.getElementById('idTableGuiaRelacion').rows.length;\n\t\t\n\t\tif(total==0){\n\t\t\t/***mmostramos el div tr de guias relacionadas**/\n\t\t\t$(\"#idDivGuiaRelacion\").show(200);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tproveedor=$(\"#proveedor\").val();\n\t\tj=n;\n\t\tfila='<tr id=\"idTrDetalleRelacion_'+j+'\">';\n\t\tfila+='<td>';\n\t\tfila+='<a href=\"javascript:void(0);\" onclick=\"deseleccionarGuiaremision('+codigoGuiarem+','+j+')\" title=\"Deseleccionar Guia de remision\">';\n\t\tfila+='x';\n\t\tfila+='</a>';\n\t\tfila+='</td>';\n\t\tfila+='<td>'+j+'</td>';\n\t\tfila+='<td>'+serie+'</td>';\n\t\tfila+='<td>'+numero+'</td>';\n\t\t/**accionAsociacionGuiarem nuevo:1**/\n\t\tfila+='<td><div style=\"width:10px;height:10px;background-color:'+color+';border:1px solid black\"></div>';\n\t\tfila+='\t<input type=\"hidden\" id=\"codigoGuiaremAsociada['+j+']\" name=\"codigoGuiaremAsociada['+j+']\" value=\"'+codigoGuiarem+'\" />';\n\t\tfila+='<input type=\"hidden\" id=\"accionAsociacionGuiarem['+j+']\" name=\"accionAsociacionGuiarem['+j+']\" value=\"1\" />';\n\t\tfila+='<input type=\"hidden\" id=\"proveedorRelacionGuiarem['+j+']\" name=\"proveedorRelacionGuiarem['+j+']\" value=\"'+proveedor+'\" />';\n\t\tfila+='</td>';\n\t\tfila+='</tr>';\n\t\t$(\"#idTableGuiaRelacion\").append(fila);\n\t\t \n\t}", "function buscarPorColeccion(req, res) {\n\n // viene x los params de la url \n let busqueda = req.params.bus;\n let tabla = req.params.tabla;\n\n // busqueda es el parametro de la url \n // 'i' may y minus es insensible\n let regex = new RegExp(busqueda, 'i'); // aqui convertimos la busqueda con la ex regular\n\n let promesa;\n\n // busqueda contiene lo que busco \n // ej : coleccion/usuarios/manuel ===>>> colecccion/tabla/busqueda\n\n // pregunto por cada coleccion que viene en la tabla \n switch (tabla) {\n\n case 'usuarios':\n promesa = buscarUsuarios(busqueda, regex);\n break;\n\n case 'controles':\n promesa = buscarControles(busqueda, regex);\n break;\n\n case 'modulos':\n promesa = buscarModulos(busqueda, regex);\n break;\n\n case 'hospitales':\n promesa = buscarHospitales(busqueda, regex);\n break;\n\n case 'medicos':\n promesa = buscarMedicos(busqueda, regex);\n break; \n\n default:\n\n return res.status(400).json({\n ok: false,\n mensaje: 'los colecciones de busqueda solo son usuarios, modulos y controles',\n error: { message: 'tipo de coleccion/documento no valido' }\n })\n }\n\n // en ecma6 existe propiedades de obj computadas \n // ponemos tabla entre [] y nos da su valor , que puede ser usuarios medicos hospitales \n // si no lo ponemos entre [] imprime tabla \n\n promesa.then(data => {\n\n res.status(200).json({\n ok: true,\n [tabla]: data\n })\n })\n\n}", "function recuperarDadosQuatroParametros(idRegistro, descricaoRegistro, codigoRegistro, tipoConsulta) {\r\n\r\n\tvar form = document.ImovelOutrosCriteriosActionForm;\r\n\r\n\tif (tipoConsulta == 'setorComercialOrigem') {\r\n form.setorComercialOrigemCD.value = codigoRegistro;\r\n form.setorComercialOrigemID.value = idRegistro;\r\n\t form.nomeSetorComercialOrigem.value = descricaoRegistro;\r\n\t form.nomeSetorComercialOrigem.style.color = \"#000000\";\r\n\t \r\n\t form.setorComercialDestinoCD.value = codigoRegistro;\r\n form.setorComercialDestinoID.value = idRegistro;\r\n\t form.nomeSetorComercialDestino.value = descricaoRegistro;\r\n\t form.nomeSetorComercialDestino.style.color = \"#000000\";\r\n\t form.quadraOrigemNM.focus();\r\n\t}\r\n\r\n\tif (tipoConsulta == 'setorComercialDestino') {\r\n form.setorComercialDestinoCD.value = codigoRegistro;\r\n form.setorComercialDestinoID.value = idRegistro;\r\n\t form.nomeSetorComercialDestino.value = descricaoRegistro;\r\n\t form.nomeSetorComercialDestino.style.color = \"#000000\"; \r\n\t form.quadraDestinoNM.focus();\r\n\t}\r\n\r\n//\tif (tipoConsulta == 'quadraOrigem') {\r\n // form.quadraOrigemNM.value = codigoRegistro;\r\n\t// form.quadraOrigemID.value = idRegistro;\r\n//\t form.quadraMensagemOrigem.value = descricaoRegistro;\r\n\t// form.quadraMensagemOrigem.style.color = \"#000000\";\r\n\t \r\n//\t form.quadraDestinoNM.value = codigoRegistro;\r\n\t// form.quadraDestinoID.value = idRegistro;\r\n\t //form.quadraMensagemDestino.value = descricaoRegistro;\r\n// }\r\n\r\n//\tif (tipoConsulta == 'quadraDestino') {\r\n // form.quadraDestinoNM.value = codigoRegistro;\r\n\t// form.quadraDestinoID.value = idRegistro;\r\n// \t form.quadraMensagemDestino.value = descricaoRegistro;\r\n //\t form.quadraMensagemDestino.style.color = \"#000000\";\r\n\t//}\r\n\tform.action = 'exibirFiltrarImovelOutrosCriteriosConsumidoresInscricao.do?menu=sim&gerarRelatorio=RelatorioCadastroConsumidoresInscricao&limpar=S';\r\n\tform.submit();\r\n\r\n}", "function realizarFormulario(codFormulario) {\r\n\tswitch (codFormulario) {\r\n\tcase 1: // se escogio el formulario de la ventriculografia\r\n\t\tif (verEstadoCheckbox('ventriculografia_activacion')) {\r\n\t\t\taparecerElemento('informe_ventriculografia');\r\n\t\t\tcarga_logica_informe_ventriculografia();\r\n\t\t} else {\r\n\t\t\treiniciar_Elementos_Formulario_Ventriculografia();\r\n\t\t\tdesaparecerElemento('informe_ventriculografia');\r\n\t\t}\r\n\t\t\r\n\t\t recopilarInformeVentriculografia(); \r\n\t\tbreak;\r\n\r\n\tcase 2: // se escogio el formulario del aortograma\r\n\t\tif (verEstadoCheckbox('aortograma_activacion')) {\r\n\t\t\taparecerElemento('informe_aortograma');\r\n\t\t\tcarga_logica_informe_aortograma();\r\n\r\n\t\t} else {\r\n\t\t\treiniciar_elementos_Formulario_Aortograma();\r\n\t\t\tdesaparecerElemento('informe_aortograma');\r\n\t\t}\r\n\t\trecopilarInformeAortograma(); \r\n\t\tbreak;\r\n\r\n\t\t\r\n\tcase 3:\r\n\t\t\r\n\t\tif (verEstadoCheckbox('bypass_activacion')) {\r\n\t\t\taparecerElemento('informe_bypass');\r\n\t\t\tcarga_logica_informe_bypass();\r\n\r\n\t\t} else {\r\n\t\t\treiniciar_elementos_Formulario_Bypass();\r\n\t\t\tdesaparecerElemento('informe_bypass');\r\n\t\t}\r\n\t\trecopilarInformeBypass(); \r\n\r\n\t\tbreak;\r\n\t\t\r\n\tcase 4: // se escogio el formulario de anatomia coronaria\r\n\t\t\r\n\t//\talert(verEstadoCheckbox('anatomia_coronaria_activacion'));\r\n\t\tif (verEstadoCheckbox('anatomia_coronaria_activacion')) {\r\n\t\t\taparecerElemento('informe_anatomia_coronaria');\r\n\t\t\r\n\t\t\t/*if (tipo_lesiones_arterias_general.length == 0 || arterias_bifurcadas.length == 0 ){\r\n\t\t\t\tconsultarlesionesbifurcaciones();\r\n\t\t\t}*/\r\n\t\t\t//else{\r\n\t\t\t\tcarga_logica_informe_anatomia_coronaria();\r\n\t\t\t\tseleccionAnalisisArteria();\r\n\t\t//\t}\r\n\t\t\r\n\t\t} else {\r\n\t\t\treiniciar_Elementos_Formulario_Anatomia_Coronaria();\r\n\t\t\tdesaparecerElemento('informe_anatomia_coronaria');\r\n\t\t}\r\n\t\trecopilarInformeAnatomiaCoronaria();\r\n\t\tbreak;\r\n\t}\r\n\t ActivacionDesactivacionEnvioInformes();\r\n\r\n\t if(tamanoinfotextbox(\"contenido_informe_ventriculografia\")==0){\r\n\t\t recopilarInformeVentriculografia(); \r\n\t }\r\n\t if(tamanoinfotextbox(\"contenido_informe_aortograma\")==0){\r\n\t\t\trecopilarInformeAortograma(); \r\n\t }\r\n\t \r\n\t if(tamanoinfotextbox(\"contenido_informe_bypass\")==0){\r\n\t\t\trecopilarInformeBypass(); \r\n\t }\r\n\t \r\n\t if(tamanoinfotextbox(\"contenido_informe_analisis_anatomia_coronaria\")==0){\r\n\t \trecopilarInformeAnatomiaCoronaria();\r\n\t }\r\n\t\r\n}", "function GeraPersonagem(modo, submodo) {\n if (!submodo) {\n submodo = 'tabelado';\n }\n var classe_principal = gPersonagem.classes[0];\n if (tabelas_geracao[classe_principal.classe] == null) {\n Mensagem(Traduz('Geração de ') + Traduz(tabelas_classes[gPersonagem.classes[0].classe].nome) + ' ' + Traduz('não disponível'));\n return;\n }\n var tabelas_geracao_classe = tabelas_geracao[classe_principal.classe];\n // So pode limpar aqui, pois isso zerara as classes.\n PersonagemLimpaGeral();\n gPersonagem.classes.push(classe_principal);\n _GeraAtributos(modo, submodo);\n _GeraPontosDeVida(modo, submodo);\n\n // Atualiza aqui para ja ter alguns numeros usados abaixo.\n AtualizaGeralSemConverterEntradas();\n\n if (tabelas_geracao_classe.por_nivel == null ||\n tabelas_geracao_classe.por_nivel[gPersonagem.classes[0].nivel] == null) {\n Mensagem(Traduz('Geração avançada de ') + Traduz(tabelas_classes[gPersonagem.classes[0].classe].nome) + ' ' + Traduz('não disponível'));\n return;\n }\n var tabela_geracao_classe_por_nivel =\n tabelas_geracao_classe.por_nivel[gPersonagem.classes[0].nivel];\n\n _GeraEquipamentos(tabela_geracao_classe_por_nivel);\n _GeraArmaduras(tabela_geracao_classe_por_nivel);\n _GeraArmas(tabela_geracao_classe_por_nivel);\n var tipos_items = [ 'aneis', 'amuletos', 'capas', 'bracaduras', 'chapeus' ];\n for (var i = 0; i < tipos_items.length; ++i ) {\n _GeraItens(tipos_items[i], tabela_geracao_classe_por_nivel);\n }\n /*\n _GeraEstilosDeLuta();\n */\n _GeraTalentos(gPersonagem.classes[0].classe,\n tabelas_classes[gPersonagem.classes[0].classe],\n tabelas_geracao_classe,\n gPersonagem.classes[0].nivel);\n _GeraPericias(tabelas_classes[gPersonagem.classes[0].classe],\n tabelas_geracao_classe,\n gPersonagem.classes[0].nivel);\n _GeraFeiticos();\n // Importante regerar aqui para evitar duplicacoes.\n gPersonagem.especiais = {};\n AtualizaGeralSemConverterEntradas();\n LeEntradas(); // importante, pois as entradas estao vazias. Isso efetivamente salva o personagem.\n}", "function Verificacion(Objeto, Tipo) {\n var LongitudValor = Objeto.value.length + 1\n var SubCadena = String.fromCharCode(window.event.keyCode).toUpperCase();\n // PARA ACENTOS\n if (window.event.keyCode == 180 ||\n window.event.keyCode == 225 ||\n window.event.keyCode == 233 ||\n window.event.keyCode == 237 ||\n window.event.keyCode == 243 ||\n window.event.keyCode == 250 ||\n window.event.keyCode == 193 ||\n window.event.keyCode == 201 ||\n window.event.keyCode == 205 ||\n window.event.keyCode == 211 ||\n window.event.keyCode == 218 ||\n window.event.keyCode == 13) {\n window.event.keyCode = String.fromCharCode(window.event.keyCode).charCodeAt(0);\n return;\n }\n //aasdfasdf\n\n var Cadena = \"\"\n switch (Tipo) {\n case 1: //Letras\n var cadStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ '\n break;\n case 2: //Números\n var cadStr = \"0123456789\"\n break;\n case 3: //Letras y Números\n var cadStr = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ '\n break;\n case 4: //Decimales RCR\n var cadStr = '0123456789.'\n break;\n case 5: //Hora\n var cadStr = '0123456789:'\n break;\n case 6: //CURP y RFC\n var cadStr = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'\n break;\n case 7: //Especial\n var cadStr = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ- '\n break;\n case 8: //Telefono\n var cadStr = '0123456789-'\n break;\n case 9: //Ffecha\n var cadStr = '0123456789/'\n break;\n case 10: //DOMICILIO\n var cadStr = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ#. '\n break;\n case 11: //NÚMEROS SIN CEROS\n var cadStr = '123456789'\n break;\n case 12: //CFG. 22-MAY-03 SOLO NÚMEROS O PALABRA 'ADMON' SOLO PARA AUTENTIFICACIÓN DE USUARIO\n var cadStr = '0123456789ADMON'\n break;\n case 13: //OBSERVACIONES\n var cadStr = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ#.;-:,()/ %\"$ÁÉÍÓÚáéíóú'\n break;\n case 14: //Decimales RCR\n var cadStr = '0123456789.-'\n break;\n case 18: //Dictamen\n var cadStr = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-/()'\n break;\n case 19: //SOLO LECTURA\n var cadStr = ''\n break;\n }\n if (LongitudValor > 0) {\n for (i = 1; i <= cadStr.length; i++) {\n if ((cadStr.substring(i, i - 1) == SubCadena) || (window.event.keyCode == 209) || (window.event.keyCode == 241)) {\n Cadena = cadStr.substring(i, i - 1);\n }\n }\n if (Cadena.length == 0) {\n window.event.keyCode = 0\n }\n else {\n window.event.keyCode = String.fromCharCode(window.event.keyCode).toUpperCase().charCodeAt(0);\n }\n return;\n }\n}", "function realizarDevolucion(){\r\n let i = this.getAttribute(\"id\");\r\n i = i.charAt(1);\r\n let textoDevolucion = document.querySelector(`#devolucion${i}`).value;\r\n if(validarCampoLleno(textoDevolucion)){\r\n entregas[i].correccion = textoDevolucion;\r\n entregas[i].devolucion = true;\r\n generarTablaEntregasSinDevolucion();\r\n }else{\r\n document.querySelector(`#devolucion${i}`).value = \"Ingrese una devolución!\";\r\n }\r\n}", "function cargarInput(id_estudiante,nombre){\n\tgrupoestudiante.id_estudiante=id_estudiante;\n\tgrupoestudiante.nombre=nombre;\n\t\n\t$(\"#CampoidEstu\").val(grupoestudiante.id_estudiante);\n\t$(\"#CampoEstudiante\").val(grupoestudiante.nombre);\n}", "function nuevoEsquemaComision(cuadroOcultar, cuadroMostrar){\n\t\tcuadros(\"#cuadro1\", \"#cuadro2\");\n\t\tlimpiarFormularioRegistrar(\"#form_esquema_comision_registrar\");\n\t\t$(\"#id_vendedor_registrar\").focus();\n\t}", "function cargarFondo()\n{\n fondo.cargaOK = true;\n dibujar();\n}", "function validacionCampos(nombreCampo, valorCampo, tipoCampo) {\n\n var expSoloCaracteres = /^[A-Za-zÁÉÍÓÚñáéíóúÑ]{3,10}?$/;\n var expMatricula = /^([A-Za-z]{1}?)+([1-9]{2}?)$/;\n\n if (tipoCampo == 'select') {\n valorComparar = 0;\n } else {\n valorComparar = '';\n }\n\n //validamos si el campo es rellenado.\n if (valorCampo != valorComparar) {\n $('[id*=' + nombreCampo + ']').removeClass('is-invalid');\n\n //Aplicamos validaciones personalizadas a cada campo.\n if (nombreCampo == 'contenidoPagina_nombreMedico') {\n if (expSoloCaracteres.test(valorCampo)) {\n return true;\n } else {\n mostrarMensaje(nombreCampo, 'noDisponible');\n return false;\n }\n\n }\n else if (nombreCampo == 'contenidoPagina_apellidoMedico') {\n if (expSoloCaracteres.test(valorCampo)) {\n return true;\n } else {\n mostrarMensaje(nombreCampo, 'noDisponible');\n return false;\n }\n \n }\n else if (nombreCampo == 'contenidoPagina_especialidadMedico') {\n return true;\n\n }\n else if (nombreCampo == 'contenidoPagina_matriculaMedico') {\n\n if (expMatricula.test(valorCampo)) {\n\n $(\"[id*=contenidoPagina_matriculaMedico]\").off('keyup');\n $(\"[id*=contenidoPagina_matriculaMedico]\").on('keyup', function () {\n return validarMatriculaUnica($(this).val(), matAcomparar);\n });\n\n return validarMatriculaUnica($(\"[id*=contenidoPagina_matriculaMedico]\").val(), matAcomparar);\n } else {\n mostrarMensaje(nombreCampo, 'estructuraInc');\n return false;\n } \n }\n } else {\n mostrarMensaje(nombreCampo, 'incompleto');\n return false;\n }\n }", "function leerFormulario(e) {\r\n //Esto es para prevenir la acción por default, la cual es que al dar click al botón, va a intentar\r\n //buscar una página para redireccionar, pero no es eso lo que queremos que haga\r\n e.preventDefault();\r\n\r\n //Leer los datos de los inputs\r\n const nombre = document.querySelector('#nombre').value,\r\n empresa = document.querySelector('#empresa').value,\r\n telefono = document.querySelector('#telefono').value,\r\n accion = document.querySelector('#accion').value;\r\n\r\n if (nombre === '' || empresa === '' || telefono === '') {\r\n //2 parámetros: texto y clase\r\n mostrarNotificacion('Todos los campos son obligatorios', 'error');\r\n } else {\r\n //Pasa la validación, crear llamado a Ajax\r\n //FormData se utiliza para guardar valores de formularios\r\n const infoContacto = new FormData();\r\n infoContacto.append('nombre', nombre);\r\n infoContacto.append('empresa', empresa);\r\n infoContacto.append('telefono', telefono);\r\n infoContacto.append('accion', accion);\r\n\r\n //Verificamos que todo funcione correctamente hasta ahora, viendo que los valores se guarden en el arreglo\r\n //Los puntos crean una copia del objeto, porque si no, no podría verse\r\n //console.log(...infoContacto);\r\n\r\n if (accion === 'crear') {\r\n //crearemos un nuevo contacto\r\n //esta función toma toda la información del formulario\r\n insertarBD(infoContacto);\r\n } else {\r\n //editar el contacto\r\n //leer el ID\r\n const idRegistro = document.querySelector('#id').value;\r\n infoContacto.append('id', idRegistro);\r\n actualizarRegistro(infoContacto);\r\n }\r\n }\r\n}", "function carregaOpcoesUnidadeSuporte(){\n\tcarregaTipoGerencia();\t\n\tcarregaTecnicos();\n\tcarregaUnidadesSolicitantes();\t\n\tcarregaEdicaoTipos();//no arquivo tipoSubtipo.js\n\tcarregaComboTipo();//no arquivo tipoSubtipo.js\n}", "function getDados(g) {\n if (g === 0) {\n\n const usuario = {\n email: document.querySelector('#email').value,\n nome: document.querySelector('#name').value,\n sobrenome: document.querySelector('#lastname').value,\n dtNascimento: document.querySelector('#dtNascimento').value,\n cpf: document.querySelector('#cpf').value,\n telefone: document.querySelector('#tel').value,\n celular: document.querySelector('#cel').value,\n senha: document.querySelector('#password').value\n }\n return enviar_dados(usuario)\n\n } else { console.log(\"Não pegou os dados\") }\n}", "function guardarOK(numeroSol, lote) {\n\n var vLote = ''\n eval('frmFormulario').oculto = 'N';\n txt_to(\"lblNumeroSolicitudesRegistradasXX\",numeroSol);\n if (lote != null)\n vLote = lote;\n \n set('frmFormulario.oidLote',vLote);\n //set('frmFormulario.lote',vLote);\n set('frmFormulario.numeroSolicitudesRegistradas',numeroSol);\n \n\t\tlimpiarListaClientes();\n\t\t// Habilita el botón Guardar del menú secundario\n\t\tbtnProxy(1, '1'); \n\t}", "function registrar(tipo) {\n nombre = $(\"#txtNombre\").val();\n apellido = $(\"#txtApellido\").val();\n correo = $(\"#txtCorreo\").val();\n pass = $(\"#txtPassword\").val();\n cadenaUsuario = 'txtNombre=' + nombre + '&txtApellido=' + apellido + '&txtCorreo=' + correo + '&txtPassword=' + pass;\n if (tipo == \"0\") {\n codigoI = $(\"#txtCodInstituto\").val();\n nombreI = $(\"#txtNomInstituto\").val();\n depto = $(\"#txtDepartamento\").val();\n municipio = $(\"#txtMunicipio\").val();\n direccion = $(\"#txtDireccion\").val();\n\n cadenaIns = '&txtCodInstituto=' + codigoI + '&txtNomInstituto=' + nombreI + '&txtDepartamento=' + depto + '&txtMunicipio=' + municipio + '&txtDireccion=' + direccion;\n\n $.ajax({\n url: 'Acciones/registrarInstituto.php',\n type: 'POST',\n data: cadenaUsuario + cadenaIns,\n dataType: 'text',\n beforeSend: function () {\n document.getElementById(\"cargar\").innerHTML = '<div class=\"ui active dimmer\"><div class=\"ui text loader\">Cargando</div></div>';\n },\n success: function (response) {\n error = response;\n document.getElementById(\"cargar\").innerHTML = '';\n if (error == 1) {\n document.getElementById(\"error\").innerHTML = '<div class=\"ui error message mb-3\"><div class=\"header\">Error:</div><p>El codigo ' + codigoI + ' ya fue utilizado anteriormente para registrar otro instituto. Si crees que se trata de fraude puede reportarlo siguiendo <a href=\"#\">este enlace</a></p></div>';\n return true;\n } else if (error == 0) {\n window.location.href = \"planes.php\";\n return true;\n } else if (error == 2) {\n document.getElementById(\"error\").innerHTML = '<div class=\"ui error message mb-3\"><div class=\"header\">Error:</div><p>El correo ' + correo + ' ya está registrado en el sistema.</p></div>';\n setTimeout(\"$('.message').transition('fade out');listar('')\", 2000);\n setTimeout(\"vaciarDiv('error')\", 2300);\n return true;\n }\n },\n error: function () { }\n });\n } else {\n pase = $(\"#txtPase\").val();\n $.ajax({\n url: 'Acciones/registrarDocente.php',\n type: 'POST',\n data: cadenaUsuario + '&txtPase=' + pase,\n dataType: 'text',\n beforeSend: function () {\n document.getElementById(\"cargar\").innerHTML = '<div class=\"ui active dimmer\"><div class=\"ui text loader\">Cargando</div></div>';\n },\n success: function (response) {\n error = response;\n document.getElementById(\"cargar\").innerHTML = '';\n if (error == 0) {\n window.location.href = \"perfil.php\";\n return true;\n } else if (error == 1) {\n document.getElementById(\"error\").innerHTML = '<div class=\"ui error message mb-3\"><div class=\"header\">Error:</div><p>El pase virtual ' + pase + ' no existe.</p></div>';\n setTimeout(\"$('.message').transition('fade out');listar('')\", 2000);\n setTimeout(\"vaciarDiv('error')\", 2300);\n return true;\n } else if (error == 2) {\n document.getElementById(\"error\").innerHTML = '<div class=\"ui error message mb-3\"><div class=\"header\">Error:</div><p>El correo ' + correo + ' ya está registrado en el sistema.</p></div>';\n setTimeout(\"$('.message').transition('fade out');listar('')\", 2000);\n setTimeout(\"vaciarDiv('error')\", 2300);\n return true;\n }\n },\n error: function () { }\n });\n }\n}", "getNuevaRecompensa() {\r\n\t\t// le asigna la textura correspondiente\r\n\t\tvar recompensa = new THREE.Mesh(\r\n\t\t\tnew THREE.BoxBufferGeometry(2,2,2),\r\n\t\t\tnew THREE.MeshPhongMaterial({\r\n\t\t\t\topacity: 0.5,\r\n\t\t\t\ttransparent: true,\r\n\t\t\t\tmap: this.texturaRecompensa\r\n\t\t\t})\r\n\t\t);\r\n\r\n\t\t// Generar tipo de recompensa aleatoriamente\r\n\t\trecompensa.tipo = Math.floor( Math.random() * TipoRecompensa.NUM_TIPOS );\r\n\r\n\t\treturn recompensa;\r\n\t}", "function registrar() {\n let btnRegistrar = document.getElementById(\"btnRegistrar\");\n\n let cliente = document.getElementById(\"cboCliente\").value;\n let vehiculo = document.getElementById(\"cboVehiculo\").value;\n\n let serie = document.getElementById(\"txtSerie\").value;\n let numero = document.getElementById(\"txtNumero\").value;\n\n let importe = document.getElementById(\"txtImporte\").value;\n\n if (!validarDatos(cliente, \"Debe seleccionar un Cliente\")) {\n return;\n }\n\n if (!validarDatos(vehiculo, \"Debe seleccionar un Vehiculo\")) {\n return;\n }\n\n if (!validarDatos(serie, \"Debe Ingresar una Serie\")) {\n return;\n }\n\n if (!validarDatos(numero, \"Debe Ingresar un Numero\")) {\n return;\n }\n\n if (!validarDatos(importe, \"Debe Ingresar un Importe\")) {\n return;\n }\n\n if (btnRegistrar.value === \"Registrar\") {\n registrarFactura();\n } else {\n actualizarFactura();\n }\n\n}", "function validarFormulario(nombre, apellidos, telefono, fecha) {\n\n var expresion_regular_nombre = /^[A-z]+$/; //Caulquier letra desde la A mayuscula a la z minuscula\n var expresion_regular_apellidos = /^[A-z]+$/; //Caulquier letra desde la A mayuscula a la z minuscula\n var expresion_regular_telefono = /^[0-9]{2,3}-? ?[0-9]{6,7}$/; // 3 primeros numeros - opcional o espacio 6 numeros mas\n var expresion_regular_fecha = /^(?:(?:(?:0?[1-9]|1\\d|2[0-8])[/](?:0?[1-9]|1[0-2])|(?:29|30)[/](?:0?[13-9]|1[0-2])|31[/](?:0?[13578]|1[02]))[/](?:0{2,3}[1-9]|0{1,2}[1-9]\\d|0?[1-9]\\d{2}|[1-9]\\d{3})|29[/]0?2[/](?:\\d{1,2}(?:0[48]|[2468][048]|[13579][26])|(?:0?[48]|[13579][26]|[2468][048])00))$/;\n\n /*\n Entero: ^(?:\\+|-)?\\d+$\n Correo: /[\\w-\\.]{3,}@([\\w-]{2,}\\.)*([\\w-]{2,}\\.)[\\w-]{2,4}/\n URL: ^(ht|f)tp(s?)\\:\\/\\/[0-9a-zA-Z]([-.\\w]*[0-9a-zA-Z])*(:(0-9)*)*(\\/?)( [a-zA-Z0-9\\-\\.\\?\\,\\'\\/\\\\\\+&%\\$#_]*)?$\n Contraseña segura: (?!^[0-9]*$)(?!^[a-zA-Z]*$)^([a-zA-Z0-9]{8,10})$\n (Entre 8 y 10 caracteres, por lo menos un digito y un alfanumérico, y no puede contener caracteres espaciales)\n Fecha: ^\\d{1,2}\\/\\d{1,2}\\/\\d{2,4}$\n (Por ejemplo 01/01/2007)\n Hora: ^(0[1-9]|1\\d|2[0-3]):([0-5]\\d):([0-5]\\d)$\n (Por ejemplo 10:45:23)\n Numero de Telefono: ^[0-9]{2,3}-? ?[0-9]{6,7}$\n Codigo Postal: ^([1-9]{2}|[0-9][1-9]|[1-9][0-9])[0-9]{3}$\n */\n\n //var expresion_regular_email = /^(.+\\@.+\\..+)$/;\n\n\n // Usaremos el método \"test\" de las expresiones regulares:\n if (expresion_regular_nombre.test(nombre) == false) {\n return false;\n }\n if (expresion_regular_apellidos.test(apellidos) == false) {\n return false;\n }\n if (expresion_regular_telefono.test(telefono) == false) {\n return false;\n }\n if (expresion_regular_fecha.test(fecha) == false) {\n return false;\n }\n return true;\n}", "function testaTecla(e, campo){\r\n var linhas = get('GRID1').childNodes[1].getElementsByTagName('tr');\r\n\r\n var tela = '';\r\n if (location.href.indexOf(\"hwpp111\") > 0)\r\n tela = 'tar';\r\n else if (location.href.indexOf(\"hwpp112\") > 0)\r\n tela = 'prj';\r\n \r\n //Se for o número do projeto\r\n if (campo.id == 'GMS_filtro_proj'){\r\n GM_setValue(\"GMS_filtro_\"+tela+\"_proj\", campo.value);\r\n GM_setValue(\"GMS_filtro_\"+tela+\"_obj\", '');\r\n get('GMS_filtro_obj').value = '';\r\n //Se for a descrição da Tarefa\r\n }else if(campo.id == 'GMS_filtro_obj'){\r\n GM_setValue(\"GMS_filtro_\"+tela+\"_proj\", '');\r\n GM_setValue(\"GMS_filtro_\"+tela+\"_obj\", campo.value);\r\n get('GMS_filtro_proj').value = '';\r\n }else if(campo.id == 'GMS_filtro_tempo'){\r\n GM_setValue(\"GMS_filtro_tmp\", campo.selectedIndex);\r\n if (get('GMS_filtro_obj').value != '')\r\n campo = get('GMS_filtro_obj');\r\n else if (get('GMS_filtro_proj').value != '')\r\n campo = get('GMS_filtro_proj');\r\n else\r\n campo = get('GMS_filtro_proj');\r\n }\r\n\r\n for (var i = 1; i < linhas.length; i++) {\r\n var nome = '';\r\n\r\n //Se for o número do projeto\r\n if (campo.id == 'GMS_filtro_proj'){\r\n nome ='span__PRJTELA_'+('000'+i).slice(-4);\r\n //Se for a descrição da Tarefa/projeto\r\n }else if(campo.id == 'GMS_filtro_obj'){\r\n if (tela == 'tar')\r\n nome ='span__DSCTAREFA_'+('000'+i).slice(-4);\r\n else if (tela == 'prj')\r\n nome ='span__PRJDESC_'+('000'+i).slice(-4);\r\n }\r\n\r\n //busca o valor do campo\r\n var valor = get(nome).firstChild.firstChild.innerHTML;\r\n if (!valor){\r\n valor = get(nome).firstChild.innerHTML;\r\n }\r\n\r\n //faz a validação de tarefas com tempo\r\n var tempo = true;\r\n if (tela == 'tar'){\r\n if (get('GMS_filtro_tempo').selectedIndex != 2)\r\n tempo = false;\r\n }\r\n\r\n //faz a validação de projetos que não devem ser exibidos\r\n var proj = true;\r\n if ((tela == 'prj')&&(GM_getValue(\"GMS_filtro_nproj\", '').length>0)){\r\n nome = 'span__PRJTELA_'+('000'+i).slice(-4);\r\n var aux = get(nome).firstChild.firstChild.innerHTML;\r\n if (!aux){\r\n aux = get(nome).firstChild.innerHTML;\r\n }\r\n //alert(aux);\r\n var nproj = ','+GM_getValue(\"GMS_filtro_nproj\", '').toUpperCase()+',';\r\n \r\n if (nproj.indexOf(','+aux.toUpperCase()+',') >= 0)\r\n tempo = false;\r\n }\r\n\r\n //mostra ou não os registros da tabela\r\n if (((valor.toUpperCase().indexOf(campo.value.toUpperCase()) >= 0)||(campo.value == '')) && tempo && proj)\r\n linhas[i].style.display = '';\r\n else\r\n linhas[i].style.display = 'none';\r\n }\r\n}", "function mostrarRegistrarseComoOrganizacion(){\n mostrarComo('organizacion')\n}", "function registroUsuario(){\n\t/*---------- valdando nombre ----------*/\n\tvar nombre =$(\"#regUsuario\").val();\n\n\tif(nombre != \"\"){\n\t\tvar expresion = /^[a-zA-ZñÑáéíóúÁÉÍÓÚ ]*$/;\n\n\t\t\t//Si no cumple la expresion\n\t\t\tif(!expresion.test(nombre)){\n\t\t\t\t$(\"#regUsuario\").parent().before('<div class=\"alert alert-warning\"><strong>Uy </stron>Caracteres especiales, NO</div>')\n\t\t\t return false;\n\t\t\t}\n\n\t\t}else{\n\t\t\t$(\"#regUsuario\").parent().before('<div class=\"alert alert-warning\"><strong>Uy </stron>Ponga su nombre pues</div>')\n\t\t\treturn false;\n\t\t}\n\n\n\n\n\t/*---------- Validando email ----------*/\n\tvar email =$(\"#regEmail\").val();\n\n\tif(email != \"\"){\n\t\tvar expresion = /^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,4})+$/;\n\t\t\t//Si no cumple la expresion\n\t\t\tif(!expresion.test(email)){\n\t\t\t\t$(\"#regEmail\").parent().before('<div class=\"alert alert-warning\"><strong>Uy </stron>Escriba bien el correo</div>')\n\t\t\t return false;\n\t\t\t}\n\n\t\t\t//Si validarEmailRepetido es falso\n\t\t\tif(validarEmailRepetido){\n\n\t\t\t\t$(\"#regEmail\").parent().before('<div class=\"alert alert-danger\"><strong>Uy </stron>Correo previamente registrado pliz agrega otro </div>')\n\t\t\t\treturn false;\n\n\t\t\t}\n\n\t\t}else{\n\t\t\t$(\"#regEmail\").parent().before('<div class=\"alert alert-warning\"><strong>Uy </stron>Ponga su email pues</div>')\n\t\t\treturn false;\n\t\t}\n\n\n\n\n\t/*---------- Validando contrasela ----------*/\n\n\tvar password =$(\"#regPassword\").val();\n\n\tif(password != \"\"){\n\t\tvar expresion = /^[a-zA-Z0-9]*$/;\n\t\t\t//Si no cumple la expresion\n\t\t\tif(!expresion.test(password)){\n\t\t\t\t$(\"#regPassword\").parent().before('<div class=\"alert alert-warning\"><strong>Uy </stron>Caracteres especiales, NO</div>')\n\t\t\t return false;\n\t\t\t}\n\n\t\t}else{ \n\t\t\t$(\"#regPassword\").parent().before('<div class=\"alert alert-warning\"><strong>Uy </stron>Ponga su correo pues</div>')\n\t\t\treturn false;\n\t\t}\n\n\n\n\n\t/*---------- Validando politicas ----------*/\n\tvar politicas = $(\"#regPoliticas:checked\").val();\n\t\t// si checkbox #regPoliticas es diferente a checked\n\t\tif (politicas!=\"on\") {\n\t\t\t// Coloca encima del checkbox un alert\n\t\t\t$(\"#regPoliticas\").parent().before('<div class=\"alert alert-warning\"><strong>Uy </stron>Debe aceptar nuestras politicas</div>')\n\t\t\treturn false;\n\t\t}\n\n\n\treturn true\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 getInfoDeDocumento(datos, rostro) {\n console.log('====================datos para analizar=====');\n console.log(datos);\n console.log('=============================================');\n\n //regresa false si no es el documento, regresa la info analizada si es el documento en cuestion\n let stsIne = ine.getInfoFromIne(datos, rostro);\n let stsCfe = cfe.getInfoFromCfe(datos, rostro);\n let stsTelmex = telmex.getInfoFromTelmx(datos, rostro);\n let stsAxtel = axtel.getInfoFromAxt(datos, rostro);\n let stsPassMx = passMx.getInfoFromPasspMX(datos, rostro);\n let stsFormMigrtMx = formMigrtMx.getInfoFromFormMigMX(datos, rostro);\n let stsDni = dni.getInfoFromDni(datos, rostro);\n // let stsLicDeCondCmdx = licDeCondCdmxs.getInfoFromLicDeCondCdmx(datos, rostro);\n\n if (stsIne != false) return stsIne;\n if (stsCfe != false) return stsCfe;\n if (stsTelmex != false) return stsTelmex;\n if (stsAxtel != false) return stsAxtel;\n if (stsPassMx != false) return stsPassMx;\n if (stsFormMigrtMx != false) return stsFormMigrtMx;\n if (stsDni != false) return stsDni;\n // if (stsLicDeCondCmdx != false) return stsLicDeCondCmdx;\n\n return getInfoFromUnkn(datos); //si ningun documento es reconocido se envia vacio\n}", "function accionCrear()\n\t{\n\n//\t\talert(\"accionCrear\");\n\t\tif(listado1.datos.length != 0)\n\t\t{\n\t\t\tvar orden = listado1.codSeleccionados();\n//\t\t\talert(\"Linea seleccionada \" + orden);\n\t\t\tset('frmPBuscarTiposError.hidOidCabeceraMatrizSel', orden);\n\t\t\tset('frmPBuscarTiposError.accion', 'crear');\n\t\t\tenviaSICC('frmPBuscarTiposError');\n\n\t\t}else\n\t\t{\n\t\t\talert(\"no hay seleccion: \" + listado1.datos.length);\n\t\t}\n\t}", "function regViajes(){\n window.location = config['url']+\"Administrador/modulo?vista=registrar_viaje\";\n}", "function atualizaGrupo() {\r\n atualizaCentroideX();\r\n atualizaCentroideY();\r\n\r\n let retorno = true;\r\n let grupoID = [];\r\n let distancias = [];\r\n let distanciasMenores = [];\r\n\r\n for (let i = 0; i < eixoX.length; i++) {\r\n for (let j = 0; j < grupos; j++) {\r\n distancias[j] = Math.sqrt(\r\n Math.pow(eixoX[i] - centroidesX[j], 2) +\r\n Math.pow(eixoY[i] - centroidesY[j], 2)\r\n );\r\n }\r\n\r\n distanciasMenores[i] = minimo(distancias);\r\n // o ID é o índice e o valor é o grupo\r\n grupoID[i] = grupo(distancias, distanciasMenores[i]);\r\n }\r\n\r\n if (grupoID_Anterior.length <= 0) {\r\n grupoID_Anterior = grupoID;\r\n } else {\r\n if (comparaGrupos(grupoID_Anterior, grupoID)) {\r\n retorno = false;\r\n } else {\r\n grupoID_Anterior = grupoID;\r\n retorno = true;\r\n }\r\n }\r\n return retorno;\r\n}", "function activarInputMontoGenericoPar(matriz,valor){\n if(valor==1){\n $(\"#monto_mod\"+matriz).attr(\"readonly\",true);\n $(\"#monto_modal\"+matriz).attr(\"readonly\",true);\n \n if(($(\"#habilitar\"+matriz).is(\"[checked]\"))){\n $(\"#habilitar\"+matriz).removeAttr(\"checked\");\n }\n }else{\n $(\"#monto_mod\"+matriz).removeAttr(\"readonly\");\n $(\"#monto_modal\"+matriz).removeAttr(\"readonly\");\n \n if(!($(\"#habilitar\"+matriz).is(\"[checked]\"))){\n }\n }\n var respu= matriz.split('RRR');\n calcularTotalPartidaGenerico(respu[0],1);\n}", "function eliminarRegistro(form, pagina, foraneo, modulo) {\r\n\tvar codigo=form.registro.value;\r\n\tif (codigo==\"\") msjError(1000);\r\n\telse {\r\n\t\t//\tPREGUNTO SI DESEA ELIMINAR\r\n\t\tvar eliminar=confirm(\"¡Esta seguro de eliminar este registro?\");\r\n\t\tif (eliminar) {\r\n\t\t\tif (foraneo) {\r\n\t\t\t\t//\tCREO UN OBJETO AJAX PARA VERIFICAR QUE EL NUEVO REGISTRO NO EXISTA EN LA BASE DE DATOS\r\n\t\t\t\tvar ajax=nuevoAjax();\r\n\t\t\t\tajax.open(\"POST\", \"fphp_ajax_nomina.php\", true);\r\n\t\t\t\tajax.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\r\n\t\t\t\tajax.send(\"modulo=\"+modulo+\"&accion=ELIMINAR&codigo=\"+codigo);\r\n\t\t\t\tajax.onreadystatechange=function() {\r\n\t\t\t\t\tif (ajax.readyState==4)\t{\r\n\t\t\t\t\t\tvar error=ajax.responseText;\r\n\t\t\t\t\t\tif (error!=0) alert (\"¡\"+error+\"!\");\r\n\t\t\t\t\t\telse cargarPagina(form, pagina);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else cargarPagina(form, pagina);\r\n\t\t}\r\n\t}\r\n}", "function agregarAlCarrito() {\n /* Función que agrega un producto al carrito. utiliza el atributo \"alt\" del botón clickeado para obtener el código del producto a agregar. Cada vez que se agrega un producto se vuelve a generar la tabla que se muestra en pantalla.*/\n var elCodigo = $(this).attr(\"alt\");\n var laPosicion = buscarCodigoProducto(elCodigo);\n var productoAgregar = listadoProductos[laPosicion];\n carrito[carrito.length] = productoAgregar;\n armarTablaCarrito();\n }", "function cargarFondo()\n{\n console.log(\"Cargo Fondo\");\n fondo.cargaOK= true; \n dibujar();\n}", "function agregaRegistro(){\n\tvar url = '../php/agrega_producto.php';\n\t$.ajax({\n\t\ttype:'POST',\n\t\turl:url,\n\t\tdata:$('#formulario').serialize(),\n\t\tsuccess: function(registro){\n\t\t\tif ($('#pro').val() == 'Registro'){\n\t\t\t$('#formulario')[0].reset();\n\t\t\t$('#mensaje').addClass('bien').html('Registro completado con exito').show(200).delay(2500).hide(200);\n\t\t\t$('#agrega-registros').html(registro);\n\t\t\treturn false;\n\t\t\t}else{\n\t\t\t$('#mensaje').addClass('bien').html('Edicion completada con exito').show(200).delay(2500).hide(200);\n\t\t\t$('#agrega-registros').html(registro);\n\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t});\n\treturn false;\n}", "function obtenerAsociado(codigo, nombreField) {\n var divPadre = $('#' + nombreField).parent().parent();\n var obtenerInputCodigo = divPadre.children(\":first\").children().attr('id');\n if (codigo.length < 7) {\n\n var stringElementos = '0000000';\n var stringCodigo = codigo;\n\n var contadorCodigo = stringCodigo.length;\n var contadorElementos = stringElementos.length;\n var obtenerFaltantes = contadorElementos - contadorCodigo;\n var elementosAgregar = \"\";\n for (var i = 0; i < obtenerFaltantes; i++) {\n elementosAgregar += '0';\n }\n codigo = elementosAgregar + codigo;\n\n if (stringCodigo.length < 4) {\n document.getElementById(nombreField).value = \"\";\n return;\n }\n\n\n if (codigo.length == 0)\n {\n document.getElementById(nombreField).value = \"\";\n return;\n }\n if(obtenerInputCodigo == null)\n {\n obtenerInputCodigo = \"\";\n }\n \n }\n \n var url = \"/frm_AsociadosConsultaGeneral/ObtenerAsociado/\" + codigo;\n requestJSON(url, _construirCallback(nombreField, codigo, obtenerInputCodigo));\n}", "function MostrarRegistro(){\n // declaramos una variable para guardar los datos\n var listaregistro=Mostrar();\n // selecciono el tbody de la tabla donde voy a guardar\n tbody=document.querySelector(\"#tbRegistro tbody\");\n tbody.innerHTML=\"\";\n // agregamos las columnas que se registren\n for(var i=0; i<listaregistro.length;i++){\n // declaramos una variable para la fila\n var fila=tbody.insertRow(i);\n // declaramos variables para los titulos\n var titulonombre=fila.insertCell(0);\n var tituloprecio=fila.insertCell(1);\n var titulocategoria=fila.insertCell(2);\n var titulocantidad=fila.insertCell(3);\n // agregamos los valores\n titulonombre.innerHTML=listaregistro[i].nombre;\n tituloprecio.innerHTML=listaregistro[i].precio;\n titulocategoria.innerHTML=listaregistro[i].categoria\n titulocantidad.innerHTML=listaregistro[i].cantidad;\n tbody.appendChild(fila);\n }\n}", "function operacion(){\r\n if (numeros.segundo === null || numeros.segundo === \"\" || Number.isNaN(numeros.segundo)){ \r\n return raiz(); // Si hay un solo número, llamar a la funcion raiz\r\n } else {\r\n return aritmetica(); // Si hay dos a la función aritmética\r\n }\r\n }", "function dibujarPuntoLienzoRutas(lon,lat,id){\r\n limpiarCapaNuevaRuta();\r\n var marca = new Array();\r\n var punto = new OpenLayers.Geometry.Point(lon,lat);\r\n punto.transform( new OpenLayers.Projection( \"EPSG:4326\" ),\r\n new OpenLayers.Projection( \"EPSG:900913\" ) );\r\n \r\n var puntoParada = new OpenLayers.Feature.Vector( punto, {\r\n id : ''+id\r\n });\r\n puntoParada.id = id;\r\n marca.push(puntoParada);\r\n lienzoRutas.addFeatures(marca);\r\n}" ]
[ "0.63085294", "0.6274227", "0.6264676", "0.6165149", "0.61538434", "0.6142857", "0.61343884", "0.61341226", "0.6113145", "0.6086374", "0.6071996", "0.60386664", "0.60135895", "0.59961265", "0.59800535", "0.59462136", "0.59325397", "0.5914893", "0.59080696", "0.5896865", "0.58899957", "0.5886198", "0.58782977", "0.5855305", "0.5851555", "0.5836613", "0.5836613", "0.58099425", "0.5798197", "0.5789649", "0.5768009", "0.5764891", "0.5754444", "0.57477975", "0.57441455", "0.57441455", "0.57295364", "0.5718105", "0.57179666", "0.570917", "0.56992793", "0.56991756", "0.56955725", "0.5690177", "0.56900513", "0.5687961", "0.5685092", "0.5670409", "0.5651406", "0.5650956", "0.5647942", "0.5634074", "0.5633416", "0.5633116", "0.56319124", "0.5620881", "0.5606032", "0.56028575", "0.5602394", "0.5601641", "0.559913", "0.55975336", "0.5594941", "0.5592129", "0.5590364", "0.5589363", "0.5580889", "0.55782974", "0.55723953", "0.55666906", "0.5563904", "0.556294", "0.55560076", "0.55475384", "0.5539259", "0.5535582", "0.55334765", "0.55328393", "0.55279577", "0.552687", "0.55244905", "0.55232793", "0.5522975", "0.55219805", "0.5521963", "0.55219394", "0.5521345", "0.5519231", "0.5510799", "0.55084115", "0.5507609", "0.55052984", "0.55028397", "0.55028254", "0.5500507", "0.5498764", "0.5495527", "0.54952", "0.54939365", "0.5493457", "0.54902136" ]
0.0
-1
OBJETO: Formulario METODO: INIT
function mobjetos__inicializar(){ /* $("#txtNombreDelCampo").val(""); */ /* cmbNombreDelCampo__inicializar(); */ /* $("#txtNombreDelCampo").focus(); */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "constructor(objeto) {\n\t\tthis.posicionamento = new posicionamento(objeto.linha, objeto.coluna);\n\t\tthis.sujo = objeto.sujo;\n\t\tthis.visitado = objeto.visitado;\n\t\tthis.listado = objeto.listado;\n\t}", "static initialize(obj, body, path) { \n obj['body'] = body;\n obj['path'] = path;\n }", "static initialize(obj, from, to) { \n obj['from'] = from;\n obj['to'] = to;\n }", "static initialize(obj, address, addressPath, amount, derivation, index, isAvailable, isConfirmed, referenceId, transactionId) { \n obj['address'] = address;\n obj['addressPath'] = addressPath;\n obj['amount'] = amount;\n obj['derivation'] = derivation;\n obj['index'] = index;\n obj['isAvailable'] = isAvailable;\n obj['isConfirmed'] = isConfirmed;\n obj['referenceId'] = referenceId;\n obj['transactionId'] = transactionId;\n }", "static initialize(obj, modelTypeId, start, stop) { \n obj['model_type_id'] = modelTypeId;\n obj['start'] = start;\n obj['stop'] = stop;\n }", "static initialize(obj, modelTypeId, firstname, lastname, tags) { \n obj['model_type_id'] = modelTypeId;\n obj['firstname'] = firstname;\n obj['lastname'] = lastname;\n obj['tags'] = tags;\n }", "static initialize(obj, line1, city, region, areaCode, country) { \n obj['line1'] = line1;\n obj['city'] = city;\n obj['region'] = region;\n obj['areaCode'] = areaCode;\n obj['country'] = country;\n }", "static initialize(obj, method, path) { \n obj['method'] = method;\n obj['path'] = path;\n }", "constructor(\n parametroNombre,\n parametroApellido,\n parametroDni,\n parametroFechaNacimiento,\n parametroEmail,\n parametroTelefono\n ) {\n //crear las propiedades del objeto\n this.nombre = parametroNombre;\n this.apellido = parametroApellido;\n this.dni = parametroDni;\n this.fechaNacimiento = parametroFechaNacimiento;\n this.email = parametroEmail;\n this.telefono = parametroTelefono;\n }", "function criarObjetoFis(_objeto) {\n var objeto = _objeto;\n switch (objeto) {\n case \"Esfera\":\n {\n try {\n if (document.getElementById(\"MassaEsfera\").value === \"\" || document.getElementById(\"MassaEsfera\").value <= 0) {\n alert(\"O valor da da massa não pode ser vazio nem menor que zero!\");\n } else {\n objetoAtual = new ObjetoFisica(document.getElementById(\"NomeEsfera\").value,\n parseInt(document.getElementById(\"Raio\").value),\n \"Esfera\",\n document.getElementById(\"MaterialEsfera\").value,\n indice,\n getVector3(\"posEsfera\"),\n getVector3(\"vEsfera\"),\n document.getElementById(\"MassaEsfera\").value,\n document.getElementById(\"amortce_Linear_Esfera\").value,\n document.getElementById(\"amortce_Angular_Esfera\").value,\n getVector3(\"rotEsfera\"),\n getVector3(\"acEsfera\"),\n getQuaternion(\"oEsfera\"),\n colisao('esfera'),\n true);\n objetoAtual.CriaEsfera();//Colocar como parametro a cena.\n listaObjetosFis.push(objetoAtual);\n console.log(objetoAtual.getOrientacao());\n //console.log(objetoAtual.teste());\n document.getElementById(\"listaObjetos\").appendChild(objetoAtual.getDiv());\n document.getElementById(\"listaDeObjetos_Efera\").appendChild(objetoAtual.addLista('esfera'));\n document.getElementById(\"listaDeObjetos_Cubo\").appendChild(objetoAtual.addLista('cubo'));\n document.getElementById(\"listaDeObjetos_Alvo\").appendChild(objetoAtual.addLista('alvo'));\n indice++;\n }\n } catch (e) {\n alert(e);\n }\n break;\n }\n case \"Cubo\":\n {\n try {\n if (document.getElementById(\"MassaCubo\").value === \"\" || document.getElementById(\"MassaCubo\").value <= 0) {\n alert(\"O valor da da massa não pode ser vazio nem menor que zero!\");\n } else {\n objetoAtual = new ObjetoFisica(document.getElementById(\"NomeCubo\").value,\n parseInt(document.getElementById(\"TamanhoCubo\").value),\n \"Cubo\",\n document.getElementById(\"MaterialCubo\").value,\n indice,\n getVector3(\"posCubo\"),\n getVector3(\"vCubo\"),\n document.getElementById(\"MassaCubo\").value,\n document.getElementById(\"amortce_Linear_Cubo\").value,\n document.getElementById(\"amortce_Angular_Cubo\").value,\n getVector3(\"rotCubo\"),\n getVector3(\"acCubo\"),\n getQuaternion(\"oCubo\"),\n colisao('cubo'),\n true);\n objetoAtual.CriaCubo();\n listaObjetosFis.push(objetoAtual);\n //alert(objetoAtual.teste());\n document.getElementById(\"listaObjetos\").appendChild(objetoAtual.getDiv());\n document.getElementById(\"listaDeObjetos_Efera\").appendChild(objetoAtual.addLista('esfera'));\n document.getElementById(\"listaDeObjetos_Cubo\").appendChild(objetoAtual.addLista('cubo'));\n document.getElementById(\"listaDeObjetos_Alvo\").appendChild(objetoAtual.addLista('alvo'));\n indice++;\n }\n } catch (e) {\n alert(e);\n }\n break;\n }\n case \"Alvo\":\n {\n try {\n objetoAtual = new ObjetoFisica(document.getElementById(\"NomeAlvo\").value,\n parseInt(document.getElementById(\"TamanhoAlvo\").value),\n \"Alvo\",\n null,\n indice,\n getVector3(\"posAlvo\"),\n getVector3(\"vAlvo\"),\n document.getElementById(\"MassaAlvo\").value,\n document.getElementById(\"amortce_Linear_Alvo\").value,\n document.getElementById(\"amortce_Angular_Alvo\").value,\n getVector3(\"rotAlvo\"),\n getVector3(\"acAlvo\"),\n getQuaternion(\"oAlvo\"),\n colisao('alvo'),\n false);\n objetoAtual.CriaAlvo();\n listaObjetosFis.push(objetoAtual);\n //alert(objetoAtual.teste());\n document.getElementById(\"listaObjetos\").appendChild(objetoAtual.getDiv());\n document.getElementById(\"listaDeObjetos_Efera\").appendChild(objetoAtual.addLista('esfera'));\n document.getElementById(\"listaDeObjetos_Cubo\").appendChild(objetoAtual.addLista('cubo'));\n document.getElementById(\"listaDeObjetos_Alvo\").appendChild(objetoAtual.addLista('alvo'));\n indice++;\n } catch (e) {\n alert(e);\n }\n break;\n }\n }\n}", "static initialize(obj, amount, recipient, sender, xpub, fee, sequence) { \n obj['amount'] = amount;\n obj['recipient'] = recipient;\n obj['sender'] = sender;\n obj['xpub'] = xpub;\n obj['fee'] = fee;\n obj['sequence'] = sequence;\n }", "static initialize(obj, actorObject, actionRelationship, actionObject) { \n obj['actor_object'] = actorObject;\n obj['action_relationship'] = actionRelationship;\n obj['action_object'] = actionObject;\n }", "static initialize(obj, created, programID, customerProfileID, type, amount, name, subLedgerID) { \n obj['created'] = created;\n obj['programID'] = programID;\n obj['customerProfileID'] = customerProfileID;\n obj['type'] = type;\n obj['amount'] = amount;\n obj['name'] = name;\n obj['subLedgerID'] = subLedgerID;\n }", "static initialize(obj, fee, burn) { \n obj['fee'] = fee;\n obj['burn'] = burn;\n }", "constructor(formatobjeto){ //Definimos el constructor\n this.data=formatobjeto\n \n }", "static initialize(obj, propertyId, contractAddress) { \n obj['propertyId'] = propertyId;\n obj['contractAddress'] = contractAddress;\n }", "constructor(nombreObjeto, apellido,altura){\n //Atributos\n this.nombre = nombreObjeto\n this.apellido = apellido\n this.altura = altura\n }", "initExistingObj(objData){\n this.addExistingObj(objData.path, objData.display, objData.type, objData.newLink, true);\n }", "init(data) {\r\n this.object = data.object;\r\n }", "static initialize(obj, fee, memo, signatures) { \n obj['fee'] = fee;\n obj['memo'] = memo;\n obj['signatures'] = signatures;\n }", "static initialize(obj, type, coordinates) { \n obj['type'] = type;\n obj['coordinates'] = coordinates;\n }", "static initialize(obj, type, operation, value) { \n obj['type'] = type;\n obj['operation'] = operation;\n obj['value'] = value;\n }", "function todoOBJ(testo,data){\n \n this.testo = testo;\n this.data = data;\n \n}", "Obj(id_rec, obs, obs_upg, ubic, validado, nombre, concepto, codigo, recibo, importe, fecha) {\n this.id_rec = id_rec;\n this.obs = obs;\n this.obs_upg = obs_upg;\n this.ubic = ubic;\n this.validado = validado;\n this.nombre = nombre;\n this.concepto = concepto;\n this.codigo = codigo;\n this.recibo = recibo;\n this.importe = importe;\n //console.log(convertDateFormat(fecha.substr(0,10)));\n if (fecha !== null) {\n let fTemp = fecha.substr(0, 10).split(\"-\");\n let tam = fTemp.length, i = 0, fFinal = \"\";\n for (i = tam - 1; i >= 0; i--) {\n fFinal = fFinal + \"/\" + fTemp[i];\n }\n this.fecha = fFinal.slice(1, 11);\n }\n else this.fecha = fecha;\n }", "function init() {\n context.save();\n context.translate(bodyParts[PartEnums.TORSO].x - bodyParts[PartEnums.TORSO].width / 2.5, bodyParts[PartEnums.TORSO].y);\n rotationProgress = 0;\n}", "function getObject(){\n\t\tvar formObject = domForm.toObject( 'formAsunto' + aleatorio );\n\t\tif (idOrganoJuris.item != null){\n\t\t\tformObject.idOrganoJuris = idOrganoJuris.item.idOrganoJuris;\n\t\t}\n\t\tif( !formObject.relevante ){\n\t\t\tformObject.relevante = '0';\n\t\t}\n\t\treturn formObject;\n\t}", "static initialize(obj, actionField, emailField, flowIDField) { \n obj['ActionField'] = actionField;\n obj['EmailField'] = emailField;\n obj['FlowIDField'] = flowIDField;\n }", "function init_inpt_formulario_cargar_recorrido() {\n // Inputs del formulario para inicializar\n}", "materializar() {\n\t\t// Se pueden agregar comprobaciones para evitar que haya campos en blanco cuando se guarda.\n\t\tthis.guardarObjetoEnArchivo();\n\t}", "static initialize(obj, annotationLevel, endLine, message, path, startLine) { \n obj['annotation_level'] = annotationLevel;\n obj['end_line'] = endLine;\n obj['message'] = message;\n obj['path'] = path;\n obj['start_line'] = startLine;\n }", "static initialize(obj, id, created, accountId, modified, name, description, version, createdBy) { \n obj['id'] = id;\n obj['created'] = created;\n obj['accountId'] = accountId;\n obj['modified'] = modified;\n obj['name'] = name;\n obj['description'] = description;\n obj['version'] = version;\n obj['createdBy'] = createdBy;\n }", "function INIT (obj) {\n\tMEMORY = toByteArray(obj);\n\tSTAT = 'AOK';\n\tERR = '';\n\tRESET();\n}", "static initialize(obj, id, modelTypeId, title) { \n obj['id'] = id;\n obj['model_type_id'] = modelTypeId;\n obj['title'] = title;\n }", "static initialize(obj, name, type, registrationNumber, registeredAddress, contactName, email, phone) { \n obj['name'] = name;\n obj['type'] = type;\n obj['registrationNumber'] = registrationNumber;\n obj['registeredAddress'] = registeredAddress;\n obj['contactName'] = contactName;\n obj['email'] = email;\n obj['phone'] = phone;\n }", "static initialize(obj, title, image, ingredients, instructions, readyInMinutes, servings, mask, backgroundImage) { \n obj['title'] = title;\n obj['image'] = image;\n obj['ingredients'] = ingredients;\n obj['instructions'] = instructions;\n obj['readyInMinutes'] = readyInMinutes;\n obj['servings'] = servings;\n obj['mask'] = mask;\n obj['backgroundImage'] = backgroundImage;\n }", "static initialize(obj, uuid, dateFrom, dateTo, created, status) { \n obj['uuid'] = uuid;\n obj['date_from'] = dateFrom;\n obj['date_to'] = dateTo;\n obj['created'] = created;\n obj['status'] = status;\n }", "static initialize(obj, firstName, lastName, phoneNumber, cashProvider) { \n obj['first_name'] = firstName;\n obj['last_name'] = lastName;\n obj['phone_number'] = phoneNumber;\n obj['cash_provider'] = cashProvider;\n }", "initFromJson(jsonNode) {\n this.setName(jsonNode.name);\n this.setId(jsonNode.name);\n this.setFullPackageName(jsonNode.packageName);\n if (jsonNode.fields !== undefined) {\n const fields = jsonNode.fields.map((field) => {\n return BallerinaEnvFactory.createObjectField({\n type: field.type,\n name: field.name,\n defaultValue: field.defaultValue,\n packageName: field.packageName\n });\n });\n this.setFields(fields);\n }\n }", "constructor(dato, sig) {\n this.dato = dato;\n this.sig = sig;\n this.peso = null; // solo se utiliza para cuando el nodo pertenece a la \n //lista de adyacencia del vertice\n this.color = null;\n this.nivel = null;\n this.padre = null;\n this.distancia = null;\n }", "static initialize(obj, name, symbol, amount, contractAddress, tokenId, propertyId, transactionType, createdByTransactionId) { \n obj['name'] = name;\n obj['symbol'] = symbol;\n obj['amount'] = amount;\n obj['contractAddress'] = contractAddress;\n obj['tokenId'] = tokenId;\n obj['propertyId'] = propertyId;\n obj['transactionType'] = transactionType;\n obj['createdByTransactionId'] = createdByTransactionId;\n }", "function inicializarCampos() {\r\n document.querySelector('#tipo').value = vehiculos[0].tipo;\r\n document.querySelector('#marca').value = vehiculos[0].marca;\r\n document.querySelector('#modelo').value = vehiculos[0].modelo;\r\n document.querySelector('#patente').value = vehiculos[0].patente;\r\n document.querySelector('#anio').value = vehiculos[0].anio;\r\n document.querySelector('#precio').value = vehiculos[0].precio;\r\n if (document.querySelector('#tipo').value == \"auto\") {\r\n document.querySelector('#capacidadBaul').value = vehiculos[0].capacidadBaul;\r\n }\r\n else if (document.querySelector('#tipo').value == \"camioneta\") {\r\n document.querySelector('#capacidadCarga').value = vehiculos[0].capacidadCarga;\r\n }\r\n}", "static initialize(obj, companyName, companyAddress, companyCity, companyPostalCode, companyCountry, companyOrgNumber, companyVATNumber) { \n obj['companyName'] = companyName;\n obj['companyAddress'] = companyAddress;\n obj['companyCity'] = companyCity;\n obj['companyPostalCode'] = companyPostalCode;\n obj['companyCountry'] = companyCountry;\n obj['companyOrgNumber'] = companyOrgNumber;\n obj['companyVATNumber'] = companyVATNumber;\n }", "static initialize(obj, id, name, updatedOn) { \n obj['id'] = id;\n obj['name'] = name;\n obj['updatedOn'] = updatedOn;\n }", "static initialize(obj, name, templateType, tokenizerType) { \n obj['name'] = name;\n obj['template-type'] = templateType;\n obj['tokenizer-type'] = tokenizerType;\n }", "static initialize(obj, body, id, title) { \n obj['body'] = body;\n obj['id'] = id;\n obj['title'] = title;\n }", "static initialize(obj, activated, companyOwner, login) { \n obj['activated'] = activated;\n obj['companyOwner'] = companyOwner;\n obj['login'] = login;\n }", "static initialize(obj, confirmationTarget, feeRate, unit) { \n obj['confirmationTarget'] = confirmationTarget;\n obj['feeRate'] = feeRate;\n obj['unit'] = unit;\n }", "static initialize(obj, complete) { \n obj['complete'] = complete;\n }", "function ObjetoXML(tipo, etiqueta_id, contenido, lista_atributos, lista_objetos, linea, columna) {\n this.contenido = ''; //contenido de la etiqueta, el texto\n this.tipo = tipo;\n this.setContenido(contenido);\n this.etiqueta_id = etiqueta_id;\n this.linea = (linea != undefined) ? linea : 0;\n this.columna = (columna != undefined) ? columna : 0;\n this.lista_atributos = (lista_atributos != undefined) ? lista_atributos : [];\n this.lista_objetos = (lista_objetos != undefined) ? lista_objetos : [];\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 }", "static initialize(obj, id, name) { \n obj['id'] = id;\n obj['name'] = name;\n }", "static initialize(obj, id, name) { \n obj['id'] = id;\n obj['name'] = name;\n }", "function ObjetoXML(tipo, etiqueta_id, contenido, lista_atributos, lista_objetos, linea, columna) {\r\n this.contenido = ''; //contenido de la etiqueta, el texto\r\n this.tipo = tipo;\r\n this.setContenido(contenido);\r\n this.etiqueta_id = etiqueta_id;\r\n this.linea = (linea != undefined) ? linea : 0;\r\n this.columna = (columna != undefined) ? columna : 0;\r\n this.lista_atributos = (lista_atributos != undefined) ? lista_atributos : [];\r\n this.lista_objetos = (lista_objetos != undefined) ? lista_objetos : [];\r\n }", "static initialize(obj, boxId, spendingProof) { \n obj['boxId'] = boxId;\n obj['spendingProof'] = spendingProof;\n }", "static initialize(obj, version, title, license) { \n obj['version'] = version;\n obj['title'] = title;\n obj['license'] = license;\n }", "static initialize(obj, index, minedInBlockHash, recipients, senders, sequence, status, timestamp, transactionHash, type, fee, offer, receive, value) { \n obj['index'] = index;\n obj['minedInBlockHash'] = minedInBlockHash;\n obj['recipients'] = recipients;\n obj['senders'] = senders;\n obj['sequence'] = sequence;\n obj['status'] = status;\n obj['timestamp'] = timestamp;\n obj['transactionHash'] = transactionHash;\n obj['type'] = type;\n obj['fee'] = fee;\n obj['offer'] = offer;\n obj['receive'] = receive;\n obj['value'] = value;\n }", "static initialize(obj, title, createdBy, isLocked, tagsAsCsv) { \n obj['title'] = title;\n obj['createdBy'] = createdBy;\n obj['isLocked'] = isLocked;\n obj['tagsAsCsv'] = tagsAsCsv;\n }", "static initialize(obj, title, source) { \n obj['title'] = title;\n obj['source'] = source;\n }", "static initialize(obj, token, activated, userId, email) { \n obj['token'] = token;\n obj['activated'] = activated;\n obj['userId'] = userId;\n obj['email'] = email;\n }", "static initialize(obj, name, programId, subLedgerId, value, recipientIntegrationId, transactionUUID) { \n obj['name'] = name;\n obj['programId'] = programId;\n obj['subLedgerId'] = subLedgerId;\n obj['value'] = value;\n obj['recipientIntegrationId'] = recipientIntegrationId;\n obj['transactionUUID'] = transactionUUID;\n }", "static initialize(obj, _date, contentType, transferEncoding, connection, contentEncoding) { \n obj['date'] = _date;\n obj['content-type'] = contentType;\n obj['transfer-encoding'] = transferEncoding;\n obj['connection'] = connection;\n obj['content-encoding'] = contentEncoding;\n }", "static initialize(obj, mode, raw) { \n obj['mode'] = mode;\n obj['raw'] = raw;\n }", "function initTodoObj() {\n return {\n \"message\":\"\",\n \"complete\":false\n };\n }", "static initialize(obj, sequence, blockIdentifier, type) { \n obj['sequence'] = sequence;\n obj['block_identifier'] = blockIdentifier;\n obj['type'] = type;\n }", "function nombreObjeto (par1, par2, parN) {\r\n\tthis.propiedad1 = valorPropiedad1;\r\n\tthis.propiedad2 = valorPropiedad2;\r\n}", "static initialize(obj, id, value) { \n obj['id'] = id;\n obj['value'] = value;\n }", "static initialize(obj, recipient, sender, tokenTypeSpecificData, transactionRequestId) { \n obj['recipient'] = recipient;\n obj['sender'] = sender;\n obj['tokenTypeSpecificData'] = tokenTypeSpecificData;\n obj['transactionRequestId'] = transactionRequestId;\n }", "constructor(elementoEstagio, objetoPassaro) {\n this.elementoEstagio = elementoEstagio;\n this.objetoBird = objetoPassaro;\n\n //Carrega as boundaries\n this.carregaBoundaries();\n }", "function setInitialObj(ipObj) {\n $scope.mainObj = angular.copy(ipObj);\n $scope.selectedElements = [].concat(ipObj.selectedElements);\n $scope.elements = [].concat(ipObj.elements);\n $scope.multi = $scope.mainObj.multi ;\n $scope.search = $scope.mainObj.search ;\n }", "static initialize(obj, operatorAddress, selfBondRewards, valCommission) { \n obj['operator_address'] = operatorAddress;\n obj['self_bond_rewards'] = selfBondRewards;\n obj['val_commission'] = valCommission;\n }", "constructor(nombre,apellido){\n this._nombre=nombre;\n this._apellido=apellido;\n Persona.contadorObjetosPersona++;\n }", "static initialize(obj, assignee, authorAssociation, closedAt, comments, commentsUrl, createdAt, eventsUrl, htmlUrl, id, labels, labelsUrl, locked, milestone, nodeId, _number, repositoryUrl, state, title, updatedAt, url, user) { \n obj['assignee'] = assignee;\n obj['author_association'] = authorAssociation;\n obj['closed_at'] = closedAt;\n obj['comments'] = comments;\n obj['comments_url'] = commentsUrl;\n obj['created_at'] = createdAt;\n obj['events_url'] = eventsUrl;\n obj['html_url'] = htmlUrl;\n obj['id'] = id;\n obj['labels'] = labels;\n obj['labels_url'] = labelsUrl;\n obj['locked'] = locked;\n obj['milestone'] = milestone;\n obj['node_id'] = nodeId;\n obj['number'] = _number;\n obj['repository_url'] = repositoryUrl;\n obj['state'] = state;\n obj['title'] = title;\n obj['updated_at'] = updatedAt;\n obj['url'] = url;\n obj['user'] = user;\n }", "static initialize(obj, file, thumbnail, title, description, subjectId) { \n obj['file'] = file;\n obj['thumbnail'] = thumbnail;\n obj['title'] = title;\n obj['description'] = description;\n obj['subject_id'] = subjectId;\n }", "function setPropertiesToObject() {\n let name = document.getElementById('name')\n let width = document.getElementById('width')\n let height = document.getElementById('height')\n let stroke = document.getElementById('stroke')\n let fill = document.getElementById('fill')\n let transform = document.getElementById('transform')\n let rotate = document.getElementById('rotate')\n let scale = document.getElementById('scale')\n\n if (objectSelected > -1) {\n if (objects[objectSelected].type === 'box') {\n objects[objectSelected].name = name.value\n objects[objectSelected].width = parseInt(width.value)\n objects[objectSelected].height = parseInt(height.value)\n objects[objectSelected].stroke = stroke.value\n objects[objectSelected].fill = fill.value\n objects[objectSelected].angleRotation = parseInt(rotate.value)\n Math.setTranslate(objects[objectSelected], parseFloat(transform.value.split(',')[0]), parseFloat(transform.value.split(',')[1]))\n Math.setRotate(objects[objectSelected], rotate.value)\n Math.setScale(objects[objectSelected], parseFloat(scale.value.split(',')[0]), parseFloat(scale.value.split(',')[1]))\n } else if (objects[objectSelected].type === 'circle') {\n objects[objectSelected].name = name.value\n objects[objectSelected].stroke = stroke.value\n objects[objectSelected].fill = fill.value\n objects[objectSelected].angleRotation = parseInt(rotate.value)\n Math.setTranslate(objects[objectSelected], parseFloat(transform.value.split(',')[0]), parseFloat(transform.value.split(',')[1]))\n Math.setRotate(objects[objectSelected], rotate.value)\n Math.setScale(objects[objectSelected], parseFloat(scale.value.split(',')[0]), parseFloat(scale.value.split(',')[1]))\n }\n }\n init()\n drawObjects()\n }", "static initialize(obj, firstName, lastName, iban) { \n obj['first_name'] = firstName;\n obj['last_name'] = lastName;\n obj['iban'] = iban;\n }", "static initialize(obj, editions) { \n obj['editions'] = editions;\n }", "static initialize(obj, changeStatus, committedAt, url, user, version) { \n obj['change_status'] = changeStatus;\n obj['committed_at'] = committedAt;\n obj['url'] = url;\n obj['user'] = user;\n obj['version'] = version;\n }", "complementoAnnyAtributte(objeto) {\n for (let a of objeto.hijos) {\n this.codigoTemporal += \"P =\" + a.posicion + \";\\n\";\n this.codigoTemporal += \"imprimirAtributoAny();\\n\";\n for (let b of a.atributos) {\n // salidaXPATH.getInstance().push(b.dameNombre()+\"=\"+b.dameValor());\n }\n this.complementoAnnyAtributte(a);\n }\n }", "function init() {\n self.phonecontactForm = {\n uploadedFile: null,\n isImporting: false,\n hasBeenImported: false,\n };\n }", "static initialize(obj, token) { \n obj['token'] = token;\n }", "constructor() {\n this.stage = null//stage c'est l'écran de jeu en gros\n this.objects = [] // je fais une liste vide dans laquelle je vais metre tous les objets du jeu\n this.ids = 0\n }", "static initialize(obj, amount, convertedAmount, exchangeRateUnit, operationId, recipient, sender, symbol) { \n obj['amount'] = amount;\n obj['convertedAmount'] = convertedAmount;\n obj['exchangeRateUnit'] = exchangeRateUnit;\n obj['operationId'] = operationId;\n obj['recipient'] = recipient;\n obj['sender'] = sender;\n obj['symbol'] = symbol;\n }", "initCreateObj(type, newIdx, newLink, init=false, parentField=null){\n // check to see if we have an ambiguous linkTo type.\n // this means there could be multiple types of linked objects for a\n // given type. let the user choose one.\n if (type in itemTypeHierarchy && !init){ // ambiguous linkTo type found\n this.setState({\n 'ambiguousIdx': newIdx,\n 'ambiguousType': type,\n 'ambiguousSelected': null,\n 'creatingLink': newLink\n });\n } else {\n this.initCreateAlias(type, newIdx, newLink, parentField);\n }\n }", "static initialize(obj, file) {\n obj['file'] = file;\n }", "constructor (nombre, apellido,sueldo, cargo){ //solicitio los parametros incluidos los que vincule\n super(nombre,apellido) // con super selecciono los parametros que pide la clase vinculada\n this.sueldo= sueldo;\n this.cargo=cargo;\n }", "constructor( nodo, r, g, b ) {\n // verticeIzq, verticeSuperior, verticeInferior, verticeDer\n\n //Verificando si el nodo está muy a la izquierda, en ese caso orientar a la derecha.\n\n if(nodo.x <= nodo.r*2){\n //La distancia por la izquierda es pequeña, orientar a la derecha.\n }else{\n this.verticeDerX=nodo.x - (nodo.r + nodo.r*.2 ) ;\n this.verticeDerY=nodo.y;\n\n this.verticeIzqX=nodo.x - (nodo.r *3 ) ;\n this.verticeIzqY=nodo.y;\n\n \n this.verticeSuperiorX=this.verticeDerX- (nodo.r*.4);\n this.verticeSuperiorY=nodo.y - (nodo.r*.3) ;\n\n this.verticeInferiorX=this.verticeSuperiorX;\n this.verticeInferiorY= nodo.y + (nodo.r*.3);\n\n this.r=r;\n this.g=g;\n this.b=b;\n }\n\n \n }", "async init (scene, data) {\n this.scene = scene\n this._engine = scene.getEngine()\n this.canvas = this._engine.getRenderingCanvas() \n this.objects = {}\n \n this.label = this.createLabel()\n console.log('dataaaaa//////// ', data)\n if (!data.electData) {\n this.electData = {\n ComponentParts: [], // name of parts\n ComponentToParts: [], // conect comp pins with part pins\n PartToPart: [], // conect part pins, nets\n PartToPartNames: [], // name of nets\n need: {}, // need pins settings\n pass: {}, // pass pins settings\n }\n }\n else {\n for (let key in data.electData) {\n this.electData[key] = data.electData[key]\n }\n }\n\n if (!data.assets) {\n data.compSize = [20, 20] // keep comp size\n data.nets = this.nets // keep nets details\n data.routing_data = [] // keep data of routes - 3d objects\n data.assets = [] // objects loaded\n }\n\n this.data.nets = this.nets = data.nets\n this.data.routing_data = data.routing_data\n this.data.assets = data.assets\n this.data.compSize = data.compSize\n \n this.scene.actionManager = new BABYLON.ActionManager(this.scene);\n this.scene.actionManager.registerAction(\n new BABYLON.ExecuteCodeAction(BABYLON.ActionManager.OnEveryFrameTrigger, (evt) => {\n if (this.curentOpt !== 5) {\n return\n } \n\n if (this.lastPosition !== null) {\n const pos = this.getGroundPosition(evt)\n this.draw3dlines(pos, false)\n }\n }))\n\n this.addBoard()\n await this.importAssets(this.data.assets)\n\n this._engine.resize()\n }", "static initialize(obj, latitude, longitude) { \n obj['latitude'] = latitude;\n obj['longitude'] = longitude;\n }", "static initialize(obj, id, created, code, poolId) { \n obj['id'] = id;\n obj['created'] = created;\n obj['code'] = code;\n obj['poolId'] = poolId;\n }", "static initialize(obj, points) { \n obj['points'] = points;\n }", "constructor(texto=''){\n this._texto = texto;\n }", "static initialize(obj, hexBytes, curveType) { \n obj['hex_bytes'] = hexBytes;\n obj['curve_type'] = curveType;\n }", "init()\n\t{\n\t\tinitVerticesNormalsTexturesIndexes();\n\n //Converts the values to buffers\n\t\tthis.vertexBuffer = getVertexBufferWithVertices(this.vertices);\n\t\tthis.colorBuffer = getVertexBufferWithVertices(this.colors);\n\t\tthis.indexBuffer = getIndexBufferWithIndices(this.indices);\n\n\t\t//Defines the position matrix of the object\n\t\tmat4.identity(this.mvMatrix);\n\t\tmat4.translate(this.mvMatrix, this.mvMatrix, vec3.fromValues(this.x, this.y, 0.0));\n\t}", "function init() {\n let meiFileURL = containerNode.attr('data-mei');\n createVerovioObject(meiFileURL); // TODO: this actually loads all the views, etc. Very confusing!\n }", "function _init (parametri) {\n\n for (let parametro in parametri) {\n if (parametri.hasOwnProperty(parametro)) {\n keystone.set(parametro, parametri[parametro]);\n }\n }\n\n}", "function crearTermostatoTipo0( id_term)\n{\n\tvar termostato1= new Object();\n\t\n\t\n\ttermostato1.parametros={temperatura:35.5, modo:0,temperaturaAmbiente:30.5,ValvulaAbierta:0};// datos recibidor del termostato\n\ttermostato1.configuracion={temperatura:35.5, modo:0, Caption:\"\"};// parametros que se envian al termostato \n\ttermostato1.configuracion.Caption=\"Termostato \"+id_term;\n\ttermostato1.iluminadoModo=false;\n\ttermostato1.Tipo=0;// tipo de objeto en este caso termostato sistena\n\ttermostato1.Caption=\"Termostato \"+id_term;\n\ttermostato1.visible=1;// se mira si es visible o no \n\ttermostato1.EstaMinimizado=1; // 0 maximizado, 1 minimizado\n\t//termostato1.temperatura=35.5;\n\t//termostato1.temperaturaAmbiente=30.5;\n\ttermostato1.estado=1; // donde 1 es on y 0 off \n\ttermostato1.actualizar=0; // donde 1 es que hay que enviar datos al servicio pass , 0 no hay datos actualizador\n\ttermostato1.dat=0;// ????\n\t//termostato.HayDatosCambiados=HayDatosCambiados_Term;\n\n\ttabla_valores.push(termostato1);\n\n\tvar t = document.querySelector('#termostato_tipo_1');\n\t\n\t\n\tvar clone = document.importNode(t.content, true);\n\t\n\tclone.getElementById(\"termostato\").id=\"termostato\"+id_term;\n\tclone.getElementById(\"marco_superior\").id=\"marco_superior\"+id_term;\n\tclone.getElementById(\"icono_despliegue\").id=\"icono_despliegue\"+id_term;\n\tclone.getElementById(\"caption_temp\").id=\"caption_temp\"+id_term;\n\tclone.getElementById(\"tempAmbiente\").id=\"tempAmbiente\"+id_term;\n\tclone.getElementById(\"icono_OnOffSup\").id=\"icono_OnOffSup\"+id_term;\n\tclone.getElementById(\"marco_inf\").id=\"marco_inf\"+id_term;\n\tclone.getElementById(\"zona_iconos\").id=\"zona_iconos\"+id_term;\n\tclone.getElementById(\"btn_mas\").id=\"btn_mas\"+id_term;\n\tclone.getElementById(\"icono_func_mas\").id=\"icono_func_mas\"+id_term;\n\tclone.getElementById(\"temp_grande\").id=\"temp_grande\"+id_term;\n\tclone.getElementById(\"btn_menos\").id=\"btn_menos\"+id_term;\n\tclone.getElementById(\"icono_func_menos\").id=\"icono_func_menos\"+id_term;\n\tclone.getElementById(\"icono_onoff\").id=\"icono_onoff\"+id_term;\n\tclone.getElementById(\"btn_onoff\").id=\"btn_onoff\"+id_term;\n\tclone.getElementById(\"marco_temp\").id=\"marco_temp\"+id_term;\n\tclone.getElementById(\"btn_conf\").id=\"btn_conf\"+id_term;\n\tclone.getElementById(\"temp_peque\").id=\"temp_peque\"+id_term;\n\tclone.getElementById(\"term_modo\").id=\"term_modo\"+id_term;\n\t\n\t\n\t$(\"#contenedor\").append(clone);\n\tdocument.getElementById(\"icono_despliegue\"+id_term).setAttribute( \"IdTerm\",id_term.toString());\n\tdocument.getElementById(\"icono_OnOffSup\"+id_term).setAttribute(\"IdTerm\",id_term.toString());\n\tdocument.getElementById(\"btn_mas\"+id_term).setAttribute(\"IdTerm\",id_term.toString());\n\tdocument.getElementById(\"btn_menos\"+id_term).setAttribute(\"IdTerm\",id_term.toString());\n\tdocument.getElementById(\"btn_onoff\"+id_term).setAttribute(\"IdTerm\",id_term.toString());\n\tdocument.getElementById(\"btn_conf\"+id_term).setAttribute(\"IdTerm\",id_term.toString());\n\t\n}", "init(){\n\n this.jsonEl = this.toJSONString();\n this.onSubmit();\n\n }", "constructor(nome, idade){\n this.nome = nome; //this. esta se referindo ao proprio objeto e nao a uma variavel em especifico\n this.idade = idade;\n }", "static initialize(obj, lat, _long) { \n obj['lat'] = lat;\n obj['long'] = _long;\n }", "static initialize(obj, name, ftpServer, ftpPort, ftpDirectory) { \n obj['name'] = name;\n obj['ftpServer'] = ftpServer;\n obj['ftpPort'] = ftpPort;\n obj['ftpDirectory'] = ftpDirectory;\n }" ]
[ "0.6921524", "0.62317103", "0.61054164", "0.6092609", "0.59790766", "0.59395015", "0.5874257", "0.5872613", "0.5869123", "0.5849715", "0.58419317", "0.5835324", "0.5742354", "0.5719568", "0.5716567", "0.57033557", "0.5694918", "0.56939", "0.56908244", "0.5676737", "0.56694186", "0.56661487", "0.56469864", "0.5640808", "0.564051", "0.56038857", "0.5602828", "0.55986047", "0.557688", "0.55468714", "0.554572", "0.5537924", "0.5530287", "0.55296266", "0.5529292", "0.55185646", "0.55084413", "0.5491276", "0.5478751", "0.5472164", "0.5469392", "0.5464451", "0.54572934", "0.54485244", "0.5446425", "0.5445782", "0.5437435", "0.5431001", "0.5407044", "0.5397199", "0.5396812", "0.5396812", "0.53895515", "0.5386272", "0.5385872", "0.5377355", "0.5363362", "0.53633076", "0.5358938", "0.5341472", "0.5337822", "0.53363746", "0.5330096", "0.53206", "0.5313548", "0.5309593", "0.53004915", "0.5288414", "0.52857727", "0.52706367", "0.52643967", "0.52591205", "0.52585244", "0.5255958", "0.52549475", "0.5252748", "0.52437043", "0.5238339", "0.5237915", "0.5233028", "0.5232556", "0.52317053", "0.52243155", "0.52196884", "0.5215062", "0.5213601", "0.5212322", "0.52115923", "0.52101785", "0.5209504", "0.52093625", "0.5206235", "0.51919967", "0.5189889", "0.5187211", "0.51871127", "0.5186699", "0.51865333", "0.51855946", "0.51831096" ]
0.52536845
75
OBJETO: cmbNombreDelCampo METODO: INIT
function cmbNombreDelCampo__inicializar(){ /* $("#cmbNombreDelCampo").html(""); */ /* $("#cmbNombreDelCampo").selectpicker("refresh"); */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mobjetos__inicializar(){\n\t/* $(\"#txtNombreDelCampo\").val(\"\"); */\n\t/* cmbNombreDelCampo__inicializar(); */\n\t/* $(\"#txtNombreDelCampo\").focus(); */\n}", "function cargar_datos_combo(combo, txt_arr_texto, txt_arr_valor){\n\telem_cmb_texto\t= string_to_array(\";\" , txt_arr_texto);\n\telem_cmb_valor\t= string_to_array(\";\" , txt_arr_valor);\n\telim_info_combo(combo);// Limpia los datos del combo\n\tnum_elementos\t= elem_cmb_valor.length;\n\tcombo.options[0]\t= new Option ('Seleccione una Opción', '-1');\n\tfor(i=1;i<=num_elementos; i++)\n\t\tcombo.options[i]\t= new Option (elem_cmb_texto[i-1], elem_cmb_valor[i-1]);\n}", "function posicionarCombos() { \n\t\t//combo tipoSolicitud\n\t\tvar iSeleccionadoTipoSol = new Array(); \n\t\tiSeleccionadoTipoSol[0] = get('frmFormulario.hOidTipoSolicitud'); \n\t\tset('frmFormulario.cbTipoSolicitud',iSeleccionadoTipoSol); \n\n\t\t//combo periodos\n\t\tvar iSeleccionadoPeriodo = new Array(); \n\t\tiSeleccionadoPeriodo[0] = get('frmFormulario.hPeriodo'); \n\t\tset('frmFormulario.cbPeriodo',iSeleccionadoPeriodo); \n\t}", "function cargaComboServ(campo, valores){\n\n\n var opciones = campo.options;\n\n\n if(opciones!=undefined ){\n\n\n $.each(valores, function(ind, val){\n\n\n opciones[opciones.length]=new Option(ind,val);\n\n });\n\n\n }\n\n\n}", "function cargaCombosClientes() {\n\tvar idioma = get(FORMULARIO+'.idioma').toString();\n\tvar pais = get(FORMULARIO+'.pais').toString();\n\t\n\tvar tipoCliente = get(FORMULARIO+'.hTipoCliente').toString();\n\tvar subtipoCliente = get(FORMULARIO+'.hSubtipoCliente').toString();\n\tvar tipoClasificacion = get(FORMULARIO+'.hTipoClasificacion').toString();\n\tvar clasificacion = get(FORMULARIO+'.hClasificacion').toString();\n\t\n\t// Se carga el combo de subtipos de cliente\n\tif (tipoCliente != '') {\n\t\tvar parametros = new Array(5);\n \tparametros[0] = FORMULARIO+'.ValorSubtipoCliente'; \n \tparametros[1] = \"CMNObtieneSubtiposCliente\";\n \tparametros[2] = DTODruidaBusqueda;\n \tparametros[3] = \"[['oidTipoCliente', \" + tipoCliente + \"], ['oidIdioma',\" + idioma + \"], ['oidPais',\" + pais + \"]]\";\n \tparametros[4] = \"seleccionaSubtipoCliente(datos)\";\n \tparametrosRecargaCombos[parametrosRecargaCombos.length] = parametros;\n\t\t/*gestionaCombo(FORMULARIO+'.ValorSubtipoCliente', 'CMNObtieneSubtiposCliente', DTODruidaBusqueda,\n\t\t\t[['oidTipoCliente', tipoCliente], ['oidIdioma',idioma], ['oidPais',pais]],\n\t\t\t'seleccionaSubtipoCliente(datos)',subtipoCliente); */\n\t}\n\t\n\t// Se carga el combo de tipos de clasificación\n\tif (subtipoCliente != '') {\n\t\tvar parametros = new Array(5);\n \tparametros[0] = FORMULARIO+'.ValorTipoClasificacion'; \n \tparametros[1] = \"CMNObtieneTiposClasificacion\";\n \tparametros[2] = DTODruidaBusqueda;\n \tparametros[3] = \"[['oidSubtipoCliente', \" + subtipoCliente + \"], ['oidIdioma',\" + idioma + \"], ['oidPais',\" + pais + \"]]\";\n \tparametros[4] = \"seleccionaTipoClasificacion(datos)\";\n \tparametrosRecargaCombos[parametrosRecargaCombos.length] = parametros;\n\t\t/*gestionaCombo(FORMULARIO+'.ValorTipoClasificacion', 'CMNObtieneTiposClasificacion', DTODruidaBusqueda,\n\t\t\t[['oidSubtipoCliente', subtipoCliente], ['oidIdioma',idioma], ['oidPais',pais]],\n\t\t\t'seleccionaTipoClasificacion(datos)',tipoClasificacion);*/\n\t}\n\t\n\t// Se recarga el combo de clasificaciones\n\tif (tipoClasificacion != '' && subtipoCliente != '') {\n\t\tvar parametros = new Array(5);\n \tparametros[0] = FORMULARIO+'.ValorClasificacion'; \n \tparametros[1] = \"CMNObtieneClasificaciones\";\n \tparametros[2] = DTODruidaBusqueda;\n \tparametros[3] = \"[['oidTipoClasificacion', \" + tipoClasificacion + \"], ['oidSubtipoCliente', \" + subtipoCliente + \"], ['oidIdioma',\" + idioma + \"], ['oidPais',\" + pais + \"]]\";\n \tparametros[4] = \"seleccionaClasificacion(datos)\";\n \tparametrosRecargaCombos[parametrosRecargaCombos.length] = parametros;\n\t\t/*recargaCombo(FORMULARIO+'.ValorClasificacion', 'CMNObtieneClasificaciones', DTODruidaBusqueda, \n\t\t\t[['oidTipoClasificacion', tipoClasificacion], ['oidSubtipoCliente', subtipoCliente], \n\t\t\t['oidIdioma',idioma], ['oidPais',pais]],'seleccionaClasificacion(datos)',clasificacion);*/\n\t}\n}", "function CargarComboDefectoUtil(objLista, rowDefault) {\n objLista.empty();\n if (rowDefault !== '' || rowDefault === undefined) {\n objLista.append($('<option/>', {\n value : \"\",\n text : rowDefault\n }));\n }\n}", "function limpiar_campos(id_combo){\n\tif($('#'+id_combo).length >0){ // si existe si lo borra\n\t\t$('#'+id_combo).val('');\n\t\t$this = $('#'+id_combo);\n\t}\n}", "function cargaCombosMarcaCanal() {\n\tvar idioma = get(FORMULARIO+'.idioma').toString();\n\tvar pais = get(FORMULARIO+'.pais').toString();\n\n\tvar marca = get(FORMULARIO+'.hMarca').toString();\n\tvar canal = get(FORMULARIO+'.hCanal').toString();\n\tvar tipoCurso = get(FORMULARIO+'.hTipoCurso').toString();\n\tvar accesoInformacion = get(FORMULARIO+'.hAccesoInformacion').toString();\n\tvar statusCursos = get(FORMULARIO+'.hStatusCursosExigidos').toString();\n\tvar periodoInicio = get(FORMULARIO+'.hPeriodoInicio').toString();\n\tvar periodoFin = get(FORMULARIO+'.hPeriodoFin').toString();\n\tvar periodoInicioV = get(FORMULARIO+'.hPeriodoInicioV').toString();\n\tvar periodoFinV = get(FORMULARIO+'.hPeriodoFinV').toString();\n\tvar periodoIngreso = get(FORMULARIO+'.hPeriodoIngreso').toString();\n\tvar subgerenciaVentas = get(FORMULARIO+'.hSubgerenciaVentas').toString();\n\t\n\t// Se carga el combo de tipo de curso\n\tif (marca != '') {\n\t\tvar parametros = new Array(5);\n \tparametros[0] = FORMULARIO+'.ValorTipoCurso'; \n \tparametros[1] = \"CMNObtieneTiposCurso\";\n \tparametros[2] = DTODruidaBusqueda;\n \tparametros[3] = \"[['oidMarca', \" + marca + \"], ['oidIdioma',\" + idioma + \"], ['oidPais',\" + pais + \"]]\";\n \tparametros[4] = \"seleccionaTipoCurso(datos)\";\n \tparametrosRecargaCombos[parametrosRecargaCombos.length] = parametros;\n\t\t/*gestionaCombo(FORMULARIO+'.ValorTipoCurso', 'CMNObtieneTiposCurso', DTODruidaBusqueda, \n\t\t\t[['oidIdioma',idioma], ['oidPais',pais], ['oidMarca', marca]], \n\t\t\t'seleccionaTipoCurso(datos)', tipoCurso);*/\n\t}\n\t\n\t// Se carga el combo de acceso informacion\n\tif (canal != '') {\n\t\tvar parametros = new Array(5);\n \tparametros[0] = FORMULARIO+'.ValorAccesoInformacion'; \n \tparametros[1] = \"CMNObtieneAccesos\";\n \tparametros[2] = DTODruidaBusqueda;\n \tparametros[3] = \"[['oidCanal', \" + canal + \"], ['oidIdioma',\" + idioma + \"], ['oidPais',\" + pais + \"]]\";\n \tparametros[4] = \"seleccionaAccesoInformacion(datos)\";\n \tparametrosRecargaCombos[parametrosRecargaCombos.length] = parametros;\n\t\t/*gestionaCombo(FORMULARIO+'.ValorAccesoInformacion', 'CMNObtieneAccesos', DTODruidaBusqueda, \n\t\t\t[['oidCanal', canal], ['oidIdioma',idioma], ['oidPais',pais]], \n\t\t\t'seleccionaAccesoInformacion(datos)', accesoInformacion);*/\n\t}\n\t\n\t// Se cargan los combos de status de cursos, periodos (los 5) y subgerencias\n\tif (marca != '' && canal !='') {\n\t\tvar casoUso = get(FORMULARIO+'.casoUso').toString();\n\t\tif (casoUso == 'modificar' || statusCursos != '') {\n\t\t\tvar parametros = new Array(5);\n \t\tparametros[0] = FORMULARIO+'.ValorStatusCursosExigidos'; \n \t\t//SCS, se cambia por: CMNObtieneTiposCurso parametros[1] = \"CMNObtieneCursos\";\n\t\t\tparametros[1] = \"CMNObtieneTiposCurso\";\n \t\tparametros[2] = DTODruidaBusqueda;\n \t\tparametros[3] = \"[['oidMarca', \" + marca + \"], ['oidCanal', \" + canal + \"], ['oidIdioma',\" + idioma + \"], ['oidPais',\" + pais + \"]]\";\n \t\tparametros[4] = \"seleccionaStatusCursos(datos)\";\n \t\tparametrosRecargaCombos[parametrosRecargaCombos.length] = parametros;\n\t\t\t/*gestionaCombo(FORMULARIO+'.ValorStatusCursos', 'CMNObtieneCursos', DTODruidaBusqueda,\n\t\t\t\t[['oidMarca', marca],['oidCanal', canal], ['oidIdioma',idioma], ['oidPais',pais]],\n\t\t\t\t'seleccionaStatusCursos(datos)',statusCursos);*/\n\t\t}\n\t\t\n\t\tvar parametros = new Array(5);\n \tparametros[0] = FORMULARIO+'.ValorPeriodoInicio'; \n \tparametros[1] = \"CMNObtienePeriodos\";\n \tparametros[2] = DTODruidaBusqueda;\n \tparametros[3] = \"[['oidMarca', \" + marca + \"], ['oidCanal', \" + canal + \"], ['oidIdioma',\" + idioma + \"], ['oidPais',\" + pais + \"]]\";\n \tparametros[4] = \"seleccionaPeriodoInicio(datos)\";\n \tparametrosRecargaCombos[parametrosRecargaCombos.length] = parametros;\n\t\t/*gestionaCombo(FORMULARIO+'.ValorPeriodoInicio', 'CMNObtienePeriodos', DTODruidaBusqueda, \n\t\t\t[['oidMarca', marca],['oidCanal', canal], ['oidIdioma',idioma], ['oidPais',pais]],\n\t\t\t'seleccionaPeriodoInicio(datos)',periodoInicio); */\n\n\t\tparametros = new Array(5);\n \tparametros[0] = FORMULARIO+'.ValorPeriodoFin'; \n \tparametros[1] = \"CMNObtienePeriodos\";\n \tparametros[2] = DTODruidaBusqueda;\n \tparametros[3] = \"[['oidMarca', \" + marca + \"], ['oidCanal', \" + canal + \"], ['oidIdioma',\" + idioma + \"], ['oidPais',\" + pais + \"]]\";\n \tparametros[4] = \"seleccionaPeriodoFin(datos)\";\n \tparametrosRecargaCombos[parametrosRecargaCombos.length] = parametros;\n\t\t/*gestionaCombo(FORMULARIO+'.ValorPeriodoFin', 'CMNObtienePeriodos', DTODruidaBusqueda, \n\t\t\t[['oidMarca', marca],['oidCanal', canal], ['oidIdioma',idioma], ['oidPais',pais]],\n\t\t\t'seleccionaPeriodoFin(datos)',periodoFin);*/\n\t\t\n\t\tparametros = new Array(5);\n \tparametros[0] = FORMULARIO+'.ValorPeriodoInicioV'; \n \tparametros[1] = \"CMNObtienePeriodos\";\n \tparametros[2] = DTODruidaBusqueda;\n \tparametros[3] = \"[['oidMarca', \" + marca + \"], ['oidCanal', \" + canal + \"], ['oidIdioma',\" + idioma + \"], ['oidPais',\" + pais + \"]]\";\n \tparametros[4] = \"seleccionaPeriodoInicioV(datos)\";\n \tparametrosRecargaCombos[parametrosRecargaCombos.length] = parametros;\n\t\t/*gestionaCombo(FORMULARIO+'.ValorPeriodoInicioV', 'CMNObtienePeriodos', DTODruidaBusqueda,\n\t\t\t[['oidMarca', marca],['oidCanal', canal], ['oidIdioma',idioma], ['oidPais',pais]],\n\t\t\t'seleccionaPeriodoInicioV(datos)',periodoInicioV);*/\n\t\t\n\t\tparametros = new Array(5);\n \tparametros[0] = FORMULARIO+'.ValorPeriodoFinV'; \n \tparametros[1] = \"CMNObtienePeriodos\";\n \tparametros[2] = DTODruidaBusqueda;\n \tparametros[3] = \"[['oidMarca', \" + marca + \"], ['oidCanal', \" + canal + \"], ['oidIdioma',\" + idioma + \"], ['oidPais',\" + pais + \"]]\";\n \tparametros[4] = \"seleccionaPeriodoFinV(datos)\";\n \tparametrosRecargaCombos[parametrosRecargaCombos.length] = parametros;\n\t\t/*gestionaCombo(FORMULARIO+'.ValorPeriodoFinV', 'CMNObtienePeriodos', DTODruidaBusqueda, \n\t\t\t[['oidMarca', marca],['oidCanal', canal], ['oidIdioma',idioma], ['oidPais',pais]],\n\t\t\t'seleccionaPeriodoFinV(datos)',periodoFinV);*/\n\t\n\t\tparametros = new Array(5);\n \tparametros[0] = FORMULARIO+'.ValorPeriodoIngreso'; \n \tparametros[1] = \"CMNObtienePeriodos\";\n \tparametros[2] = DTODruidaBusqueda;\n \tparametros[3] = \"[['oidMarca', \" + marca + \"], ['oidCanal', \" + canal + \"], ['oidIdioma',\" + idioma + \"], ['oidPais',\" + pais + \"]]\";\n \tparametros[4] = \"seleccionaPeriodoIngreso(datos)\";\n \tparametrosRecargaCombos[parametrosRecargaCombos.length] = parametros;\n\t\t/*gestionaCombo(FORMULARIO+'.ValorPeriodoIngreso', 'CMNObtienePeriodos', DTODruidaBusqueda,\n\t\t\t[['oidMarca', marca],['oidCanal', canal], ['oidIdioma',idioma], ['oidPais',pais]],\n\t\t\t'seleccionaPeriodoIngreso(datos)',periodoIngreso); */\n\t\n\t\tparametros = new Array(5);\n \tparametros[0] = FORMULARIO+'.ValorSubgerenciaVentas'; \n \tparametros[1] = \"CMNObtieneSubgerenciasVentas\";\n \tparametros[2] = DTODruidaBusqueda;\n \tparametros[3] = \"[['oidMarca', \" + marca + \"], ['oidCanal', \" + canal + \"], ['oidIdioma',\" + idioma + \"], ['oidPais',\" + pais + \"]]\";\n \tparametros[4] = \"seleccionaSubgerenciaVentas(datos)\";\n \tparametrosRecargaCombos[parametrosRecargaCombos.length] = parametros;\n\t\t/*gestionaCombo(FORMULARIO+'.ValorSubgerenciaVentas', 'CMNObtieneSubgerenciasVentas', DTODruidaBusqueda,\n\t\t\t[['oidMarca', marca],['oidCanal', canal], ['oidIdioma',idioma], ['oidPais',pais]],\n\t\t\t'seleccionaSubgerenciaVentas(datos)',subgerenciaVentas);*/\n\t}\n}", "function elim_info_combo(cmb1)\n{\n\tvar k = 0;\t//para recorrer el vector cod_elim\n\t//<<--------- envia registros seleccionados al cuadro2 -------->>\\\\\t\n\tfor(i=cmb1.options.length-1; i>=0; i--){\n\t\tif(navigator.appName == \"Netscape\") \tcmb1.options[i] = null;\t\t\n\t\telse \t\t\t\t\t\t\t\t\tcmb1.remove(i);\n\t}\n\tcmb1.selectedIndex = 0;\n}", "function cargarCamposPorAmbito(codAmbito) {\n try {\n\n var js_args = \"cargarCamposPorAmbito@#@\";\n js_args += (codAmbito == \"\") ? $I(\"cboAmbito\").value : codAmbito + \"@#@\";\n\n //alert(js_args);\n //mostrarProcesando();\n RealizarCallBack(js_args, \"\"); //con argumentos\n } catch (e) {\n mostrarErrorAplicacion(\"Error al cargar la tabla\", e.message);\n }\n}", "function baja_elem_combo(cmb)\n{\n\tmaximo_nivel = cmb.options.length\n\tseleccionado = cmb.selectedIndex; //almacena el numero de registro seleccionado \n\tif(seleccionado == maximo_nivel-1){\n\t\talert(\"el registro seleccionado no puede bajar mas\");\n\t}\t\n\telse{\n\t\tacum_cod_seleccionado \t\t\t\t= cmb.value;\t\t//almacena el valor del registro seleccionado\n\t\tacum_txt_seleccionado \t\t\t\t= cmb.options[seleccionado].text;//almacena el texto del registro seleccionado\n\t\tcmb.options[seleccionado].text \t\t= cmb.options[seleccionado+1].text;\n\t\tcmb.options[seleccionado].value \t= cmb.options[seleccionado+1].value;\n\t\tcmb.options[seleccionado+1].text \t= acum_txt_seleccionado;\n\t\tcmb.options[seleccionado+1].value \t= acum_cod_seleccionado;\n\t\tcmb.selectedIndex = seleccionado+1\n\t}\n}", "function Programador_cargaCmb(empresasStr, categoriasStr)\n{\n\n\tvar sel;\n\tempresas= empresasStr.split('/');\n categorias= categoriasStr.split('/');\n\t\n\tsel = document.frmFilter.Tipo[document.frmFilter.Tipo.selectedIndex].value;\n\t\n\tif (sel == \"empresa\"){\n\t\tdocument.frmFilter.cmb.length = empresas.length;\n\t\tfor (i=0;i<empresas.length;i++){\n\t\t\tdocument.frmFilter.cmb.options[i].value = empresas[i];\n\t\t\tdocument.frmFilter.cmb.options[i].text = empresas[i];\t\n\t\t}\t\n\t}\n\tif (sel == \"categoria\"){\n\t\tdocument.frmFilter.cmb.length = categorias.length;\n\t\tfor (i=0;i<categorias.length;i++){\n\t\t\tdocument.frmFilter.cmb.options[i].value = categorias[i];\n\t\t\tdocument.frmFilter.cmb.options[i].text = categorias[i];\t\t\t\n\t\t}\n\t}\n\tif (sel == \"vacio\"){\n\t\tdocument.frmFilter.cmb.options.length = 0;\n\t}\n}", "function setValorCombo (){\n $(\"#comboSemana\").val(semanaActual); //CARGA SEMANA\n getSucDetalle(genSucActual); //CARGA GENERAL/DETALLE\n}", "function geraComboUnidadesCurriculares(aluno)\r\n{\r\n\tvar combo;\r\n\tvar n_aluno;\r\n\tvar uc;\r\n\tvar className;\r\n\t\r\n\t\r\n\t// se o array ainda não foi preenchido\r\n\tif (unidadesCurriculares.length <= 0)\r\n\t{\r\n\t\t// carrega unidades curriculares do ficheiro XML\r\n\t\tvar alunos = global_xmlUnidadesCurriculares.getElementsByTagName(\"STUDENT\");\r\n\t\t\r\n\t\t// percorre os alunos até encontrar o atual e depois preenche o array com\r\n\t\t// as disciplinas do aluno\r\n\t\tfor (i = 0; i < alunos.length; i++ )\r\n\t\t{\r\n\t\t\tn_aluno = alunos[i].getElementsByTagName(\"NUMBER\")[0].childNodes[0].nodeValue;\r\n\t\t\t\r\n\t\t\t// se o aluno for o mesmo preenche a combobox das disciplinas com as unidades curriculares em\r\n\t\t\t// que o aluno se encontra matriculado\r\n\t\t\tif (n_aluno == aluno)\r\n\t\t\t{\r\n\t\t\t\t// \r\n\t\t\t\tuc = alunos[i].getElementsByTagName(\"CLASS\");\r\n\t\t\t\t\r\n\t\t\t\tfor (y=0; y<uc.length;y++)\r\n\t\t\t\t{\r\n\t\t\t\t\tclassName = uc[y].childNodes[0].nodeValue;\r\n\t\t\t\t\t\r\n\t\t\t\t\t// adicionar as unidades curriculares ao array\r\n\t\t\t\t\tunidadesCurriculares[unidadesCurriculares.length] = className + \";\" + className;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\t\r\n\t}\r\n\t\r\n\tcombo = populateComboBox('', 'comboUnidadesCurriculares', 'Unidades Curriculares', unidadesCurriculares, '');\r\n\t\r\n\treturn combo;\r\n}", "function elim_seleccionados(cmb1)\n{\n\tvar k = 0;\t//para recorrer el vector cod_elim\n\t//<<--------- envia registros seleccionados al cuadro2 -------->>\\\\\t\n\tfor(i=cmb1.options.length-1; i>=0; i--){\n\t\tif(cmb1.options[i].selected == true){\n\t\t\tif(navigator.appName == \"Netscape\") \tcmb1.options[i] = null;\t\t\n\t\t\telse \t\t\t\t\t\t\t\t\tcmb1.remove(i);\n\t\t}\n\t}\n\tcmb1.selectedIndex = 0;\n}", "function sube_elem_combo(cmb)\n{\n\tseleccionado = cmb.selectedIndex; //almacena el numero de registro seleccionado\n\tif(seleccionado==0){\n\t\talert(\"el registro seleccionado no puede subir mas\");\n\t}\t\n\telse{\n\t\tacum_cod_seleccionado \t= cmb.value;\t\t//almacena el valor del registro seleccionado\n\t\tacum_txt_seleccionado \t= cmb.options[seleccionado].text;//almacena el texto del registro seleccionado\n\t\tcmb.options[seleccionado].text \t\t= cmb.options[seleccionado-1].text;\n\t\tcmb.options[seleccionado].value \t= cmb.options[seleccionado-1].value;\n\t\tcmb.options[seleccionado-1].text \t= acum_txt_seleccionado;\n\t\tcmb.options[seleccionado-1].value \t= acum_cod_seleccionado;\n\t\tcmb.selectedIndex = seleccionado-1\n\t}\n}", "function CascadingDropDown() {\n this.resetCascadingDropDowns = function () {\n this.resetOficinas();\n };\n \n this.TraeOficinaSucess = function (data) {\n //binding JSON data received to HTML select control\n $.each(data, function (key, textValue) {\n $('#cod_ofi').append($('<option />', { value: key, text: textValue }));\n });\n $('#cod_ofi').attr('disabled', false);\n };\n\n this.resetOficinas = function () {\n $('#cod_ofi option').remove();\n $('#cod_ofi').append($('<option />', { value: '-1', text: 'Por favor seleccione oficina' }));\n $('#cod_ofi').attr('disabled', 'disabled');\n };\n\n \n}", "function clairtxtBoxEdi(){\n document.getElementById(\"cboxedicodeville\").innerHTML=document.getElementById(\"cboxedVill\").innerHTML;\n document.getElementById(\"txtediId\").readOnly = true;\n document.getElementById(\"txtediId\").value = 0;\n document.getElementById(\"txtediNom\").value = \"\";\n document.getElementById(\"cboxedicodeville\").selectedIndex=0; //.value=0;\n}", "function GeneraComboGen(TablaNom, CampoCve, CampoDes, CampoCon, ValorCon, CampoNum, MulCom, RegVac, RegTod, ValDef, CampoOrd) {\n var ospan_Msg = c$(\"span_Msg\");\n var url = \"Datos_AJAX.asp\";\n var sDat = \"id=Gen_CboOpt\";\n\n if (MulCom == undefined) MulCom = 0;\n if (RegVac == undefined) RegVac = 1;\n if (RegTod == undefined) RegTod = 0;\n if (ValDef == undefined) ValDef = \"\";\n if (CampoOrd == undefined) CampoOrd = \"\";\n\n if (CampoNum == undefined) CampoNum = \"\";\n if (CampoCon == undefined) CampoCon = \"\";\n if (ValorCon == undefined) ValorCon = \"\";\n\n if (TablaNom == '' || TablaNom == undefined) return;\n if (CampoCve == '' || CampoCve == undefined) return;\n if (CampoDes == '' || CampoDes == undefined) return;\n\n sDat += \"&NomTab=\" + escape(TablaNom);\n sDat += \"&CamCve=\" + escape(CampoCve);\n sDat += \"&CamDes=\" + escape(CampoDes);\n sDat += \"&CamCon=\" + escape(CampoCon);\n sDat += \"&ValCon=\" + escape(ValorCon);\n sDat += \"&ValNum=\" + escape(CampoNum);\n sDat += \"&CamOrd=\" + escape(CampoOrd);\n ospan_Msg.style.display = \"\";\n ospan_Msg.innerHTML = '<span class=\"Mensajes\">Obteniendo los registros del cat&aacute;logo...</span>';\n HabilitaCtr(false);\n msID = \"Gen_CboOpt\";\n\n var lenCve = CampoCve.length;\n var PosSep = CampoCve.indexOf(\"|\")\n CampoCve = CampoCve.substring(PosSep + 1, lenCve);\n\n msTablaNom = TablaNom;\n msCampoCve = CampoCve;\n msCampoDes = CampoDes;\n msCampoCon = CampoCon;\n msValorCon = ValorCon;\n msCampoNum = CampoNum;\n mlMulCom = MulCom;\n mlRegVac = RegVac;\n mlRegTod = RegTod;\n msValDef = ValDef;\n msCampoOrd = CampoOrd;\n window.status = \"Obteniendo los registros del catálogo...\";\n PeticionAJAX(url, sDat, false);\n return false;\n}", "function buscar_seleccionado(combo,valor)\n{\n for(i= 0; i<combo.length; i++)\n {\n combo.selectedIndex = i; //selecciona el registro de la pos i\n if(combo.value == valor)\n {\n var encontro = true;\n break; //sale del ciclo\n }\n }\n if(!encontro)\n\tcombo.selectedIndex = 0;\n}", "function obtenerTipoCuenta() {\n\n LimpiarEnTipoCuenta();\n\n var datos = {'tipMoneda': $(\"#cboTipMoneda\").val(), 'tipoPersona': $('#cboTipoSocio').val()};\n\n var success = function (data) {\n\n $(\"#cboTipoCuenta\").html(\"\");\n $(\"#cboTipoCuenta\").append(\"<option value='default' option selected='selected' >Seleccione un tipo de Cuenta</option>\");\n $.each(data.infoTipoCuenta, function (i, item) {\n\n $(\"#cboTipoCuenta\").append(\"<option value='\" + item.IdTipCta + \"' id='\" + item.MontoMinimo + \"'>\" + item.Descripcion + \"</option>\");\n\n });\n };\n var error = function () {\n };\n fn_callmethod(\"../sTipoCuenta?action=obtenerTipoCuenta\", datos, success, error);\n}", "function InicializaCombo(cmb) {\n $(cmb).html(\"\");\n}", "function VaciaCamposTitulos(){\n\t$(\"#inputTitulo\").val(\"\");\n\t$(\"#inputDescripcion\").val(\"\");\n\t//$('#selectIdioma').val('')\n\t$('#selectIdioma').prop('SelectedIndex',0);\n\t$(\"#inputTitulo\").focus();\n}", "function cargaCombosDependientes() {\n\tcargaCombosMarcaCanal();\n\tcargaCombosClientes();\n\tcargaCombosZonas();\n\tif (parametrosRecargaCombos.length > 0) {\n\t\trecargaComboMultiple(parametrosRecargaCombos); \n\t\tparametrosRecargaCombos = new Array();\n\t}\n}", "function buscarClienteOnClick(){\n if ( get('formulario.accion') != 'clienteSeleccionado' ) {\n // var oid;\n // var obj = new Object();\n var whnd = mostrarModalSICC('LPBusquedaRapidaCliente','',new Object());//[1] obj);\n if(whnd!=null){\n \n //[1] }else{\n /* posicion N°\n 0 : oid del cliente\n 1 : codigo del cliente\n 2 : Nombre1 del cliente\n 3 : Nombre2 del cliente\n 4 : apellido1 del cliente\n 5 : apellido2 del cliente */\n \n var oid = whnd[0];\n var cod = whnd[1];\n //[1] var nombre1 = whnd[2];\n //[1] var nombre2 = whnd[3];\n //[1] var apellido1 = whnd[4]; \n //[1] var apellido2 = whnd[5]; \n \n // asigno los valores a las variables y campos corresp.\n set(\"frmFormulario.hOidCliente\", oid);\n set(\"frmFormulario.txtCodigoCliente\", cod);\n \n } \n }\n }", "function ObtenerCampania() {\n //Bloquear Pantalla\n parent.fn_util_bloquearPantalla();\n\n var url = $(\"#Url_ListarTodoCampania\").val();\n var Cuenta = $('#cboCampania');\n\n $.ajax({\n type: \"GET\",\n url: url,\n async: true,\n dataType: \"json\",\n cache: false,\n success: function (Result) {\n\n //setTimeout(function () {\n if (Result.iTipoResultado == 1) {\n var lstLista = Result.ListaCampania\n $.each(lstLista, function (index, item) {\n $(\"#cboCampania\").append(\"<option value=\" + this.IdCampania + \">\" + this.Nombre + \"</option>\");\n });\n } else {\n parent.fn_util_MuestraMensaje(\"Error\", Result.Mensaje, \"E\");\n parent.fn_util_desbloquearPantalla();\n }\n //}, 1000);\n },\n beforeSend: function (xhr) {\n parent.fn_util_bloquearPantalla();\n },\n complete: function () {\n parent.fn_util_desbloquearPantalla();\n }\n });\n}", "function pintaOptionsCombo(listaColectivos, idcolectivo) {\n\n var s = \"\";\n //Si el colectivo viene null, le pintamos opción en blanco. Si ya tiene valor, no pintamos opción en blanco\n if (idcolectivo == null) \n s += \"<option value=''></option>\";\n for (var i = 0; i < listaColectivos.length; i++) { \n s += \"<option value=\" + listaColectivos[i].t941_idcolectivo;\n if (listaColectivos[i].t941_idcolectivo == idcolectivo)\n {\n s += \" selected= selected\";\n }\n\n s += \">\" + listaColectivos[i].t941_denominacion + \"</option>\"; \n }\n return s;\n}", "function obtieneDatosCbo(campo, tipo) { \n\t\t\t\tvar l=combo_get(campo,'L');\n\t\t\t\tvar ar=new Array();\n\t\t\t\tfor(var i=0;i<l;i++) {\n\t\t\t\t\tar[i]=combo_get(campo,tipo,i);\n\t\t\t\t}\n\t\t\t\treturn ar;\n\t\t\t}", "function cargarCgg_res_oficial_seguimientoCtrls(){\n if(inRecordCgg_res_oficial_seguimiento){\n tmpUsuario = inRecordCgg_res_oficial_seguimiento.get('CUSU_CODIGO');\n txtCrosg_codigo.setValue(inRecordCgg_res_oficial_seguimiento.get('CROSG_CODIGO'));\n txtCusu_codigo.setValue(inRecordCgg_res_oficial_seguimiento.get('NOMBRES')+' '+inRecordCgg_res_oficial_seguimiento.get('APELLIDOS'));\n chkcCrosg_tipo_oficial.setValue(inRecordCgg_res_oficial_seguimiento.get('CROSG_TIPO_OFICIAL'));\n isEdit = true;\n habilitarCgg_res_oficial_seguimientoCtrls(true);\n }}", "function ComboLinha(){\n\tvar actpos = $('#position').val();\n\tif(empty(actpos)){\n\t\treturn;\n\t}\n\n\t//SE EU ALTEREI ALGUM REGISTRO\n\tif(!Verifica_Alteracao(DIV_TABELA) && !$(DIV_TABELA + \" tr[posicao=\"+actpos+\"]\").hasClass('active')){\n\t\treturn;\n\t}\n\n\n\n\t//COMBO DESEJADO\n\tvar ComboMor = DIV_TABELA + \" tr[posicao=\"+actpos+\"] select[name=fa_cstpis]\";\n\n\t//INPUT SELECIONADO\n\tvar InputMor = DIV_TABELA + \" tr[posicao=\"+actpos+\"] input[name=fa_cstpis]\";\n\n\t//INSERE OPTIONS NO COMBO SE FOR VAZIO\n\tif(empty($.trim($(ComboMor).html()))){\n\t\t$(ComboMor).append($('<option>', {value: '01', text : '1 - NORMAL' }));\n\t\t$(ComboMor).append($('<option>', {value: '02', text : '2 - DIFERENCIADA' }));\n\t}\n\n\t//VALOR QUE ESTAVA NO INPUT É O VALOR QUE APARECERÁ NO COMBO\n\t$(ComboMor + \" option[value=\"+$(InputMor).val()+\"]\").attr('selected', 'selected');\n\n\t//ESCONDE INPUT\n\t$(InputMor).hide();\n\n\t//MOSTRA COMBO\n\t$(ComboMor).show();\n\n\t//DEIXA COMBO FOCADO\n\t$(ComboMor).focus();\n}", "function limpiar_cabecera() {\n\tdocument.getElementById(\"cod_cliente\").value = \"\";\n\tdocument.getElementById(\"nombre_cliente\").value = \"\";\n\tdocument.getElementById(\"telefono\").value = \"\";\n\tdocument.getElementById(\"cif\").value = \"\";\n\tdocument.getElementById(\"calle\").value = \"\";\n\tdocument.getElementById(\"ciudad\").value = \"\";\n\tdocument.getElementById(\"provincia\").value = \"\";\n\tdocument.getElementById(\"email\").value = \"\";\n\tdocument.getElementById(\"cod_postal\").value = \"\";\n}", "function limpiarCampos(){\n\t$('#t').val(\"\");\n\t$('#cant').val(\"1\");\n\t$('#idInputSeleccionar').val(\"\");\n\t//$('#precio').val(\"Cantidad x Precio\");\n\t//$('#total').val(\"Total\");\n\t//$('#codigo').val(\"\");\n }", "function inicializarCampos() {\r\n document.querySelector('#tipo').value = vehiculos[0].tipo;\r\n document.querySelector('#marca').value = vehiculos[0].marca;\r\n document.querySelector('#modelo').value = vehiculos[0].modelo;\r\n document.querySelector('#patente').value = vehiculos[0].patente;\r\n document.querySelector('#anio').value = vehiculos[0].anio;\r\n document.querySelector('#precio').value = vehiculos[0].precio;\r\n if (document.querySelector('#tipo').value == \"auto\") {\r\n document.querySelector('#capacidadBaul').value = vehiculos[0].capacidadBaul;\r\n }\r\n else if (document.querySelector('#tipo').value == \"camioneta\") {\r\n document.querySelector('#capacidadCarga').value = vehiculos[0].capacidadCarga;\r\n }\r\n}", "function cargarCgg_res_beneficiarioCtrls(){\n if(inRecordCgg_res_beneficiario!== null){\n if(inRecordCgg_res_beneficiario.get('CRPER_CODIGO'))\n {\n txtCrben_codigo.setValue(inRecordCgg_res_beneficiario.get('CRPER_CODIGO'));\n txtCrben_nombres.setValue(inRecordCgg_res_beneficiario.get('CRPER_NOMBRES'));\n txtCrben_apellido_paterno.setValue(inRecordCgg_res_beneficiario.get('CRPER_APELLIDO_PATERNO'));\n txtCrben_apellido_materno.setValue(inRecordCgg_res_beneficiario.get('CRPER_APELLIDO_MATERNO'))\n txtCrben_num_doc_identific.setValue(inRecordCgg_res_beneficiario.get('CRPER_NUM_DOC_IDENTIFIC'));\n cbxCrben_genero.setValue(inRecordCgg_res_beneficiario.get('CRPER_GENERO'));\n cbxCrdid_codigo.setValue(inRecordCgg_res_beneficiario.get('CRDID_CODIGO'));\n cbxCrecv_codigo.setValue(inRecordCgg_res_beneficiario.get('CRECV_CODIGO'));\n cbxCpais_nombre_nacimiento.setValue(inRecordCgg_res_beneficiario.get('CPAIS_CODIGO'));\n var tmpFecha = null;\n if(inRecordCgg_res_beneficiario.get('CRPER_FECHA_NACIMIENTO')== null || inRecordCgg_res_beneficiario.get('CRPER_FECHA_NACIMIENTO').trim().length ==0){\n tmpFecha = new Date();\n }else{\n tmpFecha = Date.parse(inRecordCgg_res_beneficiario.get('CRPER_FECHA_NACIMIENTO'));\n }\n dtCrper_fecha_nacimiento.setValue(tmpFecha);\n }\n if(inRecordCgg_res_beneficiario.get('CRPER_REQUISITOS_JSON')){\n gsCgg_res_solicitud_requisito.loadData(Ext.util.JSON.decode(inRecordCgg_res_beneficiario.get('CRPER_REQUISITOS_JSON')),true);\n }else{\n gsCgg_res_solicitud_requisito.reload({\n params:{\n inCrtra_codigo:null, \n inCrtst_codigo:INRECORD_TIPO_SOLICITUD.get('CRTST_CODIGO'),\n format:TypeFormat.JSON\n }\n });\n }\n }\n }", "function limpiarCampos() {\n $('#compra').val('').focus();\n $('#venta').val('');\n }", "function CargarProvinciasUtil(depa, obj, rowDefault) {\n var select = obj;\n CargarComboDefectoUtil(select, rowDefault);\n $.getJSON('solicitud.htm?action=selectUbigeo&tipo=PR&codigoUbigeo='+depa, function(json){\n var select = obj;\n json.forEach(function(item, num){\n select.append($('<option/>', {\n value : item.ID,\n text : item.UBIGEO\n }));\n });\n });\n}", "function combo_a_vrble(cmb_origen, vrble_dstno){\n\tform\t\t\t= cmb_origen.form;\t\t\t\n\tnmro_elmntos \t= cmb_origen.length;\t\t\t\n\tacum_elem\t\t= new Array;\t\t\t\t\t\n\tfor(i=0; i<nmro_elmntos; i++){\n\t\tcmb_origen.selectedIndex=i;\t\t\t\t\t\n\t\tacum_elem[i] = cmb_origen.value;\t\t\t\n\t}\n\tvrble_dstno.value = acum_elem;\t\t\n}", "function cargaCombosZonas() {\n\tvar subgerencia = get(FORMULARIO+'.hSubgerenciaVentas').toString();\n\tvar region = get(FORMULARIO+'.hRegion').toString();\n\tvar zona = get(FORMULARIO+'.hZona').toString();\n\tvar seccion = get(FORMULARIO+'.hSeccion').toString();\n\t\n\tvar idioma = get(FORMULARIO+'.idioma').toString();\n\tvar pais = get(FORMULARIO+'.pais').toString();\n\t\n\t// Se carga el combo de regiones\n\tif (subgerencia != '') {\n\t\tvar parametros = new Array(5);\n \tparametros[0] = FORMULARIO+'.ValorRegion'; \n \tparametros[1] = \"CMNObtieneRegiones\";\n \tparametros[2] = DTODruidaBusqueda;\n \tparametros[3] = \"[['oidSubgerencia', \" + subgerencia + \"], ['oidIdioma',\" + idioma + \"], ['oidPais',\" + pais + \"]]\";\n \tparametros[4] = \"seleccionaRegion(datos)\";\n \tparametrosRecargaCombos[parametrosRecargaCombos.length] = parametros;\n\t\t/*gestionaCombo(FORMULARIO+'.ValorRegion', 'CMNObtieneRegiones', DTODruidaBusqueda,\n\t\t\t[['oidSubgerencia', subgerencia], ['oidIdioma',idioma], ['oidPais',pais]],\n\t\t\t'seleccionaRegion(datos)',region);*/\n\t}\n\t// Se carga el combo de zonas\n\tif (region != '') {\n\t\tvar parametros = new Array(5);\n \tparametros[0] = FORMULARIO+'.ValorZona'; \n \tparametros[1] = \"CMNObtieneZonas\";\n \tparametros[2] = DTODruidaBusqueda;\n \tparametros[3] = \"[['oidRegion', \" + region + \"], ['oidIdioma',\" + idioma + \"], ['oidPais',\" + pais + \"]]\";\n \tparametros[4] = \"seleccionaZona(datos)\";\n \tparametrosRecargaCombos[parametrosRecargaCombos.length] = parametros;\n\t\t/*gestionaCombo(FORMULARIO+'.ValorZona', 'CMNObtieneZonas', DTODruidaBusqueda,\n\t\t\t[['oidRegion', region], ['oidIdioma',idioma], ['oidPais',pais]],\n\t\t\t'seleccionaZona(datos)',zona);*/\n\t}\n\n\t// Se carga el combo de secciones\n\tif (zona != '') {\n\t\tvar parametros = new Array(5);\n \tparametros[0] = FORMULARIO+'.ValorSeccion'; \n \tparametros[1] = \"CMNObtieneSecciones\";\n \tparametros[2] = DTODruidaBusqueda;\n \tparametros[3] = \"[['oidZona', \" + zona + \"], ['oidIdioma',\" + idioma + \"], ['oidPais',\" + pais + \"]]\";\n \tparametros[4] = \"seleccionaSeccion(datos)\";\n \tparametrosRecargaCombos[parametrosRecargaCombos.length] = parametros;\n\t\t/*gestionaCombo(FORMULARIO+'.ValorSeccion', 'CMNObtieneSecciones', DTODruidaBusqueda,\n\t\t\t[['oidZona', zona], ['oidIdioma',idioma], ['oidPais',pais]],\n\t\t\t'seleccionaSeccion(datos)',seccion);*/\n\t}\n\n\t// Se carga el combo de territorios\n\tif (seccion != '') {\n\t\tvar parametros = new Array(5);\n \tparametros[0] = FORMULARIO+'.ValorTerritorio'; \n \tparametros[1] = \"CMNObtieneTerritorios\";\n \tparametros[2] = DTODruidaBusqueda;\n \tparametros[3] = \"[['oidSeccion', \" + seccion + \"], ['oidIdioma',\" + idioma + \"], ['oidPais',\" + pais + \"]]\";\n \tparametros[4] = \"seleccionaTerritorio(datos)\";\n \tparametrosRecargaCombos[parametrosRecargaCombos.length] = parametros;\n\t\t/*gestionaCombo(FORMULARIO+'.ValorTerritorio', 'CMNObtieneTerritorios', DTODruidaBusqueda,\n\t\t\t[['oidSeccion', seccion], ['oidIdioma',idioma], ['oidPais',pais]],\n\t\t\t'seleccionaTerritorio(datos)',territorio);*/\n\t}\n}", "limpiarCampos(){\n this.tituloInput.value = \"\";\n this.cuerpoInput.value = \"\";\n this.idInput.value = \"\";\n }", "function limpiar(){\n\n Ext.getCmp('nombreBanco').setValue('');\n Ext.getCmp('idBanco').setValue(''); \n }", "function cargar_Paises(lista_paises) {\r\n\t// PREPARAMOS TEXTOS PARA CREAR UN OBJETO DE NAVEGADOR\r\n\tvar texto_aconvertir = \"{'paises':\" + lista_paises + \"}\";\r\n\t// CREAMOS EL OBJETO DE NAVEGADOR\r\n\tvar objeto_paises = eval('(' + texto_aconvertir + ')');\r\n\t// ACCEDEMOS AL SELECT DE LA PAGINA PARA MODIFICARLO\r\n\tvar lista_paises = document.getElementById(\"pais\");\r\n\t// CREAMOS TANTOS OPTIONS COMO PAISES\r\n\tvar numero_paises = objeto_paises.paises.length;\r\n\tfor (i = 0; i < numero_paises; i++) {\r\n\t\topcion = document.createElement('option');\r\n\t\ttexto_opcion = document\r\n\t\t\t\t.createTextNode(objeto_paises.paises[i].paisNombre);\r\n\t\topcion.appendChild(texto_opcion);\r\n\t\topcion.value = objeto_paises.paises[i].codigoPais;\r\n\t\tlista_paises.appendChild(opcion);\r\n\t}\r\n}", "function datosCita(e) {\r\n citaObj[e.target.name] = e.target.value;\r\n}", "function carga_clmnas(cadena,cmb1,cmb2){\n\tform\t\t= document.form1;\t\t\n\tarray_tmp\t= new Array(); \t//vector que almacenara temporalmente la informacion de los elementos seleccionados\n\tarray_tmp\t= string_to_array(\",\",cadena);\n\t//recorre el vector temporal >>>\n\tfor(k=0; k< array_tmp.length; k++){ \t\n\t\t//recorre todo el combo1 >>>\n\t\tfor(j=0; j<cmb1.length; j++){\n\t\t\tcmb1.selectedIndex = j; //selecciona el registro de la pos j\n\t\t\tif(cmb1.value == array_tmp[k]){\n\t\t\t\tcmb1_to_cmb2(cmb1, cmb2);//envia el valor de combo1 a combo 2\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\t\n}", "function cargarCgg_veh_vehiculoCtrls(){\n\t\tif(inRecordCgg_veh_vehiculo){\n\t\t\ttmpDatos['MARCA'] = inRecordCgg_veh_vehiculo.get('CVMRC_CODIGO');\n\t\t\ttmpDatos['CATEGORIA'] = inRecordCgg_veh_vehiculo.get('CVCTG_CODIGO');\n\t\t\ttmpDatos['PRODUCTIVO'] = inRecordCgg_veh_vehiculo.get('CSCTP_CODIGO');\n\t\t\ttmpDatos['SECTOR'] = inRecordCgg_veh_vehiculo.get('CVSCT_CODIGO');\n\t\t\ttxtCvveh_codigo.setValue(inRecordCgg_veh_vehiculo.get('CVVEH_CODIGO'));\n\t\t\ttxtVehCvmrc_codigo.setValue(inRecordCgg_veh_vehiculo.get('MARCA'));\n\t\t\tcbxCvclr_codigo.setValue(inRecordCgg_veh_vehiculo.get('CVCLR_CODIGO'));\n\t\t\ttxtCvctg_codigo.setValue(inRecordCgg_veh_vehiculo.get('CATEGORIA'));\n\t\t\ttxtCsctp_codigo.setValue(inRecordCgg_veh_vehiculo.get('PRODUCTIVO'));\n\t\t\ttxtCvsct_codigo.setValue(inRecordCgg_veh_vehiculo.get('SECTOR'));\n\t\t\tcbxCgg_cvclr_codigo.setValue(inRecordCgg_veh_vehiculo.get('CGG_CVCLR_CODIGO'));\n\t\t\ttxtCvveh_nombre.setValue(inRecordCgg_veh_vehiculo.get('CVVEH_NOMBRE'));\n\t\t\ttxtCvveh_modelo.setValue(inRecordCgg_veh_vehiculo.get('CVVEH_MODELO'));\n\t\t\tcbxTipoVehiculo.setValue(inRecordCgg_veh_vehiculo.get('CVVEH_TIPO'));\n\t\t\tnumCvveh_anio_produccion.setValue(inRecordCgg_veh_vehiculo.get('CVVEH_ANIO_PRODUCCION'));\n\t\t\ttxtCvveh_chasis.setValue(inRecordCgg_veh_vehiculo.get('CVVEH_CHASIS'));\n\t\t\ttxtCvveh_placa.setValue(inRecordCgg_veh_vehiculo.get('CVVEH_PLACA'));\n\t\t\tnumCvveh_eslora.setValue(inRecordCgg_veh_vehiculo.get('CVVEH_ESLORA'));\n\t\t\tnumCvveh_manga.setValue(inRecordCgg_veh_vehiculo.get('CVVEH_MANGA'));\n\t\t\tnumCvveh_puntal.setValue(inRecordCgg_veh_vehiculo.get('CVVEH_PUNTAL'));\n\t\t\ttxtCvveh_material.setValue(inRecordCgg_veh_vehiculo.get('CVVEH_MATERIAL'));\n\t\t\tchkCvveh_ingreso.setValue(inRecordCgg_veh_vehiculo.get('CVVEH_INGRESO'));\n\t\t\tdtCvveh_fecha_ingreso.setValue(truncDate(inRecordCgg_veh_vehiculo.get('CVVEH_FECHA_INGRESO')));\n\t\t\tcbxCvveh_tipo_ingreso.setValue(inRecordCgg_veh_vehiculo.get('CVVEH_TIPO_INGRESO'));\n\t\t\tnumCvveh_tiempo_estadia.setValue(inRecordCgg_veh_vehiculo.get('CVVEH_TIEMPO_ESTADIA'));\n\t\t\tchkCvveh_salio.setValue(inRecordCgg_veh_vehiculo.get('CVVEH_SALIO'));\n\t\t\tdtCvveh_fecha_salida.setValue(truncDate(inRecordCgg_veh_vehiculo.get('CVVEH_FECHA_SALIDA')));\n\t\t\ttxtCvveh_observacion.setValue(inRecordCgg_veh_vehiculo.get('CVVEH_OBSERVACION'));\n\t\t\tisEdit = true;\n\t\t\tgsCgg_veh_vehiculo_estado.reload({params:{\n\t\t\t\t\tformat:'JSON',\n\t\t\t\t\tinCvveh_codigo:inRecordCgg_veh_vehiculo.get('CVVEH_CODIGO')\n\t\t\t\t}\n\t\t\t});\n\t\t\tgrdCgg_veh_vehiculo_motor.getStore().baseParams.inCvveh_codigo = inRecordCgg_veh_vehiculo.get('CVVEH_CODIGO')\n\t\t\tgrdCgg_veh_vehiculo_motor.getStore().reload();\n\t\t\t\n\t\t\tgsVehiculoAdjunto.reload({params:{\n\t\t\t\tformat:\"JSON\",inCvveh_codigo:inRecordCgg_veh_vehiculo.get('CVVEH_CODIGO')\n\t\t\t\t}\n\t\t\t});\n\t\t\tpnlVehMotor.setDisabled(!isEdit);\n\t}}", "function ObtenerFormaAgregarProyecto() {\n $(\"#dialogAgregarProyecto\").obtenerVista({\n nombreTemplate: \"tmplAgregarProyecto.html\",\n url: \"Proyecto.aspx/ObtenerFormaAgregarProyecto\",\n despuesDeCompilar: function(pRespuesta) {\n $(\"#dialogAgregarProyecto\").dialog(\"open\");\n $(\"#txtFechaInicio\").datepicker();\n $(\"#txtFechaTermino\").datepicker();\n AutocompletarCliente();\n var progreso = 0;\n $( \"#progresoEnTiempo\" ).progressbar({\n value: progreso\n });\n $('#divFormaAgregarProyecto').on('change', '#cmbTipoMoneda', function(event) {\n\n var pTipoCambio = new Object();\n pTipoCambio.IdTipoCambioOrigen = parseInt($(this).val());\n pTipoCambio.IdTipoCambioDestino = parseInt(1);\n var oRequest = new Object();\n oRequest.pTipoCambio = pTipoCambio;\n ObtenerTipoCambio(JSON.stringify(oRequest))\n\n });\n \n }\n });\n}", "function carga_clmnas_sin_eliminar_datos(cadena,cmb1,cmb2){\n\tform\t\t= document.form1;\t\t\n\tarray_tmp\t= new Array(); \t//vector que almacenara temporalmente la informacion de los elementos seleccionados\n\tarray_tmp\t= string_to_array(\",\",cadena);\n\t//recorre el vector temporal >>>\n\tfor(k=0; k< array_tmp.length; k++){ \t\n\t\t//recorre todo el combo1 >>>\n\t\tfor(j=0; j<cmb1.length; j++){\n\t\t\tcmb1.selectedIndex = j; //selecciona el registro de la pos j\n\t\t\tif(cmb1.value == array_tmp[k]){\n\t\t\t\tcmb1_to_cmb2_sin_eliminar_datos(cmb1,cmb2);//envia el valor de combo1 a combo 2\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\t\n}", "function limparMBCL(tipo){\r\n\tvar form = document.ImovelOutrosCriteriosActionForm;\r\n\tswitch(tipo){\r\n\t\tcase 1:\r\n\t\t\tform.idMunicipio.value = \"\";\r\n\t\t\tform.nomeMunicipio.value = \"\";\r\n\t\tcase 2:\r\n\t\t\tform.idBairro.value = \"\";\r\n\t\t\tform.nomeBairro.value = \"\";\r\n\t\tcase 3:\r\n\t\t\tform.idLogradouro.value = \"\";\r\n\t\t\tform.nomeLogradouro.value = \"\";\r\n\t\tcase 4:\r\n\t\t\tform.CEP.value = \"\";\r\n\t\t\tform.descricaoCep.value = \"\";\r\n\r\n\t}\r\n}", "function LimpiarCabecera() {\n $(\"#hidCorrelativoBec\").val(0);\n $(\"#hidSerieBec\").val(0);\n $(\"#hidActualBec\").val(0);\n $(\"#lbCorrelativoBec\").val('Seleccione una Serie.');\n\n $(\"#hidCorrelativoRecAux\").val(0);\n $(\"#hidSerieRecAux\").val(0);\n $(\"#hidActualRecAux\").val(0);\n $(\"#lbCorrelativoRecAux\").val('Seleccione una Serie.');\n\n\n //$(\"#txtMonto\").val('');\n $(\"#txtVoucher\").val('');\n $(\"#txtFecDeposito\").val('');\n $(\"#txtObservacion\").val('');\n\n $(\"#txtMAplicar\").val(0);\n $(\"#hidMAplicar\").val(0);\n $(\"#hidMVoucher\").val(0);\n $(\"#txtMVoucher\").val(0);\n //$('#hidValidacionMontoAplicar').val(1);\n}", "function VaciaCamposLineas(){\n\t$('#inputidAfectado').prop(\"SelectedIndex\",0);\n\t$('#selectEsencial').prop(\"SelectedIndex\",0);\n\t$('#selectUds').prop(\"SelectedIndex\",0);\n\t$('#inputCantidad').val(\"\"); \n\t$('#inputCosteUd').val(\"\"); \n\t$('#inputCosteTotal').val(\"\"); \n\t$('#inputCosteRacion').val(\"\"); \n\t$('#inputMerma').val(\"\"); \n}", "function initopciones() {\n q = {};\n q.ke = _ucode;\n q.lu = _ulcod;\n q.ti = _utval;\n nombre = $(\"#nombreheader\");\n allFields = $([]).add(nombre);\n tips = $(\".validateTips\");\n\n\n $(\"#dialog-formheader\").dialog({\n autoOpen: false, height: 450, width: 500, modal: true,\n buttons: {\n \"Guardar\": function() {\n OPCION_USUARIO.savedata();\n },\n \"Cancelar\": function() {\n $(this).dialog(\"close\");\n }\n },\n close: function() {\n UTIL.clearForm('formcreate1');\n updateTips('');\n }\n });\n}", "function verSER() { \t\r\n\t$(\"#cboRubro\").html('');\r\n\t$(\"#cboRubro\").append(\"<option value='-1' selected>---------------------</option>\");\r\n\t$('#h_Rubro').val('');\r\n}", "limpaFormulario(){\n this._inputDataNascimento.value = ''\n this._inputIdade.value = 1;\n this._inputSalario.value = 0;\n this._inputDataNascimento.focus();\n }", "function fillCombo(object) {\n \n if ($(\"#txtName\").val() != \"\") {\n\n var parent = $(object).parent();\n $(parent).parent().find(\"#dvdLoad\").remove();\n $('<div id=\"dvdLoad\" class=\"loadingdatawarning\" style=\"width: 3px;padding-left:35px;\"><br>Loading...</div>').insertAfter(parent);\n\n\n\n \n $.getJSON(\"../Signatures/IndexGetUsers\" + \"?user=\" + $(\"#txtName\").val(), null,\n\n function (data) {\n $(parent).parent().find(\"#dvdLoad\").remove();\n\n $(\"#cmbusernames\").empty();\n $(\".messages\").remove();\n var validator = 0;\n $.each(data, function (i, item) {\n $(\"#divcbn\").fadeIn(1000); \n validator = 1;\n $(\"#cmbusernames\").append(\"<option id='\" + item.IdUser + \"'>\" + item.Nombre.toUpperCase() + \"</option>\").css('height', '120px');\n });\n if (validator == 0) {\n $(\"#divcbn\").fadeOut(1000);\n var element = $(\"#txtName\");\n $(element).attr('data-val-required', $('#ErrorNoExists').val());\n $(element).addClass(\"input-validation-error\");\n $(element).tooltip().css('left:120px', 'top:120px');\n $(element).focus();\n }\n }).fail(function (jqxhr, textStatus, error) {\n $(parent).parent().find(\"#dvdLoad\").remove();\n });\n }\n}", "function TiraComboLinha(){\n\tvar actpos = $(\"#position\").val();\n\tif(empty(actpos)){\n\t\treturn;\n\t}\n\n\t//COMBO DESEJADO\n\tvar comboMor = DIV_TABELA + \" tr[posicao=\"+actpos+\"] select[name=fa_cstpis]\";\n\n\t//INPUT SELECIONADO\n\tvar inputMor = DIV_TABELA + \" tr[posicao=\"+actpos+\"] input[name=fa_cstpis]\";\n\n\t$(inputMor).val($(comboMor).val());\n\n\t//MOSTRA INPUT\n\t$(inputMor).show();\n\n\t//ESCONDE COMBO\n\t$(comboMor).hide();\n\n\tedicao($(inputMor));\n}", "function cargarTutorOp() {\n idEscu = $(\"#cbEscuela option:selected\").val();\n $('#cbTutorOp').empty().append('<option value=\"-1\">seleccione:</option>');\n $.post(baseurl+\"profesor/obtProfesorPorEscuela\",\n {\n idEscuela: idEscu,\n },\n function(data){\n var p = JSON.parse(data);\n $.each(p, function (i, item) {\n $('#cbTutorOp').append('<option value=\"'+item.pro_id+'\">'+item.pro_nombre+' '+item.pro_apellido+'</option>'\n );\n });\n\n });\n\n}", "function calGuiasSetLovSelection(campo, id, descripcion){\n\t//Actualizamos el valor del campo oculto y el valor de la caja de texto\n\t//del campo que es una lista\n\tset('calGuiasFrm.' + campo, id);\n\tset('calGuiasFrm.' + campo + 'LovDescription', descripcion);\n\t\n}", "function limpiar() {\n\t\t\n\t\t$(\"#nresolucion\").val(\"\");\n\t\t$(\"#nproyecto\").val(\"\");\n\t\t$(\"#id_motivo\").selectpicker('refresh');//refrescamos el motivo\n\t\t$(\"#id_area\").val(\"\");\n\t\t$(\"#est\").val(\"\");\n\t\t$(\"#f_emision\").val(\"\");\n\t\t$(\"#id_resolucion\").val(\"\");\n\t}", "function obtenerTipoApertura() {\n\n var data = {'tipoPersona': $(\"#cboTipoSocio\").val()};\n $('#cboTipoApertura').empty();\n var success = function (data) {\n\n $(\"#cboTipoApertura\").append(\"<option value='default' option selected='selected'>Seleccione un tipo de Apertura</option>\");\n $.each(data.listTipoApertura, function (i, item) {\n $(\"#cboTipoApertura\").append(\"<option value='\" + item.IdTipoApertura + \"'>\" + item.Descripcion + \"</option>\");\n\n });\n $(\"#cboTipoApertura\").val('default').trigger('change.select2');\n };\n var error = function () { };\n\n fn_callmethod(\"../sTipoApertura?action=obtenerTipoApertura\", data, success, error);\n }", "function cadastrarTecnico(){\n\tvar matriculaTecnico = DWRUtil.getValue(\"comboTecnicoTRE\");\n\tvar login = DWRUtil.getValue(\"login\"); \n\tif((matriculaTecnico==null ||matriculaTecnico=='')){\n\t\talert(\"Selecione um tecnico do TRE.\");\n\t}else{\n\t\tFacadeAjax.integrarTecnico(matriculaTecnico,login);\n\t\tcarregaTecnicos();\t\n\t}\n\t\n}", "function limparCampos(){\n document.getElementById('categoria').value=0;\n document.getElementById('ano').value='';\n document.getElementById('atores').value='';\n document.getElementById('infos').value=''; \n}", "function obtener_marcas(data){\n var combo=$('[name=marca]');\n $.ajax({\n url: \"articulos_controller/obtener_marcas\",\n success: function(response) {\n var respuesta = $.parseJSON(response);\n if (respuesta.success === true) {\n combo.empty();\n combo.append('<option value=\"1\">No aplica</option>')\n for (var i = 0; i < respuesta.marcas.length; i++) {\n var item = respuesta.marcas[i];\n combo.append('<option value=\"'+item[\"tipcodigo\"]+'\">'+item[\"tipdetalle\"]+'</option>');\n }\n if (data.length > 1) {\n combo.val(data)\n }\n }\n }\n });\n}", "function limpia(campo){\n\t\tcampo.value=\"\";\n\t\tcampo.focus();\n\t}", "function nuevo() {\n try {\n var iFila;\n bCambios = true;\n var oNF = $I(\"tblCatalogo\").insertRow(-1);\n iFila = oNF.rowIndex;\n oNF.id = -$I(\"tblCatalogo\").rows.length;\n oNF.nF = iFila;\n oNF.setAttribute(\"bd\", \"I\");\n oNF.setAttribute(\"height\", \"22px\");\n oNF.setAttribute(\"sw\", \"1\");\n oNF.attachEvent(\"onclick\", mm);\n oNF.onclick = function() { activarCombo(this.rowIndex); };\n \n //Imagen del mantenimiento de bd\n var oImgFI = oNF.insertCell(-1).appendChild(document.createElement(\"img\"));\n oImgFI.style.marginLeft = \"4px\";\n oImgFI.setAttribute(\"src\", \"../../../../Images/imgFI.gif\");\n oImgFI.setAttribute(\"textAlign\", \"center\");\n\n //Denominación\n oNF.insertCell(-1); \n var oInputDenom = document.createElement(\"input\");\n oInputDenom.setAttribute(\"type\", \"text\");\n oInputDenom.setAttribute(\"id\", \"Denominacion\" + iFila);\n oInputDenom.setAttribute(\"style\", \"width:380px; text-transform:uppercase;\");\n oInputDenom.setAttribute(\"maxLength\", \"80\");\n oInputDenom.setAttribute(\"class\", \"txtM\");\n oInputDenom.setAttribute(\"value\", \"\");\n oInputDenom.onkeyup = function() { mfa(this.parentNode.parentNode, 'U') };\n oNF.cells[enumTitulacion.denom].appendChild(oInputDenom);\n\n //Celda Tipo\n oNF.insertCell(-1);\n\n //Celda Modalidad\n oNF.insertCell(-1);\n\n //Celda Tic\n oNF.insertCell(-1);\n var oChkT = document.createElement(\"input\");\n oChkT.setAttribute(\"type\", \"checkbox\");\n oChkT.setAttribute(\"id\", \"chkTituloTic\" + iFila);\n oNF.cells[enumTitulacion.tic].setAttribute(\"style\", \"text-align:center;\");\n oNF.cells[enumTitulacion.tic].appendChild(oChkT);\n\n oChkT.onclick = function() { mfa(this.parentNode.parentNode, 'U') };\n\n //Celda Validacion\n oNF.insertCell(-1);\n var oChkV = document.createElement(\"input\");\n oChkV.setAttribute(\"type\", \"checkbox\");\n oChkV.setAttribute(\"id\", \"chkValidacion\" + iFila);\n oChkV.setAttribute(\"checked\", \"checked\" + iFila);\n oNF.setAttribute(\"chkV\", \"1\");\n oNF.cells[enumTitulacion.validado].setAttribute(\"style\", \"text-align:center;\");\n oNF.cells[enumTitulacion.validado].appendChild(oChkV);\n oChkV.onclick = function() { mfa(this.parentNode.parentNode, 'U') };\n\n //Celda RH\n oNF.insertCell(-1);\n var oChk = document.createElement(\"input\");\n oChk.setAttribute(\"type\", \"checkbox\");\n oChk.setAttribute(\"id\", \"chkRH\" + iFila);\n oChk.setAttribute(\"checked\", \"checked\" + iFila);\n oNF.setAttribute(\"chk\", \"1\");\n oNF.cells[enumTitulacion.rh].setAttribute(\"style\", \"text-align:center;\");\n oNF.cells[enumTitulacion.rh].appendChild(oChk);\n oChk.onclick = function() { mfa(this.parentNode.parentNode, 'U') };\n\n //ms(oNF);\n AccionBotonera(\"grabar\", \"H\");\n if (ie) oNF.click();\n else {\n var clickEvent = window.document.createEvent(\"MouseEvent\");\n clickEvent.initEvent(\"click\", false, true);\n oNF.dispatchEvent(clickEvent);\n }\n $I(\"divCatalogo\").scrollTop = $I(\"divCatalogo\").scrollHeight;\n oNF.cells[enumTitulacion.denom].children[0].focus();\n } catch (e) {\n mostrarErrorAplicacion(\"Error al añadir nueva titulacion\", e.message);\n }\n}", "function cargarCombosd(padre, hijo, setselected) \n{\n\t//\n\tvar current = $(\"#djqGridP\").jqGrid('getRowData',$(\"#djqGridP\")[0].p.selrow)[hijo];\n\tvar jefextiste= $(\"#djef\").val();\n\t//alert (\"bbb\"+current);\n\tvar aCrear = \"#\"+hijo;\t\n\tvar estado = $(aCrear).attr(\"disabled\");\n\tif (estado===undefined)\n\t\t\testado=false;\n\t$(aCrear).html(\"<option value=''>Cargando...</option>\")\n\t\t\t\t\t .attr(\"disabled\", \"disabled\");\n\t\n\tvar ruta = base_url +\"registro/cargatipodocd?padre=\"+padre+\"&aCrear=\"+hijo;\t\n\n\t$.ajax({\n\t\t\turl: ruta,\n\t\t\ttype: \"GET\",\n\t\t\tasync: true,\n\t\t\tsuccess: function (respCombo)\n\t\t\t {\n\t\t\t\t /*alert(\"respuestacombo=\"+respCombo);\n\t\t\t\t alert(aCrear);*/\n\t\t\t\tif (estado==false)\n\t\t\t\t\t$(aCrear).removeAttr(\"disabled\");\n\t\t\t\n\t\t\t\t/*alert (\"hijo=\"+hijo);\n\t\t\t\talert (\"jefextiste=\"+jefextiste);\n\t\t\t\talert (\"current=\"+current);*/\n\t\t\t\t\n\t\t\t\t$(aCrear).html(respCombo);\t\n\t\t\t\t$(aCrear).val(current);\n\t\t\t\t\n\t\t\t\tif (current)\n\t\t\t\t{\n\t\t\t\t\tif (hijo==\"C4P49_PARENTESCO\" && jefextiste>=1 && current==99)\n\t\t\t\t\t{\n\t\t\t\t\t\t $(aCrear).attr(\"disabled\", \"disabled\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\tif (hijo==\"C4P49_PARENTESCO\" && jefextiste>=1 )\n\t\t\t\t\t{\n\t\t\t\t\t\t$(aCrear).val('99'); \n\t\t\t\t\t\t$(aCrear).attr(\"disabled\", \"disabled\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t});\n}", "function loadMarcas(marcas){\n var elementos=marcas;\n var contenedor = document.getElementById(\"selectMarcaBiciVisitante\");\n //console.log(elementos);\n for(var i=0; i<elementos.length;i++){\n var opcion = document.createElement(\"option\");\n opcion.setAttribute(\"value\",elementos[i].id);\n opcion.innerHTML=elementos[i].nombre;\n console.log(opcion);\n contenedor.appendChild(opcion);\n }\n}", "function cargar_municipios(datos_municipios) {\r\n\tvar texto_aconvertir = \"{'municipios':\" + datos_municipios + \"}\";\r\n\tvar objeto_respuesta = eval('(' + texto_aconvertir + ')');\r\n\tvar lista_muni = document.getElementById(\"municipios\");\r\n\tlista_muni.options.length = 0;\r\n\tvar posiciones = objeto_respuesta.municipios.length;\r\n\tfor (var i = 0; i < posiciones; i++) {\r\n\t\topcion = document.createElement('option');\r\n\t\ttexto_opcion = document\r\n\t\t\t\t.createTextNode(objeto_respuesta.municipios[i].municipio);\r\n\t\topcion.appendChild(texto_opcion);\r\n\t\topcion.value = objeto_respuesta.municipios[i].codigoMunicipio;\r\n\t\tlista_muni.appendChild(opcion);\r\n\t}\r\n}", "function limpiarCamposAdicional(){\n $cedula.val(\"\");\n $primerNombre.val(\"\");\n $segundoNombre.val(\"\");\n $primerApellido.val(\"\");\n $segundoApellido.val(\"\");\n $nombreTarjeta.val(\"\");\n $cupoOtorgado.val(\"\");\n $sexo.val($(\"#sexo option:first\").val());\n $estadoCivil.val($(\"#estadoCivil option:first\").val());\n $parentesco.val($(\"#parentesco option:first\").val());\n $fechaNacimiento.val(\"\");\n $nacionalidadSelect.val($(\"#nacionalidadSelect option:first\").val());\n $nacionalidad.val(\"ECUATORIANA\");\n $nacionalidadDiv.hide();\n $observaciones.val(\"\");\n}", "function limpiaCajasAuxiliares(idOrden, contador){\n\tdocument.getElementById('cantidadIAux'+idOrden+contador).value = '';\n\tdocument.getElementById('numeroCarga'+idOrden+contador).value = '';\n}", "function mandarFocusYSeleccionarCampo(selectComboManifiesto){\n\tvar acciones = document.getElementsByName('filtro');\n\tif (acciones.length!=undefined){\n\t\tif (acciones[0].checked){\n\t\t\tmandarFocus('frmCodigoE');\n\t\t\tseleccionarCampo('frmCodigoE');\n\t\t}\n\t\telse if (acciones[1].checked){\n\t\t\tmandarFocus('frmCodigoR');\n\t\t\tseleccionarCampo('frmCodigoR');\n\t\t}\n\t\telse if (acciones[2].checked) {\n\t\t\tvar tabla = $$$('listaMan');\n\t\t\t\n\t\t\tif ((tabla != null) && (tabla != undefined))\n\t\t\t\ttabla.style.display = 'none';\n\t\t}\n\t\telse if (acciones[3].checked) {\n\t\t\tif (($$$('divCodManifiesto') != null) && ($$$('divCodManifiesto') != undefined) && ($$$('divCodManifiesto').className != 'oculto') && \n\t\t\t\t\t(($$$('divSelManifiesto') == null) || ($$$('divSelManifiesto') == undefined) || ($$$('divSelManifiesto').className == 'oculto'))) {\n\t\t\t\tmandarFocus('frmCodigoM');\n\t\t\t\tseleccionarCampo('frmCodigoM');\n\t\t\t}\n\t\t\t\n\t\t\tgetManifiestosControlOblRec(selectComboManifiesto);\n\t\t\t\n\t\t\tvar tabla = $$$('lista');\n\t\t\t\n\t\t\tif ((tabla != null) && (tabla != undefined))\n\t\t\t\ttabla.style.display = 'none';\n\t\t}\n\t}\n}", "function cargarenFormulario(id, descripcion, nombrecomercial, nit, telefono, direccion, departamento, municipio, actividad, tipoPago, numeroest, numeroreg, fechaRegistro, fechaConstitucion) {\n limpiar();\n\n\n\n $('#nit').val(nit);\n $('#nombre').val(descripcion);\n $('#razon').val(nombrecomercial);\n $('#telefono').val(telefono);\n $('#direccion').val(direccion);\n $('#id').val(id);\n $('#departamento').val(departamento);\n $('#municipio').html('<option value=\"0\">Seleccione Una Opción</option>');\n $('#actividad').val(actividad);\n $('#tipoPago').val(tipoPago);\n $('#numeroest').val(numeroest);\n $('#numeroreg').val(numeroreg);\n $('#fechaRegistro').val(fechaRegistro);\n $('#fechaConstitucion').val(fechaConstitucion);\n\n\n\n\n //consume el ws para obtener los datos\n $.ajax({\n url: 'wscargar_datos.asmx/cargarMunicipiosPorDep',\n data: '{dep: ' + departamento + '}',\n type: 'POST',\n contentType: 'application/json; charset=utf-8',\n success: function (msg) {\n $.each(msg.d, function () {\n $('#municipio').append('<option value=\"' + this.id + '\">' + this.descripcion + '</option>')\n });\n\n $('#municipio').val(municipio)\n }\n });\n\n\n\n\n $('#MdNuevo').modal('toggle')\n\n $('#bt-guardar').html('<i class=\"material-icons\">cached</i>Actualizar');\n $('#bt-guardar').removeClass('btn-success');\n $('#bt-guardar').removeClass('btn-warning');\n $('#bt-guardar').addClass('btn-info');\n}", "function getFOptions_Proceso(idSelectOrigen, idSelectDestino, idChkDestino, nomina, codorganismo, opt) {\r\n\tvar selectOrigen=document.getElementById(idSelectOrigen);\r\n\tvar optSelectOrigen=selectOrigen.options[selectOrigen.selectedIndex].value;\r\n\tvar selectDestino=document.getElementById(idSelectDestino);\r\n\tvar chkDestino=document.getElementById(idChkDestino);\r\n\tif (optSelectOrigen==\"\") {\r\n\t\tselectDestino.length=0;\r\n\t\tnuevaOpcion=document.createElement(\"option\");\r\n\t\tnuevaOpcion.value=\"\";\r\n\t\tnuevaOpcion.innerHTML=\"\";\r\n\t\tselectDestino.appendChild(nuevaOpcion);\r\n\t} else {\r\n\t\t//\tCREO UN OBJETO AJAX PARA VERIFICAR QUE EL NUEVO REGISTRO NO EXISTA EN LA BASE DE DATOS\r\n\t\tvar ajax=nuevoAjax();\r\n\t\tajax.open(\"POST\", \"fphp_selects.php\", true);\r\n\t\tajax.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\r\n\t\tajax.send(\"accion=getOptions_2&tabla=\"+idSelectDestino+\"&opcion=\"+optSelectOrigen+\"&nomina=\"+nomina+\"&codorganismo=\"+codorganismo+\"&opt=\"+opt);\r\n\t\tajax.onreadystatechange=function() {\r\n\t\t\tif (ajax.readyState==4)\t{\r\n\t\t\t\tselectDestino.parentNode.innerHTML=ajax.responseText;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "function accionCrear()\n\t{\n\n//\t\talert(\"accionCrear\");\n\t\tif(listado1.datos.length != 0)\n\t\t{\n\t\t\tvar orden = listado1.codSeleccionados();\n//\t\t\talert(\"Linea seleccionada \" + orden);\n\t\t\tset('frmPBuscarTiposError.hidOidCabeceraMatrizSel', orden);\n\t\t\tset('frmPBuscarTiposError.accion', 'crear');\n\t\t\tenviaSICC('frmPBuscarTiposError');\n\n\t\t}else\n\t\t{\n\t\t\talert(\"no hay seleccion: \" + listado1.datos.length);\n\t\t}\n\t}", "function limparUltimosCampos(tipo){\r\n\tvar form = document.ImovelOutrosCriteriosActionForm;\r\n\t\r\n\t//if(form.idMunicipio.value == \"\")\r\n\t\t//limparUltimosCampos(1);\r\n\t\r\n\tswitch(tipo){\r\n\t\tcase 1: //municipio\r\n\t\t\tform.nomeMunicipio.value = \"\";\r\n\t\t\tform.idBairro.value = \"\";\r\n\t\tcase 2: //bairro\r\n\t\t\tform.nomeBairro.value = \"\";\r\n\t\t\tform.idLogradouro.value =\"\";\t\t\t\r\n\t\tcase 3://logradouro\r\n\t\t\tform.nomeLogradouro.value = \"\";\r\n\t\t\tform.CEP.value = \"\";\r\n\t\tcase 4://cep\r\n\t\t\tform.descricaoCep.value = \"\";\r\n\t}\r\n}", "function setCombo(id,url,filtro)\n\t{\n\t\tvar jId\t\t= '#'+id;\n\t\tvar jUrl\t= url+encodeURIComponent(filtro);\n\n\t\t$(jId).html(\"\"); \n\t\t$(\"<option value=\\\"o\\\"> -- Aguarde -- </option>\").appendTo(jId);\n\t\t$(jId).load(jUrl, function(resposta, status, xhr)\n\t\t{\n\t\t\tif (status=='success')\n\t\t\t{\n\t\t\t\t$(jId).html(\"\");\n\t\t\t\tvar jArrResposta = resposta.split(';');\n\t\t\t\t$(\"<option value=\\\"o\\\"> -- escolha uma opção -- </option>\").appendTo(jId);\n\t\t\t\t$.each(jArrResposta, function(i, linha)\n\t\t\t\t{\n\t\t\t\t\tvar jArrLinha = linha.split(',');\n\t\t\t\t\tif (jArrLinha[0]) $(\"<option value='\"+jArrLinha[0]+\"'>\"+jArrLinha[1]+\"</option>\").appendTo(jId);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}", "function contrato_selecionado_clicked(idContrato,id_campo){\n var idContrato = idContrato;\n var id_contrato = $(\"#no_contrato_infocarga_\"+idContrato).text();\n $(\"#contrato_asignado_\"+id_campo).val(id_contrato);\n $(\"#contrato_verificado_\"+id_campo).val(id_contrato);\n}", "function comboParceiro() {\r\n\r\n //Criar o HTML (option) para todos os parceiros\r\n let strHtml = \"<option value=''>Escolher</option>\"\r\n for (let i = 0; i < partners.length; i++) {\r\n strHtml += `<option value='${partners[i]._id}'>${partners[i]._name}</option>`\r\n }\r\n let selParceiro = document.getElementById(\"idSelParc\")\r\n selParceiro.innerHTML = strHtml\r\n}", "function afficheSelectDeux(){\r\n\tvar etabObj = document.getElementById('codeEtablissement');\r\n\twhile (etabObj.firstChild) {\r\n etabObj.removeChild(etabObj.firstChild);\r\n }\r\n\t\r\n\tvar etabLen = tabEtablissements.length;\r\n\tvar selLen = etabObj.options.length;\r\n\tvar lastEtab = \"\";\r\n\tetabObj.options[0] = new Option (\"Choisissez code\");\r\n\t\tselLen ++;\r\n\tfor (var i=1; i <= etabLen; i++) {\r\n var t = tabEtablissements[i-1];\r\n if (lastEtab != t.etablissement) {\r\n etabObj.options[selLen ++] = new Option(t.etablissement);\r\n lastEtab = t.etablissement;\r\n }\r\n }\r\n}", "function getFOptions_ProcesoPreNomina(idSelectOrigen, idSelectDestino, idChkDestino, nomina, codorganismo) {\r\n\tvar selectOrigen=document.getElementById(idSelectOrigen);\r\n\tvar optSelectOrigen=selectOrigen.options[selectOrigen.selectedIndex].value;\r\n\tvar selectDestino=document.getElementById(idSelectDestino);\r\n\tvar chkDestino=document.getElementById(idChkDestino);\r\n\tif (optSelectOrigen==\"\") {\r\n\t\tselectDestino.length=0;\r\n\t\tnuevaOpcion=document.createElement(\"option\");\r\n\t\tnuevaOpcion.value=\"\";\r\n\t\tnuevaOpcion.innerHTML=\"\";\r\n\t\tselectDestino.appendChild(nuevaOpcion);\r\n\t} else {\r\n\t\t//\tCREO UN OBJETO AJAX PARA VERIFICAR QUE EL NUEVO REGISTRO NO EXISTA EN LA BASE DE DATOS\r\n\t\tvar ajax=nuevoAjax();\r\n\t\tajax.open(\"POST\", \"fphp_selects.php\", true);\r\n\t\tajax.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\r\n\t\tajax.send(\"accion=getOptions_2&tabla=\"+idSelectDestino+\"&opcion=\"+optSelectOrigen+\"&nomina=\"+nomina+\"&codorganismo=\"+codorganismo+\"&ventana=PRENOMINA\");\r\n\t\tajax.onreadystatechange=function() {\r\n\t\t\tif (ajax.readyState==4)\t{\r\n\t\t\t\tselectDestino.parentNode.innerHTML=ajax.responseText;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "function SetParametroPorDefecto(atributo, valor, texto) {\n\t $(atributo).append($('<option>', {\n\t value: valor,\n\t text: texto\n\t }));\n\t}", "constructor(objeto) {\n\t\tthis.posicionamento = new posicionamento(objeto.linha, objeto.coluna);\n\t\tthis.sujo = objeto.sujo;\n\t\tthis.visitado = objeto.visitado;\n\t\tthis.listado = objeto.listado;\n\t}", "function loadCombos(data) {\n //edad\n $(\"#cbo_edad option\").remove();\n $(\"#cbo_edad\").append('<option value=\"0\">[seleccione Edad]</option>');\n $.each(data.edad, function (key, value) {\n $(\"#cbo_edad\").append(\"<option value=\" + value.val_valor + \">\" + value.tx_descripcion + \"</option>\");\n });\n //pais\n $(\"#cbo_pais option\").remove();\n $(\"#cbo_pais\").append('<option value=\"0\">[seleccione Pais]</option>');\n $.each(data.pais, function (key, value) {\n $(\"#cbo_pais\").append(\"<option value=\" + value.val_valor + \">\" + value.tx_descripcion + \"</option>\");\n });\n //estudios\n $(\"#cbo_estudios option\").remove();\n $(\"#cbo_estudios\").append('<option value=\"0\">[seleccione Estudios]</option>');\n $.each(data.estudios, function (key, value) {\n $(\"#cbo_estudios\").append(\"<option value=\" + value.val_valor + \">\" + value.tx_descripcion + \"</option>\");\n });\n //Color cabello\n $(\"#cbo_pelo option\").remove();\n $(\"#cbo_pelo\").append('<option value=\"0\">[seleccione Color cabello]</option>');\n $.each(data.color_cabello, function (key, value) {\n $(\"#cbo_pelo\").append(\"<option value=\" + value.val_valor + \">\" + value.tx_descripcion + \"</option>\");\n });\n\n //Color ojos\n $(\"#cbo_ojos option\").remove();\n $(\"#cbo_ojos\").append('<option value=\"0\">[seleccione Color ojos]</option>');\n $.each(data.color_ojos, function (key, value) {\n $(\"#cbo_ojos\").append(\"<option value=\" + value.val_valor + \">\" + value.tx_descripcion + \"</option>\");\n });\n\n //Estatura\n $(\"#cbo_estatura option\").remove();\n $(\"#cbo_estatura\").append('<option value=\"0\">[seleccione Estatura]</option>');\n $.each(data.estatura, function (key, value) {\n $(\"#cbo_estatura\").append(\"<option value=\" + value.val_valor + \">\" + value.tx_descripcion + \"</option>\");\n });\n //Peso\n $(\"#cbo_peso option\").remove();\n $(\"#cbo_peso\").append('<option value=\"0\">[seleccione Peso]</option>');\n $.each(data.peso, function (key, value) {\n $(\"#cbo_peso\").append(\"<option value=\" + value.val_valor + \">\" + value.tx_descripcion + \"</option>\");\n });\n}", "function gestionaCombo(combo, idBusiness, dto, valoresEntrada, funcion, valorSeleccionar) {\n\t//if (eval('document.'+combo) != undefined) {\n\t\tif (valorSeleccionar != '') {\n \t\tasignar([[\"COMBO\", combo, \"ConectorDruidaTransactionQuery\", \n \t\t\t'dtoSalida.resultado_ROWSET', formarCadenaDT(idBusiness, dto, valoresEntrada), funcion]],\"\",\"\");\n\t\t} else {\n \t\trecargaCombo(combo, idBusiness, dto, valoresEntrada);\n \t}\n //}\n}", "function initListeEquipeByCours() {\n const choixEquipeString = \"<option value=''>--- Choissez une équipe ---</option>\";\n var msg = \"Veuillez séléctionner un cours\";\n /* Recupere le id du cours selectionne */\n var idCours = $(\"#listeCoursSelect\").val();\n /* Vérifier qu'un cours valide est selectionne */\n if (idCours > 0) {\n $(\"#listeCoursSelect\").removeClass(\"is-invalid\");\n $(\"#listeCoursSelect\").addClass(\"is-valid\");\n /* Envoie le id du cours pour recuperer toutes les \n * equipes de ce cours */\n var idEquipe, nomEquipe;\n var result = \"\";\n var operation = $(\"#operationControleur\").val();\n var idEquipeArray = [];\n $.ajax({\n type: \"GET\",\n url: \"ControleurProjets\",\n data: {idCours: idCours, operation: operation},\n success: function (listeEquipes) {\n /* Init le select box de la liste d'equipe */\n $(\"#listeEquipeSelect\").empty();\n result += choixEquipeString;\n listeEquipes.forEach(function (equipe) {\n idEquipeArray.push(equipe.id_Equipe);\n });\n equipeDejaAvecProjet(listeEquipes, idEquipeArray);\n },\n statusCode: {\n 400: function () {\n alert('AJAX 400 status code! user error');\n },\n 500: function () {\n alert('AJAX 500 status code! server error');\n }\n }\n });\n }\n /* Lorsque 'Choissisez un cours' est selectionne */\n else {\n $(\"#listeCoursSelect\").addClass(\"is-invalid\");\n $(\"input_choixCours\").append($(\"#ChoixCoursError\").text(msg).addClass(\"invalid-feedback\"));\n }\n}", "function cargarCgg_res_beneficiarioCtrls(){\n if(inInfoPersona.CRPER_CODIGO_AUSPICIANTE != undefined && inInfoPersona.CRPER_CODIGO_AUSPICIANTE.length>0){\n if(inInfoPersona.CRPJR_CODIGO.length>0)\n {\n txtCrper_codigo.setValue(inInfoPersona.CRPJR_RAZON_SOCIAL);\n tmpAuspiciantePJ = inInfoPersona.CRPJR_CODIGO;\n txtCrpjr_representante_legal.setValue(inInfoPersona.CRPER_NOMBRE_AUSPICIANTE);\n tmpAuspiciante= inInfoPersona.CRPER_CODIGO_AUSPICIANTE;\n rdgTipoAuspiciante.setValue('rdgTipoAuspiciante',TypeAuspiciante.JURIDICA);\n }\n else\n {\n txtCrper_codigo.setValue(inInfoPersona.CRPER_NOMBRE_AUSPICIANTE);\n tmpAuspiciante= inInfoPersona.CRPER_CODIGO_AUSPICIANTE;\n rdgTipoAuspiciante.setValue('rdgTipoAuspiciante',TypeAuspiciante.NATURAL);\n }\n }\n }", "function crearSelectBox(activaSelect) {\n var table = \"\";\n var conte = document.getElementById('ContenedorPrincipal');\n\n var element = conte.querySelectorAll('div[persist]');\n\n for (var i = 0; i < element.length; i++) {\n $('#' + element[i].id).dxSelectBox({\n dataSource: [\"\"],\n searchEnabled: true,\n placeholder: \"Seleciona\",\n });\n if (propSource || propSourceDetalle) {\n\n var keyDataSource;// = JSON.stringify(propSource[element[i].getAttribute('source')]);\n var keySrc;// = JSON.parse(keyDataSource);\n if (propSource[element[i].getAttribute('source')]) {\n keyDataSource = JSON.stringify(propSource[element[i].getAttribute('source')]);\n keySrc = JSON.parse(keyDataSource);\n } else if (propSourceDetalle[element[i].getAttribute('source')]) {\n keyDataSource = JSON.stringify(propSourceDetalle[element[i].getAttribute('source')]);\n keySrc = JSON.parse(keyDataSource);\n }\n if (keySrc[\"requerido\"]) {\n // sele.inputAttr({ required: keySrc[\"requerido\"] });\n $(\"#\" + element[i].id + \" input\").attr(\"required\", keySrc[\"requerido\"]);\n }\n if (keySrc[\"llave\"]) {\n //sele.inputAttr({ isKey: keySrc[\"llave\"] });\n $(\"#\" + element[i].id + \" input\").attr(\"isKey\", keySrc[\"llave\"]);\n // element.setAttribute(\"isKey\", keySrc[\"llave\"]);\n }\n //var datos = new Array();\n //if (keySrc[\"campo\"]) {\n // var campo = keySrc[\"campo\"].toString();\n // if (campo.includes(\"_ID\")) {\n // table = campo.replace(\"_ID\", \"\");\n // table = table.charAt(0).toUpperCase() + table.slice(1);\n // if (table === \"Empleado\") {\n // table = table + \"s\";\n // }\n // $(\"#\" + element[i].id + \" input\").attr(\"Table\", table);\n // var resultado = undefined;\n // if (keySrc[\"campo\"] !== \"periodosNomina_ID\" && keySrc[\"campo\"] !== \"concepNomDefi_ID\") {\n // resultado = searchAll(table);\n // }\n // if (resultado !== undefined && resultado.length > 0) {\n\n // var configCaptura = JSON.parse(keySrc['configuracionTipoCaptura']);\n // var valores = configCaptura['origenes'];\n // for (var j = 0; j < resultado.length; j++) {\n // if (campo === 'tipoNomina_ID' || campo === 'tipoCorrida_ID') {\n // if (valores['campovalor1'] !== \"\" && valores['campovalor2'] !== \"\") {\n // var datos2 = {};\n // datos2['id'] = resultado[j]['id'];\n // datos2[valores['campovalor1'] + valores['campovalor2']] = resultado[j][valores['campovalor1']] + \"-\" + resultado[j][valores['campovalor2']];\n // datos[j] = datos2;\n // $('#' + element[i].id).dxSelectBox({\n // valueExpr: \"id\",\n // displayExpr: valores['campovalor1'] + valores['campovalor2'],\n // valueChangeEvent: 'id',\n // searchEnabled: true\n\n // });\n // } else if (valores['campovalor1'] !== \"\") {\n // var datos2 = {};\n // datos2['id'] = resultado[j]['id'];\n // datos2[valores['campovalor1']] = resultado[j][valores['campovalor1']];\n\n // datos[i] = datos2;\n // $('#' + element[i].id).dxSelectBox({\n // valueExpr: \"id\",\n // displayExpr: valores['campovalor1'],\n // valueChangeEvent: 'id',\n // searchEnabled: true\n\n // });\n // } else {\n // var datos2 = {};\n // datos2['id'] = resultado[j]['id'];\n // datos2['descripcion'] = resultado[j]['descripcion'];\n\n // datos[j] = datos2;\n // $('#' + element[i].id).dxSelectBox({\n // valueExpr: \"id\",\n // displayExpr: \"descripcion\",\n // valueChangeEvent: 'id',\n // searchEnabled: true\n\n // });\n // }\n // } else {\n // if (tabla === 'Empleados') {\n // if (valores['campovalor1'] !== \"\" && valores['campovalor2'] !== \"\") {\n // var datos2 = {};\n // datos2['id'] = resultado[j]['id'];\n // datos2[valores['campovalor1'] + valores['campovalor2']] = resultado[j][valores['campovalor1']] + \"-\" + resultado[j][valores['campovalor2']];\n // datos[j] = datos2;\n // $('#' + element[i].id).dxSelectBox({\n // valueExpr: \"id\",\n // displayExpr: valores['campovalor1'] + valores['campovalor2'],\n // valueChangeEvent: 'id',\n // searchEnabled: true\n\n // });\n // } else if (valores['campovalor1'] !== \"\") {\n // var datos2 = {};\n // datos2['id'] = resultado[i]['id'];\n // datos2[valores['campovalor1']] = resultado[j][valores['campovalor1']];\n\n // datos[j] = datos2;\n // $('#' + element[i].id).dxSelectBox({\n // valueExpr: \"id\",\n // displayExpr: valores['campovalor1'],\n // valueChangeEvent: 'id',\n // searchEnabled: true\n\n // });\n // } else {\n // var datos2 = {};\n // datos2['id'] = resultado[j]['id'];\n // datos2['nombre'] = resultado[j]['nombre'];\n\n // datos[j] = datos2;\n // $('#' + element[i].id).dxSelectBox({\n // valueExpr: \"id\",\n // displayExpr: \"nombre\",\n // valueChangeEvent: 'id',\n // searchEnabled: true\n\n // });\n // }\n\n // } else {\n\n // if (valores['campovalor1'] !== \"\" && valores['campovalor2'] !== \"\") {\n // var datos2 = {};\n // datos2['id'] = resultado[j]['id'];\n // datos2[valores['campovalor1'] + valores['campovalor2']] = resultado[j][valores['campovalor1']] + \"-\" + resultado[j][valores['campovalor2']];\n // datos[j] = datos2;\n // $('#' + element[i].id).dxSelectBox({\n // valueExpr: \"id\",\n // displayExpr: valores['campovalor1'] + valores['campovalor2'],\n // valueChangeEvent: 'id',\n // searchEnabled: true\n\n // });\n // } else if (valores['campovalor1'] !== \"\") {\n // var datos2 = {};\n // datos2['id'] = resultado[j]['id'];\n // datos2[valores['campovalor1']] = resultado[j][valores['campovalor1']];\n\n // datos[j] = datos2;\n // $('#' + element[i].id).dxSelectBox({\n // valueExpr: \"id\",\n // displayExpr: valores['campovalor1'],\n // valueChangeEvent: 'id',\n // searchEnabled: true\n\n // });\n // } else {\n // var datos2 = {};\n // datos2['id'] = resultado[j]['id'];\n // datos2['descripcion'] = resultado[j]['descripcion'];\n\n // datos[j] = datos2;\n // $('#' + element[i].id).dxSelectBox({\n // valueExpr: \"id\",\n // displayExpr: \"descripcion\",\n // valueChangeEvent: 'id',\n // searchEnabled: true\n\n // });\n // }\n\n // }\n // }\n // }\n // //console.log(element[i].getAttribute('Selector'));\n // if (element[i].getAttribute('Selector') === \"true\") {\n // $('#' + element[i].id).dxSelectBox({\n // dataSource: datos,\n // searchEnabled: true,\n // onValueChanged: function(e) {\n // busquedaFiltros(table, activaSelect);\n // }\n\n // });\n // } else {\n // $('#' + element[i].id).dxSelectBox({\n // dataSource: datos,\n // searchEnabled: true,\n // //onValueChanged: function (e) {\n // // busquedaFiltros(table, activaSelect);\n // //}\n\n // });\n // }\n // }\n // } else {\n // var configu = JSON.parse(keySrc['configuracionTipoCaptura']);\n // if (configu['tipoCaptura'] === \"2\") {\n // var valores = configu['lista'];\n // for (var j = 0; j < valores.length; j++) {\n // var datos2 = {};\n // datos2['id'] = valores[j];\n // datos2[valores[j]] = valores[j];\n\n // datos[j] = datos2;\n // // datos[i] = valores[i];\n // }\n // $('#' + element[i].id).dxSelectBox({\n // dataSource: datos,\n // searchEnabled: true,\n // valueExpr: \"id\",\n // valueChangeEvent: 'id'\n // //onValueChanged: function (e) {\n // // busquedaFiltros(table, activaSelect);\n // //}\n\n // });\n // } else if (configu['tipoCaptura'] === \"3\") {\n // var valores = configu['equivalencias'];\n // for (var key in valores) {\n // var datos2 = {};\n // datos2['id'] = key;\n // datos2[valores[key]] = valores[key];\n\n // //datos[j] = datos2;\n // datos[datos.length] = datos2;\n // }\n // }\n // $('#' + element[i].id).dxSelectBox({\n // dataSource: datos,\n // searchEnabled: true,\n // valueExpr: \"id\",\n // valueChangeEvent: 'id'\n // //onValueChanged: function (e) {\n // // busquedaFiltros(table, activaSelect);\n // //}\n\n // });\n\n // }\n\n //}\n\n }\n\n $(\"#\" + element[i].id + \" input\").attr(\"source\", element[i].getAttribute('source'));\n $(\"#\" + element[i].id + \" input\").attr(\"persist\", element[i].getAttribute('persist'));\n }\n\n\n\n}", "function verTodos() {\n\n document.getElementById(\"txtNombreFiltroCargo\").value = '';\n document.getElementById(\"selArea2\").value = '-1';\n listarCargos(1);\n}", "function obtenerTipoMoneda() {\n $(\"#cboTipMoneda\").val('1').trigger('change.select2');\n document.getElementById('txtidTipMonedaCTA').value = $('#cboTipMoneda').val();\n document.getElementById(\"cboTipoApertura\").disabled = false;\n document.getElementById(\"chkDefDep\").disabled = false;\n document.getElementById(\"chkRepSal\").disabled = false;\n document.getElementById('txtMontoMinimo').value = '0.00';\n }", "constructor()\n {\n this.unidad = 0\n this.subida1 = 0\n this.subida2 = 0\n this.subida3 = 0\n this.bajada1 = 0\n this.bajada2 = 0\n this.bajada3 = 0\n this.error = 0\n this.oContadorAjuste=new cContadorAjuste()\n }", "function llenarCooperantes(){\n var datos = {\n \"opcion\": 21,\n \"tipo\": 1\n };\n\n $.ajax({\n async: true,\n type: \"POST\",\n url: \"../class/registrarProyecto.php\",\n data: datos,\n dataType: \"html\",\n success: function(data){\n\n var combo= '';\n var response = JSON.parse(data);\n for(var index = 0; index < response.length; index++){\n combo += \"<option selected value='\" + response[index].codigo + \"'>\" + response[index].nombre + \"</option>\";\n }\n $(\"#nuevoCooperanteCombo\").html(combo);\n },\n timeout: 4000\n });\n }", "function initproducto() {\n q = {};\n q.ke = _ucode;\n q.lu = _ulcod;\n q.ti = _utval;\n nombre = $(\"#nombre\");\n allFields = $([]).add(nombre);\n tips = $(\".validateTips\");\n $('#dynamictable').dataTable({\n \"sPaginationType\": \"full_numbers\"\n });\n $(\"#crearproducto\").button().click(function() {\n q.id = 0;\n $(\"#dialog-form\").dialog(\"open\");\n });\n\n $(\"#dialog-form\").dialog({\n autoOpen: false,\n height: 670,\n width: 560,\n modal: true,\n buttons: {\n \"Guardar\": function() {\n var bValid = true;\n allFields.removeClass(\"ui-state-error\");\n if ($('#cantidad').val() == \"\") {\n bValid = false;\n updateTips('Debe ingresar el cantidad de unidades.');\n }\n if ($('#precio').val() == \"\") {\n bValid = false;\n updateTips('Debe ingresar el precio.');\n }\n if ($('#idcategoria').val() == \"seleccione\") {\n bValid = false;\n updateTips('Debe seleccionar una categoría.');\n }\n if ($('#nombre').val() == \"\") {\n bValid = false;\n updateTips('Debe ingresar el nombre.');\n }\n if (bValid) {\n PRODUCTO.savedata();\n }\n },\n \"Cancelar\": function() {\n UTIL.clearForm('formcreate1');\n $(this).dialog(\"close\");\n }\n },\n close: function() {\n UTIL.clearForm('formcreate1');\n updateTips('');\n }\n });\n PRODUCTO.getcategoria();\n}", "function initnom_categoria() {\n q = {};\n q.ke = _ucode;\n q.lu = _ulcod;\n q.ti = _utval;\n nombre = $(\"#nombre\");\n allFields = $([]).add(nombre);\n tips = $(\".validateTips\");\n\n $('#dynamictable').dataTable({\n \"sPaginationType\": \"full_numbers\"\n });\n\n $(\"#crearcategoria\").button().click(function() {\n q.id = 0;\n $(\"#dialog-form\").dialog(\"open\");\n });\n\n $(\"#dialog-form\").dialog({\n autoOpen: false,\n height: 250,\n width: 500,\n modal: true,\n buttons: {\n \"Guardar\": function() {\n var bValid = true;\n allFields.removeClass(\"ui-state-error\");\n if ($('#nombre').val() == \"\") {\n bValid = false;\n updateTips('Debe ingresar el nombre.');\n }\n if (bValid) {\n CATEGORIA.savedata();\n }\n },\n \"Cancelar\": function() {\n $(this).dialog(\"close\");\n }\n },\n close: function() {\n UTIL.clearForm('formcreate1');\n updateTips('');\n }\n });\n}", "function limpiarDatos()\n{\n $('#id').val('');\n $('#RUC_PROV').val('');\n $('#NOMBRE_PROV').val('');\n $('#RAZON_SOCIAL_PROV').val('');\n $('#DIRECCION_PROV').val('');\n $('#TELEFONO_PROV').val('');\n $('#CORREO_PROV').val('');\n $('#NACIONALIDAD_PROV').val('');\n $('#PROVINCIA_PROV').val('');\n $('#CIUDAD_PROV').val('');\n $('#DEMORA_ENTREGA').val('');\n $('#lstErrores').empty();\n}", "function cargar_Provincias(datos_provincias) {\r\n\tvar texto_aconvertir = \"{'provincias':\" + datos_provincias + \"}\";\r\n\tvar objeto_provincias = eval('(' + texto_aconvertir + ')');\r\n\tvar lista_provincias = document.getElementById(\"provincias\");\r\n\tlista_provincias.options.length = 0;\r\n\tvar posiciones = objeto_provincias.provincias.length;\r\n\tfor (var i = 0; i < posiciones; i++) {\r\n\t\topcion = document.createElement('option');\r\n\t\ttexto_opcion = document\r\n\t\t\t\t.createTextNode(objeto_provincias.provincias[i].provincia);\r\n\t\topcion.appendChild(texto_opcion);\r\n\t\topcion.value = objeto_provincias.provincias[i].codigoProvincia;\r\n\t\tlista_provincias.appendChild(opcion);\r\n\t}\r\n\t// REINICIO DE LOS MUNICIPIOS SI SE CAMBIA DE PAIS\r\n\tif (objeto_provincias.provincias[0].codigoProvincia = -1) {\r\n\t\tvar lista_municipios = document.getElementById(\"municipios\");\r\n\t\tlista_municipios.options.length = 0;\r\n\t\topcion = document.createElement('option');\r\n\t\ttexto_opcion = document.createTextNode(\"Seleccione una provincia\");\r\n\t\topcion.appendChild(texto_opcion);\r\n\t\topcion.value = -1;\r\n\t\tlista_municipios.appendChild(opcion);\r\n\t}\r\n}", "function cambiarCiudad(id_p){\n\t$.post(\"/contacts/get_city\",{id_pais:id_p},function(data){\n\t\tvar obj_int = jQuery.parseJSON(data);\n\t\tvar opciones = \"\";\n\t\tif(obj_int){\n\t\t\t$.each(obj_int, function(i, item) {\t\n\t\t\t\t//console.log(item);\n\t\t\t\topciones += '<option value=\"'+item.id+'\">'+item.name+'</option>';\n\t\t\t});\n\n\t\t}\t\n\t\t$(\".cbo-city\").html(opciones);\n\t\t\n\t\t\n\t});\n}", "function loadComboBoxJogos() {\n $.ajax({\n url: 'Comanda',\n method: 'GET',\n data: {\n 'menu': 'CarregarJogos'\n },\n success: function (data) {\n if (data != \"\" && data != undefined) {\n data = JSON.parse(data);\n for (var i = 0; i < data.length; i++) {\n $('#jogos').append('<option value=' + data[i].id + '>' + data[i].jogo + '</option>');\n }\n }\n }\n });\n}", "function agregarComentario(id_miembro){\n\n\n res= document.getElementById(\"comentar\").value; //Se toma a traves del id, el comentario realizado(valor).\n document.getElementById(\"mostrarComentario\").innerHTML+= res + \"<br>\"; //Hace visible el comentario relizado.\n\tres= document.getElementById(\"comentar\").value= \"\";//Despues que se genera el click vuelve al valor original.\n}", "function ControlliPagamento(contr) {\r\n var PranzoAbbonamento = document.getElementById(\"AbbonamentoPranzo\");\r\n \tvar CenaAbbonamento = document.getElementById(\"AbbonamentoCena\");\r\n\t\t\tif (IsStringNumeric(document.getElementById(\"prezzoCenaFinale\").innerHTML)) {\r\n\t\t\t\tCostoCenaFinale = document.getElementById(\"prezzoCenaFinale\").innerHTML;\r\n\t\t\t} else {\r\n\t\t\t\tCostoCenaFinale = \"10,00\";\r\n\t\t\t}\r\n\t\t\tif (IsStringNumeric(document.getElementById(\"prezzoCena\").innerHTML)) {\r\n\t\t\t\tCostoCena = document.getElementById(\"prezzoCena\").innerHTML;\r\n\t\t\t} else {\r\n\t\t\t\tCostoCena = \"3,00\";\r\n\t\t\t}\r\n\t\t\tif (IsStringNumeric(document.getElementById(\"prezzoPranzo\").innerHTML)) {\r\n\t\t\t\tCostoPranzo = document.getElementById(\"prezzoPranzo\").innerHTML;\r\n\t\t\t} else {\r\n\t\t\t\tCostoPranzo = \"3,00\";\r\n\t\t\t}\r\n\t\t\t//var Pranzo = null;\r\n\t\t\t//var PrezzoPranzo = null;\r\n\t\t\t//var GratisPranzo = null;\r\n\t\t\tvar cella = null;\r\n\t\t\t\r\n\t\t\tswitch (contr.name) {\r\n\t\t\t\tcase \"Pranzo[]\":\r\n\t\t\t\t\t// individuo i tre controlli nella cella\r\n\t\t\t\t\tcella = CercaControlliPranzo(contr)\r\n\t\t\t\t\t// controlla se l'utente ha selezionato il check gratis \r\n\t\t\t\t\tif (!PranzoAbbonamento.checked) {\r\n\t\t\t\t\t\tif (cella.Pranzo.checked) {\r\n\t\t\t\t\t\t\t//if (cella.CostoPranzo.value==\"\" || cella.CostoPranzo.value==\"0\") {\r\n\t\t\t\t\t\t\tcella.CostoPranzo.value = CostoPranzo;\r\n\t\t\t\t\t\t\tcella.CostoPranzo.disabled = false;\r\n\t\t\t\t\t\t\tcampoLocale = cella.CostoPranzo;\t\t\t\t// per fare funzionare la focus su FF\r\n\t\t\t\t\t\t\tsetTimeout(\"campoLocale.focus();\", 1);\t\t\t// per fare funzionare la focus su FF\r\n\t\t\t\t\t\t\tcella.CostoPranzo.select();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t cella.CostoPranzo.disabled=true;\r\n\t\t\t\t\t\t} \r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase \"Cena[]\":\r\n\t\t\t\t\t// individuo i tre controlli nella cella\r\n\t\t\t\t\tcella = CercaControlliCena(contr)\r\n\t\t\t\t\t// controlla se l'utente ha selezionato il check gratis \r\n\t\t\t\t\tif (!CenaAbbonamento.checked) {\r\n\t\t\t\t\t\tif (cella.Cena.checked) {\r\n\t\t\t\t\t\t\t//if (cella.CostoCena.value==\"\" || cella.CostoCena.value==\"0\") {\r\n\t\t\t\t\t\t\tcella.CostoCena.value=CostoCena;\r\n\t\t\t\t\t\t\tcella.CostoCena.disabled=false;\r\n\t\t\t\t\t\t\tcampoLocale = cella.CostoCena;\t\t\t\t\t\t// per fare funzionare la focus su FF\r\n\t\t\t\t\t\t\tsetTimeout(\"campoLocale.focus();\", 1);\t\t\t// per fare funzionare la focus su FF\r\n\t\t\t\t\t\t\tcella.CostoCena.select();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t cella.CostoCena.disabled=true;\r\n\t\t\t\t\t\t} \r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase \"GratisPranzo[]\":\r\n\t\t\t\t\t// individuo i tre controlli nella cella\r\n\t\t\t\t\tcella = CercaControlliPranzo(contr)\r\n\t\t\t\t\t// controlla se l'utente ha selezionato il check gratis \r\n\t\t\t\t\tif (!PranzoAbbonamento.checked) {\r\n\t\t\t\t\t\tif (cella.GratisPranzo.checked) {\r\n\t\t\t\t\t\t\tcella.Pranzo.checked = true;\r\n\t\t\t\t\t\t\tcella.Pranzo.disabled = true;\r\n\t\t\t\t\t\t\tcella.CostoPranzo.value = \"0,00\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tcella.Pranzo.checked = false;\r\n\t\t\t\t\t\t\tcella.Pranzo.disabled = false;\r\n\t\t\t\t\t\t\tcella.CostoPranzo.value=\"\";\r\n\t\t\t\t\t\t} \r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase \"GratisCena[]\":\r\n\t\t\t\t\t// individuo i tre controlli nella cella\r\n\t\t\t\t\tcella = CercaControlliCena(contr)\r\n\t\t\t\t\t// controlla se l'utente ha selezionato il check gratis \r\n\t\t\t\t\tif (!CenaAbbonamento.checked) {\r\n\t\t\t\t\t\tif (cella.GratisCena.checked) {\r\n\t\t\t\t\t\t\tcella.Cena.checked = true;\r\n\t\t\t\t\t\t\tcella.Cena.disabled = true;\r\n\t\t\t\t\t\t\tcella.CostoCena.value = \"0,00\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tcella.Cena.checked = false;\r\n\t\t\t\t\t\t\tcella.Cena.disabled = false;\r\n\t\t\t\t\t\t\tcella.CostoCena.value=\"\";\r\n\t\t\t\t\t\t} \r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tdocument.getElementById(\"CostoTotaleEuroCalcolato\").value = CalcolaCostoTotale().toFixed(2).replace(\".\", \",\");\r\n\t\t\treturn;\r\n\t\t}", "function getTiposIdentifica( idCombo ){\n var datosEnvio = new Array;\n datosEnvio.push({ name: \"opcion\" , value: '2' });\n $.ajax({\n url: 'crearCliente.php',\n dataType: 'json',\n type: 'POST',\n data: datosEnvio, \n success: function(s){\n //console.log(s);\n if( s != ''){ \n if( s.length >= 1 ){\n for(var i = 0; i < s.length; i++) {\n $(\"#\" + idCombo).append('<option value=\"'+s[i][0]+'\">'+s[i][1]+'</option>');\n \n /*oTableMandato.fnAddData([ s[i][0], \n s[i][1],\n s[i][2]\n ]);\t*/\n } // End For\t\n }\n }else{\n alert(\"Error cargando los tipos de identificacion. Recargue la página nuevamente.\");\n }\n }, error: function(e){ \n console.log(e.responseText);\t\n } \n }); \n}", "function renderComboBox($domCbo, items, msg) {\r\n\trenderComboBoxEmpty($domCbo, msg);// remove old options\r\n\tfor ( var i = 0; i < items.length; i++) {\r\n\t\tvar item = items[i];\r\n\t\tvar $domOption = $(\"<option value = '\" + item.id + \"'>\" + item.name\r\n\t\t\t\t+ \"</option>\");\r\n\t\t$domCbo.append($domOption);\r\n\t}\r\n}", "function carregaTipoGerencia(){\n\tvar unidade = DWRUtil.getValue(\"comboUnidade\"); \n\tFacadeAjax.getTiposGerenciaMeFirst(unidade,function(listBeans){\n\t\t\tDWRUtil.removeAllOptions(\"comboGerencia\");\n\t\t\tDWRUtil.addOptions(\"comboGerencia\", listBeans);\n\t\t})\n}" ]
[ "0.80524755", "0.67754775", "0.6702719", "0.66650796", "0.6597001", "0.6558983", "0.65227914", "0.64197606", "0.64086306", "0.6389258", "0.63877875", "0.6359854", "0.6277756", "0.6239082", "0.6176311", "0.6140267", "0.6090288", "0.6077477", "0.60774136", "0.60629165", "0.60490966", "0.60233027", "0.6018612", "0.6016722", "0.60099936", "0.599889", "0.59754926", "0.5954422", "0.5948429", "0.59470814", "0.5929723", "0.5925876", "0.5907497", "0.589658", "0.58937967", "0.5890955", "0.58898526", "0.58898336", "0.58854574", "0.5884408", "0.58835554", "0.58795166", "0.5877675", "0.5855672", "0.58553225", "0.58436865", "0.5843323", "0.5841655", "0.58355695", "0.58332956", "0.58318484", "0.5813402", "0.5812307", "0.58071023", "0.5781969", "0.57781404", "0.5768963", "0.5767138", "0.5766881", "0.57578784", "0.57518446", "0.5750246", "0.5748299", "0.57438636", "0.57347715", "0.5733016", "0.5719734", "0.5718191", "0.57169944", "0.57141435", "0.571005", "0.5709754", "0.5708045", "0.5707685", "0.57066864", "0.5705749", "0.57047576", "0.5703463", "0.5698297", "0.56958246", "0.56943434", "0.56939375", "0.56736004", "0.5668315", "0.56674755", "0.5656927", "0.56555897", "0.5645905", "0.5643107", "0.5633762", "0.5628928", "0.5628428", "0.5625362", "0.56239486", "0.5623729", "0.56235653", "0.5619032", "0.56171286", "0.561082", "0.56014675" ]
0.728498
1
hello.js Hello world in JavaScript.
function hello(name) { console.log('Hello, World! My name is ' + name + '.') }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function helloWorld() {\n console.log('hello javascript'); \n console.log('I like ruby more'); \n}", "function hello() {\r\n\tconsole.log(\"Hello World!\");\r\n}", "function hello() {\n console.log('hello world');\n }", "function hello() {\n console.log(\"Hello, World\");\n}", "function hello(){\r\n\tconsole.log(\"Hello World\");\r\n}", "function hello() {\n\treturn \"Hello, world!\"\n}", "function hello() {\n console.log(\"Hello, world!\");\n}", "function hello()\n{\n console.log('Hello World!');\n}", "function helloWorld() {\n\tconsole.log('Hello, World!');\n}", "function hello() {\n console.log('Hello world!')\n}", "function sayHello() {\n\tconsole.log(\"Hello\");\n}", "function sayHello() {\n console.log('hello world');\n}", "function sayHello() {\n console.log('Hello world!');\n}", "function sayHello() {\n console.log(\"Hello World!!\");\n}", "function sayHello() {\n console.log('Welcome to Javascript City!');\n}", "function hello(name) {\n\tconsole.log(\"Hello \" + name + \"!\");\n}", "function hello() {\n console.log(\"hello world\");\n}", "function sayHello(){\n console.log(\"hello!\");\n }", "function greeting(){\n\tconsole.log(\"hello\");\n}", "function helloWorld() {\n console.log('Hello, World!');\n}", "function helloWorld() {\n console.log('Hello, World!');\n}", "function hello() {\n console.log('Hello There!');\n}", "function greet() {\n console.log(\"Hello NODEJS\");\n}", "function sayhello(){\nconsole.log('Hello World!')\n}", "function helloWorld() {\n console.log('Hello world!');\n}", "function sayHello() {\n console.log(\"Hello\");\n}", "function helloWorld() {\n console.log(\"Hello world!\");\n}", "function sayHello() {\n console.log(\"Hello!\");\n}", "function sayHello() {\n console.log(\"Hello!\");\n}", "function greeting() {\n console.log(\"Hello World\");\n}", "function sayHello() {\n console.log('Hello!');\n}", "function hello() {\n console.log(\"hello\");\n}", "function sayHello() {\n console.log(\"Hello\");\n }", "function sayHello() {\n console.log(\"Hi\");\n}", "function sayHello() {\n console.log(\"Hello\");\n}", "function sayHello() {\n console.log(\"Hello\");\n}", "function greet(){\n\tconsole.log(\"Hello\");\n}", "function sayHello (){\n console.log(\"hello\");\n}", "function sayHello (){\n console.log('hello!');\n}", "function sayHello() {\r\n console.log(\"Hello\")\r\n}", "function sayHello() {\r\n console.log(\"hello 1\");\r\n}", "function greet (name) {\n console.log ('Hello World')\n}", "function sayHello() {\n console.log(\"Hi\");\n}", "function sayHello() {\n console.log('Hello');\n}", "function sayHello() {\n console.log('Hello');\n}", "function hello() {\n return 'Hello world';\n}", "function sayHello(){\n console.log('hello');\n}", "function sayHello() {\n\tvar greeting = \"Hello \" + name;\n\tconsole.log(greeting);\n}", "function helloWorld() {\n console.log('hello');\n}", "function simpleGreeting() {\n console.log(\"Hello Betty\");\n}", "function sayHello() {\n console.log( 'Hello there!' );\n}", "function sayHello() {\n console.log('sayHello');\n}", "function sayHi() {\n console.log(\"Hello\");\n}", "function sayHello() {\n console.log(\"Oh, Hello!\");\n}", "function greet() {\n console.log(\"Hello!\");\n}", "helloWorld () {\n console.log('hello world!')\n }", "function hello(name) {\n console.log('Hello ' + name)\n}", "function greetings(){\n console.log('Selamat belajar Javascript!');\n}", "function hello() {\n console.log('hi');\n}", "function helloWorld(){\n console.log(\"Hello World11\");\n}", "function hello() {\n return 'Hello World!';\n}", "function hello() {\n return 'Hello World!';\n}", "function hello() {\n return 'Hello World!';\n}", "function hello(name) {\n console.log(\"hello \" + name);\n}", "function hello() { return \"Hello\" }", "function sayHello() {\n console.log('Hello, ' + name);\n }", "function sayHello (name){\n\tconsole.log(\"hello there \" + name + \"!\");\n}", "function helloWorld() {\n return \"Hello World\";\n}", "function hi() {\n console.log('Say Hello');\n}", "function greet() {\n console.log(\"Hello there!\");\n}", "greet() { console.log(\"hello\"); }", "function greet(){\n\tconsole.log(\"hi\");\n}", "function greet(){\n\tconsole.log(\"hi\");\n}", "function greeting() {\n console.log(\"Hello Students.\");\n}", "function helloWorld () {\n return \"Hello World\";\n}", "function greet(){\r\n console.log(\"Hello there!\");\r\n}", "static helloWorld() {\r\n console.log('Hi there!');\r\n }", "function sayHi(){\n console.log('Hello');\n}", "function hello() {\n console.log(hello);\n}", "function hello() {\n return 'hello world';\n}", "function sayHello(name) { \n console.log(\"Hello, \"+name);\n }", "function sayHi(name){\n\tconsole.log(\"Hello \" + name);\n}", "function SayHello1(){\n console.log(\"hello world\");\n}", "function sayHello(name) {\n console.log('Hello ' + name);\n\n}", "function greet () {\n console.log(`Hello.`);\n}", "function sayHello() {}", "function greet(){\n console.log('hello!!');\n}", "function greet(){\r\n console.log('Hello Bellow');\r\n}", "function printHello() {\n console.log( \"Hello, World!\");\n }", "function hello() {\n return \"hello world\";\n}", "function helloWorld(name) {\r\n return \"hello world, \" + name\r\n}", "function greet() {\n console.log(\"HI\");\n}", "function greet() {\n console.log(\"hi!!\");\n}", "function hello(str) {\n console.log('Hello, ' + str);\n}", "function sayHello() {\n alert(\"Hello World!\");\n }", "function helloWord() {\n console.log(\"hello\");\n}", "function sayHello() {\n return \"Hello World!\";\n}", "function greet() {\n console.log('hi');\n}", "function greet() {\n console.log('hi');\n}", "function helloWorld() {\n return \"hello world\";\n}" ]
[ "0.8060585", "0.80592626", "0.80045366", "0.7967275", "0.79332227", "0.7868017", "0.7860543", "0.78283167", "0.78264123", "0.77858233", "0.77799135", "0.7742085", "0.773192", "0.7730461", "0.7712661", "0.7709662", "0.7703147", "0.76378775", "0.7625013", "0.761975", "0.761975", "0.7614053", "0.7602201", "0.75953925", "0.75793904", "0.75761086", "0.7565894", "0.75647044", "0.75647044", "0.75643635", "0.7557762", "0.7546368", "0.75350744", "0.753363", "0.7533514", "0.7533514", "0.75279117", "0.7521745", "0.75114834", "0.7510375", "0.75067014", "0.7495473", "0.7493695", "0.7493606", "0.7478273", "0.7475884", "0.74700433", "0.7466552", "0.74587566", "0.74288553", "0.742774", "0.7417445", "0.7385842", "0.73825204", "0.73777616", "0.7374295", "0.7363202", "0.73629725", "0.7353995", "0.7351737", "0.7332212", "0.7332212", "0.7332212", "0.7330023", "0.7314649", "0.7313299", "0.730515", "0.7294175", "0.7284892", "0.7261661", "0.72534835", "0.72525996", "0.72525996", "0.72485685", "0.72415787", "0.7240072", "0.7220067", "0.721908", "0.7211801", "0.7210739", "0.72073746", "0.7203502", "0.7202588", "0.7199048", "0.71920776", "0.7188708", "0.7179974", "0.7167634", "0.7161539", "0.71508276", "0.71452224", "0.7138817", "0.71338826", "0.7122531", "0.71212745", "0.71168524", "0.710872", "0.71083623", "0.71083623", "0.71076906" ]
0.73781604
54
==================================================== /Function: for dialog box to appear
function dialog(arg) { var x = document.createElement("DIALOG"); var t = document.createTextNode(arg); x.setAttribute("open", "open"); x.appendChild(t); document.body.appendChild(x); /*close dialog after 3sec*/ setTimeout(function(){ x.removeAttribute("open", "open"); /* x.setAttribute("close", "close");*/ }, 3000); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function display_dialogBox(dialogContentElement,message,title,buttons_to_display)\n{\n\t$(dialogContentElement).appendTo('body').html(message)\n\t.dialog(\n\t{\n\t\tmodal \t\t\t: true, \n\t\ttitle \t\t\t: title, \n\t\tzIndex \t\t\t: 10000, \n\t\tautoOpen \t\t: true,\n\t\twidth \t\t\t: 'auto', \n\t\theight \t\t\t: 'auto',\n\t\tresizable\t\t: false,\n\t\tcloseOnEscape\t: true,\n\t\tbuttons \t\t: buttons_to_display,\n\t\tclose \t\t\t: function (event, ui) \n\t\t{\n\t\t\t$(this).remove();\n\t\t}\n\t});\n}", "function showBox() {\n\n initializeState();\n\n jQuery('#calculations2').dialog( {\n autoOpen: true,\n// create: function(event) { jQuery(event.target).parent().css('position', 'fixed'); },\n width: 900,\n title: 'Calculations / Functions',\n modal: true,\n buttons: {\n \"Apply Calculations\": function() { \n apply_calculations();\n jQuery( this ).dialog( \"close\" );\n },\n Cancel: function() {\n jQuery( this ).dialog( \"close\" );\n }\n }\n });\n }", "function showDialog(){\n\t$.dialog.show();\n}", "function showDialog(status)\n{\n novel.dialog.style.visibility = status;\n}", "function showBox() {\n\n initializeState();\n\n jQuery('#calculations2').dialog( {\n autoOpen: true,\n width: 900,\n title: 'Calculations / Functions',\n modal: true,\n buttons: {\n \"Apply Calculations\": function() { \n apply_calculations();\n jQuery( this ).dialog( \"close\" );\n },\n Cancel: function() {\n jQuery( this ).dialog( \"close\" );\n }\n }\n });\n }", "function showDialog() {\r\ttry {\r\t\tvar win = new Window('dialog', localize(text.title));\r\r\t\t// description\r\t\twin.desc = win.add('panel');\r\t\twin.desc.orientation = 'row';\r\t\twin.desc.alignment = 'fill';\r\t\twin.desc.alignChildren = 'left';\r\r\t\twin.desc.coords = win.desc.add('group');\r\t\twin.desc.coords.orientation = 'row';\r\t\twin.desc.coords.add('statictext', undefined, localize(text.desc));\r\r\t\t// vertical guide settings\r\t\twin.vSettings = win.add('panel', undefined, localize(text.vSettings));\r\t\twin.vSettings.orientation = 'row';\r\t\twin.vSettings.alignment = 'fill';\r\t\twin.vSettings.alignChildren = 'center';\r\r\t\twin.vSettings.coords = win.vSettings.add('group');\r\t\twin.vSettings.coords.orientation = 'row';\r\t\twin.vSettings.coords.add('statictext', undefined, \"x:\");\r\t\twin.vSettings.coords.input = win.vSettings.coords.add('edittext', undefined, \"\");\r\t\twin.vSettings.coords.input.preferredSize = [ 125, 20 ];\r\r\t\twin.vSettings.repeat = win.vSettings.add('group');\r\t\twin.vSettings.repeat.orientation = 'row';\r\t\twin.vSettings.repeat.checkBox = win.vSettings.repeat.add('checkbox', undefined, localize(text.repeat));\r\t\twin.vSettings.repeat.checkBox.value = true;\r\r\t\t// horizontal guide settings\r\t\twin.hSettings = win.add('panel', undefined, localize(text.hSettings));\r\t\twin.hSettings.orientation = 'row';\r\t\twin.hSettings.alignment = 'fill';\r\t\twin.hSettings.alignChildren = 'center';\r\r\t\twin.hSettings.coords = win.hSettings.add('group');\r\t\twin.hSettings.coords.orientation = 'row';\r\t\twin.hSettings.coords.add('statictext', undefined, \"y:\");\r\t\twin.hSettings.coords.input = win.hSettings.coords.add('edittext', undefined, \"\");\r\t\twin.hSettings.coords.input.preferredSize = [ 125, 20 ];\r\r\t\twin.hSettings.repeat = win.hSettings.add('group');\r\t\twin.hSettings.repeat.orientation = 'row';\r\t\twin.hSettings.repeat.checkBox = win.hSettings.repeat.add('checkbox', undefined, localize(text.repeat));\r\t\twin.hSettings.repeat.checkBox.value = true;\r\r\t\t// buttons\r\t\twin.buttons = win.add('group');\r\t\twin.buttons.orientation = 'row';\r\t\twin.buttons.alignment = 'center';\r\r\t\t// ok button\r\t\twin.okBtn = win.buttons.add('button', undefined, localize(text.ok));\r\t\twin.okBtn.onClick = function() {\r\t\t\tmakeGuides(win.hSettings.coords.input.text, 'Hrzn', win.hSettings.repeat.checkBox.value);\r\t\t\tmakeGuides(win.vSettings.coords.input.text, 'Vrtc', win.vSettings.repeat.checkBox.value);\r\t\t\twin.close();\r\t\t};\r\r\t\t// cancel button\r\t\twin.cancelBtn = win.buttons.add('button', undefined, localize(text.cancel));\r\t\twin.cancelBtn.onClick = function() {\r\t\t\twin.close();\r\t\t};\r\r\t\twin.show();\r\r\t} catch (error) {}\r}", "openDialog() {\n var message = this.getQuestion() + chalk.dim(this.messageCTA + ' Waiting...');\n this.screen.render(message, '');\n\n // Pause Readline to prevent stdin and stdout from being modified while the editor is showing\n this.rl.pause();\n this.dialog.open(this.endDialog.bind(this));\n }", "function showDialog() {\n var ui = HtmlService.createTemplateFromFile('Dialog')\n .evaluate()\n .setWidth(400)\n .setHeight(150);\n DocumentApp.getUi().showModalDialog(ui, DIALOG_TITLE);\n}", "function startMessage() {\r\n $(\"#intro\").dialog({\r\n modal: true,\r\n buttons: {\r\n No: optionNo,\r\n Yes: optionYes\r\n },\r\n });\r\n}", "function showConfirmationDialog() {\r\n\tconfirmationDialog = generateDialog(language.data.account_deleted, '<p>' + language.data.account_del_successful + '</p><input class=\"input-button\" type=\"submit\" id=\"okay\" value=\"' + language.data.okay + '\" />');\r\n\topenDialog(confirmationDialog);\r\n\t$('input#okay').click(function() {closeDialog(confirmationDialog);});\r\n}", "function showDialogBoxSymptoms() {\n let itemMainSymptome = showDialogBoxSymptomsLayout();\n document.getElementById(\"dialogBox\").innerHTML = itemMainSymptome;\n document.getElementById(\"dialogBox\").style.display = \"block\";\n}", "function show(name) {\r\n var dialogEl = $('#' + name),\r\n dialog = dialogs[name].dialog;\r\n\r\n // Show the dialog.\r\n dialogEl.show().addClass(\"in\");\r\n\r\n // Run onOpen function\r\n dialog.onOpen(dialogEl);\r\n\r\n // Check for auto close of dialog.\r\n dialog.autoClose();\r\n\r\n // Close on Esc key.\r\n checkEsc(name);\r\n\r\n // Close on Cancel button.\r\n dialogEl.find(\".cancel, .ok, .\" + settings.confirm.option_btn_class).on(\"click.dialog\", function () {\r\n close(name);\r\n });\r\n }", "function showOverlay(){\n \tjQuery('#processing').dialog('open');\n \tsetTimeout(validateInfo, 1500)\n }", "function EnviarAviso(){\n\t$(\"#dialogEnviarAviso\").dialog(\"open\");\n}", "function dialogBox() {\n // init, and early sanity checking\n if (documents.length == 0) {\n alert(LANG_ERR_DOC);\n return;\n }\n var doc = app.activeDocument;\n var sel = doc.selection;\n if(sel.length <= 1) {\n alert('Please select more than one object!');\n return;\n }\n\n // create dialog\n var dialog = new Window('dialog', SCRIPT_NAME + ' ' + SCRIPT_VERSION);\n dialog.preferredSize.width = 174;\n dialog.orientation = 'column';\n dialog.alignChildren = ['fill', 'fill'];\n dialog.opacity = DLG_OPACITY;\n\n // Value fields\n var checkbox = dialog.add(\"checkbox\", undefined, 'Align by X (else by Y)?');\n checkbox.value = true;\n\n // Buttons\n var btns = dialog.add('group');\n btns.alignChildren = ['fill', 'fill'];\n btns.orientation = 'column';\n \n var ok = btns.add('button', undefined, 'OK', { name: 'ok' });\n ok.helpTip = 'Press Enter to Run';\n var cancel = btns.add('button', undefined, 'Cancel', { name: 'cancel' });\n cancel.helpTip = 'Press Esc to Close';\n\n // button handles\n ok.onClick = function () { main(checkbox.value); dialog.close(); }\n cancel.onClick = function () { dialog.close(); }\n\n dialog.center();\n dialog.show();\n}", "function showDialog( title, content ) {\n\t\n\tvpWidth=winSize.width;\n\tvpHeight=winSize.height;\n\t\n\t// get dialog's width and height\n\tdialogWidth=$('dialog').getWidth();\n\tdialogHeight=$('dialog').getHeight();\n\t\n\t// calculate position\n\tdialogTop = (vpHeight/2) - (dialogHeight/2);\n\tdialogLeft = (vpWidth/2) - (dialogWidth/2);\n\t\n\t//Position the Dialog\n\tif (dialogTop < 0) {\n\t\t$('dialog').style.top = \"0px\";\n\t} else {\n\t\t$('dialog').style.top =dialogTop+\"px\";\n\t}\n\t$('dialog').style.left =dialogLeft+\"px\";\n\t\n\tif (vpHeight < 337) {\n\t\t$('dialog').style.height = vpHeight+\"px\";\n\t\t$('dialogcontent').style.height = (vpHeight-37)+\"px\";\n\t}\n\t\n\tif (isset(title)) {\n\t\t$('dialogtitle').innerHTML = $(title).innerHTML;\n\t}\n\tif (isset(content)) {\n\t\t$('dialogcontent').innerHTML = $(content).innerHTML;\n\t}\n\t\n\t$(dialog).setOpacity(0);\n\t$(dialog).setStyle({visibility: 'visible'});\n\tnew Effect.Opacity(\n\t\tdialog, { \n\t from: 0.0, \n\t to: 1.0,\n\t duration: 0.5\n\t }\n\t);\n\t\n}", "function ConfirmDialog(){\r\n\r\n \r\n \r\n }", "function showDialogBox() {\n $(\"#admin_pages\").addClass(\"blur_all\");\n $(\"#message_box\").fadeIn(\"fast\");\n // Add the yes or no box\n $(\"#message_box\").html(\"<div id=\\\"status_box\\\" class=\\\"container\\\"> <h3>Are you sure?</h3> <button type=\\\"submit\\\" id=\\\"yesButton\\\" class=\\\"btn btn-success\\\">Yes</button> <button type=\\\"submit\\\" id=\\\"noButton\\\" class=\\\"btn btn-danger\\\">No</button> </div>\");\n $('html, body').animate({\n scrollTop: $(\"#message_box\").offset().top\n }, 600);\n}", "function dialogOn() {\n document.getElementById(\"overlay\").style.display = \"block\";\n}", "function openDialog()\n{\n\tif (inviteOrCall==\"invite\")\n\t{\n\t\t$.dialog.buttonNames= ['Invite', 'Cancel'],\n\t\t$.dialog.message=\"Do you want to invite \"+ contact.getFullName();+\" to become a bofff ?\";\n\t\t$.dialog.show();\n\t}\n\telse\n\tif (inviteOrCall==\"call\")\n\t{\n\t\t$.dialog.buttonNames= ['Call', 'Cancel'],\n\t\t$.dialog.message=\"Are you sure want to call \"+ contact.getFullName()+\" on this number: \"+numberToCall+\" ?\";\n\t\t$.dialog.show();\n\t}\n\t\t\n}", "function showDuplicateMsg() {\n $(\"#worning-duplicate\").dialog(\"open\");\n }", "function mostrarDialogoConfirmacion(){\n\t$('#dialog-confirm-001').dialog('open');\n\treturn false;\n}", "function showDesignations(objTextBox, objLabel)\r\n{\r\n objDesignationInvokerTextBox = objTextBox;\r\n objDesignationInvokerLabel = objLabel;\r\n openModalDialog('../popup/cm_designation_search_listing.htm',screen.width-50,'400');\r\n return;\r\n}", "function OpenHelpDlgBox(pTitle, pBody) {\r\t$(\"body\").append(\"<div id=\\\"HelpDlgBox\\\">\" + pBody + \"</div>\");\r\t$(\"#HelpDlgBox\").dialog({\r\t\tbgiframe: true,\r\t\tautoOpen: true,\r\t\tmodal: true,\r\t\tresizable: false,\r\t\ttitle: pTitle,\r\t\twidth: Math.min(500, Math.max(400, screen.availWidth/2)),\r\t\tbuttons: { OK: function() { $(\"#HelpDlgBox\").dialog(\"close\"); }},\r\t\tclose: function() { $(\"#HelpDlgBox\").dialog(\"destroy\").remove(); }\r\t});\r}", "function ShowDetailsDialog(){\n $('#DetailsDialog').dialog('open');\n}", "function dialogBox(text) {\n\n //create a div to be turn into a dialog box\n let $dialog = $(`<div id='dialogdiv'></div>`).attr(`title`, `Greetings`);\n\n //add text to the div\n $dialog.append(`<p>${text}</p>`);\n\n //Add the div to the page\n $('body').append($dialog);\n\n //turn the div into a dialog box\n $dialog.dialog({\n\n //add a button to take the user to the ending screen\n buttons: {\n \"Close\": function() {\n setTimeout(recieveMessage, 3000);\n $(this).dialog(`close`);\n }\n },\n\n //contain within body\n containment: 'body',\n width: 300\n });\n\n $dialog.parent().offset({\n top: 0.5 * ($(window).height() - $dialog.parent().height()),\n left: 0.5 * ($(window).width() - $dialog.parent().width())\n });\n}", "function show_friend_request_dialog() {\n document.getElementById('friend_request_pop_up_background').style.display = \"block\";\n}", "makePromptVisible() {\n // Loads popup only if it is disabled.\n if (this.popupStatus === false) {\n $(\"#\" + this.options.popupID).hide().fadeIn(\"slow\");\n this.popupStatus = true;\n }\n }", "function displayDialog(opts) {\n\t\t\t// opts: type, state, label, content, cbOk, cbCancel\n\t\t\tif (typeof opts === 'object' && typeof opts.type === 'string' && typeof opts.state === 'string') {\n\t\t\t\tif ($('#CJModalDialog').get(0) !== undefined) {\n\t\t\t\t\tif (sys.autoCenter !== null) {\n\t\t\t\t\t\t// clear any autocenter intervals\n\t\t\t\t\t\twindow.clearInterval(sys.autoCenter);\n\t\t\t\t\t\tsys.autoCenter = null;\n\t\t\t\t\t}\n\t\t\t\t\t$('#CJModalDialog').remove();\n\t\t\t\t}\n\t\t\t\tswitch (opts.type) {\n\t\t\t\tcase 'progress':\n\t\t\t\t\t$('body').append(\n\t\t\t\t\t\t'<div id=\"CJModalDialog\">' +\n\t\t\t\t\t\t\t'<div class=\"innerBox\">' +\n\t\t\t\t\t\t\t\t'<div class=\"margins\">' +\n\t\t\t\t\t\t\t\t\t'<div class=\"label\"></div>' +\n\t\t\t\t\t\t\t\t\t'<div class=\"indicator\" style=\"background-position: 0px 0px\"></div>' +\n\t\t\t\t\t\t\t\t'</div>' +\n\t\t\t\t\t\t\t'</div>' +\n\t\t\t\t\t\t'</div>'\n\t\t\t\t\t);\n\t\t\t\t\t// setup our animated progress indicator\n\t\t\t\t\t$('#CJModalDialog .indicator').data('storage', {\n\t\t\t\t\t\thpos: 0\n\t\t\t\t\t});\n\t\t\t\t\tsys.autoCenter = window.setInterval(function () {\n\t\t\t\t\t\tvar $bar = $('#CJModalDialog .indicator'),\n\t\t\t\t\t\t\tdata = $bar.data('storage');\n\t\t\t\t\t\tif (data.hpos === undefined) {\n\t\t\t\t\t\t\tdata.hpos = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdata.hpos = (data.hpos < -32) ? 0 : data.hpos - 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$bar.css({\n\t\t\t\t\t\t\tbackgroundPosition: data.hpos + 'px 0px'\n\t\t\t\t\t\t});\n\t\t\t\t\t}, 50);\n\t\t\t\t\tif (typeof opts.label !== 'string') {\n\t\t\t\t\t\topts.label = 'Loading data...';\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'confirm':\n\t\t\t\t\t$('body').append(\n\t\t\t\t\t\t'<div id=\"CJModalDialog\">' +\n\t\t\t\t\t\t\t'<div class=\"innerBox\">' +\n\t\t\t\t\t\t\t\t'<div class=\"margins\">' +\n\t\t\t\t\t\t\t\t\t'<div class=\"label\"></div>' +\n\t\t\t\t\t\t\t\t\t'<div class=\"content\"></div>' +\n\t\t\t\t\t\t\t\t\t'<div class=\"buttons\">' +\n\t\t\t\t\t\t\t\t\t\t'<button type=\"button\" name=\"buttonCANCEL\" id=\"buttonCANCEL\" class=\"input_button\">Cancel</button>' +\n\t\t\t\t\t\t\t\t\t\t'<button type=\"button\" name=\"buttonOK\" id=\"buttonOK\" class=\"input_button\">OK</button>' +\n\t\t\t\t\t\t\t\t\t'</div>' +\n\t\t\t\t\t\t\t\t'</div>' +\n\t\t\t\t\t\t\t'</div>' +\n\t\t\t\t\t\t'</div>'\n\t\t\t\t\t);\n\t\t\t\t\t$('#CJModalDialog #buttonCANCEL').mouseup(function () {\n\t\t\t\t\t\tdisplayDialog({\n\t\t\t\t\t\t\ttype: 'confirm',\n\t\t\t\t\t\t\tstate: 'hide'\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t\tif (typeof opts.label !== 'string') {\n\t\t\t\t\t\topts.label = 'Please confirm...';\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'throw':\n\t\t\t\t\t$('body').append(\n\t\t\t\t\t\t'<div id=\"CJModalDialog\">' +\n\t\t\t\t\t\t\t'<div class=\"innerBox\">' +\n\t\t\t\t\t\t\t\t'<div class=\"margins\">' +\n\t\t\t\t\t\t\t\t\t'<div class=\"label\"></div>' +\n\t\t\t\t\t\t\t\t\t'<div class=\"content\"></div>' +\n\t\t\t\t\t\t\t\t\t'<div class=\"buttons\">' +\n\t\t\t\t\t\t\t\t\t\t'<button type=\"button\" name=\"buttonOK\" id=\"buttonOK\" class=\"input_button\">OK</button>' +\n\t\t\t\t\t\t\t\t\t'</div>' +\n\t\t\t\t\t\t\t\t'</div>' +\n\t\t\t\t\t\t\t'</div>' +\n\t\t\t\t\t\t'</div>'\n\t\t\t\t\t);\n\t\t\t\t\t$('#CJModalDialog #buttonOK').mouseup(function () {\n\t\t\t\t\t\tdisplayDialog({\n\t\t\t\t\t\t\ttype: 'throw',\n\t\t\t\t\t\t\tstate: 'hide'\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t\tif (typeof opts.label !== 'string') {\n\t\t\t\t\t\topts.label = 'The system encountered an throw...';\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (opts.state === 'show') {\n\t\t\t\t\t// display the background overlay\n\t\t\t\t\t$('#CJModalBGround').css({\n\t\t\t\t\t\tdisplay: 'block',\n\t\t\t\t\t\topacity: 0.65\n\t\t\t\t\t});\n\t\t\t\t\t$('#CJModalDialog .label').html(opts.label);\n\t\t\t\t\tif (typeof opts.content === 'string') {\n\t\t\t\t\t\tif (opts.type === 'throw') {\n\t\t\t\t\t\t\t$('#CJModalDialog .content').html('<div class=\"clearfix\"><span class=\"ui-icon ui-icon-throw\" style=\"float:left; margin:0 7px 20px 0;\"></span>' + opts.content + '</div></div>');\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$('#CJModalDialog .content').html(opts.content);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (typeof opts.content === 'object') {\n\t\t\t\t\t\tvar err_list = '';\n\t\t\t\t\t\t$.each(opts.content, function(err_idx) {\n\t\t\t\t\t\t\tif (typeof err_idx === 'string' && !(opts.content[err_idx] instanceof Function)) {\n\t\t\t\t\t\t\t\terr_list += '<p>' + opts.content[err_idx] + '</p>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\tif (err_list !== '' && opts.type === 'throw') {\n\t\t\t\t\t\t\t$('#CJModalDialog .content').html('<div class=\"clearfix\"><span class=\"ui-icon ui-icon-throw\" style=\"float:left; margin:0 7px 20px 0;\"></span>' + err_list + '</div></div>');\n\t\t\t\t\t\t} else if (err_list !== '') {\n\t\t\t\t\t\t\t$('#CJModalDialog .content').html(err_list);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$('#CJModalDialog .content').html('<div class=\"clearfix\"><span class=\"ui-icon ui-icon-throw\" style=\"float:left; margin:0 7px 20px 0;\"></span>An unknown error occurred. (Error message could not be determined)</div></div>');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (typeof opts.cbOk === 'function') {\n\t\t\t\t\t\t$('#CJModalDialog #buttonOK').mouseup(opts.cbOk);\n\t\t\t\t\t}\n\t\t\t\t\tif (typeof opts.cbCancel === 'function') {\n\t\t\t\t\t\t$('#CJModalDialog #buttonCANCEL').mouseup(opts.cbCancel);\n\t\t\t\t\t}\n\t\t\t\t\t$('#CJModalDialog').css({\n\t\t\t\t\t\ttop: (parseInt(($(window).height() / 2), 10) - parseInt($('#CJModalDialog').height() / 2, 10)) + 'px',\n\t\t\t\t\t\tleft: (parseInt(($(window).width() / 2), 10) - parseInt($('#CJModalDialog').width() / 2, 10)) + 'px'\n\t\t\t\t\t}).fadeIn();\n\t\t\t\t} else if (opts.state === 'hide') {\n\t\t\t\t\tif (sys.autoCenter !== null) {\n\t\t\t\t\t\t// clear any autocenter intervals\n\t\t\t\t\t\twindow.clearInterval(sys.autoCenter);\n\t\t\t\t\t\tsys.autoCenter = null;\n\t\t\t\t\t}\n\t\t\t\t\t// remove any click action that may have been attached.\n\t\t\t\t\t$('#CJModalDialog #buttonOK').off();\n\t\t\t\t\t$('#CJModalDialog #buttonCANCEL').off();\n\t\t\t\t\t// remove the dialog\n\t\t\t\t\t$('#CJModalDialog').remove();\n\t\t\t\t\t$('#CJModalBGround').css({\n\t\t\t\t\t\tdisplay: 'none'\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}", "show(){\n\t\tthis.autoFocus && this.saveFocus();\n\t\tif(atom && this.panel)\n\t\t\tthis.panel.show();\n\t\telse (\"dialog\" === this.elementTagName)\n\t\t\t? this.element.show()\n\t\t\t: this.element.hidden = false;\n\t\tthis.autoFocus && this.inputField.element.focus();\n\t}", "function showDialogAdd() {\n var title = 'Add Parts to Locations'; \n var templateName = 'addUi'; \n var width = 600; \n \n // custom function to insert part data into the dialog box. For code modularity and simplicity\n createDialogWithPartData(title,templateName,width);\n}", "function dialogBoxCheckDoc() {\n document.getElementById(\"checkDoc\").style.display = \"block\";\n}", "function showDialog() {\n printDebugMsg(\"Show dialog\");\n var ui = HtmlService.createTemplateFromFile('Dialog')\n .evaluate()\n .setWidth(400)\n .setHeight(190)\n .setSandboxMode(HtmlService.SandboxMode.IFRAME);\n SpreadsheetApp.getUi().showModalDialog(ui, DIALOG_TITLE);\n}", "function showJqueryUIDialog(msg,title,options){\n\t\tvar div=$('<div>')\n\t\tdiv.attr(\"title\",title);\n\t\tdiv.append(\"<p>\"+msg+\"</p>\");\n\t\tvar defaultOptions={\n\t\t\twidth: 600,\n\t\t\tmodal:true\t\t\n\t\t}\n\t\tdiv.dialog($.extend(defaultOptions,options));\n\t}//method", "function showOKDialog(title) {\r\n\r\n\tif(okDialog == undefined)\r\n\t{\r\n\t\tokDialog = $('<div></div>').dialog({\r\n\t\t\tautoOpen: true,\r\n\t\t\tdraggable: false,\r\n\t\t\tmodal: false,\r\n\t\t\ttitle: title,\r\n\t\t\tbuttons: {\r\n\t\t\t\t'OK': function() {\r\n\t\t\t\t\t$(this).dialog('close');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\telse\r\n\t\topenDialog(okDialog);\r\n}", "function displayPurchaseSuccessDialog() {\r\n // Prompt the user to buy the app by displaying a message dialog\r\n var messageDialog = new Windows.UI.Popups.MessageDialog(\"You now own the full version of Rustic Citrus! Enjoy!\", \"Purchase successful\");\r\n\r\n // Show the reset game button\r\n $(\"#resetGame\").show();\r\n\r\n // Show the message dialog\r\n messageDialog.showAsync();\r\n }", "function show_user_feedback_dialog() {\n document.getElementById('user_feedback_pop_up_background').style.display = \"block\";\n}", "function showExams(objTextBox, objLabel)\r\n{\r\n objExamInvokerTextBox = objTextBox;\r\n objExamInvokerLabel = objLabel;\r\n \r\n openModalDialog('../popup/cm_exam_search_listing.htm',screen.width-50,'400');\r\n return;\r\n}", "function showTemplateDialog() {\n\tvar dialog = document.getElementById('my-dialog');\n\t\n\tif (dialog) {\n\t\tdialog.show();\n\t\t} else {\n\t\tons.createElement('dialog.html', { append: true })\n\t\t.then(function(dialog) {\n\t\t\tdialog.show();\n\t\t});\n\t}\n}", "function showStartScreen(){ \n var dialogVariables = Dialogs.showDialog(new optionsDialog(), Constants.DIALOG_TYPE_WIZARD, \"Choose Attribute and Objects\"); \n return dialogVariables; \n}", "function showClickJQueryDialog(delement,dtitle,dcontent)\r\n{\r\n\tif (appDialog == null)\r\n\t{\r\n\t\tappDialog = createDialog(dtitle);\r\n\t\tappDialog.dialog('open');\r\n\t\tappDialog.dialog(\"option\", \"position\", 'center');\r\n\t\tappDialog.html(dcontent);\r\n\t} else\r\n\t{\r\n\t\tif(appDialog!= null)\r\n\t\t{\r\n\t\t\tappDialog.dialog('close');\r\n\t\t}\r\n\t\tappDialog = null;\r\n\t\tsetTimeout('', 500);\r\n\t}\t\t\r\n\r\n\r\n\tfunction createDialog(dtitle)\r\n\t{\r\n\t\tvar snxJqueryDialog = $('<div></div>').dialog({\r\n\t\t\t\tautoOpen : false,\r\n\t\t\t\ttitle : dtitle\r\n\t\t});\r\n\t\t\r\n\t\treturn snxJqueryDialog;\r\n\t}\r\n}", "function show_meal_share_dialog() {\n document.getElementById('share_meal_pop_up_background').style.display = \"block\";\n}", "function displayConfirmDialog(alertBoxId, msg, control1_href, control1_name, callback) {\n\t\n\tvar alertBox = $(\"#\" + alertBoxId);\n\t\t\n\t// clear any old alert\n\tclearAlerts();\n\t\n\t// call callback with state \"init\" if defined\n\tif ( typeof callback === \"function\" ) {\n\t\tcallback(alertBoxId, \"init\");\n\t\tmomo_alerts_callbacks.add(callback);\n\t}\n\t\n\t// pack the alert message into the alertbox\n\talertBox.find(\"p.alertMsg\").html(msg);\n\n\t//\n\t// wire up control and display controls\n\t\n\t// control 1\n\talertBox.find(\"a.control_1\").attr(\"href\", control1_href);\n\talertBox.find(\"a.control_1\").css(\"display\", \"inline\");\n\talertBox.find(\"a.control_1\").html(control1_name);\n\talertBox.find(\"a.control_1\").addClass(\"btn-danger\");\n\t\n\t// control 2 (cancel)\n\talertBox.find(\"a.control_2\").attr(\t\"href\",\n\t\t\t\t\t\t\t\t\t\t\"javascript:cancelConfirmDialog('\" + alertBoxId + \"');\"\n\t\t\t\t\t\t\t\t\t);\n\t\n\talertBox.find(\"a.control_2\").html(\"cancel\");\n\talertBox.find(\"a.control_2\").css(\"display\", \"inline\");\n\t\n\t\n\talertBox.find(\"div.controls\").css(\"display\", \"block\");\n\n\t// display as info message\n\talertBox.addClass('alert-info');\n\t\n\t// mark as active\n\talertBox.addClass(\"active\");\n\t\n\t// flag dialog as active\n\tactiveDialog = true;\n\t\t\t\n\t//\n\t// display dialog box\n\t// -- however, if it is visible already, we pulsate it instead (note: pulsate is part of \"jquery ui\")\n\t//\n\tif ( alertBox.css(\"display\") != \"block\" ) {\n\t\t// show the alert box\n\t\talertBox.css(\"display\", \"block\");\n\t}\n\telse {\n\t\tpulsateVisibleAlerts();\n\t}\n}", "function showDialog()\r\n{\r\n\t// Create a new dialog box with a single panel\r\n\tvar dialog = new Window(\"dialog\", \"Sprite Sheet Splitter\");\r\n\tvar sizePanel = dialog.add(\"panel\", [0,0,215,180], \"Sprite Sheet Size\");\r\n\r\n\t// Number of columns\r\n\tvar numColsLabel = sizePanel.add(\"statictext\", [25,25,150,35], \"Number of columns:\");\r\n\tvar numColsText = sizePanel.add(\"edittext\", [145,24,185,43], 4);\r\n\r\n\t// Number of rows\r\n\tvar numRowsLabel = sizePanel.add(\"statictext\", [25,55,150,65], \"Number of rows:\");\r\n\tvar numRowsText = sizePanel.add(\"edittext\", [145,54,185,73], 4);\r\n\tnumRowsLabel.enabled = false;\r\n\tnumRowsText.enabled = false;\r\n\r\n\t// Checkbox for making the number of cols/rows the same\r\n\tvar equalRowsLabel = sizePanel.add(\"statictext\", [25,85,150,95], \"Equal cols/rows:\");\r\n\tvar equalRowsBox = sizePanel.add(\"checkbox\", [145,85,175,105]);\r\n\tequalRowsBox.value = true;\r\n\r\n\t// When the checkbox is clicked, enable/disable the second input box\r\n\tequalRowsBox.onClick = function()\r\n\t{\r\n\t\tnumRowsLabel.enabled = !numRowsLabel.enabled; \r\n\t\tnumRowsText.enabled = !numRowsText.enabled; \r\n\t\t\r\n\t\tif(equalRowsBox.value == true)\r\n\t\t\tnumRowsText.text = numColsText.text;\r\n\t}\r\n\r\n\t// Make the number of rows match the number of columns if necessary\r\n\tnumColsText.onChanging = function()\r\n\t{\r\n\t\tif(equalRowsBox.value == true)\r\n\t\t\tnumRowsText.text = numColsText.text; \r\n\t}\r\n\r\n\t// Buttons for OK/Cancel\r\n\tvar okButton = sizePanel.add(\"button\", [25,125,100,150], \"OK\", {name:'ok'});\r\n\tvar cancelButton = sizePanel.add(\"button\", [110,125,185,150], \"Cancel\", {name:'cancel'});\r\n\r\n\t// Event handler for OK button\r\n\tokButton.onClick = function()\r\n\t{\r\n\t\tnumCols = parseInt(numColsText.text);\r\n\t\tnumRows = parseInt(numRowsText.text);\r\n\t\tdialog.close(0);\r\n\t}\r\n\r\n\t// Event handler for Cancel button\r\n\tcancelButton.onClick = function()\r\n\t{\r\n\t\tdialog.close();\r\n\t\tuserCancelled = true;\r\n\t}\r\n\r\n\tdialog.center();\r\n\tdialog.show();\r\n}", "function initDialog() {\n\t\t$( \".dialog-item-confirm\" ).dialog({\n\t\t\tdialogClass: 'centered-offset',\n\t\t\theight: \"auto\",\n\t\t\twidth: \"auto\",\n\t\t\tautoOpen: false,\n\t\t\tdraggable: false,\n\t\t\tresizable: false,\n\t\t\tmodal: true,\n\t\t\topen: function(){\n\t\t\t\t$('.ui-widget-overlay').hide().fadeIn(200);\n\t\t\t\tif (CURRENT_HP == MAX_HP) {\n\t\t\t\t\t$(\".ui-dialog .ui-dialog-buttonpane button:contains('Yes')\").button(\"disable\");\n\t\t\t\t\t$('.alert-info').html('<p><b>Info! </b>Your HP is full. You cannot use potions at max HP.</p>');\n\t\t\t\t\t$('.alert-info').show(200);\n\t\t\t\t}\n\t\t\t},\n\t\t\tshow: {\n\t\t\t\teffect: \"fade\",\n\t\t\t\tduration: 200\n\t\t\t},\n\t\t\tbuttons: {\n\t\t\t\t\"Yes\": function() {\n\t\t\t\t\tvar element = $(this).attr(\"id\");\n\t\t\t\t\tvar hasItem = updateItems(element);\n\t\t\t\t\t$(\".ui-dialog .ui-dialog-buttonpane button:contains('Yes')\").button(\"disable\");\n\t\t\t\t\t$(\".ui-dialog .ui-dialog-buttonpane button:contains('Cancel')\").text('Close');\n\t\t\t\t\tsetTimeout(function(){\n\t\t\t\t\t\tif (hasItem) {\n\t\t\t\t\t\t\tif (CURRENT_HP < MAX_HP) {\n\t\t\t\t\t\t\t\t$(\".ui-dialog .ui-dialog-buttonpane button:contains('Yes')\").button(\"enable\");\n\t\t\t\t\t\t\t\t$(\".ui-dialog .ui-dialog-buttonpane button:contains('Yes')\").blur();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$('.alert-info').html('<p><b>Info! </b>Your HP is full. You cannot use potions at max HP.</p>');\n\t\t\t\t\t\t\t\t$('.alert-info').show(200);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tvar name = \"\";\n\t\t\t\t\t\t\tif (element == \"potion\") { name = \"Potions\"; }\n\t\t\t\t\t\t\telse if (element == \"super-potion\") { name = \"Super Potions\"; }\n\t\t\t\t\t\t\telse if (element == \"hyper-potion\") { name = \"Hyper Potions\"; }\n\t\t\t\t\t\t\telse if (element == \"max-potion\") { name = \"Max Potions\"; }\n\t\t\t\t\t\t\t$('.alert-info').html('<p><b>Info! </b>You have no ' + name + ' left.</p>');\n\t\t\t\t\t\t\t$('.alert-info').show(200);\n\t\t\t\t\t\t}\n\t\t\t\t\t}, 1400);\n\t\t\t\t},\n\t\t\t\tCancel: function() {\n\t\t\t\t\t$(this).dialog( 'option', 'hide', { effect: \"fade\", duration: 200 } );\n\t\t\t\t\t$(this).dialog({ beforeClose: function() {\n\t\t\t\t\t\t$('.ui-widget-overlay:first')\n\t\t\t\t\t\t.clone()\n\t\t\t\t\t\t.appendTo('body')\n\t\t\t\t\t\t.show()\n\t\t\t\t\t\t.fadeOut(200, function(){ \n\t\t\t\t\t\t\t$(this).remove(); \n\t\t\t\t\t\t});\n\t\t\t\t\t}});\n\t\t\t\t\t$('.alert-info').hide(200);\n\t\t\t\t\t$(this).dialog( \"close\" );\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t$( \".dialog-quit-game\" ).dialog({\n\t\t\tdialogClass: 'centered',\n\t\t\theight: \"auto\",\n\t\t\twidth: \"auto\",\n\t\t\tautoOpen: false,\n\t\t\tdraggable: false,\n\t\t\tresizable: false,\n\t\t\tmodal: true,\n\t\t\topen: function(){\n\t\t\t\t$('.ui-widget-overlay').hide().fadeIn(200);\n\t\t\t\t$(\".ui-dialog .ui-dialog-buttonpane button:contains('Yes')\").button(\"enable\");\n\t\t\t\t$(\".ui-dialog .ui-dialog-buttonpane button:contains('Close')\").text('Cancel');\n\t\t\t},\n\t\t\tshow: {\n\t\t\t\teffect: \"fade\",\n\t\t\t\tduration: 200\n\t\t\t},\n\t\t\tbuttons: {\n\t\t\t\t\"Yes\": function() {\n\t\t\t\t\t//var innerWidth = window.innerWidth;\n\t\t\t\t\t//var outerWidth = window.outerWidth;\n\t\t\t\t\t//var padding = outerWidth - innerWidth;\n\t\t\t\t\t\n\t\t\t\t\t//$('.centered').css(\"left\", \"calc(50% - \" + padding + \"px)!important\");\n\t\t\t\t\t//$('.navbar-toggle').css(\"padding-right\", padding + \"px\");\n\t\t\t\t\t\n\t\t\t\t\t$(this).dialog( 'option', 'hide', { effect: \"fade\", duration: 200 } );\n\t\t\t\t\t$(this).dialog({ beforeClose: function() {\n\t\t\t\t\t\t$('.ui-widget-overlay:first')\n\t\t\t\t\t\t.clone()\n\t\t\t\t\t\t.appendTo('body')\n\t\t\t\t\t\t.show()\n\t\t\t\t\t\t.fadeOut(200, function(){\n\t\t\t\t\t\t\t$(this).remove(); \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// Hide all HUD elements\n\t\t\t\t\thideAll();\n\t\t\t\t\t\n\t\t\t\t\t// Close dialog box\n\t\t\t\t\t$(this).dialog( \"close\" );\n\t\t\t\t},\n\t\t\t\tCancel: function() {\n\t\t\t\t\t$(this).dialog( 'option', 'hide', { effect: \"fade\", duration: 200 } );\n\t\t\t\t\t$(this).dialog({ beforeClose: function() {\n\t\t\t\t\t\t$('.ui-widget-overlay:first')\n\t\t\t\t\t\t.clone()\n\t\t\t\t\t\t.appendTo('body')\n\t\t\t\t\t\t.show()\n\t\t\t\t\t\t.fadeOut(200, function(){ \n\t\t\t\t\t\t\t$(this).remove(); \n\t\t\t\t\t\t});\n\t\t\t\t\t}});\n\t\t\t\t\t$(this).dialog( \"close\" );\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "function showContracts()\r\n{\r\n openModalDialog('../popup/cm_contracts_search_listing.htm',screen.width-50,'400');\r\n \r\n return;\r\n}", "function areYouSure(){\n\t\t$(\"#stage\").append('<div id=\"dialog-removeContent\" title=\"Remove this item from the page.\"><p class=\"validateTips\">Are you sure that you want to remove this item from your page? <br/><br/>This cannot be undone!</div>');\n\n\t $(\"#dialog-removeContent\").dialog({\n modal: true,\n width: 550,\n close: function (event, ui) {\n $(\"#dialog-removeContent\").remove();\n },\n buttons: {\n Cancel: function () {\n $(this).dialog(\"close\");\n },\n Remove: function(){\n\t removeReveal();\n\t $(this).dialog(\"close\");\n }\n }\n });\n\t}", "function winMessage() {\n \tMODAL.style.display = 'block';\n }", "function showImport(){\n $(\"#import-dialog\").show();\n}", "function explainDQResolve() {\r\n\t$('#explain_resolve').dialog({ bgiframe: true, modal: true, width: 500, \r\n\t\tbuttons: {'Close':function(){$(this).dialog(\"close\");}}\r\n\t});\t\r\n}", "function launchConfirmPrompt() {\n $('.confirm-background').fadeIn();\n return;\n}", "function showAgents(objTextBox, objLabel)\r\n{\r\n objChannelTypeInvokerTextBox = objTextBox;\r\n objChannelTypeInvokerLabel = objLabel;\r\n openModalDialog('../popup/cm_agent_search_listing.htm',screen.width-50,'400');\r\n \r\n return;\r\n}", "function addDialog() {\n // Dynamically create a div and store it in a variable.\n //Set its title at the same time.\n let $dialog = $(`<div></div>`).attr(`title`, `WELCOME`);\n // Add a p tag to the dialog div that contains the question text\n $dialog.append(`<p>${welcomeDialog}</p>`);\n //add the div to the page\n $('body').append($dialog);\n //if \"yes\" is clicked, use is allowed into the webiste;\n //if \"no\" is clicked, nothing changes but user is not allowed to use the site\n $dialog.dialog({\n autoOpen: true,\n modal: true,\n dialogClass: 'no-close',\n buttons: {\n \"THANK YOU\": function() {\n $(this).dialog(`close`);\n },\n \"NO\": function() {\n $(this).parent().effect(`shake`);\n }\n },\n // contained within the body tag, and can't be dragged out of it.\n containment: 'body'\n });\n}", "function optionIHateYou() {\r\n // If the user rudely refuses\r\n // to play\r\n $(this).dialog(\"close\");\r\n setChoice(\"No\");\r\n $(\"#Ihateyou\").dialog({\r\n modal: true,\r\n buttons: {\r\n Ok: function() {\r\n // the body will empty and\r\n // turn black\r\n $('body').empty();\r\n $('body').css(\"background-color\", \"black\");\r\n }\r\n }\r\n });\r\n}", "function showCvvRequiredPopup(){\n\tshowAnimatedPopup('cvvFill', 'mainContainIdNewPop');\n}", "function showDSFormDialog() {\n\tdocument.getElementById('dspopupModal').style.display = \"block\";\n\tpushMenu();\n}", "function popup(){\n $( \"#dialog-message\" ).dialog({\n modal: true,\n buttons: {\n Start: function() {\n level ++;\n $( this ).dialog( \"close\" );\n callTimer(15);\n makeTrash(5, trashArray1);\n \n \n }\n }\n });\n}", "function showYouWon() {\n const text = \"Hurrraaay You get It.\";\n let dialog = getDialog('won', text)\n document.getElementById(\"result\").innerHTML = dialog;\n}", "function showDialog(options) {\n\n // default options \n var myOptions = {\n position: { my: 'center', at: 'center', of: window },\n modal: true,\n minWidth: 400,\n maxWidth: 480,\n minHeight: 100,\n maxHeight: 1000,\n width: 'auto',\n height: 'auto',\n show: 'explode',\n hide: 'explode',\n resizable: true,\n draggable: true,\n divID: 'dialog',\n keepclose: false,\n };\n\n\n // merge supplied options\n $.extend(true, myOptions, options);\n\n // check if div exits, otherwise add it\n if ($('#' + myOptions.divID).length == 0) {\n jQuery('<div/>', {\n id: myOptions.divID,\n }).appendTo('body');\n }\n\n // add message content\n $('#' + myOptions.divID).html(myOptions.content);\n\n // check if title provided\n if (!myOptions.title) {\n myOptions.title = 'The following error has occured...';\n }\n\n // add buttons (default CLOSE)\n if (myOptions.buttons) {\n // check if close icon needed\n if (!options.keepclose) {\n myOptions.dialogClass = 'no-close';\n }\n else {\n myOptions.dialogClass = undefined;\n }\n }\n else {\n myOptions.dialogClass = undefined;\n myOptions.buttons = [{\n text: 'CLOSE',\n click: function () { $(this).dialog('close'); QTip(); },\n title: 'Close Window'\n }];\n }\n\n $('#' + myOptions.divID).removeClass('nopad');\n\n // show dialog\n $('#' + myOptions.divID).dialog(myOptions);\n $('.ui-dialog-titlebar-close').attr('title', 'Close Window');\n $('.ui-dialog-titlebar-close').on('click', function () { QTip(); });\n\n // add tooltips\n QTip();\n\n}", "function showDuplicateMsg() {\n $(\"#warning-duplicate\").dialog(\"open\");\n }", "function showDialog(id, value) {\n // Attempt to get existing window with id.\n var win = Ext.getCmp(id + '-win');\n\n if(win==null){\n win = new Ext.Window({\n id: id + '-win',\n animateTarget: id,\n autoScroll: true,\n width: 550,\n height: 350,\n closeAction: 'hide',\n bodyBorder: false,\n plain: true,\n constrain: true,\n title: value.title,\n // contentEl: value.element\n autoLoad: {\n url: value.url,\n nocache: false,\n discardUrl: false,\n method: \"POST\"\n }\n });\n }\n\n win.show();\n win.toFront();\n var anchor = id + '_anchor';\n if (document.getElementById(anchor) != null) {\n win.alignTo(anchor, 'bl-tl?');\n }\n}", "function showDialog(options) {\n\n // default options \n var myOptions = {\n position: { my: 'center', at: 'center' },\n modal: true,\n width: 'auto',\n height: 'auto',\n show: 'explode',\n hide: 'explode',\n resizable: true,\n draggable: true,\n divID: 'dialog',\n title: 'The following error occured.',\n icon: 'error',\n };\n\n // merge supplied options\n $.extend(true, myOptions, options);\n\n // check if div exits, otherwise add it\n if ($('#' + myOptions.divID).length == 0) {\n jQuery('<div/>', {\n id: myOptions.divID,\n }).appendTo('body');\n }\n\n // add message content\n $('#' + myOptions.divID).html(myOptions.content);\n\n // munge title\n myOptions.title = '<span class=\"glyphicon ' + CD_Library.Icons[myOptions.icon] + '\"></span> &nbsp;' + myOptions.title;\n\n // add buttons (default CLOSE)\n if (!myOptions.buttons) {\n myOptions.dialogClass = 'no-close';\n myOptions.buttons = [{\n text: 'CLOSE',\n click: function () { $(this).dialog('destroy').remove(); },\n title: 'Close Window',\n class: 'btn btn-primary btn-default',\n icon: 'close'\n }];\n }\n\n // add icons for button QTips\n $.each(myOptions.buttons, function (i, obj) {\n obj.create = function () {\n $(this).attr({ 'data-icon': obj.icon });\n };\n });\n\n // clear UI nopad\n $('#' + myOptions.divID).removeClass('nopad');\n\n // show dialog\n $('#' + myOptions.divID).dialog(myOptions);\n\n // apply QTtip \n $('.ui-dialog-titlebar-close').attr({ 'title': 'Close Window', 'data-icon': 'close' });\n $('.ui-dialog button').on('click', function () { QTip(); });\n\n // add tooltips\n QTip();\n\n // focus default button\n $('.ui-dialog .btn-success').focus();\n\n}", "function showBusyScreen()\r\n{\r\n\tif(!dialog_loading) dialog_loading = null;\r\n\tdialog_loading = new ModalDialog (\"#loading_dialog\");\r\n\t\r\n\tdialog_loading.show(5000);\r\n}", "function showRemoveMsg() {\n $(\"#worning-no-layer\").dialog(\"open\");\n }", "function showCommissionTypes(objTextBox, objDescription)\r\n{\r\n objCommissionTypeInvokerTextBox = objTextBox;\r\n objCommissionTypeInvokerLabel = objDescription;\r\n openModalDialog('../popup/cm_commission_type_search_listing.htm',screen.width-50,'400');\r\n \r\n return;\r\n}", "function dialog_show(txt, buttons, callback) {\n\tlet dialog = elem(\"div\");\n\tdialog.setAttribute(\"id\", \"dialog\");\n\tbody.appendChild(dialog);\n\n\tlet dim = elem(\"dim\");\n\tdialog.appendChild(dim);\n\n\tlet div = elem(\"div\");\n\tdialog.appendChild(div);\n\n\tlet label = elem(\"label\");\n\tlabel.innerHTML = txt;\n\tdiv.appendChild(label);\n\n\tlet table = elem(\"table\");\n\tdiv.appendChild(table);\n\n\tlet tbody = elem(\"tbody\");\n\ttable.appendChild(tbody);\n\n\tlet tr = elem(\"tr\");\n\ttbody.appendChild(tr);\n\n\tfor (let i = 0; i < buttons.length; i++) {\n\t\tlet td = elem(\"td\");\n\t\tlet label = elem(\"label\");\n\t\tlabel.innerHTML = buttons[i];\n\n\t\ttr.appendChild(td);\n\t\ttd.appendChild(label);\n\n\t\tlabel.addEventListener(\"click\", event => {\n\t\t\tif (!callback || callback(event, i)) {\n\t\t\t\tdialog.style.opacity = null;\n\t\t\t\tdialog.style.pointerEvents = \"none\";\n\n\t\t\t\tsetTimeout(() => body.removeChild(dialog), 1000);\n\t\t\t}\n\t\t});\n\t}\n\n\tsetTimeout(() => dialog.style.opacity = 1, 5);\n}", "function Dialog(a,c,d){if(typeof d==\"undefined\"){d=window}if(typeof window.showModalDialog==\"function\"&&!Xinha.is_webkit){Dialog._return=function(e){if(typeof c==\"function\"){c(e)}};var b=window.showModalDialog(a,d,\"dialogheight=300;dialogwidth=400;resizable=yes\")}else{Dialog._geckoOpenModal(a,c,d)}}", "function getUserCreateForm(){\n showCreateDialog();\n}", "function showRemoveMsg() {\n $(\"#warning-no-layer\").dialog(\"open\");\n }", "function showPopupFormular() {\r\n $(\"#\" + global.Element.PopupFormular).modal(\"show\");\r\n }", "function showProducts(objTextBox, objLabel, objHiddens)\r\n{\r\n objProductInvokerTextBox = objTextBox;\r\n objProductInvokerLabel = objLabel;\r\n objProductInvokerHidden = objHiddens;\r\n \r\n openModalDialog('../popup/cm_products_search_listing.htm',screen.width-50,'400');\r\n \r\n return;\r\n}", "function msgBoxShow(title, content, type) {\n $.msgBox({\n title: title,\n content: content,\n type: type,\n showButtons: false,\n opacity: 0.9,\n autoClose:true\n });\n}", "function msgBoxShow(title, content, type) {\n $.msgBox({\n title: title,\n content: content,\n type: type,\n showButtons: false,\n opacity: 0.9,\n autoClose:true\n });\n}", "function showDialog($type){\n\tif($type == dltOK){\n\n\t}else if($type == dltValidate) {\n\t\tswal(\"Warning\", \"Please check your input key.\",\"warning\");\n\t}\n}", "function displayDialog(alertBoxId, msg, control1_href, control1_name, control2_href, control2_name) {\n\t\n\tvar alertBox = $(\"#\" + alertBoxId);\n\t\n\t// clear any old alert\n\tclearAlerts();\n\t\n\t// pack the alert message into the alertbox\n\talertBox.find(\"p.alertMsg\").html(msg);\n\n\t//\n\t// wire up control and display controls\n\t\n\t// control 1\n\tif ( control1_href !== null ) {\n\t\talertBox.find(\"a.control_1\").attr(\"href\", control1_href);\n\t\talertBox.find(\"a.control_1\").html(control1_name);\n\t\talertBox.find(\"a.control_1\").css(\"display\", \"inline\");\n\t}\n\t\n\t\n\tif ( control2_href !== null ) {\n\t\talertBox.find(\"a.control_2\").attr(\"href\", control2_href);\n\t\talertBox.find(\"a.control_2\").html(control2_name);\n\t\talertBox.find(\"a.control_2\").css(\"display\", \"inline\");\n\t}\n\t\n\talertBox.find(\"div.controls\").css(\"display\", \"block\");\n\n\t// display as info message\n\talertBox.addClass('alert-info');\n\t\n\t// mark as active\n\talertBox.addClass(\"active\");\n\t\n\t// flag dialog as active\n\tactiveDialog = true;\n\t\t\t\n\t//\n\t// display dialog box\n\t// -- however, if it is visible already, we pulsate it instead (note: pulsate is part of \"jquery ui\")\n\t//\n\tif ( alertBox.css(\"display\") != \"block\" ) {\n\t\t// show the alert box\n\t\talertBox.css(\"display\", \"block\");\n\t}\n\telse {\n\t\tpulsateVisibleAlerts();\n\t}\n}", "function OpenMergeFBAccountModal() {\n $('.ui-dialog').css('display', 'inline');\n $(\"#divPopup_MergeFBAccount\").dialog({\n modal: true,\n width: 498,\n height: 298,\n resizable: false,\n closeOnEscape: false,\n overlay: { backgroundcolor: \"#000\", opacity: 0.5 }\n });\n $('.ui-dialog-titlebar').css('display', 'none');\n}", "function modalShown(o){\n\t\t/*\n\t\tif(o.template){\n\t\t\t//show spinner dialogue\n\t\t\t//render o.template into o.target here\n\t\t}\n\t\t*/\n\t\tsaveTabindex();\n\t\ttdc.Grd.Modal.isVisible=true;\n\t}", "function showDialogPopups (){\n //Bug 18403444 \n removePopupCloseBar();\n showPopup(document.getElementById(DEFAULT_DIALOG_POPUP_ID),DEFAULT_DIALOG_POPUP_ID); \n}", "function dialogAlerter(){\n //Method to Open a Alertbox\nnavigator.notification.alert(\"This is an Alert box created using Notification Plugin\",alertExit,\"Alert Dialog\",\"Understood\");\n}", "function ShowageDialog(modal)\n {\n $(\"#ageoverlay\").show();\n $(\"#agedialog\").fadeIn(300);\n\n if (modal)\n {\n $(\"#ageoverlay\").unbind(\"click\");\n }\n else\n {\n $(\"#ageoverlay\").click(function (e)\n {\n HideageDialog();\n });\n }\n }", "function showDialog(file, title)\n{\n \tvar html = HtmlService.createTemplateFromFile(file).evaluate();\n\tSpreadsheetApp.getUi().showModalDialog(html, title);\n}", "function showPrompt(idPedido) {\n ons.notification.prompt('Ingrese un comentario')\n .then(function (input) {\n agregarComentario(idPedido, input);\n var message = input ? 'Gracias por su comentario' : 'El comentario no puede estar vacio';\n ons.notification.alert(message);\n });\n}", "function areYouSure(){\n\t\t$(\"#stage\").append('<div id=\"dialog-removeContent\" title=\"Remove this item from the page.\"><p class=\"validateTips\">Are you sure that you want to remove this item from your page? Selecting \"Remove\" will also remove all button links to this branch.<br/><br/>This cannot be undone!</div>');\n\n\t $(\"#dialog-removeContent\").dialog({\n modal: true,\n width: 550,\n close: function (event, ui) {\n $(\"#dialog-removeContent\").remove();\n },\n buttons: {\n Cancel: function () {\n $(this).dialog(\"close\");\n },\n Remove: function(){\n\t removeOption();\n\t $(this).dialog(\"close\");\n }\n }\n });\n\t}", "function showDialog() {\n\tdialog.show();\n\tbuttonOpen.setAttribute(\"class\", \"close\");\n\tbuttonOpen2.setAttribute(\"class\", \"close\");\n}", "function successfullysent() {\n console.log(\"Invio delle notizie riuscito!\");\n $(\"#dialog\").fadeIn(750);\n $(\"#infomsg\").text(\"Invio delle notizie riuscito!\");\n $(\"#dialog\").delay(3000).fadeOut(2000);\n}", "function showPopupElementFormular() {\r\n $(\"#\" + global.Element.PopupElementFormular).modal(\"show\");\r\n }", "function showDialogBarcodeCreation() {\n var title = 'Generate and Export Barcodes'; \n var templateName = 'barcodes'; \n var width = 800; \n \n createDialog(title,templateName,width);\n}", "function showCreateDialog() {\n\t$(\"#createWorkspaceDialog\").dialog({\n\t\tmodal : true,\n\t\tdraggable : false,\n\t\tbuttons : {\n\t\t\tCancel : function () {\n\t\t\t\t$(this).dialog(\"close\");\n\t\t\t},\n\t\t\t\"Create\" : function () {\n\t\t\t\tif($('form').parsley().isValid())\n\t\t\t\t{\n\t\t\t\t\tcreateNewWorkspace($('#wsNameInput').val());\n\t\t\t\t\t$(this).dialog(\"close\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n}", "function ShowWaitDialog() {\n}", "function errorMessage() {\n\n //create a div to be turn into a dialog box\n let $dialog = $(`<div id='dialogdiv'></div>`).attr(`title`, `The End`);\n\n //add text to the div\n $dialog.append(`<p>You were caught and promptly arrested by the Nation's authorities for using unauthorized software and attempting contact outside the country.</p>`);\n\n //Add the div to the page\n $('body').append($dialog);\n\n //turn the div into a dialog box\n $dialog.dialog({\n\n //add a button to take the user to the ending screen\n buttons: {\n \"End experience\": function() {\n window.location.href = \"../Ending/Ending.html\";\n }\n },\n\n //contain within body\n containment: 'body',\n width: 600\n });\n\n $dialog.parent().offset({\n top: 0.5 * ($(window).height() - $dialog.parent().height()),\n left: 0.5 * ($(window).width() - $dialog.parent().width())\n });\n}", "function showChangeNameDialog(){\n $('#glassloading').css('display', 'block');\n var heighthtml = $('html').height()/2;\n var heightdialog = $('#changenamedialog').height()/2;\n var widthhtml = $('html').width()/2;\n var widthdialog = $('#changenamedialog').width()/2;\n $('#changenamedialog').css('top', '' + (heighthtml - heightdialog) + 'px');\n $('#changenamedialog').css('left', '' + (widthhtml - widthdialog) + 'px');\n $('#changenamedialog').fadeIn('normal');\n $('#change_nickname_dialog_success').css('display', 'none');\n $('#change_nickname_dialog_error').css('display', 'none');\n $('#change_nickname_dialog_body').css('display', 'block');\n}", "function dialogOn() {\n\n if (typeof uiVersion != 'undefined' && uiVersion === 'Minuet' && dialog !== 'active') {\n openMinuetWarningDialog();\n }\n else {\n dialog = openWarningDialog();\n }\n isDialogOn = true;\n setCounter();\n\n\n }", "function openValidityDialog(index)\r\n{\r\n\tgArrayIndex = index;\r\n\t$( \"#dlgValidity\" ).dialog( \"open\" );\r\n\t$(\"#hValidity\").text(\"Add validity details for \" + arrEntp[gArrayIndex].getEName());\t\r\n}", "function _openDialog( pDialog ) {\n var lWSDlg$, lTitle, lId,\n lButtons = [{\n text : MSG.BUTTON.CANCEL,\n click : function() {\n lWSDlg$.dialog( \"close\" );\n }\n }];\n\n function _displayButton(pAction, pLabel, pHot, pClose ) {\n var lLabel, lStyle;\n\n if ( pLabel ) {\n lLabel = pLabel;\n } else {\n lLabel = MSG.BUTTON.APPLY;\n }\n if ( pHot ) {\n lStyle = 'ui-button--hot';\n }\n lButtons.push({\n text : lLabel,\n class : lStyle,\n click : function() {\n that.actions( pAction );\n if ( pClose ) {\n lWSDlg$.dialog( \"close\" );\n }\n }\n });\n }\n\n if ( pDialog==='WEBSHEET' ) {\n lTitle = MSG.DIALOG_TITLE.PROPERTIES;\n _displayButton( 'websheet_properties_save', null, true, false );\n } else if ( pDialog==='ADD_COLUMN' ) {\n lTitle = MSG.DIALOG_TITLE.ADD_COLUMN;\n _displayButton( 'column_add', null, true, false );\n } else if ( pDialog==='COLUMN_PROPERTIES' ) {\n lTitle = MSG.DIALOG_TITLE.COLUMN_PROPERTIES;\n _displayButton( 'column_properties_save', null, true, false );\n } else if ( pDialog==='LOV' ) {\n lTitle = MSG.DIALOG_TITLE.LOV;\n lId = apex.item( \"apexir_LOV_ID\" ).getValue();\n if ( lId ) {\n _displayButton( 'lov_delete', MSG.BUTTON.DELETE, false, false );\n }\n _displayButton( 'lov_save', null, true, false );\n } else if ( pDialog==='GROUP' || pDialog==='GROUP2' ) {\n lTitle = MSG.DIALOG_TITLE.COLUMN_GROUPS;\n lId = apex.item( \"apexir_GROUP_ID\" ).getValue();\n if ( lId ) {\n _displayButton( 'column_groups_delete', MSG.BUTTON.DELETE, false, false );\n }\n _displayButton( 'column_groups_save', null, true, false );\n } else if ( pDialog==='VALIDATION' ) {\n lTitle = MSG.DIALOG_TITLE.VALIDATION;\n lId = apex.item( \"apexir_VALIDATION_ID\" ).getValue();\n if ( lId ) {\n _displayButton( 'VALIDATION_DELETE', MSG.BUTTON.DELETE, false, false );\n }\n _displayButton( 'VALIDATION_SAVE', null, true, false );\n } else if ( pDialog==='REMOVE_COLUMN' ) {\n lTitle = MSG.DIALOG_TITLE.DELETE_COLUMNS;\n _displayButton( 'column_remove', MSG.BUTTON.DELETE, true, false );\n } else if ( pDialog==='SET_COLUMN_VALUE' ) {\n lTitle = MSG.DIALOG_TITLE.SET_COLUMN_VALUES;\n _displayButton( 'set_column_value', null, true, false );\n } else if ( pDialog==='REPLACE' ) {\n lTitle = MSG.DIALOG_TITLE.REPLACE;\n _displayButton( 'replace_column_value', null, true, false );\n } else if ( pDialog==='FILL' ) {\n lTitle = MSG.DIALOG_TITLE.FILL;\n _displayButton( 'fill_column_value', null, true, false );\n } else if ( pDialog==='DELETE_ROWS' ) {\n lTitle = MSG.DIALOG_TITLE.DELETE_ROWS;\n _displayButton( 'delete_rows', MSG.BUTTON.DELETE, true, false );\n } else if ( pDialog==='COPY' ) {\n lTitle = MSG.DIALOG_TITLE.COPY_DATA_GRID;\n _displayButton( 'copy', MSG.BUTTON.COPY, true, false );\n } else if ( pDialog==='DELETE' ) {\n lTitle = MSG.DIALOG_TITLE.DELETE_DATA_GRID;\n _displayButton( 'delete_websheet', MSG.BUTTON.DELETE, true, false );\n } else if ( pDialog==='ATTACHMENT' ) {\n lTitle = MSG.DIALOG_TITLE.ADD_FILE;\n _displayButton( 'ATTACHMENT_SAVE', null, true, true );\n } else if ( pDialog==='NOTE' ) {\n lTitle = MSG.DIALOG_TITLE.ADD_NOTE;\n _displayButton( 'NOTE_SAVE', null, true, false );\n } else if ( pDialog==='LINK' ) {\n lTitle = MSG.DIALOG_TITLE.ADD_LINK;\n _displayButton( 'LINK_SAVE', null, true, false );\n } else if ( pDialog==='TAGS' ) {\n lTitle = MSG.DIALOG_TITLE.ADD_TAGS;\n _displayButton( 'TAG_SAVE', null, true, false );\n }\n\n lWSDlg$ = $( \"#a-IRR-dialog-js\", apex.gPageContext$ ).dialog({\n modal : true,\n dialogClass: \"a-IRR-dialog\",\n width : \"auto\",\n height : \"auto\",\n minWidth : \"360\",\n title : lTitle,\n buttons : lButtons,\n close : function() {\n lWSDlg$.dialog( \"destroy\");\n }\n });\n }", "function showDialog(choose)\n\t\t{\t\n\t\t\tjQuery.ajax(\n\t\t\t\t{\t//ajax send succeed\n\t\t\t\t\t'success': function(html){\n\t\t $(\"#dialog\").html(html);\n\t\t },\n\t 'data': {'select': choose},\n\t 'url':\tdialog,\n\t //ajax is sending\n\t 'beforeSend': function(){\n\t \t\t\t$('<img id=\"loading\" src=' + bUrl + '/file/img/campusTour/loading.gif>').appendTo($(\"#dialog\"));\n\t \t\t\t},\n\t //the page loads complete\n\t 'complete': function(){\n\t \t\t\t$(\"#loading\").remove();\n\n\t \t\t\t},\n\t 'error': function(){\n \t\t\talertMsg('Error loading','','error');\n \t\t\t},\n\t 'cache':false}).done(function()\n\t {\n\t \t$.bar($(\"#frame\"));\n\t \t$.bar($(\"#box\"));\n\t $(\".item\").each(function(index)\n\t\t\t{\n\t\t\t\t$(this).click(function(){\n\t\t\t\t\titem = $(this).attr(\"id\");\n\t\t\t\t\t$(\".photo\").fadeOut(\"slow\", function()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$(\"#\" + item + \"_big\").fadeIn(\"slow\");\n\t\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t });\n\t\t}", "function showDialog( options ){\n\t$('<div class=\"message_dialog\"></div>')\n\t.html( options.html )\n\t.dialog({\n\t\ttitle: (options.title == undefined)?'Mensaje':options.title,\n\t\tautoOpen: false,\n\t\tmodal:true,\n\t\tcloseOnEscape: true,\n\t\tresizable: false,\n\t\tmaxWidth: (options.maxWidth == undefined)? 200 : options.maxWidth,\n\t\tminWidth: (options.minWidth == undefined)? 200 : options.minWidth,\n\t\tbuttons: options.buttons\n\t\t\n\t})\n\t.dialog('open');\n}", "clickBook() {\n\n this.dialogueBox.visible = true;\n this.dialogueBook.visible = true;\n this.xButton.visible = true;\n //for when clicking exit, everything disappears\n }", "function showAboutDialog() {\r\n\tvar dialog = new SimpleDialog(\"About\");\r\n\tdialog.addButton(\"OK\",SimpleDialog.CLOSE_BUTTON);\r\n\tdialog.addMessage(\"ETI Blank\", \"center\");\r\n\tdialog.addMessage(\"Version 0.1.r177\", \"center\");\r\n\tdialog.show();\r\n}", "function ShowlolDialog(modal)\n {\n $(\"#loloverlay\").show();\n $(\"#loldialog\").fadeIn(300);\n\n if (modal)\n {\n $(\"#loloverlay\").unbind(\"click\");\n }\n else\n {\n $(\"#loloverlay\").click(function (e)\n {\n HidelolDialog();\n });\n }\n }", "function callMessageDialog(title, messageContent){\n\t\t$(\"#messageDialog\").find(\"#messageContent\").text(messageContent);\n\t\t$(\"#messageDialog\").dialog({\n\t\t\tmodal: true,\n\t\t\tshow:{\n\t\t\t\teffect:\"blind\",\n\t\t\t\tduration: 500\n\t\t\t},\n\t\t\ttitle: title,\n\t\t\theight: 200,\n\t\t\twidth: 350,\n\t\t\thide: {\n\t\t\t\teffect: \"explode\",\n\t\t\t\tduration: 500\n\t\t\t},\n\t\t\tbuttons:{\n\t\t\t\t\"OK\": function(){\n\t\t\t\t\t$(this).dialog(\"close\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "function showCreateMenuItemDialog()\n{\n\t$('#createMenuItemDialog').dialog('open');\n\t$(\"#createMenuItemDialog\").html('<div id=\"modalWindowLoader\"></div>');\n\t$(\"#createMenuItemDialog\").load('/admin/structure/add/' + selectedItemID, function()\n\t{\n\t\t$('#createMenuItemDialog input[name=folderId]').val(currentFolderID);\n\t});\n\treturn false;\n}" ]
[ "0.7468991", "0.74425626", "0.744037", "0.7352576", "0.7273359", "0.72544926", "0.71837753", "0.7182276", "0.71661544", "0.7165528", "0.7131259", "0.7109547", "0.710226", "0.7093812", "0.70553535", "0.7023936", "0.699124", "0.6953656", "0.69374275", "0.6937003", "0.6931964", "0.69239265", "0.69181216", "0.69158405", "0.6904677", "0.6885418", "0.6879225", "0.68713677", "0.68616325", "0.6861012", "0.6852956", "0.6846454", "0.6836174", "0.6801312", "0.67901254", "0.67849714", "0.6782871", "0.67607045", "0.67534226", "0.67501885", "0.6747163", "0.6733837", "0.6732196", "0.6726793", "0.6725211", "0.6716345", "0.6698484", "0.669345", "0.66899955", "0.66790754", "0.6677587", "0.66711694", "0.6666339", "0.6664643", "0.66620815", "0.66620576", "0.6660276", "0.66514397", "0.6644718", "0.66420335", "0.66413033", "0.6632973", "0.66304755", "0.662953", "0.6628114", "0.66280454", "0.66214263", "0.6618098", "0.6613293", "0.6607402", "0.66014093", "0.65945464", "0.65945464", "0.65916985", "0.65913844", "0.65852916", "0.6568205", "0.65670943", "0.6552766", "0.65525395", "0.6551653", "0.6545337", "0.6543536", "0.6541119", "0.65322965", "0.6523816", "0.6511", "0.65103054", "0.65013945", "0.6500754", "0.64995885", "0.6496175", "0.64888245", "0.64870465", "0.6486284", "0.6485517", "0.64854836", "0.6484515", "0.64791405", "0.64774567", "0.6473704" ]
0.0
-1
Check for empty input and change the error state
checkInput() { var checkArr = [false, false, false, false, false] if (this.refs.companyName.value === '') { checkArr[0] = true; } if (this.refs.companyAddress.value === '') { checkArr[1] = true; } if (this.refs.companyRevenue.value === '') { checkArr[2] = true; } if (this.state.country_code === '') { checkArr[3] = true; } if (this.refs.companyPhoneNumber.value === '') { checkArr[4] = true; } this.setState({ error: checkArr}) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "checkEmptyInput() {\n if (\n this.state.selected === \"\" ||\n this.state.date === \"\" ||\n this.state.date2 === \"\" ||\n this.state.timeStart === \"\" ||\n this.state.timeEnd === \"\"\n ) {\n alert(\"Error!Dont Leave Blank Fields!\");\n return false;\n }\n return true;\n }", "errorHandle(val) {\n if (val === '') {\n this.setState({\n errorText: 'Required'\n });\n }\n }", "function catchEmpty(input){\n\n if(input===\"\"){\n return \"Please enter required information.\"\n } \n else{ \n return true};\n\n}", "validateData(){\n this.setState({errorMessage: ''});\n ////////////////Empty Input validation\n if(this.state.title == '' || this.state.firstName == '' ||\n this.state.lastName == '' || this.state.day == '' ||\n this.state.month == '' || this.state.year == '' ||\n this.state.stdNum == ''){\n this.setState({errorMessage: 'Empty Input'});\n return false;\n }\n return true;\n }", "handleInputChange(event) {\n const value = event.target.value;\n const isEmpty = value.trim().length === 0;\n\n this.setState({\n isUsernameEmpty: isEmpty,\n username: value,\n error: null\n });\n }", "validateName(event) {\n if (_.isEmpty(event.target.value)) {\n this.setState({\n userNameError: \"User Name cannot be blank\",\n });\n } else {\n this.setState({\n userNameError: \"\",\n });\n }\n }", "function validateInput(input){\n if(input == \"\" || input == undefined){\n message(\"Lén verður að vera strengur\");\n return false;\n }\n return true;\n }", "function isNotEmpty() {\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tif (arguments[i].value === \"\" || arguments[i].value === null) {\n\t\t\t\t//if empty\n\t\t\t\terrors += 1;\n\t\t\t\targuments[i].placeholder = \"Fill in this feild!\";\n\t\t\t\targuments[i].classList.add(\"error-placeholder\");\n\t\t\t} else if (arguments[i].value.length < 3) {\n\t\t\t\t//if too short\n\t\t\t\terrors += 1;\n\t\t\t\targuments[i].placeholder = \"Enter a valid input!\";\n\t\t\t\targuments[i].value = \"\";\n\t\t\t\targuments[i].classList.add(\"error-placeholder\");\n\t\t\t}\n\t\t}\n\n\t}", "function checkInputLength(){\n if(inputField.value == ''){\n responseText.style.color = '#721c24'\n responseText.style.backgroundColor = '#f8d7da'\n clearActionResponse()\n throw new Error(responseText.textContent = responses[0])\n }\n \n}", "handleContentChange(event) {\n const inputValue = event.target.value;\n const isEmpty = inputValue === '';\n this.setState({\n content: inputValue,\n hasContentError: isEmpty,\n });\n }", "displayInputErrors(team) {\n if (team.sport.trim() == \"\") {\n this.refs.sport.setError(\"Please give a non-empty value\");\n }\n if (team.city.trim() == \"\") {\n this.refs.city.setError(\"Please give a non-empty value\");\n }\n if (team.name.trim() == \"\") {\n this.refs.name.setError(\"Please give a non-empty value\");\n }\n if ( isNaN(team.maxPlayers) || game.gameLength < 1 ) {\n this.refs.gameLength.setError(\"Please input a positive number\");\n }\n }", "function displayEmptyInputError() {\n if (challenger1Name.value === \"\" | challenger2Name.value === \"\") {\n challenger1Name.style.borderColor = \"#DD1972\";\n challenger2Name.style.borderColor = \"#DD1972\";\n alert(\"Name must be entered\");\n }\n if (challenger1GuessInput.value === \"\" | challenger2GuessInput.value === \"\") {\n challenger1GuessInput.style.border = \"#DD1972 solid 2px\";\n challenger2GuessInput.style.border = \"#DD1972 solid 2px\";\n alert(\"Player must enter a guess\");\n }\n }", "function reqInputChange() {\n if (this.value === '') {\n window.showError(this.parentNode, 'required');\n } else {\n window.hideError(this.parentNode, 'required');\n }\n}", "validatePassword(event) {\n if (_.isEmpty(event.target.value)) {\n this.setState({\n passwordError:\"Password cannot be blank\",\n });\n } else {\n this.setState({\n passwordError: \"\",\n });\n }\n }", "function onInvalidInput() {\n\n transition(\"ERROR_INPUT\");\n\n }", "changeHandler(event) {\n\n // if input is filled with alphanumeric, underscore, whitespace, or of maximum length 20 characters\n if (/^[\\w\\s]{0,20}$/gi.test(event.target.value)) {\n this.setState({ \n word : event.target.value,\n error : \"\" \n });\n } else {\n\n // else input will not be changed and an error message will be displayed\n event.target.value = this.state.word;\n this.setState({ error : \"Task title should only consists alphanumeric characters and is only of maximum 20 characters length.\" });\n }\n }", "function warningEmptyOnKeyup(e) {\n\tvar el = e.target\n\tvar inputVal = $(el).val()\n\n\tvar isValid = true\n\tif (!inputVal || inputVal.length <= 0) {\n\t\t$(el).css('border-width', '2px')\n\t\t$(el).css('border-color', '#E34234')\n\t\tisValid = false\n\t} else {\n\t\t$(el).css('border-width', '1px')\n\t\t$(el).css('border-color', '#ccc')\n\t}\n\treturn isValid\n}", "function campsOk(){\n if(event.target.value != \"\"){\n event.target.classList.remove(\"invalid\");\n return true;\n }\n }", "function nonEmptyInput(input, id) \n\t\t{\n\t\t\tvar isValid = false;\n\t\t\t\n\t\t\tif (input !== \"\")\n\t\t\t\tisValid = true;\n\t\t\telse \n\t\t\t\tisValid = false;\n\t\t\t\n\t\t\treturn changeInputField(isValid, id);\n\t\t}", "function validateEmpty(name) {\n\tvar error = \"\";\n\tif (name.value.length == 0) {\n\t\tname.style.background = \"Red\";\n\t\tdocument.getElementById(\"emptyValidationError\").innerHTML =\n\t\t\t\"The required field has not been filled in\";\n\t\tvar error = \"1\";\n\t} else {\n\t\tname.style.background = 'url(\"assets/back-blur3.jpg\")';\n\t\tdocument.getElementById(\"emptyValidationError\").innerHTML = \"\";\n\t}\n\treturn error;\n}", "function nameError () {\n if ($('#name').val().length == 0){\n $('#name').attr({\n 'placeholder': 'REQUIRED ex: Jane Doe'\n }).addClass('error');\n return false;\n }\n else {\n return true;\n }\n }", "function check_empty(objet,err)\n{\n\tif (objet.value.length < 1) {\n\t\tdocument.getElementById(err).style.display = \"\";\n\t\tobjet.focus();\n\t\treturn false;\n\t}\n\telse {\n\t\t\n\t\tdocument.getElementById(err).style.display = \"none\";\n\t\treturn true;\n\t}\n}", "validateInputs(){\r\n if(this.state.brand === \"\" || this.state.plates === \"\" || (this.state.year===\"\" || isNaN(this.state.year)) || this.state.currentState===\"\" || this.state.model===\"\" || this.state.type===\"\" || this.state.color===\"\" || this.state.niv===\"\" || this.state.gasoline===\"\" || this.state.circulation===\"\"){\r\n return false;\r\n\r\n }\r\n else{\r\n return true;\r\n }\r\n }", "function handleEmtpyValue(defaultMsg){\n if(oSetting.defaultIfEmpty && !currentElem.val()){\n currentElem.val(oSetting.defaultIfEmpty);\n return;\n }\n\n //set default value if it exist\n if(oSetting.defaultValue){\n currentElem.val(oSetting.defaultValue);\n return;\n }\n\n currentElem.addClass(oParams.errorInputCssClass);\n\n if(!oSetting.errorMsg){\n oSetting.errorMsg= defaultMsg;\n }\n oErrors=oErrors+(oSetting.errorMsg);\n allTrue=false;\n if(!firstErrorElem){\n firstErrorElem = oSetting.selector;\n }\n }", "function checkInputLengths() {\n return (\n nameInput.value.length === 0 ||\n emailInput.value.length === 0 ||\n dobInput.value.length === 0 ||\n stateInput.value.length === 0\n );\n }", "function checkInput(e) {\n e.preventDefault();\n const inputFields = document.querySelectorAll('.input__field');\n let i = 0;\n let empty = true;\n while (i < 3) {\n if (inputFields[i].value === '') {\n empty = true;\n break;\n } else {\n empty = false;\n }\n i++;\n }\n\n if (empty === true) {\n error.hidden = false;\n setTimeout(errMsg, 2000);\n } else {\n updateDOM();\n }\n}", "function onInput(event) {\n\t\tutils.setHTML('#form-error', \"\");\n\t\tif(event.target.name === 'name') {\n\t\t\tutils.setHTML('#name .error', \"\");\n\t\t} else if(event.target.name === 'nameAlpha') {\n\t\t\tutils.setHTML('#nameAlpha .error', \"\");\n\t\t} else if(event.target.name === 'birth') {\n\t\t\tutils.setHTML('#birth .error', \"\");\n\t\t} else if(event.target.name === 'death') {\n\t\t\tutils.setHTML('#death .error', \"\");\n\t\t}\n\t}", "function onInput(event) {\n\t\tutils.setHTML('#form-error', \"\");\n\t\tif(event.target.name === 'email') {\n\t\t\tutils.setHTML('#email .error', \"\");\n\t\t} else if(event.target.name === 'password') {\n\t\t\tutils.setHTML('#password .error', \"\");\n\t\t}\n\t}", "checkIfEmpty() {\n if(this.state.username == '' || this.state.password == '') {\n if(this.state.username == '') {\n this.setState({usernameError : true});\n }\n if(this.state.password == '') {\n this.setState({passwordError : true});\n }\n }\n else {\n this.setState({\n usernameError : false,\n passwordError : false\n });\n this.props.LoginUser(this.state.username,this.state.password);\n }\n }", "inputValid() {\n // Begin error checking\n if (!this.state.title) {\n this.setState({\n error: \"Title must be populated.\",\n pendingSubmit: false,\n });\n return false;\n } else if (!this.state.url) {\n this.setState({\n error: \"Video url must be populated\",\n pendingSubmit: false,\n });\n return false;\n } else if (this.state.title.length < 4 || this.state.title.length > 100) {\n this.setState({\n error: \"Title must be between 4 and 100 characters long.\",\n pendingSubmit: false,\n });\n return false;\n } else if (this.state.description.length < 4) {\n this.setState({\n error: \"Description must be at least 4 characters long\",\n pendingSubmit: false,\n });\n return false;\n } else if (this.state.description.length > 10000) {\n this.setState({\n error: \"Description must be less than 10000 characters long.\",\n pendingSubmit: false,\n });\n return false;\n } else if (!this.state.url.startsWith(\"https://www.youtube.com/watch?v=\")) {\n this.setState({\n error: \"Video URL must be properly formatted. That is, it must begin with \\\"https://www.youtube.com/watch?v=\\\" followed by the video ID.\",\n pendingSubmit: false,\n });\n return false;\n } else if (!document.getElementById(\"location\").value) {\n this.setState({\n error: \"Location must be populated.\",\n pendingSubmit: false,\n });\n return false;\n }\n // Otherwise, the request is properly formulated\n this.setState({\n error: \"\",\n });\n return true;\n }", "handleEmptyValue() {\n if (!this.get('value') || this.get('value') === '') {\n this.set('value', 'Empty');\n }\n }", "handleTermChange(e) {\n if(!e.target.value || //check for empty string\n isNaN(e.target.value) || //check for non-numeric string\n e.target.value.indexOf(' ') >= 0) { //check for whitespace in string\n this.setState({\n termError: true\n });\n return false;\n }\n this.setState({\n term: e.target.value,\n termError: false\n });\n }", "function checkEmpty(el) {\n if(el.value.length == 0){\n //get invalid prompts\n getInvalidFormatEl(el);\n switcher = false;\n //console.log(el + 'this is throwing the switch, here the switch status currently' + switcher)\n return switcher;\n } else {\n //console.log('this is not throwing the switch, here the switch status currently' + switcher)\n //get invalid prompts\n removeInvalidFormatEl(el);\n };\n }", "checkFirstName(){\n if(this.state.firstName.length <= 0){\n return (\n <div>\n <p className=\"warningText\">Please enter your first name </p>\n </div>)\n }\n }", "handleDiractorName(diractor) {\n let error = false;\n if(diractor === \"\") { // check if valid\n error = true;\n }\n this.setState({\n ...this.state,\n diractor: diractor,\n diractor_error: error\n });\n }", "function inputNameError(e) {\n\te.target.classList.remove('input--focus');\n\te.target.parentElement.children[0].classList.remove('icon--focus');\n\te.target.parentElement.children[0].children[0].classList.remove(\n\t\t'icon__svg--focus'\n\t);\n\n\tif (e.target.value.length <= 0) {\n\t\te.target.classList.add('input_error', 'username_error');\n\t\te.target.parentElement.children[0].classList.add('icon_error');\n\t\te.target.parentElement.children[0].children[0].classList.add(\n\t\t\t'icon-svg_error'\n\t\t);\n\n\t\te.target.parentElement.appendChild(nameError);\n\t\tnameError.classList.add('error_message');\n\t\tnameError.textContent = 'Enter a valid email';\n\t\treturn;\n\t}\n}", "validateBeforeLogin() {\n const { email, password } = this.state\n let { emailError, passwordError } = this.state\n\n // set empty input error message if any of inputs are empty\n emailError = !email ? 'Email should not be empty' : emailError\n passwordError = !password ? 'Password should not be empty' : passwordError\n this.setState({ emailError, passwordError })\n\n // return false if the form contains any error\n return !emailError && !passwordError\n }", "handleOnChange(event) {\n const {\n name,\n capitalizedInputName,\n value,\n inputIsEmpty,\n inputNameErrorText\n } = this.createInputValidationVariables(event);\n\n if (inputIsEmpty) {\n this.props.setFormError(\"\");\n }\n\n // Sets the inputs value as the state value and if it's empty it outputs a error message.\n this.setState({\n formErrorText: \"\",\n [name]: value,\n [inputNameErrorText]: inputIsEmpty\n ? `${capitalizedInputName} is required.`\n : \"\"\n });\n }", "handleGenreTitle(genre) {\n let error = false;\n if(genre === \"\" ) { // check if valid\n error = true;\n }\n this.setState({\n ...this.state,\n genre: genre,\n genre_error: error\n });\n }", "function handleAddressInput() {\n addressError.textContent = addressInput.validity.valueMissing\n ? \"You must enter a street address\"\n : \"\";\n}", "validateInput() {\n const errors = [];\n if (this.state.key.length === 0) {\n errors.push(\"You must enter a key\");\n } else if (this.state.key.length !== 20) {\n errors.push(\"The key entered is not the expected length\");\n }\n return errors;\n }", "function check(e) {\n if (e.val() !== '') {\n e.closest(target.options.errorElement).removeClass(target.options.errorClass);\n // if we are using aria tags to hide content from screenreaders\n if (target.options.useAria) {\n e.closest(target.options.errorElement).find(target.options.errorMessageElement).attr('aria-hidden', true);\n }\n } else {\n e.closest(target.options.errorElement).addClass(target.options.errorClass);\n // if we are using aria tags to hide content from screenreaders\n if (target.options.useAria) {\n e.closest(target.options.errorElement).find(target.options.errorMessageElement).attr('aria-hidden', false);\n }\n }\n }", "function checkInputs(){\r\n const fNameValue = fName.value.trim();\r\n const lNameValue = lName.value.trim();\r\n const addressValue =address.value.trim();\r\n const cityValue =city.value.trim();\r\n //const vValue =state.value.trim();\r\n const zipValue = zip.value.trim();\r\n const dobValue = dob.value.trim();\r\n const phoneValue = phone.value.trim();\r\n const emailRValue = emailR.value.trim();\r\n const passwordValue = password.value.trim();\r\n \r\n if(fNameValue === '')\r\n {\r\n setErrorFor(fName)\r\n }else{\r\n setSuccessFor(fName);\r\n }\r\n\r\n if(lNameValue === '')\r\n {\r\n setErrorFor(lName)\r\n }else{\r\n setSuccessFor(lName);\r\n }\r\n\r\n if(addressValue === '')\r\n {\r\n setErrorFor(address)\r\n }else{\r\n \r\n setSuccessFor(address);\r\n }\r\n\r\n if(cityValue === '')\r\n {\r\n setErrorFor(city)\r\n }else{\r\n \r\n setSuccessFor(city);\r\n }\r\n\r\n if(zipValue === '')\r\n {\r\n setErrorFor(zip)\r\n }else{\r\n \r\n setSuccessFor(zip);\r\n }\r\n\r\n if(dobValue === '')\r\n {\r\n setErrorFor(dob)\r\n }else{\r\n \r\n setSuccessFor(dob);\r\n console.log(dobValue)\r\n }\r\n\r\n if(phoneValue === '')\r\n {\r\n setErrorFor(phone)\r\n }else{\r\n \r\n setSuccessFor(phone);\r\n }\r\n\r\n if(emailRValue === '')\r\n {\r\n setErrorFor(emailR)\r\n }else if(!isEmail(emailRValue)){\r\n setErrorFor(emailR)\r\n \r\n }else{\r\n setSuccessFor(emailR);\r\n }\r\n\r\n if(passwordValue === '')\r\n {\r\n setErrorFor(password)\r\n }else{\r\n setSuccessFor(password);\r\n }\r\n}", "function invalidInput(input) {\n\n isValid = false;\n\n if (first) {\n input.focus();\n first = false;\n }\n input.style.border = \"3px solid red\";\n }", "function isInputError(title, date, content) {\n if (title.length == 0) {\n alert(\"Empty title!\");\n }\n // check for empty fields\n else if (date.length == 0) {\n alert(\"No date!\");\n }\n // no error\n else { \n \treturn false;\n }\n return true;\n}", "validate(){\n let isError = false;\n let check = /^.+@.+\\..+$/\n const error = {\n err:\"\",\n spawn:\"\"\n };\n if (!check.test(this.state.email)) {\n isError = true;\n error.err = \"Email Format is Wrong\";\n error.spawn = \" spawn\";\n }\n if (this.state.email === \"\") {\n isError = true; \n error.err = \"the column is empty, please fill the column first!!!\";\n error.spawn = \" spawn\"; \n }\n\n \n this.setState(error);\n return isError\n\n }", "function inputChecker() {\n if (input.value === \"\") {\n console.log('--- Enter number ----');\n input.placeholder = \"Please enter a number\";\n input.focus();\n }\n}", "isValid(input) {\n if (input == null || input == \"\") {\n return false;\n } else {\n return true;\n }\n }", "validateInput(elem){\n\n // checking if the input field is empty and if there are any message not shown\n if (elem.value === '' && elem.nextElementSibling.nextElementSibling.tagName !== 'SPAN'){\n let name;\n if (elem.name === 'name'){\n name = 'Name';\n }else if (elem.name === 'address'){\n name = 'Address';\n }else if (elem.name === 'phone'){\n name = 'Phone';\n }else if (elem.name === 'engineNo'){\n name = 'Engine No';\n }else if (elem.name === 'licenseNo'){\n name = 'License No';\n }\n this.ui.showError(elem, `${name} can not be empty`);\n }else if (elem.value !== '' && elem.nextElementSibling.nextElementSibling.tagName === 'SPAN'){\n this.ui.clearError(elem.nextElementSibling.nextElementSibling);\n }\n }", "onInputChange(e, label) {\n const errLabel = label + \"Err\";\n this.setState({ [label]: e.target.value, formErr: \"\", [errLabel]: \"\" });\n }", "function isEmpty(element)\n{\n\tif (element.value == \"\")\n\t{\n\t\tinputStatus(element, \"error\", \"Error: cannot leave empty\");\n\t\telement.focus();\n\t\treturn true;\n\t}\n\telse\n\t{\n\t\treturn false;\n\t}\n}", "function blankValidation(element, errorElement)\n{\n\tif( $(element).val().trim() == \"\")\n\t{\n\t\t$(errorElement).slideDown().html(\"<span class='error'>Cannot Be Blank</span>\");\n\t\t$(element).css(\"border\",\"solid red 1px\");\n\t\treturn false;\n\t}\n\telse\n {\n \t$(errorElement).slideUp();\n $(element).css(\"border\",\"solid black 1px\");\n return true;\n }\n}", "function validate() {\n validateName();\n validatePassword();\n validateEmail();\n validatePhoneNumber();\n \n \n if(isError){\n setState({\n ...state,\n ...errors})\n }\n return isError;\n }", "usernameFieldInputed(e) {\n let usernameValue = e.currentTarget.value;\n let usernameError = $(\"#username-error\");\n let errors = this.state.errors;\n if (usernameValue === \"\") {\n usernameError.css(\"display\", \"flex\").show();\n errors.username = \"username field can't be empty.\";\n this.setState({errors});\n } else {\n usernameError.hide();\n errors.username = \"\";\n this.setState({errors});\n }\n }", "validate(check, value) {\n switch (check) {\n case \"empty\":\n return value === \"\" ? true : false;\n case \"paid_empty\":\n return this.state.paidEvent && value === \"\" ? true : false;\n case \"email\": {\n // eslint-disable-next-line\n const regex = new RegExp(\n \"^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$\"\n );\n return !regex.test(value) && value !== \"\" ? true : false;\n }\n default:\n this.setState({\n titleError: this.validate(\"empty\", this.state.title),\n descriptionError: this.validate(\"empty\", this.state.description),\n feeError: this.validate(\"paid_empty\", this.state.fee),\n emailError: this.validate(\"email\", this.state.email),\n dateError:\n this.validate(\"empty\", this.state.date) ||\n this.validate(\"empty\", this.state.time)\n });\n }\n }", "function validateInput(input){\n if(input === ''){\n return \"Please add text to this field\"\n }\n return true\n}", "generateError() {\n let hasError = false;\n\n // Name Error\n if (this.state.name == '') {\n this.setState({nameError: 'Restaurant name must not be empty'});\n hasError = true;\n }\n else {\n this.setState({nameError: ''});\n }\n\n // longitude Error\n if (this.state.longitude == '') {\n this.setState({longError: 'Longitude cannot be empty.'});\n hasError = true;\n }\n else {\n this.setState({longError: ''});\n }\n\n //Latitude Error\n if (this.state.latitude == '') {\n this.setState({\n latError: 'Latitude cannot be empty.',\n });\n hasError = true;\n }\n else {\n this.setState({latError: ''});\n }\n\n return hasError;\n }", "validate() {\n\t\tconst msg = this.validator ? this.validator(this.value) : '';\n\t\tthis.error = msg;\n\t}", "isvalidated() {\n return isEmpty(this.state.fname_err) &&\n isEmpty(this.state.lname_err) &&\n isEmpty(this.state.username_err) &&\n isEmpty(this.state.year_err) &&\n isEmpty(this.state.month_err) &&\n isEmpty(this.state.day_err) &&\n isEmpty(this.state.email_err) &&\n isEmpty(this.state.password_err) &&\n isEmpty(this.state.confirmPassword_err);\n }", "checkEmpty(x){\n var y = x.split('&');\n var handler = [];\n var l = y.length;\n\n for(let i = 0; i < l; i++){\n var z = y[i].split('=');\n\n if(z[1] === ''){\n $('#' + z[0]).addClass('errorInput');\n handler.push(false);\n }else{\n $('#' + z[0]).removeClass('errorInput');\n }\n }\n\n if(handler[0] === false){\n return false;\n }else{\n return true;\n }\n }", "isValid() {\n let value = this.input.value;\n return !isNaN(value);\n }", "onUsernameChange(e) {\n this.setState({ username: e.target.value });\n //We want to clear the error when ever the user type something new\n this.clearValidationErr(\"username\");\n }", "function checkInputs(inputArr) {\n inputArr.forEach(input => {\n if(input.value.trim() === '') {\n showError(input, `${input.placeholder} cannot be empty`);\n } else {\n showSuccess(input);\n }\n })\n}", "function onSubmitValidate(event) {\n var hasErrors = false;\n $(this).find(\".not-empty\").each(function(){\n if($.trim($(this).val()).length == 0) {\n //element value is empty\n $(this).css(\"border-color\",\"#db8\");\n $(this).css(\"background\",\"#ffc\");\n hasErrors = true;\n }\n });\n if(hasErrors){\n showError($(\"#emptyerror\").text());\n event.preventDefault();\n return !1;\n }\n}", "function inputPassError(e) {\n\te.target.classList.remove('input--focus');\n\te.target.parentElement.children[0].classList.remove('icon--focus');\n\te.target.parentElement.children[0].children[0].classList.remove(\n\t\t'icon__svg--focus'\n\t);\n\n\tif (e.target.value.length <= 0) {\n\t\te.target.classList.add('input_error', 'password_error');\n\t\te.target.parentElement.children[0].classList.add('icon_error');\n\t\te.target.parentElement.children[0].children[0].classList.add(\n\t\t\t'icon-svg_error'\n\t\t);\n\n\t\te.target.parentElement.appendChild(passError);\n\t\tpassError.classList.add('error_message');\n\t\tpassError.textContent = 'Enter a valid password';\n\t\treturn;\n\t}\n}", "function validate() {\n if (!$scope.id.length || !$scope.pass.length || !$scope.name.length || !$scope.group.length ||\n !$scope.email.length || !$scope.phone.length || !$scope.workplace.length || !($scope.informed.email.length || \n $scope.informed.facebook.length || $scope.informed.webSite.length || $scope.informed.colleague.length || \n $scope.informed.other.length) || !($scope.population.elementary.length || \n $scope.population.highSchool.length || $scope.population.higherEducation.length || $scope.population.other.length)) {\n $scope.emptyData = true;\n } else { // Habilita\n $scope.emptyData = false;\n }\n }", "checkLastName(){\n if(this.state.lastName.length <= 0){\n return (\n <div>\n <p className=\"warningText\">Please enter your last name </p>\n </div>)\n }\n }", "function emptyValidation(control, msgBox) {\n\n var control_len = control.value.length;\n if (control_len === 0) {\n document.getElementById(msgBox).innerHTML = '<font style=\"color: red;\">Field should not be empty.</font><br>';\n control.focus();\n return false;\n }\n document.getElementById(msgBox).innerHTML = '';\n return true;\n}", "function validInput() {\n let inputs = document.querySelectorAll('#modal-add .input-add')\n\n for (input of inputs) {\n let sizeInput = input.value\n\n if (sizeInput.length == 0) {\n input.style.borderLeftColor = \"var(--colorError)\"\n return false\n } else {\n input.style.borderLeftColor = \"var(--colorOk)\"\n }\n\n }\n\n return true;\n}", "validateInput(inputName, inputVal) {\n\n if (inputName == 'lastname') {\n if (validator.isAscii(inputVal)){\n this.setState({ lastnameError: '' });\n this.setState({ lastnameFlag: 1 });\n return true;\n } else {\n this.setState({ lastnameError: 'Please enter your Last Name'});\n this.setState({ lastnameFlag: 0 });\n return false;\n }\n }\n }", "handleInputChange(event){\n // console.log('Some text changed', event.target.value);\n let newTask = event.target.value;\n let validateMsg = this.state.validateMsg;\n // console.log(newTask)\n\n this.setState({\n task: newTask\n });\n\n if(newTask.length != 0){\n validateMsg = \"\";\n this.setState({\n validateMsg: validateMsg\n });\n }\n }", "function formCheck( input, error, errorMsg ) {\n\n if ( input.length === 0 ) {\n error.html(errorMsg);\n test = false;\n }else { \n error.html('&nbsp;'); \n test = true; \n }\n}", "orgnameVal(event) {\n if (event.target.value === \"\"){\n document.getElementById(\"orgnameErrMsg\").innerHTML=\"Required\"\n }\n else{\n document.getElementById(\"orgnameErrMsg\").innerHTML=\"\"\n }\n }", "validateBankerName() {\n let bankerName = this.loby.bankerName;\n bankerName = bankerName.trim();\n let error = false;\n let message = '';\n\n if (bankerName) {\n if (bankerName.length < 3) {\n error = true;\n message = \"El nombre es demasiado corto\";\n }\n } else {\n error = true;\n message = \"Este campo es obligatorio\";\n }\n\n this.loby.bankerNameState.hasError = error;\n this.loby.bankerNameState.message = message;\n }", "function isEmpty(input){\r\n //console.log(input.val());\r\n if(input.val().length==0){\r\n return true;\r\n }\r\n return false;\r\n}", "_validateForm() {\n if (this.state == null) { //If state is empty\n return false;\n }\n //If serverUrl is empty\n if (this.state.serverUrl === \"\" || this.state.serverUrl === undefined) {\n alert(\"Please enter a server url!\");\n return false;\n }\n //If username is empty\n if (this.state.username === \"\" || this.state.username === undefined) {\n alert(\"Please enter a username!\");\n return false;\n }\n //If password is empty\n if (this.state.password === \"\" || this.state.password === undefined) {\n alert(\"Please enter a password!\");\n return false;\n }\n\n return true;\n }", "function inputOnchange()\n {\n if(checkRegex())\n {\n inputClearError();\n addTokenToList();\n updateTextarea();\n return;\n }\n inputError();\n }", "function validateInput() {\n\t\tif (!name) {\n\t\t\talert('Please input a name');\n\t\t\treturn false;\n\t\t}\n\t\tif (!description) {\n\t\t\talert('Please give a small description');\n\t\t\treturn false;\n\t\t}\n\t\tif (!value) {\n\t\t\talert('Please describe the sentimental value');\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "handleAddOption(event) {\n event.preventDefault();\n const option = event.target.elements.optshon.value.trim();\n const error = this.props.handleAddOption(option);\n\n if (error) {\n // ES6 syntax for 'error: error; -> then 'error'\n this.setState(() => ({ error }));\n } else {\n event.target.elements.optshon.value = '';\n this.setState(() => ({ error: undefined }));\n }\n }", "function setErrorOnBlank(selector) {\n selector.map(function() {\n if ( !$(this).val() ) {\n $(this).parent().addClass('has-error has-feedback');\n } else {\n $(this).parent().removeClass('has-error has-feedback');\n }\n });\n}", "function stateValidation(){\n\t var state = document.getElementById(\"state\");\n\t\n\t\t\tif(state.value === \"\" )\n\t\t\t{\n\t\t\t\t document.getElementById(\"state_error\").innerHTML=\"**Please Provide the state .\";\n\t\t\t\t\tstate.focus();\t\t\t\t\t\n state.select();\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t}", "validateAfterInput(e) {\n if (e.target.name === \"fname\") {\n if (!isChar(e.target.value)) {\n this.setState({ fname_err: \"error\" });\n this.setState({ fname_err_helperText: \"Invalid\" });\n } else {\n this.setState({ fname_err: \"\" });\n this.setState({ fname_err_helperText: \"\" });\n }\n }\n if (e.target.name === \"lname\") {\n if (!isChar(e.target.value)) {\n this.setState({ lname_err: \"error\" });\n this.setState({ lname_err_helperText: \"Invalid\" });\n } else {\n this.setState({ lname_err: \"\" });\n this.setState({ lname_err_helperText: \"\" });\n }\n }\n if (e.target.name === \"year\") {\n if (!isYearValid(e.target.value)) {\n this.setState({ year_err: \"error\" });\n this.setState({ year_err_helperText: \"Invalid Year\" });\n } else {\n this.setState({ year_err: \"\" });\n this.setState({ year_err_helperText: \"\" });\n }\n }\n if (e.target.name === \"month\") {\n if (!isMonthValid(e.target.value)) {\n this.setState({ month_err: \"error\" });\n this.setState({ month_err_helperText: \"Invalid Month\" });\n } else {\n this.setState({ month_err: \"\" });\n this.setState({ month_err_helperText: \"\" });\n }\n }\n if (e.target.name === \"day\") {\n if (!isDayValid(e.target.value)) {\n this.setState({ day_err: \"error\" });\n this.setState({ day_err_helperText: \"Invalid Day\" });\n } else {\n this.setState({ day_err: \"\" });\n this.setState({ day_err_helperText: \"\" });\n }\n }\n if (e.target.name === \"password\") {\n if (!isPassword(e.target.value)) {\n this.setState({ password_err: \"error\" });\n this.setState({ password_err_helperText: \"Passwords Isn't Secured\" });\n } else {\n this.setState({ password_err: \"\" });\n this.setState({ password_err_helperText: \"\" });\n }\n }\n if (e.target.name === \"confirmPassword\") {\n if (!isEqual(e.target.value, this.state.password.toString())) {\n this.setState({ confirmPassword_err: \"error\" });\n this.setState({\n confirmPassword_err_helperText: \"Passwords Don't Match\",\n });\n } else {\n this.setState({ confirmPassword_err: \"\" });\n this.setState({ confirmPassword_err_helperText: \"\" });\n }\n }\n this.setState({ error: \"\" });\n }", "check() {\n if (this.state.data && this.state.radio && this.state.data !== \"\"\n && this.state.currentMetricAreaCalculations.size >= 1\n && this.state.selectedMetricAreaCalculations) {\n return true\n }\n let errors = {} // Object to hold errors\n\n if (!this.state.data) {\n errors[\"invalidData\"] = \"A value must be entered\"\n }\n if (!this.state.radio) {\n errors[\"invalidRadio\"] = \"An actual or target must be selected\"\n }\n if (this.state.currentMetricAreaCalculations.size < 1) {\n errors[\"invalidMetricArea\"] = \"A metric area must be selected\"\n }\n if (!this.state.selectedMetricAreaCalculations) {\n errors[\"invalidMetricCalc\"] = \"A metric calculation must be selected\"\n }\n errors[\"errorMsg\"] = \"Not all required fields have been answered/selected. Check above for more detail.\"\n\n this.setState(errors)\n return false\n }", "function checkEmptyInput() {\r\n let isEmpty = false;\r\n const CheckFullName = document.querySelector(\"#fname\").value;\r\n const CheckEmail = document.querySelector(\"#email\").value;\r\n const CheckAge = document.querySelector(\"#age\").value;\r\n // remember about empty input\r\n if (CheckFullName === \"\") {\r\n alert(\"Full Name Connot Be Empty\");\r\n isEmpty = true;\r\n } else if (CheckEmail === \"\") {\r\n alert(\"Email Connot Be Empty\");\r\n isEmpty = true;\r\n } else if (CheckAge === \"\") {\r\n alert(\"Age Connot Be Empty\");\r\n isEmpty = true;\r\n }\r\n return isEmpty;\r\n}", "function repload_if_no_input(){\n if ($(\".test_empty\").filter(function() { return $(this).val(); }).length === 0) {\n location.reload();\n }\n }", "function checkInputs() {\n $('input, textarea').blur(function() {\n if ($(this).val().length < 1) {\n $(this).addClass('error');\n } else {\n $(this).removeClass('error');\n }\n });\n }", "validateDatasetName(e) {\n let name = e.target.value;\n let nameValidationState = '';\n this.nameValidationMessage = '';\n if(name != '' && name != undefined) {\n this.nameValidationState = 'success';\n } else {\n this.nameValidationState = 'error';\n this.nameValidationMessage = \"Dataset Name is Required\";\n }\n this.setState({datasetName: name});\n }", "hasInput_(value) {\n return value.length > 0;\n }", "function checkIfEmpty(field)\n{\n if(isEmpty(field.value.trim())){\n setInvalid(field, `Este campo no puede ser vacio`);\n return true;\n }else{\n setValid(field);\n return false;\n }\n}", "function empty() {\n let x;\n x = document.getElementById(\"addQuestion\").value;\n if (x == \"\") {\n alert(\"Enter a Valid Roll Number\");\n return false;\n }\n}", "function checkEmptyString(fld, feedid){\n\tfld.style.background ='white';//set field to normal style\n\tdocument.getElementById(feedid).innerHTML ='';//set feedback to blank\n\t//if user didnt type character into field\n\tif(fld.value.length == 0){\n\t\t//set the field to a warning\n\t\t//make feedback text appear\n\t\tfld.style.background ='orange';\n\t\tdocument.getElementById(feedid).innerHTML ='Required';//lets user know its required\n\t\tfld.focus();//put focus right back on that field\n\t\treturn false; //this sends 'false; to where function was called and stops code\n\t}//ends if user did something wrong\n\treturn true;\n}", "function checkEmpty(element, error, length) {\n if (length == null) {\n if (element == '') {\n error.show();\n return false;\n }\n else {\n error.hide();\n return true;\n }\n }\n else {\n if (element.length > length || element == '') {\n error.show();\n return false;\n }\n else {\n error.hide();\n return true;\n }\n }\n }", "updateErrorState(value) {\r\n let isValid = true;\r\n let errorMessage = this.validInput(value);\r\n if (errorMessage)\r\n isValid = false;\r\n this.setState({ error: (isValid ? null : errorMessage) });\r\n return isValid;\r\n }", "function isNoteEmptyStringInput(input) {\n return input.value != \"\";\n}", "function check_field_empty(field, name, message) {\n if (message != undefined)\n var msg = message;\n else\n var msg = 'Please enter ' + name;\n\n if (is_field_empty(field)) {\n set_message('error', msg);\n clear_message();\n return true;\n } else\n return false;\n}", "function isNotEmpty(inputName, errorContent, errorMessage) {\n errorContent.innerText = '';\n if (inputName.value == \"\") {\n errorContent.innerText = errorMessage;\n return false;\n }\n else\n return true;\n }", "function checkEmptyInput()\r\n {\r\n var isEmpty = false,\r\n name = document.getElementById(\"name\").value,\r\n bday = document.getElementById(\"bday\").value,\r\n gender = document.getElementById(\"gender\").value;\r\n \r\n if(name === \"\"){\r\n alert(\"Name is Empty\");\r\n isEmpty = true;\r\n }\r\n else if(bday === \"\"){\r\n alert(\"Birthdate is Empty\");\r\n isEmpty = true;\r\n }\r\n else if(gender === \"\"){\r\n alert(\"Gender is Empty\");\r\n isEmpty = true;\r\n }\r\n return isEmpty;\r\n }", "handleInputChange(event) {\r\n event.preventDefault();\r\n const { name, value } = event.target;\r\n let missionDescErrors = '';\r\n if (name === 'missionDesc') {\r\n let trimed = value.trim();\r\n missionDescErrors = trimed.length < 1 ? 'Mission description is required.' : '';\r\n }\r\n\r\n this.setState(prevState => {\r\n let errors = { ...prevState.errors }\r\n let mission = { ...prevState.mission }\r\n errors.missionDesc = missionDescErrors;\r\n mission[name] = value;\r\n return { mission, errors };\r\n });\r\n }", "function required(inputtx) \n {\n if (inputtx.value.length == 0)\n { \n alert(\"message\"); \t\n return false; \n } \t\n return true; \n }", "function validationNoEmpty() {\n if (email.value == \"\" || username.value == \"\" || password.value == \"\") {\n\n error.innerHTML = \"Veuillez remplir tout les champs\";\n error.style.color = 'red';\n }\n else\n {\n validationEmail();\n }\n \n}" ]
[ "0.7182022", "0.7030161", "0.6984411", "0.6972721", "0.69539297", "0.69399756", "0.68481624", "0.67780215", "0.6716509", "0.6688958", "0.66460836", "0.6628474", "0.6565465", "0.6526228", "0.6515873", "0.6502551", "0.64997756", "0.6466677", "0.64562184", "0.6453888", "0.6451129", "0.64334273", "0.64315176", "0.64124775", "0.64100087", "0.64091724", "0.63769126", "0.6357385", "0.6351377", "0.63449425", "0.6332336", "0.6331177", "0.6317829", "0.63088113", "0.62951326", "0.62836224", "0.6275202", "0.6274659", "0.626316", "0.6253656", "0.6234371", "0.6232253", "0.62311757", "0.6211426", "0.620922", "0.6202329", "0.619334", "0.6191089", "0.6182604", "0.61795676", "0.6173523", "0.6170801", "0.6156023", "0.615431", "0.6152072", "0.6151609", "0.6147656", "0.6145139", "0.6136849", "0.6118143", "0.61152446", "0.6114683", "0.611074", "0.61104065", "0.6108581", "0.61010814", "0.60988784", "0.6097661", "0.6096879", "0.609369", "0.6085717", "0.6075479", "0.6066467", "0.6058908", "0.60539865", "0.60444", "0.60374135", "0.6035591", "0.6033258", "0.6027957", "0.6025426", "0.6020656", "0.601684", "0.6013331", "0.6005633", "0.5987261", "0.598625", "0.5978972", "0.5971098", "0.59708035", "0.5970233", "0.5962826", "0.5962121", "0.5961189", "0.5959881", "0.5959526", "0.59581184", "0.59522456", "0.5950507", "0.5949777" ]
0.6229368
43
Select the class for the input form based on the error state
selectClass() { var inputArr = this.state.input.slice() this.state.error.map((item, index) => { if (this.state.error[index] == true && index != 3) { inputArr[index] = 'empty_input' } else if (this.state.error[index] == true && index == 3) { inputArr[index] = '2px solid red' } else { inputArr[index] = '' } }) this.setState({input: inputArr}) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inputError()\n {\n input.addClass('mt-error');\n }", "function toggleError(state) {\n state ? $('#classInput').addClass('error') :\n $('#classInput').removeClass('error');\n}", "function setErrorFor(input){\r\n const form_required = input.parentElement;\r\n form_required.className = 'required error';\r\n \r\n}", "function raiseError(inputField) {\r\n inputField.classList.add(\"input-error\");\r\n}", "inputClass () {\n let klass = ''\n\n if (this.state.focus) {\n klass += ' usa-input-focus'\n }\n\n if (this.state.valid) {\n klass += ' usa-input-success'\n }\n\n if (this.state.checked) {\n klass += ' selected'\n }\n\n return klass.trim()\n }", "function error(error_div,input, msg, addClass){\n $(error_div).html(msg);\n $(input).focus();\n\n if (addClass == true){\n $(input).addClass(\"warning-input-border\")\n }\n else{\n $(input).removeClass(\"warning-input-border\")\n }\n}", "function setErrorFor(input, message){\n/*input.parentElement = assigns formControl with the parentelement of the input. for example, if the \n input is username then the parent element is the form-control in the html document.*/\n const formControl = input.parentElement;\n const small =formControl.querySelector('small');\n//innerText = change the accordingly the message.\n small.innerText = message;\n// .className = execute the style form-control.error\n formControl.className = 'form-control error';\n }", "function updateClasses() {\n\n var formField = formCtrl[scope.fieldName];\n element.toggleClass('isValid', formField.$valid);\n element.toggleClass('error', formField.$invalid && (formField.$dirty || formField.$touched || formCtrl.$submitted));\n element.toggleClass('valueEntered', formField.$dirty || (formField.$viewValue !== undefined && \n formField.$viewValue !== null && formField.$viewValue.length > 0));\n }", "function reset_element_with_errorclass(el_input, update_dict) {\n // make field red when error and reset old value after 2 seconds\n const err_class = \"border_bg_invalid\";\n el_input.classList.add(err_class);\n setTimeout(function (){\n el_input.classList.remove(err_class);\n UpdateField(el_input, update_dict);\n }, 2000);\n } // reset_element_with_errorclass", "function handleInvalidInputStyle(inputField, i) {\n if (i.classList.contains(checkIcon)) {\n i.classList.remove(checkIcon);\n inputField.classList.remove(\"green-border\");\n }\n\n i.classList.add(errorIcon, \"red\");\n inputField.classList.add(\"red-border\");\n }", "function handleValidInputStyle(inputField, i) {\n if (i.classList.contains(errorIcon)) {\n i.classList.remove(errorIcon, \"red\");\n inputField.classList.remove(\"red-border\");\n }\n\n i.classList.add(checkIcon, \"green\");\n inputField.classList.add(\"green-border\");\n }", "errorStyles(style) {\r\n if(style === \"add\") {\r\n this.inputPeopleLabel.classList.add(\"error\");\r\n this.inputPeople.classList.add(\"error__border\");\r\n }\r\n if(style === \"remove\") {\r\n this.inputPeopleLabel.classList.remove(\"error\");\r\n this.inputPeople.classList.remove(\"error__border\");\r\n }\r\n }", "function setErrorMsg(input, errormsgs){\n const formControl = input.parentElement;\n const small = formControl.querySelector('small');\n formControl.className = \"form-control error\";\n small.innerText = errormsgs;\n}", "errorClass(error) {\n return(error.length === 0 ? '' : 'has-error');\n }", "function setFieldState(key){\n var inError = errorStates.get(key);\n var methodName = inError ? \"addClass\" : \"removeClass\";\n var label = $(\"[for=input_\" + key + \"]\");\n label[methodName](\"error\");\n}", "function showError(error) {\n errorElement.innerText = error;\n\n //check for the username field\n if (!username.value) {\n username.classList = 'username invalid';\n } else {\n username.classList = 'username';\n }\n\n //check for the password field\n if (!password.value) {\n password.classList = 'password invalid';\n } else {\n password.classList = 'password';\n }\n\n //check for the mail field\n if (!mail.value) {\n mail.classList = 'mail invalid';\n } else {\n mail.classList = 'mail';\n }\n}", "applyErrorStyle() {\n this.nodes.inputHolder.classList.add(this.CSS.inputError);\n this.nodes.progress.remove();\n }", "errorClass(error) {\n return(error.length === 0 ? '' : 'has-error');\n}", "function setError(field, container) {\n field.classList.add('error');\n field.classList.remove('success');\n container.getElementsByClassName(\"error-label-format\")[0].classList.add('hidden');\n container.getElementsByClassName(\"error-label\")[0].classList.remove('hidden');\n}", "function setErrorStates(input, isValid) {\n if (isValid) {\n // Need to remove the error class for the input and hide the message\n $(`#${input.attr('data-error-element-id')}`).removeClass('show');\n input.removeClass('error');\n } else {\n // Need to add the error class for the input and show the error message\n $(`#${input.attr('data-error-element-id')}`).addClass('show');\n input.addClass('error');\n }\n}", "function showError(input,message){\n //get the parent element for the input field(.form-control)\n const formControl = input.parentElement;\n //override the class --add error\n formControl.className = 'form-control error';\n //get the small element for the error message\n const small = formControl.querySelector('small');\n //override the text for small element using the input message\n small.innerText = message;\n}", "errorClass(error) {\n return (error.length === 0 ? \"\" : \"has-error\");\n }", "function tornarErrosInvisiveis(){\n $(errorName).addClass('deixarInvisivel');\n}", "function setErrorFor(input, message){\n const inputControl =input.parentElement //.inputBox\n const small = inputControl.querySelector('small')\n //add err msg inside small\n small.innerText = message\n //add error class\n inputControl.className ='inputBox error'\n }", "function showErrors(InputField, SpanErrorField) {\n InputField.classList.replace('focus:ring-blue-600', 'focus:ring-red-600')\n InputField.classList.replace('border-blue-300', 'border-red-600')\n SpanErrorField.classList.remove('hidden')\n}", "function showError(className) {\n $('.' + className).addClass('show-error');\n }", "getErrorClass(fieldName) {\n return this.getError(fieldName) ? this.errorClass : '';\n }", "function invalidInput(field, message) {\n field.addClass(\"invalid\");\n}", "function addErrorState(field){\t\n\tfield.addClass(\"form-error\");\n\tfield.attr(\"placeholder\", field.data(\"needed\") + \" needed\");\n}", "function setErrorFor(input, errorMessage) {\n const formDiv = input.parentElement;\n const errorField = formDiv.querySelector('small');\n errorField.innerText = errorMessage;\n // reaching the class in css\n formDiv.className = 'form-div error';\n}", "function controlHasError(element) {\n element.parent().addClass(\"has-error\");\n}", "function setError(input, message) {\n const formGroup = input.parentElement\n const small = formGroup.querySelector('small')\n small.innerText = message\n formGroup.className = 'form-group error'\n}", "function setSuccessFor(input){\r\n const form_required = input.parentElement;\r\n form_required.className = 'required success';\r\n}", "render() {\n // let phoneClass = '';\n // if (this.state.phoneError !== 'Valid') {\n // phoneClass = 'successful-phone';\n // } else {\n // phoneClass = 'failing-phone';\n // }\n return (\n <div className=\"App\">\n <div className=\"App-header\">\n <img src={logo} className=\"App-logo\" alt=\"logo\" />\n <h2>React Form</h2>\n </div>\n <form>\n Name:\n <input className=\"name\" type=\"text\" id=\"input-text-sm\"\n onChange={(event) => this.updateState(event, this.validateName(event.target.value), \"nameError\")}/>\n <p id=\"name\"> {this.state.nameError} </p> <br/>\n Email:\n <input className=\"email\" type=\"text\"\n onChange={(event) => this.updateState(event, this.validateEmail(event.target.value), \"emailError\")}/>\n <p id=\"email\"> {this.state.emailError} </p> <br/>\n Phone:\n <input className=\"phone\" /*{phoneClass}*/ type=\"text\"\n onChange={(event) => this.updateState(event, this.validatePhone(event.target.value), \"phoneError\")}/>\n <p id=\"phone\"> {this.state.phoneError} </p> <br/>\n <input type=\"submit\"/>\n </form>\n </div>\n );\n }", "function setErrorFor(input, message) {\n var formGroup = input.parentElement;\n var formMessage = formGroup.querySelector(\".form-message\");\n formMessage.innerText = message;\n formGroup.className = 'form-group error';\n}", "renderField(field) {\n //console.log(\"Field Details : \" + JSON.stringify(field));\n const {\n meta: { touched, error },\n type,\n placeholder,\n value\n } = field;\n const className = `form-group form-control-lg ${\n touched && error ? \"has-danger\" : \"\"\n }`;\n console.log(\"className : \" + className);\n return (\n <div class=\"form-group form-control-lg has-danger\">\n <label>{field.label}</label>\n <input\n class=\"form-control form-control-lg border border border-dark\"\n type={type}\n placeholder={placeholder}\n value={value}\n {...field.input}\n />\n <div class={{ className }}>{touched ? error : \"\"}</div>\n </div>\n );\n }", "function SetErrorFor(input, message){\n //this element is double nested\n const formControl = input.parentElement.parentElement;\n const small = formControl.querySelector('small');\n small.innerText = message;\n formControl.className = \"formControl error\";\n}", "function inputBoxClassStatus(elementInput, statusClass) {\n if(statusClass) { // If is true add success\n // remove box-message-fail\n elementInput.removeClass('input-fail')\n // add box-message-success\n elementInput.addClass('input-success')\n\n } else { // if is false add fail\n // remove input-success\n elementInput.removeClass('input-success')\n // add input-fail\n elementInput.addClass('input-fail')\n }\n}", "function setSuccessMsg(input){\n const formControl = input.parentElement;\n formControl.className = \"form-control success\";\n}", "updateState(e, validatorFunction, errorName) {\n if (validatorFunction === true) {\n this.setState({[e.target.classList[0]]: e.target.value});\n this.setState({[errorName]: 'Valid'});\n document.getElementById(e.target.classList[0]).style.color = \"green\";\n }\n else if (e.target.value.length === 0) {\n this.setState({[errorName]: 'Empty submission'});\n document.getElementById(e.target.classList[0]).style.color = \"red\";\n }\n else {\n this.setState({[errorName]: 'Invalid form input'});\n document.getElementById(e.target.classList[0]).style.color = \"red\";\n //Test\n }\n }", "function setInputState(input,state)\n{\n $(input).closest(\"td\").removeClass(\"has-success\").removeClass(\"has-error\");\n if(state)\n {\n $(input).closest(\"td\").addClass(\"has-\" + state);\n }\n}", "function showSuccess(input){\n //get the parent element for the input field(.form-control)\n const formControl = input.parentElement;\n //replace the class --add success\n formControl.className = 'form-control success';\n // //get the small element for the error message\n // const small = formControl.querySelector('small');\n // //override the text for small element using the input message\n // small.innerText = message;\n}", "renderField(field) {\n //console.log(\"Field Details : \" + JSON.stringify(field));\n const {\n meta: { touched, error },\n type,\n placeholder,\n value\n } = field;\n const className = `form-group ${touched && error ? \"has-danger\" : \"\"}`;\n console.log(\"className : \" + className);\n return (\n <div class={className}>\n <label>{field.label}</label>\n <input class=\"form-control\" type={type} {...field.input} />\n <div class={{ className }}>{touched ? error : \"\"}</div>\n </div>\n );\n }", "get formElementClass() {\n let baseClass = ['slds-form-element'];\n\n if (this.variant && VARIANTS[this.variant]) {\n baseClass = [...baseClass, ...VARIANTS[this.variant]];\n }\n\n if (!this.valid) {\n baseClass = [...baseClass, 'slds-has-error'];\n }\n\n return baseClass.join(' ');\n }", "function focusInput() {\n this.parentElement.children[1].className = \"cmd_label cmd_active\";\n this.parentElement.children[0].className = this.parentElement.children[0].className.replace(\"error\", \"\");\n }", "renderField(field) {\n //console.log(\"Field Details : \" + JSON.stringify(field));\n const {\n meta: { touched, error },\n type,\n placeholder,\n value\n } = field;\n const className = `form-group form-control-lg ${\n touched && error ? \"has-danger\" : \"\"\n }`;\n //console.log(\"className : \" + className);\n return (\n <div class=\"form-group form-control-lg has-danger\">\n <label>{field.label}</label>\n <input\n class=\"form-control form-control-lg border border border-dark\"\n type={type}\n placeholder={placeholder}\n value={value}\n {...field.input}\n />\n <div class={{ className }}>{touched ? error : \"\"}</div>\n </div>\n );\n }", "function showError(input,message){ \n var formControl =input.parentElement;\n formControl.className='form-control error';\n var small=formControl.querySelector('small');\n small.innerText=message;\n}", "function showError(input, message) {\n const formControl = input.parentElement; // access div with class form-control\n formControl.className = 'form-control error'; // adding error class that will display css (red outline)\n const small = formControl.querySelector('small'); // selects the small tag inside formControl\n small.innerText = message; // display the message\n}", "function inputFieldClass() {\n if (event.key >= 'a' && event.key <= 'z') {\n var inputSlice = input.value + event.key;\n var currentWordSlice = randomWords[currentWord].slice(0, inputSlice.length);\n input.className = inputSlice === currentWordSlice ? '' : 'wrong';\n }else if (event.key === 'Backspace') {\n var inputSlice = event.ctrlKey ? '' : input.value.slice(0, input.value.length - 1);\n var currentWordSlice = randomWords[currentWord].slice(0, inputSlice.length);\n input.className = inputSlice === currentWordSlice ? '' : 'wrong';\n } else if (event.key === ' ') {\n input.className = '';\n }\n }", "function formStyleHelperClasses() {\r\n $('.form-style').attr('placeholder', '');\r\n\r\n $('.form-style').focus(function() {\r\n\r\n $(this).closest('.form-group').addClass('is-focused');\r\n \r\n }).blur(function() {\r\n \r\n $(this).closest('.form-group').removeClass('is-focused');\r\n \r\n if ( $(this).val() ) {\r\n\r\n $(this).closest('.form-group').addClass('is-not-empty');\r\n\r\n } else {\r\n\r\n $(this).closest('.form-group').removeClass('is-not-empty');\r\n\r\n }\r\n \r\n });\r\n }", "function showError(input, message){\n const formControl = input.parentElement;\n formControl.className = 'form-control error';\n const small = formControl.querySelector('small');\n small.innerText = message;\n\n}", "function showError(input, message){\n const formControl = input.parentElement; \n formControl.className = 'real-form-control error';\n const small = formControl.querySelector('small');\n small.innerText = message;\n \n}", "function setErrorFor(input, message) {\n const formControl = input.parentElement; // .form-control element in the html\n const small = formControl.querySelector(\"small\");\n\n // add error msg inside small\n small.innerText = message;\n\n // add error class\n formControl.className = \"form-control error\";\n}", "function showError(input, message){\r\n var formControl = input.parentElement;\r\n formControl.className = 'form-control error';\r\n var small = formControl.querySelector('small');\r\n small.innerText = message;\r\n}", "function _setErrorFeaturesIothreads () {\n $('#tabs-bootos input[wizard_field=\"IOTHREADS\"]').addClass('is-invalid-input');\n $('#tabs-bootos label.features_iothreads').addClass('is-invalid-label');\n }", "renderField(field) {\n\n const { meta: { touched, error } } = field;\n const className = touched && error ? \"form-control form-control-lg is-invalid\" : \"form-control form-control-lg\";\n const inputType = field.type;\n const inputPlaceholder = field.placeholder;\n const errorMessageStyling = touched && error ? \"text-danger\" : \"\";\n\n return (\n\n <div>\n <input className={className} type={inputType} placeholder={inputPlaceholder} {...field.input} />\n <div className={errorMessageStyling}>\n <div>{touched ? error : \"\"}</div>\n \n </div>\n </div>\n );\n}", "function showError(input,message){\n const formControl = input.parentElement;\n formControl.className= \"form-control error\";\n const small = formControl.querySelector(\"small\");\n small.innerText = message;\n}", "function valid(value){\n value.addClass(\"is-valid\");\n value.removeClass(\"is-invalid\");\n}", "function showError(input, message) {\n // Get the parent element of the input field(.form-control)\n const formControl = input.parentElement;\n // Override the class - add error\n formControl.className = \"form-control error\";\n // Get the small element for the error message\n const small = formControl.querySelector(\"small\");\n // Override the text for small element using the input message\n small.innerText = message;\n}", "function showError(text) {\n document.querySelector('.login-error-text').textContent = text;\n for (const element of document.querySelectorAll('#login-form input')) {\n element.classList.add('invalid');\n }\n }", "function showError(input, message){\n // gets parent form control and adds error class. this affects also <small> \n const formControl = input.parentElement;\n formControl.className = 'form-control error';\n // gets small tag and change error message text\n const small = formControl.querySelector('small');\n small.innerText = message;\n}", "function errorStyle(fieldError, field){\r\n fieldError.style.display = \"block\";\r\n field.style.borderColor = \"red\";\r\n}", "function showError(input,message){\n const formControl=input.parentElement;\n formControl.className='form-control error';\n const small=formControl.querySelector('small');\n small.innerText=message;\n}", "function showSuccess(input) {\n // outline the input field with green\n const formControl = input.parentElement; /*parent element: form-control.*/\n formControl.className = 'form-control success';\n}", "function showError(input,massage){\n const formControl = input.parentElement;\n formControl.className = 'form-controll error';\n const small = formControl.querySelector('small');\n small.innerHTML = massage; \n}", "function addErrClass(fieldName, fieldId) {\n $(\"#\" + fieldId).addClass('error');\n $(\"span#sp\" + fieldName).html(\"*\");\n $(\"#msg\").hide();\n }", "renderField(field) {\n\n const { meta: { touched, error } } = field;\n const className = touched && error ? \"form-control form-control-lg is-invalid\" : \"form-control form-control-lg\";\n const inputType = field.type;\n const inputPlaceholder = field.placeholder;\n const errorMessageStyling = touched && error ? \"text-danger\" : \"\";\n\n return (\n\n <div className=\"form-group\">\n \n <input className={className} type={inputType} placeholder={inputPlaceholder} {...field.input} />\n <div className={errorMessageStyling}>\n <div>{touched ? error : \"\"}</div>\n \n </div>\n </div>\n );\n }", "function setSuccessFor(input){\n\n const formControl = input.parentElement;\n\n formControl.className = 'form-control success';\n }", "function setErrorForUpload(input, message) {\n\tconst formGroupUpload = input.parentElement; //formGrup\n\tconst h6 = formGroupUpload.querySelector(\"h6\");\n\n\t//add error message inside h6\n\th6.innerText = message;\n\n\t//add error class\n\tformGroupUpload.className = \"form-group-upload errormsgupload\";\n}", "function showError(input, message){\n const formControl=input.parentElement;\n formControl.className='form-control error';\n const small=formControl.querySelector('small');\n small.innerText=message;\n}", "labelClass () {\n let klass = ''\n\n if (this.state.error) {\n klass += ' usa-input-error-label'\n }\n\n if (this.state.checked) {\n klass += ' checked'\n }\n\n if (this.state.focus) {\n klass += ' usa-input-focus'\n }\n\n return klass.trim()\n }", "function invalidInputsMsg(input, message) {\n \n \n const fieldInput = input.parentElement;\n \n // lägger till error class och tar bort success class\n fieldInput.classList.remove('success');\n fieldInput.classList.add('error');\n\n // gör så att error meddelandet visas \n const error = fieldInput.querySelector('span');\n error.textContent = message;\n}", "function checkIfStillError(e) {\n $.each($(\".textbox.error\"), function(i, val){\n var textbox = $(val);\n if (textbox.val()) {\n textbox.removeClass(\"error\");\n }\n });\n }", "function setSuccessFor(input) {\n const formControl = input.parentElement;\n formControl.className = \"form-control success\";\n}", "function addErrorStyle(jQuerySelector) {\n $(jQuerySelector).parent().addClass(\"has-error\");\n }", "function markInput(input, valid) {\n if (valid) {\n if (input.classList.contains('error-border')) {\n input.classList.remove('error-border');\n }\n } else {\n if (!input.classList.contains('error-border')) {\n input.classList.add('error-border');\n }\n }\n}", "function setError(key) {\n var $input = $(options.selectors[key]);\n if (UserPreferences.getPreference(key)) {\n $input.removeClass(options.selectors.errorClass);\n } else if ($input.find(options.selectors.typeaheadText).val().length > 0) {\n $input.addClass(options.selectors.errorClass);\n }\n }", "function showError(input, message) {\n // get the form field element\n const formField = input.parentElement;\n // add the error class\n const inputElement = formField.querySelector('.form-group__input');\n inputElement.classList.add('error');\n\n // show the error message\n const errorMessage = formField.querySelector('small');\n errorMessage.classList.add('danger');\n errorMessage.textContent = message;\n}", "function validNameRed () { \n if (name.value === '') {\n nameField.classList.add('input-invalid')\n } \n else{\n nameField.classList.add('input-valid')\n }\n}", "renderError({ name = false, email = false }) {\n const formElement = document.querySelector(this.newsletterFormSelector);\n\n const inputName = formElement.name;\n const inputEmail = formElement.email;\n\n const toggleNameError = (activate) => {\n activate\n ? inputName.classList.add(\"error\")\n : inputName.classList.remove(\"error\");\n };\n\n const toggleEmailError = (activate) => {\n activate\n ? inputEmail.classList.add(\"error\")\n : inputEmail.classList.remove(\"error\");\n };\n\n name ? toggleNameError(true) : toggleNameError(false);\n email ? toggleEmailError(true) : toggleEmailError(false);\n }", "function addError(obj){\n\t\t$obj = obj;\n\t\tif($obj.hasClass(\"input-ok\"))\n\t\t\t$obj.removeClass(\"input-ok\");\t\t\n\t\t$obj.addClass(\"input-error\");\n\t}", "function turnFieldToRedColorBorder(elementName) {\n elementName.classList.add(\"is-invalid\");\n}", "function showError(input, message) {\n const formControl = input.parentElement.parentElement;\n formControl.className = 'form-control error';\n const small = formControl.querySelector('small');\n small.innerText = message;\n\n}", "function validationErrors(functionName, e, requiredField, classUpdate) {\n /* if required form field or section is invalid when submitting */\n if(!functionName) {\n e.preventDefault();\n /* add \".not-valid\" className to parent element */\n requiredField.parentElement.className = 'not-valid';\n requiredField.parentElement.lastElementChild.className = classUpdate;\n /* if required form field or section is valid */\n } else {\n /* add \".valid\" className to parent element */\n requiredField.parentElement.className = 'valid';\n requiredField.parentElement.lastElementChild.className = `${classUpdate} hint`;\n }\n}", "function showError(input,errmsg){\t\n\tconst formControl = input.parentElement;\n\tformControl.className = 'form-control error';\n\n\tconst small = formControl.querySelector('small');\n\tsmall.innerText = errmsg;\n}", "function updateValidationClass(element) {\n var $element = angular.element(element);\n var validator_group = 'validator-group' in element.attributes && element.attributes['validator-group'].value;\n var $validator_group = $element.closest('.' + validator_group);\n var validator_group_elements = 'validator-group-elements' in element.attributes && element.attributes['validator-group-elements'].value;\n if (validator_group_elements && !validator_group) {\n throw new Error('You must define \"validator-group\" which contains \"validator-group-elements\"');\n }\n\n // Make sure the element is a form field and not a button for example\n // Only form fields should have names. \n if (!(element.name in scopeForm)) {\n return;\n }\n var formField = scopeForm[element.name];\n\n // This is extra for users wishing to implement the .has-error class on the field itself\n // instead of on the parent element. Note that Bootstrap requires the .has-error class to be on the parent element\n $element.removeClass('has-error');\n $element.parent().removeClass('has-error');\n\n // remove validation class from 'validator-group' if it defined\n if ($validator_group.length) {\n $validator_group.removeClass('has-error');\n }\n\n // Only add/remove validation classes if form has been submitted\n if (scopeForm.submitted) {\n if (formField.$invalid) {\n $element.parent().addClass('has-error');\n\n // This is extra for users wishing to implement the .has-error class on the field itself\n // instead of on the parent element. Note that Bootstrap requires the .has-error class to be on the parent element\n $element.addClass('has-error');\n\n // add validation class for element with 'validator-group' class if defined\n if ($validator_group.length) {\n $validator_group.addClass('has-error');\n }\n }\n else if (validator_group_elements) {\n var groupElements = $validator_group.find(validator_group_elements);\n if (!groupElements.length) {\n throw new Error('Can not find elements by selector=\"'+validator_group_elements+'\" in validator-group=\"'+validator_group+'\" ');\n }\n else {\n angular.forEach(groupElements, function (groupElement) {\n var field = scopeForm[groupElement.name];\n if (!field) {\n throw new Error('Can not find element with name=\"'+groupElement.name+'\" in validator-group=\"'+validator_group+'\" ');\n }\n if (field.$invalid) {\n return $validator_group.addClass('has-error');\n }\n });\n }\n }\n }\n }", "function displayInvalidField(id) {\n\n let e = document.getElementById(id);\n e.className = \"has-error\";\n }", "function setFormErrors(form, errors) {\n let inputs = form.querySelectorAll(\"input\");\n let button = form.querySelector(\".modal__button\");\n for (let input of inputs) {\n if (errors[input.name] && input.type !== \"checkbox\" && input.type !== \"radio\") {\n inputError(input, button);\n textError(input, errors[input.name]);\n }\n if (!errors[input.name]) {\n inputSuccess(input);\n textSuccess(input);\n }\n }\n let inputsError = [];\n inputsError = [...form.querySelectorAll(\".modal__input_error\")];\n if(inputsError.length === 0){\n button.classList.add(\"button_good\");\n } else {\n button.classList.add(\"button_bad\");\n } \n}", "function toggleConfirmEmailErrorClass() {\n\t\tif ( $( '#billing_email' ).length && $( '#billing_email-2' ).val().toLowerCase() !== $( '#billing_email' ).val().toLowerCase() ) {\n\t\t\t$( '#billing_email-2_field' ).addClass( 'tlc-woocommerce-invalid-required-field' );\n\t\t}\n\t\telse if ( $( '#billing_email' ).length && $( '#billing_email-2' ).val().toLowerCase() === $( '#billing_email' ).val().toLowerCase() ) {\n\t\t\t$( '#billing_email-2_field' ).removeClass( 'tlc-woocommerce-invalid-required-field' );\n\t\t}\n\t}", "function setSuccessFor(input){\n const formControl=input.parentElement;\n formControl.className=\"form-control success\";\n formValidInput[input.id] = true;\n }", "function setError(input, errorMessage){\n let message = input.nextElementSibling;\n message.classList.add('error');\n message.innerHTML = errorMessage;\n}", "function setErrorMessage(input, message) {\n // Access parent element such as the div container holding values\n const formControl = input.parentElement;\n\n // Access <small> element that will display the error and asign it to const\n const small = formControl.querySelector(\"small\");\n\n // setting class name as error so CSS enables visbility and red color scheme for error message\n small.className = \"errorSmall\";\n\n // assign the message we want to display\n small.innerText = message;\n}", "function error_account_protected() {\n $error = ($('.error').data(\"ptd\"));\n\n if ($error === 1) {\n $('input[type=text]').css('color', 'red');\n } else if ($error === 2) {\n $('#twittername1').css('color', 'red');\n } else if ($error === 3) {\n $('#twittername2').css('color', 'red');\n }\n}", "function resetFormRegister(){\r\n var success = document.getElementsByClassName(\"required success\");\r\n var error = document.getElementsByClassName(\"required error\");\r\n var i;\r\n\r\n for(i = 0; i < success.length;i){\r\n success[i].className = \"required\"\r\n }\r\n\r\n for(i = 0; i < error.length;i){\r\n error[i].className = \"required\"\r\n }\r\n fName.value = \"\";\r\n lName.value =\"\";\r\n address.value =\"\";\r\n city.value =\"\";\r\n zip.value =\"\";\r\n dob.value =\"\";\r\n phone.value =\"\";\r\n emailR.value =\"\";\r\n password.value =\"\";\r\n \r\n}", "function showError(input, message) {\n //console.log('Input at Show error :' + input);\n const formControl = input.parentElement;\n if (formControl) {\n formControl.className = 'form-control error';\n const smallElement = formControl.querySelector('small');\n smallElement.innerText = message;\n } else {\n console.log('Form Control undefined');\n }\n}", "function class_nameVerify(){\n\t\tif(class_name.value != null || class_name.value != \"\"){\t\t\t\n\t\t\tclass_name.style.border = \"1px solid #5e6e66\";\n\t\t\tdocument.getElementById('class_name_div').style.color = \"#5e6e66\";\n\t\t\tclass_name_error.innerHTML = \"\";\n\t\t\treturn true;\n\t\t}\n\t}", "static showSmsInputError(state) {\n const validationElement = document.querySelector(`#${CHANNEL_CAPTURE_CONTAINER_CSS_IDS.onesignalSmsValidationElement}`);\n const inputElement = document.querySelector(`#${CHANNEL_CAPTURE_CONTAINER_CSS_IDS.smsInputWithValidationElement}`);\n if (!validationElement || !inputElement) {\n Log.error(\"OneSignal: couldn't find slidedown validation element\");\n return;\n }\n if (state) {\n validationElement.classList.remove(CHANNEL_CAPTURE_CONTAINER_CSS_CLASSES.onesignalValidationElementHidden);\n inputElement.classList.add(CHANNEL_CAPTURE_CONTAINER_CSS_CLASSES.onesignalErrorInput);\n } else {\n validationElement.classList.add(CHANNEL_CAPTURE_CONTAINER_CSS_CLASSES.onesignalValidationElementHidden);\n inputElement.classList.remove(CHANNEL_CAPTURE_CONTAINER_CSS_CLASSES.onesignalErrorInput);\n }\n }", "function addErrorClass(element){\n var className = 'has-error';\n\n if( element.classList ){\n element.classList.add(className);\n } else {\n element.className += ' ' + className;\n }\n}", "function checkErrorCompanyName(value) {\n if(value.trim()=='') {\n var errorCompanyName = document.getElementById('errorCompanyName');\n var companyName = document.getElementById('companyName');\n errorCompanyName.classList.add('showElement');\n companyName.classList.add('invalidField');\n } \n}", "function validateInputsClass (array) {\n var flag = true\n if (true) {\n for (var i = 0; i < array.length; i++) {\n var className = document.querySelector('#' + array[i]).getAttribute('class')\n if (className.indexOf('success') < 0) {\n flag = false\n }\n }\n }\n\n return flag\n}" ]
[ "0.7497861", "0.7146865", "0.696939", "0.6861162", "0.6804934", "0.6783795", "0.6694252", "0.66486627", "0.6636805", "0.66358185", "0.66026324", "0.65632033", "0.65338755", "0.6532126", "0.6525144", "0.65196353", "0.65191036", "0.6504873", "0.6473391", "0.64716434", "0.6448615", "0.6441454", "0.63930756", "0.6387219", "0.63805205", "0.6368599", "0.6350799", "0.6332652", "0.6322729", "0.6321945", "0.63089114", "0.6285234", "0.6283077", "0.6278786", "0.62780243", "0.62774795", "0.6246633", "0.62339956", "0.62317646", "0.6219764", "0.6214514", "0.6211933", "0.6205588", "0.62046134", "0.6198832", "0.6198118", "0.61980426", "0.616094", "0.61544913", "0.6153459", "0.61534554", "0.6108737", "0.6103473", "0.6095087", "0.6088525", "0.6080075", "0.6051521", "0.6047654", "0.604561", "0.60442966", "0.6035239", "0.6025084", "0.60190946", "0.601794", "0.6016949", "0.6016355", "0.60155624", "0.6014001", "0.6010346", "0.60090494", "0.5981007", "0.59799683", "0.59795845", "0.59772843", "0.59642047", "0.5961743", "0.5957256", "0.59552777", "0.59496695", "0.5948585", "0.5946502", "0.5940602", "0.59360176", "0.5934359", "0.59330076", "0.5930699", "0.5928681", "0.59279484", "0.5923101", "0.59140956", "0.5909954", "0.5906414", "0.590529", "0.5902551", "0.59016496", "0.5897687", "0.58947766", "0.58926547", "0.58906925", "0.5888742" ]
0.6558868
12
Reset the input form after create action
reset() { this.refs.companyName.value = ''; this.refs.companyAddress.value = ''; this.setState({revenue: '', phone: ''}) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resetNewAnnotationForm(){\n\t\t$(\"#new-annotation-title\").val(\"\");\n\t\t$(\"#new-annotation-text\").val(\"\");\n\t\t$(\"#new-annotation-image\").val(\"\")\n\t\t$(\"#new-annotation-public\")[0].checked = false;\n\t\t$(\".error.message\").css(\"display\", \"none\");\n\t\t$(\"#new-annotation-title-field\").removeClass(\"error\");\n\t\t$(\"#new-annotation-text-field\").removeClass(\"error\");\n\t\t$('#new-annotation-modal').modal('hide');\n\t}", "function reset() {\n self.input = {location: '', industry: ''};\n $scope.myForm.$setPristine(); //reset Form\n }", "function clearForm() {\n isNewObject = true;\n var $dialog = dialog.getElement();\n $('input:text', $dialog).val('');\n $('.input-id', $dialog).val(0);\n $('.input-password', $dialog).val('');\n $('.input-connection-id', $dialog).val(0);\n $('.input-engine', $dialog)[0].selectedIndex = 0;\n $('.input-port', $dialog).val(engines.mysql.port);\n $('.input-confirm-modifications', $dialog).prop('checked', true);\n $('.input-save-modifications', $dialog).prop('checked', false);\n $('.input-trusted-connection', $dialog).prop('checked', false);\n $('.input-instance-name', $dialog).val('');\n }", "reset() {\n\t\tthis.formElement.reset();\n\t}", "function resetPresidentForm(){\n fechaInicioField.setValue('');\n descripcionEventoField.setValue('');\n }", "function resetForm() {\n\t\t// Zero out all values for new recipe entry \n\t\t$(\"recipeTitle\").value = \"\"\n\t\t$(\"recipeSummary\").value = \"\"\n\t\t$(\"userDifficulty\").value = \"\"\n\t\t$(\"chooseDate\").value = \"\"\n\t\t$(\"flavorRange\").value = \"\"\n\t\t$(\"ingredients\").value = \"\"\n\t\t$(\"directions\").value = \"\"\n\t\tclearRadioValue('recipeCat');\n\t}", "function resetAddForm(){\r\n TelephoneField.reset();\r\n FNameField.reset();\r\n LNameField.reset();\r\n TitleField.reset();\r\n MailField.reset();\r\n AddField.reset();\r\n MobileField.reset();\r\n }", "function resetform() {\n clearField(nameField);\n clearField(emailField);\n clearField(messageField);\n}", "_clearForm() {\n // Clears input fields\n itemNameInput.value =\n itemDueDateInput.value =\n itemTimeDueInput.value =\n itemDescriptionInput.value =\n \"\";\n // Makes sure default pri always \"no priority\"\n itemPriorityInput.value = \"no_pri\";\n }", "function resetPresidentForm(){\n consecuenciasField.setValue('');\n descripcionField.setValue('');\n }", "function reset() {\n\t\tvm.addSubCatFrm.$setPristine();\n\t}", "function resetInput() {\n $scope.affiliationObj = {\n affId: '',\n affname: ''\n };\n $scope.inputObject = {\n firstName: '',\n lastName: '',\n affiliations: []\n };\n }", "resetBookForm() {\n this.selectedBook = null;\n this.bookForm = {};\n }", "function resetAddMenuForm(){\r\n MenuNameField.reset();\r\n MenuDescField.reset();\r\n MStartDateField.reset();\r\n // MEndDateField.reset();\r\n\t\t\t\t\t \r\n }", "resetForm() {\n this.init = {};\n }", "resetAndReturn() {\n data.input = JSON.parse(JSON.stringify(data.emptyForm));\n data.items = [];\n this.props.returnToStart();\n }", "function resetAddRoomForm(){\r\n \r\n RoomNumberField.reset();\r\n RoomValidFromField.reset();\r\n // RoomValidToField.reset();\r\n\t\t\t\t\t \r\n }", "function reset_form_data() {\n $(\"#order_customer_id\").val(\"\");\n $(\"#order_created_date\").val(\"\");\n\n row_num = 0;\n $(\"#order_items\").empty();\n add_row();\n }", "_resetUpdateITOInfoForm()\r\n\t{\r\n\t\tvar self=this;\r\n\t\tvar form=document.getElementById(\"updateITOInfoForm\");\r\n\t\tform.reset();\r\n\t\tform.itoId.value=\"\";\r\n\t\t \r\n\t\tform.joinDate.value=\"\";\r\n\t\t$(form.joinDate).datepicker(\"destroy\");\r\n\t\t$(form.joinDate).datepicker({changeMonth: true,\r\n\t\t\t changeYear: true,\r\n\t\t\t dateFormat: 'yy-mm-dd',\r\n\t\t\t \"defaultDate\":new Date()});\r\n\t\t$(form.joinDate).datepicker(\"refresh\");\r\n\t\tform.leaveDate.value=\"2099-12-31\";\r\n\t\t\r\n\t\tvar blackListShiftListDiv=$(\"div.blackListShiftListDiv\")[0];\r\n\t\r\n\t\t$(blackListShiftListDiv).empty();\r\n\t\tself._addBlackListShiftPatternEntry(\"\",blackListShiftListDiv);\r\n\t\tform.submitButton.value=\"Add\";\r\n\t}", "function ResetForm() {\n $scope.editData = {\n ExtraId: 0,\n Type: 0,\n MachineNo: \"\",\n ExtraDate: \"\",\n Remark: \"\"\n };\n $scope.extraform.$setPristine();\n $scope.isFirstFocus = false;\n $timeout(function () {\n $scope.isFirstFocus = true;\n });\n }", "function resetForm() {\n $scope.item = {\n BookName: \"\",\n AuthorName: \"\",\n Price: null,\n BookId: null,\n Description: \"\",\n ImgUrl: null\n };\n }", "function resetForm() {\n $('#productID').val(null);\n $('#productName').val('');\n $('#description').val('');\n $('#price').val('');\n $('#Currency').val('1');\n $('#Status').val('1');\n }", "function ResetForm() {\n $scope.editData = {\n SrNo:\"\", Title: \"\", ListOfParticipants: \"\", DateOfMeeting: \"\", Attachment: \"\", AgendaOfTraining: \"\", DecisionTakenDuringMeeting: \"\"\n };\n $scope.editData.DateOfMeeting = $filter('date')(new Date(), 'dd-MM-yyyy');\n $scope.dateOfMeeting = $scope.StringToDateString($scope.editData.DateOfMeeting);\n $scope.fileName = \"\";\n // $scope.socialWelExpDate = \"\";\n $scope.Meetingform.$setPristine();\n $scope.isFirstFocus = false;\n $timeout(function () {\n $scope.isFirstFocus = true;\n });\n }", "resetForm() {\n this.form.url = '';\n }", "resetFields(){\n urlInput.value = \"\"\n titleInput.value = \"\"\n validation().render(\"\")\n }", "function clearForm() {\n\t\tconst blankState = Object.fromEntries(\n\t\t\tObject.entries(inputs).map(([key, value]) => [key, \"\"])\n\t\t);\n\t\tsetInputs(blankState);\n\t}", "function resetAddMenuItemForm(){\r\n MenuItemNameField.reset();\r\n \tMenuItemDescField.reset();\r\n // \tMenuItemValidFromField.reset();\r\n MenuItemValidToField.reset();\r\n \tMenuItemPriceField.reset();\r\n \tMenuItemTypePerField.reset();\r\n\t\t\t\t\t \r\n }", "function ResetForm() {\n $scope.fileName = \"\";\n $scope.tempEdit = true;\n $scope.editData = {\n PurchaseId: 0,\n PartId: 0,\n PurchaseDate: \"\",\n Quantity: 0,\n ApprovedBy: \"\",\n Attachment: \"\",\n Remarks: \"\"\n };\n $scope.purchaseform.$setPristine();\n $scope.isFirstFocus = false;\n $timeout(function () {\n $scope.isFirstFocus = true;\n });\n }", "create() {\n this.id = 0;\n this.familyName = null;\n this.givenNames = null;\n this.dateOfBirth = null;\n\n this.validator.resetForm();\n $(\"#form-section-legend\").html(\"Create\");\n this.sectionSwitcher.swap('form-section');\n }", "clearForm() {\n // clear any previous highlighted row\n this.clearPrevHighlight();\n // clear the inputs\n $(\"#item_id\").val(0);\n $(\"#item_title\").val(\"\");\n $(\"#item_author_first_name\").val(\"\");\n $(\"#item_author_surname\").val(\"\");\n $(\"#item_year\").val(\"\");\n // disable buttons dependent on a table row having been clicked\n $(\"#btn_search\").prop(\"disabled\", true);\n $(\"#btn_add_item\").prop(\"disabled\", true);\n $(\"#btn_update_item\").prop(\"disabled\", true);\n $(\"#btn_delete_item\").prop(\"disabled\", true);\n // disable link to author page\n $(\"#link_current_author\").removeClass(\"text-primary\");\n $(\"#link_current_author\").addClass(\"text-muted\");\n // hide editions page\n $(\"#page_editions\").hide(\"slow\");\n }", "function resetForm () {\n var Modal = $('#modalEditTrack');\n\n Modal.find('.panel-title').text('');\n Modal.find('#id').val(null);\n Modal.find('#filename').val(null);\n Modal.find('#path').val(null);\n Modal.find('#title').val(null);\n Modal.find('#album').val(null);\n Modal.find('#track').val(null);\n Modal.find('#year').val(null);\n Modal.find('#track-genre')\n .val('[]')\n .prop({'data-role': 'tagsinput-disabled'});\n Modal.find('#track-tags')\n .val('[]')\n .prop({'data-role': 'tagsinput-disabled'});\n Modal.find('#meta').text(null);\n }", "function clearForm() {\n that.data = {\n taskDate: {}\n };\n }", "limpaFormulario(){\n this._inputDataNascimento.value = ''\n this._inputIdade.value = 1;\n this._inputSalario.value = 0;\n this._inputDataNascimento.focus();\n }", "function resetEditRoomForm(){\r\n \r\n ERoomNumberField.reset();\r\n ERoomValidFromField.reset();\r\n ERoomValidToField.reset();\r\n\t\t\t\t\t \r\n }", "function clearTemplateForm(){\n $('[data-type=\"temp-unit-list\"]').empty();\n var form = $('#templateform');\n form[0].reset();\n form.data('bootstrapValidator').resetForm(true);\n }", "function iniciarPersona()\n{\n // $(\"#frmNuevaPersona\").[0].reset();\n $('#frmNuevaPersona')[0].reset();\n document.getElementById(\"nombre\").value = \"\";\n \n \n}", "function clearForm() {\n $scope.description = '';\n $scope.title = '';\n $scope.lat = '';\n $scope.lng = '';\n }", "function limpiar() {\n alert(\"Limpiando Formulario \");\n document.getElementById('formulario').reset();\n\n}", "function resetForm() {\r\n\t\t$('#addProduct1').validate().resetForm();\r\n\t\t$(\"#nameProduct\").val('');\r\n\t\t$(\"#productGroup\").prop('selectedIndex', 0);\r\n\t\t$(\"#priceProduct\").val('');\r\n\t\t$(\"#descriptionProduct\").val('');\r\n\t\t$(\"#status\").prop('checked', true);\r\n\t}", "function clearForm() {\n $scope.Address = '';\n $scope.CityTown = '';\n $scope.WName = '';\n\n }", "function clear_form_data() {\n $(\"#promotion_title\").val(\"\");\n $(\"#promotion_promotion_type\").val(\"\");\n $(\"#promotion_start_date\").val(\"\");\n $(\"#promotion_end_date\").val(\"\");\n $(\"#promotion_active\").val(\"\");\n }", "function formReset(){\n $(\"#laboratoryAddForm\").trigger(\"reset\")\n allLaboratoryResult()\n select_id = 0\n}", "function resetContForm() {\r\n var f = element('contForm');\r\n for( var n in [ 'lastname', 'firstname', 'email', 'key' ] ) {\r\n f.elements[n].value = '';\r\n }\r\n f.elements['inputAction'].value = 'add';\r\n f.elements['goButton'].value = 'Add';\r\n}", "function resetInput() {\n $scope.input.multiplicity = 'opt';\n delete $scope.input.newElementPath;\n delete $scope.input.definition;\n delete $scope.input.newNode\n $scope.input.newDatatype =$scope.dataTypes[0];\n }", "function limpiar_formulario(){\n $(\"form#venta-boleto\")[0].reset();\n $(\"input[name=boleto-idpasajero]\").val(null);\n\n}", "function resetForm() {\n bookForm.reset();\n}", "function resetform()\n{\n\t\t\t$('#note_title').val('');\n\t\t\t$('#note_text').val('');\n\t\t\t$('#note_quotes').val('');\n\t\t\tdocument.getElementById('note_quotes').focus();\n\t\t\tdocument.getElementById('note_text').focus();\n\t\t\tdocument.getElementById('note_title').focus();\n\t\t\t$('#warning').html('');\n\t\t\tdocument.noteform.note_category.options[0].selected=true;\n\t\t\tcurNote=null;\t\t\n}", "function resetECourseForm(){\r\n CourseNameField.reset();\r\n CourseDaysField.reset();\r\n \r\n }", "function reset() {\n\t$(\"#nombre\").val(null);\n\t$(\"#apellido\").val(null);\n\t$(\"#email\").val(null);\n\t$(\"#telefono\").val(null);\n\t$(\"#institucionSelect\").val(null);\n}", "function clear_form_data() {\n $(\"#product_id\").val('');\n $(\"#rec_product_id\").val('');\n $(\"#rec_type_id\").val('1');\n $(\"#weight_id\").val('');\n }", "function addOpFormReset() {\n pageDialog.node.reset();\n }", "function clearForm(){\n $scope.bio ='';\n $scope.name='';\n $scope.reknown='';\n $scope.image='';\n }", "function resetEditMenuForm(){\r\n EMenuNameField.reset();\r\n EMenuDescField.reset();\r\n EMStartDateField.reset();\r\n EMEndDateField.reset();\r\n\t\t\t\t\t \r\n }", "function resetForm() {\n\t\tradioList2 = document.getElementById('subList');\t\n\t\terrorBox.style.display = 'none';\n\t\t//remove class of error\n\t\tradioList2.className = '';\n\n\n\t\t//Remove Error Styling and Clear Error Report\n\t\tvar reqElements = document.getElementsByClassName('gRequired');\n\t\tfor(i = 0; i < reqElements.length; i ++) {\n\t\t\treqElements[i].className = 'gRequired';\n\t\t}\n\t\t\n\t\t// Zero out all values for new recipe entry \n\t\tclearRadioValue('recipeCat');\n\t\tge('recipeTitle').value \t\t= ''\n\t\tge('recipeSummary').value \t= ''\n\t\tge('userDifficulty').value \t= ''\n\t\tge('chooseDate').value \t\t= ''\n\t\tge('flavorRange').value \t\t= ''\n\t\tge('directions').value \t\t= ''\n\t\tge('submitForm').value \t\t= 'Save Recipe';\n\t\tge('gIngredientContainer').innerHTML = ''\n\t}", "function instanceAddReset() {\n $(instanceAddPage.nameContainer).hide('slide', { direction: \"left\" });\n $(instanceAddPage.typeContainer).hide('slide', { direction: \"left\" });\n $(instanceAddPage.buttonContainer).show('slide', {\n direction: \"left\",\n queue: false\n });\n\n $(instanceAddPage.nameInput).val(\"\");\n $(instanceAddPage.typeSelect).val(\"\");\n $(instanceAddPage.typeButton).removeClass(instanceAddPage.visible);\n instanceAddClearErrorMsg();\n }", "function reset() {\n $(\"#input_form\")[0].reset();\n $(\"#previewTitle\").html(\"\");\n $(\"#previewDescription\").html(\"\");\n $(\"#previewTags\").html(\"\");\n $(\"#previewBootstrap\").html(\"\");\n $(\"#previewCode\").html(\"\");\n $(\"#UID\").val(maxDBSize);\n}", "function _clear() {\r\n vm.email = \"\";\r\n $scope.addEvaluatorForm.$setPristine();\r\n }", "function clearForm() {\n $(\"#name-input\").val(\"\");\n $(\"#destination-input\").val(\"\")\n $(\"#firstTime-input\").val(\"\");\n $(\"#frequency-input\").val(\"\");\n }", "reset(){\n this._address.StreetAddress.value = \"\";\n this._address.City.value = \"\";\n this._address.State.value = \"\";\n this._address.Zip.value = \"\";\n\n this._user.Email.value = \"\";\n this._user.FirstName.value = \"\";\n this._user.LastName.value = \"\";\n this._primaryPhone.value = \"\";\n if(this._cellPhone) this._cellPhone.value = \"\";\n if(this._homePhone) this._homePhone.value = \"\";\n if(this._workPhone) this._workPhone.value = \"\";\n\n this._chosenContact = null;\n this._chosenContactID = -1;\n this._company.value = \"\";\n this._licenseNum.value = \"\";\n this._mcNum.value = \"\";\n this._resaleNum.value = \"\";\n\n if(document.getElementById(INVOICE_CHOSEN_CONTACT_ID)){\n document.getElementById(INVOICE_CHOSEN_CONTACT_ID).removeAttribute(\"id\");\n }\n\n this._updatePreviewField();\n }", "function Reset() {\n vm.model = angular.copy(vm.master);\n resetForm();\n }", "function resetForm() {\n\tdocument.getElementById(\"rollNo\").value = \"\";\n\tdocument.getElementById(\"name\").value = \"\";\n\tdocument.getElementById(\"gender\").value = \"\";\n\tdocument.getElementById(\"standard\").value = \"\";\n\tdocument.getElementById(\"DOB\").value = \"\";\n\tseletedRow = null;\n}", "_clearInputs() {\n this.elements.peopleInput.value = \"\";\n this.elements.descriptionInput.value = \"\";\n this.elements.titleInput.value = \"\";\n return this;\n }", "function resetForm() {\r\n // Clear text in all text fields.\r\n $.each($(\"#addDeviceScreen\").children().filter(\".input\"), function () {\r\n console.log($(this));\r\n $(this).val('');\r\n });\r\n\r\n // Set default (top) value in all dropdown menus.\r\n $.each($(\".ddm-value-select\"), function (key, val) {\r\n $(val).children().first().click();\r\n });\r\n }", "function clear_form_data() {\n $(\"#inventory_name\").val(\"\");\n $(\"#inventory_category\").val(\"\");\n $(\"#inventory_available\").val(\"\");\n $(\"#inventory_condition\").val(\"\");\n $(\"#inventory_count\").val(\"\");\n }", "function resetForm()\n{\n $('#input-nama').val('')\n $('#input-nrp').val('')\n $('#input-email').val('')\n $('#input-jurusan').val('')\n}", "function clear_form_data() {\n $(\"#promo_name\").val(\"\");\n $(\"#promo_type\").val(\"\");\n $(\"#promo_value\").val(\"\");\n $(\"#promo_start_date\").val(\"\");\n $(\"#promo_end_date\").val(\"\");\n $(\"#promo_detail\").val(\"\");\n $(\"#promo_available_date\").val(\"\");\n }", "function reset() {\n let form = document.forms[\"filmForm\"];\n form.reset();\n form.elements[\"id\"].value = 0;\n }", "static clear() {\n libraryForm.reset()\n }", "clear() {\r\n let cForm = document.getElementById(\"addBookForm\");\r\n cForm.reset();\r\n }", "clearFields(){\n this.titleInput.value = '';\n this.bodyInput.value = '';\n }", "function clearForm() {\n fullName.value = \"\";\n message.value = \"\";\n hiddenId.value = \"\";\n}", "function resetForm() {\n document.getElementById('name').value = '';\n document.getElementById('feet').value = '';\n document.getElementById('inches').value = '';\n document.getElementById('weight').value = '';\n document.getElementById('diet').value = 'Herbavor';\n}", "function clear_form_data() {\n $(\"#cust_id\").val(\"\");\n $(\"#order_id\").val(\"\");\n $(\"#item_order_status\").val(\"\");\n }", "function resetInput() {\n inputDate.value = \"\"\n inputTitle.value = \"\"\n inputHour.value = \"\"\n inputDescription.value = \"\"\n}", "limparCampoForm(form) {\n form.id.value = \"\";\n form.nome.value = \"\";\n form.descricao.value = \"\";\n form.detalhes.value = \"\";\n }", "function clear_form_data() {\n $(\"#recommendation_id\").val(\"\");\n $(\"#recommendation_productId\").val(\"\");\n $(\"#recommendation_suggestionId\").val(\"\");\n $(\"#recommendation_categoryId\").val(\"\");\n $(\"#recommendation_old_categoryId\").val(\"\");\n }", "resetFields(){\n document.querySelector('#title').value = '';\n document.querySelector('#author').value = '';\n document.querySelector('#isbn').value = '';\n }", "function resetForm() {\n document.getElementById(\"name\").value = \"\";\n document.getElementById(\"age\").value = \"\";\n document.getElementById(\"mobileNumber\").value = \"\";\n document.getElementById(\"email\").value = \"\";\n document.getElementById(\"address\").value = \"\";\n document.myForm.hobbies.value = check() ;\n document.myForm.gender.value = \"\";\n selectedRow = null;\n}", "resetForm() { \n document.getElementById('product-form').reset();\n }", "resetFormContent() {\n ContentUtils.updateElementContent(\"delimiter\", \"?\");\n ContentUtils.updateElementContent(\"hasHeaderRow\", \"?\");\n ContentUtils.updateElementContent(\"fileSize\", 0);\n ContentUtils.updateElementContent(\"totalRecords\", 0);\n ContentUtils.updateElementContent(\"badRecords\", 0);\n ContentUtils.updateElementContent(\"inputCsvTable\", \"\");\n ContentUtils.updateElementContent(\"badCsvTable\", \"\");\n ContentUtils.updateElementContent(\"interpolatedCsvTable\", \"\");\n ContentUtils.updateElementContent(\"invalidData\", \"\");\n }", "function ResetEditForm() {\n $('#technician_cid').val(\"\");\n $('#tech_name').val(\"\");\n $('#technician_username').val(\"\");\n $('#technician_password').val(\"\");\n $('#tech_status').val(1);\n// $('#div_tech_status').hide();\n\n $(\"#show_person_id option\").prop(\"selected\", false);\n }", "function clear_form_data() {\n $(\"#product_id\").val(\"\");\n $(\"#recommended_product_id\").val(\"\");\n $(\"#recommendation_type\").val(\"\");\n $(\"#likes\").val(\"\");\n }", "function resetEditMenuItemForm(){\r\n EMenuItemNameField.reset();\r\n \tEMenuItemDescField.reset();\r\n \tEMenuItemValidFromField.reset();\r\n EMenuItemValidToField.reset();\r\n \tEMenuItemPriceField.reset();\r\n \tEMenuItemTypePerField.reset();\r\n\t\t\t\t\t \r\n }", "function reload(){\n\t\t$(\".form_action\").val(\"\");\n\t\t$(\".form_detail\").html(\"\");\n\t\t\n\t\t}", "function resetform(){\n\t$.each($(\"body\").find(\"form\"),function(i,v){\n\t\tthis.reset();\n\t});\n}", "function resetForm() {\n\tpageCounter = 1;\n\tdisplayPage(pageCounter);\n\tclearFields();\n}", "function _resetForm()\r\n {\r\n //alert(\"htmldata.js -> _resetForm \\n chgFlds: \" + this._mChangedFields);\r\n\r\n for (var index = 0; index < this._mChangedFields.length; ++index)\r\n {\r\n var item = this._mChangedFields[index];\r\n var obj = getElemnt(item);\r\n\r\n if(obj)\r\n {\r\n //alert(obj.outerHTML + \" \\n obj.defaultValue = \" + obj.defaultValue + \"---\");\r\n\r\n //reset image association field if any\r\n var objImg = getElemnt(\"img_icon_\"+ obj.id );\r\n\r\n if(objImg)\r\n {\r\n //alert(\"objImg.defaultValue \" + objImg.defaultValue);\r\n objImg.src = objImg.defaultValue;\r\n }\r\n\r\n if(obj)\r\n {\r\n //alert(\"obj.type = \" + obj.type);\r\n //Tracker#: 15802 TECH SPEC OVERVIEW SHOULD ALWAYS WARN USER WHEN THEY MAKE A CHANGE AND DO NOT SAVE\r\n //ucheck the checked checkboxes once the form data is reset.\r\n if(obj.type && obj.type.toUpperCase()==\"CHECKBOX\")\r\n {\r\n //alert('obj.defaultValue ' + obj.defaultValue);\r\n if(obj.defaultValue && _isChangeFieldNotify(obj))\r\n {\r\n //alert(\"checked\");\r\n obj.checked=true;\r\n }\r\n else\r\n {\r\n //alert(\"-----unchecked-----\");\r\n obj.checked=false;\r\n }\r\n }\r\n //alert(\"setting value \" + obj.defaultValue);\r\n obj.value = obj.defaultValue;\r\n }\r\n\r\n //reset validation fields\r\n if(_isDescField(obj))\r\n {\r\n obj = getElemnt(obj.id + _FIELDS_SEPERATOR + \"desc\");\r\n\r\n if(obj)\r\n {\r\n obj.value = obj.defaultValue;\r\n }\r\n }\r\n }\r\n }\r\n }", "static clearFields(){\n document.getElementById('title').value = '';\n document.getElementById('author').value = '';\n document.getElementById('isbn').value = '';\n }", "resetForm() {\n this.name.value = '';\n this.rating.value = 3;\n this.stars.innerHTML = this.star.repeat(3);\n this.comments.value = '';\n }", "function resetForm() {\n\t// enable the ID-field if it was disabled before\n\t$(this).children('#id').prop('disabled', false);\n\t\n\t// clear all forms\n\t$('#storyblock-form').children('#id').val('');\n\t$('#storyblock-form').children('#text').val('');\n\t$('#storyblock-form').children('#reaction1id').val('');\n\t$('#storyblock-form').children('#reaction1text').val('');\n\t$('#storyblock-form').children('#reaction2id').val('');\n\t$('#storyblock-form').children('#reaction2text').val('');\n}", "function resetAddModal() {\n $('#firstNameAdd').val('');\n $('#lastNameAdd').val('');\n $('#ageAdd').val('');\n}", "function resetSchdTitleForm(){ \n schdidField.setValue(''); \n schdField.setValue(''); \n surlField.setValue(''); \n susrField.setValue(''); \n semailField.setValue(''); \n sdateField.setValue(dt.format('Y-m-d H:i:s')); \n sremarkField.setValue(''); \n }", "function resetForm() {\n document.getElementById(\"date\").value = \"\";\n document.getElementById(\"amount\").value = \"\";\n document.getElementById(\"desc\").value = \"\";\n selectedRow = null;\n}", "function clearForm() {\n\t\t\t$('#rolForm input[type=\"text\"]').val(\"\");\n\t\t}", "function clearForm(event) {\n event.target.elements['title'].value = null;\n event.target.elements['author'].value = null;\n event.target.elements['pages'].value = null;\n event.target.elements['read'].value = false ;\n}", "function clearForm() {\n var formValue = document.getElementById('new-item');\n\n formValue.value = '';\n}", "function resetInputs() {\n document.getElementById('creates').innerHTML=''; \n $('#select-TD-cours').val(''); \n}", "function resetItineraryForm() {\n document.getElementById(\"myForm\").reset();\n}", "function initializeToCreate() {\n // Check temp data from storage\n const tempData = getTempDataFromStorage();\n\n fieldsTaskForm.forEach((field) => {\n const element = field;\n\n switch (element.name) {\n case 'status':\n element.value = 'open';\n break;\n\n case 'priority':\n element.value = 'hight';\n break;\n\n default:\n element.value = tempData[element.name] || '';\n break;\n }\n });\n}", "function resetForm() {\n document.querySelector('#bookTitle').value = '';\n document.querySelector('#bookAuthor').value = '';\n document.querySelector('#bookPages').value = '';\n document.querySelector('#bookHaveFinished').value = '';\n}", "fillForm(data){\n this.titleInput.value = data.title;\n this.bodyInput.value = data.body;\n this.idInput.value = data.id;\n\n this.changeFormState('edit');\n }" ]
[ "0.7235578", "0.72270215", "0.7140411", "0.7101065", "0.70979637", "0.7094577", "0.701642", "0.7004627", "0.69644606", "0.69596606", "0.69519454", "0.692664", "0.6914254", "0.6882194", "0.688006", "0.68757063", "0.68650883", "0.6859159", "0.6852934", "0.6851091", "0.6839408", "0.6835646", "0.68117064", "0.6797217", "0.6778509", "0.6774881", "0.6774126", "0.6773335", "0.6761901", "0.67415965", "0.6731554", "0.6723033", "0.6720283", "0.669644", "0.66938406", "0.6676552", "0.6667114", "0.66523975", "0.66422313", "0.6636441", "0.66320246", "0.6613929", "0.66024977", "0.6570485", "0.65643364", "0.6562838", "0.65536994", "0.6546249", "0.6544992", "0.6537759", "0.65354866", "0.65262234", "0.6523968", "0.6523411", "0.6511021", "0.65076214", "0.6506124", "0.65033674", "0.6501368", "0.6500728", "0.65000355", "0.6484745", "0.6474656", "0.64640486", "0.6460491", "0.6458929", "0.64507616", "0.6448775", "0.64446086", "0.6442993", "0.64424545", "0.6440639", "0.6435337", "0.6430522", "0.6426109", "0.6415535", "0.64102656", "0.64102393", "0.6408939", "0.63999367", "0.63944155", "0.638715", "0.63775796", "0.63773966", "0.6376203", "0.6375685", "0.63748264", "0.63691974", "0.6364242", "0.6362379", "0.63620704", "0.63592196", "0.63563085", "0.63492584", "0.63423795", "0.63363594", "0.6317189", "0.6316339", "0.63160956", "0.631044", "0.6309897" ]
0.0
-1
Change the state of the notification (show / hide)
displayNotification() { this.setState({snackbar: true}) setTimeout(()=>this.setState({snackbar: false}), 3000); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "notificationsToggle(state) {\n // console.log(\"toggle\")\n if (state.notificationsShow == \"show\") {\n state.notificationsShow = \"\"\n } else {\n state.notificationsShow = \"show\"\n }\n }", "function setNotificationPopupStatus() {\n if (notificationIsOpen == 0) {\n showNotifications();\n } else {\n hideNotifications();\n }\n}", "function showNotifications() {\n document.getElementById(\"container_notification\").style.display = \"block\";\n document.getElementById(\"how_many_notif\").style.display = \"none\";\n notificationIsOpen = 1;\n}", "function toggleNotification() {\n var element = document.getElementById(\"notificationContainer\");\n element.classList.toggle(\"not-show\");\n}", "function showNotification() {\n notification.classList.remove(CLASSES.HIDE_NOTIFICATION);\n notification.classList.remove(CLASSES.DELAYED_HIDE_NOTIFICATION);\n notification.scrollTop;\n notification.classList.add(CLASSES.DELAYED_HIDE_NOTIFICATION);\n}", "function showNotification() {\n var notification = $(IDS.NOTIFICATION);\n notification.classList.remove(CLASSES.HIDE_NOTIFICATION);\n notification.classList.remove(CLASSES.DELAYED_HIDE_NOTIFICATION);\n notification.scrollTop;\n notification.classList.add(CLASSES.DELAYED_HIDE_NOTIFICATION);\n}", "function showNotification(notif, visible = true) {\n if (visible) {\n notif.classList.remove(\"hidden\");\n } else {\n notif.classList.add(\"hidden\");\n }\n}", "function hideNotification() {\n var notification = $(IDS.NOTIFICATION);\n notification.classList.add(CLASSES.HIDE_NOTIFICATION);\n notification.classList.remove(CLASSES.DELAYED_HIDE_NOTIFICATION);\n}", "function hideNotification() {\n notification.classList.add(CLASSES.HIDE_NOTIFICATION);\n}", "function hideNotifications() {\n document.getElementById(\"container_notification\").style.display = \"none\";\n notificationIsOpen = 0;\n}", "function hideNotificationAndReset() {\n iSuccess.css('display', 'none');\n iError.css('display', 'none');\n iMessage.html('');\n notification.css('display', 'none');\n }", "function toggle_notification()\n{\n if($(\".notification-popup\").hasClass(\"hide\")) {\n $(\".notification-popup\").removeClass(\"hide\"); \n // unexpand profile popup\n $(\".profile\").removeClass(\"focus\"); \n $(\".profile-popup\").addClass(\"hide\");\n }else{\n $(\".notification-popup\").addClass(\"hide\");\n // unexpand profile popup\n $(\".profile\").removeClass(\"focus\"); \n $(\".profile-popup\").addClass(\"hide\");\n }\n\n // hide notification bubble\n $(\".buble-notification\").hide();\n}", "function displaynotification(){\n //display the notification\n notificationelement.classList.add('show')\n setTimeout( () => {\n notificationelement.classList.remove('show')\n },1000)\n}", "function notification(title, image, msg) {\n // Assign the notification as active if its not already\n if (!notificationBox.classList.contains(\"visible\")) {\n notificationBox.innerHTML = notificationHTML(title, image, msg);\n notificationBox.classList.toggle(\"visible\");\n\n sleep(4000).then(() => {\n // Remove visible if its still there\n if (notificationBox.classList.contains(\"visible\")) {\n notificationBox.classList.toggle(\"visible\");\n }\n });\n }\n}", "function displayNotification(type, message) {\n // ensures that the notification will not be cleared if a new notification popped up and the last one has a running timer\n clearTimeout(state.notifTimer);\n\n let notification = document.getElementById(\"notification\");\n let notifText = document.getElementById(\"text-notif\");\n\n notification.classList.add(type);\n notifText.innerHTML = message;\n\n notification.classList.add(\"visible\");\n\n state.notifTimer = setTimeout(hideNotification, 10000);\n}", "function showNotification() {\n notification.classList.add('show');\n setTimeout( () => {notification.classList.remove('show');}, 3000);\n}", "function setNotifState(_) {\n showNotifDiv(); // result === 'default', 'granted', 'denied'\n getPushSubscription().then(subscription => subscription ? putNotifBtnOn() : putNotifBtnOff());\n}", "function showNotif(notif, color) {\n $(\".notification\").text(notif).addClass(\"show\").css(\"background-color\", color);\n setTimeout(function() {\n $(\".notification\").removeClass(\"show\");\n }, 4000);\n }", "__toggleIcon(state) { \n switch (state) {\n case 1:\n return 'notification:sync';\n case 2:\n return 'notification:sync-problem';\n default:\n return 'notification:sync-disabled';\n }\n }", "_hideNotification() {\n if (this.props.timeoutable) {\n this._notificationTimer.clear();\n this.props.removeNotification();\n }\n }", "function displayListener(oEvent) {\r\n var bShow = oEvent.getParameter(\"show\");\r\n var sStatus = \"\";\r\n\r\n if (bShow) {\r\n sStatus = sap.ui.ux3.NotificationBarStatus.Default;\r\n notificationBar.setVisibleStatus(sStatus);\r\n } else {\r\n sStatus = sap.ui.ux3.NotificationBarStatus.None;\r\n notificationBar.setVisibleStatus(sStatus);\r\n }\r\n }", "function showNotification() {\n $(\"#monitoredContent\").children().hide();\n $(\"#notificationContainer\").show();\n $(\".tab button\").css(\"background-color\",\"initial\");\n}", "toggleNotification(state, payload) {\n return {\n ...state,\n hasNotification: payload,\n };\n }", "function notificationFunction() {\n var popup = document.getElementById(\"myPopup\");\n popup.classList.toggle(\"show\");\n}", "function notificationFunction() {\n var popup = document.getElementById(\"myPopup\");\n popup.classList.toggle(\"show\");\n}", "showNotification() {\n\n //set tick interval to 1 second\n this.interval = setInterval(this.tick, 1000);\n\n this.setState({\n showNotification: true\n })\n\n }", "show() {\n if (!this[$visible]) {\n this[$visible] = true;\n this[$updateVisibility]({ notify: true });\n }\n }", "function show() {\r\n if (this.showOrHide == true) {\r\n document.getElementById(\"content-calendar\").className=\"content-calendar__animated--hide\";\r\n this.showOrHide = false;\r\n document.getElementById(\"info-message\").innerHTML = '<i class=\"fa fa-reply\"></i> Click para mostrar';\r\n } else {\r\n document.getElementById(\"content-calendar\").className=\"content-calendar__animated--show\";\r\n this.showOrHide = true;\r\n document.getElementById(\"info-message\").innerHTML = '<i class=\"fa fa-reply\"></i> Click para ocultar';\r\n }\r\n}", "function showNotifDiv() {\n $('.notifDiv').css('display', 'block');\n}", "function showNotification(infoType) {\n var notification = document.querySelector(\".notification\");\n notification.className = \"notification\";\n if (infoType == \"Deleting...\") {\n notification.classList.add(\"notification--delete\");\n } else if (infoType == \"Creating...\") {\n notification.classList.add(\"notification--create\");\n } else if (infoType == \"Renaming...\" || infoType == \"Moving...\") {\n notification.classList.add(\"notification--rename\");\n }\n notification.innerHTML = infoType;\n document.querySelector(\".notification-overlay\").classList.remove(\"hidden\");\n}", "function OnNotification(notificationCount,isImportantMessage) {\n var millisecondsToWait = window.external.RetrieveNotificationAutoCloseInterval();\n var cntrl = GetControl('divNotification');\n if (cntrl.style.display == 'block') {\n CloseStatus('notification');\n if (notificationCount > 0) {\n ShowStatus('notification', notificationCount, 'AsNotification',isImportantMessage);\n }\n else {\n cntrl.style.display = 'none';\n }\n }\n else {\n if (notificationCount > 0) {\n ShowStatus('notification', notificationCount, 'AsNotification',isImportantMessage);\n }\n else {\n CloseStatus('notification');\n }\n }\n }", "function getNotifications(){\n posted_jobs.style.display = 'none';\n negotiation.style.display = 'none';\n jobs_notifications.style.display = 'block';\n}", "function setNotification( message ) {\n\t\tvar notif = $(\"#notification\");\n\t\tvar notifmessage = $(\"#notification-message\");\n\t\tvar editmessage = document.getElementById(\"notification-message\");\n\n\t\teditmessage.innerHTML = message;\n\t\tnotifmessage.fadeIn();\n\t\tnotif.fadeIn();\n\t}", "function swap_show_hide()\n{\n if (showhide_status) \n {\n showhide_status = false;\n } \n else \n {\n showhide_status = true;\n }\n this.refresh_show_hide();\n}", "function onShow(arg) {\n if (arg.id === this._id) {\n log.send(logLevels.INFO, 'showing notification, id=' + this._id);\n this.emitter.queue('show', {\n target: this\n });\n this._closeNotification = arg.closeNotification;\n }\n }", "function switchTimerOn() {\n\tdocument.getElementById(\"notification\").style.visibility = \"visible\"; \n document.getElementById(\"counter\").innerHTML= pomoTimer;\n\t\t\tdocument.getElementById(\"text1\").innerHTML= \"Time To Work!\";\n document.getElementById(\"text2\").innerHTML= \"\";\n\t\t\t\n}", "function showSnackbar(state){\n\n // 'show' class makes the snackbar visible\n snackbar.classList.add('show');\n\n if(state===true){\n snackbar.innerHTML = \"Added to favourites\";\n }\n else{\n snackbar.innerHTML = \"Removed from favourites\";\n }\n\n // After 3 seconds, hide the snackbar\n setTimeout(function(){ snackbar.classList.remove(\"show\"); }, 2000);\n }", "function notification(target, time) {\n var a = \"#\" + target;\n $(\".notification-box\").removeClass(\"show\");\n setTimeout(() => {\n $(a).addClass(\"show\");\n }, 300);\n if (time) {\n time = time + 300;\n setTimeout(() => {\n $(\".notification-box\").removeClass(\"show\");\n }, time);\n }\n}", "function showNotifications(msg, type) {\n $.notify({\n // options\n message: msg\n },{\n // settings\n type: type,\n delay: 1500,\n placement:{from: \"top\",\n align: \"left\"}\n \n });\n}", "renderNotification() {\n if (!this.canNotificationBeVisible) return;\n\n const {status, currentStation} = this.state;\n const isPlaying = this.isPlaying();\n\n const {actions, sweepable} = do {\n if (isPlaying) {\n ({actions: [\"stop\", \"close\"], sweepable: false});\n } else if (!isPlaying && currentStation) {\n ({actions: [\"play\", \"close\"], sweepable: true});\n } else {\n ({actions: [\"close\"], sweepable: true});\n }\n };\n\n const notificationActions = _(this.actionsByKey).at(actions).value();\n\n PushNotification.localNotification({\n id: \"425133149\",\n title: currentStation && status ? `${currentStation.name}` : \"Radio Player\",\n message: currentStation ? status : \"\",\n playSound: false,\n vibrate: false,\n actions: JSON.stringify(notificationActions),\n ongoing: !sweepable,\n autoCancel: false,\n });\n //this.canNotificationBeVisible = true;\n }", "async toggleNotifications() {\n \n // Are notifications enabled\n let enabled = await this.checkStatus();\n\n // Notifications are currently on\n if( enabled === 'true' ) {\n this.notificationsOff();\n }\n\n // Notifications are currently off\n else {\n this.notificationsOn();\n\n // Record when notifications started\n await this.setStartTime()\n .then( ( t ) => {\n\n // Force the app to send the first notification\n this.checkForNextNotification( t, true );\n });\n }\n }", "function setVisualNotification(show, stopGlowingIn) {\n var glower = $('#contactListButton');\n function stopGlowing() {\n window.clearInterval(notificationInterval);\n notificationInterval = false;\n glower.removeClass('glowing');\n if(!ContactList.isVisible()) {\n glower.removeClass('active');\n }\n }\n\n if (show && !notificationInterval) {\n notificationInterval = window.setInterval(function () {\n glower.toggleClass('active glowing');\n }, 800);\n }\n else if (!show && notificationInterval) {\n stopGlowing();\n }\n if(stopGlowingIn) {\n setTimeout(stopGlowing, stopGlowingIn);\n }\n }", "function showNotifications() {\n var notifications,\n i;\n\n // Removes child nodes of notification list.\n removeChildren(\"#notification-list\");\n\n notifications = tizen.notification.getAll();\n\n if (notifications.length === 0) {\n // If there is no notification, shows \"No notification\" message.\n document.querySelector(\"#no-notification\").style.display = \"table-cell\";\n document.querySelector(\"#notification-list\").style.display = \"none\";\n document.querySelector(\"#remove-all-btn\").style.display = \"none\";\n } else {\n for (i = 0; i < notifications.length; i++) {\n addNotificationItem(notifications[i]);\n }\n document.querySelector(\"#no-notification\").style.display = \"none\";\n document.querySelector(\"#notification-list\").style.display = \"block\";\n document.querySelector(\"#remove-all-btn\").style.display = \"table-cell\";\n }\n }", "function hideNotification() {\n\t\t$('.notification').fadeOut('slow');\n\t}", "_onPressMark () {\n this.props.onGetState(!this.props.showState)\n }", "onHide(){\n\t this.setState({\n\t info : {\n\t hide : true\n\t }\n\t });\n\t}", "'ui/SET_NOTIFICATIONS_DRAWER_VISIBILITY'(state, value)\n {\n state.notificationsDrawerVisible = value;\n }", "hideNotif() {\r\n\t\t$( '#notifBanner' ).removeClass( 'notif_vis' );\r\n\t}", "function hideNotifDiv() {\n $('.notifDiv').css('display', 'none');\n}", "function setVisualNotification(show) {\n var unreadMsgElement = document.getElementById('unreadMessages');\n var unreadMsgBottomElement\n = document.getElementById('bottomUnreadMessages');\n\n var glower = $('#chatButton');\n var bottomGlower = $('#chatBottomButton');\n\n if (unreadMessages) {\n unreadMsgElement.innerHTML = unreadMessages.toString();\n unreadMsgBottomElement.innerHTML = unreadMessages.toString();\n\n ToolbarToggler.dockToolbar(true);\n\n var chatButtonElement\n = document.getElementById('chatButton').parentNode;\n var leftIndent = (UIUtil.getTextWidth(chatButtonElement) -\n UIUtil.getTextWidth(unreadMsgElement)) / 2;\n var topIndent = (UIUtil.getTextHeight(chatButtonElement) -\n UIUtil.getTextHeight(unreadMsgElement)) / 2 - 3;\n\n unreadMsgElement.setAttribute(\n 'style',\n 'top:' + topIndent +\n '; left:' + leftIndent + ';');\n\n var chatBottomButtonElement\n = document.getElementById('chatBottomButton').parentNode;\n var bottomLeftIndent = (UIUtil.getTextWidth(chatBottomButtonElement) -\n UIUtil.getTextWidth(unreadMsgBottomElement)) / 2;\n var bottomTopIndent = (UIUtil.getTextHeight(chatBottomButtonElement) -\n UIUtil.getTextHeight(unreadMsgBottomElement)) / 2 - 2;\n\n unreadMsgBottomElement.setAttribute(\n 'style',\n 'top:' + bottomTopIndent +\n '; left:' + bottomLeftIndent + ';');\n\n\n if (!glower.hasClass('icon-chat-simple')) {\n glower.removeClass('icon-chat');\n glower.addClass('icon-chat-simple');\n }\n }\n else {\n unreadMsgElement.innerHTML = '';\n unreadMsgBottomElement.innerHTML = '';\n glower.removeClass('icon-chat-simple');\n glower.addClass('icon-chat');\n }\n\n if (show && !notificationInterval) {\n notificationInterval = window.setInterval(function () {\n glower.toggleClass('active');\n bottomGlower.toggleClass('active glowing');\n }, 800);\n }\n else if (!show && notificationInterval) {\n window.clearInterval(notificationInterval);\n notificationInterval = false;\n glower.removeClass('active');\n bottomGlower.removeClass('glowing');\n bottomGlower.addClass('active');\n }\n}", "function customNotificationOnHide() {\n if (variable.onHide) {\n initiateCallback('onHide', variable, scope, options.data);\n }\n }", "function setNotification(aReason) {\n let notificationBox = document.getElementById(\"location-notifications\");\n\n if (aReason == errorConstants.SUCCESS) {\n notificationBox.removeAllNotifications();\n } else {\n let existingBox = notificationBox.getNotificationWithValue(aReason);\n if (!existingBox) {\n notificationBox.appendNotification(l10nStrings[aReason],\n aReason,\n null,\n notificationBox.PRIORITY_WARNING_MEDIUM,\n null);\n notificationBox.getNotificationWithValue(aReason).setAttribute(\"hideclose\", \"true\");\n }\n }\n}", "triggerNotification() {\n if (this.state.trigger) {\n addNotification({\n title: 'Smart Eldercare',\n message: 'No motion has been detected for 5 minutes.',\n duration: 10000,\n native: true,\n onClick: e => this.props.navigation.navigate('Home')\n\n });\n\n this.setState({ trigger: false }) // makes sure the notification is only triggered once.\n }\n }", "function setOnNotificationDisplayed() {\n firebase.notifications()\n .onNotificationDisplayed(async (notification) => {\n // Process your notification as required\n // ANDROID: Remote notifications do not contain the channel ID. You will have to specify this manually if you'd like to re-display the notification\n const notif = convertNotification(notification);\n \n\n store.dispatch(actions.addNotification(notif));\n });\n}", "function showNotification(header, content) {\n $(\"#notification-header\").text(header);\n $(\"#notification-body\").text(content);\n messageBanner.showBanner();\n // messageBanner.toggleExpansion();\n }", "function show_notif(typ,pos,msg,tim_out)\n {\n new Noty({\n type: typ, //alert (default), success, error, warning\n layout: pos, //top, topLeft, topCenter, topRight (default), center, centerLeft, centerRight, bottom, bottomLeft, bottomCenter, bottomRight\n theme: 'bootstrap-v4', //relax, mint (default), metroui \n text: msg, //This string can contain HTML too. But be careful and don't pass user inputs to this parameter.\n timeout: tim_out, // false (default)\n progressBar: true, //Default, progress before fade out is displayed\n }).show();\n }", "function notification(message) {\n var x = document.getElementById(\"snackbar\")\n x.className = \"show\";\n x.innerHTML = message;\n setTimeout(function () { x.className = x.className.replace(\"show\", \"\"); }, 3000);\n}", "tick() {\n\n this.setState({\n\n notificationCounter: this.state.notificationCounter + 1\n\n }, function() {\n\n //clear interval and hide notification after 5 seconds\n if(this.state.notificationCounter >= 5) {\n\n this.setState({\n\n showNotification: false,\n notificationCounter: 0\n\n }, function() {\n\n clearInterval(this.interval);\n\n })\n\n }\n\n });\n \n }", "function showNotification( msg, mode ) {\n\n var notify = document.getElementById(\"notify-block\") ;\n\n if( ! notify ) {\n\n notify = document.createElement('p') ;\n notify.id = \"notify-block\" ;\n\n document.body.appendChild( notify ) ;\n\n } else clearTimeout( window.i_event_notify_id ) ; //utile s'il y a eu d'autre notification avant.\n\n notify.style.display = \"none\" ; //on se rassure que la zone sera invisible avant l'affichage du msg\n notify.innerHTML = msg ;\n\n var closeButton = document.createElement(\"button\");\n closeButton.className = \"b-dialog-close\";\n closeButton.innerHTML = \"X\";\n closeButton.onclick = function () {\n\n document.body.removeChild( notify ) ;\n } ;\n notify.appendChild( closeButton ) ;\n\n notify.style.display = \"block\" ; //affiche du msg\n notify.className = \"notify-normal\" ;\n\n //le mode en principe est soit \"normal\" soit \"warring\"\n //cependant n'importe quel valeur sauf \"warring\" peut convernir pour un mode d'affichage normal.\n if( mode === \"warring\") {\n\n notify.className = \"notify-warring\" ;\n window.i_event_notify_id = setTimeout( function(){ document.body.removeChild( notify ) ; }, 20000) ; //on cache la zone après 30s\n\n } else if( mode === \"error\") {\n\n notify.className = \"notify-error\" ;\n window.i_event_notify_id = setTimeout( function(){ document.body.removeChild( notify ) ; }, 25000) ; //on cache la zone après 30s\n\n }\n else if( mode === \"success\") {\n\n notify.className = \"notify-success\" ;\n window.i_event_notify_id = setTimeout( function(){ document.body.removeChild( notify ) ; }, 25000) ; //on cache la zone après 30s\n\n } else window.i_event_notify_id = setTimeout( function(){ document.body.removeChild( notify ) ; }, 15000) ; //on cache la zone après 15s\n\n}", "function showNotification(elementId) {\n\n var elem = $(\"#\" + elementId);\n\n elem.show();\n setTimeout(function () { elem.hide(); }, 3000);\n}", "function showNotification(header, content) {\n $(\"#notification-header\").text(header);\n $(\"#notification-body\").text(content);\n messageBanner.showBanner();\n messageBanner.toggleExpansion();\n}", "function showNotification(header, content) {\n $(\"#notification-header\").text(header);\n $(\"#notification-body\").text(content);\n messageBanner.showBanner();\n messageBanner.toggleExpansion();\n }", "function _displayNotification() {\n \n // If does not exist\n if ($.find(\"#main-window-warning\").length === 0) {\n \n // Get views\n var view = _renderNotificationView(),\n contentDiv = $($($.find(\".main-view\")[0]).find(\".content\")[0]);\n \n // Add notification to content\n contentDiv.first().prepend(view);\n \n // Add listeners\n $(\"#main-window-warning\").click(function () {\n _removeNotification();\n });\n \n // Resize editor to make the status bar reappear\n _resizeEditor(true);\n }\n }", "function showNotificationDropdown() {\n if (s.notificationsWrapper.children().length === 0) {\n s.notificationEmpty.removeClass('hide');\n }\n s.notificationDropdown.css({'display': 'none'}).removeClass('hide').velocity(\"slideDown\", { duration: 500 });\n }", "function showNotification(header, content) {\n $(\"#notification-body\").text(content);\n $(\"#notification-header\").text(header);\n messageBanner.showBanner();\n messageBanner.toggleExpansion();\n }", "function showNotification(header, content) {\n $(\"#notification-header\").text(header);\n $(\"#notification-body\").text(content);\n messageBanner.showBanner();\n messageBanner.toggleExpansion();\n }", "function showNotification(header, content) {\n $(\"#notification-header\").text(header);\n $(\"#notification-body\").text(content);\n messageBanner.showBanner();\n messageBanner.toggleExpansion();\n }", "function hideIndicator() {\n offlineNotification.className = 'hideOfflineNotification';\n}", "function showNotification(header, content) {\n\t\t$(\"#notification-header\").text(header);\n\t\t$(\"#notification-body\").text(content);\n\t\tmessageBanner.showBanner();\n\t\tmessageBanner.toggleExpansion();\n\t}", "function showNotification(header, content) {\r\n $(\"#notificationHeader\").text(header);\r\n $(\"#notificationBody\").text(content);\r\n messageBanner.showBanner();\r\n messageBanner.toggleExpansion();\r\n hideErrorMessage();\r\n}", "function showNotification(header, content) {\r\n $(\"#notificationHeader\").text(header);\r\n $(\"#notificationBody\").text(content);\r\n messageBanner.showBanner();\r\n messageBanner.toggleExpansion();\r\n }", "function showNotification(header, content) {\n $(\"#notificationHeader\").text(header);\n $(\"#notificationBody\").text(content);\n messageBanner.showBanner();\n messageBanner.toggleExpansion();\n }", "function showNotification(header, content) {\n $(\"#notificationHeader\").text(header);\n $(\"#notificationBody\").text(content);\n messageBanner.showBanner();\n messageBanner.toggleExpansion();\n }", "setVisible(status) {\n if (status)\n this.cont.style.display = \"block\";\n else\n this.cont.style.display = \"none\";\n }", "showNotif(text=notif_text) {\r\n Webtwic.adjustSiteContent();\r\n $( 'body' ).prepend(\r\n\t\t\t`<div class=\"notif_vis\" id=\"notifBanner\">${text}${close_button}</div>`\r\n\t\t);\r\n\r\n $( '.close-button' ).on( 'click', e => {\r\n\t\t\te.preventDefault();\r\n\t\t\tWebtwic.undoReset();\r\n\t\t});\r\n }", "function showNotification(header, content) {\n $(\"#notificationHeader\").text(header);\n $(\"#notificationBody\").text(content);\n messageBanner.showBanner();\n messageBanner.toggleExpansion();\n }", "function showNotification(header, content) {\n $(\"#notificationHeader\").text(header);\n $(\"#notificationBody\").text(content);\n messageBanner.showBanner();\n messageBanner.toggleExpansion();\n }", "openNotification(payload) {\n dispatch.notification.toggleNotification(true);\n dispatch.notification.setNotificationContent(payload);\n }", "function updateNetworkDisplay(on) {\n networkDom.text(on ? 'on' : 'off');\n networkDom.toggleClass('label-success', on);\n networkDom.toggleClass('label-important', !on);\n }", "toggle() {\n\t\tif (this.isVisible) {\n\t\t\tthis.display();\n\t\t} else {\n\t\t\tthis.hide();\n\t\t}\n\t}", "toggleFeedbackDialog(state, boolean) {\n state.feedbackDialog = boolean;\n }", "_toggle() {\n if (this._isVisible) {\n this._hide();\n } else {\n this._show();\n }\n }", "function showIndicator() {\n offlineNotification.innerHTML = 'You are currently offline.';\n offlineNotification.className = 'showOfflineNotification';\n}", "toggleExitConfirmationVisibility() {\n this.state.meta.exitConfirmationIsVisible = !this.state.meta.exitConfirmationIsVisible;\n this.save();\n }", "function hideExpandedNotification() {\n $('#expanded_notification').html('');\n $('#expanded_notification').hide();\n}", "function shownotification() {\n var element = document.getElementById(\"mynotification\");\n element.classList.add(\"slide-show\");\n element.classList.remove(\"slide-hide\");\n var element1 = document.getElementById(\"novu-body\");\n element1.classList.add(\"blured-bgwhite\");\n }", "function showPopNotification(str, cb) {\n showNotif(str);\n setTimeout(function () {\n hideNotif();\n if (cb) {\n cb();\n }\n }, 3000);\n}", "function display_status_change(){\n\t$(\"#project_status_change\").show();\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 show() {\n var time = /(..)(:..)/.exec(new Date()); // The prettyprinted time.\n var hour = time[1] % 12 || 12; // The prettyprinted hour.\n var period = time[1] < 12 ? 'a.m.' : 'p.m.'; // The period of the day.\n new Notification(hour + time[2] + ' ' + period, {\n icon: '48.png',\n body: 'Time to make the toast.'\n });\n}", "function Notification(){}", "function switchNotification(checkbox){\n\tif(window.localStorage){\n\t\tif(checkbox.checked){\n\t\t\twindow.localStorage.noticationEnable = 'false';\n\n\t\t}else{\n\t\t\twindow.localStorage.noticationEnable = 'true';\n\t\t\tchrome.extension.getBackgroundPage().resetBadgeText();\n\t\t}\n\t}\n}", "function updateVisualNotification() {\n // XXX The rewrite of the toolbar in React delayed the availability of the\n // element unreadMessages. In order to work around the delay, I introduced\n // and utilized unreadMsgSelector in addition to unreadMsgElement.\n const unreadMsgSelector = $('#unreadMessages');\n const unreadMsgElement\n = unreadMsgSelector.length > 0 ? unreadMsgSelector[0] : undefined;\n\n if (unreadMessages && unreadMsgElement) {\n unreadMsgElement.innerHTML = unreadMessages.toString();\n\n APP.store.dispatch(dockToolbox(true));\n\n const chatButtonElement\n = document.getElementById('toolbar_button_chat');\n const leftIndent\n = (UIUtil.getTextWidth(chatButtonElement)\n - UIUtil.getTextWidth(unreadMsgElement)) / 2;\n const topIndent\n = ((UIUtil.getTextHeight(chatButtonElement)\n - UIUtil.getTextHeight(unreadMsgElement)) / 2) - 5;\n\n unreadMsgElement.setAttribute(\n 'style',\n `top:${topIndent}; left:${leftIndent};`);\n } else {\n unreadMsgSelector.html('');\n }\n\n if (unreadMsgElement) {\n unreadMsgSelector.parent()[unreadMessages > 0 ? 'show' : 'hide']();\n }\n}", "toggleInfo() {\n this.setState((prevState, props) => ({\n // here we invert our showInfo boolean by using the \n // previous state and the ! exclamation mark\n showInfo: !prevState.showInfo\n }));\n }", "hideFavoriteMessage() {\n this.setState({ isMessageVisible: false });\n }", "action() {\n\t\tthis.toggle();\n\t}", "action() {\n\t\tthis.toggle();\n\t}", "action() {\n\t\tthis.toggle();\n\t}", "function showNotificationWhenSuccess(res) {\n iSuccess.css('display', 'inline-block');\n iError.css('display', 'none');\n iMessage.html(res);\n notification.removeClass('error').addClass('success slide-left');\n notification.css('display', 'flex');\n }", "function enableNotifBtns() {\n $(\"#notifNo\").css(\"opacity\", 1);\n $(\"#notifYes\").css(\"opacity\", 1);\n}" ]
[ "0.77550167", "0.7161063", "0.7114141", "0.70133686", "0.7013232", "0.700943", "0.69459236", "0.6845056", "0.6774296", "0.6752678", "0.6670241", "0.6641349", "0.65946954", "0.6577906", "0.65738887", "0.65695256", "0.65387446", "0.6503707", "0.6487407", "0.64763045", "0.64587307", "0.6439192", "0.643454", "0.64134324", "0.64134324", "0.6407583", "0.6405292", "0.6387474", "0.6375815", "0.63618976", "0.63530993", "0.6325838", "0.630969", "0.63008916", "0.61747", "0.61643827", "0.6162083", "0.61537737", "0.61224145", "0.6112452", "0.6097959", "0.6067615", "0.60415393", "0.604035", "0.6036508", "0.6034882", "0.60336053", "0.60160625", "0.60099417", "0.6004246", "0.59929615", "0.597709", "0.5975229", "0.5971873", "0.5970756", "0.5967417", "0.59666044", "0.5965187", "0.5954073", "0.59518343", "0.59493536", "0.59476805", "0.5947561", "0.5942045", "0.5936698", "0.5924486", "0.5924486", "0.59217656", "0.59211826", "0.5912556", "0.5903135", "0.5900375", "0.5900375", "0.58939326", "0.5879382", "0.5879112", "0.5879112", "0.5878471", "0.5877506", "0.5874609", "0.58719784", "0.5853697", "0.58386683", "0.58260196", "0.58232677", "0.58126396", "0.57967436", "0.5795734", "0.5787401", "0.5785292", "0.5782788", "0.57705045", "0.57700515", "0.5766547", "0.5757959", "0.5735602", "0.5735602", "0.5735602", "0.57354677", "0.5731338" ]
0.6531113
17
Save the value of the country code from child component to local state
onCountryPick(code) { this.setState({ country_code: code}) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onValueChange (value){\n this.setState({\n country: value,\n countryCorrect: true\n })\n }", "function handleCountryButtonClick(e) {\n console.log(e.target.innerText);\n\n let countrySelectedCode;\n\n countriesArray.forEach(countryEntry => {\n if (countryEntry[0] === e.target.innerText) {\n countrySelectedCode = countryEntry[1];\n }\n });\n\n sessionStorage.setItem(\n \"current-country\",\n JSON.stringify(countrySelectedCode)\n );\n\n homePageReload(\"home\", {\n topSource: currentSourceId,\n country: countrySelectedCode,\n localType: \"news\"\n });\n }", "setCountryValue({value}) {\n this.countryValue = value;\n }", "CountryChange(event) {\n this.setState({ country: event.target.value });\n }", "drpClick(e)\n {\n this.setState({\"drdcountry\": e.target.value});\n }", "updateCountryName(event) {\n this.setState({\n country_name: event.target.value\n });\n }", "updateCountry(event) {\n\t\t// Create constants, find out which control the\n\t\t// value comes from, by retrieving the 'name' attribute.\n\t\t// Then set the correct state property\n\t\tconst target = event.target;\n\t\tconst value = event.target.value;\n\t\tconst name = target.name;\n\t\tthis.setState({\n\t\t\t[name]: value\n\t\t})\n\t}", "handleChangeCountry(e, index, country) {\n let personData = this.state.person;\n personData.country = country;\n \n this.setState({person: personData});\n }", "async handleChangeCountry(event) {\n let target = event.target;\n let content = [];\n if (!this.state.cities[target.value]) {\n content = await Butler.loadCities(target.value);\n } else {\n content = this.state.cities[target.value];\n }\n this.state.cities[target.value] = content;\n this.setState({\n selectedCountry: target.value,\n cities: this.state.cities,\n phoneNumberError: null,\n postalCodeError: null\n });\n }", "IncomeYChange(event) {\n localStorage.setItem('country', this.state.country);\n this.setState({ incomeY: event.target.value });\n }", "updateCountry(event) {\n // Create constants, find out which control the\n // value comes from, by retrieving the 'name' attribute.\n // Then set the correct state property\n const target = event.target;\n const value = target.value;\n const name = target.name;\n this.setState({\n [name]: value\n })\n }", "constructor(props) {\n super(props);\n //for things that will effect the UI inside state\n // immutable\n this.state = {\n countryData: null,\n countryCode: 'new code',\n name: 'name'\n }\n }", "updateCountry() {\n if (this.state.country !== this.state.selectedCountry) {\n this.setState({country: this.state.selectedCountry})\n }\n }", "changeCountry(alpha3Code) {\n this.props.fetchCountry(alpha3Code);\n }", "onChange(newCtryName, newCountrySpecificData) {\n this.setState({country: newCtryName});\n this.setState({countrySpecificData: newCountrySpecificData});\n }", "function onSearchCountry(){\n setCountry(item)\n }", "countryTransactionDetail(e, country_code, selected_country) {\n this.props.actions.ipTransactionDetails(country_code, 1);\n this.setState({\n selected_country_code: country_code,\n selected_country: selected_country,\n showModal: true,\n activePage: 1\n });\n }", "componentWillReceiveProps({ countryCode }) {\n this.setState({\n countryCode\n });\n }", "handleChange(value){\n this.setState({\n zipCode: value\n });\n }", "setCountryCode() {\n this.countryCode = 'us';\n this.setCurrencySymbol();\n\n fetch('http://ip-api.com/json')\n .then(results => results.json())\n .then(results => {\n this.countryCode = results.countryCode.toLowerCase();\n this.setCurrencySymbol();\n });\n }", "onChangeAddNewUserDetails(key, value) {\n this.setState({\n addNewUserDetail: {\n ...this.state.addNewUserDetail,\n [key]: value,\n },\n });\n if (key === \"country\") {\n this.props.fetchState(value);\n }\n }", "selectCountry(val) {\n\t\tconst form = Object.assign({}, this.state.form);\n\t\tform[\"qrCountry\"] = val;\n\t\tform[\"qrState\"] = \"\";\n\t\tform[\"qrStateOther\"] = \"\";\n\t\tif (val === \"Canada\") {\n\t\t\tthis.setState({ stateList: states_canada, showStateOther: false, form });\n\t\t} else if (val === \"Australia\") {\n\t\t\tthis.setState({\n\t\t\t\tstateList: states_australia,\n\t\t\t\tshowStateOther: false,\n\t\t\t\tform\n\t\t\t});\n\t\t} else if (val === \"Brazil\") {\n\t\t\tthis.setState({ stateList: states_brazil, showStateOther: false, form });\n\t\t} else if (val === \"China\") {\n\t\t\tthis.setState({ stateList: states_china, showStateOther: false, form });\n\t\t} else if (val === \"Germany\") {\n\t\t\tthis.setState({ stateList: states_germany, showStateOther: false, form });\n\t\t} else if (val === \"Hong Kong\") {\n\t\t\tthis.setState({\n\t\t\t\tstateList: states_hongkong,\n\t\t\t\tshowStateOther: false,\n\t\t\t\tform\n\t\t\t});\n\t\t} else if (val === \"India\") {\n\t\t\tthis.setState({ stateList: states_india, showStateOther: false, form });\n\t\t} else if (val === \"United States\") {\n\t\t\tthis.setState({ stateList: states_us, showStateOther: false, form });\n\t\t} else {\n\t\t\tthis.setState({ showStateOther: true, form });\n\t\t}\n\t}", "onCountrySelect(event): void\n\t{\n\t\tconst item = event.getData().item;\n\t\tif (item)\n\t\t{\n\t\t\tconst country = item.getId();\n\t\t\tif (country === this.getCountry())\n\t\t\t{\n\t\t\t\treturn; // nothing to do\n\t\t\t}\n\n\t\t\tthis.formatter.replaceCountry(country);\n\t\t\tthis.inputNode.value = this.formatter.getFormattedNumber();\n\t\t\tthis.drawCountryFlag();\n\t\t\tthis.callbacks.change({\n\t\t\t\tvalue: this.getValue(),\n\t\t\t\tformattedValue: this.getFormattedValue(),\n\t\t\t\tcountry: this.getCountry(),\n\t\t\t\tcountryCode: this.getCountryCode()\n\t\t\t});\n\t\t\tthis.callbacks.countryChange({\n\t\t\t\tcountry: this.getCountry(),\n\t\t\t\tcountryCode: this.getCountryCode()\n\t\t\t});\n\t\t}\n\t}", "getCountryValue() {\n return this.countryValue;\n }", "handleOnLanguageChange (event) {\n this.setState(state => {\n return {\n ...state,\n settings: {\n language: event.target.value\n }\n }\n })\n event.persist()\n }", "handlestateVariable() {\n let statedropUS = document.getElementById(\"stateselectUS\")\n let statedropCA = document.getElementById(\"stateselectCA\")\n let stateinput = document.getElementById(\"state\")\n let countrya = document.getElementById(\"country\")\n\n if (countrya.value === \"US\")\n {\n this.statea = statedropUS.value\n }\n else if (countrya.value === \"CA\")\n {\n this.statea = statedropCA.value\n }\n else\n {\n this.statea = stateinput.value\n }\n\n}", "handleChange() {\n debugger\n let data = Object.assign({}, this.state.newLanguage);\n data[event.target.name] = event.target.value;\n this.setState({\n newLanguage: data\n })\n\n }", "function updateCountry(values) {\n\n\t\tvar phoneProxyId = values.phoneProxyId,\n\t\t countryId = values.countryId,\n\t\t stateId = values.stateId,\n\t\t stateVal = values.stateVal,\n\t\t countryChecklist = values.countryChecklist,\n\t\t showStateChecklist = values.showStateChecklist,\n\t\t optInReqChecklist = values.optInReqChecklist,\n\t\t optInId = values.optInId,\n\t\t optInReqClass = values.optInReqClass,\n\t\t submitBtnClass = values.submitBtnClass,\n\t\t btnDisabledClass = values.btnDisabledClass,\n\t\t hiddenClass = values.hiddenClass;\n\n\t\t$('#' + phoneProxyId).on('countrychange', function (e, countryData) {\n\n\t\t\t// update country value\n\t\t\tvar countryCode = mapCountry(countryData.iso2);\n\t\t\t$('#' + countryId).val(countryCode);\n\t\t\tvalues.trackedCountry = countryCode;\n\n\t\t\t// this set the value of State for some forms that have State field\n\t\t\tvar $state = $('#' + stateId);\n\t\t\tif ($state.length) {\n\t\t\t\tSTATEHANDLER.countryChangeHandler(countryId, stateId, true);\n\t\t\t\t// get code of State\n\t\t\t\tvar stateProp = getProp(stateList, stateVal);\n\t\t\t\tif (stateProp) {\n\t\t\t\t\t$state.val(stateProp);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// country checker\n\t\t\tcountryChecker(values);\n\t\t});\n\t}", "submitCountry(event) {\n\t\t// 0. prevent sending the form to the server\n\t\tevent.preventDefault();\n\n\t\t// 1. create a new country, based on the state\n\t\tconst newCountry = {\n\t\t\tid: null,\t// we need 'null' here, b/c json-server generates the id automagically.\n\t\t\tname: this.state.name,\n\t\t\tcapital: this.state.capital,\n\t\t\tcost: this.state.cost,\n\t\t\tdetails: this.state.details\n\t\t};\n\n\t\t// 2. send the country to the parent\n\t\tthis.props.submit(newCountry)\n\t}", "submitCountry(event) {\n // 0. prevent sending the form to the server\n event.preventDefault();\n\n // 1. create a new country, based on the state\n const newCountry = {\n name: this.state.name,\n capital: this.state.capital,\n cost: this.state.cost,\n details: this.state.details\n };\n\n // 2. send the country to the parent\n this.props.submit(newCountry)\n }", "function setSelectedCountry(country) {\n localStorage.setItem(\"CountryNames\", country);\n var name = document.getElementById('countryName');\n localStorage.setItem(\"SearchTerm\", name.value);\n window.location.href = \"src/country-details/country-details.html\";\n}", "constructor(props)\n\t{\n\t\tsuper(props);\n\n\n // fill country data\n try {\n\t\t const $countries = JSON.parse(appData.Registration.countries);\n\t\t for( let val of $countries.Countries )\n\t\t {\n let item = {value: val['Code'], label: val['Country'], States: val['States'], age: val['ageRestrict']};\n // if (appData.Registration.currentCountry == val['Code']) item.selected = true;\n this.countries.push(item);\n\t\t } // endfor\n\n\n } catch (e) {\n __DEV__&&console.warn( 'Registration countries get fail' );\n this.countries = [];\n }\n\n\n this.state = {States: [], ageRestrict: 18, deniedText: '', birthDate: \"\", loading: false};\n\t}", "selectCountry(country) {\n const newIndex = this.state.countries.indexOf(country);\n this.setState({\n currentCountry: this.state.countries[newIndex]\n })\n }", "onChange(event) {\n this.setState({\n zipcode: event.target.value,\n });\n }", "function getData(country) {\n inputCountry = country;\n}", "getTemplate () {\n const { cca2, country } = this.state\n const initValues = this.initializeValue()\n\n let countryPickerStyle = [Styles.countryPicker]\n countryPickerStyle = !country ? countryPickerStyle.concat(Styles.noValue) : countryPickerStyle\n // define here your custom template\n\n return (locals) => {\n let countryMainContainer = [Styles.countryButton]\n countryMainContainer = locals.hasError ? countryMainContainer.concat(Styles.hasError) : countryMainContainer\n\n // if value is just initialzie then we will manually call our locals onchange\n initValues && this.changeCountryValue(initValues, locals)\n\n return (\n <TouchableOpacity style={countryMainContainer} onPress={() => this.countryPicker.openModal()}>\n <View style={Styles.countryContainer}>\n <View style={countryPickerStyle}>\n <CountryPicker\n ref={(countryPicker) => { this.countryPicker = countryPicker }}\n onChange={(value) => this.changeCountryValue(value, locals)}\n cca2={cca2}\n translation={this._getTranslation()}\n closeable\n filterable\n />\n </View>\n <Text> { country ? country.name : 'Select Country'} </Text>\n </View>\n </TouchableOpacity>\n )\n }\n }", "updateBirthPlaceValue(state, birthPlaceValue) {\r\n state.birthPlaceValue = birthPlaceValue;\r\n }", "function wpsc_update_location_labels( country_select ) {\n\n\tvar country_meta_key = wpsc_get_element_meta_key( country_select ),\n\t\tlabel, country_code;\n\n\tif ( country_meta_key == 'billingcountry' ) {\n\n\t\tvar billing_state_element = wpsc_get_wpsc_meta_element( 'billingstate' ) ;\n\n\t\tif ( billing_state_element ) {\n\t\t\tcountry_code = wpsc_get_value_from_wpsc_meta_element( 'billingcountry' );\n\t\t\tlabel = wpsc_country_region_label( country_code );\n\t\t\tbilling_state_element.attr( 'placeholder', label );\n\t\t\twpsc_update_labels( wpsc_get_wpsc_meta_elements( 'billingstate' ), label );\n\t\t}\n\t} else if ( country_meta_key == 'shippingcountry' ) {\n\n\t\tvar shipping_state_element = wpsc_get_wpsc_meta_element( 'shippingstate' );\n\n\t\tif ( shipping_state_element ) {\n\t\t\tcountry_code = wpsc_get_value_from_wpsc_meta_element( 'shippingcountry' );\n\t\t\tlabel = wpsc_country_region_label( country_code );\n\t\t\tshipping_state_element.attr( 'placeholder', label );\n\t\t\twpsc_update_labels( wpsc_get_wpsc_meta_elements( 'shippingstate' ), label );\n\t\t}\n\t}\n\n\treturn true;\n}", "continueToMain(){\n let postalCode = this.state.postalCode;\n\n document.cookie = \"postalCode=\" + postalCode +\n \";expires=Fri, 31 Dec 9999 23:59:59 GMT\";\n\n ShoppingCart.postalCode = postalCode;\n\n this.props.parent.setState({\n postalCode: postalCode\n });\n\n window.history.pushState({},\n document.title,\n window.location.origin + \"/\" + this.state.postalCode);\n }", "function handleCity(event) {\n setCity(event.target.value);\n }", "async componentDidMount() {\n this.handleCountryChange('Australia');\n }", "handleChangeParentAddress (e){\n e.preventDefault();\n this.setState({parentAddress: e.target.value});\n }", "function updateCountryStorage() {\n localStorage.setItem(\"countries\", JSON.stringify(countries));\n }", "function updateZipCodeValue(zipCodeValue) {\n STATE.zipCode = zipCodeValue;\n render();\n}", "function selectLocallyStoredLanguage(langCode){\n document.getElementById('languages').value = langCode;\n }", "constructor(props){\n super(props);\n this.state = {\n value: \"Enter City, Country\",\n isLoaded: false,\n items: []\n };\n }", "inputCity (inputValue) {\n this.setState({\n inputText: inputValue.target.value\n });\n }", "handleChange(event) {\n const searchValue = event.target.value\n // updates search value to filter countries names\n this.setState({ searchValue })\n }", "function OnProvince_Change( e , type )\r\n{\r\n Alloy.Globals.ShedModeShedPosition[\"PROVINCE\"] = $.widgetAppTextFieldShedModeFormsShedPositionProvince.get_text_value() ;\r\n}", "function local() {\r\n let country = \"Portugal\";\r\n }", "_onvalidatecode(isvalid) {\n this.setState({ otpvalue: isvalid })\n }", "componentDidUpdate(prevProps, prevState) {\n if (prevState.givenCountry !== this.props.givenCountry) {\n //if the country prop is changed for the dropdown given country, then this code block runs\n this.setState({\n givenCountry: this.props.givenCountry,\n //the new dropdown country is set here\n isLoaded: false,\n //the loaded status is falsified, because the graph data is changed\n graphData: {},\n //graph data is set to empty\n countryProv: undefined,\n //the countryProv from the user location is set to undefined\n });\n this.getCountryCaseStats();\n //fetch the country details for the new selected country\n }\n }", "onRegionChange(region){\n this.setState({region})\n\n }", "handleSelectRegion(event){\n console.log(event.target.value);\n this.setState({selectedRegion: event.target.value})\n}", "onChangeCallback(e) {\n e.preventDefault()\n let { value } = e.target\n this.setState({ newTz: value })\n }", "handleDirectLoadBenQusPart2Country(event) {\n var varBenQusCountryLoad = varCountryCode;\n if (varBenQusCountryLoad == \"CA\") {\n this.setState({ BenQusCountryLoadState: <BenQusCanada /> });\n }\n if (varBenQusCountryLoad == \"DK\") {\n this.setState({ BenQusCountryLoadState: <BenQusDenmark /> });\n }\n if (varBenQusCountryLoad == \"FR\") {\n this.setState({ BenQusCountryLoadState: <BenQusFrance /> });\n }\n if (varBenQusCountryLoad == \"IT\") {\n this.setState({ BenQusCountryLoadState: <BenQusItaly /> });\n }\n if (varBenQusCountryLoad == \"JP\") {\n this.setState({ BenQusCountryLoadState: <BenQusJapan /> });\n }\n if (varBenQusCountryLoad == \"QC\") {\n this.setState({ BenQusCountryLoadState: <BenQusQuebec /> });\n }\n if (varBenQusCountryLoad == \"UK\") {\n this.setState({ BenQusCountryLoadState: <BenQusUK /> });\n }\n if (varBenQusCountryLoad == \"US\") {\n this.setState({ BenQusCountryLoadState: <BenQusUS /> });\n }\n if (varBenQusCountryLoad == \"NO\") {\n this.setState({ BenQusCountryLoadState: <BenNorway /> })\n }\n if (varBenQusCountryLoad == \"KR\") {\n console.log(\"South korea load1\");\n this.loadEligibleStatus();\n }\n if (varBenQusCountryLoad == \"KRLS\") {\n this.setState({ BenQusCountryLoadState: <BenQusSouthKoreaLumpSum /> })\n }\n if (varBenQusCountryLoad == \"AT\") {\n this.setState({\n BenQusCountryLoadState: <BenQusCommon\n ApplyForCountry=\"Austria\" country_code={varBenQusCountryLoad}\n PensionDocID=\"AST\"\n />\n })\n }\n if (varBenQusCountryLoad == \"BE\") {\n this.setState({\n BenQusCountryLoadState: <BenQusCommon\n ApplyForCountry=\"Belgium\" country_code={varBenQusCountryLoad}\n PensionDocID=\"BLG\"\n />\n })\n }\n if (varBenQusCountryLoad == \"DE\") {\n this.setState({\n BenQusCountryLoadState: <BenQusCommon\n ApplyForCountry=\"Germany\" country_code={varBenQusCountryLoad}\n PensionDocID=\"PAG\"\n />\n })\n }\n if (varBenQusCountryLoad == \"BR\") {\n this.setState({\n BenQusCountryLoadState: <BenQusCommon\n ApplyForCountry=\"Brazil\" country_code={varBenQusCountryLoad}\n PensionDocID=\"PBZ\"\n />\n })\n }\n if (varBenQusCountryLoad == \"IE\") {\n this.setState({\n BenQusCountryLoadState: <BenQusCommon\n ApplyForCountry=\"Ireland\" country_code={varBenQusCountryLoad}\n PensionDocID=\"IPF\"\n />\n })\n }\n if (varBenQusCountryLoad == \"NL\") {\n this.setState({\n BenQusCountryLoadState: <BenQusCommon\n ApplyForCountry=\"Netherlands\" country_code={varBenQusCountryLoad}\n PensionDocID=\"NPF\"\n />\n })\n }\n if (varBenQusCountryLoad == \"PT\") {\n this.setState({\n BenQusCountryLoadState: <BenQusCommon\n ApplyForCountry=\"Portugal\" country_code={varBenQusCountryLoad}\n PensionDocID=\"PPF\"\n />\n })\n }\n }", "storeAddress(type, name, value){\n if(type === \"Postal Address\")\n name = \"postal\" + name\n this.setState({[name]: value})\n }", "regionFilter(event) {\n const regionValue = event.target.value\n // updates search value to filter countries by region\n this.setState({ regionValue })\n }", "function handleToggleComplete(country) {\n selectCountry((prevSelect) => prevSelect === country.alpha2Code ? null : country.alpha2Code)\n }", "updateTemplateCode(value) {\n this.setState({\n template_code: value\n });\n }", "function setCountry() {\n $.getJSON('https://freegeoip.net/json/', function (data) {\n var country = data.country_code;\n var $countrySelect = $('#country-select');\n var $countryOption = $countrySelect.find('option[value=\"' + country + '\"]');\n\n // Select 'other' if country is not in the list\n if ($countryOption.length == 0) {\n $countryOption = $countrySelect.find('option[value=\"--\"]');\n }\n $countryOption.attr('selected', 'selected');\n updateCountryInShoppingCart(country);\n });\n}", "constructor() {\n super()\n\n this.state = {\n currency : \"Euros\"\n }\n }", "function onChangeHandler(e) {\n e.preventDefault();\n props.setCities(e.target.value);\n }", "function countryCode(country)\r\n{\r\n // Placeholder waarde\r\n var code = 'xxx';\r\n \r\n // Itereer over de hele nested array in countries.js (database)\r\n for (var i = 0; i < country_codes.length; i++)\r\n {\r\n \t// Vergelijk om te kijken of het land in countries.js voorkomt\r\n if (country.toLowerCase() == country_codes[i][2].toLowerCase())\r\n {\r\n \t// Als gevonden, zet de code dan op de id van dat land\r\n code = country_codes[i][0];\r\n break;\r\n }\r\n }\r\n \r\n return code;\r\n}", "saveCard() {\n\t\tlet translatedWord = this.state.korean;\n\t\tlet eng = document.getElementById(\"inputEng\").value;\n\t\tlet url = \"store?english=\" + eng + \"&korean=\" + translatedWord;\n\t\tfetch(url)\n\t\t\t.then(\n\t\t\t\t(error) => {\n\t\t\t\t\tthis.setState( {\n\t\t\t\t\t\terror\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t)\n\t}", "IncomeChange(event) {\n localStorage.setItem('incomeY', this.state.incomeY);\n this.setState({ income: event.target.value });\n }", "render() {\n\t\treturn (\n\t\t\t<form onSubmit={(e) => this.submitCountry(e)}>\n\t\t\t\t<h2>New Country</h2>\n\t\t\t\t{/*All controlled components below*/}\n\t\t\t\t<div className=\"form-group\">\n\t\t\t\t\t<input type=\"text\"\n\t\t\t\t\t\t name=\"name\"\n\t\t\t\t\t\t placeholder=\"Country name...\"\n\t\t\t\t\t\t className=\"form-control\"\n\t\t\t\t\t\t value={this.state.name}\n\t\t\t\t\t\t onChange={(event => this.updateCountry(event))}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"form-group\">\n\t\t\t\t\t<input type=\"text\"\n\t\t\t\t\t\t name=\"capital\"\n\t\t\t\t\t\t placeholder=\"What is the capital?\"\n\t\t\t\t\t\t className=\"form-control\"\n\t\t\t\t\t\t value={this.state.capital}\n\t\t\t\t\t\t onChange={(event => this.updateCountry(event))}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"form-group\">\n\t\t\t\t<textarea\n\t\t\t\t\trows=\"4\"\n\t\t\t\t\tname=\"details\"\n\t\t\t\t\tplaceholder=\"some details...\"\n\t\t\t\t\tclassName=\"form-control\"\n\t\t\t\t\tvalue={this.state.details}\n\t\t\t\t\tonChange={(event => this.updateCountry(event))}\n\t\t\t\t/>\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"form-group\">\n\t\t\t\t<input type=\"number\"\n\t\t\t\t\t name=\"cost\"\n\t\t\t\t\t placeholder=\"Cost for a trip...\"\n\t\t\t\t\t className=\"form-control\"\n\t\t\t\t\t value={this.state.cost}\n\t\t\t\t\t onChange={(event => this.updateCountry(event))}\n\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<p>\n\t\t\t\t\t<input type=\"submit\" className=\"btn btn-success\"\n\t\t\t\t\t\t value=\"Submit new country\"/>\n\t\t\t\t</p>\n\t\t\t</form>\n\t\t);\n\t}", "onCountryChange() {\n return this.signUpFormCtrl.getRules().then(() => {\n const changePhoneCountry =\n (!this.signUpFormCtrl.model.phoneCountry ||\n this.signUpFormCtrl.model.phoneCountry === 'UNKNOWN') &&\n this.signUpFormCtrl.model.country;\n\n if (changePhoneCountry) {\n this.signUpFormCtrl.model.phoneCountry = this.signUpFormCtrl.model.country;\n }\n });\n }", "onRegionChange(region) {\n this.setState({region})\n}", "addCountry(event) {\n event.preventDefault();\n // if checks if current state has an id\n if (this.state.id) {\n const countryUpdate_data = {\n country_name: this.state.country_name,\n continent_name: this.state.continent_name,\n id: this.state.id\n }\n console.log('Update this: ', countryUpdate_data);\n\n const putRequest = new Request(`${url}/update-country`, {\n method: 'PUT',\n headers: new Headers({ 'Content-Type': 'application/json' }),\n body: JSON.stringify(countryUpdate_data)\n });\n\n fetch(putRequest)\n .then(response => {\n console.log(`Put request was successful: ${response}`);\n this.getCountries();\n this.setState({\n //empties input states\n country_name: '',\n continent_name: '',\n id: ''\n })\n }).catch(error => console.log(`Fetch failed on update country: ${error}`)\n )\n } else {\n const country_data = {\n //new country data\n country_name: this.state.country_name,\n continent_name: this.state.continent_name\n }\n\n const request = new Request(`${url}/new-country`, {\n method: 'POST',\n headers: new Headers({ 'Content-Type': 'application/json' }),\n body: JSON.stringify(country_data)\n });\n\n fetch(request)\n .then(response => {\n console.log(`Post was successful: ${response}`);\n this.getCountries();\n this.setState({\n //empties input states\n country_name: '',\n continent_name: '',\n id: ''\n })\n }).catch(error => console.log(`Fetch failed on add country post: ${error}`)\n )\n }\n }", "handleSelectLocation(area) {\n const raw_location = area.name;\n let side, section, zone;\n\n if (raw_location.indexOf('PZ') !== -1) {\n zone = 'pz'\n } else if (raw_location.indexOf('TZ') !== -1) {\n zone = 'tz'\n } else if (raw_location.indexOf('CZ') !== -1) {\n zone = 'cz'\n } else if (raw_location.indexOf('AS') !== -1) {\n zone = 'as'\n }\n\n\n this.setState(prevState => ({\n editing: {\n ...prevState.editing,\n lesion: {\n ...prevState.editing.lesion,\n zone: zone,\n location: raw_location,\n }\n }\n }))\n }", "function pt10CountryChange() {\n ptCountryChange(pt10InitializeState,'BbanBicEFTWire');\n }", "changeCountry(context, payload) {\n context.commit(\"changeCountry\", payload);\n }", "function pt7CountryChange() {\n ptCountryChange(pt7InitializeState,'BREFT');\n }", "get_input_value_depending_on_the_country_selected(value, country_code)\n\t{\n\t\tconst { metadata, convertToNational } = this.props\n\n\t\tif (!value)\n\t\t{\n\t\t\treturn\n\t\t}\n\n\t\t// If the country code is specified\n\t\tif (country_code)\n\t\t{\n\t\t\t// If the value has a leading plus sign\n\t\t\tif (value[0] === '+' && convertToNational)\n\t\t\t{\n\t\t\t\t// If it's a fully-entered phone number\n\t\t\t\t// that converts into a valid national number for this country\n\t\t\t\t// then the value is set to be that national number.\n\n\t\t\t\tconst parsed = parse(value, metadata)\n\n\t\t\t\tif (parsed.country === country_code)\n\t\t\t\t{\n\t\t\t\t\treturn this.format(parsed.phone, country_code).text\n\t\t\t\t}\n\n\t\t\t\t// Else the leading + sign is trimmed.\n\t\t\t\treturn value.slice(1)\n\t\t\t}\n\n\t\t\t// Else the value stays as it is\n\t\t\treturn value\n\t\t}\n\n\t\t// The country is not set.\n\t\t// Assuming that's an international phone number.\n\n\t\t// If the value has a leading + sign\n\t\tif (value[0] === '+')\n\t\t{\n\t\t\t// The value is correct\n\t\t\treturn value\n\t\t}\n\n\t\t// The + sign is prepended\n\t\treturn '+' + value\n\t}", "handleAppDropdown(value) {\n let state = this.state;\n state.appDropdownSelection = value;\n this.setState(state);\n }", "function pt9CountryChange() {\n ptCountryChange(pt9InitializeState,'AUEFT');\n }", "constructor(props) {\n super(props)\n this.state = {\n name: '',\n contentArea: '',\n description: '',\n languages: []\n }\n this.state.languages = Languages\n this.state.name = this.props.route.params.name\n this.state.contentArea = this.props.route.params.contentArea\n this.state.description = this.props.route.params.description\n //alert(this.state.value)\n }", "constructor(props){\n super(props)\n // this.state.value = 0,\n this.state.infoFromChild = \"\"\n }", "addressChange(e){\n var change = Object.assign({}, this.state);\n change.modValues[0].address = e.target.value;\n this.setState(change);\n }", "function country(xkey, xcode) {\r\n this.key = xkey;\r\n this.code = xcode;\r\n}", "function displayCountry(event) {\n const code = event.target.id;\n console.log(code)\n console.log(countriesByCode[code])\n countryName.innerHTML = countriesByCode[code]\n}", "function CountrySelect() {\r\n const [country, setCountry] = useState('US');\r\n const {data, loading, error} = useQuery(LIST_COUNTRIES, {client});\r\n\r\n const countryOptions = [];\r\n\r\n\r\n\r\n if (loading || error) {\r\n return <p>{error ? error.message : 'Loading...'}</p>;\r\n }\r\n\r\n\r\n\r\n const DropdownExampleSearchSelection = () => (\r\n <Dropdown\r\n placeholder='Select Country'\r\n fluid\r\n search\r\n onChange\r\n selection={e => setCountry(e.target.value)}\r\n\r\n options={countryOptions}\r\n />\r\n\r\n );\r\n\r\n data.countries.map(country => (\r\n countryOptions.push( { key: country.code, value: country.code, flag: country.code.toString().toLowerCase(), text: country.name })\r\n ));\r\n return (\r\n<div>\r\n\r\n <DropdownExampleSearchSelection/>\r\n <p>{country}</p>\r\n</div>\r\n\r\n );\r\n}", "onLocChange(e) {\n this.setState({\n location: e.target.value\n })\n }", "static setCity(e) {\n e.preventDefault();\n city = locationInput.value;\n document.querySelector(\".location\").innerText = city;\n UI.updateUI();\n }", "onRegionChange(region) {\r\n this.setState({ region });\r\n }", "function storeSelectedId() {\n if(this.value === \"\"){\n if(this.getAttribute(\"id\") === \"currencyFrom\"){\n flagFrom.innerHTML = \"\";\n } else{\n flagTo.innerHTML = \"\";\n } \n return;\n }\n let val = this.value;\n let id = document.querySelector(`#countries option[value='${val}']`).getAttribute(\"data-id\");\n let flagId = document.querySelector(`#countries option[value='${val}']`).getAttribute(\"data-alph\");\n if (this.getAttribute(\"id\") === \"currencyFrom\") {\n selectedFrom = id;\n let img = `<img src=\"https://www.countryflags.io/${flagId}/flat/24.png\"/>`\n flagFrom.innerHTML = img;\n } else {\n selectedTo = id;\n let img = `<img src=\"https://www.countryflags.io/${flagId}/flat/24.png\"/>`\n flagTo.innerHTML = img;\n }\n }", "handleChangeRegion(e, index, region) {\n let flightData = this.state.flightData;\n flightData.region = region;\n\n this.setState({ flightData: flightData });\n\n //Get cities data by region\n this.getCities(region);\n this.setState({ disableCity: false });\n }", "function appState(countryValue){\n cs.then(data=>{\n var keys = Object.keys(data[0].country)\n\n keys.forEach(key =>{\n if(data[0].country[key]== countryValue){\n \n data[0].states[key].map(state =>{\n let option = document.createElement('option')\n option.setAttribute('value', state.name)\n option.innerHTML = state.name\n stateEle.append(option)\n })\n }\n \n })\n })\n\n}", "onAddressChanged(inputAddress) {\n this.setState({\n address: inputAddress\n });\n }", "function OnMunicipality_Change( e , type )\r\n{\r\n Alloy.Globals.ShedModeShedPosition[\"MUNICIPALITY\"] = $.widgetAppTextFieldShedModeFormsShedPositionMunicipality.get_text_value() ;\r\n}", "render() { \n return (\n <ul>\n <li>Country: {this.state.country}</li>\n <li>ISO code: {this.state.isocode}</li>\n <li>Capital: {this.state.capital}</li>\n <li>Region of the world: {this.state.regionWorld}</li>\n </ul>\n )\n\n }", "function onChangeTargetCountry(event) {\n\tvar available_languages = {\n\t\t'AR' : {es: 'Spanish'},\n 'AU' : {en: 'English',zh: 'Chinese'},\n 'AT' : {de: 'German', en: 'English'},\n 'BE' : {en: 'English', fr: 'French', nl: 'Dutch'},\n 'BR' : {pt: 'Portuguese'},\n 'CA' : {en: 'English', fr: 'French', zh: 'Chinese'},\n 'CL' : {es: 'Spanish'},\n 'CN' : {zh: 'Chinese'},\n 'CO' : {es: 'Spanish'},\n 'CZ' : {cs: 'Czech', en: 'English'},\n 'DK' : {da: 'Danish', en: 'English'},\n 'FR' : {fr: 'French'},\n 'DE' : {de: 'German', en: 'English'},\n 'HK' : {en: 'English', zh: 'Chinese'},\n 'IN' : {en: 'English'},\n 'ID' : {en: 'English', id: 'Indonesian'},\n 'IE' : {en: 'English'},\n 'IT' : {it: 'Italian'},\n 'JP' : {ja: 'Japanese'},\n 'MY' : {en: 'English', ms: 'Malay', zh: 'Chinese'},\n 'MX' : {en: 'English', es: 'Spanish'},\n 'NL' : {en: 'English', nl: 'Dutch'},\n 'NZ' : {en: 'English'},\n 'NO' : {en: 'English', no: '\tNorwegian'},\n 'PH' : {en: 'English', tl: 'Filipino'},\n 'PL' : {pl: 'Polish'},\n 'PT' : {pt: 'Portuguese'},\n 'RW' : {ru: 'Russian'},\n 'SG' : {en: 'English', zh: 'Chinese'},\n 'ZA' : {en: 'English'},\n 'ES' : {es: 'Spanish'},\n 'SE' : {en: 'English', sv: 'Swedish'},\n 'CH' : {en: 'German', en: 'English', fr: 'French', it: 'Italian'},\n 'TW' : {en: 'English', zh: 'Chinese'},\n 'TR' : {en: 'English', tr: 'Turkish'},\n 'AE' : {ar:'Arabic', en: 'English'},\n 'GB' : {en: 'English'},\n 'US' : {en: 'English', zh: 'Chinese'}\n\t};\n\n\t$('.googleshopping-feed-container select.feed-language')\n\t\t.find('option')\n \t.remove();\n\n\tif(available_languages.hasOwnProperty(event)) {\n\t\t$.each(available_languages[event], function(key, value) {\n\t\t\t$('.googleshopping-feed-container select.feed-language')\n\t\t\t\t.append($(\"<option></option>\")\n\t\t\t\t\t.attr(\"value\",key)\n\t\t\t\t\t.text(value));\n\t\t});\n\t}\n}", "function setCountryNameInstadeOfId() {\n $(\"*[data-country]\").each(function () {\n\n var id = $(this).data(\"country\");\n $(this).text(countryMap[id]);\n })\n}", "function CountryInput() {\r\n Behaviors.init(CountryInput, this, arguments);\r\n\r\n this.$elem.on(\"change\", this.select_intent.bind(this));\r\n\r\n this.country_list = AjaxCart.CountryList.find_markup($(document))[0];\r\n if (this.country_list === undefined) {\r\n console.error(\"Country inputs require a valid Shopify country list in order to work.\");\r\n }\r\n\r\n this.$shipping_form = this.$elem.parents().find(AjaxCart.Shipping.QUERY);\r\n this.shipping = AjaxCart.Shipping.find_markup(this.$shipping_form)[0];\r\n\r\n if (this.shipping === undefined) {\r\n console.error(\"Country inputs should only be placed within a shipping form\");\r\n }\r\n\r\n this.$province_inputs = this.$shipping_form.find(AjaxCart.ProvinceInput.QUERY);\r\n\r\n //This has to be on a separate stack frame to avoid recursive construction\r\n window.setTimeout(function () {\r\n this.province_inputs = AjaxCart.ProvinceInput.find_markup(this.$province_inputs);\r\n }.bind(this), 0);\r\n\r\n this.populate();\r\n }", "getName() {\n const names = this.state.countries.map(country => country.name);\n this.setState((prevState, props) => ({ names }));\n }", "setRegion(region) {\n this.setState({\n region: region \n });\n }", "onValueChange(value: string) {\n let specialty = this.state.specialties.find(chSpecialty => chSpecialty.name === value)\n this.setState({\n selected: value,\n specialties_id: specialty.id\n // selectedSpecialty_id: specialty.id,\n })\n store.setState({\n selectedSpecialty: value,\n selectedSpecialty_id: specialty.id,\n })\n console.log('selected specialty:', store.getState().selectedSpecialty)\n console.log('selectedSpecialty_id:', store.getState().selectedSpecialty_id)\n}", "SelectCountry(country) {\n this.plotObject.updatePlotAddCountry(country);\n }", "handleShippingAddressState(e){\n const { rfq } = this.props\n const stateValue = ( null !== e )? e.value : ''\n rfq.shipping_address.state = stateValue\n this.props.updateRFQ( rfq )\n }" ]
[ "0.66277164", "0.6586168", "0.6520552", "0.65062267", "0.64619666", "0.64419705", "0.6410882", "0.6338161", "0.630967", "0.62645483", "0.6263269", "0.6251508", "0.62390023", "0.6216782", "0.6192552", "0.61216736", "0.6063683", "0.6002637", "0.5842488", "0.57879114", "0.57432777", "0.57407206", "0.5738891", "0.57251245", "0.56860787", "0.5674964", "0.5659446", "0.5647767", "0.56303984", "0.56298447", "0.5611632", "0.56097406", "0.55992", "0.5591395", "0.5545361", "0.55436456", "0.55178237", "0.54948884", "0.54667467", "0.54630774", "0.5455411", "0.54098034", "0.5389145", "0.5387209", "0.5355502", "0.5352028", "0.53436357", "0.5343304", "0.53366965", "0.53276265", "0.53207016", "0.5303502", "0.5297707", "0.5296213", "0.52845836", "0.5282874", "0.5273566", "0.5271375", "0.5270077", "0.5259796", "0.5258078", "0.5229641", "0.52272505", "0.5224362", "0.52238804", "0.5217948", "0.52042425", "0.5195283", "0.5190294", "0.51874876", "0.5169522", "0.51674265", "0.5164299", "0.5163354", "0.5154535", "0.5151538", "0.51426655", "0.5135548", "0.5130853", "0.51283896", "0.5127619", "0.5125872", "0.51208985", "0.5114038", "0.51096225", "0.51046985", "0.51015496", "0.50989896", "0.5087965", "0.50845516", "0.5078765", "0.507863", "0.5078549", "0.5078455", "0.5076395", "0.5073335", "0.5072845", "0.5071804", "0.5064379", "0.5061094" ]
0.71605444
0
render warning label based on the error state
renderLabel() { return ( { Name: () => { if (this.state.error[0] === true) { return <Label bsStyle="danger">Please input Name</Label> } }, Address: () => { if (this.state.error[1] === true) { return <Label bsStyle="danger">Please input Address</Label> } }, Revenue: () => { if (this.state.error[2] === true) { return <Label bsStyle="danger">Please input Revenue</Label> } }, Phone: () => { if (this.state.error[3] === true || this.state.error[4] === true) { return <Label bsStyle="danger">Please input Code & Phone Number</Label> } } } ) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function errorLabel(message) {\n\treturn '<label class=\"control-label\">\\\n\t\t\t\t<i class=\"fa fa-times-circle-o\"></i> '+message+'</label>'\n}", "function updateUiError() {\n showElements(statusMessage);\n statusMessage.textContent =\n \"Sorry you have entered invalid value, please try again!\";\n statusMessage.classList.remove(\"success\");\n statusMessage.classList.add(\"error\");\n}", "_renderErrorText() {\n\t\treturn (\n\t\t\t<Text style={styles.errorText}>{this.state.invalidMessage}</Text>\n\t\t);\n\t}", "function renderErrorMessage() {\n return (\n <ErrorMessage message=\"The data couldn't be loaded!\" />\n );\n }", "function updateRelationErrorMsg() {\n relationErrorMsg.innerHTML = relationInput.validationMessage;\n}", "renderAlert() {\n if(this.props.errorMessage) {\n return(\n <div className=\"label1\">\n <strong>Oops!</strong> {this.props.errorMessage}\n </div>\n )\n }\n }", "checkForError() {\n if (this.props.error) {\n return <p className=\"error-text\">{this.errorMessage}</p>;\n }\n }", "renderFormError(inputName) {\n\n if (inputName == 'lastname') {\n if (this.state.lastnameError !='') {\n return (<RkText rkType='danger'> {this.state.lastnameError} </RkText>);\n }\n }\n }", "errorPrint() {\n let error = this.state.errors;\n let errorMsg = [];\n if(this.state.errorFlag){\n if(error!=null){\n errorMsg.push(<span className='errorMessage'>Error: {this.state.message}</span>)\n Object.keys(error).map(function(key) {\n errorMsg.push(<span className='errorMessage'>{error[key][0]}</span>)\n });\n return errorMsg;\n } \n }else{\n errorMsg.push(<span>Success:{this.state.message}</span>)\n return errorMsg;\n }\n }", "function displayError() {\n if(originalError instanceof ValidationError) {\n $(\".validation-message--error\").text(`Validation Error: ${originalError.message}`);\n }\n else if(originalError instanceof LocationError) {\n $(\".validation-message--error\").text(`Location Error: ${originalError.message}`);\n }\n else {\n $(\".validation-message--error\").text(`Error: ${originalError.message}`);\n }\n }", "renderError () {\n const { error } = this.state\n return (\n <div className=\"store-errors\">\n <div className=\"store-error\">\n <h5 className=\"title\">{error.title ?? 'Unknown Error'}</h5>\n <span className=\"detail\">{error.detail}</span>\n <br />\n <small className=\"footer\">\n {\n error.code === HttpStatus.UNAUTHORIZED\n ? (\n <>\n {'If you believe this is an error, Please appeal via email: '}\n <a href=\"mailto:[email protected]\">{'[email protected]'}</a>\n </>\n ) : (\n <>\n {'If the problem persists, please contact a techrat via email: '}\n <a href=\"mailto:[email protected]\">{'[email protected]'}</a>\n </>\n )\n }\n </small>\n\n </div>\n </div>\n )\n }", "renderError(){\n if (this.state.error !== false){\n return(\n <div className=\"alert alert-danger\">\n {this.state.error}\n </div>\n )\n }\n }", "@readOnly\n @computed('localError')\n renderErrorMessage (localError) {\n return localError ? `Form renderer error encountered: ${localError}` : ''\n }", "renderErrorMsg(error) {\n if (error.email) {\n return <Text style={styles.errorText}>Not a valid email address.</Text>\n } else if (error.minLength) {\n return <Text style={styles.errorText}>Password must be at least {error.minLength} characters.</Text>\n }\n return null\n }", "function showError(msg) {\n var lblError = document.querySelector('#lblError');\n lblError.innerHTML = 'Error: ' + msg;\n lblError.hidden = false;\n}", "function displayErrorMsg(error) {\n $(\".errorOverlay\", selector).text(tr(error));\n $(selector).addClass(\"error\");\n }", "function error(err) {\r\n notificationElement.style.display = \"block\"\r\n notificationElement.innerHTML = `<p>${err.message}</p>`\r\n}", "showValidationMessage(validationSate, validationMessage) {\n if(validationSate == 'error') {\n return (\n <span className='validation-error-message'>{validationMessage}</span>\n );\n }\n }", "function showError(error) {\r\n switch(error.code) {\r\n case error.PERMISSION_DENIED:\r\n smthgwrong.textContent = \"Pro zobrazení počasí v aktuální oblasti prosím povolte přítup k poloze.\"\r\n break;\r\n case error.POSITION_UNAVAILABLE:\r\n smthgwrong.textContent = \"Nebylo možné identifikovat polohu.\"\r\n break;\r\n case error.TIMEOUT:\r\n smthgwrong.textContent = \"Příkaz pro získaní polohy vypršel, zkuste to prosím znova.\"\r\n break;\r\n case error.UNKNOWN_ERROR:\r\n smthgwrong.textContent = \"Během procesu došlo k neznámé chybě.\"\r\n break;\r\n }\r\n}", "render() {\n const msg =\n this.state.errorMessage === ''\n ? `Latitude: ${this.state.lat}`\n : `Error: ${this.state.errorMessage}`\n return <div>{msg}</div>\n }", "function errorMessage() {\n\t\n\t$loader.html('<span class=\"error typeIt2\">Purrrlease make a selection...... You can do that right meoewwwwermmmm thanks.</span>');\n\n\t//typeIt effect\n\t$('.typeIt2').typeIt({\n\t\tcursor: false,\n\t});\n\n}", "function sadKEK(label, message) {\n console.error(`${getLanguage()} language error for '${label}': ${message}`);\n return `<span style=\"color:red\">${message} <img src=\"https://cdn.betterttv.net/emote/5d72ae0aa32edb714a9df060/1x\"/></span>`;\n }", "function displayError(error) {\n var errorType = {\n 0: \"Unknown Error\",\n 1: \"Permission denied by user\",\n 2: \"Position is not available\",\n 3: \"Request timed out\"\n };\n \n var errorMessage = errorType[error.code];\n if (error.code == 0 || error.code == 2) {\n errorMessage = errorMessage + \" \" + error.message;\n }\n \n var div = document.getElementById(\"location\");\n div.innerHTML = errorMessage;\n}", "function displayError(message) {\n errorMessage.html(message);\n error.show();\n state.change(\"error\");\n }", "function alertErrorMsg(s){ errorAlert.html('<i class=\"fa fa-warning\"></i> ' + s).show(); }", "static renderCompileError(message) {\n const noCreate = !message\n const overlay = this.getErrorOverlay(noCreate)\n if (!overlay) return\n overlay.setCompileError(message)\n }", "function showWarnings(errors) {\n errors.forEach(error => {\n $(`#${error}`).addClass(\"invalid-group\");\n });\n}", "function showErrorState(data) {\n state = 0; // error\n errorMessage = data.message;\n\n app.hidePreloader();\n\n var html = errorStateCompiled({errorMessage: errorMessage});\n $$('.state-place').html(html);\n }", "getErrorMessage() {\n if(this.state.error) {\n return (<div className=\"col-sm-8\">\n <div className=\"error-message\">{this.state.error} </div>\n </div>)\n }\n if (this.state.success) {\n return (<div className=\"col-sm-8\">\n <div className=\"success-message\">{this.state.success}</div>\n </div>)\n }\n }", "renderFormError(inputName) {\n if (inputName == 'height') {\n if (this.state.heightError !='') {\n return (<RkText rkType='danger' style={{fontSize: 16, marginHorizontal: -5}}> {this.state.heightError} </RkText>);\n }\n }\n }", "renderError() {\n return (\n <div id=\"error\">\n <div className=\"alert alert-danger\" role=\"alert\">\n <strong>Warning!</strong> Please intput a positive number &#40; 1 &#45; 1476 &#41;\n </div>\n <button onClick = {this.handleSubmit} className = \"waves-effect waves-light btn-large\"> Try Again </button>\n </div>\n );\n }", "function Error({error}){\n if(error){\n return(\n <p className=\"error\">{error}</p>\n );\n }else{\n return(\n <p className=\"invisible\">{error}</p>\n );\n }\n}", "renderError(){\n if(this.state.error){\n return (\n <div className=\"error\">\n {this.state.error}\n </div>\n )\n }\n return null;\n }", "function errorHtml(data){\n var success = 'success';\n if (!data.success) {\n success = 'error';\n }\n return '<div class=\"message-'+success+' alert-'+success+'\">'+\n '<div class=\"message\"> <i class=\"icon\"></i> <span>'+data.message+'</span>'+\n '</div>';\n\n }", "function renderErrors(err) {\n const input = document.getElementById('city-input');\n const headline = document.getElementById('city');\n const value = input.value;\n const placeholder = input.placeholder;\n\n if (err.message === 'Error: Empty search') {\n input.placeholder = '🙄';\n setTimeout(() => (input.placeholder = 'Type in something'), 300);\n setTimeout(() => (input.placeholder = placeholder), 1000);\n }\n else {\n input.placeholder = '💩';\n setTimeout(() => (input.placeholder = 'Spell properly'), 300);\n setTimeout(() => (input.value = value), 1000);\n }\n input.value = '';\n headline.textContent = 'Y U NO forecast?';\n console.log(err.message);\n}", "renderError({ error, touched }) {\n if (touched && error) {\n return (\n <div className=\"ui error message\">\n <div className=\"header\">{error}</div>\n </div>\n );\n }\n }", "function displayError() {\r\n let html = `${addBookmark()}<div id=\"error-message\">${store.error}</div>`;\r\n return html;\r\n}", "function makeLoadStatusMessages(errors)\n{\n bgColour = \"#E4E4FF\";\n if (errors.errors > 0)\n {\n bgColour = \"#FFE4E4\";\n }\n else if (errors.warnings > 0)\n {\n bgColour = \"#FFF4E4\";\n }\n contents = errors.fine + \" entries loaded without error.\";\n if (errors.noName > 0)\n {\n contents = errors.noName + \" entries couldn't be loaded due to lacking a name.\\n\" + contents;\n }\n if (errors.noPath > 0)\n {\n contents = errors.noPath + \" entries couldn't be loaded due to lacking a path.\\n\" + contents;\n }\n if (errors.noTime > 0)\n {\n contents = errors.noTime + \" entries were loaded but lack a date and time.\\n\" + contents;\n }\n return makeDisplayStatus(\"Tags file loaded!\", contents, bgColour);\n}", "error() {\n\t return this._visibleView === null || this._visibleView.loading\n\t ? 'loading'\n\t : this._visibleView.error;\n\t }", "function showError(str) {\n log.warn(str);\n $('#charts-status').addClass('hidden');\n $('#charts-error').removeClass('hidden');\n $('#charts-error').html(str);\n}", "function showError(error)\n{\n var text;\n var animation;\n (error.code > 1) ? animation = \"animated shake\" : animation = \" \";\n switch (error.code){\n case 1 : text = '🥺 Non hai consentito l\\' accesso alla posizione. Se hai dubbi sulla privacy, consulta le <a href=\"#come-funziona\">informazioni</a> in fondo. ⬇️'; break;\n case 2 : text = \"📡 Qualcosa non ha funzionato... Riprova più tardi. <b>Controlla di avere il GPS attivo</b>.\"; break;\n case 3 : text = \"💤 L' accesso alla posizione sta impiegando più tempo del previsto.\"; break;\n default : text = \"😨 Errore nella localizzazione.\";\n}\n $(\"#geo-information\").html('<div class=\"alert alert-danger ' + animation + '\" role=\"alert\">'+ text +'</div>');\n}", "function showIncorrectState(){\n var msg;\n if(userData[\"State\"]==0) msg = \"Voting has not yet started.\";\n else msg = \"Voting period is over now.\"\n $(\"body\").addClass(\"d-flex\");\n $(\"body\").html(\"<div class=\\\"alert alert-danger mx-auto my-auto d-inline-flex\\\">\"+msg+\"</div>\");\n}", "__renderFailure(resolutionErrors) {\n return (\n <View\n style={styles.error}\n >\n <Text\n style={styles.errorText}\n >\n {'?'}\n </Text>\n </View>\n );\n }", "function displayError() {\n\t\t// Hide loading animations\n\t\tdocument.getElementById(\"loadingmeaning\").style.display = \"none\";\n\t\tdocument.getElementById(\"loadinggraph\").style.display = \"none\";\n\t\tdocument.getElementById(\"loadingcelebs\").style.display = \"none\";\n\t\t\n\t\t// Display error at bottom of the page\n\t\tdocument.getElementById(\"errors\").innerHTML =\n\t\t\t\"Sorry, but an error occured during your server request.\";\n\t}", "function showError(error) {\n $('.loading').hide();\n switch(error.code) {\n case error.PERMISSION_DENIED:\n stat_str.innerHTML = \"Sorry, <b>tmprtr</b> needs your location to work.\";\n break;\n case error.POSITION_UNAVAILABLE:\n stat_str.innerHTML = \"Location information is unavailable.\";\n break;\n case error.TIMEOUT:\n stat_str.innerHTML = \"The request to get user location timed out.\";\n break;\n case error.UNKNOWN_ERROR:\n stat_str.innerHTML = \"An unknown error occurred.\";\n break;\n }\n $('.sadface').show();\n location_str.innerHTML = 'An error occurred...';\n}", "function SetErrorMsg(msg)\n{\n document.getElementById('lbl_Errors').innerHTML = msg;\n document.getElementById('lbl_Errors1').innerHTML = msg;\n}", "renderErrorFor(fieldName) {\r\n \tif (this.hasErrorFor(fieldName)) {\r\n\t return (\r\n\t \t<em className=\"error invalid-feedback\"> {this.state.errors[fieldName][0]} </em>\r\n\t )\r\n \t}\r\n }", "renderErrors() {\n const { questionText, questionName, error } = this.state;\n const errors = [];\n let errorMessage;\n if (!questionText) {\n errors.push('Your Question');\n }\n if (!questionName) {\n errors.push('Your Nickname');\n }\n if (!this.verifyEmail()) {\n errors.push('Your Email');\n }\n if (error) {\n errorMessage = (\n <div className=\"error-message\">\n <h5>\n You must enter:\n <ul>\n {errors.map((errorEntry) => <li className=\"mandatory-field\">{errorEntry}</li>)}\n </ul>\n </h5>\n </div>\n );\n }\n return errorMessage;\n }", "function Error(props)\n{\n let errMsg = \"No error message given.\";\n\n if (props.msg) {\n errMsg = props.msg;\n } else if (props.location.state && props.location.state.msg) {\n errMsg = props.location.state.msg;\n }\n \n return(\n <Card className=\"error align-self-center col-md-6 justify-content-center text-center error alert-danger\">\n {errMsg}\n </Card>\n );\n}", "function showError() {\n showStatus('error');\n}", "function displayError(error) {\n $(\"#data\").children().replaceWith(\"<span>\" + error + \"</span>\");\n }", "renderError() {\n if (!this.state.extendedDisableErrMsg || this.state.disableModalOpen) {\n return null;\n }\n\n const message = T.translate(`${PREFIX}.DetailView.enableError`, {\n message: this.state.extendedDisableErrMsg,\n });\n\n return (\n <Alert message={message} type=\"error\" showAlert={true} onClose={this.closeAlertBanner} />\n );\n }", "function showErrorInfo({containerSelector, errorMsg}) {\n const container = document.querySelector(containerSelector);\n container.innerHTML = `\n <img src='img/rain.gif' alt=':('>\n ${errorMsg}`;\n container.classList.add('error');\n}", "function errorText() {\n\t\tclearText();\n\t\tslides.innerHTML = '<li class=\"slide active error\">&times;</li>';\n\t}", "checkForError() {\n if (this.state.attemptedSubmit && this.state.changePassword) {\n if (!this.compareOldPasswords())\n return (\n <div className=\"alert alert-danger\">\n Old password does not match current password.\n </div>\n );\n if (this.compareNewPasswords())\n return (\n <div className=\"alert alert-danger\">New passwords do not match.</div>\n );\n }\n return null;\n }", "onInputChange(e, label) {\n const errLabel = label + \"Err\";\n this.setState({ [label]: e.target.value, formErr: \"\", [errLabel]: \"\" });\n }", "showErrorMessage() {}", "function showError(type, text) {}", "function showError(error){\r\n notificationElement.style.display = \"block\";\r\n notificationElement.innerHTML = `<p> ${error.message} </p>`;\r\n}", "function showError(msg) {\n const html = `<li><p class=\"error\">${msg}</p></li>`;\n document.querySelector('#results').innerHTML = html;\n}", "function userFacingMessage(error) {\n return error.type ? error.message : 'An error occurred, developers have been alerted';\n}", "function drawRegistrationError() {\r\n var container = document.getElementById('welcome');\r\n container.innerHTML = \"<span class='error'>Registration form couldn't load!</span>\" + container.innerHTML;\r\n}", "function returnErrorMessage() {\n $('.result-line').text(\"That is not a valid response\");\n }", "function ErrorIPHtml() {\n return <ErrorIPCss>Please enter a valid IP Address</ErrorIPCss>;\n }", "renderAlert() {\n if (this.props.errorMessage) {\n return (\n <div className=\"alert alert-danger\">\n <strong>Oops!</strong> {this.props.errorMessage}\n </div>\n );\n }\n }", "function showError(error)\n{\n notificationElement.style.display=\"block\";\n notificationElement.innerHTML=`<p> ${error.message}</p>`;\n}", "function handleErrorMessage(status) {\n $('#errorSection').show();\n let backgroundColor = document.getElementById('errorSection');\n backgroundColor.className = 'red'; // error message background color is red\n if (status === 400) {\n $(\"#errorCode\").text(status);\n $(\"#errorMessage\").text(\"Bad Request Error\");\n } else if (status === 404) {\n $(\"#errorCode\").text(\"Word Not Found\");\n $(\"#errorMessage\").text(\"Try another word\");\n backgroundColor.className = '';\n backgroundColor.className = 'yellow'; // only this one is yellow because it is just not found word\n } else if (status === 500) {\n $(\"#errorCode\").text(status);\n $(\"#errorMessage\").text(\"Internal Server Error\");\n } else {\n // handle unkown error response\n $(\"#errorCode\").text(status);\n $(\"#errorMessage\").text(\"OOPS, Unkown Error\");\n }\n}", "function displayError() {\n errorMsgContainer.innerHTML = \"\";\n errorMsg.textContent = \"No results were found.\";\n errorMsgContainer.appendChild(errorMsg);\n studentUL.appendChild(errorMsgContainer);\n }", "function showError(error){\n notificationElement.style.display = \"block\";\n notificationElement.innerHTML = `<p> ${error.message} </p>`;\n }", "render() {\r\n if (this.state.hasErrored) {\r\n return <ErrorImageOverlay>\r\n <ErrorImageContainer imageUrl='https://i.imgur.com/lKJiT77.png'/>\r\n <ErrorImageText>Sorry, a dog ate this page. It's gone.</ErrorImageText>\r\n </ErrorImageOverlay>;\r\n }\r\n\r\n return this.props.children;\r\n }", "renderWarnings(data) {\n var j, len, output, w, warnings;\n warnings = this.getWarnings(data);\n output = [];\n for (j = 0, len = warnings.length; j < len; j++) {\n w = warnings[j];\n if (w.type === 'rain') {\n output.push(`<li class=\"warning rain-${w.level}\">${this.renderIcon('wi-rain')}</li>`);\n } else if (w.type === 'wind') {\n output.push(`<li class=\"warning\">${this.renderIcon(this.getWindForceIconClass(data))}</li>`);\n }\n }\n if (output.length) {\n return `<ul class=\"warnings\">\\n ${output.join('')}\\n</ul>`;\n } else {\n return \"\";\n }\n }", "function userFacingMessage(error) {\n return error.type\n ? error.message\n : \"An error occurred, developers have been alerted\";\n}", "function showErrorMessage(msg) { }", "showError(){\n if(this.state.error.payload !== \"\")\n {\n return(\n <small style={{ color: \"red\", margin:\"auto\"} }> {this.state.error.payload} </small>\n\n )}\n }", "function userFacingMessage(error) {\n return error.type\n ? error.message\n : 'An error occurred, developers have been alerted';\n}", "function showError(error){\n togglediv.style.display=\"block\";\n dateElement.style.display=\"none\";\n notificationElement.style.display=\"block\";\n notificationElement.innerHTML = `<p>${error.message}</p>`;\n iconElement.innerHTML = `<img src=\"icons/unknown.png\" alt=\"\"/>`;\n tempElement.innerHTML = `-°<span>C</span>`;\n descElement.innerHTML = `<p>-</p>`;\n locationElement.style.display=\"none\";\n\n temp_minElement.innerHTML = `-°<span>C</span>`;\n temp_maxElement.innerHTML = `-°<span>C</span>`;\n humidityElement.innerHTML = `-`;\n pressureElement.innerHTML = `-`;\n windElement.innerHTML = `-`;\n\n forecastdiv.style.display=\"none\";\n\n}", "function errorLocal() {\n errorMessage.className = errorText.errorLocalisation.msgClassName;\n errorMessage.innerHTML = errorText.errorLocalisation.msg;\n }", "function error(msg) {\n\t\t// Update the status DOM object with the error message\n\t\tstatus.innerHTML = typeof msg === 'string' ? msg : 'Failed!';\n\t\tstatus.className = 'alert alert-error';\n\t}", "function showError(error){ \n notificationElement.style.display = \"block\";\n notificationElement.innerHTML = `<p> ${error.message}</p>`;\n}", "function showError(error){\n notificationElement.style.display = \"block\";\n notificationElement.innerHTML = `<p> ${error.message} </p>`;\n}", "function showErrorMessage(message){\r\n\tPNotify.removeAll();\r\n\tvar stack_topleft = {\"dir1\": \"down\", \"dir2\": \"left\", \"push\": \"top\"};\r\n\tnew PNotify({\r\n\t type: 'error',\r\n\t title: 'Error',\r\n\t text: message,\r\n\t addclass: \"stack_topleft\",\r\n\t stack: stack_topleft\r\n\t});\r\n}", "function buildErrorMsgBox(text) {\n return '<div class=\"ui-state-error ui-corner-all search-status-messages\" id=\"error_message\"><p><span class=\"ui-icon ui-icon-alert status-icon\"></span>' + text + '</p></div>';\n}", "function showError (error){\n notificationElement.style.display = \"block\";\n notificationElement.innerHTML = `<p> ${error.message}</>`;\n\n}", "renderErrors() {\n let notAccepted = '';\n if (this.state.notAcceptedFileType.length > 0) {\n notAccepted = this.state.notAcceptedFileType.map((error, index) => {\n return (\n <div className={`errorMessage${this.props.errorClass}`} key={index} style={this.props.errorStyle}>\n * {error} {this.props.fileTypeError}\n </div>\n );\n });\n }\n if (this.state.notAcceptedFileSize.length > 0) {\n notAccepted = this.state.notAcceptedFileSize.map((error, index) => {\n return (\n <div className={`errorMessage${this.props.errorClass}`} key={index} style={this.props.errorStyle}>\n * {error} {this.props.fileSizeError}\n </div>\n );\n });\n }\n return notAccepted;\n }", "function userFacingMessage(error) {\n return error.type ? error.message : 'Something went wrong.';\n}", "hideErrorMessage() {\n this.setState({\n isDanger: false,\n iconColor: Colors.defaultGrey\n });\n }", "function displayError(message) {\n errorElem.textContent = message;\n errorElem.classList.add('show');\n }", "function showError(error) {\n switch(error.code) {\n case error.PERMISSION_DENIED:\n x.innerHTML = \"User denied the request for Geolocation.\"\n break;\n case error.POSITION_UNAVAILABLE:\n x.innerHTML = \"Location information is unavailable.\"\n break;\n case error.TIMEOUT:\n x.innerHTML = \"The request to get user location timed out.\"\n break;\n case error.UNKNOWN_ERROR:\n x.innerHTML = \"An unknown error occurred.\"\n break;\n }\n}", "function error() {\r\n\t\tlet error = document.createElement(\"h3\");\r\n\t\terror.innerHTML = \"Sorry there are no recipes with \"+errorName+\", try again!\";\r\n\t\tdocument.getElementById(\"error\").appendChild(error);\r\n\t}", "function showError(error) {\r\n notificationElement.style.display = \"block\";\r\n notificationElement.innerHTML = `<p> ${error.message} </p>`;\r\n}", "function displayError (errMsg) {\n $(\"#error-msg\").text(errMsg);\n $(\"#url-form,#loading,#content\").hide();\n $(\"#error\").show();\n}", "function showError(error) {\n\tif (error === false) {\n\t\t$('[id*=\"_error\"]').html('');\n\t} else {\n\t\t$('#' + error.extra.responsibleElement + '_error').html(\"Invalid Valid\");\n\t}\n}", "function showErr(err){\n\tconst outputElem = $('#results');\n\tconst errMsg = (\n\t\t\t`<p class=font>No results found.</p>`\n\t\t);\n\toutputElem.html(errMsg);\n}", "function displayErrorMsg(msg, opts) {\n clearErrorMsg();\n\n var options = opts !== undefined ? opts : {\n messagePanel: instancePage.errorPanel,\n standardTemplate: true\n };\n\n AlmCommon.showError(msg, options);\n\n if ($(instancePage.detailsPanel) !== undefined) {\n styleErrorMessages();\n }\n }", "function printErrorMessage() {\n $(\"#error-message\").append(\n \"<label class='container-fluid mt-5 text-center text-danger h3'>Group Code Does Not Exist!</label>\"\n );\n}", "function showError(error) {\n\tvar msg = \"\";\n\tswitch(error.code) {\n\t\tcase error.PERMISSION_DENIED:\n\t\t\tmsg = \"User denied the request for Geolocation.\"\n\t\t\tbreak;\n\t\tcase error.POSITION_UNAVAILABLE:\n\t\t\tmsg = \"Location information is unavailable.\"\n\t\t\tbreak;\n\t\tcase error.TIMEOUT:\n\t\t\tmsg = \"The request to get user location timed out.\"\n\t\t\tbreak;\n\t\tcase error.UNKNOWN_ERROR:\n\t\t\tmsg = \"An unknown error occurred.\"\n\t\t\tbreak;\n\t}\n\tdocument.getElementById(\"status\").innerHTML = msg;\n}", "function displayError(error) {\n console.log(error);\n console.log(\"Error --> \" + error);\n // hiding all views\n hideAll();\n // reset menu links\n enableAll();\n //displays panel\n document.querySelector(\"#error-view\").classList.remove(\"collapse\")\n // error message\n document.querySelector(\"#error\").innerHTML = \"Message: \" + error;\n ;\n}", "function errorMessage (text){\n resultLine.textContent = `Error : ${text}`;\n calcScreen.classList.add('error');\n }", "showErrorMessage(error) {\n this.showMessage(\"Something is wrong\", error, \"error\");\n this.isSpinnerShow = false;\n this.disableSaveButton = false;\n }", "function handleError(span, counter) {\n var errMsg = `Login error! Please try again! You have ${5 - counter} Tries left!`;\n span.innerHTML = errMsg;\n span.style = 'display:block;';\n resetError(span);\n return errMsg;\n}" ]
[ "0.6972556", "0.6655608", "0.664206", "0.66191643", "0.6601564", "0.6586565", "0.6570012", "0.65548104", "0.6530104", "0.6506649", "0.65011764", "0.6478161", "0.6466833", "0.6366441", "0.63482183", "0.63067216", "0.6303571", "0.62840676", "0.6276389", "0.627094", "0.6239385", "0.6222073", "0.6213477", "0.621092", "0.6203281", "0.6201236", "0.61938167", "0.61921626", "0.6178175", "0.6174676", "0.61690426", "0.6163396", "0.61631435", "0.61538523", "0.6118778", "0.6098942", "0.60988647", "0.60952944", "0.608331", "0.60818505", "0.60755765", "0.60749376", "0.6053525", "0.6042401", "0.60404", "0.6038535", "0.6033765", "0.603136", "0.6024897", "0.6021231", "0.6020351", "0.60089827", "0.6002267", "0.59857774", "0.59816074", "0.59748214", "0.59708726", "0.59696454", "0.5969385", "0.5966472", "0.5964173", "0.59624743", "0.5960953", "0.5945669", "0.5945161", "0.59397906", "0.5936715", "0.5926795", "0.59241664", "0.59154576", "0.5912755", "0.59118724", "0.5908184", "0.59069204", "0.59004223", "0.58961797", "0.5895847", "0.5888369", "0.5887359", "0.58871686", "0.58841944", "0.5883346", "0.5881456", "0.58748466", "0.58566713", "0.5856418", "0.5855744", "0.5851937", "0.5851253", "0.5850114", "0.584618", "0.5844623", "0.58433926", "0.5841507", "0.5841395", "0.5841069", "0.5837918", "0.58377564", "0.58376676", "0.58316445" ]
0.6319255
15
Normal function This works when we have to call the function again and again here our variables are safe that they are immutable so the variables can't be accessed
function addTogether() { var x = 20; var y = 20; var answer = x + y; console.log('Normal function call executed') console.log(answer); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "transient protected internal function m189() {}", "private public function m246() {}", "transient private protected internal function m182() {}", "static private internal function m121() {}", "transient final protected internal function m174() {}", "mutate() {}", "mutate() {}", "private internal function m248() {}", "transient private internal function m185() {}", "function ourReuseableFunction() {\n console.log(\"Tony\", \"Obriku\");\n\n}", "function copyUserDataI(){\n var somethingChanged = false\n //var somevar = 1\n return copyUserData([obj], self.countries)\n //const xx = function(){ console.log('hi', somevar)}//test1\n //return xx\n //console.log( typeof test1)\n //return copyUserData//([obj], self.countries)\n }", "function accessesingData2() {\n\n}", "function accessesingData2() {\n\n}", "static transient final private internal function m43() {}", "static transient private protected internal function m55() {}", "static private protected public internal function m117() {}", "transient private protected public internal function m181() {}", "function Z() {\n var b = 10;\n function T() {\n console.log(\"B:\", b); // will give output of 100 cuz before return it value change over refernece if we access it anywhere it will give new data\n }\n b = 100;\n return T;\n }", "function exaqmple5() {\n var b = 1;\n // b = 10 // * Error:e b is read-only\n}", "static private protected internal function m118() {}", "function TempVars() {\n}", "static transient private public function m56() {}", "function nonewFun() {}", "transient final private protected internal function m167() {}", "function funcB() {\n let a = b = 0;\n a++;\n return a;\n}", "transient private public function m183() {}", "function\nmap0$fopr_2343_(a5x1)\n{\nlet xtmp57;\n;\n{\nxtmp57 = a1x2(a5x1);\n}\n;\nreturn xtmp57;\n}", "function a1() {\n let x = \"Alles\";\n console.log(x);\n func2();\n console.log(x);\n func1();\n console.log(x);\n console.log(\"Logo!\");\n }", "static transient final protected internal function m47() {}", "function w(){this.a={}}", "function squareIt(arg){ //the function COPIES in its value\n x=x*x; //and alters the COPIED value\n return x;\n}", "function func1(){\n var hey = 10;\n var hey = 20; // BAD PRACTICE!\n console.log(hey);\n }", "function fn() {\n\t\t }", "function fuction() {\n\n}", "function doSmth() {\n age2 = 30;\n}", "function _____SHARED_functions_____(){}", "function accessesingData1() {\n\n}", "function accessesingData1() {\n\n}", "calcVars () {}", "function moreLearning() {\r\n alert(\r\n \"as long as we make a copy of the original list [['a','b'],['c','d'],['e','f']] passed into joinRecur or innerRecur then passed that copied version into the func call of secondInnerRecur\"\r\n );\r\n alert(\r\n \"our original list [['a','b'],['c','d'],['e','f']] will not be mutated \"\r\n );\r\n alert(\r\n \"every time we call innerRecur it will reset this variable: var copyOfList = innerList.slice(); or var copyOfList = list.slice();\"\r\n );\r\n}", "transient final private protected public internal function m166() {}", "function f() {\n /** Function is modifing the value of i and perform side effect to change the assigment of i \n * so if we rely value of i then we might get into trouble */ \n i = i + 1;\n return i\n }", "static transient final private protected internal function m40() {}", "function addTwo(x) {\n x = x + 2;\n return x;\n\n}", "transient final private internal function m170() {}", "function kI(){this.aa={}}", "function funcD1() {\n d = 1;\n}", "static transient final private public internal function m42() {}", "static transient final protected function m44() {}", "function secretNumber(){\n let num = 0;\n\n function addOne(){\n // return num += 1;\n return ++num;\n }\n\n return addOne;\n}", "updateAllVarCache() {\n const { delta: { varLastCalcIndex }, updateVariable } = this;\n updateVariable(varLastCalcIndex);\n }", "protected internal function m252() {}", "function b(a){le=a}", "function b(a){le=a}", "function b(a){le=a}", "function b(a){le=a}", "static transient private internal function m58() {}", "function b(a){od=a}", "function b(a){od=a}", "function b(a){od=a}", "function b(a){od=a}", "function b(a){od=a}", "function b(a){od=a}", "function b(a){od=a}", "function b(a){od=a}", "function b(a){od=a}", "function b(a){od=a}", "function b(a){od=a}", "function b(a){od=a}", "function foo() {\n a = a + 1;\n}", "static transient final protected public internal function m46() {}", "static transient final private public function m41() {}", "function duplicarTreinta(){\n return 30*2;\n}", "transient final private public function m168() {}", "function x(){this.a={}}", "function x(){this.a={}}", "function x(){this.a={}}", "function funcD1() {\n d = 1;\n}", "function StupidBug() {}", "static transient private protected public internal function m54() {}", "function constObjects() {\n const name = {\n person: \"reefath\"\n }\n \n name.person = \"tesla\"\n \n return name.person;\n}", "function funcB() {\n let a = b = 0;\n a++;\n return a;\n}", "function funcB() {\n let a = b = 0;\n a++;\n return a;\n}", "function effectFunctionVariableSetupFunction (effectFunction, localVariables, sessionRef, levelRef, entityRef, useVariables, isVariableSetter) {\r\n\t\t// This is the old version\r\n\t\t// effectFunction(localVariables, sessionRef, levelRef, entityRef, useVariables);\r\n\r\n\t\t// New approach: Figure out variables first\r\n\t\tvar finalVariableData = [];\r\n\t\tfor (var i = 0; i < useVariables.length; i++) {\r\n\t\t\t// Get the variable info\r\n\t\t\tvar variableInfo = GetVariableByID(entityRef.variables, useVariables[i]);\r\n\t\t\tvar variableData = undefined;\r\n\t\t\t// If local variable, get from local variables\r\n\t\t\t// (So far, just a single local variable is possible.)\r\n\t\t\t// (Will later need to figure out further info)\r\n\t\t\tif (variableInfo.local === true)\r\n\t\t\t{\r\n\t\t\t\tvariableData = localVariables;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// Get the actual data for that variable.\r\n\t\t\t\t// (Different process for different types)\r\n\t\t\t\tswitch (variableInfo.type) {\r\n\t\t\t\t\tcase \"string\":\r\n\t\t\t\t\t\tvariableData = variableInfo.value;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"number\":\r\n\t\t\t\t\t\tvariableData = variableInfo.value;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\t\tvariableData = variableInfo.value;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"entity\":\r\n\t\t\t\t\t\tvariableData = levelRef.GetEntityByID(variableInfo.value);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"area\":\r\n\t\t\t\t\t\tvariableData = variableInfo.value;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"level\":\r\n\t\t\t\t\t\tvariableData = sessionRef.GetLevelByID(variableInfo.value)\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"tile\":\r\n\t\t\t\t\t\tvariableData = variableInfo.value;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"coordinates\":\r\n\t\t\t\t\t\tvariableData = variableInfo.value;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfinalVariableData[i] = variableData;\r\n\t\t}\r\n\r\n\t\tif (isVariableSetter) {\r\n\t\t\t// Need to pass variable ID's so variable's value can be changed\r\n\t\t\teffectFunction(sessionRef, levelRef, entityRef, finalVariableData, useVariables);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// Normal, just pass values\r\n\t\t\t// run the effectFunction with the now-already-setup variable data\r\n\t\t\teffectFunction(sessionRef, levelRef, entityRef, finalVariableData);\r\n\t\t}\r\n\t}", "function func1(){\n\tif (true){\n\t\tlet tmp = 123;\n\t}\n\tconsole.log(\"func1 tmp\", tmp);\n}", "function funcD1() {\n d = 1;\n}", "function funcD1() {\n d = 1;\n}", "function subtractVars() {\n\t\n}", "function G(a){va=a,C()}", "function fnal()\r\n{\r\n\r\n//assigning the fmark to a value exam(75)+crsmark(40).\r\n\r\nlet fmark = exam(75)+crsmark(40)\r\nconsole.log(fmark)\r\n\r\n}", "function b(a){md=a}", "function b(a){md=a}", "function b(a){md=a}", "function b(a){md=a}", "function b(a){md=a}", "function b(a){md=a}", "function bar() {\n b = a;\n}", "function TMP(){return;}", "function TMP(){return;}", "function main() {\n let a = 1;\n let b = 2;\n let c = -3;\n mystery(a,b,c);\n mystery(c,4,a);\n mystery(a + b, b + c, c + a);\n}", "static final private protected public internal function m102() {}" ]
[ "0.61011446", "0.6052135", "0.5941378", "0.58603555", "0.5822046", "0.5805021", "0.5805021", "0.5804598", "0.5803815", "0.57589203", "0.5728567", "0.5702517", "0.5702517", "0.56998575", "0.56721276", "0.56392086", "0.5604708", "0.56006026", "0.55686533", "0.55584663", "0.5557059", "0.5552757", "0.5550501", "0.55495703", "0.5546245", "0.5535439", "0.5518198", "0.549746", "0.5463473", "0.54482114", "0.54479265", "0.5446516", "0.5443308", "0.5436353", "0.5430189", "0.54288507", "0.5426331", "0.5426331", "0.5425187", "0.54174787", "0.54108155", "0.539507", "0.5375975", "0.53716105", "0.53632694", "0.53605694", "0.5351641", "0.5351641", "0.5345278", "0.53239447", "0.5316486", "0.5309554", "0.53065455", "0.53065455", "0.53065455", "0.53065455", "0.5305522", "0.52954066", "0.52954066", "0.52954066", "0.52954066", "0.52954066", "0.52954066", "0.52954066", "0.52954066", "0.52954066", "0.52954066", "0.52954066", "0.52954066", "0.5291204", "0.52886015", "0.5286485", "0.5284012", "0.5281531", "0.52721155", "0.52721155", "0.52721155", "0.526999", "0.526673", "0.5266266", "0.52561164", "0.52502584", "0.52502584", "0.5249702", "0.52487266", "0.52417946", "0.52417946", "0.5237861", "0.5236718", "0.52338916", "0.52320707", "0.52320707", "0.52320707", "0.52320707", "0.52320707", "0.52320707", "0.522923", "0.5211334", "0.5211334", "0.5209715", "0.52094555" ]
0.0
-1
These next 2 functions are in charge of displayed "correct" or "incorrect," depending on the users input. If the user selects the correct answer, their score goes up by one (b++).
function q1c() { message003.innerHTML = "Correct."; message002.innerHTML = ""; score001.innerHTML = b++; message004.innerHTML = "<button class=buttons002 onclick=next001()>Next</button>"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function answerIsCorrect () {\r\n feedbackForCorrect();\r\n updateScore();\r\n}", "function submitAnswer(){\r\n\ty = document.getElementById(\"qans\").value\r\n\tvar yy=y.toUpperCase();\r\n\tx = document.getElementById(\"question\").value\r\n \r\n\tif (ans===1){\r\n\t\ty = document.getElementById(\"qans\").value\r\n\t\tif(yy===\"B\"){\r\n\t\t\tcorrectAnswer();\r\n\t\t}\r\n\t\telse {\r\n\t\t\twrongAnswer();\r\n\t\t}\r\n\t\tdocument.view.qscore.value=score\r\n\t\tdocument.view.streakscore.value=current_streak\r\n\t}\r\n\telse if (ans===2){ \r\n\t\ty = document.getElementById(\"qans\").value\r\n\t\tif(yy===\"A\"){\r\n\t\t\tcorrectAnswer();\r\n\t\t}\r\n\t\telse {\r\n\t\t\twrongAnswer();\r\n\t\t}\r\n\t\tdocument.view.qscore.value=score\r\n\t\tdocument.view.streakscore.value=current_streak\r\n\t}\r\n\telse if (ans===3){ \r\n\t\ty = document.getElementById(\"qans\").value\r\n\t\tif(yy===\"C\"){\r\n\t\t\tcorrectAnswer();\r\n\t\t}\r\n\t\telse {\r\n\t\t\twrongAnswer();\r\n\t\t}\r\n\t\tdocument.view.qscore.value=score\r\n\t\tdocument.view.streakscore.value=current_streak\r\n\t}\r\n\telse if (ans===4){ \r\n\t\ty = document.getElementById(\"qans\").value\r\n\t\tif(yy===\"D\"){\r\n\t\t\tcorrectAnswer();\r\n\t\t}\r\n\t\telse {\r\n\t\t\twrongAnswer();\r\n\t\t}\r\n\t\tdocument.view.qscore.value=score\r\n\t\tdocument.view.streakscore.value=current_streak\r\n\t}\r\n\telse if (ans===5){ \r\n\t\ty = document.getElementById(\"qans\").value\r\n\t\tif(yy===\"D\"){\r\n\t\t\tcorrectAnswer();\r\n\t\t}\r\n\t\telse {\r\n\t\t\twrongAnswer();\r\n\t\t}\r\n\t\tdocument.view.qscore.value=score\r\n\t\tdocument.view.streakscore.value=current_streak\r\n\t}\r\n\telse if (ans===6){ \r\n\t\ty = document.getElementById(\"qans\").value\r\n\t\tif(yy===\"B\"){\r\n\t\t\tcorrectAnswer();\r\n\t\t}\r\n\t\telse {\r\n\t\t\twrongAnswer();\r\n\t\t}\r\n\t\tdocument.view.qscore.value=score\r\n\t\tdocument.view.streakscore.value=current_streak\r\n\t}\r\n\telse if (ans===7){ \r\n\t\ty = document.getElementById(\"qans\").value\r\n\t\tif(yy===\"B\"){\r\n\t\t\tcorrectAnswer();\r\n\t\t}\r\n\t\telse {\r\n\t\t\twrongAnswer();\r\n\t\t}\r\n\t\tdocument.view.qscore.value=score\r\n\t\tdocument.view.streakscore.value=current_streak\r\n\t}\r\n\telse if (ans===8){ \r\n\t\ty = document.getElementById(\"qans\").value;\r\n\t\tif(yy===\"D\"){\r\n\t\t\tcorrectAnswer();\r\n\t\t}\r\n\t\telse {\r\n\t\t\twrongAnswer();\r\n\t\t}\r\n\t\tdocument.view.qscore.value=score\r\n\t\tdocument.view.streakscore.value=current_streak\r\n\t}\r\n\telse if (ans===9){ \r\n\t\ty = document.getElementById(\"qans\").value\r\n\t\tif(yy===\"C\"){\r\n\t\t\tcorrectAnswer();\r\n\t\t}\r\n\t\telse {\r\n\t\t\twrongAnswer();\r\n\t\t}\r\n\t\tdocument.view.qscore.value=score\r\n\t\tdocument.view.streakscore.value=current_streak\r\n\t}\r\n\telse if (ans===10){ \r\n\t\ty = document.getElementById(\"qans\").value\r\n\t\tif(yy===\"B\"){\r\n\t\t\tcorrectAnswer();\r\n\t\t}\r\n\t\telse {\r\n\t\t\twrongAnswer();\r\n\t\t}\r\n\t\tdocument.view.qscore.value=score\r\n\t\tdocument.view.streakscore.value=current_streak\r\n\t}\r\n\telse if (ans===11){ \r\n\t\ty = document.getElementById(\"qans\").value\r\n\t\tif(yy===\"A\"){\r\n\t\t\tcorrectAnswer();\r\n\t\t}\r\n\t\telse {\r\n\t\t\twrongAnswer();\r\n\t\t}\r\n\t\tdocument.view.qscore.value=score\r\n\t\tdocument.view.streakscore.value=current_streak\r\n\t}\r\n\telse if (ans===12){ \r\n\t\ty = document.getElementById(\"qans\").value\r\n\t\tif(yy===\"A\"){\r\n\t\t\tcorrectAnswer();\r\n\t\t}\r\n\t\telse {\r\n\t\t\twrongAnswer();\r\n\t\t}\r\n\t\tdocument.view.qscore.value=score\r\n\t\tdocument.view.streakscore.value=current_streak\r\n\t}\r\n\telse if (ans===13){ \r\n\t\ty = document.getElementById(\"qans\").value\r\n\t\tif(yy===\"C\"){\r\n\t\t\tcorrectAnswer();\r\n\t\t}\r\n\t\telse {\r\n\t\t\twrongAnswer();\r\n\t\t}\r\n\t\tdocument.view.qscore.value=score\r\n\t\tdocument.view.streakscore.value=current_streak\r\n\t}\r\n\telse if (ans===14){ \r\n\t\ty = document.getElementById(\"qans\").value\r\n\t\tif(yy===\"D\"){\r\n\t\t\tcorrectAnswer();\r\n\t\t}\r\n\t\telse {\r\n\t\t\twrongAnswer();\r\n\t\t}\r\n\t\tdocument.view.qscore.value=score\r\n\t\tdocument.view.streakscore.value=current_streak\r\n\t}\r\n\telse if (ans===15){ \r\n\t\ty = document.getElementById(\"qans\").value\r\n\t\tif(yy===\"B\"){\r\n\t\t\tcorrectAnswer();\r\n\t\t}\r\n\t\telse {\r\n\t\t\twrongAnswer();\r\n\t\t}\r\n\t\tdocument.view.qscore.value=score\r\n\t\tdocument.view.streakscore.value=current_streak\r\n\t}\r\n\telse if (ans===16){ \r\n\t\ty = document.getElementById(\"qans\").value\r\n\t\tif(yy===\"D\"){\r\n\t\t\tcorrectAnswer();\r\n\t\t}\r\n\t\telse {\r\n\t\t\twrongAnswer();\r\n\t\t}\r\n\t\tdocument.view.qscore.value=score\r\n\t\tdocument.view.streakscore.value=current_streak\r\n\r\n\t\t// as this is the last question in the quiz, update the text of \"Next Question\" to make it more appropriate\r\n\t\tdocument.view.go.value=\"End Quiz...\"\r\n\t}\r\n\r\n\t// enable selection of \"Next Question\"\r\n\tdocument.getElementById(\"go_id\").disabled = false\r\n\tdocument.getElementById(\"go_id\").style.opacity = \"1\"\r\n\r\n\t// disable selection of \"Submit Answer\" to avoid logic issues\r\n\tdocument.getElementById(\"user_submit\").disabled = true\r\n\tdocument.getElementById(\"user_submit\").style.opacity = \"0.5\"\r\n\r\n\t// update var ans\r\n\tans++; \r\n}", "function clickedCorrect() {\n $(\"#correctInput\").show();\n $(\"#wrongInput\").hide();\n if (clickedCorrect) {\n yourScore +=10;\n };\n }", "function whenCorrect() {\n //clear container class html\n //display \"CORRECT!\"\n $(\".container\").html(\"<h2>CORRECT!<h2>\");\n //display correct answer\n displayCorrect();\n //increase score\n correct++;\n answered++;\n }", "function correctAnswer(){\n\tscore += addScore(time);\n\tupdateScore();\n if(++level == 10){\n difficulty = 1;\n } else if(level == 20){\n difficulty = 2;\n }\n document.getElementById('level').innerHTML = \"Level : \" + level;\n\tresetComponent();\n}", "function checkAnswer() {\n\t\tif (answerChoice == currentQuestion.rightAnswer) {\n\t\t\t$(\"#hint\").text(currentQuestion.congratulations);\n\t\t\tcurrentQuestion.correct = true;\n\t\t\tupdateScore();\n\t\t} else {\n\t\t\tconsole.log('incorrect');\n\t\t\t$(\"#hint\").text(currentQuestion.sorry);\n\t\t};\n\t}", "function handleScore(choice, correctAnswer){\n if (choice === correctAnswer){\n triviaScore += 10;\n } else {\n triviaScore -= 5;\n }\n scoreSpan.innerText = triviaScore;\n }", "function checkAnswer () {\n console.log(userSelected.text);\n\n if (userSelected === questions[i].correctAnswer) {\n score ++;\n $(\"#score\").append(score);\n $(\"#answerCheck\").append(questions[i].rightReply);\n i++;\n } else {\n $(\"#answerCheck\").append(questions[i].wrongReply);\n i++;\n } \n }", "function checkAnswer(selected){\n let rightAnswer = questionsArray[questionCounter].correctAnswer;\n \n if(selected === rightAnswer){\n score++;\n displayPopup(true, rightAnswer);\n } \n else{\n displayPopup(false, rightAnswer);\n }\n}", "function correct() {\n score +=20\n nextQuestion();\n}", "function checkAnswer(answer) {\n if (answer[userAnswer].isCorrect) {\n console.log('Your answer is correct! :D');\n score++;\n } else {\n console.log('Your answer is incorrect! D:');\n if (score > 0) {\n score--;\n }\n }\n}", "function checkAnswer() {\n // Swtich Case to get the correct answer for each question\n var correctAnswer;\n switch (qNum) {\n case 0: // Get the question number that the user is on\n correctAnswer = 1; // correct answer for this question\n break; // break out of switch case if user is on this question\n case 1:\n correctAnswer = 2;\n break;\n case 2:\n correctAnswer = 1;\n break;\n case 3:\n correctAnswer = 4;\n break;\n case 4:\n correctAnswer = 2;\n break;\n case 5:\n correctAnswer = 0;\n break;\n case 6:\n correctAnswer = 1;\n break;\n case 7:\n correctAnswer = 4;\n break;\n case 8:\n correctAnswer = 1;\n break;\n case 9:\n correctAnswer = 3;\n break;\n default:\n console.log(\"Fatal Error: Hmm, my program seems to have broken. I'll be honest, I have no idea how this message would ever appear...\");\n }\n // Check the user's answer against the correct answer\n if (parseInt(userAns) === parseInt(correctAnswer)) {\n score += 10;\n qNum++;\n nextQuestion();\n } else {\n timeLeft -= 10;\n qNum++;\n nextQuestion();\n }\n}", "function checkAnswer(e) {\n // targets user selection\n var answer = e.target.innerText;\n console.log(answer);\n\n //cannot set answer = to question correct answer\n // !!!!! NEED HELP WITH THIS !!!!\n if (answer === questions[qIndex].correct) {\n userScore++;\n scoreBox.innerHTML = `<h2>Score: ${userScore}</h2>`;\n console.log(userScore);\n // if answer correct, add one to question index\n qIndex++;\n // run questionCycle again prompting new question\n questionCycle();\n // box for user score have it update everytime this happens\n } else {\n // decreases timer by one second if user selects wrong answer\n timerCount = timerCount - 5;\n qIndex++;\n scoreBox.innerHTML = `<h2>Score: ${userScore}</h2>`;\n // prompts new question if answered incorrectly\n questionCycle();\n }\n}", "function checkAnswer() {\n const currentQuestion = questions[questionIndex];\n const correctChoice = currentQuestion[\"choices\"][0];\n const selector = document.querySelector(`input[name=question${questionIndex}]:checked`);\n let userAnswer = \"\";\n if (selector !== null)\n userAnswer = currentQuestion[\"choices\"][selector.value];\n\n if (userAnswer === correctChoice) {\n swal(\"Correct!\", `${currentQuestion.explanation}`, \"success\");\n score++;\n\tif(score != maxScore)\n\t yaySound.play();\n movePlayerForward();\n } else {\n swal(\"Incorrect\", `${currentQuestion.explanation}`, \"warning\");\n n_score++;\n\tif(n_score != minScore)\n\t noSound.play();\n movePlayerBackward();\n }\n console.log(`Score is now ${score}`);\n\n if (score == maxScore) {\n winSound.play(); // terminate game upon reaching a certain score\n swal(\"Congratulations! \\n you won! \\n Try a new game again\");\n endGame();\n return;\n }\n\n if (n_score == minScore) {\n GameoverSound.play();\n swal(\"Game Over! \\n Try a new game\");\n endGame();\n return;\n }\n\n questionIndex = (questionIndex + 1) % questions.length;\n displayQuestion();\n}", "function scoreCount() {\n for (var i = 0; i < userSelection.length; i++) {\n // If user selected an answer\n if (userSelection[i].checked) {\n // check if what the user select is equal to the array answers\n\n if (answers.indexOf(userSelection[i].value) !== -1) {\n correctAnswer++;\n } else {\n incorrectAnswer++;\n }\n }\n }\n //check how many questions were blank by subtracting the if/else values from above from the total number of questions.\n\n var totalAnswered = correctAnswer + incorrectAnswer;\n\n if (totalAnswered !== totalQuestions) {\n blank = totalQuestions - totalAnswered;\n }\n\n $(\"#correct\").html(\" \" + correctAnswer);\n $(\"#incorrect\").html(\" \" + incorrectAnswer);\n $(\"#blank\").html(\" \" + blank);\n } //end scoreCount", "function checkAnswer(selectedAnswer) {\n const correctAnswer = quiz[currentQuestion].answer;\n \n if (selectedAnswer === correctAnswer) {\n score++;\n }\n \n currentQuestion++;\n \n if (currentQuestion < quiz.length) {\n displayQuestion();\n } else {\n showResult();\n }\n }", "function checkAnswer(answer) {\n correctAns = quizQuestions[currentQuestionIndex].correctAnswer;\n\n // if the argument inside the function is the correct answer for that question & current question is not the final question \n // add +1 to the score\n if (answer === correctAns && currentQuestionIndex !== finalQuestionIndex) {\n // add +1 to the score\n score++;\n\n // alert the user they're correct\n alert(\"Correct!\");\n\n // jump to the next question\n currentQuestionIndex++;\n\n // generate the quiz again but current index updating \n generateQuiz();\n }\n\n // else if the answer is not correct and current question is not the final question \n // jump to the next question \n // alert the user they're wrong\n else if (answer !== correctAns && currentQuestionIndex !== finalQuestionIndex) {\n // alert the user they're wrong\n alert(\"Wrong!\");\n\n // jump to the next question\n currentQuestionIndex++;\n\n // generate the quiz again but current index updating\n generateQuiz();\n }\n // if the current question is the last question ask the question and then show the final score \n else {\n userScore();\n }\n}", "function userSelection() {\n stopCountdown();\n if ($(this).attr(\"data-name\") == correctAnswers[questionSelector]) {\n rightWrong = true;\n correct++;\n var newScore = score += points;\n $(\"#score\").text(newScore);\n } else {\n incorrect++ \n }\n showResult();\n nextQuestion();\n }", "function checkAnswer(){\n trueAnswer = returnCorrectAnswer();\n userAnswer = getInput();\n// this if statement is stating if user inputs the right answer what happens and if not what happens\n if(userAnswer === trueAnswer){\n var messageCorrect = array[global_index].messageCorrect;\n score ++;\n swal({\n title: messageCorrect,\n text: \"You got \" + score + \" out of 8 correct.\",\n });\n }\n else{\n var messageIncorrect = array[global_index].messageIncorrect;\n swal({\n title: messageIncorrect,\n text: \"You got \" + score + \" out of 8 correct.\",\n });\n }\n }", "function answerIsCorrect() {\n correctAnswerFeedback();\n nextQuestion();\n addToScore();\n}", "function checkAnswer() {\n if (userAnswer === currentQuestion.correctAnswer) {\n // add to the number of correct answers\n points++;\n\n // color the answers green\n answerContainers[questionNumber].style.color = \"darkgreen\";\n }\n // if answer is wrong or blank\n else {\n // color the answers red\n answerContainers[questionNumber].style.color = \"red\";\n }\n }", "function answerIsCorrect() {\n let oldScore = parseInt(document.getElementById('correct').innerText);\n document.getElementById('correct').innerText = ++oldScore;\n}", "function incrementUserScore() {\n score++;\n incrementCorrectAnswers(score);\n}", "function checkAnswer(question, answer) {\n console.log(\"question: \", question);\n console.log(\"answer: \", answer);\n let correctAnswer = questions[question].answer;\n let userAnswer = questions[question].choices[answer];\n if (userAnswer == correctAnswer) {\n index = index + 1;\n console.log(score);\n console.log(\"Correct\");\n }\n // This will allow code to continue even if wrong answer is selcted along with taking away time\n else {\n index = index + 1;\n countDown = countDown - 15;\n score = score - 15;\n console.log(score);\n console.log(\"Next question: \", index);\n console.log(\"Incorrect\");\n }\n clearQuestionDiv();\n renderQuestions();\n quizOver();\n}", "function answerIsCorrect(){\r\n qscore++;\r\n score.innerHTML = \"<p>Score: \" + qscore + \"</p>\";\r\n}", "function checkAnswer(answer){\r\n if( answer === questions[currentQuestion].correct){ \r\n document.getElementById(\"choiceResult\").textContent = \"Correct\";\r\n score++;\r\n }else{\r\n count -= 10;\r\n document.getElementById(\"choiceResult\").innerHTML = \"Incorrect\";\r\n }\r\n\r\n if(currentQuestion < lastQuestion){\r\n currentQuestion++;\r\n askQuestion();\r\n }else{ \r\n scoreRender();\r\n clearInterval(timer);\r\n }\r\n}", "function checkAnswer(answer) {\n correct = quizQuestions[currentQuestionIndex].correctAnswer;\n\n if (answer === correct && currentQuestionIndex !== finalQuestionIndex) {\n score++;\n alert(\"That Is Correct!\");\n currentQuestionIndex++;\n generateQuizQuestion();\n //If correct.\n } else if (answer !== correct && currentQuestionIndex !== finalQuestionIndex) {\n alert(\"That Is Incorrect.\")\n currentQuestionIndex++;\n generateQuizQuestion();\n //If wrong.\n } else {\n showScore();\n }\n}", "function correctAnswers() {\n let correct = parseInt(document.getElementById(\"correct\").innerText);\n document.getElementById(\"correct\").innerText = ++correct;\n\n\n // Prints a message to the user when they are finsh the quiz depending on the number of correct answer they got. \n\n\n if (correct >= 8) {\n document.getElementById(\"end-message\").innerHTML = `Congragulations YOUR A TRUE MARVEL FAN`;\n } else if (correct >= 6) {\n document.getElementById(\"end-message\").innerHTML = `WELL DONE YOUR NEARLY THERE TRY AGAIN`;\n } else if (correct >= 4) {\n document.getElementById(\"end-message\").innerHTML = `HMMMMM ARE YOU SURE YOUR A MARVEL FAN?`;\n } else if (correct >= 2) {\n document.getElementById(\"end-message\").innerHTML = `YOU NEED TO HIT THE COMICS AND FRESHEN UP`;\n }\n}", "function answer() {\n if (choice === qArr[index].correct) {\n score += 100;\n document.getElementById(\"results\").innerHTML = `Great job!`\n } else {\n document.getElementById(\"results\").innerText = `Wrong! The correct answer is ${qArr[index].rightAns}.`\n }\n}", "function checkAnswer(answer){\n\n if( answer == questions[runningQuestion].correct){\n score ++;\n // for correct\n answerIsCorrect();\n }else{\n // if the answer is wrong,it's need to change the color in red\n answerIsWrong();\n }\n count = 0;\n if(runningQuestion < lastQuestion){\n runningQuestion++;\n renderQuestion();\n \n }else{\n // end the quiz and show the score\n clearInterval(TIMER);\n scoreRender();\n \n }\n}", "function checkAnswer(answer){\r\n correct = myQuestions[questionIndex].correctAnswer;\r\n\r\n //on correct answer for question that is not final question, takes user to next question\r\n if (answer === correct && questionIndex !== finalQuestion){\r\n score++;\r\n questionIndex++;\r\n displayQuestion();\r\n \r\n // on incorrect answer that is not final question, removes 5 seconds from timer \r\n }else if (answer !== correct && questionIndex !== finalQuestion){\r\n questionIndex++;\r\n displayQuestion();\r\n timeLeft -=5; // takes 5 seconds off of timer for incorrect answer\r\n \r\n // after last question, displays the user's score\r\n }else{\r\n displayScore();\r\n }\r\n}", "function checkAnswer(answer) {\r\n if (answer == questions[runningQuestion].correct) {\r\n // answer is correct\r\n score++;\r\n // change progress color to green\r\n answerIsCorrect();\r\n } else {\r\n // answer is wrong\r\n // change progress color to red\r\n answerIsWrong();\r\n }\r\n count = 0;\r\n if (runningQuestion < lastQuestion) {\r\n runningQuestion++;\r\n renderQuestion();\r\n } else {\r\n // end the quiz and show the score\r\n clearInterval(TIMER);\r\n scoreRender();\r\n }\r\n}", "function checkAnswer(num) {\r\n if (num > toGuess) {\r\n document.getElementById(\"heading\").innerHTML = \"Too High\";\r\n score--;\r\n } else if (num < toGuess) {\r\n document.getElementById(\"heading\").innerHTML = \"Too Low\";\r\n score--;\r\n } else {\r\n document.getElementById(\"heading\").innerHTML = \"Correct Guess\";\r\n if (score > highScore) {\r\n highScore = score;\r\n }\r\n gameOn = false;\r\n document.getElementById(\"highScore\").innerHTML = \"HighScore = \" + highScore;\r\n document.body.classList.add(\"winning\");\r\n }\r\n}", "function enterScore(event) {\n var qAnswer = allQuestion[questionIndex -1].answer\n\n if (event.target.value === qAnswer) {\n questionsBox.textContent = \"Correct! +10 Points! \";\n score += 10;\n \n } else {\n questionsBox.textContent = \"Wrong! You lost 10 Seconds of Time!\";\n secondsLeft = secondsLeft - timePenalty;\n } \n }", "function grade() {\n\n//question 1 answer r1\nif (answer1 === \"r1\") {\n correct++;\n } else if ((answer1 === \"r2\") || (answer1 === \"r3\")) {\n incorrect++;\n } else {\n unanswered++;\n }\n\n//question 2 answer r3\nif (answer2 === \"r3\") {\n correct++;\n } else if ((answer2 === \"r2\") || (answer2 === \"r1\")) {\n incorrect++;\n } else {\n unanswered++;\n }\n//question 3 answer r1\nif (answer3 === \"r1\") {\n correct++;\n } else if ((answer3 === \"r2\") || (answer3 === \"r3\")) {\n incorrect++;\n } else {\n unanswered++;\n }\n//question 4 answer r2\nif (answer4 === \"r2\") {\n correct++;\n } else if ((answer4 === \"r1\") || (answer4 === \"r3\")) {\n incorrect++;\n } else {\n unanswered++;\n }\n//question 5 answer r3\nif (answer5 === \"r3\") {\n correct++;\n } else if ((answer5 === \"r2\") || (answer5 === \"r1\")) {\n incorrect++;\n } else {\n unanswered++;\n }\n}", "function checkAnswer() {\n if (document.getElementById(\"true\").selected) {\n processAnswer(\"true\");\n }\n else {\n processAnswer(\"false\");\n }\n // get next question if not asked all yet\n if (questionsAsked < 10) {\n setQuestion();\n }\n // final question asked show prompt.\n else {\n alert(\"Quiz complete! You got \" + totalCorrect + \" correct out of 10.\");\n\n }\n\n // update totals\n document.getElementById(\"qnr\").innerHTML = \"Question:\" + questionsAsked;\n document.getElementById(\"score\").innerHTML = \"Score:\" + totalCorrect;\n\n}", "function clickedWrong() {\n $(\"#correctInput\").hide();\n $(\"#wrongInput\").show();\n if (clickedWrong) {\n yourScore -=5;\n }; if (yourScore < 0) {\n yourScore=0;\n }\n }", "function answerIsIncorrect () {\r\n feedbackForIncorrect();\r\n}", "function displayScore() {\n var score = $('<p>',{id: 'question'});\n \n var numCorrect = 0;\n for (var i = 0; i < selections.length; i++) {\n if (selections[i] === questions[i].awsA) {\n numCorrect += 0;\n }\n else if (selections[i] === questions[i].awsB) {\n numCorrect++;\n }\n else if (selections[i] === questions[i].awsC) {\n numCorrect += 2;\n }\n else {\n numCorrect += 3;\n }\n }\n \n if (numCorrect >5) {\n score.append('You scored ' + numCorrect + ' out of ' +\n questions.length * 3 + '. Exercising several hours before bed is the best time to exercise because it allows our brains to return to baseline activity and eventually allow us to feel sleepy. Because brains are increasingly active during exercise, you should not exercise right before bed or you might risk feeling restless. You’re doing great by giving your brain enough time before bed to calm down! If you don’t exercise, it is still recommended that you start exercising consistently because it correlates with benefits on your sleep quality and memory consolidation - just keep in mind not to exercise too close to bedtime! ');\n return score;\n } else {\n score.append('You scored ' + numCorrect + ' out of ' +\n questions.length * 3 + '. Exercising too close to your bedtime can affect your sleepiness levels and impede on your ability to fall asleep quickly. Because our brains are increasingly active during exercise, they will need an adequate amount of time to return to base level and eventually allow us to feel sleepy. Exercising is good, but do not do it too close to bedtime or else you will not be able to sleep!');\n return score;\n }\n }", "function checkAnswer() {\n let userAnswer = parseInt(document.getElementById(\"answer-box\").value);\n let calculatedAnswer = calculateCorrectAnswer();\n let isCorrect = userAnswer === calculatedAnswer[0];\n\n if (isCorrect) {\n alert(\"Hey! You got it right! :D\");\n incrementScore();\n } else {\n alert(`Awwww.....you answered ${userAnswer}. The correct answer was ${calculatedAnswer[0]}!`);\n incrementWrongAnswer();\n }\n\n runGame(calculatedAnswer[1]);\n\n\n}", "function correctAnswerClick(clickedAnswer){\n\t/* Let the user know their answer is correct and award a point. \n\tAlso update the score counter to reflect the addition of a point. */\n\tscore = score+1;\n\tdocument.getElementById(\"scoreText\").innerHTML = \"Score: \"+score;\n\treviewBeforeProceeding(clickedAnswer);\n\tdocument.getElementById(\"QuizNumber\").innerHTML = 'Correct!';\n\tdocument.getElementById(\"QuizPhrase\").innerHTML = 'You answered correctly! Below is the answer you selected.';\t\n}", "function checkAnswer(answer) {\n if (answer == questionsE[runningQuestion].correctAnswer) {\n // answer is correct\n answerIsCorrect();\n score++;\n } else {\n // answer is incorrect\n answerIsIncorrect();\n alert(`Sorry you got it wrong! The correct answer is ${questionsE[runningQuestion].correctAnswer}`);\n }\n if (runningQuestion <= lastQuestion) {\n runningQuestion++;\n increment();\n renderQuestion();\n }\n}", "function checkAnswer(event) {\n\tevent.preventDefault();\n\tvar button = document.getElementById(event.target.id);\n\tvar userInitials;\n\n\tif (button.id === \"initials\") {\n\t\treturn;\n\t}\n\n\t//saves initials\n\tif (button.id === \"submitScore\") {\n\t\tuserInitials = document.getElementById(\"initials\");\n\t\tsaveScore(userInitials);\n\t\treturn;\n\t}\n\n\t//We are checking here the user answer and the correct answer and acting accordingly\n\tif (answer1.includes(questionsArray[currentQuestion].answer) && button.id === \"choice1\") {\n\t\tuserResult.textContent = \"CORRECT!\";\n\t\tcurrentQuestion++;\n\t\tpoints += 10;\n\t\tdisplayQuestion();\n\t} else if (answer2.includes(questionsArray[currentQuestion].answer) && button.id === \"choice2\") {\n\t\tuserResult.textContent = \"CORRECT!\";\n\t\tcurrentQuestion++;\n\t\tpoints += 10;\n\t\tdisplayQuestion();\n\t} else if (answer3.includes(questionsArray[currentQuestion].answer) && button.id === \"choice3\") {\n\t\tuserResult.textContent = \"CORRECT!\";\n\t\tcurrentQuestion++;\n\t\tpoints += 10;\n\t\tdisplayQuestion();\n\t} else if (answer4.includes(questionsArray[currentQuestion].answer) && button.id === \"choice4\") {\n\t\tuserResult.textContent = \"CORRECT!\";\n\t\tcurrentQuestion++;\n\t\tpoints += 10;\n\t\tdisplayQuestion();\n\t} else {\n\t\tuserResult.textContent = \"WRONG!\";\n\t\tcurrentQuestion++;\n\t\ttimeLeft -= 10;\n\t\tdisplayQuestion();\n\t}\n}", "function checkAnswer()\n\t{\n\t\t//checks the question number\n\t\tif(questionNumber < 2)\n\t\t{\n for(var i =1;i<5;i++)\n\t\t {\n if((document.getElementById(\"guess\"+i).checked)) \n\t\t\t\t {\n //varible to store answer\n var storeAnswer = document.getElementById(\"guess\"+i).value;\n\n //check user guess is correct answer\n if(storeAnswer == answer[questionNumber])\n\t\t\t\t\t {\n document.getElementById(\"score\").innerHTML=\"Your Answer is Correct\";\n\t\t\t\t\t score=score+2;\n bar(true);\n }\n\t\t\t\t else\n\t\t\t\t\t {\n document.getElementById(\"score\").innerHTML=\"Your Answer is Incorrect\";\n bar(false);\n }\n\n //disable the saveAnswer button\n document.getElementById(\"saveAnswer\").disabled=true;\n questionNumber++;\n if(questionNumber<5)\n\t\t\t\t\t\t{\n document.getElementById(\"nextQuestion\").disabled=false;\n\t\t\t\t\t }\t\t\n else\n\t\t\t\t {\n\t\t\t\t\t document.getElementById(\"checkScore\").style.display=\"block\";\n document.getElementById(\"saveAnswer\").style.display=\"none\";\n document.getElementById(\"nextQuestion\").style.display=\"none\";\n }\n\t\t\t\t\n document.getElementById(\"score\").style.display = \"block\";\n\t\t\t\t document.getElementById(\"quizFieldset\").style.display=\"none\";\n\n //This is default case of radioButton and it is always checked\n document.getElementById(\"guess1\").checked = true;\n\n //If checked found break out of loop\n break;\n }\n }\n\t\t\n\t\t\n\t\t}\n\t\t//Else part for text box answer validation\n\t\telse\n\t\t{\n\t\t\tfor(var i =1;i<5;i++)\n\t\t\t{\n\t\t\t document.getElementById(\"guess\"+i).style.display = \"none\";\n\t\t\t}\n\t\t\t document.getElementById(\"guess5\").style.display = \"block\";\n\t\t\t document.getElementById(\"guess5\").style.height= \"40px\";\n\t\t\t document.getElementById(\"guess5\").style.width = \"200px\";\n\t\t\t\n //varible to store answer\n var storeAnswer = document.getElementById(\"guess5\").value;\n\n ////check user answer against correct answer\n if(storeAnswer === answer[questionNumber])\n\t\t\t\t{\n document.getElementById(\"score\").innerHTML=\"Your Answer is Correct\";\n\t\t\t\t\tscore=score+2;\n bar(true);\n }\n\t\t\t\telse\n\t\t\t\t{\n document.getElementById(\"score\").innerHTML=\"Your Answer is Incorrect\";\n bar(false);\n }\n\n //disable the saveAnswer button\n document.getElementById(\"saveAnswer\").disabled=true;\n questionNumber++;\n if(questionNumber<5)\n\t\t\t\t{\n document.getElementById(\"nextQuestion\").disabled=false;\n\t\t\t }\t\t\n else\n\t\t\t\t{\n\t\t\t\t\tdocument.getElementById(\"checkScore\").style.display=\"block\";\n document.getElementById(\"saveAnswer\").style.display=\"none\";\n document.getElementById(\"nextQuestion\").style.display=\"none\";\n }\n\t\t\t\t\n document.getElementById(\"score\").style.display = \"block\";\n\t\t\t\tdocument.getElementById(\"quizFieldset\").style.display=\"none\";\n\t\t\t\tdocument.getElementById(\"guess5\").value = \"Please enter your answer here\";\n }\n }", "function checkAnswer(event){\n if(event.target.id === answers[answerIndex]){\n updatedScore += 10;\n userScore.innerText = \"Score \" + updatedScore;\n feedback.innerHTML = \"Correct! 👍\";\n }\n else{\n timeLeft -= 10;\n feedback.innerHTML = \"Wrong 👎\";\n } \n questionIndex++;\n answerIndex++;\n \n proposedQuestion.innerText = questions[questionIndex].q;\n btn1.innerText = questions[questionIndex].a[0].text;\n btn2.innerText = questions[questionIndex].a[1].text;\n btn3.innerText = questions[questionIndex].a[2].text;\n btn4.innerText = questions[questionIndex].a[3].text; \n if(questionIndex === 5 || answerIndex === 5){\n questionIndex === 0;\n }\n}", "function userCorrectAnswerSubmitted(answer) {\n store.score++;\n $('.correct-updater').html('Correct!');\n}", "function checkAnswer(question, answer) {\n console.log(\"question: \", question);\n console.log(\"asnwer: \", answer);\n let correctAnswer = questions.answer;\n let userAnswer = questions[question].options[answer];\n if (userAnswer == correctAnswer) {\n index = index + 1;\n console.log(score);\n console.log(\"Correct!!\");\n }\n else {\n index = index + 1;\n countDown = countDown - 15;\n score = score - 15;\n console.log(score);\n console.log(\"Next question: \", index);\n console.log(\"Incorrect!\");\n }\n clearQuestion();\n renderAllQuestions();\n // quizOver();\n }", "function play(a,b){\n UserAns=readLineSync.question(a);\n if(UserAns.toUpperCase() === b){\n console.log('CORRECT')\n console.log(\"--------\")\n score=score +1 ;\n console.log('Score is ' +score)\n }\n else{\n console.log('INCORRECT');\n console.log(\"--------\")\n score =score -1;\n console.log('Score is ' +score)\n }\n \n}", "function displayScore() { \n var numCorrect = 0;\n for (var i = 0, length = selections.length; i < length; i++) {\n if (selections[i] == questions[i].correctAnswer) {\n numCorrect++;\n }\n }\n \n return numCorrect;\n}", "function submitAnswers() {\n // grab the value of result (1 to 4)\n const answer = +document.forms[\"quizForm\"][\"q1\"].value - 1;\n\n if (answer === state.solution.index) {\n //update the level and the score\n state.current.level += 1;\n state.current.score += state.solution.bonus;\n\n // update the DOM\n document.getElementById(\"message\").innerHTML =\n yesses[getRandomIndex(yesses.length)];\n document.getElementById(\"section\").style.backgroundColor = \"#FCFAF2\";\n document.getElementById(\"att\").style.backgroundColor = \"#FCFAF2\";\n } else {\n // reset state\n state.current.level = 1;\n state.current.score = 0;\n remap = 1;\n\n // Update the DOM\n document.getElementById(\"message\").innerHTML =\n \"<b>Game Over :(</b> <br><br>&nbsp;the correct answer was<br>&nbsp;\" +\n state.solution.name +\n \"<br><br>&nbsp;please restart\";\n document.getElementById(\"section\").style.backgroundColor = \"#FF9D70\";\n document.getElementById(\"att\").style.backgroundColor = \"#FF9D70\";\n }\n\n // update high level and score (they are nto directly related!)\n state.best.level = Math.max(state.current.level, state.best.level);\n state.best.score = Math.max(state.current.score, state.best.score);\n\n // Update the DOM\n document.getElementById(\"level\").innerHTML = state.current.level + \"\";\n document.getElementById(\"score\").innerHTML = state.current.score + \"\";\n document.getElementById(\"hlevel\").innerHTML = state.best.level + \"\";\n document.getElementById(\"hscore\").innerHTML = state.best.score + \"\";\n\n // show the next map\n showMap();\n\n return false;\n}", "function checkAnswer(object) {\n console.log(object.value);\n console.log(correctAnswer);\n\n if (correctAnswer == object.value) {\n score++;\n } else {\n secondLeft -= 10;\n }\n\n console.log(score);\n renderQuestion();\n document.getElementById(\"currentScore\").textContent = score.toString();\n}", "function keepingScore() {\n\n var userAnswer1 = $(\"input[name='answer1']:checked\").val();\n var userAnswer2 = $(\"input[name='answer2']:checked\").val();\n var userAnswer3 = $(\"input[name='answer3']:checked\").val();\n var userAnswer4 = $(\"input[name='answer4']:checked\").val();\n var userAnswer5 = $(\"input[name='answer5']:checked\").val();\n var userAnswer6 = $(\"input[name='answer6']:checked\").val();\n var userAnswer7 = $(\"input[name='answer7']:checked\").val();\n var userAnswer8 = $(\"input[name='answer8']:checked\").val();\n var userAnswer9 = $(\"input[name='answer9']:checked\").val();\n var userAnswer10 = $(\"input[name='answer10']:checked\").val();\n \n \n // Question 1\n if (userAnswer1 === undefined) {\n\n unanswered++;\n }\n else if (userAnswer1 == questions[0].answer) {\n\n correctAnswers++;\n }\n else {\n\n incorrectAnswers++;\n }\n\n // Question 2\n if (userAnswer2 === undefined) {\n\n unanswered++;\n }\n else if (userAnswer2 == questions[1].answer) {\n\n correctAnswers++;\n }\n else {\n\n incorrectAnswers++;\n }\n\n // Question 3\n if (userAnswer3 === undefined) {\n\n unanswered++;\n }\n else if (userAnswer3 == questions[2].answer) {\n\n correctAnswers++;\n }\n else {\n\n incorrectAnswers++;\n }\n\n // Question 4\n if (userAnswer4 === undefined) {\n\n unanswered++;\n }\n else if (userAnswer4 == questions[3].answer) {\n\n correctAnswers++;\n }\n else {\n\n incorrectAnswers++;\n }\n\n // Question 5\n if (userAnswer5 === undefined) {\n\n unanswered++;\n }\n else if (userAnswer5 == questions[4].answer) {\n\n correctAnswers++;\n }\n else {\n\n incorrectAnswers++;\n }\n\n // Question 6\n if (userAnswer6 === undefined) {\n\n unanswered++;\n }\n else if (userAnswer6 == questions[5].answer) {\n\n correctAnswers++;\n }\n else {\n\n incorrectAnswers++;\n }\n\n // Question 7\n if (userAnswer7 === undefined) {\n\n unanswered++;\n }\n else if (userAnswer7 == questions[6].answer) {\n\n correctAnswers++;\n }\n else {\n\n incorrectAnswers++;\n }\n\n // Question 8\n if (userAnswer8 === undefined) {\n\n unanswered++;\n }\n else if (userAnswer8 == questions[7].answer) {\n\n correctAnswers++;\n }\n else {\n\n incorrectAnswers++;\n }\n\n // Question 9\n if (userAnswer9 === undefined) {\n\n unanswered++;\n }\n else if (userAnswer9 == questions[8].answer) {\n\n correctAnswers++;\n }\n else {\n\n incorrectAnswers++;\n }\n\n // Question 10\n if (userAnswer10 === undefined) {\n\n unanswered++;\n }\n else if (userAnswer10 == questions[9].answer) {\n\n correctAnswers++;\n }\n else {\n\n incorrectAnswers++;\n }\n\n \n}", "function updateScore(){\n\tdocument.getElementById(\"correct\").innerHTML = \"Correct Answers: \" + counters.correct;\n\tdocument.getElementById(\"incorrect\").innerHTML= \"Incorrect Answers: \" + counters.incorrect;\n\tdocument.getElementById(\"unanswered\").innerHTML= \"Unanswered: \" + counters.unanswered;\n}", "function checkAnswerA(){\n if(quizQuestions[currentQuestion].correctChoice === li1.value){\n p.textContent = \"Correct!\"\n } else { \n p.textContent = \"Oops! Maybe next time.\"\n secondsRemaining = secondsRemaining - 10;\n };\n currentQuestion++;\n if (currentQuestion > quizQuestions.length - 1){\n quizEl.style.display = \"none\";\n displayHighscore();\n return;\n } \n displayQuestions();\n}", "function updateScore(){\n score++\n if(score === 10){\n result.textContent = 'Wow! 10/10 You are the snake genius!'\n } else if(score === 9 ){\n result.textContent= '9/10 Amazing!'\n } else if( score === 8){\n result.textContent = '8/10 Great job!'\n } else if( score === 7){\n result.textContent= '7/10 Good job!'\n }else if(score === 6){\n result.textContent = '6/10 Good Job!'\n }else if(score === 5){\n result.textContent = '5/10 Looks like you need to learn!'\n }else if(score === 4){\n result.textContent = '4/10 Looks like you need to learn!'\n }else if(score === 3){\n result.textContent = '3/10 Looks like you need to learn!'\n }else if(score === 2){\n result.textContent= '2/10 Looks like you need to learn!'\n }else if(score === 1){\n result.textContent = '1/10 Looks like you need to learn!'\n }else if(score === 0){\n result.textContent = '0/10 FAIL!'\n }\n}", "function incrementCorrectAnswers(currentScore) {\n let correctAttemptText = currentScore + \" Correct\";\n $('#correct_attempt').text(correctAttemptText);\n}", "function correctAnswer(response,answer,correct){\n\t\t//add \"CORRECT\" div\t\t\n\t\tupdateScoreboard(response,answer,correct);\n\t\tscore++;\n\t\tquestionNumber++;\t\n\t\ttoggleLEDCorrect();\n\t\tshowScore();\n\t}", "function isCorrect(userAnswer,userAnswerText){\n var correct = correctAnswer; \n var user = $('#'+userAnswerText).text();\n if(user == correct){\n $('#'+userAnswer).css(\"background\",\"#33CC00\");\n \n //Update points\n points++;\n \n } else {\n $('#'+userAnswer).css(\"background\",\"red\");\n }\n \n //Display Score\n score();\n \n //Reset button colors\n nextQuestion(userAnswer);\n \n \n \n}", "function displayScore() {\r\n var score = $('<p>', {\r\n id: 'question'\r\n });\r\n var numCorrect = 0;\r\n for (var i = 0; i < selections.length; i++) {\r\n if (selections[i] === questions[i].correctAnswer) {\r\n numCorrect++;\r\n }\r\n }\r\n score.append('You got ' + numCorrect + ' out of ' +\r\n questions.length + '.');\r\n return score;\r\n }", "function selectAnswer(e) {\n \n const selectedButton = e.target; // get button user clicks on\n const correct = selectedButton.dataset.correct; // check to see if answer is correct\n setStatusClass(document.body, correct); // set to correct or wrong\n \n // go through each button\n Array.from(answerButtonsElement.children).forEach(button => {\n \n // call setStatusClass function, to see if answer is correct\n setStatusClass(button, button.dataset.correct);\n });\n \n // if answer is correct\n if (selectedButton.dataset = correct) {\n \n // increment number of questions user got correct\n correctNum++;\n }\n \n // if user is not on the last question\n if (shuffledQuestions.length > currentQuestionIndex + 1) {\n \n // Then show next button\n nextButton.classList.remove('hide');\n }\n \n // if user is on the last question\n else {\n \n // Get username from userInput\n var userInput = document.getElementById('myUserInput').value; // userinput\n\n // If user gets 0-4 questions correct\n if (correctNum <= 4) {\n intro.innerText = 'Game Over!';\n myScore.innerText = 'Final score for ' + userInput + ': ' + correctNum + ' / 20. \\n' + 'You are a failure. Get lost.';\n }\n \n // if user gets 5-11 questions correct\n else if (correctNum >= 5 && correctNum <= 11) {\n intro.innerText = 'Game Over!';\n myScore.innerText = 'Final score for ' + userInput + ': ' + correctNum + ' / 20. \\n' + 'Not bad. You can do better.';\n }\n \n // if user gets 12-16 questions correct\n else if (correctNum >= 12 && correctNum <= 16) {\n intro.innerText = 'Game Over!';\n myScore.innerText = 'Final score for ' + userInput + ': ' + correctNum + ' / 20. \\n' + 'You passed, you are an average player.';\n }\n \n // if user gets 17-19 questions correct\n else if (correctNum >= 17 && correctNum <= 19) {\n intro.innerText = 'Game Over!';\n myScore.innerText = 'Final score for ' + userInput + ': ' + correctNum + ' / 20. \\n' + 'Good job. You are a true Uncharted fan.';\n }\n \n // if user gets a perfect score (20 questions correct)\n else {\n intro.innerText = 'Game Over!';\n myScore.innerText = 'Final score for ' + userInput + ': ' + correctNum + ' / 20. \\n' + 'Perfect score! You are iBiza TwisT.';\n }\n\n \n startButton.innerText = 'Restart Quiz';\n message.innerText = 'Thanks for playing! For more information, visit our About page.';\n \n myMessage.classList.remove('hide');\n myScore.classList.remove('hide');\n intro.classList.remove('hide')\n startButton.classList.remove('hide');\n questionContainerElement.classList.add('hide');\n \n }\n \n}", "function checkans(value) {\n if (game === \" \") {\n alert(\"Select a game\");\n }\n if (game === \"java\") {\n if (value === JavaAns[qcount]) {\n curr_score++;\n }\n }\n if (game === \"c\") {\n if (value === CAns[qcount]) {\n curr_score++;\n }\n }\n if (game === \"cplus\") {\n if (value === CPlusAns[qcount]) {\n curr_score++;\n }\n }\n if (game === \"python\") {\n if (value === PythonAns[qcount]) {\n curr_score++;\n }\n }\n qcount++;\n seconds=30;\n DisplayScore(curr_score);\n Quiz();\n}", "function checkAnswer(answer){\n correct = quizQuestions[currentQuestionIndex].correctAnswer;\n if (answer === correct && currentQuestionIndex !== finalQuestionIndex){\n score++;\n alert(\"Thats Right!\");\n currentQuestionIndex++;\n generateQuizQuestion();\n }else if (answer !== correct && currentQuestionIndex !== finalQuestionIndex){\n alert(\"WRONG!\");\n //-----DEDUCT TIME FOR WRONG ANSWERS------\n timeLeft = timeLeft - deduction;\n currentQuestionIndex++;\n generateQuizQuestion();\n }else{\n showScore();\n }\n}", "function checkAnswer(userAnswer) {\n if (secondsLeft > 0 && currentIndex < lastQuestionIndex) {\n if (questionArr[currentIndex].answer == userAnswer) {\n currentIndex++;\n renderQuestions(); \n isCorrect();\n } else {\n currentIndex++;\n secondsLeft -= 10;\n renderQuestions();\n isWrong();\n }\n } else {\n currentIndex = 0;\n finalScoreRender();\n }\n}", "function handleCorrectAnswer() {\n $('<div>').attr('id', 'correct').text('Correct!').appendTo('#info');\n score += 1;\n $scoreboard.text(score);\n\n if (score === 10) {\n $winModal.css('display', 'block');\n }\n}", "function keepingScore() {\n\n var userAnswer1 = $(\"input[name='answer1']:checked\").val();\n var userAnswer2 = $(\"input[name='answer2']:checked\").val();\n var userAnswer3 = $(\"input[name='answer3']:checked\").val();\n var userAnswer4 = $(\"input[name='answer4']:checked\").val();\n var userAnswer5 = $(\"input[name='answer5']:checked\").val();\n var userAnswer6 = $(\"input[name='answer6']:checked\").val();\n var userAnswer7 = $(\"input[name='answer7']:checked\").val();\n\n // Q1\n if (userAnswer1 === undefined) {\n\n unanswered++;\n }\n else if (userAnswer1 == questions[0].answer) {\n\n correctAnswers++;\n }\n else {\n\n wrongAnswers++;\n }\n\n // Q2\n if (userAnswer2 === undefined) {\n\n unanswered++;\n }\n else if (userAnswer2 == questions[1].answer) {\n\n correctAnswers++;\n }\n else {\n\n wrongAnswers++;\n }\n\n // Q3\n if (userAnswer3 === undefined) {\n\n unanswered++;\n }\n else if (userAnswer3 == questions[2].answer) {\n\n correctAnswers++;\n }\n else {\n\n wrongAnswers++;\n }\n\n // Q4\n if (userAnswer4 === undefined) {\n\n unanswered++;\n }\n else if (userAnswer4 == questions[3].answer) {\n\n correctAnswers++;\n }\n else {\n\n wrongAnswers++;\n }\n\n // Q5\n if (userAnswer5 === undefined) {\n\n unanswered++;\n }\n else if (userAnswer5 == questions[4].answer) {\n\n correctAnswers++;\n }\n else {\n\n wrongAnswers++;\n }\n\n // Q6\n if (userAnswer6 === undefined) {\n\n unanswered++;\n }\n else if (userAnswer6 == questions[5].answer) {\n\n correctAnswers++;\n }\n else {\n\n wrongAnswers++;\n }\n\n // Q7\n if (userAnswer7 === undefined) {\n\n unanswered++;\n }\n else if (userAnswer7 == questions[6].answer) {\n\n correctAnswers++;\n }\n else {\n\n wrongAnswers++;\n } \n\n}", "function correctAnswer() {\n alert('Correct Answer');\n score += 100;\n}", "function clickFunction() {\n qIndex = qIndex + 1;\n if (qIndex < questions.length && this.textContent === currentQuestion.correctAnswer) {\n score = score + 100;\n displayBox.textContent = \"Correct!\"\n askQuestion();\n } else if (qIndex === questions.length && this.textContent === currentQuestion.correctAnswer) {\n score = score + 100;\n displayBox.textContent = \"Correct!\"\n endGame();\n } else if (qIndex < questions.length && this.textContent !== currentQuestion.correctAnswer) {\n timerCount = timerCount - 10;\n displayBox.textContent = \"Incorrect\";\n askQuestion();\n } else if (qIndex === questions.length && this.textContent !== currentQuestion.correctAnswer) {\n timerCount = timerCount - 10;\n displayBox.textContent = \"Incorrect\";\n endGame();\n }\n}", "function checkAnswer(userChoice, realAnswer) {\n if (userChoice === realAnswer) {\n alert(\"correct\")\n scoreEntry += 5\n }\n else {\n secondsLeft -= 10;\n }\n if (currentQuestion !== (Questions.length - 1)) {\n currentQuestion++\n displayQuestion(Questions[currentQuestion])\n }\n else {\n quizOver();\n }\n}", "function checkAnswer(answer){\n correct = quizQuestions[currentQuestionSpot].rightAnswer;\n\n if (answer === correct && currentQuestionSpot !== finalQuestion){\n score++;\n alert(\"That Is Correct!\");\n currentQuestionSpot++;\n beginQuiz();\n }else if (answer !== correct && currentQuestionSpot !== finalQuestion){\n alert(\"That Is Incorrect.\")\n currentQuestionSpot++;\n beginQuiz();\n }else{\n finalScore();\n }\n}", "function answer(a) {\n let selected_answer = a;\n //If selected_answer is equals to the last number in the array is a right answer\n if (selected_answer == questions[questionNum][5]){\n displayNo('wrong-answer');\n displayNo('answers')\n displayYes('right-answer');\n //Every right answer increases evenly X% of the progress bar\n progressNum+= questionPercent;\n document.getElementById('progress-num').classList.add('w-' + progressNum);\n document.getElementById('progress-num').innerHTML= progressNum + '%';\n \n //Finish Quiz on the last question available - else - show next question\n if(questionNum+1 == questions.length ){\n displayYes('finish-quiz');\n }\n else {\n questionNum++;\n displayYes('next-question');\n }\n \n // By wrong answer, show alert and increase counter \n } else {\n questionsWrong++;\n displayYes('wrong-answer');\n }\n}", "function checkAnswer() {\n disableAnswerBtns();\n const userAnswer = this.firstElementChild.innerText;\n const correctAnswer = startRound()\n \n if (userAnswer === correctAnswer[\"category\"]) {\n updateScore();\n showFeedbackModal(true, correctAnswer)\n } else {\n showFeedbackModal(false, correctAnswer)\n }\n}", "function displayscore(){\n \t$('#playerscore').html('Correct Answer: ' + correctanswer + \n \t\t '<br>Wrong Answer: ' + wronganswer +\n '<br>Unanswer: ' + unanswered);\n }", "function checkAnswer() {\r\n STORE.view = 'feedback';\r\n let userSelectedAnswer = STORE.userAnswer;\r\n let correctAnswer = STORE.questions[STORE.questionNumber].correctAnswer;\r\n console.log('Checking answer...');\r\n if (userSelectedAnswer == correctAnswer) {\r\n STORE.score++;\r\n STORE.correctAnswer = true;\r\n }\r\n else {\r\n STORE.correctAnswer = false;\r\n }\r\n}", "function checkAnswer() {\n const answer = currentUserAnswer(); // answerVal.value\n if (answer.toLowerCase() !== null && answer.toLowerCase() === newArrayQuestions[index].answer) {\n userPuntos(index, 1, 1);\n changeCorrectAnswerLetterColor();\n if (soundToggleChekbox) {\n playCorrectAnswerSound();\n }\n } else {\n userPuntos(index, 0, 1);\n changeIncorrectAnswerLetterColor();\n if (soundToggleChekbox) {\n playNoCorrectAnswerSound();\n }\n }\n showScores();\n checkArrayQuestionsForFin();\n if (rankingTable.classList.contains(\"hideElement\")) { // If the game has not been stopped\n updateLetter();\n updateAnswer(); // answerVal.value = ''\n changeActivLetterColor();\n showNextQuestion();\n }\n}", "function correctAnswer(){\r\n\t// update variables\r\n\tscore++\r\n\tcurrent_streak++\r\n\tif (current_streak > highest_streak){\r\n\t\thighest_streak = current_streak\r\n\t}\r\n\r\n\t// adjust various elements\r\n\tanswer_sound = document.getElementById(\"correct_sound_id\")\r\n\tdocument.getElementById(\"question\").value=\"You are right!\"\r\n\r\n\t// check if the current streak is 5 or greater to determine image\r\n\tif (current_streak >= 5){\r\n\t\tdocument.score_image.src=\"images/happy_yoshi.gif\"\r\n\t}\r\n\telse {\r\n\t\tdocument.score_image.src=\"images/winking_emoji.gif\"\r\n\t}\r\n\tanswer_sound.play();\r\n}", "function checkAnswers() {\n if (userSelection == quizBank[questionCounter].correctAnswer) {\n score++;\n secondsLeft += 10;\n } else {\n secondsLeft -= 10;\n }\n questionCounter++;\n showQuestions();\n}", "function questionprompt1(){\n var userQuestion1 = prompt('Is 2+2=4?');\n //So these if statements are the questions with the last if being a pop up telling the user their score\n if(userQuestion1.toLocaleLowerCase() === 'yes'|| userQuestion1.toLocaleLowerCase()=== 'y') {\n alert('Correct!');\n userScore++;\n } else if(userQuestion1.toLocaleLowerCase()=== 'no'|| userQuestion1.toLocaleLowerCase()=== 'n') {\n alert('You answered wrong dummy!');\n } else{\n alert('Please type a correct response');\n }\n}", "function checkAnswer(question , answer){\n var userAnswer = myVar.question(chalk.cyanBright(question));\n if(userAnswer.toUpperCase() == answer.toUpperCase()){\n console.log(chalk.green(\"Correct.\"));\n score ++;\n }\n\n else{\n console.log(chalk.red(\"Wrong.\"));\n console.log(chalk.white(\"Correct Answer = \" + answer));\n }\n console.log(chalk.redBright(\"\\n-------------------\"));\n\n}", "function correct() {\n score += 20;\n next();\n }", "function displayScore() {\n var score = $('<p>',{id: 'question'});\n \n var numCorrect = 0;\n for (var i = 0; i < selections.length; i++) {\n if (selections[i] === questions[i].correctAnswer) {\n numCorrect++;\n }\n }\n\n var numIncorrect = 0;\n for (var i = 0; i < selections.length; i++) {\n if (selections[i] === questions[i].wrongAnswer) {\n numIncorrect++;\n }\n }\n \n score.append('Correct Answers:' + numCorrect);\n score.append('Incorrect Answers:' + numInorrect);\n \n \n }", "function displayScore() {\n \tstop();\n \tvar score = $('<p>',{id: 'question'});\n\n \tvar numCorrect = 0;\n \tfor (var i = 0; i < selections.length; i++) {\n \t\tif (selections[i] === questions[i].correctAnswer) {\n \t\t\tnumCorrect++;\n \t\t}\n \t}\n\n \tscore.append('You scored: ' + numCorrect + ' out of ' +\n \t\tquestions.length + ' questions.');\n \treturn score;\n }", "function isCorrect(){\n let temp; //used to keep track of the correct answer index\n for (let i =0; i<answerChoices[num-1].length; i++)\n {\n if (answerChoices[num-1][i] === correctAnswers[num-1]){\n temp=i;\n }\n }\n \n if (parseInt(input,10) === temp){ //input = index of correct answer\n console.log('V- Correct answer -V');\n score++;\n }\n else if (parseInt(input, 10) < 7 && parseInt(input, 10) < answerChoices[num-1].length){ //input is any of the other choices, wrong\n console.log('X- Sorry. Wrong answer. -X');\n score--;\n }\n else if(input === 'exit' || input === 'EXIT'){ \n console.log('Thank you for playing.');\n console.log('---Your final score is: '+score+'.---');\n }\n else{\n console.log('You entered the wrong value'); //input is anything but a number\n }\n\n //doesnt appear if user quits game\n if(stillPlaying){ \n console.log('----Your current score is: '+score+'.----');\n }\n }", "function correctAnswer(){\n\t\tcorrect++;\n\t\talert(\"You are Right! Good job!\");\n\t}", "function checkAnswer (answer) {\n if(answer == questions[runningQuestion].correct) {\n score++;\n alert(\"Correct! Way to Go!\");\n\n }\n else {\n alert(\"Incorrect! Uh oh!\");\n timeLeft = timeLeft - 10;\n\n }\n if (runningQuestion < lastQuestion) {\n runningQuestion++;\n renderQuestion();\n }\n else {\n scoreRender();\n timeLeft = 99999999;\n timerEl.style.display = \"none\";\n }\n}", "function showScore() {\n \n var endScore = calculateScore(questions, userSelectionSet);\n\n scoreOutput.innerHTML = \"You scored \" + endScore + \" out of \" + numberOfQuestions;\n \n switch (true) {\n case (endScore <= 1):\n outputDetails.innerHTML = \"May the force be with you!\";\n break;\n case (endScore >= 2 && endScore <= 3):\n outputDetails.innerHTML = \"You show a small sign of the force within you!\";\n break; \n case (endScore >= 4 && endScore <= 5):\n outputDetails.innerHTML = \"You have much to learn young padawan!\";\n break; \n case (endScore >= 6 && endScore <= 7):\n outputDetails.innerHTML = \"You are a Jedi Apprentice!\";\n break; \n case (endScore >= 8 && endScore <= 9):\n outputDetails.innerHTML = \"The force is strong with you!\";\n break; \n case (endScore >= 10):\n outputDetails.innerHTML = \"You are a Jedi Master!\";\n break;\n default:\n break;\n }\n \n questionBlock.style.display = 'none';\n scoreBlock.style.display = 'block';\n \n}", "function calcScore(){\n\tfor (var i = 0; i < userPicks.length; i++) {\n\t\tif(userPicks[i] == \"correct\"){\n\t\t\tcounters.updateCorrect();\n\t\t}\n\t\telse{\n\t\t\tcounters.updateIncorrect();\n\t\t}\n\t};\n\n\tif (userPicks.length < 6) {\n\t\tcounters.unanswered = 6 - userPicks.length;\n\t}\n\n}", "function questionOne() {\n var userResponse1 = prompt(questions[0]).toLowerCase();\n if ((userResponse1 === answers[0]) || (userResponse1 === answers[1])) {\n console.log(\"User is correct\");\n finalScore++;\n document.getElementById('answerOne').innerHTML = \"You are right! I was actually born in the state of Washington.\";\n document.getElementById('rightOrWrongOne').innerHTML = \"<img src='images/smiley.jpg' height='100' width='100'>\";\n document.getElementById('answerOne').className = \"correct\";\n } else {\n console.log(\"User is incorrect\");\n document.getElementById('answerOne').innerHTML = \"Incorrect. I was born in Washington, but most of my family does live in Iowa.\";\n document.getElementById('rightOrWrongOne').innerHTML = \"<img src='images/frowney.jpg' height='100' width='100'>\";\n document.getElementById('answerOne').className = \"incorrect\";\n }\n}", "function selectAnswer() {\n //if right answer show correct, and log score\n if (questions[questionNumber].answer === userAnswer) {\n win();\n stop();\n questionNumber++;\n // wait to start next question\n nextQuestion();\n }\n //if wrong answer show correct and log score\n else {\n lose();\n stop();\n questionNumber++;\n // wait to start next question\n nextQuestion();\n }\n}", "function run() {\n if (count <= 2) {\n var ans = document.getElementById(\"ans\").value;\n\n if (questionsArray[random].correct === ans) {\n document.getElementById(\"res\").innerHTML =\n \"<h4>Your answer is \" +\n \"'\" +\n ans +\n \"'\" +\n \"<br />Correct answer</h4>\";\n\n count += 1; //Increasing the value of count by one because we received a correct answer.\n noOfQuestions += 1; //incresing the no of questions by one.\n\n document.getElementById(\"score\").innerHTML =\n \"<h4>Score: \" + count + \"</h4>\"; //displaying the score on the screen.\n document.getElementById(\"ans\").value = \"\";\n\n document.getElementById(\"question\").innerHTML +=\n \"<h3 id=\" + \"correct\" + \">Correct</h3>\";\n } else {\n document.getElementById(\"res\").innerHTML = \"<h4>Wrong Answer.</h4>\";\n\n // document.getElementById(\"ansTextbox\").textContent = \"\";\n\n // document.getElementById(\"answeButton\").textContent = \"\";\n\n document.getElementById(\"score\").innerHTML =\n \"<h4>Score: \" + count + \"</h4>\";\n\n noOfQuestions += 1; //incresing the no of questions by one.\n\n document.getElementById(\"ans\").value = \"\"; //clearing the answer box\n\n document.getElementById(\"question\").innerHTML +=\n \"<h3 id=\" + \"wrong\" + \">Wrong</h3>\";\n\n // play = 1;\n }\n\n if (noOfQuestions == 3) {\n play = 1;\n }\n\n if (play != 1) {\n takeQuiz();\n }\n\n if (noOfQuestions == 3) {\n document.getElementById(\"answeButton\").innerHTML = \"\";\n document.getElementById(\"newGameArea\").innerHTML =\n \"<p>You have completed all the questions in this category!! Congratulations</p>\";\n document.getElementById(\"ansTextbox\").textContent = \"\";\n }\n }\n}", "function checkAnswer(answer) {\n var correctAnswer = questions[currentQuestionIndex].correct;\n console.log(correctAnswer);\n\n if (answer === correctAnswer) {\n score++;\n console.log(score)\n currentScore.textContent = score\n alert(\"This is correct! (+1 to score)\");\n currentQuestionIndex++;\n getQuestions();\n } else if (answer !== correctAnswer) {\n secondsLeft -= 10;\n alert(\"This is incorrect! (-10 seconds)\");\n currentQuestionIndex++;\n getQuestions();\n }\n}", "function displayScore() {\n var score = $('<p>',{id: 'question'});\n \n var numCorrect = 0;\n for (var i = 0; i < selections.length; i++) {\n if (selections[i] === questions[i].correctAnswer) {\n numCorrect++;\n }\n }\n \n score.append('You got ' + numCorrect + ' of ' +\n questions.length + ' correct');\n return score;\n }", "function markQuestion(qNum, correctAnswer) {\r\n let userAnswer = document.getElementById(\"answer\" + qNum).value;\r\n userAnswer = userAnswer.toLowerCase();\r\n\r\n let resultEl = document.getElementById(\"result\" + qNum);\r\n if (userAnswer === correctAnswer) {\r\n resultEl.innerHTML = 'Correct';\r\n resultEl.style.color = 'green';\r\n score++;\r\n } else {\r\n resultEl.innerHTML = 'Incorrect';\r\n resultEl.style.color = 'red';\r\n }\r\n}", "function checkAnswer(answer) {\n if (answer == myQuestions[runningQuestion].correctAnswer) {\n score++\n answerIsCorrect();\n } else {\n answerIsWrong();\n }\n if(runningQuestion < lastQuestion) {\n runningQuestion++;\n showQuestion();\n } else {\n clearInterval(timer);\n finalScore();\n }\n}", "function isCorrect(){\n score++;\n setScore();\n}", "function checkAnswer()\n {\n //Fetch the user typed answer\n var question_screen_userAnswer=question_screen_answer_textbox.value;\n //Fetch the actual answer\n var question_screen_actualAnswer=gameLevels[current_level].answer;\n\n //Removing the animation classes\n document.body.classList.remove(\"incorrect_answer\");\n document.body.classList.remove(\"correct_answer\");\n\n //Try catch to handle in valid inputs from the user\n\n try\n {\n if(question_screen_userAnswer == \"\")//Catch for empty inputs\n {\n throw \"Empty\";\n }\n //Reference 2\n if(isNaN(question_screen_userAnswer))//Catch for invalid inputs\n {\n throw \"NaN (not a number)\";\n }\n\n }\n //Corresponding catch for the statement in case of entering empty or NaN input\n catch(err)\n {\n question_screen_error_message_paragraph.innerHTML = \"Answer you have provided is \" + err;\n }\n\n //Check if the two answers (user and actual) match or not\n if(question_screen_userAnswer==question_screen_actualAnswer)\n {\n\n //Check for the Master Level Correct Response\n if(gameData.level==13)\n {\n gameData.gamesWon++;\n gameData.gamesPlayed++;\n\n document.body.classList.remove(\"incorrect_answer\");\n document.body.classList.remove(\"correct_answer\");\n\n //Call function to calculate score\n if(gameData.attempts==3)\n {\n question_score=question_score+3;\n }\n\n else if(gameData.attempts==2)\n {\n question_score=question_score+2;\n }\n\n else if(gameData.attempts==1)\n {\n question_score=question_score+1;\n }\n //Display and update the score\n question_screen_score.innerText=\"Score:\"+question_score;\n //Remove the check button from the screen\n\n //Display the required buttons\n question_screen_check_button.style.display=\"none\";\n question_screen_welcome_button.style.display=\"block\";\n\n //Check if achieved the perfect score\n if(question_score==39)\n {\n document.body.classList.add(\"master_answer\");\n //Display the correct Messsage in place of the Timer\n question_screen_timer.innerHTML=\"Wow! All Hail the Master!!!!!!\";\n //Display the next level button\n question_screen_next_button.style.display=\"none\";\n }\n\n else//If perfect score not achieved\n {\n document.body.classList.add(\"game_won\");\n //Display the correct Messsage in place of the Timer\n question_screen_timer.innerHTML=\"Congrats!!Try to become the Master\";\n //Display the next level button\n question_screen_next_button.style.display=\"none\";\n\n }\n\n //Update the Score and stats\n var curr_highest_score=gameData.highestScore;\n\n if(question_score>curr_highest_score)\n {\n gameData.highestScore=question_score;\n }\n //Clear the interval\n clearInterval(question_screen_tid);\n }\n\n\n //Correct Answer if it is not the final level\n else\n\n\n {\n //Add the required associated class here and remove the other\n document.body.classList.remove(\"incorrect_answer\");\n document.body.classList.add(\"correct_answer\");\n //Display the correct Messsage in place of the Timer\n question_screen_timer.innerHTML=\"Correct Answer!!!!!!\";\n //Display the next level button\n question_screen_next_button.style.display=\"block\";\n //Call function to calculate score\n if(gameData.attempts==3)\n {\n question_score=question_score+3;\n }\n\n else if(gameData.attempts==2)\n {\n question_score=question_score+2;\n }\n\n else if(gameData.attempts==1)\n {\n question_score=question_score+1;\n }\n //Display and update the score\n question_screen_score.innerText=\"Score:\"+question_score;\n //Remove the check button from the screen\n question_screen_check_button.style.display=\"none\";\n //Increment the level number in gameData and current_level variable\n gameData.level++;\n current_level++;\n gameData.timer=10;\n //Clear the interval\n clearInterval(question_screen_tid);\n }\n\n }\n\n //Counter logic if answer is not correct\n else\n {\n //Add the required associated class here and remove the other\n document.body.classList.remove(\"correct_answer\");\n document.body.classList.add(\"incorrect_answer\");\n\n //Decrement the attempts and display them on the screen\n gameData.attempts--;\n //Fetch the attempts left\n var question_screen_attempt_left=gameData.attempts;\n //Update the attempt value on the screen\n question_screen_attempts.innerHTML=\"Attempts :\"+question_screen_attempt_left\n\n //Logic to handle if the attempts go to zero\n if(question_screen_attempt_left==0)\n {\n //Make the check button disabled\n question_screen_check_button.disabled=true;\n //Clear the timer\n clearInterval(question_screen_tid);\n //Display the message\n question_screen_timer.innerHTML=\"Sorry! No more Attempts! Try Again\";\n //Chnage text to restart level after displaying\n question_screen_restart_button.style.display=\"block\";\n question_screen_welcome_button.style.display=\"block\";\n\n //Update Stats\n gameData.gamesPlayed++;\n gameData.timer=10;\n\n //Update the highest score\n var present_highest_score=gameData.highestScore;\n\n if(question_score>present_highest_score)\n {\n gameData.highestScore=question_score;\n }\n\n }\n\n else//If attempts are not zero\n {\n //Clear the value of input box\n question_screen_answer_textbox.value=\"\";\n //Regain the focus towards the answer box\n question_screen_answer_textbox.focus();\n\n }\n\n\n }\n }", "function answerCorrect() {\n scoreUp();\n displayImage();\n}", "function checkAnswer(question, anwser){\n var userAnswer = readlineSync.question(question);\n \n //assuming all answers are of type string\n if(userAnswer.toLowerCase()===anwser.toLowerCase()){\n score+=1;\n console.log(`You are right!\ncurrent score: ${score}\n-------------`);\n }else{\n score-=1;\n console.log(`You are wrong!\ncurrent score: ${score}\n-------------`);\n }\n}", "function checkAnswer(question, anwser){\n var userAnswer = readlineSync.question(question);\n \n //assuming all answers are of type string\n if(userAnswer.toLowerCase()===anwser.toLowerCase()){\n score+=1;\n console.log(`You are right!\ncurrent score: ${score}\n-------------`);\n }else{\n score-=1;\n console.log(`You are wrong!\ncurrent score: ${score}\n-------------`);\n }\n}", "function compareAnswer(userAnswer) {\n for (let c = 0; c < 5; c++) {\n if (cat === gameLogic[c].name) {\n for (let q = 0; q < 5; q++) {\n if (pointValue === gameLogic[c].value[q].name) {\n if (\n userAnswer === gameLogic[c].value[q].correctAnswer.toUpperCase()\n ) {\n score += gameLogic[c].value[q].points;\n remainingPoints -= gameLogic[c].value[q].points;\n if ((score >= 2000) && (remainingPoints == 0)) {\n alert(\"You Win!!\");\n document.querySelector(\"#Gameboard\").style.visibility = \"hidden\";\n };\n swal(\"Correct!\", \"\", \"success\");\n document.querySelector(\".displaypoints\").textContent = \"$\" + score;\n } else {\n score -= gameLogic[c].value[q].points;\n remainingPoints -= gameLogic[c].value[q].points;\n if ((score < 2000) && (remainingPoints) == 0) {\n alert(\"Game Over\");\n document.querySelector(\"#Gameboard\").style.visibility = \"hidden\";\n };\n swal(\n \"Incorrect\",\n `I'm sorry, the correct answer is ${gameLogic[c].value[q].correctAnswer}`,\n \"error\"\n );\n document.querySelector(\".displaypoints\").textContent = \"$\" + score;\n };\n };\n };\n };\n };\n}", "function update_question_result(correct) {\n if (correct == true) {\n score++;\n return displayQuestionResult.innerText = \"Success!\";\n } else {\n return displayQuestionResult.innerText = \"Incorrect!\";\n }\n}", "function displayScore() {\r\n var score = $('<p>',{id: 'question'}); \r\n var numCorrect = 0;\r\n for (var i = 0; i < selections.length; i++) {\r\n if (selections[i] === questions[i].correctAnswer) {\r\n numCorrect++;\r\n }\r\n }\r\n \r\n score.append('You got ' + numCorrect + ' questions out of ' +\r\n questions.length + ' right!!!');\r\n return score;\r\n }" ]
[ "0.7731449", "0.7606274", "0.75470644", "0.7523671", "0.739199", "0.73683095", "0.733974", "0.7332711", "0.725763", "0.7246252", "0.72375065", "0.7236545", "0.7235316", "0.7233012", "0.7219098", "0.72053796", "0.7199229", "0.71969515", "0.7188333", "0.71645355", "0.71564496", "0.71519697", "0.71459514", "0.71345127", "0.71316123", "0.71234965", "0.7110385", "0.70993406", "0.7099295", "0.7097175", "0.7093721", "0.70633215", "0.7052956", "0.7050456", "0.7050119", "0.70483184", "0.7032364", "0.70319015", "0.7030982", "0.70277965", "0.70087487", "0.6999719", "0.6998594", "0.69910234", "0.69901615", "0.6988594", "0.6981307", "0.6977721", "0.6974361", "0.6971332", "0.6967462", "0.696572", "0.6963053", "0.6961208", "0.6959496", "0.6957319", "0.6954718", "0.6950331", "0.694787", "0.694516", "0.69414735", "0.6932788", "0.6931497", "0.6926336", "0.6923283", "0.69184905", "0.6914349", "0.6911607", "0.69104975", "0.6910053", "0.6898231", "0.6887998", "0.6884997", "0.68839455", "0.68826586", "0.68774486", "0.68765634", "0.6874792", "0.6872403", "0.68645793", "0.6863814", "0.6862524", "0.6862246", "0.6861707", "0.686157", "0.6858471", "0.6852803", "0.68477905", "0.68413275", "0.68378764", "0.6831295", "0.6827846", "0.6827613", "0.6827053", "0.6823042", "0.68218917", "0.6819899", "0.6819899", "0.6808436", "0.6805122", "0.68028957" ]
0.0
-1
These if and else if statements tell the webpage what to do when the user selects the "next" button. The user can only earn a maximum of '5' points. Once they have earned '5' points, the quiz will display a message saying, "end of quiz."
function next001() { if (a == "2") { message001.innerHTML = question001[1]; message002.innerHTML = options002; message003.innerHTML = ""; number001.innerHTML = a++; message004.innerHTML = ""; } else if (a == "3") { message001.innerHTML = question001[2]; message002.innerHTML = options003; message003.innerHTML = ""; number001.innerHTML = a++; message004.innerHTML = ""; } else if (a == "4") { message001.innerHTML = question001[3]; message002.innerHTML = options004; message003.innerHTML = ""; number001.innerHTML = a++; message004.innerHTML = ""; } else if (a == "5") { message001.innerHTML = question001[4]; message002.innerHTML = options005; message003.innerHTML = ""; number001.innerHTML = a++; message004.innerHTML = ""; } else { window.clearInterval(update); c = "-"; message001.innerHTML = "End of Quiz"; message002.innerHTML = ""; message003.innerHTML = ""; message004.innerHTML = "<button class=buttons002 onclick=repeat001()>Repeat</button>"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function nextQuestion(event) {\n\n\n // condition uses click event to add to user score if correct ansser is made //\n if (event.target.value === questions[currentQuesIndex].correctAns) {\n score++;\n } else {\n time -= 5;\n counter.textContent = time + \" Seconds left on quiz.\";\n }\n\n\n\n // Condition executes next question\n if (currentQuesIndex < questions.length) {\n currentQuesIndex++;\n // moves to next section once condition is met\n } if (currentQuesIndex === questions.length) {\n\n quizEl.style.display = \"none\";\n // this function call takes user to results section\n quizResults();\n return;\n\n }\n showQuestion();\n}", "function nextQuestion() {\n // - set user choice variable to input element that the user clicked on - \n let userChoice = document.querySelector('input[type=\"radio\"]:checked');\n // - if there are no input radio tag checked, alert user with prompt - \n if (!userChoice) {\n alert(`If you dont answer, you will be benched!`);\n return;\n }\n // - store a number thats based on the users choices, using the total data stored in its attributes - \n const answerScore = Number(userChoice.nextElementSibling.getAttribute('data-total'));\n // - add the answerScore variable to the score array created above - \n score.push(answerScore);\n // - store the amount that score array currently has - \n const finalScore = score.reduce((total, currentNum) => total + currentNum);\n // - add 1 to current mainQuestion amount -\n mainQuestion++\n // - specify whether the radio buttons should be checked or not - \n userChoice.checked = false;\n // - if main question is not == to total questions, play the audio function -\n if (mainQuestion !== totalQuestions) {\n playAudio()\n }\n // - if main question is equal to the 2nd last question, change text in DOM -\n if (mainQuestion == totalQuestions - 1) {\n nextButton.textContent = 'Finish';\n }\n // - when mainQuestion = totalQuestions - \n if (mainQuestion == totalQuestions) {\n // - hide the quizBox in the DOM -\n quiz.style.display = 'none';\n // - create empty variables - \n let pName;\n let pImage;\n let pImageClass;\n let pAwards;\n let pInfo;\n let pStats;\n let pMixtape;\n // - if finalScore is equal to a specific number range below, use information corresponding to the number and store it into empty variables above - \n if (finalScore >= 8 && finalScore <= 14) {\n pName = playerInfo.james.name;\n pImage = playerInfo.james.image;\n pAwards = playerInfo.james.awards;\n pInfo = playerInfo.james.info\n pStats = `Points: ${playerInfo.james.stats.points} | Rebounds: ${playerInfo.james.stats.rebounds} | Assists: ${playerInfo.james.stats.assists} | Steals: ${playerInfo.james.stats.steals} | Blocks: ${playerInfo.james.stats.blocks} | Field Goal: ${playerInfo.james.stats.fieldGoal}%`\n pMixtape = playerInfo.james.mixtape\n } else if (finalScore >= 15 && finalScore <= 20) {\n pName = playerInfo.jordan.name;\n pImage = playerInfo.jordan.image;\n pAwards = playerInfo.jordan.awards;\n pInfo = playerInfo.jordan.info;\n pStats = `Points: ${playerInfo.jordan.stats.points} | Rebounds: ${playerInfo.jordan.stats.rebounds} | Assists: ${playerInfo.jordan.stats.assists} | Steals: ${playerInfo.jordan.stats.steals} | Blocks: ${playerInfo.jordan.stats.blocks} | Field Goal: ${playerInfo.jordan.stats.fieldGoal}%`\n pMixtape = playerInfo.jordan.mixtape\n } else if (finalScore >= 21 && finalScore <= 26) {\n pName = playerInfo.magic.name;\n pImage = playerInfo.magic.image;\n pAwards = playerInfo.magic.awards;\n pInfo = playerInfo.magic.info;\n pStats = `Points: ${playerInfo.magic.stats.points} | Rebounds: ${playerInfo.magic.stats.rebounds} | Assists: ${playerInfo.magic.stats.assists} | Steals: ${playerInfo.magic.stats.steals} | Blocks: ${playerInfo.magic.stats.blocks} | Field Goal: ${playerInfo.magic.stats.fieldGoal}%`\n pMixtape = playerInfo.magic.mixtape\n } else if (finalScore >= 27 && finalScore <= 32) {\n pName = playerInfo.duncan.name;\n pImage = playerInfo.duncan.image;\n pImageClass = playerInfo.duncan.class;\n pAwards = playerInfo.duncan.awards;\n pInfo = playerInfo.duncan.info;\n pStats = `Points: ${playerInfo.duncan.stats.points} | Rebounds: ${playerInfo.duncan.stats.rebounds} | Assists: ${playerInfo.duncan.stats.assists} | Steals: ${playerInfo.duncan.stats.steals} | Blocks: ${playerInfo.duncan.stats.blocks} | Field Goal: ${playerInfo.duncan.stats.fieldGoal}%`\n pMixtape = playerInfo.duncan.mixtape\n }\n\n // - when information is stored into variables in the scope, display results to the DOM - \n results.innerHTML = `\n <h1> Your Score: ${finalScore}</h1>\n <div class=\"resultBox\">\n <a href=\"${pMixtape}\"><img class=\"${pImageClass}\" src=\"${pImage}\"></a>\n <h2>You are ${pName}!</h2>\n <p class=\"statsInfo\">${pAwards}</p>\n <p class=\"highlight\">${pInfo}</p>\n <h3>Career Statistics: (Per Game Average)</h3>\n <p class=\"statsInfo\">${pStats}</p>\n <span class=\"youtube\">*click the photo for ${pName} highlights!* </span> <a class=\"portfolio\" href=\"http://mcabrera.ca\">| MyPortfolio</a>\n </div>\n <button class=\"restart\"> Restart </button>`\n // - when results have been displayed, play audio function - \n playAudio();\n console.log('all images, audio are not mine and are owned by their respective creators');\n }\n // - when user clicks next question, call the createQuestions function that uses mainQuestion variable as the current number - \n createQuestions(mainQuestion);\n}", "function displayNext() {\n var question = $('#question');\n var wrong = $('#wrong');\n if (typeof(question) != 'undefined' && question != null) {\n question.remove();\n }\n\n if (typeof(wrong) != 'undefined' && wrong != null) {\n wrong.remove();\n }\n\n if(questionCounter < questions.length){\n var nextQuestion = createQuestionElement(questionCounter);\n quiz.append(nextQuestion);\n\n // Controls display of 'prev' button\n if(questionCounter >= 1){\n prev.show();\n next.show();\n replay.hide();\n } else if(questionCounter == 0){\n \n prev.hide();\n next.show();\n replay.hide();\n }\n } else {\n //display score\n var scoreElem = displayScore();\n var numWrong = 5 - scoreElem;\n var warning = '<p id=\\'wrong\\'\\>You have ' + numWrong + ' wrong ';\n if (numWrong == 1) {\n warning += 'question.';\n } else {\n warning += 'questions.';\n }\n\n warning += ' Please try again!</p>';\n quiz.append(warning);\n\n if (scoreElem == 5) {\n window.location.href = \"congratulation.html\";\n }\n\n prev.hide();\n next.hide();\n replay.show();\n\n }\n}", "function nextPage(event) {\n\n if (quizPageArray[pageIndex - 1].correct !== event.target.textContent) {\n startingTime -= 10;\n }\n\n if (pageIndex < 5) {\n questionEL.textContent = quizPageArray[pageIndex].question;\n answerOneEl.textContent = quizPageArray[pageIndex].answer1;\n answerTwoEl.textContent = quizPageArray[pageIndex].answer2;\n answerThreeEl.textContent = quizPageArray[pageIndex].answer3;\n answerFourEl.textContent = quizPageArray[pageIndex].answer4;\n pageIndex++;\n } else {\n window.localStorage.setItem('finalScore', startingTime);\n location.assign(\"scores.html\");\n }\n}", "function nextQuestion() {\n $(\".userAnswer\").remove();\n $(\".answerCheck\").show();\n if (this.id === currentQuestion[2][0]) {\n scoreTracker = scoreTracker + 1;\n $(\".answerCheck\").text(\"correct!\");\n } else {\n $(\".answerCheck\").text(\"incorrect!\");\n timePassed = timePassed + 4;\n }\n\n if (questionPlusAnswer < quizquestions.length - 1) {\n startQuiz();\n } else {\n finalScorePage();\n stopTimer();\n }\n }", "function selectAnswer(e) {\n \n const selectedButton = e.target; // get button user clicks on\n const correct = selectedButton.dataset.correct; // check to see if answer is correct\n setStatusClass(document.body, correct); // set to correct or wrong\n \n // go through each button\n Array.from(answerButtonsElement.children).forEach(button => {\n \n // call setStatusClass function, to see if answer is correct\n setStatusClass(button, button.dataset.correct);\n });\n \n // if answer is correct\n if (selectedButton.dataset = correct) {\n \n // increment number of questions user got correct\n correctNum++;\n }\n \n // if user is not on the last question\n if (shuffledQuestions.length > currentQuestionIndex + 1) {\n \n // Then show next button\n nextButton.classList.remove('hide');\n }\n \n // if user is on the last question\n else {\n \n // Get username from userInput\n var userInput = document.getElementById('myUserInput').value; // userinput\n\n // If user gets 0-4 questions correct\n if (correctNum <= 4) {\n intro.innerText = 'Game Over!';\n myScore.innerText = 'Final score for ' + userInput + ': ' + correctNum + ' / 20. \\n' + 'You are a failure. Get lost.';\n }\n \n // if user gets 5-11 questions correct\n else if (correctNum >= 5 && correctNum <= 11) {\n intro.innerText = 'Game Over!';\n myScore.innerText = 'Final score for ' + userInput + ': ' + correctNum + ' / 20. \\n' + 'Not bad. You can do better.';\n }\n \n // if user gets 12-16 questions correct\n else if (correctNum >= 12 && correctNum <= 16) {\n intro.innerText = 'Game Over!';\n myScore.innerText = 'Final score for ' + userInput + ': ' + correctNum + ' / 20. \\n' + 'You passed, you are an average player.';\n }\n \n // if user gets 17-19 questions correct\n else if (correctNum >= 17 && correctNum <= 19) {\n intro.innerText = 'Game Over!';\n myScore.innerText = 'Final score for ' + userInput + ': ' + correctNum + ' / 20. \\n' + 'Good job. You are a true Uncharted fan.';\n }\n \n // if user gets a perfect score (20 questions correct)\n else {\n intro.innerText = 'Game Over!';\n myScore.innerText = 'Final score for ' + userInput + ': ' + correctNum + ' / 20. \\n' + 'Perfect score! You are iBiza TwisT.';\n }\n\n \n startButton.innerText = 'Restart Quiz';\n message.innerText = 'Thanks for playing! For more information, visit our About page.';\n \n myMessage.classList.remove('hide');\n myScore.classList.remove('hide');\n intro.classList.remove('hide')\n startButton.classList.remove('hide');\n questionContainerElement.classList.add('hide');\n \n }\n \n}", "function nextQuestion() {\n currentQuestion++;\n \n if (currentQuestion < quiz.length) {\n displayQuestion();\n } else {\n showResult();\n }\n }", "function nextQuestion() {\n //error handling\n if (askedAlready.length >= questions.length) {\n throw \"NoQuestionsLeft\";\n }\n //a random number is picked\n currentQuestionIndex = (Math.floor((Math.random() * questions.length) + 1))-1;\n \n //an element on the page is assigned to a variable\n var questionOnPage = document.getElementById('question');\n //the text on the page is written as the contents of the current question\n questionOnPage.innerHTML = questions[currentQuestionIndex].question;\n //the four buttons are defined as variables\n var button1 = document.getElementById('a1');\n var button2 = document.getElementById('a2');\n var button3 = document.getElementById('a3');\n var button4 = document.getElementById('a4');\n //The buttons gain the text for the multiple choice answers\n button1.innerHTML = questions[currentQuestionIndex].a1;\n button2.innerHTML = questions[currentQuestionIndex].a2;\n button3.innerHTML = questions[currentQuestionIndex].a3;\n button4.innerHTML = questions[currentQuestionIndex].a4;\n //we count the number of turns\n var displayTurns = document.getElementById('turn-count');\n //on the page we grab a <p> tag that displays the turn count below\n displayTurns.textContent = turnsTaken + \" out of \" + turns;\n if (turnsTaken > turns) {\n //if all the turns are taken the button event handlers are disabled\n button1.disabled = true;\n button2.disabled = true;\n button3.disabled = true;\n button4.disabled = true;\n //calls a function that tabulates score results and updates them\n endResults();\n }\n}", "function showNext() {\n quiz.fadeOut(function() {\n $('#question').remove();\n\n if(quizCount < questions.length){\n var nextQuestion = createQuestionElement(quizCount);\n quiz.append(nextQuestion).fadeIn();\n if (!(isNaN(userInput[quizCount]))) {\n $('input[value='+userInput[quizCount]+']').prop('checked', true);\n }\n\n // show and hide buttons\n if(quizCount === 1){\n $('#prev').show();\n } else if(quizCount === 0){\n\n $('#prev').hide();\n $('#start').hide();\n $('#submit').hide()\n $('#reveal').hide()\n $('#next').show();\n\n } else if(quizCount === 4){\n\n $('#prev').show();\n $('#next').hide();\n $('#reveal').hide();\n $('#submit').show()\n\n }\n else if(quizCount === 5){\n\n $('#prev').show();\n $('#next').hide();\n $('#reveal').hide();\n $('#start').hide();\n $('#submit').hide()\n\n }\n\n\n } else {\n var scoreElem = displayScore();\n quiz.append(scoreElem).fadeIn();\n $('#next').hide();\n $('#prev').hide();\n $('#submit').hide();\n $('#start').show();\n $('#reveal').show();\n }\n });\n }", "function nextQuestion() {\n // get selected option\n var selectedOption = document.querySelector('input[type=radio]:checked');\n // if the user has not selected anything inform with a message\n if(!selectedOption) {\n alert('Please select one of the answers.');\n return;\n }\n // if the answers is correct increase the score\n var answer = selectedOption.value;\n if(questions[currentQuestion].answer == answer) {\n score++;\n }\n selectedOption.checked = false;\n currentQuestion++;\n // if it is the last question\n if(currentQuestion == totalQuestions - 1) {\n nextButton.textContent = 'Finish';\n }\n // display the results\n if(currentQuestion == totalQuestions) {\n container.style.display = 'none';\n resultContainer.style.display = 'block';\n resultText.textContent = 'Your score: ' + score + '/5';\n return;\n }\n // load next question\n loadQuestion(currentQuestion);\n}", "function nextQuestion() {\n showQuestion();\n //*********************************** */\n // this logic is implemented because unable to check whether event listener for first round exists with button\n if (startButton.textContent !== \"Retake Quiz\") {\n addEventListenerToButtons(questionIndex);\n }\n //*********************************** */\n}", "function loadNextQuestion() {\r\n var selectOption = document.querySelector('input[type=radio] : checked');\r\n var answerFromPlayer = selectOption.value;\r\n \r\n if (!selectOption) {\r\n alert('Please select your answer or You will not get mark for this question');\r\n return ;\r\n }\r\n if (questions[currentQuestion].answer == answerFromPlayer) {\r\n correct++;\r\n }\r\n selectOption.checked = false;\r\n currentQuestion++;\r\n \r\n if (currentQuestion == questions.length - 1) {\r\n nextButton.textContent = \"You finished the quiz. Let see how many correct questions you got\";\r\n nextButton.style.width = \"400px\";\r\n }\r\n if (currentQuestion == questions.length) {\r\n contain.style.display = \"none\";\r\n document.getAnimations(\"result\").style.display = \" \";\r\n document.getAnimations(\"result\").style.display = \"You got \" + correct + \" answers.\";\r\n document.getElementById(\"score\").textContent = score;\r\n return;\r\n }\r\n if (correct <= 5) {\r\n document.getElementById(\"message\").textContent = messages[1];\r\n document.getElementById(\"gif-source\").textContent = video[3];\r\n }\r\n if (correct <= 7) {\r\n document.getElementById(\"message\").textContent = messages[3];\r\n document.getElementById(\"gif-source\").textContent = video[1];\r\n }\r\n if (correct == 10 ) {\r\n document.getElementById(\"message\").textContent = messages[2];\r\n document.getElementById(\"gif-source\").textContent = video[2];\r\n }\r\n loadQuestion(currentQuestion);\r\n\r\n}", "function nextQuestion() {\n if (currentQuestion <= 4) {\n reset();\n displayQuestions();\n displayChoices();\n console.log(currentQuestion);\n } else {\n gameOver();\n }\n}", "function nextQuestion() {\n\n if (currentQuestion < lastQuestion) {\n currentQuestion++;\n showQuestion();\n } else {\n endQuiz();\n }\n}", "function nextQuestion() {\r\n if (STORE.questionNumber < STORE.questions.length - 1) {\r\n STORE.submittedAnswer = false;\r\n STORE.view = 'question';\r\n STORE.questionNumber++;\r\n }\r\n else {\r\n STORE.view = 'score';\r\n finalScore();\r\n }\r\n}", "function handleQuizResult() {\n $('.next-button').on('click', function(event){\n handleQuizResult();\n });\n if (STORE.currentQuestionIndex === STORE.questions.length) {\n $('#final-correct').html(\"\");\n $('#final-correct').append(`<h4>You got ${STORE.score} out of 10 correct!</h4>`);\n $('#js-results-page').show();\n $('#js-quiz-page').hide();\n $('#js-feedback-correct').hide();\n $('#js-feedback-incorrect').hide();\n $('#js-starting-screen').hide();\n } else {\n renderQuestion();\n }\n console.log('handleQuizResult` ran');\n}", "function nextQuestion(){\n questionIndex++\n if (theQuestions.length > questionIndex){\n showQuestion()\n } else {\n quizEnd()\n }\n}", "function next() {\ncurrentQuestion++;\n\nif (currentQuestion > questions.length - 1) {\n\tendGame();\n\treturn;\n}\n\nvar quizContent = \"<h2>\" + questions[currentQuestion].title + \"</h2>\"\n\nfor (var buttonLoop = 0; buttonLoop < questions[currentQuestion].choices.length; buttonLoop++) {\n\tvar buttonCode = \"<button onclick=\\\"[ANS]\\\">[CHOICE]</button>\"; \n\tbuttonCode = buttonCode.replace(\"[CHOICE]\", questions[currentQuestion].choices[buttonLoop]);\n\tif (questions[currentQuestion].choices[buttonLoop] == questions[currentQuestion].answer) {\n\t\tbuttonCode = buttonCode.replace(\"[ANS]\", \"correct()\");\n\t} else {\n\t\tbuttonCode = buttonCode.replace(\"[ANS]\", \"incorrect()\");\n\t}\n\tquizContent += buttonCode\n}\n\n\ndocument.getElementById(\"quizBody\").innerHTML = quizContent;\n}", "function nextQuestion () {\n console.log('number of clicks=' + clickCount)\n clickCount += 1\n if (clickCount === 10) {\n // alert('Game Over!')\n if (player1score > player2score) {\n alert('Game over! Player 1 wins!')\n } else if (player2score > player1score) {\n alert('Game over! Player 2 wins!')\n } else {\n alert('Game over! Draw!')\n }\n } else {\n console.log('number of clicks=' + clickCount)\n // update the question numbering base on the click.\n $('#number').text(questionsNumber[clickCount])\n // update to the next question base on the click.\n $('#quiz').text(questions[clickCount].question)\n $('.choice').eq(0).text(questions[clickCount].choices[0])\n $('.choice').eq(1).text(questions[clickCount].choices[1])\n $('.choice').eq(2).text(questions[clickCount].choices[2])\n $('.choice').eq(3).text(questions[clickCount].choices[3])\n $('.choice').eq(4).text(questions[clickCount].choices[4])\n }\n }", "function handleNextQuestion() { \n $('.quiz-field').on('click', '.next-question', () => {\n currentQuestion += 1;\n if (currentQuestion > questions.length) {\n finalScore();\n } else {\n loadNextQuestion();\n }\n });\n }", "function nextQuestion(){\t\n\t\thideAnswerBox();\n\t\tremovePosters();\n\t\tstopAudio();\n\t\tquestionCount++;\n\t\t\n\t\tif (questionCount > 9) {\n\t\t\tendGame();\n\t\t\tshowOverlay($('.endGame'));\n\t\t}\n\t\telse if (questionCount > 4 && gameCount < 1) {\n\t\t\tendRound();\n\t\t\tshowOverlay($('.end_round'));\n\t\t}\n\t\telse {\n\t\t\tupdateQuestion();\n\t\t\tplayAudio();\n\t\t}\n\t}", "function quizUser() // TODO Implement actual timer\n{\n if (questionNum > 5)\n {\n endQuiz(timer.toFixed(2));\n return;\n }\n\n // Get question and populate relevent text in quizzer\n let question = quiz[questionNum-1];\n txt_question.innerHTML = question.q;\n btn_answer1.innerHTML = question.o[0];\n btn_answer2.innerHTML = question.o[1];\n btn_answer3.innerHTML = question.o[2];\n btn_answer4.innerHTML = question.o[3];\n}", "function nextQuestion() {\n questionNumber++;\n\n // empty text area and remove message\n $(\"#correct\").fadeIn(500).addClass(\"d-none\");\n $(\"#input-answer\").val(\"\");\n $(\"#input-answer\").css(\"color\", \"#212429\");\n\n arrayPositionSelect++;\n if (questionNumber < 5 && numberOfLives >= 0) {\n showQuestion(); // Dont need to call generate question (all questions generated)\n } else if (questionNumber > 4 && numberOfLives >= 0) {\n roundComplete();\n // Start Round\n } else if (numberOfLives < 0) {\n gameOver();\n }\n}", "function nextQuestion() {\n currentQuestion += 1;\n if (currentQuestion !== 15) {\n showQuiz();\n } else {\n question.textContent = \"\";\n optionA.textContent = \"\";\n optionB.textContent = \"\";\n optionC.textContent = \"\";\n optionD.textContent = \"\";\n clearInterval(timerInterval);\n userInitials = prompt(\n \"You've answered all the questions! Enter your initials: \"\n );\n let newDiv = document.createElement(\"div\");\n newDiv.textContent = `You scored ${score} points! Your highscore has been registered under initials ${userInitials}.`;\n newDiv.setAttribute(\"id\", \"victory\");\n answers.appendChild(newDiv);\n // Save result to local storage\n if (score > localStorage.getItem(userInitials)) {\n localStorage.setItem(userInitials, score);\n }\n // Enable restart button after quiz ends\n beginBtn.disabled = true;\n highscoreBtn.disabled = false;\n restartBtn.disabled = false;\n }\n}", "function nextQuestion() {\n\tif (questionNumber < 6) {\n\tquestionNumber++;\n\tshowTriviaGame();\n\tquestionTimer = 30;\n\tgameTimer();\n\t}\n\telse {\n\t\tresultsScreen();\n\t\t$(\"#results\").show();\n\t}\n}", "function nextQuestion(){\n $(\"#alerts\").hide();\n       currentQuestion = triviaQuestions[currentQuestionIndex + 1];\n       currentQuestionIndex++;\n if (currentQuestionIndex >= 10) {\n $(\"#alerts\").html(\"<h2> Nice job! Click the Start 90s Trivia button to play again! <br> Questions Correct: \" + correctAnswers.length + \" <br> Questions Incorrect: \" + incorrectAnswers.length + \" </h2>\");\n $(\"#alerts\").show();\n stopTimer();\n } else {\n       displayQuestion(currentQuestion);\n };\n    }", "function loadNextQuestion() {\n var selectedOption = document.querySelector('input[type=radio]:checked');\n if(!selectedOption){\n alert('Choose an answer!');\n return;\n }\n var answer = selectedOption.value;\n if(questions[currentQuestion].answer == answer){\n score += 20;\n secs += 5;\n }\n if(questions[currentQuestion].answer != answer){\n secs -= 25;\n }\n selectedOption.checked = false\n currentQuestion++;\n \n \n if(currentQuestion == totQuestions - 1){\n nextButton.textContent = 'finished';\n }\n if(currentQuestion == totQuestions){\n container.style.display = 'none';\n resultCont.style.display = '';\n resultCont.textContent = \"Your score:\" + score;\n return;\n }\n loadQuestion(currentQuestion);\n }", "function nextQuestion(){\n if(runningQuestion < lastQuestion){\n runningQuestion++;\n showQuestion();\n } else{\n endQuiz();\n }\n}", "function displayNext() {\n quiz.fadeOut(function() {\n $('#question').remove();\n\n if(questionCounter < questions.length){\n var nextQuestion = createQuestionElement(questionCounter);\n quiz.append(nextQuestion).fadeIn();\n if (!(isNaN(selections[questionCounter]))) {\n $('input[value='+selections[questionCounter]+']').prop('checked', true);\n }\n\n // Controls display of 'prev' button\n if(questionCounter === 1){\n $('#prev').show();\n } else if(questionCounter === 0){\n\n $('#prev').hide();\n $('#next').show();\n }\n }else {\n console.log(\"inside else\");\n displayScore();\n //var scoreElem = displayScore();\n //quiz.append(scoreElem).fadeIn();\n $('#next').hide();\n $('#prev').hide();\n $('#start').show();\n }\n });\n }", "function nextQuestion() {\n\t\tqCounter++;\n\t\t// clears previous selection\n\t\t$(\"input[name='choice']\").prop(\"checked\", false);\n\n\t\t// checks to see if qCounter is equal to 10\n if (qCounter == 10) {\n\t \tstopwatch.stop();\n\t $(\"#main\").hide();\n\t $(\"#end\").show();\n\t $(\"#final-score\").html(\"<h2>You got \" + correct + \" out of \" + questions.length + \" questions correct!\");\n }\n\n //calls displayQuestions\n stopwatch.stop();\n displayQuestions();\n }", "function checkAnswer() {\n if (document.getElementById(\"true\").selected) {\n processAnswer(\"true\");\n }\n else {\n processAnswer(\"false\");\n }\n // get next question if not asked all yet\n if (questionsAsked < 10) {\n setQuestion();\n }\n // final question asked show prompt.\n else {\n alert(\"Quiz complete! You got \" + totalCorrect + \" correct out of 10.\");\n\n }\n\n // update totals\n document.getElementById(\"qnr\").innerHTML = \"Question:\" + questionsAsked;\n document.getElementById(\"score\").innerHTML = \"Score:\" + totalCorrect;\n\n}", "function next() {\n var currentQuestions = questions[counter];\n counter++;\n\n var quizContent = \"<h2>\" + currentQuestions.question + \"</h2>\";\n\n for (var i = 0; i < currentQuestions.option.length; i++) {\n var buttonCode = '<button onclick=\"Answer\">[options]</button>';\n\n buttonCode = buttonCode.replace(\"[options]\", currentQuestions.option[i]);\n\n if (currentQuestions.option[i] == currentQuestions.answer) {\n buttonCode = buttonCode.replace(\"Answer\", \"correct()\");\n score += 10;\n\n next();\n } else {\n buttonCode = buttonCode.replace(\"Answer\", \"incorrect()\");\n timeLeft -= 10;\n\n next();\n }\n\n quizContent += buttonCode;\n }\n if (counter >= questions.length - 1) {\n endGame();\n\n return;\n }\n document.getElementById(\"quizContainer\").innerHTML = quizContent;\n}", "function nextQuestion() {\n if (correctAnswers === 5) {\n setQuizStarted(!quizStarted);\n } else {\n let oldBird = correctBird;\n setAnswerType('none_yet');\n setAnswered(false);\n setCorrectBird(randomize(\"correct\", oldBird));\n }\n }", "function checkNextQuestion() {\n // increment and check if there are more questions\n document.getElementById(\"progress\").value = number++;\n questionIndex++;\n if (questionIndex < questions.length) {\n console.log(\"next question\");\n printQuestion(questionIndex);\n } else {\n console.log(\"stop quiz\");\n stopQuiz();\n }\n}", "function nextQuestion(){\r\n if(i<questionBank.length-1)\r\n {\r\n i=i+1;\r\n displayQuestion();\r\n }\r\n else{\r\n points.innerHTML= score+ '/'+ questionBank.length;\r\n quizContainer.style.display= 'none';\r\n scoreboard.style.display= 'block'\r\n }\r\n}", "function selectAnswer(e) {\n const selectedButton = e.target\n const correct = selectedButton.dataset.correct\n setStatusClass(document.body, correct)\n// if user answered correctly it will increase in score\n if (selectedButton.dataset = correct) {\n userScore++;\n keepingScore.innerText = 'score = ' + userScore\n}\n// else reduce timer with 5 sec\n else {\n timer = timer -5\n }\n// show the next question in the quiz list\ncurrentQuestionIndex++\n setNextQuestion()\n}", "function nextQuestion(){\n previousQuestion = document.querySelector(\".\" + sectionArray[nextSectionIndex]);\n previousQuestion.style.display = \"none\";\n\n nextQuestionIndex++;\n nextSectionIndex++;\n \n // When the user gets to the last question, final score section will display. Otherwise, displays another question from the list in object\n if(nextQuestionIndex === lastQuestionIndex) {\n finalScoreMessage();\n } else {\n questionList();\n } \n}", "function next_question() {\n currentQuestion++;\n if (currentQuestion < quizLength + 1) {\n _(\"submitter\").onclick = process_answer_submission;\n _(\"next\").onclick = next_question;\n _(\"submitter\").style.visibility =\"visible\";\n _(\"user_input\").style.visibility = \"visible\";\n _(questions[currentQuestion].id).style.display = \"block\";\n _(questions[currentQuestion - 1].id).style.display = \"none\";\n _(\"choice\").value = \"\";\n }\n else {\n var percent = (numCorrect/quizLength) * 100;\n _(\"total_result\").innerText = (\"You answered \" + numCorrect + \" of \" + quizLength + \" questions correctly, for a score of \" + percent + \"%!\");\n _(\"next\").style.visibility = \"hidden\";\n }\n return _(\"question_result\").innerText = \"\";\n}", "function nextQuestion(event) {\n event.preventDefault();\n questionCounter++;\n render(questionCounter);\n answerButtons.appendChild(line);\n answerButtons.appendChild(responseAlert);\n\n // Alert correct or wrong\n if (\n event.target.textContent.slice(3) ===\n questionAndAnswer[questionCounter - 1].correctAnswer\n ) {\n responseAlert.textContent = \"Correct!\";\n } else {\n responseAlert.textContent = \"Wrong!\";\n timeLeft = timeLeft - 10;\n }\n}", "function checkAnswer() {\n hideQuiz();\n\n if(userAnswer === correctAnswer) {\n $('#feedback').append('<h1>Correct!</h1>');\n $('#answer-image').attr('src', questions[counter].image);\n $('#feedback').append('<h2>' + questions[counter].funFact + '</h2>');\n $('#feedback').append('<button id=\"next-btn\">Next</button>');\n $('#feedback').show();\n numCorrect++;\n }\n else{\n $('#feedback').append('<h1><span id=\"wrong\">Incorrect</span></h1>');\n $('#answer-image').attr('src', questions[counter].image);\n $('#feedback').append('<h2>' + questions[counter].funFact + '</h2>');\n $('#feedback').append('<button id=\"next-btn\">Next</button>');\n $('#feedback').show();\n }\n}", "function showNextQuestion(){\n\t$(\".wrapper\").show();\n\t$(\".answer-box\").hide();\n\t// $(\".flip-container\").flip(false);\n\t\n\tif(nextQuestionIndex < questions.length){\n\t\tshowQuestions(questions[nextQuestionIndex].question, questions[nextQuestionIndex].options, questions[nextQuestionIndex].answerIndex);\n\t\t$(\".number-counter\").html(\"<p>Question \" + questionCounter + \" of 5</p>\");\n\t\tquestionCounter++;\n\t}\n\telse{\n\t\tshowUserScore();\n\t}\n}", "function next() {\n currentQuestion++;\n\n if (currentQuestion > trivia.length - 1) {\n endGame();\n return;\n }\n\n var quizContent = \"<h2>\" + trivia[currentQuestion].triviaQuestion + \"</h2>\"\n\n for (var buttonLoop = 0; buttonLoop < trivia[currentQuestion].choice.length; buttonLoop++) {\n var buttonCode = \"<button class='answerButton' onclick=\\\"[ANS]\\\">[CHOICE]</button>\";\n buttonCode = buttonCode.replace(\"[CHOICE]\", trivia[currentQuestion].choice[buttonLoop]);\n if (trivia[currentQuestion].choice[buttonLoop] == trivia[currentQuestion].answer) {\n buttonCode = buttonCode.replace(\"[ANS]\", \"correct()\");\n } else {\n buttonCode = buttonCode.replace(\"[ANS]\", \"incorrect()\");\n }\n quizContent += buttonCode\n }\n\n document.getElementById(\"quizBody\").innerHTML = quizContent;\n}", "function nextQuestion() {\n //creates a jQuery object listening for the nextQuestion\n //click event that...\n $(\"#nextQuestion\").click(e => {\n //asks if the currentQuestion value of STORE is less than the length \n //property of the questions array within STORE. and if it is...\n if (STORE.currentQuestion < STORE.questions.length - 1) {\n //adds one to the currentQuestion value, iterating through the questions\n //contained in STORE,\n STORE.currentQuestion++;\n //if there are more questions left, sets the page to \"question\" in STORE.\n STORE.page = \"question\";\n } else {//if no more questions remain, it sets the page value of STORE to \"endScore\".\n STORE.page = \"endScore\";\n }\n //then renders the correct page.\n render();\n });\n}", "function nextQuestion() {\n\tif (question_counter < questions.length - 1) {\n\t\tquestion_counter++;\n\t\tquestion_button_default.style.display = \"none\";\n\t\tquestion_button_default.classList.remove('btn--wrong')\n\t\tquestion_button_default.classList.remove('btn--correct')\n\t\tshowQuestions(question_counter)\n\t} else {\n\t\tconsole.log('> No more questions: Staph');\n\t\tshowResultBox();\n\t}\n}", "function loadNextQuestion () {\n let selectedOption = document.querySelector('input[type=radio]:checked')\n if (!selectedOption){\n alert(\"Please select your answer!\")\n return\n }\n let answer = selectedOption.value \n //console.log(answer)\n if(questions[currentQuestion].answer == answer){\n score += 10\n }\n //console.log(questions[currentQuestion].answer)\n selectedOption.checked = false\n currentQuestion++\n if (currentQuestion == totalQuestion - 1){\n nextButton.textContent = 'Finish'\n }\n if (currentQuestion == totalQuestion){\n container.style.display = 'none'\n resultCont.style.display = \"\"\n resultCont.textContent = 'Your Score: ' + score\n resetButton.style.display = \"\"\n return\n }\n loadQuestion(currentQuestion)\n}", "function nextQuestion() {\n questionsIndex++\n console.log(\"click worked!\")\n\n if (questionsIndex === questions.length) {\n endQuiz()\n } else {\n generateQuestion()\n }\n\n}", "function checkAnswer(event) {\n //Get the answer number of the button that was clicked on, as well as what the correct answer number should be.\n var answerNo = event.target.parentElement.getAttribute(\"data-index\");\n correctNo = questions[questNo].correct;\n\n //If they got the question correct, inform the player and increase their score\n if (answerNo == correctNo) {\n playerScore += 5;\n questResult.textContent = \"Correct!\"\n questResultDisplayed = true;\n }\n //Otherwise, subtract time from the timer\n else {\n quizCountdown -= 5;\n questResult.textContent = \"Incorrect\"\n questResultDisplayed = true;\n //If that would push the counter negative, clear the interval and display the end screen\n if (quizCountdown <= 0) {\n quizCountdown = 0;\n timer.textContent = \"Timer: \" + quizCountdown;\n quizText.textContent = \"\";\n endQuiz();\n return;\n }\n }\n\n //Increase the question number and display next question.\n questNo++;\n if (questNo < questions.length) {\n console.log(\"got here \" + questNo);\n showQuestions();\n }\n //Otherwise, show end screen of quiz.\n else {\n timer.textContent = \"\";\n endQuiz();\n }\n\n}", "function displayNext() {\n quiz.fadeOut(function() {\n $('#question').remove();\n\n if (questionCounter < questions.length) {\n var nextQuestion = createQuestionElement(questionCounter);\n quiz.append(nextQuestion).fadeIn();\n if (!(isNaN(selections[questionCounter]))) {\n $('input[value=' + selections[questionCounter] + ']').prop('checked', true);\n }\n\n // Controls display of 'prev' button\n if (questionCounter === 1) {\n $('#prev').show();\n } else if (questionCounter === 0) {\n\n $('#prev').hide();\n $('#next').show();\n }\n } else {\n window.location.href = \"results.html\";\n $('#next').hide();\n $('#prev').hide();\n $('#start').show();\n }\n });\n }", "function introQ(evt){\nlet event = evt;\n if (evt == 'yes'){\n addScore('Compliant', 5)\n first.style.display = \"none\";\n ypage.style.display = \"inline-block\"; \n } else if (evt == \"y1\"){\n addScore('Compliant', 3)\n beginQuiz('y')\n }else if (evt == \"y2\"){\n addScore('Compliant', 2)\n beginQuiz('y')\n }else if (evt == \"y3\"){\n addScore('Compliant', 1)\n beginQuiz('y')\n }else if (evt == \"y4\"){\n addScore('Fool', 5)\n beginQuiz('y')\n } else if (evt == 'no'){\n addScore('Resistant', 5)\n addScore('Troll', 5)\n first.style.display = \"none\";\n npage.style.display = \"inline-block\";\n } else if (evt == \"n1\"){\n addScore('Resistant', 3)\n beginQuiz('n')\n } else if (evt == \"n2\"){\n addScore('Resistant', 2)\n beginQuiz('n')\n } else if (evt == \"n3\"){\n addScore('Resistant', 1)\n beginQuiz('n')\n } else if (evt == \"n4\"){\n addScore('Fool', 5)\n beginQuiz('n')\n } \n}", "function nextQuestion(e) {\n var isCorrect = e.target.getAttribute(\"data-correct\");\n //take away time if they choose the wrong answer and shake elements\n if (!isCorrect) {\n timer -= 12;\n $questionBox.addClass('shake');\n $timer.addClass('shakeTime');\n setTimeout(() => {\n $questionBox.removeClass('shake');\n $timer.removeClass('shakeTime');\n }, 300)\n //otherwise, bounce the question box\n } else {\n $questionBox.addClass('bounce');\n setTimeout(() => {\n $questionBox.removeClass('bounce');\n }, 300);\n }\n //update progress bar\n updateProgress(isCorrect);\n qNumber++;\n //if you have reached the end of the questions, end the quiz\n qNumber < questions.length ? loadQuestion(questions, qNumber) : endQuiz();\n }", "function next_button() {\n clear_answer();\n clear_question_result();\n round++;\n document.getElementById(\"submitter\").style.visibility=\"visible\";\n if (is_game_over() === true) {\n final_total();\n } else {\n next_question();\n }\n}", "function selectAnswer(userPick) {\n var selectedButton = userPick.target\n var correct = selectedButton.dataset.correct\n Array.from(answerButtons.children).forEach(button => {\n correctAnswerDetection(button, button.dataset.correct)\n })\n correctAnswerDetection(document.body, correct)\n // This If statement is how the Program knows where to finish, this code checks if the questions are running out, if so the code\n // is Executed\n if (shuffledQuestions.length > currentQuestionIndex + 1) {\n nextButton.classList.remove('hide')\n } else {\n seeScoreBtn.classList.remove('hide')\n }\n}", "function displayNext() {\n quiz.fadeOut(function() {\n $('#question').remove();\n \n if(questionCounter < questions.length){\n var nextQuestion = createQuestionElement(questionCounter);\n quiz.append(nextQuestion).fadeIn();\n if (!(isNaN(selections[questionCounter]))) {\n $('input[value='+selections[questionCounter]+']').prop('checked', true);\n }\n \n // Controls display of 'prev' button\n if(questionCounter === 1){\n $('#prev').show();\n } else if(questionCounter === 0){\n \n $('#prev').hide();\n $('#next').show();\n }\n }else {\n var scoreElem = displayScore();\n quiz.append(scoreElem).fadeIn();\n $('#next').hide();\n $('#prev').hide();\n $('#start').show();\n }\n });\n }", "function questionCounter() {\n if(STORE.currentQuestion <= 4) {\n renderQuiz(STORE.currentQuestion);\n console.log(\"We just passed \" + STORE.currentQuestion + \"to renderQuiz\")\n STORE.currentQuestion++;\n } else {\n showResultsAndRetake();\n }\n\n}", "function nextQuestion() {\n document.querySelectorAll(\".ansBtn\").forEach(ans => {\n ans.addEventListener(\"click\", function (e) {\n checkAnswer(e);\n\n questionIndex++;\n answerButtonEl.innerHTML = \"\";\n\n if (questionIndex < quizQuestions.length) {\n console.log(\"show\");\n showQuestion();\n } else {\n viewGameOverScreen();\n }\n })\n })\n}", "function displayNext() {\n quiz.fadeOut(function() {\n $('#question').remove();\n \n if(questionCounter < gameQuestions.length){\n var nextQuestion = createQuestionElement(questionCounter);\n quiz.append(nextQuestion).fadeIn();\n if (!(isNaN(selections[questionCounter]))) {\n $('input[value='+selections[questionCounter]+']').prop('checked', true);\n }\n \n // Controls display of next and restart\n if(questionCounter === 0){\n \n $('#start').hide();\n $('#next').show();\n $('#start-over').hide();\n $('#quiz-time-left').show();\n }\n }else {\n var scoreElem = displayScore();\n quiz.append(scoreElem).fadeIn();\n $('#next').hide();\n $('#start').hide();\n $('#start-over').show();\n $('#quiz-time-left').hide();\n $('#gameOver').hide();\n }\n });\n }", "function displayNext() {\n quiz.fadeOut(function() {\n $('#question').remove();\n if(questionCounter < questions.length){\n var nextQuestion = createQuestionElement(questionCounter);\n quiz.append(nextQuestion).fadeIn();\n if (!(isNaN(selections[questionCounter]))) {\n $('input[value='+selections[questionCounter]+']').prop('checked', true);\n }\n \n // Controls display of 'prev' button\n if(questionCounter === 1){\n $('#prev').show();\n } else if(questionCounter === 0){\n \n $('#prev').hide();\n $('#next').show();\n }\n }else {\n var scoreElem = displayScore();\n quiz.append(scoreElem).fadeIn();\n // $('#next').hide();\n // $('#prev').hide();\n // $('#start').show();\n\n }\n });\n }", "function theSelection(){\n \n theSelectionScore +=1;\n //so every time this function is used, it increases the counter by 1\nquestionCount +=1;\n alert(\"The Selection Score went up!\");\n \n //how do we know when to end the quiz and show results? thats what the questionCount variable is for!\n \n if (questionCount >=3){\n \n updateResult();\n \n}\n \n}", "function quiz()\r\n{\r\n\tif(!quizstarted)\r\n\t{\r\n\t\tdocument.getElementById(\"options\").innerHTML=format;\r\n\t\t// document.getElementById(\"q\").style.height=\"50px\";\r\n\t\tdocument.getElementById(\"q\").innerHTML=questions[qno].question;\r\n\t\tdocument.getElementById(\"op1text\").innerHTML=questions[qno].options[0];\r\n\t\tdocument.getElementById(\"op2text\").innerHTML=questions[qno].options[1];\r\n\t\tdocument.getElementById(\"op3text\").innerHTML=questions[qno].options[2];\r\n\t\tdocument.getElementById(\"op4text\").innerHTML=questions[qno].options[3];\r\n\t\tdocument.getElementById(\"next\").innerHTML=\"Next\";\r\n\t\tlet g=gifs[Math.floor(Math.random()*(gifs.length-1))]\r\n\t\tdocument.getElementById(\"buttons\").style.backgroundImage=`url(\"images/${g}.gif\")`;\r\n\t\t// console.log(g);\r\n\t\tquizstarted=true;\r\n\t\tdisplayquote=true;\r\n\t}\r\n\r\n\telse if(displayquote)\r\n\t{\r\n\t\tif( ! (document.getElementById(\"1\").checked || document.getElementById(\"2\").checked || document.getElementById(\"3\").checked || document.getElementById(\"4\").checked ) )\r\n\t\t{\r\n\t\t\talert(\"Please select an option\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tlet res=1;\r\n\r\n\t\tif(document.getElementById(\"1\").checked) res=1;\r\n\t\telse if(document.getElementById(\"2\").checked) res=2;\r\n\t\telse if(document.getElementById(\"3\").checked) res=3;\r\n\t\telse res=4;\r\n\r\n\t\tif(questions[qno].reverse) res=5-res;\r\n\r\n\t\tscore+=res;\r\n\r\n\t\tdocument.getElementById(\"options\").innerHTML=``;\r\n\t\tdocument.getElementById(\"q\").innerHTML=questions[qno].quote;\r\n\t\tqno++;\r\n\t\tdisplayquote=false;\r\n\t}\r\n\r\n\telse\r\n\t{\r\n\t\t\r\n\t\tif(qno>=questions.length)\r\n\t\t{\r\n\t\t\tdocument.getElementById(\"next\").innerHTML=\"Start\";\r\n\t\t\t// document.getElementById(\"q\").innerHTML=`Great work ${user}, Your score was ${score}. Click on Start to play again`;\r\n\t\t\tlet displaytext=\"\";\r\n\t\t\tconsole.log(score);\r\n\t\t\tif(score>=10 && score<=20)\r\n\t\t\t{\r\n\t\t\t\tdisplaytext=`We highly appreciate the effort put in by you,${user}! Make sure to never overlook your efforts and learn to control your negative thoughts by filling your mind with positive ones. There will always exist things that will bring you joy. Never let yourself forget about them by focusing just on the ones which bring you pain.`;\r\n\t\t\t}\r\n\t\t\telse if(score>=21 && score<=30)\r\n\t\t\t{\r\n\t\t\t\tdisplaytext=`You did well, ${user}. Just never let yourself focus on the things you can't change but instead work on changing those that you can. Never get attached to your burdens more than the burdens are attached to you and you will be good to go!`;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tdisplaytext=`Great job, ${user}! Make sure not to let stress or negativity ever take over you and you will surely enjoy each and every day of your life!`;\r\n\t\t\t}\r\n\t\t\tdisplaytext+=\"\\nClick on start to play again!\";\r\n\t\t\tdocument.getElementById(\"q\").innerHTML=displaytext;\r\n\t\t\tdocument.getElementById(\"options\").innerHTML=\"\";\r\n\t\t\tqno=0;\r\n\t\t\tquizstarted=false;\r\n\t\t\tscore=0;\r\n\t\t\tdocument.getElementById(\"buttons\").style.backgroundImage=`url(\"images/q.gif\")`;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tdocument.getElementById(\"options\").innerHTML=format;\r\n\t\t\t// document.getElementById(\"q\").style.height=\"50px\";\r\n\t\t\tdocument.getElementById(\"q\").innerHTML=questions[qno].question;\r\n\t\t\tdocument.getElementById(\"op1text\").innerHTML=questions[qno].options[0];\r\n\t\t\tdocument.getElementById(\"op2text\").innerHTML=questions[qno].options[1];\r\n\t\t\tdocument.getElementById(\"op3text\").innerHTML=questions[qno].options[2];\r\n\t\t\tdocument.getElementById(\"op4text\").innerHTML=questions[qno].options[3];\r\n\t\t\tdisplayquote=true;\r\n\t\t\tlet g=gifs[Math.floor(Math.random()*(gifs.length-1))]\r\n\t\t\tdocument.getElementById(\"buttons\").style.backgroundImage=`url(\"images/${g}.gif\")`;\r\n\t\t\tconsole.log(g);\r\n\t\t}\r\n\r\n\t}\r\n}", "function nextQuestion() {\n questionProgress();\n renderQuiz();\n}", "function displayNext() {\n quiz.fadeOut(function() {\n $('#question').remove();\n\n if(questionCounter < questions.length){\n let nextQuestion = createQuestionElement(questionCounter);\n quiz.append(nextQuestion).fadeIn();\n if (!(isNaN(selections[questionCounter]))) {\n $('input[value='+selections[questionCounter]+']').prop('checked', true);\n }\n\n // Controls display of 'prev' button\n if(questionCounter === 1){\n /*$('#prev').show();*/\n } else if(questionCounter === 0){\n\n /*$('#prev').hide();*/\n $('#next').show();\n }\n }else {\n let scoreElem = displayScore();\n quiz.append(scoreElem).fadeIn();\n $('#next').hide();\n /*$('#prev').hide();*/\n $('#start').show();\n }\n });\n }", "function nextQuestion()\n\t\t\t{\n\t\t\t\t$(\"#oneword\").hide();\n\t\t\t\t$(\"#multiple\").hide();\n\n\t\t\t\tif(count >= 10)\n\t\t\t\t{\n\t\t\t\t\tcount = 0;\n\t\t\t\t\tendQuiz();\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t\n\t\t\t\t\tcount++;\n\n\t\t\t\t\t//get the question object for next question\n\t\t\t\t\tif(day%2 == 0)\n\t\t\t\t\t\tquestion = getQuestion(randomArr[count-1]);\n\t\t\t\t\telse\n\t\t\t\t\t\tquestion = getQuestion(randomArr[count-1]);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif(count > 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t//update the progress bar\n\t\t\t\t\t\tprogressBar();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t//update the score\n\t\t\t\t\t\tupdateScore();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t//reset the form values\n\t\t\t\t\t\tdocument.getElementById(\"formName\").reset();\n\t\t\t\t\t}\n\n\t\t\t\t\t\n\t\t\t\t\t//if multiple choice question\n\t\t\t\t\tif(question.questionType == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$(\"#multiple\").show();\n\n\t\t\t\t\t\tdocument.getElementById(\"question1\").innerHTML = question.question;\n\t\t\t\t\t\tdocument.getElementById(\"label1\").innerHTML = question.choices[0];\n\t\t\t\t\t\tdocument.getElementById(\"label2\").innerHTML = question.choices[1];\n\t\t\t\t\t\tdocument.getElementById(\"label3\").innerHTML = question.choices[2];\n\t\t\t\t\t\tdocument.getElementById(\"label4\").innerHTML = question.choices[3];\n\n\t\t\t\t\t\tdocument.getElementById(\"radio1\").setAttribute(\"value\",question.choices[0]);\n\t\t\t\t\t\tdocument.getElementById(\"radio2\").setAttribute(\"value\",question.choices[1]);\n\t\t\t\t\t\tdocument.getElementById(\"radio3\").setAttribute(\"value\",question.choices[2]);\n\t\t\t\t\t\tdocument.getElementById(\"radio4\").setAttribute(\"value\",question.choices[3]);\n\t\t\t\t\t}\n\t\t\t\t\t//if single line question\n\t\t\t\t\telse if(question.questionType == 2)\n\t\t\t\t\t{\n\t\t\t\t\t\t$(\"#oneword\").show();\n\t\t\t\t\t\tdocument.getElementById(\"question2\").innerHTML = question.question;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "function displayNext() {\r\n quiz.fadeOut(function() {\r\n $('#question').remove();\r\n\r\n if (questionCounter < questions.length) {\r\n var nextQuestion = createQuestionElement(questionCounter);\r\n quiz.append(nextQuestion).fadeIn();\r\n if (!(isNaN(selections[questionCounter]))) {\r\n $('input[value=' + selections[questionCounter] + ']').prop('checked', true);\r\n }\r\n\r\n // Controls display of 'prev' button\r\n if (questionCounter === 1) {\r\n $('#prev').show();\r\n } else if (questionCounter === 0) {\r\n\r\n $('#prev').hide();\r\n $('#next').show();\r\n }\r\n } else {\r\n var scoreElem = displayScore();\r\n quiz.append(scoreElem).fadeIn();\r\n $('#next').hide();\r\n $('#prev').hide();\r\n $('#start').show();\r\n }\r\n });\r\n }", "function displayNext() {\n quiz.fadeOut(function() {\n $('#question').remove();\n \n if(questionCounter < questions.length){\n var nextQuestion = createQuestionElement(questionCounter);\n quiz.append(nextQuestion).fadeIn();\n if (!(isNaN(selections[questionCounter]))) {\n $('input[value='+selections[questionCounter]+']').prop('checked', true);\n }\n \n // Controls display of 'prev' button \n }else {\n var scoreElem = displayScore();\n quiz.append(scoreElem).fadeIn();\n $('#next').hide();\n $('#start').show();\n }\n });\n }", "function nextQuestion (rightAnswer) {\n if (rightAnswer){\n scoreUp()\n }\n if (question == (data.length - 1)) {\n setQuizEnd(true)\n } else {\n setQuestion(question + 1)\n } \n }", "function displayNext() {\n quiz.fadeOut(function() {\n $('#question').remove();\n \n if(questionCounter < questions.length){\n var nextQuestion = createQuestionElement(questionCounter);\n quiz.append(nextQuestion).fadeIn();\n if (!(isNaN(selections[questionCounter]))) {\n $('input[value='+selections[questionCounter]+']').prop('checked', true);\n }\n \n // Controls display of 'prev' button\n if(questionCounter === 1){\n $('#prev').show();\n $('img').hide();\n } else if(questionCounter === 0){\n \n $('#prev').hide();\n $('#next').show();\n $('img').hide();\n }\n }else {\n var scoreElem = displayScore();\n quiz.append(scoreElem).fadeIn();\n $('#next').hide();\n $('#prev').hide();\n $('#start').show();\n $('img').show();\n }\n });\n }", "function check(){\n\tvar question1 = document.quiz.question1.value;\n\tvar question2 = document.quiz.question2.value;\n\tvar question3 = document.quiz.question3.value;\n\tvar question4 = document.quiz.question4.value;\n\tvar question5 = document.quiz.question5.value;\n\tvar question6 = document.quiz.question6.value;\n\tvar question7 = document.quiz.question7.value;\n\tvar question8 = document.quiz.question8.value;\n\tvar question9 = document.quiz.question9.value;\n\tvar correct = 0;\n\n\tif (question1 == \"Finland\") {\n\t\tcorrect++;\n\t}\n\tif (question2 == \"New York\") {\n\t\tcorrect++;\n\t}\n\tif (question3 == \"Bush Senior\") {\n\t\tcorrect++;\n\t}\n\tif (question4 == \"China\") {\n\t\tcorrect++;\n\t}\n\tif (question5 == \"Yahoo\") {\n\t\tcorrect++;\n\t}\n\tif (question6 == \"David Beckham\") {\n\t\tcorrect++;\n\t}\n\tif (question7 == \"Kyoto Protocol\") {\n\t\tcorrect++;\n\t}\n\tif (question8 == \"Fossiliized dinosaur heart\") {\n\t\tcorrect++;\n\t}\n\tif (question9 == \"His heart\") {\n\t\tcorrect++;\n\t}\n\n\tdocument.getElementById(\"after_submit\").style.visibility = \"visible\";\n\tdocument.getElementById(\"number_correct\").innerHTML = \"You got \" + correct + \" correct.\";\n}", "function displayNext() {\n quiz.fadeOut(function () {\n $('#question').remove();\n\n if (questionCounter < questions.length) {\n var nextQuestion = createQuestionElement(questionCounter);\n quiz.append(nextQuestion).fadeIn();\n if (!(isNaN(selections[questionCounter]))) {\n $('input[value=' + selections[questionCounter] + ']').prop('checked', true);\n }\n\n // Controls display of 'prev' button\n if (questionCounter === 1) {\n $('#prev').show();\n } else if (questionCounter === 0) {\n\n $('#prev').hide();\n $('#next').show();\n }\n } else {\n var scoreElem = displayScore();\n quiz.append(scoreElem).fadeIn();\n $('#next').hide();\n $('#prev').hide();\n $('#start').show();\n }\n });\n }", "function answerClicked(event) {\n if (currentIndex === questions.length -1){\n console.log(\"ALL DONE!\")\n quizFinished = true;\n highScoreForm()\n }\n else if (event.target.textContent !== questions[currentIndex].correctAnswer) {\n console.log(\"Wrong!\")\n timeLeft = timeLeft - 10;\n timerElement.textContent = timeLeft;\n currentIndex++;\n showQuizQuestion()\n }\n else if (event.target.textContent === questions[currentIndex].correctAnswer) {\n console.log(\"Correct!\")\n currentIndex++;\n showQuizQuestion()\n }\n\n}", "function handleNextButton() {\n //when \"next\" button is clicked in HTML container\n $('#container').on('click', '#next-button', function(event) {\n//if the number of the question we're on is the final question\n //then display results page with correct answer score count\n if(questionNumber === 10) {\n renderResultsPage(correctAnswers);\n//if not, go to the next question\n } else {\n iterateQuestion();\n nextQuestion();\n }\n });\n}", "function next() {\n currentQuestion++;\n\n if (currentQuestion > questions.length - 1) {\n endGame();\n return;\n }\n\n var quizContent = \"<h2>\" + questions[currentQuestion].title + \"</h2>\"\n\n for (var buttonLoop = 0; buttonLoop < questions[currentQuestion].choices.length; buttonLoop++) {\n var buttonCode = \"<button onclick=\\\"[ANS]\\\">[CHOICE]</button>\"; \n buttonCode = buttonCode.replace(\"[CHOICE]\", questions[currentQuestion].choices[buttonLoop]);\n if (questions[currentQuestion].choices[buttonLoop] == questions[currentQuestion].answer) {\n buttonCode = buttonCode.replace(\"[ANS]\", \"correct()\");\n } else {\n buttonCode = buttonCode.replace(\"[ANS]\", \"incorrect()\");\n }\n quizContent += buttonCode\n }\n\n\n document.getElementById(\"landing-container\").innerHTML = quizContent;\n}", "function selectAnswer(e) {\n var selectedButton = e.target\n var correct = selectedButton.dataset.correct\n setStatusClass(document.body, correct)\n Array.from(answerButtonsElement.children).forEach(button => {\n setStatusClass(button, button.dataset.correct)\n })\n if (getRandomQuestion.length > questionIndex + 1) {\n nextButton.classList.remove('hide')\n //adds a point if the selcted awnser was correct \n if (event.target.dataset.correct === 'true') {\n \n scoreCount++\n document.getElementById('scoreDisplay').innerHTML = 'Points: ' + scoreCount\n }\n } else {\n //adds a point if the selcted awnser was correct and it was the last awnser \n if (event.target.dataset.correct === 'true') {\n scoreCount++\n pointElement.classList.add('hide')\n console.log(scoreCount)\n //stores the user's score in the local storage after the last question \n }\n localStorage.setItem(\"score\", scoreCount);\n\n finishButton.classList.remove('hide')\n }\n}", "function displayNext() {\r\n quiz.fadeOut(function() {\r\n $('#question').remove();\r\n \r\n if(questionCounter < questions.length){\r\n var nextQuestion = createQuestionElement(questionCounter);\r\n quiz.append(nextQuestion).fadeIn();\r\n if (!(isNaN(selections[questionCounter]))) {\r\n $('input[value='+selections[questionCounter]+']').prop('checked', true);\r\n }\r\n \r\n // Controls display of 'prev' button\r\n if(questionCounter === 1){\r\n $('#prev').show();\r\n } else if(questionCounter === 0){\r\n \r\n $('#prev').hide();\r\n $('#next').show();\r\n }\r\n }else {\r\n var scoreElem = displayScore();\r\n quiz.append(scoreElem).fadeIn();\r\n $('#next').hide();\r\n $('#prev').hide();\r\n $('#start').show();\r\n }\r\n });\r\n }", "function displayNext() {\r\n quiz.fadeOut(function() {\r\n $('#question').remove();\r\n \r\n if(questionCounter < questions.length){\r\n var nextQuestion = createQuestionElement(questionCounter);\r\n quiz.append(nextQuestion).fadeIn();\r\n if (!(isNaN(selections[questionCounter]))) {\r\n $('input[value='+selections[questionCounter]+']').prop('checked', true);\r\n }\r\n \r\n // Controls display of 'prev' button\r\n if(questionCounter === 1){\r\n $('#prev').show();\r\n } else if(questionCounter === 0){\r\n \r\n $('#prev').hide();\r\n $('#next').show();\r\n }\r\n }else {\r\n var scoreElem = displayScore();\r\n quiz.append(scoreElem).fadeIn();\r\n $('#next').hide();\r\n $('#prev').hide();\r\n $('#start').show();\r\n }\r\n });\r\n }", "function displayNext() {\r\n quiz.fadeOut(function() {\r\n $('#question').remove();\r\n \r\n if(questionCounter < questions.length){\r\n var nextQuestion = createQuestionElement(questionCounter);\r\n quiz.append(nextQuestion).fadeIn();\r\n if (!(isNaN(selections[questionCounter]))) {\r\n $('input[value='+selections[questionCounter]+']').prop('checked', true);\r\n }\r\n \r\n // Controls display of 'prev' button\r\n if(questionCounter === 1){\r\n $('#prev').show();\r\n } else if(questionCounter === 0){\r\n \r\n $('#prev').hide();\r\n $('#next').show();\r\n }\r\n }else {\r\n var scoreElem = displayScore();\r\n quiz.append(scoreElem).fadeIn();\r\n $('#next').hide();\r\n $('#prev').hide();\r\n $('#start').show();\r\n }\r\n });\r\n }", "function displayNext() {\r\n quiz.fadeOut(function() {\r\n $('#question').remove();\r\n \r\n if(questionCounter < questions.length){\r\n var nextQuestion = createQuestionElement(questionCounter);\r\n quiz.append(nextQuestion).fadeIn();\r\n if (!(isNaN(selections[questionCounter]))) {\r\n $('input[value='+selections[questionCounter]+']').prop('checked', true);\r\n }\r\n \r\n // Controls display of 'prev' button\r\n if(questionCounter === 1){\r\n $('#prev').show();\r\n } else if(questionCounter === 0){\r\n \r\n $('#prev').hide();\r\n $('#next').show();\r\n }\r\n }else {\r\n var scoreElem = displayScore();\r\n quiz.append(scoreElem).fadeIn();\r\n $('#next').hide();\r\n $('#prev').hide();\r\n $('#start').show();\r\n }\r\n });\r\n }", "function checkAnswer(selectedAnswer) {\n const correctAnswer = quiz[currentQuestion].answer;\n \n if (selectedAnswer === correctAnswer) {\n score++;\n }\n \n currentQuestion++;\n \n if (currentQuestion < quiz.length) {\n displayQuestion();\n } else {\n showResult();\n }\n }", "function submitAnswer(ans) {\n let result;\n if (ans === generateCorrectAnswer(STORE.questionNumber)) {\n result = correctAnswerHtml();\n\n\n } else {\n result = wrongAnswerHtml(ans);\n\n }\n generateCurrentScore();\n $('.test').html(result)\n $('.nextButton').on('click', function (event) {\n renderPage();\n });\n\n\n}", "function displayNext() {\n quiz.fadeOut(function () {\n $('#question').remove();\n\n if (questionCounter < questions.length) {\n var nextQuestion = createQuestionElement(questionCounter);\n quiz.append(nextQuestion).fadeIn();\n if (!(isNaN(selections[questionCounter]))) {\n $('input[value=' + selections[questionCounter] + ']').prop('checked', true);\n }\n\n $next.show();\n preventRadio();\n } else {\n var scoreElem = displayScore();\n quiz.append(scoreElem).fadeIn();\n $next.hide();\n $start.show();\n }\n });\n }", "function nextQuestion(){\n var isQuestionOver= (quizQuestions.length - 1) === currentQuestion;\n if (isQuestionOver){\n console.log(\"game is over\");\n displayResult();\n } \n \n else{\n currentQuestion++;\n loadQuestion();\n }\n \n}", "function displayNext() {\n quiz.fadeOut(function() {\n $('#question').remove();\n\n if(questionCounter < questions.length){\n var nextQuestion = createQuestionElement(questionCounter);\n quiz.append(nextQuestion).fadeIn();\n if (!(isNaN(selections[questionCounter]))) {\n $('input[value='+selections[questionCounter]+']').prop('checked', true);\n }\n\n // Controls display of 'prev' button\n if(questionCounter === 1){\n $('#prev').show();\n } else if(questionCounter === 0){\n\n $('#prev').hide();\n $('#next').show();\n }\n }else {\n var scoreElem = displayScore();\n quiz.append(scoreElem).fadeIn();\n $('#next').hide();\n $('#prev').hide();\n $('#start').show();\n }\n });\n }", "function displayNext() {\r\n quiz.fadeOut(function() {\r\n $('#question').remove();\r\n \r\n if(questionCounter < questions.length){\r\n var nextQuestion = createQuestionElement(questionCounter);\r\n setTimer();\r\n quiz.append(nextQuestion).fadeIn();\r\n if (!(isNaN(selections[questionCounter]))) {\r\n $('input[value='+selections[questionCounter]+']').prop('checked', true);\r\n }\r\n \r\n // Controls display of 'prev' button\r\n if(questionCounter === 1){\r\n $('#prev').show();\r\n } else if(questionCounter === 0){\r\n \r\n $('#prev').hide();\r\n $('#next').show();\r\n }\r\n }else {\r\n var scoreElem = displayScore();\r\n quiz.append(scoreElem).fadeIn();\r\n $('#next').hide();\r\n $('#prev').hide();\r\n $('#start').show();\r\n }\r\n });\r\n }", "function nextQuestion() {\n // Increment the quiz question count by 1\n count++\n //Remove previous question from HTML before going onto the next question in the quiz.\n $(\"#question-div\").hide();\n //Remove choice buttons from previous question from HTML.\n $(\"#view-quiz-results-div\").empty();\n //Increment progress bar by 10 for each question.\n // $('#quiz-progress-bar')\n // .progress('increment', 10);\n //If the count is the same as the length of the questionSet.questionArray array, find match.\n if (count === questionSet.questionArray.length) {\n findMatch();\n }\n\n //else, if there are still questions left, go to next question.\n else {\n start();\n }\n}", "function main(){\r\n\t// set the score image to the question mark\r\n\tdocument.score_image.src=\"images/question_mark.gif\"\r\n\r\n\t// disable selection of \"Next Question\" to avoid logic issues\r\n\tdocument.getElementById(\"go_id\").disabled = true\r\n\tdocument.getElementById(\"go_id\").style.opacity = \"0.5\"\r\n\r\n\t// enable selection of \"Submit Answer\"\r\n\tdocument.getElementById(\"user_submit\").disabled = false\r\n\tdocument.getElementById(\"user_submit\").style.opacity = \"1\"\r\n\r\n\t// document questions\r\n\tif (i===1){\r\n\t\tdocument.view.qnum.value=i;\r\n\t\tdocument.view.question.value =\"In Mario Kart, which item can seek enemies? \\na) Mushroom \\nb) Red Shell \\nc) Banana \\nd) Green Shell\";\r\n\t\tdocument.view.qans.value=\"\"\r\n\t}\r\n\telse if (i===2){ \r\n\t\tdocument.view.qnum.value=i;\t\r\n\t\tdocument.view.question.value =\"In Dungeons and Dragons, which die is used to roll for attacking order? \\na) 20-sided \\nb) 10-sided \\nc) 4-sided \\nd) 8-sided\";\r\n\t\tdocument.view.qans.value=\"\"\r\n\t}\r\n\telse if (i===3){ \r\n\t\tdocument.view.qnum.value=i;\t\r\n\t\tdocument.view.question.value =\"What are the two colours of chips in Connect 4? \\na) Blue and red \\nb) Yellow and black \\nc) Yellow and red \\nd) Black and blue\";\r\n\t\tdocument.view.qans.value=\"\"\r\n\t}\r\n\telse if (i===4){ \r\n\t\tdocument.view.qnum.value=i;\t\r\n\t\tdocument.view.question.value =\"Who is the protagonist of the game Dead Rising? \\na) Chuck Greene \\nb) Carlito Keyes \\nc) Nick Ramos \\nd) Frank West\";\r\n\t\tdocument.view.qans.value=\"\"\r\n\t}\r\n\telse if (i===5){ \r\n\t\tdocument.view.qnum.value=i;\t\r\n\t\tdocument.view.question.value =\"Who is the final boss of Super Mario Galaxy? \\na) Bowser Jr. \\nb) King Boo \\nc) Rosalina \\nd) Bowser\";\r\n\t\tdocument.view.qans.value=\"\"\r\n\t}\r\n\telse if (i===6){ \r\n\t\tdocument.view.qnum.value=i;\t\r\n\t\tdocument.view.question.value =\"In chess, which piece can jump over other pieces? \\na) The King \\nb) The Knight \\nc) The Queen \\nd) The Bishop\";\r\n\t\tdocument.view.qans.value=\"\"\r\n\t}\r\n\telse if (i===7){ \r\n\t\tdocument.view.qnum.value=i;\t\r\n\t\tdocument.view.question.value =\"Who is the protagonist of MegaMan: Star Force? \\na) Sonia Strumm \\nb) Geo Stelar \\nc) Zero \\nd) Luna Platz\";\r\n\t\tdocument.view.qans.value=\"\"\r\n\t}\r\n\telse if (i===8){ \r\n\t\tdocument.view.qnum.value=i;\t\r\n\t\tdocument.view.question.value =\"Which of the following is a legendary Pokemon? \\na) Charizard \\nb) Blastoise \\nc) Spiritomb \\nd) Shaymin\";\r\n\t\tdocument.view.qans.value=\"\"\r\n\t}\r\n\telse if (i===9){ \r\n\t\tdocument.view.qnum.value=i;\t\r\n\t\tdocument.view.question.value =\"Who is the kid sidekick of Professor Layton? \\na) Don Paolo \\nb) Maya Fey \\nc) Luke Triton \\nd) Emmy\";\r\n\t\tdocument.view.qans.value=\"\"\r\n\t}\r\n\telse if (i===10){ \r\n\t\tdocument.view.qnum.value=i;\t\r\n\t\tdocument.view.question.value =\"What is the name of the enemy group in Ghost Squad? \\na) Shadaloo \\nb) Indigo Wolves \\nc) Blue Wolves \\nd) Providence\";\r\n\t\tdocument.view.qans.value=\"\"\r\n\t}\r\n\telse if (i===11){ \r\n\t\tdocument.view.qnum.value=i;\t\r\n\t\tdocument.view.question.value =\"Who is the doctor in House Of The Dead? \\na) Curien \\nb) Mr. G \\nc) Goldman \\nd) Magician\";\r\n\t\tdocument.view.qans.value=\"\"\r\n\t}\r\n\telse if (i===12){ \r\n\t\tdocument.view.qnum.value=i;\t\r\n\t\tdocument.view.question.value =\"Who is the protagonist of Call Of Duty? \\na) Alex Mason \\nb) Jason Hudson \\nc) Friedrich Steiner \\nd) Viktor Reznov\";\r\n\t\tdocument.view.qans.value=\"\"\r\n\t}\r\n\telse if (i===13){ \r\n\t\tdocument.view.qnum.value=i;\t\r\n\t\tdocument.view.question.value =\"In the Pokemon games, which region does Cynthia hail from? \\na) Kanto \\nb) Johto \\nc) Sinnoh \\nd) Alola\";\r\n\t\tdocument.view.qans.value=\"\"\r\n\t}\r\n\telse if (i===14){ \r\n\t\tdocument.view.qnum.value=i;\t\r\n\t\tdocument.view.question.value =\"In Super Mario, what is the name of Mario's brother? \\na) Waluigi \\nb) Wario \\nc) Yoshi \\nd) Luigi\";\r\n\t\tdocument.view.qans.value=\"\"\r\n\t}\r\n\telse if (i===15){ \r\n\t\tdocument.view.qnum.value=i;\t\r\n\t\tdocument.view.question.value =\"What is the gender of the masked Samus from Metroid? \\na) Male \\nb) Female \\nc) Hermaphroditic \\nd) Other/Alien Gender\";\r\n\t\tdocument.view.qans.value=\"\"\r\n\t}\r\n\telse if (i===16){ \r\n\t\tdocument.view.qnum.value=i;\t\r\n\t\tdocument.view.question.value =\"In Super Smash Bros, what is the white floating glove named? \\na) Destroyer \\nb) Tabuu \\nc) Mario's Glove \\nd) Master Hand\";\r\n\t\tdocument.view.qans.value=\"\"\r\n\t}\r\n\r\n\t// create a default branch for the end of the quiz\r\n\telse {\r\n\t\t// wipe the values of the question holder and the answer field; also disable the answer field and \"Submit Answer\" to prevent user tampering\r\n\t\tdocument.view.qans.value = \"\"\r\n\t\tdocument.view.question.value = \"\"\r\n\t\tdocument.getElementById(\"qans\").disabled = true\r\n\t\tdocument.getElementById(\"user_submit\").disabled = true\r\n\t\tdocument.getElementById(\"user_submit\").style.opacity = \"0.5\"\r\n\r\n\t\t// calculate the percent of the quiz that is correct (by dividing score by number of questions * 100), rounded to 1 decimal place\r\n\t\tscore_percent = score / 16 * 100\r\n\t\tscore_percent = score_percent.toFixed(1)\r\n\t\t\r\n\t\t// for mobile users' viewing, collapse the image and textarea; the inline-block design would not be shown on a phone\r\n\t\tdocument.score_image.style.width = \"1px\"\r\n\t\tdocument.score_image.style.height = \"1px\"\r\n\t\tdocument.score_image.style.opacity = \"0\"\r\n\t\tdocument.view.qdisplay.cols = \"1\"\r\n\t\tdocument.view.qdisplay.rows = \"1\"\r\n\t\tdocument.view.qdisplay.style.opacity = \"0\"\r\n\r\n\t\t// for mobile users' viewing, set the form's font size to 1%\r\n\t\tdocument.view.style.fontSize = \"1%\"\r\n\r\n\t\t// for aesthetic reasons, make the form \"disappear\"\r\n\t\tdocument.view.style.opacity = \"0\"\r\n\r\n\t\t// make the result div visible and make the \"Play Again\" button semi-visible\r\n\t\tdocument.getElementById(\"result_window\").style.opacity = \"1\"\r\n\t\tdocument.getElementById(\"reset_id\").style.opacity = \"0.75\"\r\n\r\n\t\t// stop the background music for playing long sound effects, setting the song back to the start\r\n\t\tvar background_audio = document.getElementById(\"pixel_song\")\r\n\t\tbackground_audio.pause();\r\n\t\tbackground_audio.currentTime = 0\r\n\r\n\t\t// initialize a variable to hold the sound for a good or bad score\r\n\t\tvar result_sound\r\n\r\n\t\t// check to see if the user got a good score of 80% or more\r\n\t\tif (score_percent >= 80){\r\n\t\t\t// set the good score image, output a message of congratulations, and play a celebratory sound\r\n\t\t\tdocument.getElementById(\"result_image_id\").src = \"images/dancing_mario_bros.gif\"\r\n\t\t\tscore_message = \"Fantastic job!<br>You answered \" + score + \" questions correctly, which is \" + score_percent + \"% of the quiz! You had a streak of \" + highest_streak + \" correct answers!\"\r\n\t\t\tdocument.getElementById(\"result_message\").innerHTML = score_message\r\n\t\t\tresult_sound = document.getElementById(\"good_score_sound\")\r\n\t\t\tresult_sound.play();\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// set the bad score image, output a message of encouragement to do better (and try again), and play a less cheery sound\r\n\t\t\tdocument.getElementById(\"result_image_id\").src = \"images/sad_yoshi.gif\"\r\n\t\t\tscore_message = \"You answered \" + score + \" question(s) correctly, which is \" + score_percent + \"% of the quiz. You had a streak of \" + highest_streak + \" correct answer(s).<br>You can surely do better...\"\r\n\t\t\tdocument.getElementById(\"result_message\").innerHTML = score_message\r\n\t\t\tresult_sound = document.getElementById(\"bad_score_sound\")\r\n\t\t\tresult_sound.play();\r\n\t\t}\r\n\r\n\t\t// control the duration of the time that the \"Play Again\" button is disabled, allowing result_sound to play fully; also provide appropriate styles\r\n\t\tdocument.getElementById(\"reset_id\").value = \"Play Again (in 6 seconds)\"\r\n\t\tsetTimeout(resetLoad, 6500);\r\n\t}\r\n\r\n\t// update var i\r\n\ti++; \r\n}", "function correctAnswers() {\n let correct = parseInt(document.getElementById(\"correct\").innerText);\n document.getElementById(\"correct\").innerText = ++correct;\n\n\n // Prints a message to the user when they are finsh the quiz depending on the number of correct answer they got. \n\n\n if (correct >= 8) {\n document.getElementById(\"end-message\").innerHTML = `Congragulations YOUR A TRUE MARVEL FAN`;\n } else if (correct >= 6) {\n document.getElementById(\"end-message\").innerHTML = `WELL DONE YOUR NEARLY THERE TRY AGAIN`;\n } else if (correct >= 4) {\n document.getElementById(\"end-message\").innerHTML = `HMMMMM ARE YOU SURE YOUR A MARVEL FAN?`;\n } else if (correct >= 2) {\n document.getElementById(\"end-message\").innerHTML = `YOU NEED TO HIT THE COMICS AND FRESHEN UP`;\n }\n}", "function displayNext() {\n quiz.fadeOut(function() {\n $('#question').remove();\n \n if(questionCounter < questions.length){\n var nextQuestion = createQuestionElement(questionCounter);\n quiz.append(nextQuestion).fadeIn();\n if (!(isNaN(selections[questionCounter]))) {\n $('input[value='+selections[questionCounter]+']').prop('checked', true);\n }\n \n // Controls display of 'prev' button\n if(questionCounter === 1){\n $('#back').show();\n } else if(questionCounter === 0){\n \n $('#back').hide();\n $('#next').show();\n }\n }else {\n var totalElem = displayTotal();\n quiz.append(totalElem).fadeIn();\n $('#next').hide();\n $('#back').hide();\n $('#start').show();\n }\n });\n }", "function checkAnswer(event) {\n\tevent.preventDefault();\n\tvar button = document.getElementById(event.target.id);\n\tvar userInitials;\n\n\tif (button.id === \"initials\") {\n\t\treturn;\n\t}\n\n\t//saves initials\n\tif (button.id === \"submitScore\") {\n\t\tuserInitials = document.getElementById(\"initials\");\n\t\tsaveScore(userInitials);\n\t\treturn;\n\t}\n\n\t//We are checking here the user answer and the correct answer and acting accordingly\n\tif (answer1.includes(questionsArray[currentQuestion].answer) && button.id === \"choice1\") {\n\t\tuserResult.textContent = \"CORRECT!\";\n\t\tcurrentQuestion++;\n\t\tpoints += 10;\n\t\tdisplayQuestion();\n\t} else if (answer2.includes(questionsArray[currentQuestion].answer) && button.id === \"choice2\") {\n\t\tuserResult.textContent = \"CORRECT!\";\n\t\tcurrentQuestion++;\n\t\tpoints += 10;\n\t\tdisplayQuestion();\n\t} else if (answer3.includes(questionsArray[currentQuestion].answer) && button.id === \"choice3\") {\n\t\tuserResult.textContent = \"CORRECT!\";\n\t\tcurrentQuestion++;\n\t\tpoints += 10;\n\t\tdisplayQuestion();\n\t} else if (answer4.includes(questionsArray[currentQuestion].answer) && button.id === \"choice4\") {\n\t\tuserResult.textContent = \"CORRECT!\";\n\t\tcurrentQuestion++;\n\t\tpoints += 10;\n\t\tdisplayQuestion();\n\t} else {\n\t\tuserResult.textContent = \"WRONG!\";\n\t\tcurrentQuestion++;\n\t\ttimeLeft -= 10;\n\t\tdisplayQuestion();\n\t}\n}", "function answer(a) {\n let selected_answer = a;\n //If selected_answer is equals to the last number in the array is a right answer\n if (selected_answer == questions[questionNum][5]){\n displayNo('wrong-answer');\n displayNo('answers')\n displayYes('right-answer');\n //Every right answer increases evenly X% of the progress bar\n progressNum+= questionPercent;\n document.getElementById('progress-num').classList.add('w-' + progressNum);\n document.getElementById('progress-num').innerHTML= progressNum + '%';\n \n //Finish Quiz on the last question available - else - show next question\n if(questionNum+1 == questions.length ){\n displayYes('finish-quiz');\n }\n else {\n questionNum++;\n displayYes('next-question');\n }\n \n // By wrong answer, show alert and increase counter \n } else {\n questionsWrong++;\n displayYes('wrong-answer');\n }\n}", "function fiveSecondBreak() {\n $(`#answers button[index=${qsAndAs[questionIndex].correctIndexAnswer}]`).removeClass(`btn-outline-dark`).addClass(`btn-success`);\n \n var startdown = 6;\n var intervalId;\n \n if(guesses[questionIndex] == qsAndAs[questionIndex].correctIndexAnswer) {\n score++;\n $('.score').html(`<p>Correct Answers: ${score}</p>`)\n }else{\n $(`#answers button[index=${guesses[questionIndex]}]`).removeClass(`btn-outline-dark`).addClass(`btn-danger`);\n $('.score').html(`<p>Correct Answers: ${score}</p>`)\n }\n \n function lilBreak() {\n clearInterval(intervalId);\n intervalId = setInterval(decrement, 1000);\n }\n function decrement() {\n startdown--;\n console.log(\"QIndex : \" + (parseInt(questionIndex) + 2));\n console.log(\"qsAndAs.length: \" + qsAndAs.length); \n console.log((parseInt(questionIndex) + 2) === qsAndAs.length);\n if((parseInt(questionIndex) + 2) < qsAndAs.length){\n $('.next').html(`<p>Next question in ${startdown}</p>`);\n }if((parseInt(questionIndex) + 2) === qsAndAs.length){\n $('.next').html(`<p>Last question in ${startdown}</p>`);\n }if((parseInt(questionIndex) + 1) === qsAndAs.length){\n $('.next').html(`<p>Trivia Game Over - Calculating...</p>`);\n }if (startdown === 0) {\n breaksOver(); \n } \n }\n function breaksOver() {\n clearInterval(intervalId);\n questionIndex += 1;\n $('.next').text(``);\n $(`button.answer`).removeClass(`btn-success btn-danger`).addClass(`btn-outline-dark`);\n if(questionIndex >= qsAndAs.length) {\n gameOver();\n clearInterval(intervalId);\n }else{\n start();\n } \n }\n lilBreak();\n}", "function nextQuestion() {\n $(\"#button-0\").show();\n q++;\n\n if (q < quizQuestions.length) {\n $(\"#button-0\").html(\"Next Question\")\n .click(startQuiz);\n }\n else {\n $(\"#button-0\").html(\"End Quiz\")\n .off(\"click\")\n .click(endQuiz);\n }\n}", "function nextQuestion() {\n /* set variable isQuestionOver to the value of the two variable, triviaQuestions.length\n and currentQuestion, being equal*/\n var isQuestionOver = (triviaQuestions.length - 1) === currentQuestion;\n // if isQuestionOver true, run displayResults function\n if (isQuestionOver) {\n displayResults();\n\n // else add 1 to currentQuestion and run loadQuestion function.\n } else {\n currentQuestion++;\n loadQuestion();\n }\n }", "function displayNext() {\n quiz.fadeOut(function() {\n $('#question').remove();\n if(questionCounter < questions.length){\n var nextQuestion = makeQuiz(questionCounter);\n quiz.append(nextQuestion).show();\n if (!(isNaN(selections[questionCounter]))) {\n $('input[value='+selections[questionCounter]+']').prop('checked', true);\n }\n else if(questionCounter === 0){\n $('#next').show();\n }\n }\n else {\n var scoreElem = displayScore();\n quiz.append(scoreElem).fadeIn();\n $('#next').hide();\n $('#start').show();\n }\n });\n}", "function countPoints() {\n // OTAZKA 0\n if (currentQuestion.answer == 0 && selectedAnswer == 1) {\n return window.location.assign(\"./zena.html\");\n }\n if (currentQuestion.answer == 0 && selectedAnswer == 2) {\n return window.location.assign(\"./muz.html\");\n }\n }", "function checkAnswerA(){\n if(quizQuestions[currentQuestion].correctChoice === li1.value){\n p.textContent = \"Correct!\"\n } else { \n p.textContent = \"Oops! Maybe next time.\"\n secondsRemaining = secondsRemaining - 10;\n };\n currentQuestion++;\n if (currentQuestion > quizQuestions.length - 1){\n quizEl.style.display = \"none\";\n displayHighscore();\n return;\n } \n displayQuestions();\n}", "function next() {\n currentQuestion++;\n\n if (currentQuestion > questions.length - 1) {\n endGame();\n return;\n }\n\n var quizContent = \"<h2>\" + questions[currentQuestion].question + \"</h2>\"\n\n for (var buttonLoop = 0; buttonLoop < questions[currentQuestion].choices.length; buttonLoop++) {\n var buttonCode = \"<button onclick=\\\"[ANS]\\\">[CHOICE]</button>\";\n buttonCode = buttonCode.replace(\"[CHOICE]\", questions[currentQuestion].choices[buttonLoop]);\n if (questions[currentQuestion].choices[buttonLoop] == questions[currentQuestion].answer) {\n buttonCode = buttonCode.replace(\"[ANS]\", \"correct()\");\n } else {\n buttonCode = buttonCode.replace(\"[ANS]\", \"incorrect()\");\n }\n quizContent += buttonCode\n }\n\n\n document.getElementById(\"quizBody\").innerHTML = quizContent;\n}", "function verifyAnswer() {\n // if clicked button's 'value' attr does not match correct answer\n if (this.value !== quizQuestions[index].correct) {\n // cut off 2 seconds from time\n timerCount -= 2;\n }\n\n // increment index by 1\n index++;\n\n // if index matches length of questions array\n if (index === quizQuestions.length) {\n // end quiz\n quizOver(); \n } else {\n // get next question\n getQuestions();\n }\n}", "function checkAnswer(value) {\n var currentQ = getCurrentQ(currentQuestionId);\n if (value === currentQ.correctAnswer) {\n lastAnswerEle.innerText = 'Correct!';\n score += 20;\n } else {\n lastAnswerEle.innerText = 'Wrong Answer!';\n timer -= 12;\n }\n\n lastAnswerEle.className = 'card-footer-answer';\n // construct next question\n if (currentQuestionId < questions.length) {\n currentQuestionId++;\n constructQuestion(currentQuestionId);\n } else {\n // no more question\n timer = 1;\n showResult();\n }\n}", "function progressQuiz() { \n $('main').on('submit','#nextQuestion', e => {\n e.preventDefault();\n if (database.currentQuestionNumber === database.store.length) {\n displayScore();\n }\n else {\n database.currentQuestionNumber++;\n makeGuess();\n }\n });\n}", "function displayNext() {\n\t\tquizContainer.innerHTML = '';\n\t\t//$('#question').remove();\n\t\t\n\t\tif(questionCounter < Quiz.length){\n\t\t\t//var nextQuestion = createQuestionElement(questionCounter);\n\t\t\t//quizContainer.appendChild(nextQuestion);\n\t\t\tcreateQuestionElement(questionCounter);\n\n\t\t\tif (!(isNaN(selections[questionCounter]))) {\n\t\t\t\t//$('input[value='+selections[questionCounter]+']').prop('checked', true);\n\t\t\t}\n\t\t\t\n\t\t\tif(questionCounter >= 0){\n\t\t\t\tvar next = document.createElement('div');\n\t\t\t\tnext.className = 'button';\n\t\t\t\tnext.id = 'next';\n\t\t\t\tnext.innerHTML = 'Next';\n\n\t\t\t\tnext.onclick = function() {\n\t\t\t\t\tchoose();\n\n\t\t\t\t\tif (isNaN(selections[questionCounter])) {\n\t\t\t\t\t\talert('Please make a selection!');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tquestionCounter++;\n\t\t\t\t\t\tdisplayNext();\n\t\t\t\t\t}\n\n\t\t\t\t\tmoveProgress();\n\t\t\t\t};\n\n\t\t\t\tquizContainer.appendChild(next);\n\t\t\t\t//$('#next').show();\n\t\t\t}\n\t\t} else {\n\t\t\tvar scoreElem = displayScore();\n\t\t\tquizContainer.appendChild(scoreElem);\n\n\t\t\tvar start = document.createElement('div');\n\t\t\tstart.className = 'button';\n\t\t\tstart.id = 'start';\t\n\t\t\tstart.innerHTML = 'Start Over';\n\n\t\t\tstart.onclick = function(e) {\n\t\t\t\te.preventDefault();\n\n\t\t\t\tproBar.style.width = 0;\n\t\t\t\tproLabel.innerHTML = '0%';\n\n\t\t\t\tquestionCounter = 0;\n\t\t\t\tselections = [];\n\t\t\t\tdisplayNext();\n\t\t\t};\n\n\t\t\tquizContainer.appendChild(start);\n\t\t}\n\t}", "function displayNextQuestion(nextQuestion) {\n currentIndex++;\n if (currentIndex < questions.length) {\n checkCorrect(nextQuestion.target.innerText === nextQuestions.answer);\n questionAnswers.innerText = '';\n if (currentIndex < questions.length) {\n nextQuestions = questions[currentIndex];\n displayQuestion(nextQuestions);\n } else {\n currentIndex = 0\n displayQuestion(nextQuestions);\n }\n } else {\n endQuiz();\n // setTimeout(function () {\n // endQuiz();\n // }, 1000);\n }\n}", "function checkAnswer(event){\n if(event.target.id === answers[answerIndex]){\n updatedScore += 10;\n userScore.innerText = \"Score \" + updatedScore;\n feedback.innerHTML = \"Correct! 👍\";\n }\n else{\n timeLeft -= 10;\n feedback.innerHTML = \"Wrong 👎\";\n } \n questionIndex++;\n answerIndex++;\n \n proposedQuestion.innerText = questions[questionIndex].q;\n btn1.innerText = questions[questionIndex].a[0].text;\n btn2.innerText = questions[questionIndex].a[1].text;\n btn3.innerText = questions[questionIndex].a[2].text;\n btn4.innerText = questions[questionIndex].a[3].text; \n if(questionIndex === 5 || answerIndex === 5){\n questionIndex === 0;\n }\n}" ]
[ "0.7439825", "0.73396844", "0.7278731", "0.72403735", "0.7192062", "0.71648914", "0.71577525", "0.71508676", "0.7131774", "0.7110317", "0.70371896", "0.69992965", "0.69607574", "0.69505984", "0.693869", "0.6931927", "0.6914498", "0.69003505", "0.68879175", "0.6879303", "0.68679607", "0.6865646", "0.6864098", "0.6862312", "0.68600863", "0.68525815", "0.68488437", "0.6841628", "0.6835986", "0.68278795", "0.68277425", "0.68161976", "0.6808395", "0.6807464", "0.67997015", "0.6791454", "0.6790638", "0.67892903", "0.67863476", "0.6786031", "0.6782809", "0.6779683", "0.6777807", "0.6777643", "0.677199", "0.6771945", "0.67711383", "0.6770611", "0.6769079", "0.6766577", "0.6759446", "0.6750976", "0.67492366", "0.674874", "0.67448485", "0.67423296", "0.67412275", "0.6735225", "0.6734681", "0.6727336", "0.67213124", "0.6719074", "0.67157036", "0.67122227", "0.67051166", "0.670028", "0.6699271", "0.6695245", "0.66944534", "0.66909266", "0.6685417", "0.6683307", "0.6673059", "0.6673059", "0.6673059", "0.6673059", "0.66679233", "0.66662765", "0.666524", "0.666063", "0.6659364", "0.66502035", "0.6644387", "0.664409", "0.6640622", "0.6640317", "0.66394573", "0.66374147", "0.6633607", "0.6632485", "0.6629261", "0.6628919", "0.6626644", "0.6621119", "0.66149276", "0.6598243", "0.65977323", "0.6597689", "0.659518", "0.65950626", "0.6594332" ]
0.0
-1
fecha = a y fecha2 =b a>b = TRUE a=b = FALSE a<b = FALSE
function compare_dates(fecha, fecha2) { var xMonth=fecha.substring(3, 5); var xDay=fecha.substring(0, 2); var xYear=fecha.substring(6,10); var yMonth=fecha2.substring(3,5); var yDay=fecha2.substring(0, 2); var yYear=fecha2.substring(6,10); if (xYear > yYear){ return(true); }else{ if (xYear == yYear){ if (xMonth > yMonth){ return(true); }else{ if (xMonth == yMonth){ if (xDay> yDay) return(true); else return(false); }else{ return(false); } } }else{ return(false); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function comparafecha(fecha1, fecha2){\n \n dia = fecha1.substring(0,2) //dia\n mes = fecha1.substring(3,5) //mes\n anho = fecha1.substring(6,10) //anho\n fecha1x = anho + mes + dia\n dia = fecha2.substring(0,2) //dia\n mes = fecha2.substring(3,5) //mes\n anho = fecha2.substring(6,10) //anho\n fecha2x = anho + mes + dia\n if ( fecha1x > fecha2x ){\n return 1\n } else if ( fecha1x < fecha2x ){\n return 2\n } else {\n return 0\n }\n }", "function comparafecha(fecha1, fecha2){\n if ( !checkdate(fecha1) || !checkdate(fecha2) ) return -1;\n dia = fecha1.substring(0,2)\n mes = fecha1.substring(3,5)\n anho = fecha1.substring(6,10)\n fecha1x = anho + mes + dia\n dia = fecha2.substring(0,2)\n mes = fecha2.substring(3,5)\n anho = fecha2.substring(6,10)\n fecha2x = anho + mes + dia\n return (fecha1x>fecha2x?1:(fecha1x<fecha2x?2:0));\n}", "function fecha2MayorFecha1(fechaFinal,fechaFormulario){\n\n if((Date.parse(fechaFormulario)) <= (Date.parse(fechaFinal))) {\n alert(\"fecha nacimiento mayor que la actual\");\n return true;\n\n }else{\n return false;\n }\n\n\n\n\n\n}", "function compararFecha(fecha, fecha2) {\n var xMonth = fecha.substring(3, 5);\n var xDay = fecha.substring(0, 2);\n var xYear = fecha.substring(6, 10);\n var yMonth = fecha2.substring(3, 5);\n var yDay = fecha2.substring(0, 2);\n var yYear = fecha2.substring(6, 10);\n if (xYear > yYear) {\n return 1;\n }\n else {\n if (xYear == yYear) {\n if (xMonth > yMonth) {\n return 1;\n }\n else {\n if (xMonth == yMonth) {\n if (xDay == yDay) {\n return 0;\n } else {\n if (xDay > yDay)\n return 1;\n else\n return -1;\n }\n }\n else\n return -1;\n }\n }\n else\n return -1;\n }\n}", "function fecha_mayor(fecha, fecha2){\n var xMes=fecha.substring(5, 7);\n var xDia=fecha.substring(8, 10);\n var xAnio=fecha.substring(0,4);\n var yMes=fecha2.substring(5, 7);\n var yDia=fecha2.substring(8, 10);\n var yAnio=fecha2.substring(0,4);\n \n if (xAnio > yAnio){\n return(true);\n }else{\n if (xAnio == yAnio){\n if (xMes > yMes){\n return(true);\n }\n if (xMes == yMes){\n if (xDia > yDia){\n return(true);\n }else{\n return(false);\n }\n }else{\n return(false);\n }\n }else{\n return(false);\n }\n }\n\t}", "function fecha_mayor_igual(fecha, fecha2){\n var xMes=fecha.substring(5, 7);\n var xDia=fecha.substring(8, 10);\n var xAnio=fecha.substring(0,4);\n var yMes=fecha2.substring(5, 7);\n var yDia=fecha2.substring(8, 10);\n var yAnio=fecha2.substring(0,4);\n \n if (xAnio > yAnio){\n return(true);\n }else{\n if (xAnio == yAnio){\n if (xMes > yMes){\n return(true);\n }\n if (xMes == yMes){\n if (xDia >= yDia){\n return(true);\n }else{\n return(false);\n }\n }else{\n return(false);\n }\n }else{\n return(false);\n }\n }\n\t}", "function mayor(fecha, fecha2){\n var xMes=fecha.substring(5, 7);\n var xDia=fecha.substring(8, 10);\n var xAnio=fecha.substring(0,4);\n var yMes=fecha2.substring(5, 7);\n var yDia=fecha2.substring(8, 10);\n var yAnio=fecha2.substring(0,4);\n\n if (xAnio > yAnio){\n return(true);\n }else{\n if (xAnio == yAnio){\n if (xMes > yMes){\n return(true);\n }\n if (xMes == yMes){\n if (xDia > yDia){\n return(true);\n }else{\n return(false);\n }\n }else{\n return(false);\n }\n }else{\n return(false);\n }\n }\n }", "function mayor(fecha, fecha2){\n var xMes=fecha.substring(5, 7);\n var xDia=fecha.substring(8, 10);\n var xAnio=fecha.substring(0,4);\n var yMes=fecha2.substring(5, 7);\n var yDia=fecha2.substring(8, 10);\n var yAnio=fecha2.substring(0,4);\n\n if (xAnio > yAnio){\n return(true);\n }else{\n if (xAnio == yAnio){\n if (xMes > yMes){\n return(true);\n }\n if (xMes == yMes){\n if (xDia > yDia){\n return(true);\n }else{\n return(false);\n }\n }else{\n return(false);\n }\n }else{\n return(false);\n }\n }\n }", "function compareAge(b1,b2){\n return b1<=b2\n }", "function mayor(fecha, fecha2){\n\t\tvar xMes=fecha.substring(5, 7);\n\t\tvar xDia=fecha.substring(8, 10);\n\t\tvar xAnio=fecha.substring(0,4);\n\t\tvar yMes=fecha2.substring(5, 7);\n\t\tvar yDia=fecha2.substring(8, 10);\n\t\tvar yAnio=fecha2.substring(0,4);\n \n\t\tif (xAnio > yAnio){\n\t\t\treturn(true);\n\t\t}else{\n\t\t\tif (xAnio == yAnio){\n\t\t\t\tif (xMes > yMes){\n\t\t\t\t\treturn(true);\n\t\t\t\t}\n\t\t\t\tif (xMes == yMes){\n\t\t\t\t\tif (xDia > yDia){\n\t\t\t\t\t\treturn(true);\n\t\t\t\t\t}else{\n\t\t\t\t\t\treturn(false);\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\treturn(false);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn(false);\n\t\t\t}\n\t\t}\n\t}", "function mayor(fecha, fecha2){\n\t\tvar xMes=fecha.substring(5, 7);\n\t\tvar xDia=fecha.substring(8, 10);\n\t\tvar xAnio=fecha.substring(0,4);\n\t\tvar yMes=fecha2.substring(5, 7);\n\t\tvar yDia=fecha2.substring(8, 10);\n\t\tvar yAnio=fecha2.substring(0,4);\n \n\t\tif (xAnio > yAnio){\n\t\t\treturn(true);\n\t\t}else{\n\t\t\tif (xAnio == yAnio){\n\t\t\t\tif (xMes > yMes){\n\t\t\t\t\treturn(true);\n\t\t\t\t}\n\t\t\t\tif (xMes == yMes){\n\t\t\t\t\tif (xDia > yDia){\n\t\t\t\t\t\treturn(true);\n\t\t\t\t\t}else{\n\t\t\t\t\t\treturn(false);\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\treturn(false);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn(false);\n\t\t\t}\n\t\t}\n\t}", "function mayor(fecha, fecha2){\n\t\tvar xMes=fecha.substring(5, 7);\n\t\tvar xDia=fecha.substring(8, 10);\n\t\tvar xAnio=fecha.substring(0,4);\n\t\tvar yMes=fecha2.substring(5, 7);\n\t\tvar yDia=fecha2.substring(8, 10);\n\t\tvar yAnio=fecha2.substring(0,4);\n \n\t\tif (xAnio > yAnio){\n\t\t\treturn(true);\n\t\t}else{\n\t\t\tif (xAnio == yAnio){\n\t\t\t\tif (xMes > yMes){\n\t\t\t\t\treturn(true);\n\t\t\t\t}\n\t\t\t\tif (xMes == yMes){\n\t\t\t\t\tif (xDia > yDia){\n\t\t\t\t\t\treturn(true);\n\t\t\t\t\t}else{\n\t\t\t\t\t\treturn(false);\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\treturn(false);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn(false);\n\t\t\t}\n\t\t}\n\t}", "function mayor(fecha, fecha2){\n\t\tvar xMes=fecha.substring(5, 7);\n\t\tvar xDia=fecha.substring(8, 10);\n\t\tvar xAnio=fecha.substring(0,4);\n\t\tvar yMes=fecha2.substring(5, 7);\n\t\tvar yDia=fecha2.substring(8, 10);\n\t\tvar yAnio=fecha2.substring(0,4);\n\n\t\tif (xAnio > yAnio){\n\t\t\treturn(true);\n\t\t}else{\n\t\t\tif (xAnio == yAnio){\n\t\t\t\tif (xMes > yMes){\n\t\t\t\t\treturn(true);\n\t\t\t\t}\n\t\t\t\tif (xMes == yMes){\n\t\t\t\t\tif (xDia > yDia){\n\t\t\t\t\t\treturn(true);\n\t\t\t\t\t}else{\n\t\t\t\t\t\treturn(false);\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\treturn(false);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn(false);\n\t\t\t}\n\t\t}\n\t}", "function mayor(fecha, fecha2){\n\t\tvar xMes=fecha.substring(5, 7);\n\t\tvar xDia=fecha.substring(8, 10);\n\t\tvar xAnio=fecha.substring(0,4);\n\t\tvar yMes=fecha2.substring(5, 7);\n\t\tvar yDia=fecha2.substring(8, 10);\n\t\tvar yAnio=fecha2.substring(0,4);\n\n\t\tif (xAnio > yAnio){\n\t\t\treturn(true);\n\t\t}else{\n\t\t\tif (xAnio == yAnio){\n\t\t\t\tif (xMes > yMes){\n\t\t\t\t\treturn(true);\n\t\t\t\t}\n\t\t\t\tif (xMes == yMes){\n\t\t\t\t\tif (xDia > yDia){\n\t\t\t\t\t\treturn(true);\n\t\t\t\t\t}else{\n\t\t\t\t\t\treturn(false);\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\treturn(false);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn(false);\n\t\t\t}\n\t\t}\n\t}", "function compFunc(a, b)\n{\n\tif (a.date < b.date)\n\t\treturn 1;\n\telse if (a.date > b.date)\n\t\treturn -1;\n\telse\n\t\treturn 0;\n}", "function mayor(fecha, fecha2){\n\t\tvar xMes=fecha.substring(5, 7);\n\t\tvar xDia=fecha.substring(8, 10);\n\t\tvar xAnio=fecha.substring(0,4);\n\t\tvar yMes=fecha2.substring(5, 7);\n\t\tvar yDia=fecha2.substring(8, 10);\n\t\tvar yAnio=fecha2.substring(0,4);\n\t\t\n\t\tif (xAnio > yAnio){\n\t\t\treturn(true);\n\t\t}else{\n\t\t\tif (xAnio == yAnio){\n\t\t\t\tif (xMes > yMes){\n\t\t\t\t\treturn(true);\n\t\t\t\t}\n\t\t\t\tif (xMes == yMes){\n\t\t\t\t\tif (xDia > yDia){\n\t\t\t\t\t\treturn(true);\n\t\t\t\t\t}else{\n\t\t\t\t\t\treturn(false);\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\treturn(false);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn(false);\n\t\t\t}\n\t\t}\n\t}", "function mayor(fecha, fecha2){\n\t\tvar xMes=fecha.substring(5, 7);\n\t\tvar xDia=fecha.substring(8, 10);\n\t\tvar xAnio=fecha.substring(0,4);\n\t\tvar yMes=fecha2.substring(5, 7);\n\t\tvar yDia=fecha2.substring(8, 10);\n\t\tvar yAnio=fecha2.substring(0,4);\n\t\t\n\t\tif (xAnio > yAnio){\n\t\t\treturn(true);\n\t\t}else{\n\t\t\tif (xAnio == yAnio){\n\t\t\t\tif (xMes > yMes){\n\t\t\t\t\treturn(true);\n\t\t\t\t}\n\t\t\t\tif (xMes == yMes){\n\t\t\t\t\tif (xDia > yDia){\n\t\t\t\t\t\treturn(true);\n\t\t\t\t\t}else{\n\t\t\t\t\t\treturn(false);\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\treturn(false);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn(false);\n\t\t\t}\n\t\t}\n\t}", "checkIfDelay(date1,date2){\n a = new Date(date1);\n b = new Date(date2);\n\n if(b > a){\n return true\n }else{\n return false\n }\n\n }", "function compareDates(a, b)\n{\n var x=new Date(a.Date);\n var y=new Date(b.Date);\n \n console.log(\"hello we are hee\");\t\n\n console.log(x);\n console.log(y);\t\n\n if(x>y)\n {\n console.log(1);\n return 1;\n\n }\n else\n {\n console.log(-1);\t \n return -1;\n }\n}", "function compareDates(a, b) {\n var aDate = a.date;\n var bDate = b.date;\n\n let comparison = 0;\n if (aDate > bDate) {\n comparison = 1;\n } \n else if (aDate < bDate) {\n comparison = -1;\n }\n \n return comparison;\n}", "function date_desc(a,b){\nif (new Date(a.released)>new Date(b.released))\n return 1;\nif (new Date(a.released)<new Date(b.released))\n return -1;\nreturn 0\n}", "function compararFechas()\n{\n var f1 = document.getElementById(\"fecha1\").value;\n var f2 = document.getElementById(\"fecha2\").value;\n\n var df1 = f1.substring(0, 2);\n var df11 = parseInt(df1);\n var mf1 = f1.substring(3, 5);\n var mf11 = parseInt(mf1);\n var af1 = f1.substring(6, 10);\n var af11 = parseInt(af1);\n\n var fe111 = new Date(af11, mf11, df11);\n\n var df2 = f2.substring(0, 2);\n var df22 = parseInt(df2);\n var mf2 = f2.substring(3, 5);\n var mf22 = parseInt(mf2);\n var af2 = f2.substring(6, 10);\n var af22 = parseInt(af2);\n\n\n\n var fe222 = new Date(af22, mf22, df22);\n\n\n /* if (fe111 > fe222) {\n sweetAlert(\"ERROR!!!\", \"la primera fecha es mayor!\", \"error\");\n\n } else\n {\n sweetAlert(\"ERROR!!!\", \"La segunda fecha es mayor ctm\", \"error\");\n\n }*/\n alert(\"fecha \"+fe222);\n\n}", "function date_greater_than (date1, date2)\n{\n //Dates should be in the format Month(maxlength=3) Day(num minlength=2), Year hour(minlength=2):minute(minlength=2)(24h time)\n //Eg Apr 03 2020 23:59\n //the function caller is asking \"is date1 greater than date2?\" and gets a boolean in return\n\n let months = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n\n //Compares the years\n if (parseInt(date1.substr(7, 4)) > parseInt(date2.substr(7, 4))) return true\n else if (parseInt(date1.substr(7, 4)) < parseInt(date2.substr(7, 4))) return false\n else //the elses are for if both values are the same\n {\n //Compares the months\n if (months.indexOf(date1.substr(0, 3)) > months.indexOf(date2.substr(0, 3))) return true\n else if (months.indexOf(date1.substr(0, 3)) < months.indexOf(date2.substr(0, 3))) return false\n else\n {\n //Compares the days\n if (parseInt(date1.substr(4, 2)) > parseInt(date2.substr(4, 2))) return true\n if (parseInt(date1.substr(4, 2)) < parseInt(date2.substr(4, 2))) return false\n else\n {\n //Compares the hours\n if (parseInt(date1.substr(12, 2)) > parseInt(date2.substr(12, 2))) return true\n else if (parseInt(date1.substr(12, 2)) < parseInt(date2.substr(12, 2))) return false\n else\n {\n //Compares minutes\n if (parseInt(date1.substr(15, 2)) > parseInt(date2.substr(15, 2))) return true\n else return false\n }\n }\n }\n }\n}", "function compare_date( a, b ) {\n if ( a.date < b.date){\n return -1;\n }\n if ( a.date > b.date ){\n return 1;\n }\n return 0;\n}", "function compareDatesWH(date1, date2){\n var comp = DATES_EQUALS; // Son iguales\n if(date1.getFullYear() < date2.getFullYear()){\n comp = DATES_LOWER; // Date 1 es menor que date 2\n }\n else if(date1.getFullYear() > date2.getFullYear()){\n comp = DATES_HIGHER; // Date 1 es mayor que Date 2\n }\n else{\n if(date1.getFullYear() == date2.getFullYear() && date1.getMonth() < date2.getMonth()){\n comp = DATES_LOWER;\n }\n else if(date1.getFullYear() == date2.getFullYear() && date1.getMonth() > date2.getMonth()){\n comp = DATES_HIGHER; // Date 1 es mayor que Date 2\n }\n else{\n if(date1.getFullYear() == date2.getFullYear() && date1.getMonth() == date2.getMonth() && date1.getDate() < date2.getDate()){\n comp = DATES_LOWER;\n }\n else{\n if(date1.getFullYear() == date2.getFullYear() && date1.getMonth() == date2.getMonth() && date1.getDate() > date2.getDate()){\n comp = DATES_HIGHER; // Date 1 es mayor que Date 2\n }\n }\n }\n }\n return comp;\n }", "function compareDate(a,b) {\n if (a.date < b.date)\n return -1;\n else if (a.date > b.date)\n return 1;\n else\n return 0;\n }", "function _biggerThanToday(_Date2) {\n vDate1 = _getCurrentDate().split(\"-\")\n\t vDate2 = _Date2.value.split(\"-\")\n\n\t _Year1 = parseInt(vDate1[0]-0)\n\t _Month1 = parseInt(vDate1[1]-0)\n\t _Day1 = parseInt(vDate1[2]-0)\n\n\t _Year2 = parseInt(vDate2[0]-0)\n\t _Month2 = parseInt(vDate2[1]-0)\n\t _Day2 = parseInt(vDate2[2]-0)\n\n if (_Year1 > _Year2) {\n\t return false\n\t }\n\n\t if ((_Year1 == _Year2) && (_Month1 > _Month2)) {\n\t return false\n\t }\n\n\t if ((_Year1 == _Year2) && (_Month1 == _Month2) && (_Day1 >= _Day2)) {\n\t return false\n\t }\n\n\t return true\n\n}", "function compareDateObject(date1, date2){\r\n if(date1 == null) return false;\r\n if(date2 == null) return false;\r\n\r\n var date1Long = date1.getTime();\r\n var date2Long = date2.getTime();\r\n\r\n if(date1Long - date2Long > 0) return '>';\r\n if(date1Long - date2Long == 0) return '=';\r\n if(date1Long - date2Long < 0) return '<';\r\n else\r\n return '';\r\n}", "function isStringDate2Greater(date1,date2)\r\n{\r\n // date1 and date2 are strings\r\n //This function checks if date2 is later than date1\r\n //If the second date is null then it sets date2 to current date and checks if first date is later than the current date\r\n var sd=date1;\r\n if (date1 == \"\") return false;\r\n else if (date2 == \"\") return false;\r\n else\r\n {\r\n var ed=date2;\r\n var End= new Date(changeDateFormat(ed));\r\n }\r\n var Start= new Date(changeDateFormat(sd));\r\n var diff=End-Start;\r\n if (diff>=0) return true;\r\n else\r\n {\r\n// alert(msg);\t\r\n return false;\r\n }\r\n}", "function compare(a, b) {\n const dateA = a.date;\n const dateB = b.date;\n\n let comparison = 0;\n if (dateA > dateB) {\n comparison = 1;\n } else if (dateA < dateB) {\n comparison = -1;\n }\n return comparison * -1;\n }", "function compareDates(a,b) {\n if(a.attributes.date.isBefore(b.attributes.date)) {return -1;}\n if(b.attributes.date.isBefore(a.attributes.date)) {return 1;}\n return 0;\n}", "function trueOrFalse(a , b) {\r\n return a < b;\r\n}", "function compareDates(date1, date2)\r\n{\r\n if(date1 < date2)\r\n return -1;\r\n else if(date1 > date2)\r\n return 1;\r\n else\r\n return 0;\r\n}", "function date_asc(a,b){\nif (new Date(a.released)>new Date(b.released))\n return -1;\nif (new Date(a.released)<new Date(b.released))\n return 1;\nreturn 0\n}", "function compareTime(a, b){\r\n return (a.done ? !b.done : b.done) ? (a.done ? 1 : -1) : (a.date > b.date ? 1 : a.date < b.date ? -1 : 0);\r\n}", "function compareDate(a, b) {\r\n if (a.date > b.date) return 1;\r\n if (b.date > a.date) return -1;\r\n return 0;\r\n}", "function less(a,b) {\r\n return a.date < b.date;\r\n}", "function verifevent(){\n if (document.getElementById('datefn').value < document.getElementById('datedb').value){\n alert(\"il faut mettre un date fin supperiuer a date debut\");\n return false;\n }\n }", "function compareDates(d1, m1, y1, d2, m2, y2) {\n\n\tvar date1\t= new Number(d1);\n\tvar month1\t= new Number(m1);\n\tvar year1\t= new Number(y1);\n\tvar date2\t= new Number(d2);\n\tvar month2\t= new Number(m2);\n\tvar year2\t= new Number(y2);\n\n\tvar\treturnVal = 0;\n\tif (year1 < year2) {\n\t\treturnVal = -1;\n\t} else if (year1 > year2) {\n\t\treturnVal = 1;\n\t} else {\n\t\t//alert('same year');\n\t\tif (month1 < month2) {\n\t\t\treturnVal = -1;\n\t\t} else if (month1 > month2) {\n\t\t\treturnVal = 1;\n\t\t} else {\n\t\t\t//alert('same month');\n\t\t\tif (date1 < date2) {\n\t\t\t\treturnVal = -1;\n\t\t\t} else if (date1 > date2) {\n\t\t\t\treturnVal = 1;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn returnVal;\n\n}", "function dateChecker(date1, date2 = new Date()) {\n var date1 = new Date(Date.parse(date1));\n var date2 = new Date(Date.parse(date2));\n var ageTime = date2.getTime() - date1.getTime();\n\n if (ageTime < 0) {\n return false; //date2 is before date1\n } else {\n return true;\n }\n}", "function compareDatesValues(strDataInicial, strDataFinal)\n{\n if ((empty(strDataInicial)) || (empty(strDataFinal)))\n return false;\n if ((strDataInicial.length < 10) || (strDataFinal.length < 10))\n return false;\n if (convertDate(strDataInicial, 'YmdHis') > convertDate(strDataFinal, 'YmdHis')) {\n alertDialog('A data inicial deve ser sempre menor ou igual a data final.', 'Validação', 250, 150);\n return false;\n }\n return true;\n}", "compareDate(a, b) {\n if (a.startDate < b.startDate) return -1\n if (a.startDate > b.startDate) return 1\n else return 0\n }", "function compare(a,b) {\n if (a.dateOfEvent > b.dateOfEvent)\n return -1;\n if (a.dateOfEvent < b.dateOfEvent)\n return 1;\n return 0;\n }", "function compare(a,b){\n const varA = new Date(a.createdAt.seconds);\n const varB = new Date(b.createdAt.seconds);\n \n let comparison = 0;\n if (varA < varB) {\n comparison = -1;\n } else if (varA > varB) {\n comparison = 1;\n }\n return comparison;\n }", "function compareDates(ymd1,ymd2){\n\t// parse\n\tvar y1 = parseInt(ymd1.slice(0,4));\n\tvar m1 = parseInt(ymd1.slice(5,7));\n\tvar d1 = parseInt(ymd1.slice(8,10));\n\tvar y2 = parseInt(ymd2.slice(0,4));\n\tvar m2 = parseInt(ymd2.slice(5,7));\n\tvar d2 = parseInt(ymd2.slice(8,10));\n\t// compare years\n\tif(y1 > y2){\n\t\treturn 1\n\t} else if (y1 < y2) {\n\t\treturn -1\n\t} else {\n\t\t// compare months\n\t\tif(m1 > m2){\n\t\t\treturn 1\n\t\t} else if (m1 < m2) {\n\t\t\treturn -1 \n\t\t} else {\n\t\t\t// compare days\n\t\t\tif(d1 > d2){\n\t\t\t\treturn 1\n\t\t\t} else if (d1 < d2) {\n\t\t\t\treturn -1\n\t\t\t} else {\n\t\t\t\treturn 0\n\t\t\t}\n\t\t}\n\t}\n}", "function CompareDate(date1, date2)\n{\n var std_format = date1.split(\"-\"); \n s_dt= new Date(std_format[1]+\"-\"+std_format[0]+\"-\"+std_format[2]);\n var etd_format = date2.split(\"-\"); \n e_dt= new Date(etd_format[1]+\"-\"+etd_format[0]+\"-\"+etd_format[2]);\n if(s_dt>e_dt)\n return true;\n else \n return false;\n}", "compareTwoObjectsByDate(a,b) {\n let x = a.approach_date;\n let y = b.approach_date;\n if (x < y) {return -1;}\n if (x > y) {return 1;}\n return 0;\n }", "function compare(a,b) {\n\t\t\t\tif (new Date(a.date) < new Date(b.date))\n\t\t\t\t\treturn 1;\n\t\t\t\tif (new Date(a.date) > new Date(b.date))\n\t\t\t\t \treturn -1;\n\t\t\t\treturn 0;\n\t\t\t}", "function fechaAnterior(dia_inic,mes_inic, a_inic,dia_fin, mes_fin, a_fin)\n{\n\tvar m_inic=numMes(mes_inic);\n\tvar m_fin=numMes(mes_fin);\n\n\tif (a_inic>a_fin || (a_inic==a_fin && m_inic>m_fin)||(a_inic==a_fin && m_inic==m_fin && dia_inic>dia_fin))\n\t\treturn true;\n\treturn false;\n}", "function sortByDate(a, b) {\n let comparison = 0;\n\n // -------------------------------------------------------------JavaScript - Conditional Statments Ex. 3||\n if (a.getDate >= b.date) {\n comparison = 1;\n } else if (a.date <= b.date) {\n comparison = -1;\n }\n return comparison;\n}", "function entregaAntesDeHoy() {\n let today = new Date(getDiaActual());\n let fecha_entrega = new Date($('#pi-fecha').val());\n\n if (fecha_entrega.getTime() < today.getTime()) {\n //fecha es anterior a hoy\n return true;\n } else {\n return false;\n }\n}", "validateTwoDates(startDate, endDate){\n if( startDate < endDate) {\n return true;\n } else {\n return false\n }\n }", "function checkTodateLess(dateField1,dateField2,patname,errorMsg1)\n{\n frmDate=dateField1.value;\n frmDate=Date.UTC(frmDate.substr(6,4),frmDate.substr(3,2)-1,frmDate.substr(0,2)); \n toDate=dateField2.value;\n toDate=Date.UTC(toDate.substr(6,4),toDate.substr(3,2)-1,toDate.substr(0,2)); \n if(frmDate > toDate)\n {\n alert(errorMsg1);\n dateField2.focus();\n return false;\n }\n else\n {\n return true; \n }\n}", "function compare(a, b) {\n // Use toUpperCase() to ignore character casing\n const timeA = new Date(a[1].created);\n const timeB = new Date(b[1].created);\n\n console.log(a, '--', b)\n\n let comparison = 0;\n if (timeA > timeB) {\n comparison = 1;\n } else if (timeA < timeB) {\n comparison = -1;\n }\n return comparison * -1;\n}", "function soft_compare_dates(lowDate,MsgLowDate,highDate,MsgHighDate)\n{\t//controllo la validit� della prima data\n\tvar bStop = 0;\t\n\t\n\tif (!controlla_data_sys(lowDate,lowDate + 'Y',lowDate + 'M',lowDate + 'D',MsgLowDate))\n\t{\t//controllo la validit� della seconda data\n\t\tif (!controlla_data_sys(highDate,highDate + 'Y',highDate + 'M',highDate + 'D',MsgHighDate))\n\t\t{\t//Costruisco le date in modo che siano nello stesso formato e con la stessa lunghezza\n\t\t\t//aaaammgg facendo 2 chiamate alla funzione build_extended_date\n\t\t\tvar lower = build_extended_date(lowDate);\n\t\t\tvar higher = build_extended_date(highDate);\n\t\t\t\n\t\t\t//A questo punto controllo che le date non siano ne vuote ne uguali alla stringa 'NDNDND'\n\t\t\tif ((!(lower.length == 0)) && (!(higher.length == 0)) && (!(lower.toUpperCase() == 'NDNDND')) && (!(higher.toUpperCase() == 'NDNDND')))\n\t\t\t{\n\t\t\t\t//higher non deve essere posteriore a lower\n\t\t\t\tif\t(higher < lower)\n\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tvar strMsg = 'Attenzione: ' + MsgLowDate + ' ( '+ format_msg_date(document.forms[0].elements[lowDate].value) + ' )';\n\t\t\t\t\tstrMsg = strMsg + ' dovrebbe essere precedente a ' + MsgHighDate;\n\t\t\t\t\tstrMsg = strMsg + ' ( ' + format_msg_date(document.forms[0].elements[highDate].value) + ' )';\n\t\t\t\t\tstrMsg = strMsg + \".\\nPremere OK per continuare, Annulla per modificare \" + MsgHighDate + \".\";\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t//if (window.confirm ('Attenzione: ' + MsgLowDate + '\\nnon dovrebbe essere posteriore a ' + MsgHighDate + \".\\nPremere OK per continuare, Annulla per modificare \" + MsgLowDate))\n\t\t\t\t\tif (window.confirm (strMsg))\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tdocument.forms[0].elements[highDate + 'D'].focus();\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\t\t\t\t\n\t\t\t\t//alert ('Attenzione: ' + MsgLowDate + ' oppure\\n ' + MsgHighDate + ' non � valutabile');\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//alert ('Attenzione: ' + MsgHighDate + ' non � valida');\n\t\t\t//document.forms[0].elements[highDate + 'D'].focus();\n\t\t\treturn 1;\n\t\t}\n\t}\n\telse\n\t{\n\t\t//alert ('Attenzione: ' + MsgLowDate + ' non � valida');\n\t\t//document.forms[0].elements[lowDate + 'D'].focus();\n\t\treturn 1;\n\t}\n}", "function compareDates(a, b) {\n\t\tif (b.transaction_date < a.transaction_date) {\n\t\t\treturn -1\n\t\t}\n\t\tif (b.transaction_date > a.transaction_date) {\n\t\t\treturn 1\n\t\t}\n\t\treturn 0\n\t}", "function compareDates(a, b) {\n\t\tif (b.transaction_date < a.transaction_date) {\n\t\t\treturn -1\n\t\t}\n\t\tif (b.transaction_date > a.transaction_date) {\n\t\t\treturn 1\n\t\t}\n\t\treturn 0\n\t}", "function compare(a,b) {\n if (a.announcementDate > b.announcementDate)\n return -1;\n if (a.announcementDate < b.announcementDate)\n return 1;\n return 0;\n }", "function isCorrectOrder(yyyymmdd1, yyyymmdd2) {\r\n return yyyymmdd1 < yyyymmdd2;\r\n}", "function _biggerThanTodayMonth(_Date2) {\n vDate1 = _getCurrentDate().split(\"-\")\n\t vDate2 = _Date2.value.split(\"-\")\n\n\t _Year1 = parseInt(vDate1[0]-0)\n\t _Month1 = parseInt(vDate1[1]-0)\n\t _Day1 = parseInt(vDate1[2]-0)\n\n\t _Year2 = parseInt(vDate2[0]-0)\n\t _Month2 = parseInt(vDate2[1]-0)\n\t _Day2 = parseInt(vDate2[2]-0)\n\n if (_Year1 > _Year2) {\n\t return false\n\t }\n\n\t if ((_Year1 == _Year2) && (_Month1 > _Month2)) {\n\t return false\n\t }\n\n return true\n\n}", "function _fechaMayor(FechaIni, FechaFin)\r\n{\r\n //Obtiene dia, mes y año \r\n var fecha1 = new _fecha( FechaIni ); \r\n var fecha2 = new _fecha( FechaFin );\r\n\r\n //Obtiene Objetos Date\r\n var miFecha1 = new Date( fecha1.anio, fecha1.mes, fecha1.dia );\r\n var miFecha2 = new Date( fecha2.anio, fecha2.mes, fecha2.dia ); \r\n\t//Resta fechas y redondea \r\n return (miFecha1.getTime()>miFecha2.getTime())? FechaIni:FechaFin; \r\n}", "function compareDate(fromDate, toDate){\r\n\t// check both value is there or not\r\n\t// in else it will return true its due to date field validation is done on form level\r\n\tif (toDate != '' && fromDate != ''){\r\n\t\t// extract day month and year from both of date\r\n\t\tvar fromDay = fromDate.substring(0, 2);\r\n\t\tvar toDay = toDate.substring(0, 2);\r\n\t\tvar fromMon = eval(fromDate.substring(3, 5)-1);\r\n\t\tvar toMon = eval(toDate.substring(3, 5)-1);\r\n\t\tvar fromYear = fromDate.substring(6, 10);\r\n\t\tvar toYear = toDate.substring(6, 10);\r\n\r\n\t\t// convert both date in date object\r\n\t\tvar fromDt = new Date(fromYear, fromMon, fromDay);\r\n\t\tvar toDt = new Date(toYear, toMon, toDay); \r\n\r\n\t\t// compare both date \r\n\t\t// if fromDt is greater than toDt return false else true\r\n\t\tif (fromDt > toDt) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}else{\r\n\t\treturn true;\r\n\t}\r\n}", "function CompareBirthdays(a, b)\r\n {\r\n return a[\"nextBirthday\"] - b[\"nextBirthday\"];\r\n }", "function oa(a,b){return a.end>b.start&&a.start<b.end}", "function compareDate(dos, rd) {\n\n }", "function greaterThan(par1, par2) {\n \n if (par2 > par1) {\n true;\n } \n else {\n false;\n }\n}", "function compararFecha(fechaOriginal, fechaComprobar) {\n var dateOriginal = new Date(fechaOriginal), dateComprobar = new Date(fechaComprobar);\n if (dateComprobar < dateOriginal) {\n return -1;\n } else if (dateComprobar > dateOriginal) {\n return 1;\n } else {\n return 0;\n }\n }", "function check_fecha() {\n\t\n var patron=new RegExp(\"^(19|20)+([0-9]{2})([-])([0-9]{1,2})([-])([0-9]{1,2})$\");\n var fecha = \"2001\";\n\n if ((patron.test($(\"#idfecha\").val())) && ($(\"#idfecha\").val() < fecha)) {\n $(\"#errorfecha\").hide();\n } else {\n \t \t$(\"#errorfecha\").html(\"Debe ser anterior a 2001\");\n $(\"#errorfecha\").show();\n error_fecha = true;\n }\n\t\n\t}", "function isDate2OnOrAfterDate1(date1Value, date2Value) {\r\n if (date1Value == null || date1Value == '') {\r\n return 'U';\r\n }\r\n if (date2Value == null || date2Value == '') {\r\n return 'U';\r\n }\r\n // Make sure the date is in mm/dd/yyyy format.\r\n var reTestDate = /[0-9]{2,2}\\/[0-9]{2,2}\\/[0-9]{4,4}/;\r\n if (!reTestDate.test(date1Value) || !reTestDate.test(date2Value)) {\r\n return 'U';\r\n }\r\n // Put the dates in yyyymmdd format for the comparison.\r\n var newDate1Value = date1Value.substr(6, 4) + date1Value.substr(0, 2) + date1Value.substr(3, 2);\r\n var newDate2Value = date2Value.substr(6, 4) + date2Value.substr(0, 2) + date2Value.substr(3, 2);\r\n if (newDate1Value > newDate2Value) {\r\n return 'N';\r\n }\r\n else {\r\n return 'Y';\r\n }\r\n}", "function compareChargeDate(a, b){\n if(a.scheduledSubmitDate < b.scheduledSubmitDate) {\n\t\treturn -1;\n\t} else if(a.scheduledSubmitDate > b.scheduledSubmitDate) {\n\t\treturn 1;\n\t}\n\treturn 0;\n}", "compare(a, b) {\r\n const timestampA = a.timestamp;\r\n const timestampB = b.timestamp;\r\n let comparison = 0;\r\n if (timestampA > timestampB) {\r\n comparison = 1;\r\n } else if (timestampA < timestampB) {\r\n comparison = -1;\r\n }\r\n return comparison*-1;\r\n }", "function compare(a, b) {\n var date2 = new Date(parseInt(a.created_time) * 1000),\n date1 = new Date(parseInt(b.created_time) * 1000);\n\n if (date1 < date2)\n return -1;\n if (date1 > date2)\n return 1;\n return 0;\n }", "function relation(a,b) {\n console.log(`${a} == ${b} : ${a == b}`);\n console.log(`${a} > ${b} : ${a > b}`);\n console.log(`${a} < ${b} : ${a < b}`);\n }", "function compareDates(date_One, date_Two) {\n if (date_One.getFullYear() > date_Two.getFullYear())\n return 1;\n else if (date_One.getFullYear() < date_Two.getFullYear())\n return -1;\n else {\n if (date_One.getMonth() > date_Two.getMonth())\n return 1;\n else if (date_One.getMonth() < date_Two.getMonth())\n return -1;\n else {\n if (date_One.getDate() > date_Two.getDate())\n return 1;\n else if (date_One.getDate() < date_Two.getDate())\n return -1;\n else\n return 0;\n }\n }\n}", "function compare(a, b) {\n if (a.year < b.year)\n return -1;\n if (a.year > b.year)\n return 1;\n return 0;\n }", "function compareByDateDESC(a, b) {\n\tif (!('date' in a)) {\n\t\treturn 1;\n\t}\n\tif (!('date' in b)) {\n\t\treturn -1;\n\t}\n\t\n\tif (parseInt(a.date) < parseInt(b.date)) {\n\t\treturn 1;\n\t}\n\tif (parseInt(a.date) > parseInt(b.date)) {\n\t\treturn -1;\n\t}\n\treturn 0;\n}", "function by_datetime( a, b ) {\n\n const a_date = moment( a.day.split(' - ')[1], 'MM/DD/YYYY');\n const b_date = moment( b.day.split(' - ')[1], 'MM/DD/YYYY');\n\n if ( b_date.isAfter( a_date ) ) {\n return -1;\n } else if ( b_date.isBefore( a_date ) ) {\n return 1;\n } else {\n return 0;\n }\n\n}", "function bool_func() {\n var a = 10 > 2\n var b = 2 > 10\n document.getElementById(\"bool\").innerHTML = a + \"<br>\" + b;\n}", "function checkDates(dateField1,dateField2,errorMsg)\n{\n frmDate=dateField1.value;\n frmDate=Date.UTC(frmDate.substr(6,4),frmDate.substr(3,2)-1,frmDate.substr(0,2)); \n toDate=dateField2.value;\n toDate=Date.UTC(toDate.substr(6,4),toDate.substr(3,2)-1,toDate.substr(0,2)); \n if(frmDate > toDate)\n {\n alert(errorMsg);\n dateField2.focus();\n return false;\n }\n else\n {\n return true; \n }\n}", "function compareDates(date1, date2) {\n if (!date1 && !date2) {\n return true;\n }\n else if (!date1 || !date2) {\n return false;\n }\n else {\n return (date1.getFullYear() === date2.getFullYear() &&\n date1.getMonth() === date2.getMonth() &&\n date1.getDate() === date2.getDate());\n }\n}", "function compare(a, b) {\r\n\r\n let comparison = 0;\r\n if (a.Valore > b.Valore) {\r\n\tcomparison = 1;\r\n } else if (a.Valore < b.Valore) {\r\n\tcomparison = -1;\r\n }\r\n return comparison;\r\n}", "function greaterThan (b, e) {\n if (b>e){\n return false;\n } else if (b<e){\n return true;\n }\n}", "function isGreaterThan(first,second){\n if(first>second){\n return true;\n }else{\n return false;\n }\n}", "function isGreaterThan(first,second){\n if(first>second){\n return true;\n }else{\n return false;\n }\n}", "function compare(a, b) {\n const postedAtA = a.argument.postedAt;\n const postedAtB = b.argument.postedAt;\n \n let comparison = 0;\n if (postedAtA > postedAtB) {\n comparison = 1;\n } else if (postedAtA < postedAtB) {\n comparison = -1;\n }\n return comparison;\n }", "function compareLastestFn(a, b) {\n const workA = a.deadline;\n const workB = b.deadline;\n\n let comparison = 0;\n if (workA < workB) {\n comparison = 1;\n } else if (workA > workB) {\n comparison = -1;\n }\n return comparison;\n}", "function compareDates(date1,dateformat1,date2,dateformat2) {\r\n\tvar d1=getDateFromFormat(date1,dateformat1);\r\n\tvar d2=getDateFromFormat(date2,dateformat2);\r\n\tif (d1==0 || d2==0) {\r\n\t\treturn -1;\r\n\t\t}\r\n\telse if (d1 > d2) {\r\n\t\treturn 1;\r\n\t\t}\r\n\treturn 0;\r\n\t}", "function compareDates(date1,dateformat1,date2,dateformat2) {\r\n\tvar d1=getDateFromFormat(date1,dateformat1);\r\n\tvar d2=getDateFromFormat(date2,dateformat2);\r\n\tif (d1==0 || d2==0) {\r\n\t\treturn -1;\r\n\t\t}\r\n\telse if (d1 > d2) {\r\n\t\treturn 1;\r\n\t\t}\r\n\treturn 0;\r\n\t}", "campare(a, b) {\n const EPS = 0.1;\n if (Math.abs(Math.abs(a) - Math.abs(b)) < EPS) {\n return true;\n }\n return false;\n }", "function compareGreaterThanEqualsToday(sender, args) {\n args.IsValid = true;\n\n var todaypart = getDatePart(new Date().format(\"dd/MM/yyyy\"));\n var datepart = getDatePart(args.Value);\n\n var today = new Date(todaypart[2], (todaypart[1] - 1), todaypart[0]);\n var date = new Date(datepart[2], (datepart[1] - 1), datepart[0]);\n\n if (date >= today) {\n args.IsValid = true;\n }\n else {\n args.IsValid = false;\n }\n\n return args.IsValid;\n}", "function compare(a,b) {\n if (a.orderDate < b.orderDate)\n return -1;\n if (a.orderDate > b.orderDate)\n return 1;\n return 0;\n}", "function isAfter (date1, date2) {\n if (date1.getFullYear() > date2.getFullYear()) return true\n else if (date1.getFullYear() >= date2.getFullYear() && date1.getMonth() > date2.getMonth()) return true\n else if (date1.getFullYear() >= date2.getFullYear() && date1.getMonth() >= date2.getMonth() && date1.getDate() >= date2.getDate()) return true\n else return false\n}", "function compare(a, b) {\n\tif (a.year < b.year) {\n\t\treturn 1;\n\t}\n\tif (a.year > b.year) {\n\t\treturn -1;\n\t}\n\treturn 0;\n}", "function compare(a, b) {\n\tif (a.year < b.year) {\n\t\treturn 1;\n\t}\n\tif (a.year > b.year) {\n\t\treturn -1;\n\t}\n\treturn 0;\n}", "function bandingkanAngka(angka1, angka2) {\r\n // you can only write your code here!\r\n if (angka1 < angka2){\r\n return true;\r\n } \r\n else if (angka1 > angka2) {\r\n return false;\r\n }\r\n else {\r\n return -1;\r\n }\r\n}", "function myFunction({ a, b }) {\n return a.getTime() < b.getTime();\n}", "function validaFecha(fecha){\n\t\n\tvar fechaN=new Date(fecha);\n\tvar hoy=new Date();\n\tif(fechaN.getTime()>hoy.getTime()){\n\t\treturn false;\n\t}\n}", "function logicalDates(from, to) {\n if (vm.to === null || vm.to === undefined || vm.to == NaN) {\n vm.logicalDatesBool = true;\n } else {\n if (new Date(vm.from) > new Date(vm.to)) {\n vm.logicalDatesBool = false;\n } else {\n vm.logicalDatesBool = true;\n }\n }\n }", "function compareFuture(sender, args)\n{\n args.IsValid = true;\n\n var todaypart = getDatePart(new Date().format(\"dd/MM/yyyy\"));\n var datepart = getDatePart(args.Value);\n\n var today = new Date(todaypart[2], (todaypart[1] - 1), todaypart[0]);\n var date = new Date(datepart[2], (datepart[1] - 1), datepart[0]);\n\n if (date >= today) {\n args.IsValid = true;\n }\n else\n {\n args.IsValid = false;\n }\n\n return args.IsValid;\n}", "function greaterThan(a, b) {\n if (b > a) {\n return true\n }\n return false\n}" ]
[ "0.7259568", "0.718672", "0.69970506", "0.69300467", "0.6892409", "0.6877885", "0.6823914", "0.6727701", "0.66037464", "0.6589632", "0.6589632", "0.6589632", "0.6565917", "0.6565917", "0.6564586", "0.65605354", "0.65605354", "0.6559399", "0.6509227", "0.6497943", "0.6483748", "0.639944", "0.6312705", "0.6307119", "0.62698096", "0.6263629", "0.62605727", "0.62550944", "0.6234818", "0.62254727", "0.6197967", "0.6170857", "0.6159775", "0.61340874", "0.6124588", "0.61158305", "0.61095226", "0.60932237", "0.60637283", "0.6041642", "0.60383743", "0.60315084", "0.60306746", "0.60268056", "0.60114986", "0.6000738", "0.59911674", "0.59805566", "0.5978578", "0.5970209", "0.5962043", "0.5953144", "0.59295505", "0.59293854", "0.59182274", "0.5915024", "0.5915024", "0.5884511", "0.5881967", "0.58373505", "0.5836558", "0.5822256", "0.5821515", "0.58204037", "0.58159524", "0.58118194", "0.5806887", "0.57968575", "0.57757163", "0.57715887", "0.5765587", "0.57620096", "0.5760942", "0.5756292", "0.57405967", "0.5737566", "0.573702", "0.5735976", "0.5731335", "0.5724903", "0.5722087", "0.57145435", "0.57073677", "0.57073677", "0.569601", "0.56707007", "0.56686735", "0.56686735", "0.56613415", "0.5659788", "0.5658976", "0.56521666", "0.5650147", "0.5650147", "0.5642444", "0.56356186", "0.5628404", "0.5621888", "0.5621685", "0.5620198" ]
0.7268331
0
Funcion valida solo digitos numericos
function validateDigitos(myfield, e) { return restrictCharacters(myfield, e, digitsOnly); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onlyNumeric() {\n //Get element id\n const idName = this.id;\n // Regex that checks if input has somethong that is not a digit\n const current_value = $(`#${idName}`).val();\n const re = new RegExp(/(\\D+)/gi);\n const match = re.exec(current_value);\n // Check match\n if (match != null) {\n // remove user input\n $(`#${idName}`).val(\"\");\n // Put error message\n $(`#${idName}_wi`).text(\"¡Sólo se admiten valores numéricos!\");\n $(`#${idName}_wi`).show();\n } else {\n // Hide error message\n $(`#${idName}_wi`).text(\"\");\n $(`#${idName}_wi`).hide();\n }\n}", "function validarNumeros(elemento){\n if(elemento.value.length>0){\n var miAscii = elemento.value.charCodeAt(elemento.value.length-1)\n console.log(miAscii)\n if(miAscii >=48 && miAscii <= 57){ //valida solo numeros entre 0 y 9\n return true\n }else{\n elemento.value = elemento.value.substring(0, elemento.value.length-1)\n return false\n }\n }else{\n return false\n }\n}", "function validarNumeros(parametro) {\r\n\tif (!/^([0-9])*$/.test(parametro)) {\r\n\t\treturn false;\r\n\t}else {\r\n\t\treturn true;\r\n\t}\r\n}", "function allnumeric(inputtxt){\n var numbers = /^[0-9]/\n if(inputtxt.match(numbers)){\n return true;\n }\n else{\n alert('Please input numeric characters above zero only');\n rawcode.value = \"\"\n return false;\n }\n }", "function isNumber(elem)\n {\n // saves entry text\n var str = elem.value;\n\n // initially set to false\n var decimalDetected = false;\n\n // variable used for character comparison\n var oneCharacter = 0; \n\n // casting to string to compare with ASCII table\n str = str.toString();\n\n // cycles trougth all input text\n for(var i = 0; i < str.length; i++)\n {\n // getting the first char unicode\n var oneCharacter = str.charAt(i).charCod\n // allowing first char to be a minus sign\n if(oneCharacter == 45) \n {\n if(i == 0)\n {\n continue;\n }\n else\n {\n //alert(\"minus sign must be the first character\");\n return false;\n }\n }\n\n // allowing one decimal point only (can be either ',' or '.')\n if(oneCharacter == 46 || oneCharacter == 44)\n {\n // if we still didn't have any decimal character we accept it\n if(!decimalDetected)\n {\n decimalDetected = true;\n continue;\n }\n else\n {\n //alert(\"only one decimal placeholder is allowed\");\n return false;\n }\n }\n\n // allowing 0-9 range only\n if(oneCharacter < 48 || oneCharacter > 57)\n {\n //alert(\"insert numbers only!\");\n return false;\n }\n }\n return true;\n}", "function validar(num1){\n if(isNaN(num1)){\n return false;\n } else {\n return true;\n }\n}", "function allnumeric(tele) {\n var numbers = /^[0-9]+$/;\n if (tele.value.match(numbers)) {\n return true;\n } else {\n alert(\"Telephone code must be numeric\");\n return false;\n }\n}", "function valida_numeros(e){\n tecla = (document.all) ? e.keyCode : e.which;\n //Tecla de retroceso para borrar, siempre la permite\n if (tecla == 8 ){ return true; }\n if (tecla == 9 ){ return true; }\n if (tecla == 0 ){ return true; }\n if (tecla == 13 ){ return true; }\n \n // Patron de entrada, en este caso solo acepta numeros\n patron =/[0-9-.]/;\n tecla_final = String.fromCharCode(tecla);\n return patron.test(tecla_final);\n }", "function isDigit(c)\n{\n return !isNaN(parseFloat(c)) && isFinite(c);\n}", "function CHMisNumber(theInputField)\r\n{\r\n\r\n theInput = theInputField.value;\r\n theLength = theInput.length ;\r\n for (var i = 0 ; i < theLength ; i++)\r\n {\r\n\t//check if number field contains alphabets or spaces\r\n if (theInput.charAt(i) < '0' || theInput.charAt(i) > '9')\r\n {\r\n\t return false;\r\n\t}\r\n }// for ends\r\n return true;\r\n}// function isNumber ends", "function validNumber(input){\r\n\treturn (input.length == 10 || input[0] == \"0\");\r\n}", "function numericTypeCheck(input) {\r\n return /^-?[0-9]\\d*(\\.\\d+)?$/.test(input);\r\n}", "function isNumber(temp){\n if(temp.length==0){\n return false;\n }\n for(let t=0; t<temp.length; t++){\n if(temp[t]!=\"0\"&&temp[t]!=\"1\"&&temp[t]!=\"2\"&&temp[t]!=\"3\"&&temp[t]!=\"4\"&&temp[t]!=\"5\"&&temp[t]!=\"6\"&&temp[t]!=\"7\"&&temp[t]!=\"8\"&&temp[t]!=\"9\"){\n return false;\n }\n }\n return true;\n}", "function allnumeric(unummer) {\n var numbers = /^[0-9]+$/;\n if (unummer.value.match(numbers)) {\n return true;\n } else {\n alert(\"Vul alle velden in. Sommige velden (gewicht, grootte) moeten ALLEEN numerieke tekens bevatten\");\n unummer.focus();\n return false;\n }\n}", "isNumeric(value) {\n return /^-{0,1}\\d+$/.test(value);\n }", "function isNumeric(val){return(parseFloat(val,10)==(val*1));}", "function validNumber(obj){\n\tvar formObj = document.getElementById(obj.id);\n var filter = /^([0-9\\.])+$/;\n if (!filter.test(formObj.value)) {\n// \talert(\"Please input number !\");\n \tComShowCodeMessage('COM12178');\n \tformObj.value=\"\";\n }\n return true;\n}", "function isNumeric (c) {\n // FIXME: is this correct? Seems to work\n return (c >= '0') && (c <= '9')\n}", "function isNumeric (c) {\n // FIXME: is this correct? Seems to work\n return (c >= '0') && (c <= '9')\n}", "function isNumeric (c) {\n // FIXME: is this correct? Seems to work\n return (c >= '0') && (c <= '9')\n}", "function numeric_validation(e){\n\tvar unicode=e.charCode? e.charCode : e.keyCode;\n\t//alert(unicode);\n\tif (unicode!=8 //backspace\n\t\t&& (unicode != 45) //dash key and subtract in number pad, why?\n\t\t&& (unicode != 46) //delete key\n\t\t&& (unicode != 109) //subtract number pad \n\t\t&& (unicode != 189) //dash as subtract\n\t\t&& (unicode != 188) //period, not comma\n\t){\n\t\tif (unicode<48||unicode>57) //if not a number\n\t\t\treturn false; //disable key press\n\t}\n}", "function numeric(campo){\r\n if (isNaN(parseInt(campo.value))) {\r\n alert('Este campo debe ser un número');\r\n return false;\r\n }else{\r\n \treturn true;\r\n }\r\n\r\n}", "function numericCheck(inputString) {\n return /^[0-9]+$/.test(inputString);\n}", "function validateNumeric(value){\n if(value){ //if value isn't null\n if(/^[0-9]+$/.test(value)){ //use regex to see if all the characters are between 0 to 9\n return {isValid: true, error: null, details: null};\n }\n return {isValid: false, error: 'Must be numeric', details: '\"'+value+'\" contains other characters than numbers.'};\n }\n return {isValid: false, error:'Empty Field', details: 'Please fill out this field to resolve this issue.'};\n}", "function isNumberChar(char) {\n\treturn char.charCodeAt(0) >= 48 && char.charCodeAt(0) <= 57;\n}", "function IsNumeric(valor)\n{\n var log = valor.length;\n var sw = \"S\";\n for (x = 0; x < log; x++)\n {\n v1 = valor.substr(x, 1);\n v2 = parseInt(v1);\n //Compruebo si es un valor numérico \n if (isNaN(v2)) {\n sw = \"N\";\n }\n }\n if (sw === \"S\") {\n return true;\n } else {\n return false;\n }\n}", "function chequearSoloNumeros(field) {\n if (/^([0-9])*$/.test(field.value)) {\n setValido(field);\n return true;\n } else {\n setInvalido(field, `${field.name} solo debe contener números`);\n return false;\n }\n }", "function ValidNum() {\n\t\t if (event.keyCode < 48 || event.keyCode > 57) {\n\t\t event.returnValue = false;\n\t\t }\n\t\t return true;\n\t\t}", "function ValidNum() {\n\t\t if (event.keyCode < 48 || event.keyCode > 57) {\n\t\t event.returnValue = false;\n\t\t }\n\t\t return true;\n\t\t}", "function validateNumber (inputVal) {\n let inputNum = Number(inputVal);\n if (inputNum || inputVal === '' || inputVal === '.' || Number.isInteger(inputNum)) {\n return true;\n }\n return false;\n}", "function isNumeric(obj)\r\n {\r\n\tobj.value=trim(obj.value);\r\n\tvar val=obj.value;\r\n\tinputStr = val.toString()\r\n\tfor (var i = 0; i < inputStr.length; i++)\r\n\t{\r\n\t\tvar oneChar = inputStr.charAt(i)\t\t\t\r\n\t\tif ((oneChar < \"0\" || oneChar > \"9\") && oneChar != \"/\")\r\n\t\t{\r\n\t\t\talert(\"Enter Numeric Only \");\r\n\t\t\tobj.value='';\r\n\t\t \tobj.focus();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n}", "function isNumeric(poin){\n\t\tif( $('#pointTB').val() != $('#pointTB').val().replace(/[^0-9]/g, '')){ // cek hanya angka \n\t\t\t$('#pointTB').val($('#pointTB').val().replace(/[^0-9]/g, ''));\n\t\t}\n\t}", "function isNumber(character){\n return !isNaN(character);\n}", "function ValidNum() {\n\t if (event.keyCode < 48 || event.keyCode > 57) {\n\t event.returnValue = false;\n\t }\n\t return true;\n\t}", "function isNumeric(input) { return (input - 0) == input && input.length > 0;}", "function isDigit (c)\n{ return ((c >= \"0\") && (c <= \"9\"))\n}", "function isDigit (c)\r\n{ return ((c >= \"0\") && (c <= \"9\"))\r\n}", "function isDigit (c)\r\n{ return ((c >= \"0\") && (c <= \"9\"))\r\n}", "function isValidNumber(input) {\n // var num = Number.parseInt(input);\n // var numText = num + \"\";\n if (isNaN(input)) {\n return false;\n }\n return true;\n}", "function isNumeric (c) {\n\t // FIXME: is this correct? Seems to work\n\t return (c >= '0') && (c <= '9')\n\t}", "function ValidaSoloNumeros() \n\t{\n \t\tif ((event.keyCode < 48) || (event.keyCode > 57)) \n \t\tevent.returnValue = false;\n\t}", "function numeric(code){\nvar num = /^\\d{10}$/;\nif (code.value.match(num)){\n return true;\n} else {\n alert('Digits must be 10 digits only');\n return false;\n}\n\n}", "function isNumeric(c) \n\t{\n\t\tif (c >= '0' && c <= '9') \n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "function isValidNumberChar(ch) {\n return isNumeral(ch) || ch === '.';\n }", "function isNumberKey(evt,id){\r\n\r\n let numericConfirm = (evt.which) ? evt.which : evt.keycode;\r\nif(numericConfirm == 46){\r\n var txt=document.getElementById(id).value;\r\n if(!(txt.indexOf(\".\") > -1)){\r\n return true;\r\n }\r\n}\r\n\r\n if(numericConfirm > 31 && (numericConfirm < 48 || numericConfirm > 57)){\r\n return false;\r\n return true;\r\n }\r\n }", "function check2() {\n var string1 = \"I love javaScript\";\n for (var i = 0; i < string1.length; i++) {\n var element = parseFloat(string1[i]);\n console.log(element)\n if (typeof element === \"number\" && !Number.isNaN(element)) {\n return \"digits\";\n }\n }\n return \"no digits\";\n}", "function isNumber(input){\n\tif (input.match(/[0-9]+/)) {\n return true;\n } else {\n return false;\n }\n}", "function soloNumeros(evt){\n\tevt = (evt) ? evt : window.event\n var charCode = (evt.which) ? evt.which : evt.keyCode\n if (charCode > 31 && (charCode < 48 || charCode > 57)) {\n status = \"This field accepts numbers only.\"\n return false\n }\n status = \"\"\n return true\n}", "function validateNumber(val) {\n if(Number.isInteger(parseFloat(val)) == true && Math.sign(val) == 1) {\n return true\n } else {\n return 'Invalid quantity input!!'\n } \n}", "function isNum(txtValue) {\n\treturn !isNaN(txtValue);\n}", "function isNumericInput(event) {\n const key = event.keyCode;\n return ((key >= 48 && key <= 57) || // Allow number line\n (key >= 96 && key <= 105) // Allow number pad\n );\n}", "function charIsDigit(charCode)\n{\n return (charCode >= 48 && charCode <= 57);\n}", "function validarNum(te){\n var num=/^([0-9]+){9}$/;\n if(!num.test(te)){\n window.alert(\"El teléfono sólo debe contener números.\");\n return false;\n }\n}", "function isStringOfNumbers(input) {\n //Test for non-numeric chars\n let test = input.replace(/,|\\.|-|\\s/g, '');\n let res = validator.isNumeric(test);\n // let res = validator.isNumeric(input);\n if (!res) {\n const invalidChars = '[' + test.replace(/[0-9]/g, '').split('').join(',') + ']';\n return \"Contains non-numeric values, such as \" + invalidChars;\n }\n return true;\n}", "function isNumeric(inputi) {\n return !isNaN(parseFloat(inputi));\n}", "verifyNumeric(value) {\n return !isNaN(parseFloat(value)) && isFinite(value);\n }", "function numeric(n){\n return !isNaN(parseFloat(n));\n}", "function isNumber(num){\n return !isNaN(num)\n}", "function checkDigit () {\n c = 0;\n for (i = 0; i < nif.length - 1; ++i) {\n c += Number(nif[i]) * (10 - i - 1);\n }\n c = 11 - (c % 11);\n return c >= 10 ? 0 : c;\n }", "function checkStrToNum(phone_number)\r\n{\r\n\tfor(var n=0;n<phone_number.length;n++)\r\n\t{\r\n\t\tvar chr = phone_number.charAt(n);\r\n\r\n\t\tif(isNaN(chr))\r\n\t\t{\r\n \t\treturn false;\r\n \t\t}\r\n\t}\r\n\treturn true;\r\n}", "function isNumber(n) { return /^-?[\\d.]+(?:e-?\\d+)?$/.test(n); }", "function isNumber(n) { return /^-?[\\d.]+(?:e-?\\d+)?$/.test(n); }", "function validateNumbers(event) {\n if (event.keyCode == 46){\n return false;\n }\n var key = window.event ? event.keyCode : event.which;\n if (event.keyCode == 9 || event.keyCode == 8 || event.keyCode == 46) {\n return true; //allow only number key and period key\n }\n else if ( (key < 48 || key > 57) && key != 190 ) {\n return false;\n }\n else return true;\n}", "function comprobarNum( campo ,size ) {\n var exp = /^[0-9]*$/;\n if(!comprobarExpresionRegular(campo,exp,size)){//comprueba que la expresión enviada en telef sea cumplida por el campo enviado si no lo hace devuelve false\n return false;\n }else {\n campo.style.border = \"2px solid green\";\n return true;\n }\n}", "function onlyNumbers(field) {\n if (/^\\d+$/.test(field.value)) {\n setValid(field);\n return true;\n } else {\n setInvalid(field, `${field.name} must contain only numbers`);\n return false;\n }\n}", "function digitsOnly(e) {\n if (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57)) {\n return false;\n }\n }", "function checkNum(objText){\r\n\tvar newNum = parseInt(objText.val());\r\n\tif(isNaN(newNum)){\r\n\t\treturn false;\r\n\t}else{return true;}\r\n}", "function verifyNonNumericCharacters(input) {\n if (/\\D/.test(input)) {\n return false;\n } else {\n return true;\n }\n}", "function checkNumberInt(value,colname){\n if(Math.floor(value)==value)\n return [true,\"\"];\n else\n return [false,\"El campo \"+colname+\" solo admite valor numericos enteros\"];\n}", "function isNumeric(val)\n{\n return(parseFloat(val,10)==(val*1));\n}", "function numbersOnly(oToCheckField, oKeyEvent) {\n return (\n oKeyEvent.charCode === 0 ||\n /\\d|\\./.test(String.fromCharCode(oKeyEvent.charCode))\n );\n}", "isNumeric(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }", "function IsNumeric(val) { return Number(parseFloat(val))==val; }", "function validateNumbers(el, evt) {\n \n var charCode = (evt.which) ? evt.which : event.keyCode;\n var number = el.value.split('.');\n if (charCode != 46 && charCode > 31 && (charCode < 48 || charCode > 57)) {\n return false;\n }\n //just one dot\n if(number.length > 1 && charCode == 46) {\n return false;\n }\n //get the carat position\n var caratPos = getSelectionStart(el);\n var dotPos = el.value.indexOf(\".\");\n if( caratPos > dotPos && dotPos>-1 && (number[1].length > 1)){\n return false;\n }\n return true;\n}", "function validateNum(){\n\tvar getNumber = $(\"#altitudeid\").val();\n\tnumbers = /^[0-9]+$/;\n\tif(!getNumber.match(numbers)){\n\t\tnewVal = getNumber.replace(/[a-zA-Z<>`{}~,./?;:'\"!@#$%^&*()_+=\\-\\[\\]]+$/, \"\");\n\t\t$(\"#altitudeid\").val(newVal);\n\t}\n}", "function esNumeroDecimalValido(strNumeroDecimal) {\n\treturn (/^[\\-]*[0-9]+\\.[0-9][0-9]$/.test(strDecimal));\n}", "function esNumeroDecimalValido(strNumeroDecimal) {\n\treturn (/^[\\-]*[0-9]+\\.[0-9][0-9]$/.test(strDecimal));\n}", "function validateNumeric(e) {\n var theEvent = e || window.event;\n var key = theEvent.keyCode || theEvent.which;\n key = String.fromCharCode(key);\n var regex = /[0-9]|\\./;\n if (!regex.test(key)) {\n theEvent.returnValue = false;\n if (theEvent.preventDefault) theEvent.preventDefault();\n }\n }", "function isNumeric(n) {\n return !isNaN(parseFloat(n));\n}", "function isdecimal(num) {\n return (/^\\d+(\\.\\d+)?$/.test(num + \"\"));\n}", "function custom(theValue) {\n //+ - 1 sau mai multe\n // 0 sau mai multe\n //? sursa : https://stackoverflow.com/questions/19715303/regex-that-accepts-only-numbers-0-9-and-no-characters\n //?sursa pt nr cu , : https://stackoverflow.com/questions/12643009/regular-expression-for-floating-point-numbers\n if(/^([0-9]+[.])?[0-9]+$/.test(theValue)) {\n ctrl.$setValidity(\"doarCifre\",true);\n }else {\n ctrl.$setValidity(\"doarCifre\",false);\n } \n return theValue;\n }", "function isNumber(num){\n\t\treturn !isNaN(num);\n\t}", "function isNumeric(x) { return !isNaN(parseFloat(x)) && isFinite(x); }", "function isnumeric(val){\n\tvar check = /^[\\d]+$/;\n\treturn check.test(trim(val));\n}", "function checkAllowNumber(e) {\n var code = (e.which) ? e.which : e.keyCode;\n if ((code < 48 || code > 57) && code != 8 && code != 13 && code != 27 && code != 0 && code != 46 && (code < 37 || code > 40)) {\n return false;\n }\n return true;\n}", "function checkNumber(stringValue) {\n\t\tif(stringValue && (stringValue != 0 || stringValue !== 0 || stringValue != '0' || stringValue !== '0')){\n\t\t\tstringValue = stringValue.trim();\n\t\t\t/*\tRegExp explanation:\n\t\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\t# ] - End of negated character class\t\t\t\t\t\t\t\t# \\. Matches the character . literally\n\t\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\t# g Modifier: global. All matches (don't return on first match)\t# {2} Quantifier: {2} Exactly 2 times\n\t\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\t*/\n\t\t\tvar result = stringValue.replace(/[^-0-9-]/g, '');\n\t\t\tif (/[,\\.]\\d{2}$/.test(stringValue)) {\n\t\t\t\tresult = result.replace(/(\\d{2})$/, '.$1');\n\t\t\t}\n\t\t\treturn parseFloat(result);\n\t\t}else{\n\t\t\treturn stringValue;\t\n\t\t}\n\t}", "function ValidNum() {\n if (event.keyCode < 48 || event.keyCode > 57) {\n event.returnValue = false;\n }\n}", "function isNum(args)\n{\n args = args.toString();\n\n if (args.length == 0) return false;\n\n for (var i = 0; i<args.length; i++)\n {\n if ((args.substring(i,i+1) < \"0\" || args.substring(i, i+1) > \"9\") && args.substring(i, i+1) != \".\"&& args.substring(i, i+1) != \"-\")\n {\n return false;\n }\n }\n\n return true;\n}", "function validateNumbers(el, evt) {\n\n var charCode = (evt.which) ? evt.which : event.keyCode;\n var number = el.value.split('.');\n if (charCode != 46 && charCode > 31 && (charCode < 48 || charCode > 57)) {\n return false;\n }\n //just one dot\n if(number.length > 1 && charCode == 46) {\n return false;\n }\n //get the carat position\n var caratPos = getSelectionStart(el);\n var dotPos = el.value.indexOf(\".\");\n if( caratPos > dotPos && dotPos>-1 && (number[1].length > 1)){\n return false;\n }\n return true;\n}", "function isNumeric(n){\n return !isNaN(parseFloat(n)) && isFinite(n);\n }", "function Numbervalidate(evt) {\r\n var theEvent = evt || window.event;\r\n\r\n // Handle paste\r\n if (theEvent.type === 'paste') {\r\n key = event.clipboardData.getData('text/plain');\r\n } else {\r\n // Handle key press\r\n var key = theEvent.keyCode || theEvent.which;\r\n key = String.fromCharCode(key);\r\n }\r\n var regex = /[0-9]|\\./;\r\n if( !regex.test(key) ) {\r\n theEvent.returnValue = false;\r\n if(theEvent.preventDefault) theEvent.preventDefault();\r\n }\r\n}", "function Numbervalidate(evt) {\r\n var theEvent = evt || window.event;\r\n\r\n // Handle paste\r\n if (theEvent.type === 'paste') {\r\n key = event.clipboardData.getData('text/plain');\r\n } else {\r\n // Handle key press\r\n var key = theEvent.keyCode || theEvent.which;\r\n key = String.fromCharCode(key);\r\n }\r\n var regex = /[0-9]|\\./;\r\n if( !regex.test(key) ) {\r\n theEvent.returnValue = false;\r\n if(theEvent.preventDefault) theEvent.preventDefault();\r\n }\r\n}", "function validate(num) {\r\n // return Number.isInteger(num);\r\n\r\n //return num !== isNaN && num >= 0 && num <= 100;\r\n return typeof num === \"number\" && num >= 0 && num <= 100;\r\n\r\n\r\n\r\n}", "function isNumeric(val) {\r\n var dp = false;\r\n for (var i=0; i < val.length; i++) {\r\n if (!isDigit(val.charAt(i))) {\r\n if (val.charAt(i) == '.') {\r\n if (dp == true) { return false; } // already saw a decimal point\r\n else { dp = true; }\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n }", "function isNumeric(val)\n{\n return !isNaN(parseInt(val));\n}", "function isNumberKeyDecimal(evt){\n var charCode = (evt.which) ? evt.which : evt.keyCode;\n if (charCode > 31 && (charCode !== 46 &&(charCode < 48 || charCode > 57)))\n return false;\n return true;\n}", "function isNumeric(num){\n return !isNaN(num)\n}", "function checkAllowNumber(e) {\r\n var code = (e.which) ? e.which : e.keyCode; \r\n if ((code < 48 || code > 57) && code != 8 && code != 13 && code != 27 && code != 0 && code != 46 && (code < 37 || code > 40)) {\r\n return false;\r\n }\r\n return true;\r\n}", "function isNumeric(input) {\n if(isNaN(parseFloat(input))) {\n return false;\n } else {\n return true;\n }\n}", "function isDigit(c) {\n return c >= '0' && c <= '9';\n}" ]
[ "0.74387825", "0.73756796", "0.7375156", "0.73401827", "0.7258924", "0.72289145", "0.7200956", "0.7190702", "0.7165188", "0.71361583", "0.7125462", "0.7123674", "0.7111539", "0.7084717", "0.7055427", "0.70404387", "0.70199436", "0.70189685", "0.70189685", "0.70189685", "0.70087665", "0.7005751", "0.70047903", "0.6985788", "0.6985531", "0.6974031", "0.69699883", "0.696654", "0.696654", "0.6955394", "0.6952595", "0.6952366", "0.6950174", "0.6939258", "0.6938377", "0.69281536", "0.6927588", "0.6927588", "0.69267714", "0.6923518", "0.6919269", "0.691444", "0.6905498", "0.6903471", "0.6899059", "0.6890356", "0.68754977", "0.6871675", "0.6867606", "0.6866097", "0.68535", "0.6849843", "0.68271255", "0.6825087", "0.68219995", "0.6817557", "0.6812876", "0.68062353", "0.68018025", "0.6795601", "0.67891043", "0.67891043", "0.67832977", "0.67759323", "0.677513", "0.67738646", "0.6772787", "0.6765715", "0.6765568", "0.6764444", "0.6759089", "0.67535675", "0.6753326", "0.67498296", "0.6740975", "0.67391646", "0.67391646", "0.6737614", "0.6737092", "0.6736226", "0.67360926", "0.6732653", "0.67260855", "0.67230713", "0.6718593", "0.6716876", "0.67132765", "0.67114735", "0.67096686", "0.6708274", "0.67081237", "0.67081237", "0.67069274", "0.6701669", "0.66954905", "0.66891587", "0.6686673", "0.66848755", "0.66848516", "0.6684543" ]
0.69078535
42
Funcion valida solo formato horaminutosegundo
function validateTiempo(myfield, e) { return restrictCharacters(myfield, e, tiempo); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validarHora() {\n\t// usaremos un expresion regular para comprobar que la hora cumple el patron indicado:\n\t// podemos teclear horas de 00 a 23 (0[0-9]|1[0-9]|2[0-3]) Ej: 01 o 12 o 22\n\t// seguido de : [:]\n\t// y para terminar el numero de minutos desde 00 a 59 (0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9])\n var exp = /(0[0-9]|1[0-9]|2[0-3])[:](0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9])/;\n if (!exp.test(document.getElementById(\"hora\").value)){\n document.getElementById(\"hora\").value = \"error!\";\n document.getElementById(\"hora\").focus();\n document.getElementById(\"hora\").className=\"error\";\n document.getElementById(\"errores\").innerHTML = \"Error en la hora. <br/> Formato no correcto Ej. 14:30\";\n return false;\n }\n else {\n document.getElementById(\"hora\").className=\"\";\n document.getElementById(\"errores\").innerHTML = \"\";\n return true;\n }\n}", "function VerificaHora(campo){\n var hora=campo.value;\n var min=campo.value;\n\tvar num = parseInt(hora.substring(0,2));\n var min2 = parseInt(min.substring(3,5));\n if ((num > 19 || num < 7) || min2 > 60){\n \twindow.alert(\"A HORA ESTA FORA DE PADRAO!\");\n \treturn false;\n }else{\n \treturn true;\n }\n \n \n \n \n}", "function validarHora(hora){\n cadena=/^[0-9]{2}:[0-9]{2}:[0-9]{2}$/;\n if(cadena.test(hora))\n return 1;\n else\n return 0;\n}", "function compruebaHora(valor) {\n var expr = /^[0-2][0-9]:[0-5][0-9]$/;\n\n if (valor.trim() === \"\") {\n return \"El campo no puede estar vacio.\";\n } else if (!expr.test(valor)) {\n return \"El campo tiene que tener el formato hh:mm\";\n } else {\n return true;\n }\n}", "function horario(time) {\n time = time.split(':');\n if (time[0] >= 7 && time[0] <= 8) {\n return true;\n }\n if (time[0] >= 16 && time[0] <= 18) {\n return true;\n }\n if (time[0] == 9 || time[0] == 19) {\n if (time[1] >= 0 && time[1] <= 30) {\n return true;\n }\n }\n return false;\n}", "function ControlloOraInserita(oradafiltrare,campo,colore,sfondo) {\r\n var hh=new String();\r\n var mm=new String();\r\n\r\n var pattern1=/^([0-9]{4,4})+$/\r\n var pattern2=/^([0-9]{2,2})+\\:+([0-9]{2,2})+$/;\r\n \r\n switch (oradafiltrare.length) {\r\n case 0:\r\n document.getElementById(campo).style.color=colore;\r\n document.getElementById(campo).style.background=sfondo;\r\n return;\r\n break;\r\n \r\n case 2:\r\n oradafiltrare+=\":00\";\r\n break;\r\n } \r\n \r\n //controlla che siano stati inseriti solo numeri\r\n if (!pattern1.test(oradafiltrare)) { \r\n if (!pattern2.test(oradafiltrare)) {\r\n alert (\"Attenzione! L'ora che hai inserito e' errata!\")\r\n return;\r\n }\r\n }\r\n \r\n //controllo dell'ora\r\n hh=oradafiltrare.substr(0,2);\r\n if (Number(hh)>23) {\r\n alert (\"Attenzione! L'ora che hai inserito e' errata!\")\r\n return;\r\n }\r\n \r\n //controllo dei minuti\r\n if (oradafiltrare.length==4) {\r\n mm=oradafiltrare.substr(2,2);\r\n } else {\r\n mm=oradafiltrare.substr(3,2);\r\n }\r\n \r\n if (Number(mm)>59) {\r\n alert (\"Attenzione! L'ora che hai inserito e' errata!\")\r\n return;\r\n }\r\n \r\n \r\n // ricostruzione della stringa e uscita\r\n document.getElementById(campo).value=hh+\":\"+mm;\r\n document.getElementById(campo).style.color=colore;\r\n document.getElementById(campo).style.background=sfondo;\r\n return;\r\n}", "function Validar(Cadena){\n var Fecha= new String(Cadena) // Crea un string\n var RealFecha= new Date() // Para sacar la fecha de hoy\n //Cadena A�o\n var Ano= new String(Fecha.substring(Fecha.lastIndexOf(\"-\")+1,Fecha.length))\n // Cadena Mes\n var Mes= new String(Fecha.substring(Fecha.indexOf(\"-\")+1,Fecha.lastIndexOf(\"-\")))\n // Cadena D�a\n var Dia= new String(Fecha.substring(0,Fecha.indexOf(\"-\")))\n\n // Valido el a�o\n if (isNaN(Ano) || Ano.length<4 || parseFloat(Ano)<1900 || Ano.length>4 || parseFloat(Ano)>2015){\n alert('Gestion invalida')\n return false\n }\n // Valido el Mes\n if (isNaN(Mes) || parseFloat(Mes)<1 || parseFloat(Mes)>12){\n alert('Mes invalido')\n return false\n }\n // Valido el Dia\n if (isNaN(Dia) || parseInt(Dia, 10)<1 || parseInt(Dia, 10)>31){\n alert('Dia invalido')\n return false\n }\n if (Mes==4 || Mes==6 || Mes==9 || Mes==11 || Mes==2) {\n if (Mes==2 && Dia > 28 || Dia>30) {\n alert('Dia invalido')\n return false\n }\n }\n}", "function validarFormatoFecha(fecha) {\n var RegExPattern = /^\\d{2,4}\\-\\d{1,2}\\-\\d{1,2}$/;\n if (fecha.match(RegExPattern)) {\n return true;\n } else {\n return false;\n }\n}", "function validateHorario(data){\n var horaInicio=$(data.horaInicio).val();\n var horaFin=$(data.horaFin).val();\n var mensaje=data.wrapper+' p.help-block';\n if(horaInicio!=\"\" && horaFin!=\"\" && horaInicio>=horaFin){\n\n $(mensaje).show();\n }\n else{\n $(mensaje).hide();\n }\n}", "function vreme(x){\r\n \r\n var re = /^\\d{4}[\\/\\-](0?[1-9]|1[012])[\\/\\-](0?[1-9]|[12][0-9]|3[01])$/; //regularan izraz za proveru datuma formata godina-mesec-dan \r\n if(re.test(x.value))\r\n x.style.background=\"#FFF\";\r\n else{\r\n window.alert(\"Neispravan format datuma!\");\r\n x.style.background=\"red\";\r\n return false;\r\n }\t\t \r\n}", "function validFecha(id, valor, AnioActual, MesActual, DiaActual){\r\n var id= document.getElementById(id).value; \r\n var cantidad= id.length;\r\n\r\n var valor2 = id.split('-'); \r\n var Dia = valor2[0]; \r\n var Mes = valor2[1]; \r\n var Anio = valor2[2];\r\n\r\n\r\n\r\n if(cantidad<10) alert('Formato fecha Incorrecta en '+valor+ '!!!');\r\n else if(Dia>'31') alert('Corrija el Día de fecha introducida en '+valor+ '!!!');\r\n else if(Mes>'12') alert('Corrija el Mes de fecha introducida en '+valor+ '!!!');\r\n else if(Anio>AnioActual) alert('Corrija Año de fecha introducida en '+valor+ '!!!');\r\n\r\n\r\n /* else if(Anio<1990 || Anio>AnioActual) alert('Corrija Año de fecha introducida en '+valor+ '!!!');\r\n else if(Mes<01 || Mes>'12') alert('Corrija Mes de fecha introducida en '+valor+ '!!!');\r\n else if(Anio==AnioActual && Mes>MesActual) alert('Corrija Mes de fecha introducida en '+valor+ '!!!');\r\n else if(Anio==AnioActual && Mes==MesActual && Dia>DiaActual) alert('Corrija Dia de fecha introducida en '+valor+ '!!!');\r\n else if(Dia<01 || Dia>'31') alert('Corrija Mes de fecha introducida en '+valor+ '!!!');*/\r\n}", "function isValidDateFormat (str_date, lingua) {\n\t\n\tvar invalidFormatMsg = \"Formato di data non valido\";\n\tvar validFormatMsg = \"Il formato consentito e' gg/mm/yyyy.\";\n\tvar allowedValueMsg = \"I valori consentiti sono interi senza segno.\";\n\tvar invalidDayMsg = \"Valore del giorno del mese non valido\";\n\tvar invalidMonthMsg = \"Valore del mese non valido\";\n\tvar invalidYearMsg = \"Valore dell'anno non valido\";\n\tvar allowedDayMsg = \"L'intervallo consentito e' 01-\";\n\tvar allowedMonthMsg = \"L'intervallo consentito e' 01-12.\";\n\tvar allowedYearMsg = \"I valori consentiti sono gli anni successivi al 1900.\";\n\t\n\tif(lingua != null && lingua == \"en\"){\n\t\tinvalidFormatMsg = \"Warning, not valid date format\";\n\t\tvalidFormatMsg = \"Warning, allowed date format is gg/mm/yyyy.\";\n\t\tallowedValueMsg = \"Allowed values are integers without sign.\";\n\t\tinvalidDayMsg = \"Not valid day of month\";\n\t\tinvalidMonthMsg = \"Not valid month\";\n\t\tinvalidYearMsg = \"Not valid year\";\n\t\tallowedDayMsg = \"Allowed interval is 01-\";\n\t\tallowedMonthMsg = \"Allowed months interval is 01-12.\";\n\t\tallowedYearMsg = \"Allowed values are the years beyond 1900.\";\n\t}\n\t\n\t\n\tvar RE_NUM = /^\\-?\\d+$/;\n\tvar NUM_CENTYEAR = 30;\n\tvar arr_date = str_date.split('/');\n\t\n\t\n\t//CONTROLLI PRELIMINARI\n\tif (str_date.length != 10) {\n\t\talert (invalidFormatMsg + \": '\" + str_date + \"'.\\n\" + validFormatMsg);\n\t\treturn false;\n\t}\n\tif (arr_date.length != 3) {\n\t\talert (invalidFormatMsg + \": '\" + str_date + \"'.\\n\" + validFormatMsg);\n\t\treturn false;\n\t}\n\t\n\t//CONTROLLI SUL GIORNO\n\tif (!arr_date[0]) {\n\t\talert (invalidFormatMsg + \": '\" + str_date + \"'.\\n\" + validFormatMsg);\n\t\treturn false;\n\t}\n\tif (arr_date[0].length != 2) {\n\t\talert (invalidFormatMsg + \": '\" + str_date + \"'.\\n\" + validFormatMsg);\n\t\treturn false;\n\t}\n\tif (!RE_NUM.exec(arr_date[0])) {\n\t\talert (invalidFormatMsg + \": '\" + arr_date[0] + \"'.\\n\" + allowedValueMsg);\n\t\treturn false;\n\t}\n\t\n\t//CONTROLLI SUL MESE\n\tif (!arr_date[1]){ \n\t\talert (invalidFormatMsg + \": '\" + str_date + \"'.\\n\" + validFormatMsg);\n\t\treturn false;\n\t}\n\tif (arr_date[1].length != 2){ \n\t\talert (invalidFormatMsg + \": '\" + str_date + \"'.\\n\" + validFormatMsg);\n\t\treturn false;\n\t}\n\tif (!RE_NUM.exec(arr_date[1])) {\n\t\talert (invalidFormatMsg + \": '\" + arr_date[1] + \"'.\\n\" + allowedValueMsg);\n\t\treturn false;\n\t}\n\tif (arr_date[1] < 1 || arr_date[1] > 12) {\n\t\talert (invalidMonthMsg + \": '\" + arr_date[1] + \"'.\\n\" + allowedMonthMsg);\n\t\treturn false;\n\t}\n\t\n\t//CONTROLLI SULL'ANNO\n\tif (!arr_date[2]) {\n\t\talert (invalidFormatMsg + \": '\" + str_date + \"'.\\n\" + validFormatMsg);\n\t\treturn false;\n\t}\n\tif (arr_date[2].length != 4){ \n\t\talert (invalidFormatMsg + \": '\" + str_date + \"'.\\n\" + validFormatMsg);\n\t\treturn false;\n\t}\n\tif (!RE_NUM.exec(arr_date[2])) {\n\t\talert (invalidFormatMsg + \": '\" + arr_date[2] + \"'.\\n\" + allowedValueMsg);\n\t\treturn false;\n\t}\n\tif (arr_date[2] < 1900) {\n\t\talert (invalidYearMsg + \": '\" + arr_date[2] + \"'.\\n\" + allowedYearMsg);\n\t\treturn false;\n\t}\n\t\n\t//CONTROLLO VALIDITA DEL GIORNO DEL MESE\n\tif (arr_date[2] < 100) {\n\t\tarr_date[2] = Number(arr_date[2]) + (arr_date[2] < NUM_CENTYEAR ? 2000 : 1900);\n\t}\n\tvar dt_date = new Date();\n\tdt_date.setDate(1);\n\tdt_date.setMonth(arr_date[1]-1);\t\n\tdt_date.setFullYear(arr_date[2]);\n\tvar dt_numdays = new Date(arr_date[2], arr_date[1], 0);\n\tdt_date.setDate(arr_date[0]);\n\t\n\tif (dt_date.getMonth() != (arr_date[1]-1)){ \n\t\talert (invalidDayMsg + \": '\" + arr_date[0] + \"'.\\n\" + allowedDayMsg+dt_numdays.getDate()+\".\");\n\t\treturn false;\n\t}\n\treturn true;\n}", "function Validar2Fechas(dFechaDesde, dFechaHasta)\r\n{\r\n\tvar aArrayDesde = dFechaDesde.split('/');\r\n\tvar aArrayHasta = dFechaHasta.split('/');\r\n\tvar nDia1, nMes1, nAnio1;\r\n\tvar nDia2, nMes2, nAnio2;\r\n\tvar nDesde, nHasta;\r\n\t\r\n\t// en este punto asumiremos que ambas fechas estan en el formato correcto\r\n\tnDia1 = parseInt(aArrayDesde[0], 10);\r\n\tnMes1 = parseInt(aArrayDesde[1], 10);\r\n\tnAnio1 = parseInt(aArrayDesde[2], 10);\r\n\t\r\n\tnDesde = (nAnio1*1000) + (nMes1*31) + nDia1;\r\n\t\r\n\tnDia2 = parseInt(aArrayHasta[0], 10);\r\n\tnMes2 = parseInt(aArrayHasta[1], 10);\r\n\tnAnio2 = parseInt(aArrayHasta[2], 10);\r\n\t\r\n\tnHasta = (nAnio2*1000) + (nMes2*31) + nDia2;\r\n\t\r\n\tif (Number(nDesde) <= Number(nHasta))\r\n\t\treturn true;\r\n\telse\r\n\t\treturn false;\t\r\n}", "function validaFormProvimento() {\n var ueid = document.getElementById(\"ueid\");\n var matricula = document.getElementById(\"Matricula\");\n var motivo = document.getElementById(\"inputMotivo\");\n var motivo_data_inicio = date(document.getElementById(\"DataInicio\"));\n var motivo_data_fim = date(document.getElementById(\"DataFim\"));\n var data_assuncao = date(document.getElementById(\"DataAssuncao\"));\n\n if (ueid == \"\" || (ueid = null)) {\n erro = \"Código empresa está vazio\";\n }\n\n if (ueid.length > 8) {\n erro = \"Código da escola não pode ter mais que 8 dígitos\";\n }\n\n if (motivo <= 0) {\n document.getElementById(\"erroMotivo\").value =\n \"Por favor, escolha um motivo de provimento.\";\n }\n\n if (motivo_data_fim <= motivo_data_inicio) {\n erro = \"Data final não pode ser menor ou igual a data início.\";\n }\n}", "function isValidCurso(formname){\n \n var varCurso = document.forms[formname][\"curso\"].value; //Obtenemos los datos introducidos en el input curso\n \n if(varCurso.length == 0){\n var x= document.getElementById(\"curso\");\n x.innerHTML=\"Campo vacio\";\n return false;\n }\n varCurso=varCurso.trim();//quitamos los posibles espacios en blancos de los <--extremos-->\n varCurso= varCurso.replace(/ /g,' ');//sustituimos los posibles múltiples espacios entre palabras por solamente uno\n \n var x= document.getElementById(\"curso\");\n if(!/^[1-4][a-hA-H]$/.test(varCurso)){//Si los datos introducidos no cumplmen \"nl\", siendo \"n\" un número entre 1 y 4 y \"l\" una letra en a-h o A-H\n x.innerHTML=\"Error: nº curso debe estar entre 1 y 4, letra entre A y H\";\n return false; \n }\n \n x.innerHTML=\"\"; //Si no hay fallo en el parrafo anexo al input no se pone nada\n document.forms[formname][\"curso\"].value=varCurso; //refrescamos los datos introducimos en el campo curso pero ahora sin espacios en blanco inválidos.\n return true;\n}", "fonevalidate(input, minValue) {\n let inputLength = input.value.length;\n \n let errorMessage = `Insira o telefone no padrão (00)00000-0000`;\n \n \n if(inputLength != minValue){\n this.printMessage(input, errorMessage);\n } \n }", "function formatarHorario(componente, componenteFoco)\n{\n\tif (componente.value.length == 2) \n\t{\n\t\tcomponente.value += ':';\n\t}\n\telse if (componente.value.length == 5) {\n\t\tif( componenteFoco != null ) {\n\t\t\tcomponenteFoco.focus();\n\t\t}\n\t}\t\n}", "function CheckValidTime(obj) {\r\n var blnComplete = true;\r\n for (i = 0; i < obj.value.length; i++) {\r\n var ch = obj.value.charCodeAt(i);\r\n if ((ch < 48) || (ch > 58))\r\n blnComplete = false;\r\n }\r\n\r\n if (!blnComplete) {\r\n alert('Time format is not correct');\r\n obj.focus();\r\n }\r\n else {\r\n var arrChar = obj.value.split(\":\");\r\n if ((arrChar[0] > 23) || (arrChar[1] > 59)) {\r\n alert('Time format is not correct');\r\n obj.focus();\r\n blnComplete = false;\r\n }\r\n }\r\n return blnComplete;\r\n}", "function validarFecha() {\n // usaremos una expresion regular para que la fecha tenga un patron:\n // podemos teclear el día desde 01 a 31 (0[1-9]|1[0-9]|2[0-9]|3[0-1]|[1-9])\n\t// esta parte de la expresion nos permite teclear dias como 02, 14, 30, etc\n\t// [/|-] seguido de / o -\n\t// para terminar $, 4 digitos para indicar el año: (\\d{4})\n var exp = /(0[1-9]|1[0-9]|2[0-9]|3[0-1]|[1-9])[/|-](0[0-9]|1[0-2]|[1-9])[/|-](\\d{4})$/;\n if (!exp.test(document.getElementById(\"fecha\").value)){\n document.getElementById(\"fecha\").value = \"error!\";\n document.getElementById(\"fecha\").focus();\n document.getElementById(\"fecha\").className=\"error\";\n document.getElementById(\"errores\").innerHTML = \"Error en la fecha de nacimiento. <br/> Debe ser en lo siguientes formatos 00/00/0000 0 11/11/1111\";\n return false;\n }\n else {\n document.getElementById(\"fecha\").className=\"\";\n document.getElementById(\"errores\").innerHTML = \"\";\n return true;\n }\n}", "function validarCumple(cumple){\n\n cumple = cumple.split(\"/\");\n\n if(cumple.length==2){\n var c= 0;\n for(i=0; i<2; i++){\n if(cumple[i].length == 2 && cumple[i].match(/^[0-9]+$/)){\n if(i == 0){\n if(parseInt(cumple[i])<=31 && parseInt(cumple[i])>0){\n c++;\n }else{\n alert(\"Ingresar cumpleaños segun formato\");\n break;\n }\n }else{\n if(parseInt(cumple[i])<=12 && parseInt(cumple[i])>0){\n c++;\n }else{\n alert(\"Ingresar cumpleaños segun formato\");\n }\n }\n }else{\n alert(\"Ingresar cumpleaños segun formato\");\n break;\n }\n }\n }else{\n alert(\"Ingresar cumpleaños segun formato\");\n }\n if(c==2){return true;}\n}", "function verifyHor() {\n var hor_start_valid = verifyField(\"hor_start\");\n var hor_end_valid = verifyField(\"hor_end\");\n if(hor_start_valid && hor_end_valid) { return true; }\n else { return false; }\n}", "function esPContable(fecha) {\r\n\tvar dma = fecha.split(\"-\");\r\n\tif (typeof dma[0]==\"undefined\") dma[0]=\"\";\r\n\tif (typeof dma[1]==\"undefined\") dma[1]=\"\";\t\r\n\tvar a = new String (dma[0]); a=a.trim();\r\n\tvar m = new String (dma[1]); m=m.trim();\r\n\tif (m==\"\" || a==\"\" || m.length<2 || a.length<4) var esFecha=false; else var esFecha=true;\r\n\tif (!esFecha) {\r\n\t\tvar dma = fecha.split(\"/\");\r\n\t\tif (typeof dma[0]==\"undefined\") dma[0]=\"\";\r\n\t\tif (typeof dma[1]==\"undefined\") dma[1]=\"\";\r\n\t\tvar a = new String (dma[0]); a=a.trim();\r\n\t\tvar m = new String (dma[1]); m=m.trim();\t\r\n\t\tif (m==\"\" || a==\"\" || m.length<2 || a.length<4) var esFecha=false; else var esFecha=true;\r\n\t}\r\n\tif (!esFecha) return false;\r\n\telse {\r\n\t\tvar annios = new Number (a);\r\n\t\tvar meses = new Number (m);\r\n\t\tif (meses>12 || meses<=0 || annios<=0) return false; else return true;\r\n\t}\r\n}", "function formatarMesAno(componente)\n{\n\tif (componente.value.length == 2) \n\t{\n\t\tif (!testarMes(componente.value,\"01\")) \n\t\t{ \n\t\t\tcomponente.value = \"\";\n\t\t\tcomponente.focus();\n\t\t} \n\t\telse \n\t\t{\n\t\t\tcomponente.value += '/';\n\t\t}\n\t}\n\n\tif (componente.value.length == 7) \n\t{\n\t\tif ( !testarAno(componente.value.substring(3,7), componente.value.substring(0,2),\"01\") ) \n\t\t{\n\t\t\tcomponente.value = componente.value.substring(0,3);\n\t\t\tcomponente.focus();\n\t\t}\n\t}\n}", "function validarAgregarAbogado(){\r\n var validacion=true;\r\n var nombre=document.getElementById('nombreAbogado').value.trim();\r\n var campoNombre=document.getElementById('nombreAbogado');\r\n var dni=document.getElementById('dniAbogado').value.trim();\r\n var campoDni=document.getElementById('dniAbogado');\r\n var sueldo=document.getElementById('sueldo').value.trim();\r\n var campoSueldo=document.getElementById('sueldo');\r\n var error=\"\";\r\n\r\n var oExpReg=/^[A-Z][a-z]{3,40}$/;\r\n\r\n if(oExpReg.test(nombre)==false){\r\n\r\n error+=\"Error en el campo nombre<br>\";\r\n campoNombre.style.backgroundColor=\"orange\";\r\n }else{\r\n campoNombre.style.backgroundColor=\"white\";\r\n\r\n }\r\n var oExpReg=/^\\d{8}[a-zA-Z]$/;\r\n\r\n if(oExpReg.test(dni)==false){\r\n\r\n error+=\"Error en el campo dni<br>\";\r\n campoDni.style.backgroundColor=\"orange\";\r\n }else{\r\n campoDni.style.backgroundColor=\"white\";\r\n\r\n }\r\n var oExpReg=/^\\d{3,4},\\d{2}$/;\r\n\r\n if(oExpReg.test(sueldo)==false){\r\n\r\n error+=\"Error en el campo sueldo<br>\";\r\n campoSueldo.style.backgroundColor=\"orange\";\r\n }else{\r\n campoSueldo.style.backgroundColor=\"white\";\r\n\r\n }\r\n\r\n if(error!=\"\"){\r\n toastr.error(error,\"Fallo en la Validacion\");\r\n validacion=false;\r\n }\r\n\r\n\r\n\r\n return validacion;\r\n\r\n}", "function validarLongitud(campo) {\n // si el campo tiene algo lo pinta en verde y remueve la clase error y si no lo pinta de rojo y agrega la clase error\n if (campo.value.length > 0) {\n campo.style.borderBottomColor = \"green\";\n campo.classList.remove(\"error\");\n } else {\n campo.style.borderBottomColor = \"red\";\n campo.classList.add(\"error\");\n }\n}", "function validaFechaExistente(fecha, idMsg) {\n\t$(\"#\" + idMsg).text(\"\");\n\tif (fecha.length > 0 && fecha.length < 10) {\n\t\t$(\"#\" + idMsg).text(\"- Debe ingresar la fecha con formato dd/mm/aaaa.\");\n\t\tvalidacionesOk = false;\n\t\treturn false;\n\t}\n\tvar datePat = /^(\\d{1,2})(\\/|-)(\\d{1,2})(\\/|-)(\\d{4})$/;\n\tvar fechaCompleta = fecha.match(datePat);\n\tif (fechaCompleta == null) {\n\t\treturn false;\n\t}\n\tvar dia = fechaCompleta[1];\n\tvar mes = fechaCompleta[3];\n\tvar anio = fechaCompleta[5];\n\tif (dia < 1 || dia > 31) {\n\t\t$(\"#\" + idMsg).text(\"- El valor del día debe estar comprendido entre 1 y 31.\");\n\t\tvalidacionesOk = false;\n\t\treturn false;\n\t}\n\tif (mes < 1 || mes > 12) {\n\t\t$(\"#\" + idMsg).text(\"- El valor del mes debe estar comprendido entre 1 y 12.\");\n\t\tvalidacionesOk = false;\n\t\treturn false;\n\t}\n\tif ((mes == 4 || mes == 6 || mes == 9 || mes == 11) && dia == 31) {\n\t\t$(\"#\" + idMsg).text(\"- El mes \" + mes + \" no tiene 31 días!\");\n\t\tvalidacionesOk = false;\n\t\treturn false;\n\t}\nif (mes == 2) { // bisiesto\n\tvar bisiesto = (anio % 4 == 0 && (anio % 100 != 0 || anio % 400 == 0));\n\tif (dia > 29 || (dia == 29 && !bisiesto)) {\n\t\t$(\"#\" + idMsg).text(\"- Febrero del \" + anio + \" no contiene \" + dia + \" dias!\");\n\t\tvalidacionesOk = false;\n\t\treturn false;\n\t}\n}\n}", "function validarCedula(elemento)\n{ \n if(elemento.value.length > 0 && elemento.value.length < 11){\n var codigA = elemento.value.charCodeAt(elemento.value.length-1)\n if((codigA >= 48 && codigA <= 57)){\n }else {\n elemento.value = elemento.value.substring(0, elemento.value.length-1)\n }\n }else{\n elemento.value = elemento.value.substring(0, elemento.value.length-1)\n }\n if (elemento.value.length == 10) {\n if((elemento.value.substring(0,2)>=1)||(elemento.value.substring(0,2)<=24)){\n //Suma impares\n var pares = 0;\n var numero =0;\n for (var i = 0; i< 4; i++) {\n numero = elemento.value.substring(((i*2)+1),(i*2)+2);\n numero = (numero * 1);\n if( numero > 9 ){ var numero = (numero - 9); }\n pares = pares + numero; \n }\n var imp=0;\n numero = 0\n for (var i = 0; i< 5; i++) {\n var numero = elemento.value.substring((i*2),((i*2)+1));\n var numero = (numero * 2);\n if( numero > 9 ){ var numero = (numero - 9); }\n imp = imp + numero; \n }\n var sum = pares + imp;\n aux = (''+sum)[0];\n var di = aux.substring(0,1);\n di++;\n di = di *10;\n numero = (di - sum);\n if (numero == (elemento.value.substring(9,10))) {\n document.getElementById('mensaje1').innerHTML='' ; \n elemento.style.border = '2px greenyellow solid';\n return true;\n }else{\n document.getElementById('mensaje1').innerHTML = 'Cedula es Incorrecta'; \n elemento.style.border = '2px red solid';\n return false;\n }\n }\n }else{\n document.getElementById('mensaje1').innerHTML = 'Cedula es Incorrecta'; \n elemento.style.border = '2px red solid';\n return false;\n }\n}", "function validate_fecha(fecha) {\n var patron = new RegExp(\"^(19|20)+([0-9]{2})([-])([0-9]{1,2})([-])([0-9]{1,2})$\");\n\n if (fecha.search(patron) == 0) {\n var values = fecha.split(\"-\");\n if (isValidDate(values[2], values[1], values[0])) {\n return true;\n }\n }\n return false;\n}", "function check_text_tipo_sangre(field,longitud,sizefijo,conv, dig,let,esp,req){\r\n\r\nvar mensaje=\"\";\r\nvar DateField = field;\r\n\r\nif(field.value==\"\"&&req=='s')\r\n{\r\n\t mensaje=\"Error: Campo requerido\";\r\n\t return mensaje;\r\n}\t\r\n\r\nvar err = 0;\r\nvar i;\r\nerr = 0;\r\n\r\nvar digitos ='0123456789';\t\t\t\t\t\t\t\t// Digitos\r\nvar letrasMin ='abcdefghijklmnopqrstuvwxyz';\t\t\t// αινσϊ Letras minusculas\r\nvar letrasMay ='ABCDEFGHIJKLMNOPQRSTUVWXYZ';\t\t\t// ΑΙΝΣΪ Letras mayusculas\r\nvar espacios = '.,:\\\\ \\t\\n\\r+-';\t\t\t\t\t\t\t\t// whitespace characters\r\n\r\nvar caractpermitidos='';\r\nvar permite=' ';\r\n\r\nDateValue = DateField.value;\r\n\r\n\r\nif (dig=='s') {\r\n\tcaractpermitidos=caractpermitidos+digitos;\r\n\tpermite = \"numeros \";\r\n}\r\nif (let=='s') {\r\n\tcaractpermitidos=caractpermitidos+letrasMin+letrasMay;\r\n\tpermite = permite + \" letras\";\r\n}\r\nif (esp=='s') {\r\n\tcaractpermitidos=caractpermitidos+espacios;\r\n\tpermite = permite + \" espacios\";\r\n}\r\n\r\nif(!valContenido(DateValue,caractpermitidos)){\r\n\t\tmensaje=('Error: Debe Ingresar solo: '+ permite);\r\n\t\terr = 10\r\n}\r\n\r\n\t\t\r\nif ((DateValue.length > longitud) && (err ==0)) {\r\n\t\terr=20\r\n\t\tmensaje=(\"Error: Solo se puede ingresar \"+ longitud+ \" caracteres\" );\r\n\t}\r\n\r\nif ((DateValue.length < longitud) && (err ==0) && (sizefijo == 's')) {\r\n\t\terr=15\r\n\t\tmensaje=(\"Error: El campo ingresado debe contener \"+ longitud+ \" caracteres\" );\r\n}\r\n\r\nif (conv=='s'){\r\n\tDateField.value = DateField.value.toUpperCase();\r\n}\r\n\t\t\r\nif (err > 0) {\r\n\t;\t\r\n\t\t//DateField.select();\r\n\t\t//DateField.focus();\t\t\r\n}\r\nreturn mensaje;\r\n}", "function validarFormulario(nombre, apellidos, telefono, fecha) {\n\n var expresion_regular_nombre = /^[A-z]+$/; //Caulquier letra desde la A mayuscula a la z minuscula\n var expresion_regular_apellidos = /^[A-z]+$/; //Caulquier letra desde la A mayuscula a la z minuscula\n var expresion_regular_telefono = /^[0-9]{2,3}-? ?[0-9]{6,7}$/; // 3 primeros numeros - opcional o espacio 6 numeros mas\n var expresion_regular_fecha = /^(?:(?:(?:0?[1-9]|1\\d|2[0-8])[/](?:0?[1-9]|1[0-2])|(?:29|30)[/](?:0?[13-9]|1[0-2])|31[/](?:0?[13578]|1[02]))[/](?:0{2,3}[1-9]|0{1,2}[1-9]\\d|0?[1-9]\\d{2}|[1-9]\\d{3})|29[/]0?2[/](?:\\d{1,2}(?:0[48]|[2468][048]|[13579][26])|(?:0?[48]|[13579][26]|[2468][048])00))$/;\n\n /*\n Entero: ^(?:\\+|-)?\\d+$\n Correo: /[\\w-\\.]{3,}@([\\w-]{2,}\\.)*([\\w-]{2,}\\.)[\\w-]{2,4}/\n URL: ^(ht|f)tp(s?)\\:\\/\\/[0-9a-zA-Z]([-.\\w]*[0-9a-zA-Z])*(:(0-9)*)*(\\/?)( [a-zA-Z0-9\\-\\.\\?\\,\\'\\/\\\\\\+&%\\$#_]*)?$\n Contraseña segura: (?!^[0-9]*$)(?!^[a-zA-Z]*$)^([a-zA-Z0-9]{8,10})$\n (Entre 8 y 10 caracteres, por lo menos un digito y un alfanumérico, y no puede contener caracteres espaciales)\n Fecha: ^\\d{1,2}\\/\\d{1,2}\\/\\d{2,4}$\n (Por ejemplo 01/01/2007)\n Hora: ^(0[1-9]|1\\d|2[0-3]):([0-5]\\d):([0-5]\\d)$\n (Por ejemplo 10:45:23)\n Numero de Telefono: ^[0-9]{2,3}-? ?[0-9]{6,7}$\n Codigo Postal: ^([1-9]{2}|[0-9][1-9]|[1-9][0-9])[0-9]{3}$\n */\n\n //var expresion_regular_email = /^(.+\\@.+\\..+)$/;\n\n\n // Usaremos el método \"test\" de las expresiones regulares:\n if (expresion_regular_nombre.test(nombre) == false) {\n return false;\n }\n if (expresion_regular_apellidos.test(apellidos) == false) {\n return false;\n }\n if (expresion_regular_telefono.test(telefono) == false) {\n return false;\n }\n if (expresion_regular_fecha.test(fecha) == false) {\n return false;\n }\n return true;\n}", "function esFecha(fecha) {\r\n\tvar dma = fecha.split(\"-\");\r\n\tif (typeof dma[0]==\"undefined\") dma[0]=\"\";\r\n\tif (typeof dma[1]==\"undefined\") dma[1]=\"\";\r\n\tif (typeof dma[2]==\"undefined\") dma[2]=\"\";\t\r\n\tvar d = new String (dma[0]); d=d.trim();\r\n\tvar m = new String (dma[1]); m=m.trim();\r\n\tvar a = new String (dma[2]); a=a.trim();\r\n\tif (d==\"\" || m==\"\" || a==\"\" || d.length<2 || m.length<2 || a.length<4) var esFecha=false; else var esFecha=true;\r\n\tif (!esFecha) {\r\n\t\tvar dma = fecha.split(\"/\");\r\n\t\tif (typeof dma[0]==\"undefined\") dma[0]=\"\";\r\n\t\tif (typeof dma[1]==\"undefined\") dma[1]=\"\";\r\n\t\tif (typeof dma[2]==\"undefined\") dma[2]=\"\";\t\r\n\t\tvar d = new String (dma[0]); d=d.trim();\r\n\t\tvar m = new String (dma[1]); m=m.trim();\r\n\t\tvar a = new String (dma[2]); a=a.trim();\t\r\n\t\tif (d==\"\" || m==\"\" || a==\"\" || d.length<2 || m.length<2 || a.length<4) var esFecha=false; else var esFecha=true;\r\n\t}\r\n\tif (!esFecha) return false;\r\n\telse {\r\n\t\tvar mes = new Array();\r\n\t\tmes[1]=31; mes[3]=31; mes[4]=30; mes[5]=31; mes[6]=30; mes[7]=31; mes[8]=31; mes[9]=30; mes[10]=31; mes[11]=30; mes[12]=31;\r\n\t\tif (a%4==0) mes[2]=29; else mes[2]=28;\r\n\t\t//\r\n\t\tvar dias = new Number (d);\r\n\t\tvar meses = new Number (m);\r\n\t\tvar annios = new Number (a);\r\n\t\tif ((dias>mes[meses] || dias<1) || (meses>12 || meses<=0) || (annios<=0)) return false; else return true;\r\n\t}\r\n\tif ((dias>mes[meses] || dias<1) || (meses>12 || meses<=0) || (annios<=0)) return false; else return true;\r\n}", "function f_phone(){\n var phone = document.getElementById(\"phone\").value;\n var expresionRegular1=/^\\d{3}-\\d{3}-\\d{3}$/;//<--- con esto vamos a validar el numero\n var expresionRegular2=/\\s/;//<--- con esto vamos a validar que no tenga espacios en blanco\n if(phone === \"\"){\n alert(\"El campo del telefono es obligatorio\");}\n else if(expresionRegular2.test(phone)){\n alert(\"error existen espacios en blanco\");}\n else if(!expresionRegular1.test(phone)){\n alert(\"Telefono incorrecto, separar 3 digitos con guiones\");\n return false;}\n else { return true; }\n}", "function validarFecha(fecha){\n cadena=/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/;\n if(cadena.test(fecha))\n return 1;\n else\n return 0;\n}", "function validarFecha(e, id) {\n\n key = e.keyCode || e.which;\n tecla = String.fromCharCode(key).toLowerCase();\n letras = \"/0123456789\";\n especiales = \"8-37-39-46\";\n\n tecla_especial = false\n for (var i in especiales) {\n if (key == especiales[i]) {\n tecla_especial = true;\n break;\n }\n }\n\n if (letras.indexOf(tecla) == -1 && !tecla_especial) {\n $(document.getElementById(id)).notify(\"Formato: 01/12/2017\", { position: \"right\" });\n return false;\n }\n\n}", "validarDatos() {\n let errores = '';\n\n if (!moment($('#devolucion_venta-fecha').value).isValid()) {\n errores += '<br>Fecha inválida';\n }\n\n\n\n if (!$('#devolucion_venta-cliente').value) {\n errores += '<br>Falta seleccionar cliente';\n }\n\n if (!$('#devolucion_venta-venta').value) {\n errores += '<br>Falta seleccionar una venta';\n }\n\n if(this.tablaDevoluciones){\n let lineasDeVenta = this.tablaDevoluciones.getData();\n if (lineasDeVenta.length == 0) {\n errores += '<br>No se hallaron detalles de venta.';\n } else {\n let lineaIncompleta = false;\n lineasDeVenta.forEach((lineaVenta) => {\n if (!util.esNumero(lineaVenta.subtotal)) {\n lineaIncompleta = true;\n }\n });\n\n if (lineaIncompleta) {\n errores += '<br>Se encontró al menos un detalle de compra incompleto.';\n }\n }\n\n }\n \n\n return errores;\n }", "validarFechas(fecha) {\n let date = moment(fecha, \"DD/MM/YYYY HH:mm:ss\");\n\n return date.format(\"YYYY-MM-DD\");\n }", "function validateAndFormat24HoursTimeInput(theTime) {\n var tmpTime = new String(theTime);\n var newTime = \"\";\n if (tmpTime.length > 2 && tmpTime.indexOf(\":\") < 0) {\n //handle 00** template\n if (tmpTime.length == 3 && tmpTime.charCodeAt(0) == 48 && tmpTime.charCodeAt(1) == 48) {\n newTime = tmpTime.substring(0, 2) + \":0\" + tmpTime.substring(2, 3);\n }\n //handle 0*** template\n else if (tmpTime.length == 3 && tmpTime.charCodeAt(0) == 48) \n {\n newTime = \"00:\" + tmpTime.substring(1, tmpTime.length);\n }\n else {\n newTime = tmpTime.substring(0, 2) + \":\" + tmpTime.substring(2, tmpTime.length);\n }\n return validateAndFormat24HoursTimeInput(newTime);\n }\n if (tmpTime.indexOf(\":\") < 0) {\n if (parseInt(tmpTime, 10) < 24) \n {\n if (tmpTime.length == 2)\n newTime = new String(tmpTime + \":00\");\n else {\n if (tmpTime.length > 2) {\n newTime = tmpTime.substring(0, 2) + \":\" + tmpTime.substring(2, tmpTime.length);\n }\n else {\n newTime = new String(\"0\" + tmpTime + \":00\");\n }\n }\n }\n else {\n newTime = \"-1\";\n }\n }\n else {\n var spl = tmpTime.split(\":\");\n if (parseInt(spl[0], 10) < 24 && parseInt(spl[1], 10) < 60) {\n newTime = tmpTime;\n }\n else {\n newTime = \"-1\";\n }\n }\n return newTime;\n}", "function isValidTime(time) {\t\r\n\tif (time.val() == '') {\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tvar array = time.val().split(':');\t\r\n\tvar min = (+array[0]) * 60 + (+array[1]);\r\n\t\r\n\tif (min < 540 || min > 765 && min < 870 || min > 1000)\r\n\t\treturn false;\r\n\telse\r\n\t\treturn true;\r\n}", "function validarContenido(cont){\n if(cont.length == 3){ \n a = parseInt(cont.split('')[0]);\n b = cont.split('')[1];\n c = parseInt(cont.split('')[2]);\n return (Number.isInteger(a) && b == \"/\" && Number.isInteger(c));\n }else{\n return false;\n }\n}", "function tiempo(n) {\n\tpermitidos = /[^0-9:]/;\n\tcadena = n.value;\n\tband = false;\n\tfor (i = 0; i < cadena.length; i++) {\n\t\tletra = cadena.substring(i, i + 1);\n\t\tif (permitidos.test(letra)) {\n\t\t\tcadena2 = cadena;\n\t\t\tcadena = cadena2.replace(letra, \"\");\n\t\t\tband = true;\n\t\t}\n\t}\n\tvar cont = 0;\n\tfor (i = 0; i < cadena.length; i++) {\n\t\tletra = cadena.substring(i, i + 1);\n\t\tif (letra === \":\") {\n\t\t\tcont++;\n\t\t\tif (cont > 1) {\n\t\t\t\tcadena2 = cadena;\n\t\t\t\tcadena = cadena2.substring(0, cadena.length - 1);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\tn.value = cadena;\n}", "function keyValidaFecha(){\n if(window.event.keyCode!=13){\n\tvar Tecla;\n\tTecla = String.fromCharCode(window.event.keyCode);\n\tif(!((Tecla>=\"0\"&&Tecla<=\"9\")||(Tecla==\"/\"))){\n window.event.keyCode = 0;\n\t}\n }\t\n}", "function horas(entrada, saida) {\n total = 0;\n entradasec = 0;\n saidasec = 0;\n entrada = entrada.split(\":\");\n saida = saida.split(\":\");\n for (i = 0; i < entrada.length; i++) {\n if (i == 0) {\n entradasec += (entrada[0] * 3600);\n saidasec += (saida[0] * 3600);\n }\n if (i == 1) {\n entradasec += (entrada[1] * 60);\n saidasec += (saida[1] * 60);\n }\n }\n total = saidasec - entradasec;\n var minutos = total / 60;\n var resto_minutos = (total / 60) % 60;\n var horas = (minutos - resto_minutos) / 60;\n console.log(horas, resto_minutos);\n}", "function checkHoursWorked(hours) {\n /*var nstring = \"0.\" + num.substring(2);\n var integer = parseFloat(nstring);\n integer = integer * 60;\n if (integer % 15 != 0) {\n alert(\"Hours Worked is invalid, it must be in fifteen-minute intervals. E.g. 1.50, 2.75, 3.25 or 1.00.\")\n document.getElementById(\"txtHoursWorked\").focus();\n }*/ \n\n\n if (hours <= 0 || hours > 4) {\n alert(\"Hours Worked must be in between 0 and 4.00.\");\n document.getElementById(\"txtHoursWorked\").focus();\n }else if(!tryParse(hours, 2)){\n alert(\"Hours Worked is invalid, it must be in fifteen-minute intervals. E.g. 1.50, 2.75, 3.25 or 1.00.\");\n document.getElementById(\"txtHoursWorked\").focus();\n }else{\n return true;\n }\n\n \n}", "function check_fecha() {\n\t\n var patron=new RegExp(\"^(19|20)+([0-9]{2})([-])([0-9]{1,2})([-])([0-9]{1,2})$\");\n var fecha = \"2001\";\n\n if ((patron.test($(\"#idfecha\").val())) && ($(\"#idfecha\").val() < fecha)) {\n $(\"#errorfecha\").hide();\n } else {\n \t \t$(\"#errorfecha\").html(\"Debe ser anterior a 2001\");\n $(\"#errorfecha\").show();\n error_fecha = true;\n }\n\t\n\t}", "function formato_nombre_apellido(campo,span){\n\tformato_aceptado= /^[a-zA-ZñÑáéíóú\\s]+$/;\n\t\n\tif(campo.value == ''){\n\t\tval = false;\n\t\tspan.style.color = 'red';\n\t\tspan.innerHTML = 'campo vacio';\n\t\t}else if(! campo.value.match(formato_aceptado) && campo.value != ''){\n\t\t\tval = false;\n\t\t\tspan.style.color ='blue';\n\t\t\tspan.innerHTML = 'Solo son validas letras';\n\t\t\t}else{\n\t\t\tspan.innerHTML = '';\n\t\t\t}\n}", "function validTime(str) {\n // write code here.\n const [hours, minutes] = str.split(':');\n if (parseInt(hours) > 23 || parseInt(hours) < 0){\n return false;\n }\n if (parseInt(minutes) > 59 || parseInt(minutes) < 0) {\n return false;\n }\n return true;\n}", "function validateTime(value, field) {\n\tif (value === field.unknown) return []\n\n\t// Check valid_values\n\tfor (let validValue of field.valid_values.split(','))\n\t\tif (value === validValue.trim()) return []\n\n\t// Check empty\n\tif (value === undefined || value === '')\n\t\treturn [`'${field.label}' can not be empty`]\n\n\t// Check format\n\tif (!/^[0-9][0-9]:[0-9][0-9]$/.test(value))\n\t\treturn [`'${value}' is not in correct format HH:mm`]\n\n\t// Check ranges\n\tlet tok = value.split(':')\n\tlet h = parseInt(tok[0])\n\tlet m = parseInt(tok[1])\n\n\treturn h >= 0 && h < 24 && m >= 0 && m < 60\n\t\t? []\n\t\t: [`'${value}' is not a valid time`]\n}", "function validarFormulario() {\n //limpiar los avisos anteriores!!\n emptySpans();\n let camposAValidar = document.getElementsByTagName(\"input\");\n let valido = true;\n //comprobar que cumpla todo lo que dice cada campo input text y date\n for (let i = 0; i < camposAValidar.length; i++) {\n if (camposAValidar[i].type ==\"text\" || camposAValidar[i].type ==\"date\") {\n //si no se validan se cambia el color a rojo y se añade el mensaje de ayuda\n if (!validarInputText(camposAValidar[i].id, camposAValidar[i].getAttribute(\"regexp\"), camposAValidar[i].getAttribute(\"obligatorio\"))) {\n let span = document.createElement(\"span\");\n camposAValidar[i].style.borderColor = \"red\";\n span.innerHTML = camposAValidar[i].title;\n span.style.color = \"red\";\n camposAValidar[i].parentNode.insertBefore(span, camposAValidar[i]);\n valido = false;\n }else{\n //si esta bien quitamos el atributo style\n camposAValidar[i].removeAttribute(\"style\");\n }\n }\n }\n //devuelve si es valido o no\n return valido;\n\n}", "function validarSabado() { \r\n\t\r\n\tFECHA_INICIO = new String(document.formularioFiltro.fechaInicio.value);\r\n\tvar arreglo = FECHA_INICIO.split(\"/\");\t\r\n\tvar dia = arreglo[0];\r\n\tvar mes = arreglo[1];\r\n\tvar anno = arreglo[2];\t\r\n\t//alert('dia '+dia);\r\n\t//alert('mes '+mes);\r\n\t//alert('anno '+anno);\r\n\r\n\tmes = mes-1;\t\r\n\tvar fechaInicio = new Date(anno,mes,dia);\r\n\t//alert('como objeto fecha queda '+fecha);\r\n\t\r\n\t//Esta variable valida si es dia sabado (dia 6 de la semana)\r\n\tvar ww = fechaInicio.getDay();\r\n\tif(ww == 6){\r\n\t\t\tdocument.formularioFiltro.fechaFinRegistro.value='';\r\n\t\t\tvar currentTime = new Date();\r\n\t\t\t\r\n\t\t\tif(fechaInicio >= currentTime){\r\n\t\t\t\tcalcularFechaFin(fechaInicio);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\talert('La fecha de inicio debe ser una fecha mayor\\n o igual a la fecha actual.');\r\n\t\t\t\tdocument.formularioFiltro.fechaInicio.value='';\r\n\t\t\t\tdocument.formularioFiltro.fechaFinRegistro.value='';\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t}\r\n\telse{\r\n\t\talert('Debe selecionar un dia sábado como fecha de inicio.');\r\n\t\tdocument.formularioFiltro.fechaInicio.value='';\r\n\t\tdocument.formularioFiltro.fechaFinRegistro.value='';\r\n\t\treturn false;\t\t\r\n\t}\r\n}", "function allnumeric_aadharno(aadharno, msgBox) {\n var num1 = /^\\d{4}\\s\\d{4}\\s\\d{4}$/;\n\n if (aadharno.value.match(num1)) {\n document.getElementById(msgBox).innerHTML = '';\n return true;\n } else {\n document.getElementById(msgBox).innerHTML = '<font style=\"color: red;\">Must have 12 digit aadhaar number.It should be in this \"2558 5552 5586\" format </font><br>';\n aadharno.focus();\n return false;\n }\n}", "function validaFechaDDMMAAAA(cadena) {\n\n\tfec = cadena.split(\"/\");\n\tbandera = false;\n\tdia = fec[0];\n\tmes = fec[1];\n\tanio = fec[2];\n\t//--\n\tanio = (isNaN(fec[2])) ? 0 : anio;\n\t//alert(dia+\"/\"+mes+\"/\"+anio);\n\tif (dia !== \"\" && (parseInt(dia) < 1 || parseInt(dia) > 31 || dia.length > 2)) {\n\t\tbandera = true;\n\t}\n\tif (mes !== \"\" && (parseInt(mes) < 1 || parseInt(mes) > 12 || mes.length > 2)) {\n\t\tbandera = true;\n\t}\n\tif (anio !== \"\" && (parseInt(anio) < 1901 || parseInt(anio) > 2050 || anio.length !== 4)) {\n\t\tbandera = true;\n\t}\n\tif (bandera === true) {\n\t\treturn false;\n\t} else {\n\t\treturn true;\n\t}\n}", "function duracionCero(hrs, min){\n \n if($(hrs).val()===\"0\" && $(min).val()===\"00\"){\n alert(\"La duracion (horas y minutos) de la audiencia no pueden ser cero\");\n $(hrs).val('');\n $(min).val('');\n }\n}", "function validaNombre(nombre){\n var nombre1 = nombre.value; //asigno el valor de la variable nombre a una nueva variable\n var primeraLetra = nombre1.charAt(0); //asigno el valor de la primera letra a una variable nueva\n var patron=/[A-Z]/g; //se crea un patron\n \n if( nombre1==''||primeraLetra.match(patron)==null)//si el nombre esta vacio o no se encuentra una coincidencia de la primera letra con el patron devuelve el mensaje con setCustomValidity\n {\n nombre.setCustomValidity(\"Tiene que iniciar con mayuscula\");\n return false;\n }\n nombre.setCustomValidity(''); //se resetea el setCustomValidity en caso de haber ocurrido alguna ocurrencia en el if\n}", "function checkHourMinute(elt)\r\n{\r\n\tvar val = elt.value ;\r\n\tvar t = val.split(\":\");\r\n\t\r\n\tif(t.length != 2)\r\n\t{\r\n\t return false;\r\n\t}\r\n\r\n\tif(t[0].length != 2)\r\n\t{\r\n\t return false;\r\n\t}\r\n\r\n\tif(t[1].length != 2)\r\n\t{\r\n\t return false;\r\n\t}\r\n\r\n\tif(isNaN (t[0]) )\r\n\t{\r\n\t return false;\r\n\t}\r\n\r\n\tif(isNaN (t[1]) )\r\n\t{\r\n\t return false;\r\n\t}\r\n\t\r\n\tif(parseInt(t[0]) < 0 || parseInt(t[0]) > 24 )\r\n\t{\r\n\t return false;\r\n\t}\r\n\r\n\tif(parseInt(t[1]) < 0 || parseInt(t[1]) > 60 )\r\n\t{\r\n\t return false;\r\n\t}\r\n\t\r\n\treturn true;\r\n}", "function comprobarSexo(campo){\n var exp= /^(hombre|mujer)$/;\n if (!comprobarExpresionRegular(campo, exp,10)){// se comprueba que el sexo encaje con los valores \"hombre\" o \"mujer\"\n campo.style.border = \"2px solid red\";\n return false;\n\n }else{ \n campo.style.border = \"2px solid green\";\n return true;\n }\n}", "function validate(e)\n{\n e.preventDefault();\n let validno = true;\n\n var ime = document.getElementById(\"ime\").value;\n var regIzrazIme = /^[A-ZŠĐŽČĆ][a-zšđžčć]{2,12}$/;\n\n var imeGreska = document.getElementById(\"greskaIme\");\n\n if(ime === \"\")\n {\n validno = false;\n imeGreska.innerHTML = \"Polje ime je prazno.\";\n \n //document.getElementById(\"ime\").style.borderColor = \"red\";\n }\n else\n {\n if(!regIzrazIme.test(ime))\n {\n validno = false;\n imeGreska.innerHTML = \"Datum rodjenja nije u dobrom formatu...\";\n //document.getElementById(\"ime\").style.borderColor = \"red\";\n }\n else\n {\n imeGreska.innerHTML = \"\";\n }\n }\n}", "function validarFecha(str, id){\n var id_new = \"#editar_muestra_fecha_recibo_\" + String(id);\n if (moment(str, 'YYYY-MM-DD HH:mm:ss',true).isValid()){\n $(id_new).removeClass('is-invalid');\n return true;\n }else{\n $(id_new).addClass('is-invalid');\n return false;\n }\n}", "function validarCedula(inCedula)\n{\n var array = inCedula.split(\"\") ;\n var num = array.length;\n var total;\n var digito;\n var mult;\n var decena;\n var end;\n\n if(num == 10)\n {\n total = 0;\n digito = (array[9]*1);\n for( var i = 0; i<(num-1);i++)\n {\n mult = 0;\n if((i%2) != 0)\n {\n total = total + (array[i]*1);\n }\n else\n {\n mult = array[i]*2;\n if( mult > 9)\n {\n total = total + (mult - 9);\n }\n else\n {\n total = total + mult;\n }\n }\n\n }\n decena = total/10;\n decena = Math.floor(decena);\n decena = ( decena + 1 ) * 10;\n end = ( decena - total ) ;\n if((end == 10 && digito == 0)|| end == digito)\n {\n return true;\n }\n else\n {\n return false;\n }\n }\n else\n {\n return false;\n }\n}", "function parsePace() {\n let min = minText.value;\n let sec = secText.value;\n\n //check if boxes are empty or not a number. display alert box if bad input\n if ((min === \"\" && sec === \"\") || isNaN(min) || isNaN(sec)) {\n // reveal the hidden alert message\n console.log(\"missing input\");\n alertMsg.style.display = 'block';\n // Hide the message after a few seconds\n setTimeout(() => alertMsg.style.display = 'none', 2500);\n return null\n\n } else if ((sec < 0 || sec > 60) || (min < 0 || min > 10)) {\n // reveal the hidden alert message if range is bad\n console.log(\"bad pace range\");\n alertMsg.style.display = 'block';\n // Hide the message after a few seconds\n setTimeout(() => alertMsg.style.display = 'none', 2500);\n return null\n }\n //if only one or the other is missing fill the other with zeroes\n if (min === \"\") { min = '00'; }\n if (sec === \"\") { sec = '00'; }\n\n return min + \":\" + sec;\n}", "function validaFechaDDMMAAAA(fecha){\n var dtCh= \"/\";\n var minYear=1900;\n var maxYear=2100;\n function isInteger(s){\n var i;\n for (i = 0; i < s.length; i++){\n var c = s.charAt(i);\n if (((c < \"0\") || (c > \"9\"))) return false;\n }\n return true;\n }\n function stripCharsInBag(s, bag){\n var i;\n var returnString = \"\";\n for (i = 0; i < s.length; i++){\n var c = s.charAt(i);\n if (bag.indexOf(c) == -1) returnString += c;\n }\n return returnString;\n }\n function daysInFebruary (year){\n return (((year % 4 == 0) && ( (!(year % 100 == 0)) || (year % 400 == 0))) ? 29 : 28 );\n }\n function DaysArray(n) {\n for (var i = 1; i <= n; i++) {\n this[i] = 31\n if (i==4 || i==6 || i==9 || i==11) {this[i] = 30}\n if (i==2) {this[i] = 29}\n }\n return this\n }\n function isDate(dtStr){\n var daysInMonth = DaysArray(12)\n var pos1=dtStr.indexOf(dtCh)\n var pos2=dtStr.indexOf(dtCh,pos1+1)\n var strDay=dtStr.substring(0,pos1)\n var strMonth=dtStr.substring(pos1+1,pos2)\n var strYear=dtStr.substring(pos2+1)\n strYr=strYear\n if (strDay.charAt(0)==\"0\" && strDay.length>1) strDay=strDay.substring(1)\n if (strMonth.charAt(0)==\"0\" && strMonth.length>1) strMonth=strMonth.substring(1)\n for (var i = 1; i <= 3; i++) {\n if (strYr.charAt(0)==\"0\" && strYr.length>1) strYr=strYr.substring(1)\n }\n month=parseInt(strMonth)\n day=parseInt(strDay)\n year=parseInt(strYr)\n if (pos1==-1 || pos2==-1){\n return false\n }\n if (strMonth.length<1 || month<1 || month>12){\n return false\n }\n if (strDay.length<1 || day<1 || day>31 || (month==2 && day>daysInFebruary(year)) || day > daysInMonth[month]){\n return false\n }\n if (strYear.length != 4 || year==0 || year<minYear || year>maxYear){\n return false\n }\n if (dtStr.indexOf(dtCh,pos2+1)!=-1 || isInteger(stripCharsInBag(dtStr, dtCh))==false){\n return false\n }\n return true\n }\n if(isDate(fecha)){\n return true;\n }else{\n return false;\n }\n}", "function _fecha(cadena) \r\n{ \r\n //Separador para la introduccion de las fechas \r\n var separador = \"/\"; \r\n //Separa por dia, mes y año \r\n if ( cadena.indexOf( separador ) != -1 ) \r\n {\r\n\t var posi1 = 0; \r\n\t var posi2 = cadena.indexOf( separador, posi1 + 1 ); \r\n\t var posi3 = cadena.indexOf( separador, posi2 + 1 ); \r\n\t this.dia = cadena.substring( posi1, posi2 ); \r\n\t this.mes = cadena.substring( posi2 + 1, posi3 ); \r\n\t this.mes =this.mes -1\r\n this.anio = cadena.substring( posi3 + 1, cadena.length ); \r\n } \r\n else\r\n { \r\n\t this.dia = 0; \r\n\t this.mes = 0; \r\n\t this.anio = 0; \r\n } \r\n \r\n return true;\r\n}", "function checkTime(field) {\n\t\tFeld = eval('document.poform.'+field);\n\t\tFeldLength = Feld.value.length;\n\t\tFeldValue = Feld.value;\n\t\tif (FeldLength == 1) {\n\t\tFeld.value = \"0\"+FeldValue;\n\t\t}\n\t\tif (FeldLength == 0) {\n\t\tFeld.value = \"00\";\n\t\t}\n\t\tvar t1 = document.poform.start_hour.value+':'+document.poform.start_min.value;\n\t\tvar t2 = document.poform.end_hour.value+':'+document.poform.end_min.value;\n\t\tvar m = ((t2.substring(0,t2.indexOf(':'))-0) * 60 +\n\t\t\t\t(t2.substring(t2.indexOf(':')+1,t2.length)-0)) - \n\t\t\t\t((t1.substring(0,t1.indexOf(':'))-0) * 60 +\n\t\t\t\t(t1.substring(t1.indexOf(':')+1,t1.length)-0));\n\t\tvar h = Math.floor(m / 60);\n\t\tdocument.poform.length.value = h + ':' + (m - (h * 60));\n}", "function computeHours() {\n if (saldoAdp == undefined) {\n saldoAdp = 0;\n }\n saldoAdp = saldoAdpToMinutes(saldoAdpBruto);\n var saldoAtual = totalMinutos - toMinutes(totalHorasMes + ':00') + saldoAdp + toMinutes(horasAbonadas);\n\n var comp = document.getElementById('saldoHoras');\n var stringHoras = toHours(saldoAtual);\n\n comp.innerHTML = stringHoras;\n //comp.innerHTML = toMinutes(totalHorasMes + ':00');\n\n if (stringHoras.includes('-')) {\n comp.style.color = 'red';\n } else {\n comp.style.color = '#0F0';\n }\n}", "function validarFecha(){\n\tvar mensaje=\"\";\n\tvar fechaTur = document.getElementById(\"Fecha\");\n\tvar fechaTurno = new Date(Date.parse(fechaTur.value)).setHours(0,0,0,0);\n\tvar fechaActual = new Date();\n\tfechaActual.setHours(0,0,0,0);\n\tvar valid = true;\n \n valid = valid && fechaTurno >= fechaActual;\n\t\n\tif(!valid){\n\t\tmensaje = \"La fecha de un turno no puede ser anterior a la fecha actual\";\n\t}\n fechaTur.setCustomValidity(mensaje);\n\treturn mensaje;\n}", "function curpValidaEdit(curp) {\n var re = /^([A-Z][AEIOUX][A-Z]{2}\\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\\d|3[01])[HM](?:AS|B[CS]|C[CLMSH]|D[FG]|G[TR]|HG|JC|M[CNS]|N[ETL]|OC|PL|Q[TR]|S[PLR]|T[CSL]|VZ|YN|ZS)[B-DF-HJ-NP-TV-Z]{3}[A-Z\\d])(\\d)$/,\n validado = curp.match(re);\n \n if (!validado) //Coincide con el formato general?\n return false;\n \n //Validar que coincida el dígito verificador\n function digitoVerificador(curp17) {\n //Fuente https://consultas.curp.gob.mx/CurpSP/\n var diccionario = \"0123456789ABCDEFGHIJKLMNÑOPQRSTUVWXYZ\",\n lngSuma = 0.0,\n lngDigito = 0.0;\n for(var i=0; i<17; i++)\n lngSuma = lngSuma + diccionario.indexOf(curp17.charAt(i)) * (18 - i);\n lngDigito = 10 - lngSuma % 10;\n if (lngDigito == 10) return 0;\n return lngDigito;\n }\n \n if (validado[2] != digitoVerificador(validado[1])) \n return false;\n \n return true; //Validado\n}", "function validar_rut()\n{\n var rut = document.getElementById('rut_b');\n var digito = document.getElementById('dv_b');\n var numerico = rut.value.search( /[^0-9]/i );\n \n if(rut.value == \"\" && digito.value == \"\")\n return true\n if( numerico != -1 ) {\n alert(\"El rut contiene un caracter no numerico\")\n return false\n }\n if( digito.value == \"\" && rut.value != \"\") {\n alert(\"No ha ingresado el digito verificador\")\n return false\n }\n if( digito.value != \"K\" && digito.value != \"k\" )\n {\n var numerico1 = digito.value.search( /[^0-9]/i );\n if( numerico1 != -1 )\n {\n alert(\"El digito verificador no es valido\")\n return false\n }\n }\n var rut_aux = rut.value;\n var i = 0;\n var suma = 0;\n var mult = 2;\n var c = 0;\n var modulo11 = 0;\n var largo = rut_aux.length;\n for( i = largo - 1; i >= 0; i-- )\n {\n suma = suma + rut_aux.charAt( i ) * mult;\n mult++;\n if( mult > 7 )\n mult = 2;\n }\n modulo11 = 11 - suma % 11;\n if( modulo11 == 10 )\n modulo11 = \"K\";\n if( modulo11 == 11 )\n modulo11 = \"0\";\n if( modulo11 != digito.value.toUpperCase() )\n {\n alert( \"Rut invalido.\" );\n return false;\n }\n return true;\n}", "function validarComentario(){\r\n \r\n var comentario = $(\"#comentario\").val();\r\n \r\n if(comentario != \"\"){\r\n \r\n var expresion = /^[,\\\\.\\\\a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]*$/;\r\n \r\n if(!expresion.test(comentario)){\r\n \r\n $(\"#comentario\").parent().before('<div class=\"alert alert-danger\"><strong>ERROR:</strong>No se permitem caracteres especiales</div>');\r\n \r\n return false;\r\n }\r\n } else {\r\n \r\n $(\"#comentario\").parent().before('<div class=\"alert alert-danger\"><strong>ERROR:</strong>Campo obrigatório</div>');\r\n \r\n return false;\r\n \r\n }\r\n \r\n return true;\r\n}", "function tarkasta_luontiaika(e) {\n\tlet luontiAika = e.target;\n\tlet verrokki = new Date(\"2017-09-01T01:00\");\n\tlet vertailtava = new Date(luontiAika.value);\n\tif (vertailtava > verrokki) {\n\t\tluontiAika.setCustomValidity(\"Luontiajan oltava pienempi kuin 01:00 1.9.2017\");\n\t\tluontiAika.reportValidity();\n\t} else {\n\t\tluontiAika.setCustomValidity(\"\");\n\t}\n}", "function isCorrectFormat() {\r\n if (document.getElementById(\"time\").value == \"\" || document.getElementById(\"activity\").value == \"\") {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n}", "function validaCampoTextoInSave(Nombre, _G_ID_) {\n var cValue = $(_G_ID_ + '_txt_' + Nombre).val();\n var TextErr = false;\n if (cValue !== null && cValue !== '') {\n if (Nombre.toUpperCase().includes('RFC')) {\n if (!(/^([A-ZÑ&]{3,4}) ?(?:- ?)?(\\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\\d|3[01])) ?(?:- ?)?([A-Z\\d]{2})([A\\d])$/.test(cValue))) {\n redLabel_Space(Nombre, 'Formato de RFC Incorrecto', _G_ID_);\n ShowAlertM(_G_ID_, null, null, true);\n TextErr = true;\n }\n }\n _regEx = new RegExp(\"^([0-9]|[a-zA-Z]|\\.)+$\");\n if (!_regEx.test(cValue)) {\n redLabel_Space(Nombre, 'Solo se permiten caracteres alfanumericos', _G_ID_);\n ShowAlertM(_G_ID_, null, null, true);\n TextErr = true;\n }\n if (TextErr) {\n errorIs[Nombre] = true;\n } else {\n errorIs[Nombre] = false;\n }\n }\n}", "function validateYyyyMmDdHHMm(string) {\n if (string == '') {\n return true;\n }\n if (string.length == 12) {\n string = string.substring(0,4) + '/' \n + string.substring(4,6) + '/'\n + string.substring(6,8) + ' '\n + string.substring(8,10) + ':'\n + string.substring(10);\n }\n var reg = /^((19|[2-9][0-9])[0-9]{2})[\\/.](0[13578]|1[02])[\\/.]31|((19|[2-9][0-9])[0-9]{2}[\\/.](01|0[3-9]|1[0-2])[\\/.](29|30))|((19|[2-9][0-9])[0-9]{2}[\\/.](0[1-9]|1[0-2])[\\/.](0[1-9]|1[0-9]|2[0-8]))|((((19|[2-9][0-9])(04|08|[2468][048]|[13579][26]))|2000)[\\/.](02)[\\/.]29) (20|21|22|23|[0-1]?\\d{1}):([0-5]?\\d{1})$/;\n if (string.match(reg)) {\n return true;\n } else {\n return false;\n }\n }", "function comprobarTipo(texto){//nos devuelve un string indicando el tipo de token\r\n \r\n //comparamos que la primera posicion de la palabra sea una letra mayuscula o minuscula\r\n if((textoEntrada.value.charCodeAt(0)>=97 && textoEntrada.value.charCodeAt(0)<=122) \r\n || (textoEntrada.value.charCodeAt(0)>=65 && textoEntrada.value.charCodeAt(0)<=90)){\r\n //si cumple con ser una letra el primer caracter\r\n //comparamos que los siguientes caracteres sigan siendo letras o numeros\r\n if((texto>=97 && texto<=122) || (texto>=65 && texto<=90) || texto>=48 && texto<=57){\r\n\t\t return(\"letra\");\r\n \r\n }else {//si algun caracter no cumple nos vamos a un estado de error\r\n \r\n return(\"error\"); \r\n }\r\n //comparamos que el primer caracter sea un numero \r\n }else if((textoEntrada.value.charCodeAt(0)>=48 && textoEntrada.value.charCodeAt(0)<=57) ){\r\n \r\n if(texto>=48 && texto<=57){//si cumple, continua comparando que la palabra contenga solo numeros\r\n return(\"digito\");\r\n \r\n\t }else {\r\n return(\"error\");\r\n }\r\n //comparamos que el primer caracter sea un simbolo \r\n }else if(textoEntrada.value.charCodeAt(0)>=35 && textoEntrada.value.charCodeAt(0)<=37 ) {\r\n \r\n if(texto>=35 && texto<=37){\r\n return(\"simbolo\");\r\n \r\n\t }else{\r\n return(\"error\");\r\n }\r\n \r\n }else{\r\n return(\"error\");\r\n }\r\n \r\n}", "function validaParametri(handleFrase, handleVelocita)\r\n{\r\n\tfrase = handleFrase.value;\r\n\tvelocita = handleVelocita.value;\r\n\t\r\n\tif (frase == \"\")\r\n\t{\r\n\t\talert(\"Inserire almeno un carattere\");\r\n\t\thandleFrase.focus();\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tif (frase == \"\")\r\n\t{\r\n\t\talert(\"Inserire almeno un carattere\");\r\n\t\thandleFrase.focus();\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\tif (frase.match(/[\\|%]/)) // NON FUNZIONA\r\n\t{\r\n\t\talert(\"I caratteri \\, | e % non sono ammessi\");\r\n\t\thandleFrase.focus();\r\n\t\treturn false();\r\n\t}\r\n\t\r\n\tif (isNaN(velocita) || velocita <= 0)\r\n\t{\r\n\t\talert(\"La velocita' e' una quantita' intera positiva non nulla\");\r\n\t\thandleVelocita.value=\"120\";\r\n\t\thandleVelocita.focus();\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\treturn true;\r\n}", "validaFormulario() {\n //Se comprueba el nombre\n var x = document.forms[\"formularioProyecto\"][\"archivoPlanProyecto\"].value;\n if (x === '') {\n alert(\"Cargue un plan de proyecto\");\n return false;\n }\n\n //Se comprueba la fecha de comienzo\n //Si se introduce una fecha que no existe el formulario devuelve '' también\n x = document.forms[\"formularioProyecto\"][\"fechaComienzo\"].value;\n if (x === '') {\n alert(\"Introduzca una fecha válida\");\n return false;\n }\n //Se comprueba que la fecha sea posterior o igual a la actual\n var today = new Date();\n var fechaIntroducida = new Date(x);\n if(fechaIntroducida<=today){\n alert(\"Introduzca una posterior a la actual\");\n return false;\n }\n\n //Se comprueba el presupuesto\n x = document.forms[\"formularioProyecto\"][\"presupuesto\"].value;\n //console.log(\"Ahi va: \" + Number(x));\n if (x === '') {\n alert(\"Introduzca un presupuesto\");\n return false;\n } else if (isNaN(Number(x))) {\n alert(\"Introduzca un presupuesto válido\");\n return false;\n } else if (x < 1) {\n alert(\"Introduzca un presupuesto mayor que 0\");\n return false;\n }\n\n return true;\n }", "function validarpago(){\n\n var pago = document.getElementById(\"textmontopago\").value;\n var rutcli = document.getElementById(\"txtrutcliente\").value;\n var mes = document.getElementById(\"mes\").value;\n var ani = document.getElementById(\"anio\").value;\n var cont = 0;\n\n if(isNaN(pago)){\n document.getElementById(\"textmontopago\").style.background=\"#EDF98E\";\n document.getElementById(\"textmontopago\").style.borderColor=\"#000000\";\n } else if(pago==null || pago.length==0 || pago.length >=9){\n \n document.getElementById(\"textmontopago\").style.background=\"#EDF98E\";\n document.getElementById(\"textmontopago\").style.borderColor=\"#000000\";\n }else {\n document.getElementById(\"textmontopago\").style.background=\"#ffffff\";\n document.getElementById(\"textmontopago\").style.borderColor=\"#9A9797\";\n cont++;\n }\n\n\n if (rutcli==null || rutcli.length==0 || rutcli.length >10){\n document.getElementById(\"txtrutcliente\").style.background=\"#EDF98E\";\n document.getElementById(\"txtrutcliente\").style.borderColor=\"#000000\";\n }else {\n document.getElementById(\"txtrutcliente\").style.background=\"#ffffff\";\n document.getElementById(\"txtrutcliente\").style.borderColor=\"#9A9797\";\n cont++;\n }\n\n if(mes == 0){\n document.getElementById(\"mes\").style.background=\"#EDF98E\";\n document.getElementById(\"mes\").style.borderColor=\"#000000\";\n }else {\n document.getElementById(\"mes\").style.background=\"#ffffff\";\n document.getElementById(\"mes\").style.borderColor=\"#9A9797\";\n cont++;\n }\n\n if(ani == 0){\n document.getElementById(\"anio\").style.background=\"#EDF98E\";\n document.getElementById(\"anio\").style.borderColor=\"#000000\";\n }else {\n document.getElementById(\"anio\").style.background=\"#ffffff\";\n document.getElementById(\"anio\").style.borderColor=\"#9A9797\";\n cont++;\n }\n\n if(cont==4){\n alert(\"Sus Datos Son validos\");\n } \n}", "function verifFirst() {\n let regexFirst = /^[a-zA-ZÀ-Ÿà-ÿ-\\s]+$/; //uniquement des lettres majuscules ou minuscules les tirets et les espaces\n if (regexFirst.exec(first.value) === null || first.length < 2) {\n errorAlert[0].style.display = \"block\";\n first.classList.add(\"echec\");\n first.classList.add(\"border\");\n\n setTimeout(() => {\n first.classList.remove(\"echec\");\n }, 500);\n return (validFirst = false);\n } else {\n first.classList.remove(\"border\");\n\n errorAlert[0].style.display = \"none\";\n tabValue.push(first.value);\n return (validFirst = true);\n }\n}", "function validar2(formulario){\n\n\t\t//comprobamos la longitud de los nombres\n\t\tif (formulario.nombreform.value.length==0){\n\t\t\talert (\"El campos nombre es obligatorio\");\n\t\t\treturn false;\n\t\t}\n\t\t//esta lista de caracteres lo que hace es comprobar que se le introduce caracteres validos seguidos de un \"@\" con más texto para terminar con un \".com\" por\n\t\t//ejemplo \"[a-z]\" significa de la \"a\" a la \"Z\" y {2,3} la longitud de esta palabra final. \n\t\tlistacar=/^[_a-z0-9-]+(.[_a-z0-9-]+)*@[a-z0-9-]+(.[a-z0-9-]+)*(.[a-z]{2,3})$/\n\t\tif (!listacar.test(document.getElementById('mailform').value)){\n\t\t\talert (\"Debe indicar un email valido\");\n\t\t\treturn false;\n\t\t}\n\t\t//comprobamos si se envía información del proyecto\n\t\tif (formulario.telefonoform.value.toString().length<6){\n\t\t\talert (\"Indique un numero de teléfono valido\");\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tvar input = document.getElementById(\"fechareunion\").value;\n\t\tvar fechaintroducida = new Date(input);\n\t\tvar fechaminima = new Date().getTime() + (24 * 60 * 60 * 1000);\n\t\tvar fechamaxima = new Date().getTime() + (365 * 24 * 60 * 60 * 1000);\n\t\t\n\t\t//Comprobamos que se ha introducido una fecha\n\t\tif (isNaN(fechaintroducida)) {\n\t\t\talert(\"Introduzca una fecha para la reunión por favor.\");\n\t\t\treturn false;\n\t\t}\n\n\t\t//Comprobamos que la fecha esta entre mañana y dentro de un año\n\t\tif (fechaintroducida > fechamaxima) {\n\t\t\talert (\"Plazo máximo para la reunión de un año\");\n\t\t\treturn false;\n\t\t}else if (fechaintroducida < fechaminima) {\n\t\t\talert (\"Plazo mínimo para la reunión a partir de mañana\");\n\t\t\treturn false;\n\t\t}else {\n\t\t\talert(\"Fecha valida\");\n\t\t}\n\t\t\n\t\t//comprobamos si se envía información del proyecto\n\t\tif (formulario.motivoreunion.value.length<5){\n\t\t\talert (\"Indique el motivo de la reunión\");\n\t\t\treturn false;\n\t\t}\n\t\t//comprueba se aceptan las políticas de privacidad\n\t\tif (!formulario.politicasform.checked){\n\t\t\talert (\"Debe aceptar la política de privacidad.\");\n\t\t\treturn false;\n\t\t} else {\n\t\t\talert (\"Privacidad marcada\");\n\t\t}\n}", "function MascaraHora(cpf, event){\n if(mascaraInteiro(cpf, event)==false){\n event.returnValue = false;\n return false;\n } \n return formataCampo(cpf, '00:00', event);\n}", "function validateForm ()\n {\n\n //Variabele om errors bij te houden\n\n let numberOfErrors = 0;\n\n //Check voornaam\n\n let voornaam = document.getElementById(\"voornaam\");\n let voornaamSpan = document.querySelector(\"#voornaam + span\");\n\n if(voornaam.value.length > 30)\n {\n voornaam.style.borderColor = \"red\";\n voornaamSpan.innerText = \"max 30 karakters !\";\n voornaamSpan.color = \"red\";\n numberOfErrors += 1;\n }\n else //terugzetten van de kleur als er geen fout meer is.\n {\n resetStyle(voornaam, voornaamSpan, numberOfErrors);\n\n }\n\n //Check familienaam\n\n let familienaam = document.getElementById(\"familienaam\");\n let familienaamSpan = document.querySelector(\"#familienaam + span\");\n\n if(familienaam.value === '' || familienaam.value === ' ')\n {\n familienaam.style.borderColor = \"red\";\n familienaamSpan.innerText = \"Het veld is verplicht !\";\n familienaamSpan.style.color = \"red\";\n numberOfErrors += 1;\n }\n else\n {\n if(familienaam.value.length > 50)\n {\n familienaam.style.borderColor = \"red\";\n familienaamSpan.innerText = \"Max 50 karakters\";\n familienaamSpan.style.color = \"red\";\n numberOfErrors += 1;\n }\n else //terugzetten van de kleur als er geen fout meer is.\n {\n resetStyle(familienaam, familienaamSpan, numberOfErrors);\n }\n }\n\n\n\n //Check geboortedatum\n\n let geboortedatum = document.getElementById(\"geboortedatum\");\n let geboortedatumSpan = document.querySelector(\"#geboortedatum + span\");\n\n\n //Gebruik regex expressie. Bemerk dat de expressie tussen twee slashes moet staan.\n\n let regex = /^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$/;\n\n //We gebruiken de test() method die we aanroepen over een regex expressie\n //Zie https://www.w3schools.com/js/js_regexp.asp\n //Check dat geboortedatum niet leeg is en dan niet aan het patroon voldoet\n\n if(geboortedatum.value !== '' && regex.test(geboortedatum.value) === false)\n {\n numberOfErrors += 1;\n geboortedatum.style.borderColor = \"red\";\n geboortedatumSpan.innerText = \"Formaat is niet YYYY-MM-DD !\";\n geboortedatumSpan.style.color = \"red\";\n }\n else\n {\n //Check of geboortedatum leeg is\n\n if(geboortedatum.value === '')\n {\n numberOfErrors += 1;\n geboortedatum.style.borderColor = \"red\";\n geboortedatumSpan.innerText = \"Geboortedatum is een verplicht veld !\";\n geboortedatumSpan.style.color = \"red\";\n }\n else\n {\n resetStyle(geboortedatum, geboortedatumSpan, numberOfErrors);\n }\n }\n\n //Check e-mail\n\n let email = document.getElementById(\"email\");\n let emailSpan = document.querySelector(\"#email + span\");\n\n //Regex voor mail geplukt van https://emailregex.com/\n\n regexMail =\n /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/\n\n //Check email tegen regexMail\n\n if(regexMail.test(email.value) === false)\n {\n numberOfErrors += 1;\n email.style.borderColor = \"red\";\n emailSpan.innerText = \"Geen geldig email adres !\";\n emailSpan.style.color = \"red\";\n }\n\n else\n {\n //Check of email ingevuld is\n\n if(email.value === '' || email.value === ' ')\n {\n numberOfErrors += 1;\n emailSpan.innerText = \"Verplicht veld !\";\n emailSpan.style.color = \"red\";\n email.style.borderColor = \"red\";\n }\n else\n {\n resetStyle(email, emailSpan, numberOfErrors);\n }\n }\n\n //Check aantal kinderen\n\n let aantalKinderen = document.querySelector(\"#aantalKinderen\");\n let aantalKinderenSpan = document.querySelector(\"#aantalKinderen + span\");\n\n if(aantalKinderen.value < 0)\n {\n numberOfErrors += 1;\n aantalKinderen.style.borderColor = \"red\";\n aantalKinderenSpan.innerText = \"is geen positief getal\";\n aantalKinderenSpan.style.color = \"red\";\n }\n else\n {\n if(aantalKinderen.value > 99)\n {\n numberOfErrors += 1;\n aantalKinderen.style.borderColor = \"red\";\n aantalKinderenSpan.innerText = \"te hoog aantal\";\n aantalKinderenSpan.style.color = \"red\";\n }\n else\n {\n resetStyle(aantalKinderen, aantalKinderenSpan, numberOfErrors);\n }\n }\n\n //Geef alert als het formulier volledig correct is\n\n if(numberOfErrors === 0)\n {\n alert(\"formulier correct ingevuld !\")\n }\n }", "function comprobarSexoSearch(campo){\n var exp= /^(hombre|muje)?$/;\n if (!comprobarExpresionRegular(campo, exp,10)){// se comprueba que el sexo encaje con los valores \"hombre\" o \"mujer\" o este vacio\n campo.style.border = \"2px solid green\";\n return true;\n\n }else{ // en caso de que no coincida con ninguno\n alert(\"El valor no coincide con los dados.\");\n campo.style.border = \"2px solid red\";\n return false;\n }\n\n}", "function valid_time(time) {\n time = time.split(':');\n if (time[0] >= 0 && time[0] <= 24\n && time[1] >= 0 && time[1] <= 59) {\n return true;\n } else {\n return false;\n }\n}", "function chktel() {\r\n\tvar mydata = document.getElementById(\"telefono\");\r\n\tvar position = mydata.value.search(/\\d{3}-\\d{3}-\\d{4}$/);\r\n\t\r\n\tif(position != 0) {\r\n\t\talert(\"El telefono entrado esta en un formato incorrecto.\\nEl formato correcto es ###-###-####\");\r\n\t\tmydata.select();\r\n\t\tmydata.focus();\t\t\r\n\t\treturn false;\r\n\t} else\r\n\t\treturn true;\r\n}", "function horaIngresada() {\n let inputHora = document.querySelector('#hora_entrada');\n let hora_ini = inputHora.addEventListener('input', e => {\n let horaCita = e.target.value;\n let hora = horaCita.split(':');\n hora_in = hora[0];\n });\n}", "cpfvalidate(input, minValue) {\n let inputLength = input.value.length;\n\n let errorMessage = `Insira o CPF no padrão 000.000.000-00`;\n\n\n if(inputLength != minValue){\n this.printMessage(input, errorMessage);\n } \n }", "function checkClipBegin() {\n if (!continueProcessing) {\n var clipBegin = getTimefieldTimeBegin();\n if (isNaN(clipBegin) || (clipBegin < 0)) {\n displayMsg(\"The inpoint is too low or the format is not correct. Correct format: hh:MM:ss.mm. Please check.\",\n \"Check inpoint\");\n return false;\n }\n return true;\n }\n}", "function validarFecha(){\n\tvar mensaje=\"\";\n\tvar fechaI = document.getElementById(\"Fecha\");\n\tvar fechaItv = new Date(Date.parse(fechaI.value)).setHours(0,0,0,0);\n\tvar fechaActual = new Date();\n\tfechaActual.setHours(0,0,0,0);\n\tvar valid = true;\n \n valid = valid && fechaItv <= fechaActual;\n\t\n\tif(!valid){\n\t\tmensaje = \"La fecha de la ITV de un vehículo no puede ser posterior a la fecha actual\";\n\t}\n fechaI.setCustomValidity(mensaje);\n\treturn mensaje;\n}", "function CheckMatrikelNrFormat(){\n if (matrikelNr.length !== 10 || matrikelNr[2] !== \"-\" || matrikelNr[6] !== \"-\") {\n throw new Error(\"Matrikel Number does not have the correct format. \" +\n \"Please try the format 'xx-xxx-xxx'.\")\n }\n }", "function validarAnoBusca()\r\n{\r\n\tif ((document.check.ano.value.length==4) && (document.check.ano.value != blank))\r\n\t\tif(!isNumberString(document.check.ano.value))\r\n\t\t{\r\n\t\t\talert(\"Valor inválido para ano, digite somente números.\");\r\n\t\t\tanoValido = false;\r\n\t\t\tdocument.check.ano.focus();\r\n\t\t\tdocument.check.ano.select();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tanoValido = true;\r\n\t\t\treturn true;\r\n\t\t}\r\n}", "function Valida_Rut(Objeto)\n\n{\n\n var tmpstr = \"\";\n\n var intlargo = Objeto.value;\n\n if (intlargo.length > 0)\n\n {\n\n crut = Objeto.value;\n\n largo = crut.length;\n\n if (largo < 2)\n\n {\n\n sweetAlert(\"ERROR\", \"RUN INVALIDO!\", \"error\");\n\n //Objeto.focus();\n\n return false;\n\n }\n\n for (i = 0; i < crut.length; i++)\n if (crut.charAt(i) !== ' ' && crut.charAt(i) !== '.' && crut.charAt(i) !== '-')\n\n {\n\n tmpstr = tmpstr + crut.charAt(i);\n\n }\n\n rut = tmpstr;\n\n crut = tmpstr;\n\n largo = crut.length;\n\n\n\n if (largo > 2)\n rut = crut.substring(0, largo - 1);\n\n else\n rut = crut.charAt(0);\n\n\n\n dv = crut.charAt(largo - 1);\n\n\n\n if (rut === null || dv === null)\n return 0;\n\n\n\n var dvr = '0';\n\n suma = 0;\n\n mul = 2;\n\n\n\n for (i = rut.length - 1; i >= 0; i--)\n\n {\n\n suma = suma + rut.charAt(i) * mul;\n\n if (mul === 7) {\n\n mul = 2;\n\n } else {\n\n mul++;\n }\n\n }\n\n\n\n res = suma % 11;\n\n if (res === 1) {\n dvr = 'k';\n\n } else if (res === 0) {\n dvr = '0';\n\n } else {\n\n {\n\n dvi = 11 - res;\n\n dvr = dvi + \"\";\n\n }\n }\n\n\n\n if (dvr !== dv.toLowerCase())\n\n {\n\n\n sweetAlert(\"ERROR!!!\", \"RUN INCORRECTO!\", \"error\");\n }\n //Objeto.focus();\n\n return false;\n\n }\n\n\n\n // Objeto.focus();\n\n return true;\n\n}", "function validarLongitud(campo) {\n\n if(campo.value.length > 0 ) {\n campo.style.border = '';\n campo.classList.remove('error');\n } else {\n campo.style.border = '1px solid red';\n campo.classList.add('error');\n }\n}", "function validarNumeros1(e){ \n \n tecla = e.keyCode || e.which; \n \n var apellido = window.document.getElementById(\"apellidos\");\n \n //valida que el campo no contenga numeros \n if(expre.test(apellido.value)==true){\n \n apellido.style.borderColor =\"red\";\n valApel = false;\n var aux = apellido.value.substring(apellido.value.length-1);\n var rempla = apellido.value.replace(aux,\"\");\n apellido.value=rempla;\n}\n //valida que el campo tenga el formato solicitado\n else if (expreL.test(apellido.value)==true){\n apellido.style.borderColor =\"blue\";\n valApel = true;\n}\n else{\n apellidos.style.borderColor =\"red\";\n valApel = false;\n}\n}", "function validarLongitud(campo) {\n if(campo.value.length > 0 ) {\n campo.style.border = '';\n campo.classList.remove('error');\n } else {\n campo.style.border = '1px solid red';\n campo.classList.add('error');\n }\n}", "function t(e,t,n){var i,s;return\"m\"===n?t?\"минута\":\"минуту\":e+\" \"+(i=+e,s={ss:t?\"секунда_секунды_секунд\":\"секунду_секунды_секунд\",mm:t?\"минута_минуты_минут\":\"минуту_минуты_минут\",hh:\"час_часа_часов\",dd:\"день_дня_дней\",MM:\"месяц_месяца_месяцев\",yy:\"год_года_лет\"}[n].split(\"_\"),i%10==1&&i%100!=11?s[0]:i%10>=2&&i%10<=4&&(i%100<10||i%100>=20)?s[1]:s[2])}", "function verificarNumero(value, min, id){\n let res = \"\";\n let val = value.split(\"\");\n for(let i = 0; i < val.length; i++){\n res += (NUMBERS.includes(val[i])) ? val[i] : \"\";\n }\n if(Number.parseInt(res) > 20) {\n res = (Number.parseInt(res) > 20) ? res.slice(0,-1) : res;\n }\n document.getElementById(id).value = res;\n return (Number.isInteger(Number.parseInt(value[value.length - 1])) && !(Number.parseInt(value) < min));\n}", "function validarNombre(dato){\n if (dato.trim() == null || (dato.trim().length < 3 || dato.trim().length > 80)) {\n alert(\"El nombre y el apellido deben contener entre 3 y 80 caracteres\");\n return false;\n } \n return true;\n}", "function masqueSaisieDate(obj) {\n\n var ch = obj.value;\n var ch_gauche, ch_droite;\n obj.value = ch.slice(0, 10);\n ch.toString();\n if (((ch.slice(2, 3)) !== (\"/\")) && (ch.length >= 3)) {\n if (ch.slice(0, 2) > 31) {\n ch_gauche = '31';\n } else {\n ch_gauche = ch.slice(0, 2);\n }\n ch_droite = ch.slice(2);\n obj.value = ch_gauche + \"/\" + ch_droite;\n }\n if (((ch.slice(5, 6)) !== (\"/\")) && (ch.length >= 6)) {\n if (ch.slice(3, 5) > 12) {\n ch_gauche = ch.slice(0, 3) + '12';\n } else {\n ch_gauche = ch.slice(0, 5);\n }\n ch_droite = ch.slice(5);\n obj.value = ch_gauche + \"/\" + ch_droite;\n }\n return;\n}", "function t(e,t,n){var i,r;return\"m\"===n?t?\"минута\":\"минуту\":e+\" \"+(i=+e,r={ss:t?\"секунда_секунды_секунд\":\"секунду_секунды_секунд\",mm:t?\"минута_минуты_минут\":\"минуту_минуты_минут\",hh:\"час_часа_часов\",dd:\"день_дня_дней\",MM:\"месяц_месяца_месяцев\",yy:\"год_года_лет\"}[n].split(\"_\"),i%10==1&&i%100!=11?r[0]:i%10>=2&&i%10<=4&&(i%100<10||i%100>=20)?r[1]:r[2])}", "function t(e,t,n){var i,r;return\"m\"===n?t?\"минута\":\"минуту\":e+\" \"+(i=+e,r={ss:t?\"секунда_секунды_секунд\":\"секунду_секунды_секунд\",mm:t?\"минута_минуты_минут\":\"минуту_минуты_минут\",hh:\"час_часа_часов\",dd:\"день_дня_дней\",MM:\"месяц_месяца_месяцев\",yy:\"год_года_лет\"}[n].split(\"_\"),i%10==1&&i%100!=11?r[0]:i%10>=2&&i%10<=4&&(i%100<10||i%100>=20)?r[1]:r[2])}", "function validateForm(){\n\tvar horario = $('.horario').val();\n\tvar materia = $('.materia').val();\n\tvar dia = $('.dia').val();\n\tvar hi = $('.horaI').val();\n\tvar hf = $('.horaF').val();\n\tvar res = false;\n\n\tif (horario === 0 || horario == null || materia === 0 || materia == null || dia === 0 || dia == null || hi == \"\" || hf == \"\") {\n\t\tres = true;\n\t}\n\n\treturn res;\n}", "function checkOvertimeIsValid(timespanStr){\n let arr = timespanStr.split(':');\n let h = Number(arr[0]);\n let m = Number(arr[1]);\n if(h < 1 || (h == 1 && m < 30)) return false;\n return true;\n}", "function t(e,t,n){var r,i;return\"m\"===n?t?\"минута\":\"минуту\":e+\" \"+(r=+e,i={ss:t?\"секунда_секунды_секунд\":\"секунду_секунды_секунд\",mm:t?\"минута_минуты_минут\":\"минуту_минуты_минут\",hh:\"час_часа_часов\",dd:\"день_дня_дней\",MM:\"месяц_месяца_месяцев\",yy:\"год_года_лет\"}[n].split(\"_\"),r%10==1&&r%100!=11?i[0]:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?i[1]:i[2])}" ]
[ "0.7329562", "0.71338624", "0.6980917", "0.69069797", "0.6889594", "0.667362", "0.6519527", "0.6480206", "0.647397", "0.6419536", "0.6301572", "0.6273503", "0.6263211", "0.6235162", "0.6206305", "0.619528", "0.61902666", "0.6129", "0.61119133", "0.6064636", "0.60093075", "0.5991233", "0.5983799", "0.59680384", "0.5899491", "0.5883238", "0.58829385", "0.5878182", "0.58689785", "0.5864855", "0.58527845", "0.5845522", "0.58353394", "0.5821513", "0.58150107", "0.5809784", "0.58043766", "0.57874286", "0.57861316", "0.5756953", "0.5745808", "0.5737464", "0.5735226", "0.57247174", "0.5715096", "0.5694221", "0.5690863", "0.5683902", "0.5679431", "0.5674298", "0.5672287", "0.5643332", "0.5635498", "0.5630317", "0.56228364", "0.5621687", "0.56144166", "0.56116056", "0.5589099", "0.5581216", "0.5576545", "0.5576182", "0.5573329", "0.55688506", "0.55672145", "0.5563279", "0.5561654", "0.5556508", "0.5556394", "0.55548203", "0.5548458", "0.55471915", "0.55462253", "0.5544304", "0.55401623", "0.55386525", "0.5538216", "0.5532459", "0.5528371", "0.55279773", "0.5525025", "0.55218035", "0.55139524", "0.55125487", "0.5510834", "0.5497665", "0.5492943", "0.5490917", "0.5490674", "0.54832804", "0.5471681", "0.54702675", "0.54665166", "0.54652894", "0.5464712", "0.5460357", "0.54594827", "0.54594827", "0.54590374", "0.545711", "0.54492253" ]
0.0
-1
The `pgquerystream` module returns a stream, but the only way to get it out of the promise that `pgClient` returns is to use `highlandflatten`.
getStream() { return h( this._client.connect() .then(() => { const query = new QueryStream(this._source, this._params); const stream = this._client.query(query); stream.on('end', () => { this._client.end(); }); return stream .pipe(h()) ; }) ) .flatten() ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_stream(connection, query, /** @type {NodeJS.ReadWriteStream} */ stream) {\n return new Promise((resolve, reject) => {\n const request = this._makeRequest(query, (err) => {\n if (err) {\n stream.emit('error', err);\n return reject(err);\n }\n\n resolve();\n });\n\n request.on('row', (row) => {\n stream.write(\n row.reduce(\n (prev, curr) => ({\n ...prev,\n [curr.metadata.colName]: curr.value,\n }),\n {}\n )\n );\n });\n request.on('error', (err) => {\n stream.emit('error', err);\n reject(err);\n });\n request.once('requestCompleted', () => {\n stream.end();\n resolve();\n });\n\n this._assignBindings(request, query.bindings);\n this._enqueueRequest(request, connection);\n });\n }", "_queryStream( query, params ) {\n if ( util.types.isArray( query ) ) {\n query = query.join( \" \\n\" );\n }\n\n return this._query( query, params || {} );\n }", "query( ...args ) {\n return this._queryStream( ...args )\n .flatten()\n .map( ( result ) => {\n // These objects are not alterable, so we create a copy using JSON so downstream processes\n // can manipulate them if necessary.\n var object = JSON.parse( JSON.stringify( result.node.data ) );\n return object;\n });\n }", "function streamQuery(filter)\n{\n\t//add wheres to query\n\tvar sqlQuery = parseFilter(filter);\n\n\t//perform query\n\treturn db.streamQuery(sqlQuery);\n}", "function useStreamQuery(template, queryFactory, queryDeps, closeHandler) {\n return ledgerContext.useStreamQuery(template, queryFactory, queryDeps, closeHandler);\n}", "function useStreamQueries(template, queryFactory, queryDeps, closeHandler) {\n return ledgerContext.useStreamQueries(template, queryFactory, queryDeps, closeHandler);\n}", "queryMultiple( ...args ) {\n return this._queryStream( ...args )\n .flatten()\n .map( ( res ) => {\n var obj = {};\n Object.keys( res ).forEach( ( key ) => {\n if ( res[ key ] !== undefined && res[ key ] !== null ) {\n if ( res[ key ].data ) {\n obj[ key ] = JSON.parse( JSON.stringify( res[ key ].data ) );\n } else {\n obj[ key ] = res[ key ]\n }\n } else {\n obj[ key ] = null;\n }\n });\n\n return obj;\n });\n }", "_query(connection, query) {\n return new Promise((resolve, reject) => {\n const rows = [];\n const request = this._makeRequest(query, (err, count) => {\n if (err) {\n return reject(err);\n }\n\n query.response = rows;\n\n process.nextTick(() => this._chomp(connection));\n\n resolve(query);\n });\n\n request.on('row', (row) => {\n debug('request::row');\n rows.push(row);\n });\n\n this._assignBindings(request, query.bindings);\n this._enqueueRequest(request, connection);\n });\n }", "function collect(stream, callback) {\n const out = [];\n stream.on('data', chunk => out.push(chunk));\n stream.on('end', () => callback(null, Buffer.concat(out)));\n stream.on('error', (err) => callback(err));\n}", "function streamBuffer(stream) {\n return new Promise((resolve, reject) => {\n const chunks = []\n stream.on('data', chunk => chunks.push(chunk))\n stream.on('error', error => reject(error))\n stream.on('end', () => resolve(Buffer.concat(chunks)))\n })\n}", "function database(query) {\n var result = \"\";\n const {\n Client\n } = require('pg');\n\n const client = new Client({\n connectionString: \"postgres://xbmqawcfcgjhll:4296b0167991fbbcf2a98369e07b8f3db38bb0147ff6cf27143b39b2347a9c59@ec2-54-204-46-236.compute-1.amazonaws.com:5432/dd54f2u0f74q9c\",\n ssl: true,\n });\n\n client.connect();\n\n console.log(query);\n\n client.query(query, (err, res) => {\n if (err) throw err;\n\n for (let row of res.rows) {\n result = JSON.stringify(row);\n console.log(JSON.stringify(row));\n }\n client.end();\n });\n\n return result;\n}", "async function read(stream) {\n const chunks = [];\n for await (const chunk of stream)\n chunks.push(chunk);\n return Buffer.concat(chunks).toString();\n }", "async function read(stream) {\n const chunks = [];\n for await (const chunk of stream)\n chunks.push(chunk);\n return Buffer.concat(chunks).toString();\n }", "function streamToArrayBuffer(stream) {\n const reader = stream.getReader();\n function next(buffer) {\n return reader.read().then(result => {\n if (result.done)\n return buffer;\n const chunk = result.value;\n const tmpBuffer = new Uint8Array(buffer.byteLength + chunk.byteLength);\n tmpBuffer.set(buffer, 0);\n tmpBuffer.set(chunk, buffer.byteLength);\n return next(tmpBuffer);\n });\n }\n return next(new Uint8Array(0));\n}", "function getQueryResult(connection, query) {\n return new Promise((resolve, reject) => {\n var result = [];\n\n request = new Request(query.query, function(err, rowCount) {\n if (err) {\n console.log(err);\n reject(err);\n } else {\n resolve(result);\n }\n connection.close();\n });\n\n query.params.forEach(function(param) {\n request.addParameter(param.paramName, param.paramType, param.paramValue);\n });\n\n request.on('row', function(columns) {\n var row = {}; \n columns.forEach(function(column) {\n row[column.metadata.colName] = column.value;\n });\n result.push(row);\n });\n\n connection.execSql(request);\n }); \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 }", "import(stream) {\n stream.on('data', quad => {\n this.addQuad(quad);\n });\n return stream;\n }", "async function callDB(client, queryMessage) {\n\n var queryResult;\n await client.query(queryMessage)\n .then(\n (results) => {\n queryResult = results[0];\n //console.log(results[0]);\n return queryResult;\n })\n .then(\n (results) => {\n res = JSON.parse(JSON.stringify(results));\n return results\n })\n .catch(console.log)\n}", "function readStreamAsFlatted(stream, callback) {\n let data = '';\n stream.on('data', (chunk) => (data += chunk));\n stream.on('end', () => {\n let result, error;\n try {\n result = Flatted.parse(data);\n } catch (e) {\n error = e;\n }\n callback(error, result);\n });\n stream.on('error', (e) => callback(e));\n}", "function hzAsync(conn, query) {\n return new Promise((resolve, reject) => {\n query.run(conn, (err, cursor) => {\n if (err) {\n reject(err);\n } else {\n if (!_.isFunction(cursor.toArray)) {\n resolve(cursor);\n } else {\n cursor.toArray((err, result) => {\n if (err) {\n reject(err);\n } else {\n resolve(result);\n }\n });\n }\n }\n });\n });\n}", "match(subject, predicate, object, graph) {\n var stream = new _stream.Readable({\n objectMode: true\n }); // Initialize stream once it is being read\n\n stream._read = () => {\n for (var quad of this.getQuads(subject, predicate, object, graph)) stream.push(quad);\n\n stream.push(null);\n };\n\n return stream;\n }", "function query_subgraph(query) {\n return __awaiter(this, void 0, void 0, function* () {\n return axios_1.default.post(SUBGRAPH_URL, {\n query: query\n });\n });\n}", "async processStagingTable(schema) { \t\n \tconst sqlStatement = `select ${this.useBinaryJSON ? 'import_jsonb' : 'import_json'}(data,$1) from \"YADAMU_STAGING\"`;\n if (this.status.sqlTrace) {\n this.status.sqlTrace.write(`${sqlStatement};\\n\\--\\n`)\n } \n \tvar results = await this.pgClient.query(sqlStatement,[schema]);\n if (results.rows.length > 0) {\n if (this.useBinaryJSON === true) {\n\t return results.rows[0].import_jsonb; \n }\n else {\n\t return results.rows[0].import_json; \n }\n }\n else {\n this.yadamuLogger.error([`${this.constructor.name}.processStagingTable()`],`Unexpected Error. No response from ${ this.useBinaryJSON === true ? 'CALL IMPORT_JSONB()' : 'CALL_IMPORT_JSON()'}. Please ensure file is valid JSON and NOT pretty printed.`);\n // Return value will be parsed....\n return [];\n }\n }", "import(stream) {\n var self = this;\n stream.on('data', function (quad) {\n self.addQuad(quad);\n });\n return stream;\n }", "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}", "read(prepare = () => Promise.resolve()) {\n const {db} = this;\n let prevKey;\n\n return new ReadableStream({\n start() {\n return prepare();\n },\n pull(controller) {\n return new Promise(resolve => {\n const transaction = db.transaction('chunks', 'readonly');\n const range = prevKey !== undefined ? IDBKeyRange.lowerBound(prevKey, true) : undefined;\n const request = transaction.objectStore('chunks').openCursor(range);\n\n request.onsuccess = async e => {\n const cursor = e.target.result;\n if (cursor) {\n prevKey = cursor.key;\n const ab = await cursor.value.arrayBuffer();\n controller.enqueue(new Uint8Array(ab));\n }\n else {\n controller.close();\n indexedDB.deleteDatabase(db.name);\n }\n resolve();\n };\n });\n }\n }, {\n highWaterMark: 100\n });\n }", "from(arr){\n let sq = SmallQuery.create();\n for(let i = 0, l = arr.length; i < l; i++){\n sq[i] = arr[i];\n }\n sq.length = arr.length;\n return sq;\n }", "stream(cb) {\n return new Promise((resolve, reject) => {\n if (!cb) {\n reject(new Error('stream events call requires a callback'));\n return;\n }\n const stream = this.grpcClient.sendEventsStream(this.getMetadata());\n stream.on('error', (e) => {\n cb(e, null);\n });\n let onCloseEvent = new client_1.TypedEvent();\n stream.on('close', () => {\n onCloseEvent.emit();\n });\n const writeFn = (msg) => {\n const pbMessage = new pb.Event();\n pbMessage.setEventid(msg.id ? msg.id : utils_1.Utils.uuid());\n pbMessage.setClientid(msg.clientId ? msg.clientId : this.clientOptions.clientId);\n pbMessage.setChannel(msg.channel);\n pbMessage.setBody(msg.body);\n pbMessage.setMetadata(msg.metadata);\n if (msg.tags != null) {\n pbMessage.getTagsMap().set(msg.tags);\n }\n pbMessage.setStore(false);\n const sent = stream.write(pbMessage, (err) => {\n cb(err, null);\n });\n cb(null, {\n id: pbMessage.getEventid(),\n sent: sent,\n });\n };\n resolve({\n onClose: onCloseEvent,\n write: writeFn,\n end() {\n stream.end();\n },\n });\n });\n }", "async function queryInflux(req, res) {\n let queryArray = []\n let queryRange = req.body.queryString\n let querySensor = req.body.sensor\n let queryMeasurement = req.body.measurement\n const queryApi = new InfluxDB({ url: process.env.URL, token: process.env.TOKENTWO }).getQueryApi(process.env.ORG);\n const fluxQuery = `from(bucket:\"perm_data\") |> range(${queryRange}) |> filter(fn: (r) => r._measurement == \"${querySensor}\") |> filter(fn: (r) => r._field == \"${queryMeasurement}\")`\n\n await queryApi.queryRows(fluxQuery, {\n next(row, tableMeta) {\n const o = tableMeta.toObject(row)\n queryArray.push(o);\n },\n error(error) {\n console.error(error)\n console.log('\\n Finished ERROR')\n },\n complete() {\n res.type('application/json').send(JSON.stringify(queryArray));\n console.log('\\nFinished SUCCESS')\n }\n })\n}", "function stream() {\n const ioredis = new require('ioredis')\n ioredis.monitor((err, monitor) => {\n monitor.on('monitor', (time, args) => {\n if (args[0].match(/hm?set/)) {\n // catch hset and hmset\n var [_, bucket, id, rawJson] = args\n\n // see above for 'now what?' question pass this data on for processing\n console.info({ bucket, id, rawJson })\n }\n })\n })\n}", "function fromPromise(promise) {\n\treturn new Stream(function(next, end) {\n\t\tpromise.then(next).then(function() { end(); }, end);\n\n\t\treturn noop;\n\t});\n}", "async function handle_fetch_stream (stream, cb) {\n if (is_nodejs)\n stream = to_whatwg_stream(stream)\n\n // Set up a reader\n var reader = stream.getReader(),\n decoder = new TextDecoder('utf-8'),\n parser = subscription_parser(cb)\n \n while (true) {\n var versions = []\n\n try {\n // Read the next chunk of stream!\n var {done, value} = await reader.read()\n\n // Check if this connection has been closed!\n if (done) {\n console.debug(\"Connection closed.\")\n cb(null, 'Connection closed')\n return\n }\n\n // Tell the parser to process some more stream\n parser.read(decoder.decode(value))\n }\n\n catch (e) {\n cb(null, e)\n return\n }\n }\n}", "function streamXML (link) {\n console.log('>>>> Starting stream of XML...'.action);\n\n let writeStreamOptions = {\n flags: 'wx',\n defaultEncoding: 'utf8',\n fd: null,\n mode: 0o666,\n autoClose: true\n };\n\n rp(link)\n .then(function (results) {\n console.log('\\n>>>> Successfully got results from request-promise');\n }).catch(function (err) {\n console.log('\\n>>>> Error request promise '.error);\n console.log(err);\n });\n\n // var reqStream = request.get(link).pipe(fs.createWriteStream('./tmp/stream.xml', writeStreamOptions));\n // reqStream.on('error', function (error) {\n // console.log('\\n>> !! Error Streaming from ' + link + ''.error);\n // console.log(error);\n // });\n //\n // reqStream.on('finish', function () {\n // console.log('\\n>>>> Request finished <<<<'.success);\n // var readStream = fs.createReadStream('./tmp/stream.xml');\n // var xml = new xmlStream(readStream);\n // var writeStream = fs.createWriteStream('./tmp/stream.txt');\n //\n // let postFields = [\n // 'id',\n // 'message',\n // 'thread',\n // 'isSpam',\n // 'createdAt',\n // 'ipAddress',\n // 'author.name',\n // 'author.email',\n // 'parent'\n // ];\n //\n // let topFields = ['disqus', 'category', 'thread', 'post'];\n // let allFields = [\n // 'disqus',\n // 'category',\n // 'category.forum',\n // 'category.title',\n // 'thread',\n // 'thread.id',\n // 'thread.forum',\n // 'thread.category',\n // 'thread.link',\n // 'thread.title',\n // 'thread.message',\n // 'thread.createdAt',\n // 'thread.author',\n // 'thread.author.name',\n // 'thread.author.email',\n // 'post',\n // 'post.id',\n // 'post.message',\n // 'post.thread',\n // 'post.isSpam',\n // 'post.createdAt',\n // 'post.ipAddress',\n // 'post.author',\n // 'post.author.name',\n // 'post.author.email'\n // ];\n //\n // writeStream.write(postFields.join('\\t') + '\\n');\n //\n // xml.preserve('post');\n // xml.collect('post');\n // xml.on('endElement: post', function (post) {\n // console.log('\\t>> Found post!'.rainbow);\n // var line = [];\n //\n // postFields.forEach(function (field) {\n // line.push(post[field]);\n // });\n //\n // console.log('Line'.yellow);\n // console.dir(line);\n // writeStream.write(line.join('\\t') + '\\n');\n // });\n //\n // xml.on('end', function () {\n // writeStream.end();\n // console.log('\\n**** Successfully completed xml stream ****'.success);\n // });\n // });\n\n\n // request.get(link)\n // .on('error', function (err) {\n // console.log('\\n>> !! Error Streaming from ' + link + ''.error);\n // console.log(err);\n // })\n // .on('response', function (response) {\n // console.log('**** Successful request response ****'.success);\n // var readStream = fs.createReadStream('./tmp/stream.xml');\n // var xml = new xmlStream(readStream);\n // var writeStream = fs.createWriteStream('./tmp/stream.txt');\n //\n // var csvFields = [\n // 'id',\n // 'message',\n // 'thread',\n // 'isSpam',\n // 'createdAt',\n // 'ipAddress',\n // 'author.name',\n // 'author.email',\n // 'parent'\n // ];\n //\n // writeStream.write(csvFields.join('\\t') + '\\n');\n //\n // xml.on('endElement: post', function (item) {\n // console.log('\\t>> Found item ');\n // });\n //\n // xml.on('end', function () {\n // writeStream.end();\n // console.log('\\n**** Successfully completed xml stream ****'.success);\n // });\n // })\n // .pipe(fs.createWriteStream('./tmp/stream', writeStreamOptions))\n // .on('error', function (err) {\n // console.log('\\n>> !! Error Piping !! <<'.error);\n // console.log(err.error);\n // });\n // });\n}", "async function readStream (stream) {\n\t// First, we need the atom stream\n\t// curl -i -H \"Accept:application/vnd.eventstore.atom+json\" \"http://127.0.0.1:2113/streams/newstream\"\n\ttry {\n\t\tconst response = await fetch(EVENT_STREAM_URL + stream, {\n\t\t\tmethod: \"GET\",\n\t\t\theaders: {\n\t\t\t\t'Accept': 'application/vnd.eventstore.atom+json'\n\t\t\t}\n\t\t});\n\t const body = await response.json();\n\t\t// TODO: do we have to deal with paging? do we care? For now, no. \n\n\t\t// There are many \"entries\" in a body, we want to get them all! \n\t\t// According to the docs, we want to follow the \"alternate\" links for each event. \n\t\tvar eventLinks = [];\n\t\tif (body) {\n\t\t\teventLinks = body.entries.map((entry) => { \n\t\t\t\treturn entry.links.filter((link) => {\n\t\t\t\t\treturn link.relation == \"alternate\";\n\t\t\t\t}).map((links) => {\n\t\t\t\t\treturn links.uri;\n\t\t\t\t})\n\t\t\t}).map((arr) => {\n\t\t\t\treturn arr[0];\n\t\t\t});\n\t\t}\n\n\t\tvar events = await Promise.all(eventLinks.map(async (link) => {\n\t\t\t// curl -i http://127.0.0.1:2113/streams/newstream/0 -H \"Accept: application/json\"\n\t\t\tconst response = await fetch(link, {\n\t\t\t\tmethod: \"GET\",\n\t\t\t\theaders: {\n\t\t\t\t\t'Accept': 'application/json',\n\t\t\t\t},\n\t\t\t});\n\t\t\tconst event = await response.json();\n\t\t\treturn event;\n\t\t}));\n\t\t// Results are coming in most-recent, we want oldest first\n\t\treturn events.reverse();\n\t} catch (error) {\n\t\t//console.log(error);\n\t}\n}", "_replay({stream, fromSeq = 0, journal} = {}, cb) {\n let events = [];\n return new Promise((resolve, reject) => {\n debug('replay(%s, %d)', stream, fromSeq);\n let seq = null;\n const eventStream = journal.find(stream, fromSeq);\n\n // TODO: Would we ever have async eventHandlers?\n eventStream.on('data', (event) => {\n events.push(event);\n seq = event.seq;\n });\n\n eventStream.on('end', () => {\n debug('_replay() returning events=%j, sequence=%d', events, seq);\n resolve([events, seq]);\n });\n\n eventStream.on('error', (err) => {\n debug('_replay() returning error=%j, seq=%d', err, seq);\n reject([err, events, seq]);\n });\n }).asCallback(cb, {spread: true});\n }", "readStream(path, cb) {\n\t\tconst promise = Path.normalizePath(path).then((path) => this.adapter.readStream(path));\n\n\t\tif (cb) {\n\t\t\tpromise.nodeify(cb);\n\t\t}\n\n\t\treturn promise;\n\t}", "async function concatStreamToBuffer(stream) {\n return new Promise((resolve, reject) => {\n const chunks = [];\n stream\n .on('data', (chunk) => {\n chunks.push(chunk);\n })\n .on('error', (e) => reject(e))\n .on('end', () => {\n const buffer = Buffer.concat(chunks);\n return resolve(buffer);\n });\n });\n}", "function dbquery(query) {\n return new Promise( (r, j) => connection.query(query, null , (err, data) => {\n\t\tif (err) {\n\t\t\tlog.error(query);\n\t\t\treturn j(err);\n\t\t}\n\t\tr(data);\n\t}))\n}", "function _createOrRetrieveStream(inline) {\n // build the stream processors if needed\n if (!_streams.length) {\n // append the $sink as the ultimate filter\n $filters.push(function(_, inline) {return inline ? {init:$sink.init, decl:$sink.decl, done:$sink.done, err: $sink.err} : $sink})\n for(var i = 0; i < 2; i++){ // 0 for j2c.sheet, 1 for j2c.inline\n for (var j = $filters.length; j--;) {\n _streams[i] = freeze(\n defaults(\n $filters[j](_streams[i], !!i),\n _streams[i]\n )\n )\n }\n }\n }\n return _streams[inline]\n }", "async function selectfromtable() {\n const client = new Client ({\n host: \"localhost\",\n user: \"postgres\",\n port: \"5432\",\n password: \"arielle\",\n database: \"postgres\"\n });\n await client.connect();\n try {\n const res = await client.query(`Select * from buns`);\n const myrows = res.rows;\n \n await client.end();\n return myrows\n } catch(err) {\n console.log(err.message);\n }\n}", "function peekStream(stream, maxChunks) {\n return new Promise(function (resolve, reject) {\n var streamListeners = new disposable_1.DisposableCollection();\n // Data Listener\n var buffer = [];\n var dataListener = function (chunk) {\n // Add to buffer\n buffer.push(chunk);\n // We reached maxChunks and thus need to return\n if (buffer.length > maxChunks) {\n // Dispose any listeners and ensure to pause the\n // stream so that it can be consumed again by caller\n streamListeners.dispose();\n stream.pause();\n return resolve({ stream: stream, buffer: buffer, ended: false });\n }\n };\n streamListeners.push(disposable_1.Disposable.create(function () { return stream.removeListener('data', dataListener); }));\n stream.on('data', dataListener);\n // Error Listener\n var errorListener = function (error) { return reject(error); };\n streamListeners.push(disposable_1.Disposable.create(function () { return stream.removeListener('error', errorListener); }));\n stream.on('error', errorListener);\n var endListener = function () { return resolve({ stream: stream, buffer: buffer, ended: true }); };\n streamListeners.push(disposable_1.Disposable.create(function () { return stream.removeListener('end', endListener); }));\n stream.on('end', endListener);\n });\n}", "async function fetchStreamData() {\n await getStreamCommits(streamId, 1, null, token).then(str => {\n stream = str.data.stream\n\n // Split the branches into \"main\" and everything else\n mainBranch = stream.branches.items.find(b => b.name == \"main\")\n beams = stream.branches.items.filter(b => b.name.startsWith(\"beam\"))\n columns = stream.branches.items.filter(b => b.name.startsWith(\"column\"))\n console.log(\"main branch\", mainBranch)\n console.log(\"beam options\", beams)\n console.log(\"column options\", columns)\n })\n}", "function ungzipStream(rawstream) {\n return (rawstream ? rawstream.pipe(ZL.createGunzip()) : undefined);\n}", "async getStreams(pagination) {\n return await this._client.helix.streams.getStreams({ ...pagination, game: this._data.id });\n }", "function getObjectStream(_a) {\n var bucket = _a.bucket, key = _a.key, client = _a.client;\n return __awaiter(this, void 0, void 0, function () {\n var stream;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0: return [4 /*yield*/, client.getObject(bucket, key)];\n case 1:\n stream = _b.sent();\n return [2 /*return*/, stream.pipe(gunzip_maybe_1.default()).pipe(maybeTarball())];\n }\n });\n });\n}", "async function query_plsql_inout(connection) {\n\n console.log (\"4. query_plsql_inout(): Querying then inserting a CLOB using a PL/SQL IN OUT LOB bind\");\n\n let result = await connection.execute(\n `SELECT c FROM no_lobs WHERE id = :id`,\n { id: 1 }\n );\n\n if (result.rows.length === 0) {\n throw new Error('query_plsql_inout(): No row found');\n }\n\n const clob1 = result.rows[0][0];\n if (clob1 === null) {\n throw new Error('query_plsql_inout(): NULL clob1 found');\n }\n\n // Note binding clob1 as IN OUT here causes it be autoclosed by execute().\n // The returned Lob clob2 will be autoclosed because it is streamed to completion.\n result = await connection.execute(\n `BEGIN\n no_lob_in_out(:idbv, :ciobv);\n END;`,\n {\n idbv: 30,\n ciobv: {val: clob1, type: oracledb.CLOB, dir: oracledb.BIND_INOUT}\n }\n );\n\n const clob2 = result.outBinds.ciobv;\n if (clob2 === null) {\n throw new Error('plsql_out_inout(): NULL clob2 found');\n }\n\n // Stream the returned LOB to a file\n const doStream = new Promise((resolve, reject) => {\n\n // Set up the Lob stream\n console.log(' Writing to ' + clobOutFileName1);\n clob2.setEncoding('utf8'); // set the encoding so we get a 'string' not a 'buffer'\n clob2.on('error', (err) => {\n // console.log(\"clob2.on 'error' event\");\n reject(err);\n });\n clob2.on('end', () => {\n // console.log(\"clob2.on 'end' event\");\n clob2.destroy();\n });\n clob2.on('close', () => {\n // console.log(\"clob2.on 'close' event\");\n resolve();\n });\n\n // Set up the stream to write to a file\n const outStream = fs.createWriteStream(clobOutFileName1);\n outStream.on('error', (err) => {\n // console.log(\"outStream.on 'error' event\");\n clob2.destroy(err);\n });\n\n // Switch into flowing mode and push the LOB to the file\n clob2.pipe(outStream);\n });\n\n await doStream;\n console.log (\" Completed\");\n}", "getAll() {\n\t\tlet db = this.db;\n\n\t\treturn new Promise((resolve, reject)=>{\n\t\t\tresolve(db.get(constants.DATABASE_NAMES.HISTORIC_STREAMLOOTS).value());\n\t\t});\n\t}", "function getStream(req, res) {\n var track = Track.create({id: req.params.id}),\n converter = Converter.create();\n\n res.contentType('application/ogg');\n\n track.stream(function (err, steam) {\n if (err) {\n console.log(err);\n res.send(503, err);\n return;\n }\n steam.pipe(converter.process.stdin);\n converter.process.stdout.pipe(res);\n });\n\n res.header('Access-Control-Allow-Origin', '*');\n\n // may need long polling here ?\n // https://devcenter.heroku.com/articles/request-timeout\n // res.header('transports', ['xhr-polling']);\n\n req.on('close', function () {\n track.stopStream();\n converter.kill();\n });\n }", "async query(query) {\n\n }", "getFeatured() {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tdbInstance('stream')\n\t\t\t.select(['id', 'u1.username AS name', 'u1.type', 'u1.avatar', 'u1.banned'])\n\t\t\t.where({\n\t\t\t\t'live': true,\n\t\t\t\t'private': 0\n\t\t\t})\n\t\t\t.debug(true)\n\t\t\t.join('users as u1', 'u1.user_id', '=', 'stream.user_id')\n\t\t\t.limit(5)\n\t\t\t.orderBy('views', 'desc')\n\t\t\t.then(resolve)\n\t\t\t.catch(reject);\n\t\t});\n\t}", "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 }", "function getStreamInfo(stream) {\n\treturn new Promise((res, rej) => {\n\t\tstream.on(\"info\", (info) => res(info));\n\t});\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}", "async function clickQueryInflux(req, res) {\n let queryArray = []\n let querySensor = req.body.sensor\n let fluxQuery;\n const queryApi = new InfluxDB({ url: process.env.URL, token: process.env.TOKENTWO }).getQueryApi(process.env.ORG);\n if (req.body.type === 'tempHum') {\n fluxQuery = `from(bucket:\"perm_data\") |> range(start: -1h) |> filter(fn: (r) => r._measurement == \"${querySensor}\") |> filter(fn: (r) => r._field == \"temperature\" or r._field == \"humidity\")`\n } else {\n fluxQuery = `from(bucket:\"perm_data\") |> range(start: -1h) |> filter(fn: (r) => r._measurement == \"${querySensor}\") |> filter(fn: (r) => r._field == \"EC\" or r._field == \"pH\")`\n }\n\n await queryApi.queryRows(fluxQuery, {\n next(row, tableMeta) {\n const o = tableMeta.toObject(row)\n queryArray.push(o);\n },\n error(error) {\n console.error(error)\n console.log('\\n Finished ERROR')\n },\n complete() {\n res.type('application/json').send(JSON.stringify(queryArray));\n console.log('\\nFinished SUCCESS')\n }\n })\n}", "function consumeStream(stream, reducer) {\n return new Promise(function (resolve, reject) {\n var chunks = [];\n stream.on('data', function (data) { return chunks.push(data); });\n stream.on('error', function (error) { return reject(error); });\n stream.on('end', function () { return resolve(reducer(chunks)); });\n });\n}", "async function listAllStreamingJobsInAResourceGroupAndUseTheExpandODataQueryParameterToExpandInputsOutputsTransformationAndFunctions() {\n const subscriptionId = \"56b5e0a9-b645-407d-99b0-c64f86013e3d\";\n const expand = \"inputs,outputs,transformation,functions\";\n const resourceGroupName = \"sjrg3276\";\n const options = { expand };\n const credential = new DefaultAzureCredential();\n const client = new StreamAnalyticsManagementClient(credential, subscriptionId);\n const resArray = new Array();\n for await (let item of client.streamingJobs.listByResourceGroup(resourceGroupName, options)) {\n resArray.push(item);\n }\n console.log(resArray);\n}", "function query(context, connection, queryString, rowProcessFunc) {\r\n const Request = require('tedious').Request;\r\n let data = [];\r\n let request = new Request(queryString, function(err, rowCount, rows) {\r\n if (err) {\r\n error(err, context);\r\n }\r\n else {\r\n context.res = {\r\n status: 200,\r\n body: data,\r\n headers: { \"Content-Type\": \"application/json\" }\r\n };\r\n context.done();\r\n }\r\n });\r\n\r\n request.on('row', function(columns) {\r\n data.push(rowProcessFunc(columns));\r\n });\r\n connection.execSql(request);\r\n}", "function executeStandardQuery(sql, res) {\n let images = {};\n db.all(sql, [], (error, rows) => {\n if (error) {\n console.log(error);\n }\n rows.forEach((row) => {\n images[row.id] = {\n \"dataSmall\": row.url_small,\n \"dataBig\": row.url_big,\n \"description\": row.description\n }\n });\n\n res.json(JSON.stringify(images));\n res.status(200);\n });\n}", "function streamify(promise, factory) {\n var _then = promise.then;\n promise.then = function() {\n factory();\n var newPromise = _then.apply(promise, arguments);\n return streamify(newPromise, factory);\n };\n promise.stream = factory;\n return promise;\n}", "function list_to_stream(xs) {\n if (is_empty_list(xs)) {\n\treturn [];\n } else {\n\treturn pair(head(xs),function() { return list_to_stream(tail(xs)); });\n }\n}", "query (connectionName, tableName, queryString, args = [ ], cb = args) {\n let cxn = this.connections.get(connectionName)\n let query = cxn.knex.raw(Util.toKnexRawQuery(queryString), Util.castValues(args))\n\n return query\n .then(rows => {\n let result = _.map(rows, row => {\n return Util.castSqlValues(row, cxn.collections[tableName])\n })\n _.isFunction(cb) && cb(null, result)\n return result\n })\n }", "async function listAllOutputsInAStreamingJob() {\n const subscriptionId = \"56b5e0a9-b645-407d-99b0-c64f86013e3d\";\n const resourceGroupName = \"sjrg2157\";\n const jobName = \"sj6458\";\n const credential = new DefaultAzureCredential();\n const client = new StreamAnalyticsManagementClient(credential, subscriptionId);\n const resArray = new Array();\n for await (let item of client.outputs.listByStreamingJob(resourceGroupName, jobName)) {\n resArray.push(item);\n }\n console.log(resArray);\n}", "function passQueryToGraphApi(query, callback) {\n if (typeof query.query == 'string')\n async.map([query], getDataForAllQuery, callback);\n else\n async.map(query, getDataForAllQuery, callback);\n }", "transformQuery(query) {\n var limitQuery = `select * from (${query}) as t limit 1`;\n return this.db.result(limitQuery, true).then(result => {\n const firstGeomField = result.fields.filter(isGeometryField).shift();\n const selectClause = result.fields.map(field => {\n if(isGeometryField(field)) {\n return `ST_AsGeoJSON(ST_Transform(${field.name}, 4326)) as ${field.name}`\n }\n return field.name;\n }).join(',');\n\n if(!firstGeomField) throw Error('No geometry column found in query');\n return {\n query: `SELECT ${selectClause} FROM (${query}) as t`,\n geomField: firstGeomField\n };\n });\n }", "function runGenericQuery(query)\n{\n return new Promise((resolve, reject) => {\n var connection = new Connection(config);\n connection.on('connect', function(err) {\n if (err) {\n console.log(err);\n reject(err);\n } else {\n request = new Request(query.query, function(err) {\n if (err) {\n console.log(err);\n reject(new Error(err));\n } else {\n resolve(\"Operation successful\");\n }\n connection.close();\n }); \n \n query.params.forEach(function(param) {\n request.addParameter(param.paramName, param.paramType, param.paramValue);\n });\n\n connection.execSql(request);\n }\n });\n });\n}", "function getJsonDataSet(query)\n{\n return new Promise((resolve, reject) => {\n var connection = new Connection(config);\n connection.on('connect', function(err) {\n if (err) {\n console.log(err);\n reject(err);\n } else {\n getQueryResult(connection, query).then((dataSet) => {\n resolve(dataSet);\n }).catch((reason) => {\n console.log('Handle rejected promise ('+reason+') here.');\n reject(reason);\n }); \n }\n });\n }); \n}", "async toArrayForTest() {\n const stream = this.prefetch(100);\n const result = [];\n let x = await stream.next();\n while (!x.done) {\n result.push(x.value);\n x = await stream.next();\n }\n return result;\n }", "function getAllPosts(){\n\n return db.many(`\n SELECT * FROM posts;\n `)\n .then((posts)=> {\n posts.forEach((blog)=> {\n console.log(blog)\n return blog;\n })\n })\n .catch((e) =>{\n console.log(e)\n })\n}", "function dbFetchPostStream(userId, lastPostId, page, limit, searchKey) {\n var followingUsers, followingIds, postResult, authedUser, streamServerRequest;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function dbFetchPostStream$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return Object(redux_saga_effects__WEBPACK_IMPORTED_MODULE_5__[\"select\"])(_store_reducers_circles_circleSelector__WEBPACK_IMPORTED_MODULE_13__[\"circleSelector\"].getFollowingUsers);\n\n case 2:\n followingUsers = _context.sent;\n followingIds = followingUsers.keySeq().map(function (key) {\n return \"\".concat(key);\n }).toArray();\n followingIds.push(\"\".concat(userId));\n _context.next = 7;\n return Object(redux_saga_effects__WEBPACK_IMPORTED_MODULE_5__[\"call\"])(postService.searchPosts, '', followingIds.join(), lastPostId, page, limit, searchKey);\n\n case 7:\n postResult = _context.sent;\n\n if (postResult.hasMore) {\n _context.next = 11;\n break;\n }\n\n _context.next = 11;\n return Object(redux_saga_effects__WEBPACK_IMPORTED_MODULE_5__[\"put\"])(_store_actions_postActions__WEBPACK_IMPORTED_MODULE_8__[\"notMoreDataStream\"]());\n\n case 11:\n _context.next = 13;\n return Object(redux_saga_effects__WEBPACK_IMPORTED_MODULE_5__[\"select\"])(_store_reducers_authorize__WEBPACK_IMPORTED_MODULE_12__[\"authorizeSelector\"].getAuthedUser);\n\n case 13:\n authedUser = _context.sent;\n streamServerRequest = _api_PostAPI__WEBPACK_IMPORTED_MODULE_1__[\"PostAPI\"].createFetchStreamRequest(authedUser.get('uid'));\n streamServerRequest.status = _store_actions_serverRequestStatusType__WEBPACK_IMPORTED_MODULE_10__[\"ServerRequestStatusType\"].OK;\n _context.next = 18;\n return Object(redux_saga_effects__WEBPACK_IMPORTED_MODULE_5__[\"put\"])(_store_actions_serverActions__WEBPACK_IMPORTED_MODULE_9__[\"sendRequest\"](streamServerRequest));\n\n case 18:\n _context.next = 20;\n return Object(redux_saga_effects__WEBPACK_IMPORTED_MODULE_5__[\"put\"])(_store_actions_postActions__WEBPACK_IMPORTED_MODULE_8__[\"lastPostStream\"](postResult.newLastPostId));\n\n case 20:\n _context.next = 22;\n return Object(redux_saga_effects__WEBPACK_IMPORTED_MODULE_5__[\"put\"])(_store_actions_postActions__WEBPACK_IMPORTED_MODULE_8__[\"addPosts\"](postResult.posts));\n\n case 22:\n _context.next = 24;\n return Object(redux_saga_effects__WEBPACK_IMPORTED_MODULE_5__[\"put\"])(_store_actions_postActions__WEBPACK_IMPORTED_MODULE_8__[\"addStreamPosts\"](postResult.ids));\n\n case 24:\n case \"end\":\n return _context.stop();\n }\n }\n }, _marked);\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}", "getRecords(queryObject) {\n let options = {\n method: 'GET',\n url: this.url + queryObject.table + '.do',\n qs: this.qs\n };\n options.qs.sysparm_query = qs.stringify(queryObject.query, '^');\n\n return new Promise((resolve, reject) => {\n this.request(options, (err, response, body) => {\n if(err) {\n return reject(err);\n }\n\n try {\n if(response.statusCode !== 200) {\n return reject(new Error(`Unexpected response status ${response.statusCode}`));\n }\n\n let jsonRes = body.records;\n resolve(jsonRes);\n } catch(e) {\n return reject(e);\n }\n });\n });\n }", "async function query() {\n const {BigQuery} = require('@google-cloud/bigquery');\n\n const credentials = await main.authFlow();\n const bigquery = new BigQuery(credentials);\n\n // Queries the U.S. given names dataset for the state of Texas.\n const query = `SELECT name, SUM(number) as total\n FROM \\`bigquery-public-data.usa_names.usa_1910_current\\`\n WHERE name = 'William'\n GROUP BY name;`;\n\n // For all options, see https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query\n const options = {\n query: query,\n };\n\n // Run the query as a job\n const [job] = await bigquery.createQueryJob(options);\n console.log(`Job ${job.id} started.`);\n\n // Wait for the query to finish\n const [rows] = await job.getQueryResults();\n\n // Print the results\n console.log('Rows:');\n rows.forEach(row => console.log(row));\n\n return rows;\n}", "query() { }", "function peekStream(stream, maxChunks) {\n return new Promise((resolve, reject) => {\n const streamListeners = new lifecycle_1.DisposableStore();\n // Data Listener\n const buffer = [];\n const dataListener = (chunk) => {\n // Add to buffer\n buffer.push(chunk);\n // We reached maxChunks and thus need to return\n if (buffer.length > maxChunks) {\n // Dispose any listeners and ensure to pause the\n // stream so that it can be consumed again by caller\n streamListeners.dispose();\n stream.pause();\n return resolve({ stream, buffer, ended: false });\n }\n };\n streamListeners.add(lifecycle_1.toDisposable(() => stream.removeListener('data', dataListener)));\n stream.on('data', dataListener);\n // Error Listener\n const errorListener = (error) => {\n return reject(error);\n };\n streamListeners.add(lifecycle_1.toDisposable(() => stream.removeListener('error', errorListener)));\n stream.on('error', errorListener);\n const endListener = () => {\n return resolve({ stream, buffer, ended: true });\n };\n streamListeners.add(lifecycle_1.toDisposable(() => stream.removeListener('end', endListener)));\n stream.on('end', endListener);\n });\n }", "function getStreamItem(params) {\n return new Promise((resolve, reject) => {\n var response;\n var streamName = params.stream;\n var transactionId = params.txid;\n multichain.getStreamItem({\n \"stream\": streamName,\n \"txid\": transactionId,\n \"verbose\": false\n },\n (err, res) => {\n console.log(res)\n if (err == null) {\n return resolve({\n response: res,\n message: \"Blockchain Information\"\n });\n } else {\n console.log(err)\n return reject({\n status: 500,\n message: 'Internal Server Error !'\n });\n }\n }\n )\n\n })\n}", "function untarStream(rawstream) {\n return (rawstream ? rawstream.pipe(TS.extract()) : undefined);\n}", "async processFile(mode,schema,hndl) {\n const sqlStatement = `SET @RESULTS = ''; CALL IMPORT_JSON(?,@RESULTS); SELECT @RESULTS \"logRecords\";`;\t\t\t\t\t \n\tlet results = await this.executeSQL(sqlStatement,schema);\n results = results.pop();\n\treturn JSON.parse(results[0].logRecords)\n }", "function dbpediaQuerySync(query) {\r\n var queryEncoded = encodeURIComponent(query);\r\n var data = httpGetSync(\"https://dbpedia.org/sparql?default-graph-uri=http%3A%2F%2Fdbpedia.org&query=\"+queryEncoded+\"&format=application%2Fsparql-results%2Bjson&CXML_redir_for_subjs=121&CXML_redir_for_hrefs=&timeout=30000&debug=on&run=+Run+Query+\");\r\n return JSON.parse(data);\r\n}", "function getAudioStream(blob) {\n fetch('/audio-stream' + '?language=' + getLanguage(), {\n method: 'POST',\n body: blob\n }).then(response => response.text()).then(stream => {\n console.log(\"stream output: \" + stream);\n if (stream.includes(\"<\")) {\n console.log(\"error output\");\n return;\n }\n streamingContainer.innerHTML = \"\";\n stream = (stream.includes(null)) ? \"\" : stream;\n placeUserInput(stream + \"...\", \"streaming\");\n });\n}", "function makeArray(stream) {\n\treturn stream.map(function (value) {\n\t\tif (value == null) {\n\t\t\treturn [];\n\t\t}\n\t\tif (!Array.isArray(value)) {\n\t\t\treturn [value];\n\t\t}\n\t\treturn value;\n\t});\n}", "function pipeStream() {\n var args = _.toArray(arguments);\n var src = args.shift();\n\n return new Promise(function(resolve, reject) {\n var stream = src;\n var target;\n\n while ((target = args.shift()) != null) {\n stream = stream.pipe(target).on('error', reject);\n }\n\n stream.on('finish', resolve);\n stream.on('end', resolve);\n stream.on('close', resolve);\n });\n}", "static async showAllFlights() {\n let flightQuery = 'SELECT * FROM flights';\n try {\n const client = await pool.connect();\n const result = await client.query(flightQuery);\n client.release();\n return result;\n } catch (error) {\n console.log(error);\n }\n }", "async function plsql_out_inout(connection) {\n\n console.log (\"5. plsql_out_inout(): Getting a LOB using a PL/SQL OUT bind and inserting it using a PL/SQL IN OUT LOB bind\");\n\n const result1 = await connection.execute(\n `BEGIN\n no_lobs_out(:idbv, :cobv, :bobv);\n END;`,\n {\n idbv: 1,\n cobv: {type: oracledb.CLOB, dir: oracledb.BIND_OUT},\n bobv: {type: oracledb.BLOB, dir: oracledb.BIND_OUT} // not used in this demo; it will be NULL anyway\n }\n );\n\n const clob1 = result1.outBinds.cobv;\n if (clob1 === null) {\n throw new Error('plsql_out_inout(): NULL clob1 found');\n }\n\n // Note binding clob1 as IN OUT here causes it be autoclosed by execute().\n // The returned Lob clob2 will be autoclosed because it is streamed to completion.\n const result2 = await connection.execute(\n `BEGIN\n no_lob_in_out(:idbv, :ciobv);\n END;`,\n {\n idbv: 50,\n ciobv: {val: clob1, type: oracledb.CLOB, dir: oracledb.BIND_INOUT}\n }\n );\n\n const doStream = new Promise((resolve, reject) => {\n\n const clob2 = result2.outBinds.ciobv;\n if (clob2 === null) {\n throw new Error('plsql_out_inout(): NULL clob2 found');\n }\n\n // Stream the LOB to a file\n console.log(' Writing to ' + clobOutFileName2);\n clob2.setEncoding('utf8'); // set the encoding so we get a 'string' not a 'buffer'\n clob2.on('error', (err) => {\n // console.log(\"clob2.on 'error' event\");\n reject (err);\n });\n clob2.on('end', () => {\n // console.log(\"clob2.on 'end' event\");\n clob2.destroy();\n });\n clob2.on('close', () => {\n // console.log(\"clob2.on 'close' event\");\n resolve();\n });\n\n const outStream = fs.createWriteStream(clobOutFileName2);\n outStream.on('error', (err) => {\n // console.log(\"outStream.on 'error' event\");\n clob2.destroy(err);\n });\n\n // Switch into flowing mode and push the LOB to the file\n clob2.pipe(outStream);\n });\n\n await doStream;\n console.log (\" Completed\");\n}", "function queryNHDStreams (latlng, callback) {\n \n console.log('querying NHD', NHDstreamRadius);\n //var queryUrl = \"https://hydro.nationalmap.gov/arcgis/rest/services/NHDPlus_HR/MapServer/2/query?geometry=\" + latlng.lng + \",\" + latlng.lat + \"&outFields=GNIS_NAME%2C+LENGTHKM%2C+STREAMLEVE%2C+FCODE%2C+OBJECTID%2C+ARBOLATESU&geometryType=esriGeometryPoint&inSR=4326&outSR=4326&distance=\" + NHDstreamRadius + \"&units=esriSRUnit_Meter&returnGeometry=true&f=pjson\";\n\tvar queryUrl = \"https://hydro.nationalmap.gov/arcgis/rest/services/nhd/MapServer/6/query?geometry=\" + latlng.lng + \",\" + latlng.lat + \"&outFields=GNIS_NAME%2CREACHCODE&geometryType=esriGeometryPoint&inSR=4326&outSR=4326&distance=\" + NHDstreamRadius + \"&units=esriSRUnit_Meter&outFields=*&returnGeometry=true&f=pjson\";\n\t\n\tif (isQueryingLines == true) {\n\t\tconsole.log(\"already querying\");\n\t\treturn;\n\t}\n isQueryingLines = true;\n\n $('#loading').show();\n\n\treturn $.ajax({\n\t\turl: queryUrl,\n\t\tdataType: 'json',\n\t\ttimeout: 2000,\n\t\tsuccess: function(results){\n console.log(\"query success\")\n isQueryingLines = false;\n lastQueriedFeatures = results.features;\n lastQueryLatlng = latlng\n highlightFeature(lastQueriedFeatures);\n $('#loading').hide();\n $('#nhdFailure').hide();\n callback()\n\t\t},\n\t\terror: function(jqXH, text, errorThrown){\n console.log(\"failed query: \" + text + \" error=\" + errorThrown);\n console.log(jqXH.responseText);\n\n isQueryingLines = false;\n $('#loading').hide();\n $('#nhdFailure').show();\n\t\t},\n\t});\n}", "function db_query(query_string, next) {\r\n db_mutex.acquire().then((release) => {\r\n const conn = new sql.ConnectionPool(config)\r\n conn.connect().then((conn) => {\r\n conn.query(query_string).then((result) => {\r\n /* Below comment is duplicate of result preprocessing code in DirectQuery.js. \r\n * Thinking of a way to get that preprocessing done within the router */\r\n /*\r\n var data = result.recordset.\r\n data.forEach(element => {\r\n Object.keys(element).forEach(key => {\r\n if(element[key] == null) element[key]='-'\r\n else if(element[key] == true) element[key]='true'\r\n else if(element[key] == false) element[key]='false'\r\n });\r\n });*/\r\n next(null, result.recordset);\r\n release();\r\n }).catch(error => {\r\n next(error, null);\r\n release();\r\n });\r\n }).catch(error => {\r\n next(error, null);\r\n release();\r\n });\r\n });\r\n}", "static getMetaData(src) {\n\t\tif (GraphQL.logging) console.log('GraphQL: ', src);\n\t\treturn new Promise((resolve, reject) => {\n\t\t\t// console.log('================\\n', GraphQL.metadataStr(), '===================\\n');\n\n\t\t\taxios\n\t\t\t\t.post(src, GraphQL.query(GraphQL.metadataStr()))\n\t\t\t\t.then((res) => {\n\t\t\t\t\tconst { __schema: schema } = res.data.data;\n\t\t\t\t\tresolve(schema);\n\t\t\t\t})\n\t\t\t\t.catch((err) => {\n\t\t\t\t\tif (err.isAxiosError) {\n\t\t\t\t\t\t// console.log(err.response);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\treject({\n\t\t\t\t\t\t\t\tsourceType: 'GraphQL',\n\t\t\t\t\t\t\t\tstatusText: err.response.statusText,\n\t\t\t\t\t\t\t\trequestUrl: err.response.config.url,\n\t\t\t\t\t\t\t\trequestBody: JSON.parse(err.response.config.data).query,\n\t\t\t\t\t\t\t\terrors: err.response.data.errors,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\treject(err);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else reject(err);\n\t\t\t\t});\n\t\t});\n\t}", "function createPgSingleProcedureQueryGqlFieldEntry(buildToken, pgCatalog, pgProcedure) {\n var fixtures = createPgProcedureFixtures_1.default(buildToken, pgCatalog, pgProcedure);\n // Create our GraphQL input fields users will use to input data into our\n // procedure.\n var argEntries = fixtures.args.slice(1).map(function (_a) {\n var name = _a.name, gqlType = _a.gqlType;\n return [utils_1.formatName.arg(name), {\n // No description…\n type: pgProcedure.isStrict ? new graphql_1.GraphQLNonNull(graphql_1.getNullableType(gqlType)) : gqlType,\n }];\n });\n return [utils_1.formatName.field(pgProcedure.name.substring(fixtures.args[0].pgType.name.length + 1)), {\n description: pgProcedure.description,\n type: fixtures.return.gqlType,\n args: utils_1.buildObject(argEntries),\n resolve: function (source, args, context) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var client, input, query, row, _a;\n return tslib_1.__generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n client = pgClientFromContext_1.default(context);\n input = [source].concat(argEntries.map(function (_a, i) {\n var argName = _a[0];\n return fixtures.args[i + 1].fromGqlInput(args[argName]);\n }));\n query = utils_2.sql.compile((_a = [\"select to_json(\", \") as value\"], _a.raw = [\"select to_json(\", \") as value\"], utils_2.sql.query(_a, createPgProcedureSqlCall_1.default(fixtures, input))));\n return [4 /*yield*/, client.query(query)];\n case 1:\n row = (_b.sent()).rows[0];\n return [2 /*return*/, row ? fixtures.return.intoGqlOutput(fixtures.return.type.transformPgValueIntoValue(row['value'])) : null];\n }\n });\n });\n },\n }];\n}", "async function simpleQuery(query, values = [], db){\n\n const client = await db.connect();\n let res;\n\n try { \n res = await client.query(query, values);\n\n } catch (err) {\n throw err;\n\n } finally {\n client.release();\n }\n \n return res;\n}", "function streamToValue (res, callback) {\n pump(\n res,\n concat((data) => callback(null, data)),\n (err) => {\n if (err) {\n callback(err)\n }\n })\n}", "function streamToValue (res, callback) {\n pump(\n res,\n concat((data) => callback(null, data)),\n (err) => {\n if (err) {\n callback(err)\n }\n })\n}", "function gotStream(stream) {\n\n // Create an AudioNode from the stream.\n realAudioInput = audioContext.createMediaStreamSource(stream);\n audioInput = realAudioInput;\n /*\n * without filter:\n \n // Connect it to the destination to hear yourself (or any other node for processing!)\n audioInput.connect(audioContext.destination);\n */\n\n /* Using a filter\n */\n // microphone -> filter -> destination.\n var filter = audioContext.createBiquadFilter();\n audioInput.connect(filter);\n console.log('gotStream: before connecting to the destination');\n // Connect it to the destination to hear yourself (or any other node for processing!)\n filter.connect(audioContext.destination);\n /**/\n console.log('finish getStream');\n}", "function show_cards(){\n //access the ids from the table\n var pg = require('pg');\n\n pg.connect(process.env.DATABASE_URL, function(err, client) {\n var query = client.query('SELECT * FROM live_cards');\n \n query.on('row', function(row) {\n console.log(JSON.stringify(row));\n });\n });\n //give to david\n return JSON.stringify();\n}", "function $query(query, resource, options = {}) {\n if(Array.isArray(query.pipeline) && query.pipeline.length > 0) {\n\n let currentResource = resource;\n if(typeof query.resource === \"string\" && query.resource.length > 0) {\n if(options.tableCounter && options.tableCounter > 0) {\n options[\"previousResource\"] = `t${options.tableCounter - 1}`;\n } else {\n options[\"previousResource\"] = currentResource;\n }\n currentResource = query.resource;\n }\n\n const queryResult = convert(currentResource, query.pipeline, options);\n\n // Modify the query to be a subquery\n if(typeof queryResult === \"object\") {\n queryResult.query = `(${queryResult.query})`;\n return queryResult;\n } else {\n return {\n success: true,\n query: `(${queryResult.trim()})`,\n }\n }\n } else {\n return {\n success: false,\n error: Errors.EMPTY_QUERY_PIPELINE\n };\n }\n}", "static getStreams() {\n return FirebaseServices.getCollectionData('streams');\n }", "function consumeStream(stream, reducer) {\n return new Promise((resolve, reject) => {\n const chunks = [];\n stream.on('data', data => chunks.push(data));\n stream.on('error', error => reject(error));\n stream.on('end', () => resolve(reducer(chunks)));\n });\n }", "async function runQuery(client, stmt, limit) {\n const opt = { limit };\n console.log('Query results:');\n\n // Issue the query by looping over NoSQLClient.queryIterable.\n for await(const res of client.queryIterable(stmt, opt)) {\n // Each iteration over NoSQLClient.queryIterable returns a portion of\n // the result set. We iterate over the whole result set by using\n // for-await-of loop.\n for(let row of res.rows) {\n console.log(' %O', row);\n }\n }\n}", "query ({ operationName, query, variables }) {\n\t\tquery = print(query)\n\t\t// console.log('Phoenix apollo \\n\\t query:', query)\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis._channel.push('doc', { operationName, query, variables })\n\t\t\t\t.receive('ok', resolve)\n\t\t\t\t.receive('ignore', resolve)\n\t\t\t\t.receive('error', reject)\n\t\t\t\t.receive('timeout', reject)\n\t\t})\n\t}", "function createImageStream(document) {\n\treturn es.readArray(getDocumentImageElements(document));\n}", "function map(stream, transform) {\n var q = new TupleQueue(function() {\n return q.emitData(transform.apply(null, arguments));\n });\n stream.pipe(q);\n return q;\n}", "function queryInterviewDatabase() { \n console.log('Reading rows from the Table...');\n\n // Read all rows from table\n request = new Request(\"select * from interviewData;\", (err, rowCount, rows) => {\n console.log(rowCount + ' row(s) returned');\n process.exit();\n });\n\n request.on('row', function(columns) {\n columns.forEach(function(column) {\n console.log(\"%s\\t%s\", column.metadata.colName, column.value);\n });\n });\n\n connection.execSql(request);\n}" ]
[ "0.64795226", "0.6207072", "0.60264564", "0.58850384", "0.5598717", "0.5508695", "0.53263193", "0.5218715", "0.5214324", "0.5167134", "0.5157735", "0.51560813", "0.51560813", "0.51181746", "0.51110923", "0.5095104", "0.5084343", "0.50747144", "0.5061584", "0.5024673", "0.5008011", "0.49693766", "0.49665928", "0.49035874", "0.49035704", "0.48945177", "0.48931116", "0.48654145", "0.4855795", "0.48514503", "0.4848541", "0.4810262", "0.47938532", "0.4778417", "0.4760368", "0.47576284", "0.47558072", "0.475209", "0.47336638", "0.47136247", "0.47072238", "0.47045887", "0.47044092", "0.47008684", "0.46863747", "0.468427", "0.46830747", "0.4668878", "0.46586877", "0.46488333", "0.46383747", "0.46277535", "0.46234268", "0.46049234", "0.4592334", "0.4584428", "0.4583976", "0.45837972", "0.45755422", "0.4570544", "0.45575503", "0.4557094", "0.454906", "0.45485115", "0.45440346", "0.4535557", "0.45351264", "0.45328343", "0.45319417", "0.45286328", "0.45252138", "0.45075768", "0.45059344", "0.45002306", "0.44970983", "0.4491647", "0.44866538", "0.44838557", "0.44821066", "0.44815984", "0.44793504", "0.44749317", "0.44742173", "0.44733888", "0.4472071", "0.44714785", "0.44685948", "0.44566625", "0.4456385", "0.4456385", "0.444957", "0.44390225", "0.44361857", "0.44339392", "0.4426176", "0.44156757", "0.4415195", "0.44094145", "0.440852", "0.44077158" ]
0.69250476
0
group every two posts
getGroupedArray(posts) { return posts.reduce((result, value, index, array) => { if (index % 2 === 0) result.push(array.slice(index, index + 2)); return result; }, []); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function combinePosts() {\n\tfor (var j = (blogEntries.length - 1); j >= 0; j--) {\n\t\tformatPostHTML(j);\n\t}\n}", "function get_even(criterion, cb) {\n var gotten = 0;\n var posts = {};\n criterion.count = criterion.count / 2;\n get_posts(criterion, function(gposts) {\n gotten++;\n Object.keys(gposts).forEach(function(key) {\n posts[key] = gposts[key];\n });\n if (gotten >= 1) {\n if (criterion.filter == \"favs\") {\n var fin = {};\n //console.log(posts);\n posts.posts.forEach(function(post) {\n fin[post.id] = post;\n });\n //console.log(fin);\n fin = Object.keys(fin).map(function(p) {\n return fin[p];\n }).sort(cmpfavsD);\n posts.posts = fin;\n }\n //console.log(posts.posts);\n cb(posts);\n posts = {}\n console.log(\"gotten\");\n } else {\n console.log(gotten);\n console.log(\"not gotten\");\n }\n });\n}", "function makePosts(num) {\n const arr = [];\n for (var i = 0; i < num; i++){\n arr.push({ id: i, userId: i, title: `title${i}`, body: `body${i}`});\n }\n return arr;\n }", "function getPosts() {\n return strapi.query('post').find({ _sort: 'createdAt:desc', _limit: 2 });\n}", "loadMorePosts() {\n const feed = this.props.feed;\n\n if (feed.hasMore()) {\n feed.getMore().then(posts => {\n this.setState({\n // TODO: deduplication\n posts: this.state.posts.concat(posts)\n });\n });\n }\n }", "function condense(vote_group) {\n function group_majority(entry) { return entry[colToLine('BG')]; }\n var side_grouped_obj = und.groupBy(vote_group, group_majority);\n side_grouped_obj['date'] = vote_group[0][colToLine('E')];\n side_grouped_obj['name'] = vote_group[0][colToLine('O')];\n side_grouped_obj['issue'] = vote_group[0][colToLine('AO')];\n side_grouped_obj['court'] = vote_group[0][colToLine('L')];\n return side_grouped_obj;\n }", "parseResults(redditResponse) {\n const posts = redditResponse.data.children;\n const allPosts = [];\n // Parse Posts\n posts.forEach((post) => {\n const data = post.data;\n // Lets not get fired from a job I don't have yet\n if (data.over_18) {\n return;\n }\n // Create a Post Object\n const newPost = new _shared_classes__WEBPACK_IMPORTED_MODULE_3__[\"Post\"](data.id, data.permalink, data.subreddit, data.author, this.extractPreviewImages(data), data.title);\n // Push to list of posts\n allPosts.push(newPost);\n });\n console.groupEnd();\n return allPosts;\n }", "function joinResults(req, res, next) {\n\t\tconst joinedResults = [];\n\n\t\tfor (const resultArray of req.results) {\n\t\t\tfor (const result of resultArray) {\n\t\t\t\tconst post = result.post;\n\t\t\t\t// temp fix for comments without parents -> see Trello for relevant card\n\t\t\t\tif (!post || Object.keys(post) === 0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tpost.id = post._id;\n\t\t\t\tdelete post._id;\n\n\t\t\t\t// Both aggregation pipelines may have returned the same post\n\t\t\t\tconst isDuplicate = joinedResults.some(function(joinedPost) {\n\t\t\t\t\treturn joinedPost.id.toString() === post.id.toString();\n\t\t\t\t});\n\n\t\t\t\tif (isDuplicate === false) {\n\t\t\t\t\tjoinedResults.push(post);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treq.results = joinedResults;\n\n\t\tnext();\n\t}", "function displayTopPosters(posts) {\n return Object.entries(posts)\n .sort((a, b) => b[1].count - a[1].count)\n .map(([key, val], i) => (\n <ListItem key={i}>\n <ListItemAvatar>\n <Avatar src={val.avatar} />\n </ListItemAvatar>\n <ListItemText\n primary={\n <>\n <Typography variant=\"caption\" display=\"block\">\n {key}\n </Typography>\n </>\n }\n secondary={\n <>\n <Typography variant=\"caption\" display=\"block\">\n {formatCount(val.count)}\n </Typography>\n </>\n }\n />\n </ListItem>\n ))\n .slice(0, 5);\n }", "aggregateTopics(posts) {\n posts = posts.map(p => {\n if (!p.topics) {\n p.topics = []\n } //hotfix\n return p.topics.concat(p.platform)\n }) // map to topics + platform\n posts = posts.reduce((acc, val) => acc.concat(val), []) // flatten everything\n const counts = posts.reduce((acc, topic) => {\n acc[topic] = (acc[topic] || 0) + 1\n return acc\n }, {})\n const topics = Object.entries(counts).map(([topic, count], y) => {\n return {\n topic,\n count,\n id: Math.random()\n }\n })\n topics.sort(function(a, b) {\n return b.count - a.count\n })\n return topics\n }", "renderPostBody () {\n let max\n for (let i = 0; i < this.state.post.length; i++) {\n for (let j = i; j < this.state.post.length; j++) {\n if (this.state.post[i].counter < this.state.post[j].counter) {\n this.state.post[j] = this.state.post[i]\n this.state.post[i] = max\n }\n }\n }\n this.setState({post:this.state.post});\n}", "function appendPosts(posts) {\n posts.forEach((post) => appendPost(post));\n}", "function parseEventPage($) {\n $(\"div[class='col50 m-cola']\").each(function(element, index, callback) {\n let el = $(this); \n let allPosts = el[0].children;\n \n for (var i = 0, len = allPosts.length; i < len; i++) {\n let post = allPosts[i];\n try {\n if(i % 2 == 1) {\n parseEventPost(post);\n }\n } catch (error) {\n logger.error('Couldnt parse post: ' + i);\n }\n }\n });\n showEventInfo(posts);\n }", "function displayPosts(posts) {\n console.log(posts)\n $.each( posts, function( key, value ) {\n post = value;\n if (key <= 6) {\n document.getElementById('posts-container').innerHTML += '<a class=\"post\" target=\"_blank\" href=\"' + post.full_url + '\">'+\n '<div style=\"background-image:url(' + post.image + ')\"><h2>Member: </h2><h3>' + post.poster_name + \"</h3>\" +\n '</div></a>';\n }\n });\n }", "function combineTwoConsecutive (post, i, word_1, word_2) {\n\t\tif (post[i] === word_1 && post[i+1].includes(word_2)) {\n\t\t\tpost[i] += \" \" + post[i+1];\n\t\t\tpost.splice(i+1, 1); // remove following index\n\t\t}\n\t\treturn post;\n\t}", "async function addRecentPosts() {\n const posts = await fetchPosts();\n const recentPosts = posts.slice(-3);\n\n recentPosts.forEach((post) => {\n const postCard = createPostCard(post);\n postSection.appendChild(postCard);\n });\n}", "async routes () {\n let { data } = await axios.post(process.env.POSTS_URL,\n JSON.stringify({\n filter: { published: true },\n sort: {_created:-1},\n populate: 1\n }),\n {\n headers: { 'Content-Type': 'application/json' }\n })\n\n const collection = collect(data.entries)\n\n let tags = collection.map(post => post.tags)\n .flatten()\n .unique()\n .map(tag => `category/${tag}`)\n .all()\n\n let posts = collection.map(post => post.title_slug).all()\n\n if(perPage < data.total) {\n let pages = collection\n .take(perPage-data.total)\n .chunk(perPage)\n .map((items, key) => `blog/${key+2}`)\n .all()\n\n return posts.concat(tags,pages)\n }\n\n return posts.concat(tags)\n }", "createPosts (callback) {\n\t\t// since we now can only create posts in the team stream, do it there\n\t\tthis.expectedStreams = [this.teamStream];\n\t\tthis.createPostInStream(this.teamStream, callback);\n\t\t/*\n\t\t// we'll select a subset of the stream we created, then create posts there ... \n\t\t// we then expect only those streams\n\t\tconst myStreams = this.streamsByTeam[this.team.id].filter(stream => {\n\t\t\treturn stream.memberIds.includes(this.currentUser.user.id);\n\t\t});\n\t\tthis.expectedStreams = myStreams.slice(1, 3);\n\t\tBoundAsync.forEach(\n\t\t\tthis,\n\t\t\tthis.expectedStreams,\n\t\t\tthis.createPostInStream,\n\t\t\tcallback\n\t\t);\n\t\t*/\n\t}", "function getPosts(posts) {\n var i = 0;\n var totalPost = parseInt($(`#total_posts`).val());\n if (totalPost > 0) {\n while (i < totalPost) {\n posts.push($(`#post_${i}`).attr(\"location\"));\n i++;\n }\n }\n }", "function genFeed(feedSocial, containerPostList){\n for(let i = 0; i < feedSocial.length; i++){\n const socialFeed = feedSocial[i];\n containerPostList.innerHTML += `\n <div class=\"post\">\n <div class=\"post__header\">\n <div class=\"post-meta\"> \n <div class=\"post-meta__icon\">\n <img class=\"profile-pic\" src=\"${socialFeed.profilePic}\" alt=\"${socialFeed.nameAuthor}\"> \n </div>\n <div class=\"post-meta__data\">\n <div class=\"post-meta__author\">${socialFeed.nameAuthor}</div>\n <div class=\"post-meta__time\">${socialFeed.date}</div>\n </div> \n </div>\n </div>\n <div class=\"post__text\">${socialFeed.textPost}</div>\n <div class=\"post__image\">\n <img src=\"${socialFeed.image}\" alt=\"\">\n </div>\n <div class=\"post__footer\">\n <div class=\"likes js-likes\">\n <div class=\"likes__cta\">\n <a class=\"like-button js-like-button\" href=\"#\" data-postid=\"1\">\n <i class=\"like-button__icon fas fa-thumbs-up\" aria-hidden=\"true\"></i>\n <span class=\"like-button__label\">Mi Piace</span>\n </a>\n </div>\n <div class=\"likes__counter\">\n Piace a <b id=\"like-counter-1\" class=\"js-likes-counter\">${socialFeed.likes}</b> persone\n </div>\n </div> \n </div> \n </div>`\n };\n\n}", "async function getAllPosts(req, res) {\n // Post.find().sort({ createdAt: -1 }).then(posts => res.json(posts))\n Post.find().sort({ createdAt: -1 }).limit(6).then(posts => res.json(posts))\n}", "function regenratePosts(){\n generate();\n }", "function buildPosts (all_posts, start, finish) {\n var the_start = start, the_finish = finish;\n if (the_finish > all_posts.length) the_finish = all_posts.length;\n var main = $('#main');\n for (var i = the_start; i < the_finish; i++) {\n post_obj = buildPostHTML(all_posts[i]); // build html object from post\n main.append(post_obj); // add post to Main Content\n }// for each item in array\n if (all_posts.length == the_finish) {\n main.animate({'padding-bottom':'0'});\n $('#load_more').remove();\n }\n}", "createLastPosts (callback) {\n\t\tthis.lastPosts = [];\t// lastPosts will be the posts that will go unread\n\t\tthis.currentPosts = this.lastPosts;\t// currentPosts will be the array we add the posts to\n\t\tBoundAsync.timesSeries(\n\t\t\tthis,\n\t\t\t2,\n\t\t\tthis.createPost,\n\t\t\tcallback\n\t\t);\n\t}", "function getPriceGroups(){\n\tlet result = _.groupBy(pizzaToppingPrices, (item) => {\n\t\t//this will return based on item passes in and value\n return Math.floor(item.price / 1.0) \n })\n\treturn result;\n}", "function show_post_by_page(page, data){\n $.each(data, function(index, item){\n if (index >= page*4-4 && index < page*4){\n var href = item['link'];\n var title = item['title'];\n var content = item['content'];\n var describe = content.replace(/(<([^>]+)>)/ig,\"\").slice(0,121) + '...';\n var tags = item['categories'];\n //console.log(tags);\n $(\"#news\").append(construct_html(href, title, describe, tags))\n }\n })\n }", "function fetchPosts() {\n getPosts().then((res) => setResult(res.reverse()))\n }", "function makeSectionPosts(posts) {\n const sectionPosts = document.getElementById('posts');\n const postsOfArray = [...posts];\n if (sectionPosts) {\n const sectionPostsPosts = sectionPosts.getElementsByClassName('posts')[0];\n sectionPostsPosts.innerHTML = '';\n\n postsOfArray.forEach((postJson) => {\n const post = returnNeededTypePost(postJson);\n post.renderBlogPost(sectionPostsPosts);\n });\n } else {\n const fragmentPosts = document.createDocumentFragment();\n const sectionPosts = document.createElement('section');\n fragmentPosts.append(sectionPosts);\n sectionPosts.id = 'posts';\n\n const containerPosts = makeElement('div', 'container');\n sectionPosts.append(containerPosts);\n\n const rowPosts = makeElement('div', 'row');\n containerPosts.insertAdjacentElement('afterbegin', rowPosts);\n\n const sectionPostsPosts = makeElement('div', 'posts');\n rowPosts.append(sectionPostsPosts);\n if (posts.length) { // check if there is any post\n postsOfArray.forEach((postJson) => {\n const post = returnNeededTypePost(postJson);\n post.renderBlogPost(sectionPostsPosts);\n });\n // listen to delete post\n sectionPosts.addEventListener('noPostLeft', () => makeNoPostBlock(sectionPostsPosts));\n } else {\n makeNoPostBlock(sectionPostsPosts);\n }\n\n const wrapper = document.getElementsByClassName('wrapper')[0];\n fragmentPosts.append(sectionPosts);\n wrapper.append(fragmentPosts);\n }\n}", "function finish() {\n\t\t\tpostsLeft -= 1;\n\t\t\tif(postsLeft < 1) {\n\t\t\t\tres.json(filteredPosts);\n\t\t\t}\n\t\t}", "formatPost(mod, eq) {\n const results = this.props.search;\n\n // Place a message in the center column if there are no results\n if (!results || results.length === 0) {\n if (eq === 1) {\n return (\n <div className=\"has-text-centered title\">\n Sorry, we couldn't find any matches! :(\n </div>\n );\n }\n return (\n <div />\n );\n }\n\n // Return a HTML body with formated posts\n return (\n <React.Fragment>\n {results.filter((_, index) => (index % mod) === eq).map(item => (\n item.googleId ?\n <UserCard\n key={item._id}\n user={{\n id: item._id,\n profile_pic: item.profile_pic,\n name: item.name,\n isAdmin: item.isAdmin,\n isProfessor: item.isProfessor,\n bio: item.bio,\n cruzid: item.cruzid,\n }}\n />\n : <PostCard\n key={item._id}\n post={{\n id: item._id,\n type: item.department.type,\n name: item.title,\n professor: item.owner.name,\n tags: item.tags,\n summary: item.summary,\n department: item.department.name,\n ownerProfile: `/profile/${item.owner.cruzid}`,\n date: new Date(item.deadline),\n }}\n />\n ))}\n </React.Fragment>\n );\n }", "groupItems(every, context, options) {\n var out = \"\", subcontext = [], i;\n if (context && context.length > 0) {\n for (i = 0; i < context.length; i++) {\n if (i > 0 && i % every === 0) {\n out += options.fn(subcontext);\n subcontext = [];\n }\n subcontext.push(context[i]);\n }\n out += options.fn(subcontext);\n }\n return out;\n}", "function makeGetPostsInChannel() {\n return reselect_1.createSelector(getAllPosts, getPostsInThread, function (state, channelId) { return getPostIdsInChannel(state, channelId); }, common_1.getCurrentUser, preferences_1.getMyPreferences, function (state, channelId, numPosts) { return numPosts || constants_1.Posts.POST_CHUNK_SIZE; }, function (allPosts, postsInThread, allPostIds, currentUser, myPreferences, numPosts) {\n if (!allPostIds) {\n return null;\n }\n var posts = [];\n var joinLeavePref = myPreferences[preference_utils_1.getPreferenceKey(constants_1.Preferences.CATEGORY_ADVANCED_SETTINGS, constants_1.Preferences.ADVANCED_FILTER_JOIN_LEAVE)];\n var showJoinLeave = joinLeavePref ? joinLeavePref.value !== 'false' : true;\n var postIds = numPosts === -1 ? allPostIds : allPostIds.slice(0, numPosts);\n for (var i = 0; i < postIds.length; i++) {\n var post = allPosts[postIds[i]];\n if (post_utils_1.shouldFilterJoinLeavePost(post, showJoinLeave, currentUser ? currentUser.username : '')) {\n continue;\n }\n var previousPost = allPosts[postIds[i + 1]] || null;\n posts.push(formatPostInChannel(post, previousPost, i, allPosts, postsInThread, postIds, currentUser, ''));\n }\n return posts;\n });\n}", "function getTopPosts(arrayofposts){\n\n temp_struct = []\n url_struct = []\n var i = 0, z = 0\n while(arrayofposts[i]){\n if(arrayofposts[i]['page'] == '1'){\n temp_struct[z] = arrayofposts[i]['title']\n url_struct[z] = arrayofposts[i]['url']\n z++\n }\n i++\n }\n return [temp_struct, url_struct]\n}", "function getPostsByUser(uid, cb, count) {\n if (!count) {\n count = 50;\n }\n get_even({\n filter: \"user\",\n count: count,\n filter_data: uid,\n from: selfId,\n original: selfId,\n posts: {}\n }, function(posts) {\n cb(posts);\n });\n}", "async getPosts() {\n this.loading = false;\n const posts = [];\n const counter = await contract.methods.getCounter().call({\n from: this.currentAccount,\n });\n\n if (counter !== null) {\n const hashes = [];\n const captions = [];\n for (let i = counter; i >= 1; i -= 1) {\n hashes.push(contract.methods.getHash(i).call({\n from: this.currentAccount,\n }));\n }\n\n const postHashes = await Promise.all(hashes);\n\n for (let i = 0; i < postHashes.length; i += 1) {\n captions.push(fetch(`https://gateway.ipfs.io/ipfs/${postHashes[i].text}`)\n .then(res => res.text()));\n }\n\n const postCaptions = await Promise.all(captions);\n\n for (let i = 0; i < postHashes.length; i += 1) {\n posts.push({\n id: i,\n key: `key${i}`,\n caption: postCaptions[i],\n src: `https://gateway.ipfs.io/ipfs/${postHashes[i].img}`,\n });\n }\n\n this.currentPosts = posts;\n this.loading = false;\n }\n }", "getPosts3() {\n if (this.page == 1) {\n this.loading.show();\n this.loadingServerDataPosts = false;\n }\n this.config.getWithUrl(this.config.url + '/wp-json/wp/v2/posts/?page=' + this.page + \"&\" + this.config.productsArguments).then((data) => {\n this.infinite.complete(); //stopping infinite scroll loader\n if (this.page == 1) {\n this.posts = [];\n this.infinite.disabled = false;\n this.loading.hide();\n this.getCategories11();\n }\n this.page++;\n data.forEach((value, index) => {\n this.getImagePost(value);\n this.posts.push(value);\n });\n if (data.length < 9) { // if we get less than 10 products then infinite scroll will de disabled\n this.infinite.disabled = true; //disabling infinite scroll\n if (this.posts.length != 0) {\n //this.shared.toast(\"All Posts Loaded!\");\n }\n }\n this.loadingServerDataPosts = true;\n }, err => {\n this.infinite.disabled = true;\n // console.log(\"Error while loading posts from the server\");\n // console.log(response);\n });\n }", "function createPosts(post){\r\n setTimeout( () => {\r\n posts.push(post);\r\n }, 2000);\r\n}", "generatePosts(){\n const feedPosts = [];\n\n for(var i = 0; i < this.state.posts.length; i++) {\n feedPosts.push(\n <Post userName={this.state.posts[i].userName} postText={this.state.posts[i].postText} />\n );\n }\n\n return(\n feedPosts\n );\n }", "function prepareMostPopularForResponse() {\n var numArticlesMax = 15;\n var numArticlesByDayMax = 3;\n var numArticles = 0;\n var result = {};\n\n for(article in mostPopular) {\n var date = mostPopular[article]['published_date'];\n var articleObject = createMostPopularArticle(article, date);\n result[date] = result[date] || { 'source': 'nyt', 'children': [] };\n\n if(result[date]['children'].length < numArticlesByDayMax) {\n result[date]['children'].push(articleObject);\n numArticles++;\n }\n\n if(numArticles === numArticlesMax) break;\n }\n return result; \n}", "function get_posts(){\r\n\treturn app.getHits('Post', {published:true}, {sort:{'date':'desc'}});\r\n}", "function randomposts(json){\r\nvar total = parseInt(json.feed.openSearch$totalResults.$t,10);\r\nfor(i=0; i < numofpost;){\r\nflag=0;\r\nrandarray.length=numofpost;\r\nl=Math.floor(Math.random()*total);\r\nfor(j in randarray){\r\nif(l==randarray[j]){\r\nflag=1;\r\n}\r\n}\r\nif(flag==0&&l!=0){\r\nrandarray[i++]=l;\r\n}\r\n}\r\ndocument.write('<div>');\r\nfor(n in randarray){\r\nvar p=randarray[n];\r\nvar entry=json.feed.entry[p-1];\r\nvar item =\"\";\r\nvar posttitle = entry.title.$t || \"[Untitled]\";\r\n\"[Untitled]\"\r\nfor(k=entry.link.length -1; k >= 0 ; k--){\r\nif(entry.link[k].rel=='alternate'){\r\nitem +=\"<a class='rp-post-link' href='\" + entry.link[k].href + \"'>\" + posttitle + \"</a>\";\r\nbreak;\r\n}\r\n}\r\nitem += \"<br\"\r\nitem += \"/>\"\r\n\r\nif('media$thumbnail' in entry)item += \"<img class='rp-thumbnail' src='\" + entry.media$thumbnail.url + \"'>\"\r\nvar summary = \"\";\r\nif (\"content\" in entry) {\r\nsummary = entry.content.$t;\r\n}\r\nelse if (\"summary\" in entry) {\r\nsummary = entry.summary.$t;\r\n}\r\nvar re = /<\\S[^>]*>/g;\r\nsummary = summary.replace(re, \"\"); item += \"<p class='rp-summary'>\" + summary.substring(0,lengthsummary) + \" ...</p>\";\r\ndocument.write(item);\r\n}\r\ndocument.write('</div>');\r\n}", "function makeGetPostsForThread()\n/*: (GlobalState, {rootId: $ID<Post>}) => Array<Post>*/\n{\n return (0, _reselect.createSelector)(getAllPosts, function (state\n /*: GlobalState*/\n , _ref) {\n var rootId = _ref.rootId;\n return state.entities.posts.postsInThread[rootId] || [];\n }, function (state\n /*: GlobalState*/\n , _ref2) {\n var rootId = _ref2.rootId;\n return state.entities.posts.posts[rootId];\n }, function (posts, postsForThread, rootPost) {\n var thread = [];\n\n if (rootPost) {\n thread.push(rootPost);\n }\n\n postsForThread.forEach(function (id) {\n var post = posts[id];\n\n if (post) {\n thread.push(post);\n }\n });\n thread.sort(_post_utils.comparePosts);\n return thread;\n });\n}", "function everyOtherItem(items) {\n const result = []\n for (const i in items) {\n if (i % 2 == 0) {\n result.push(items[i]);\n } //end if\n } // end for\n return result;\n} //end function", "function getPosts() {\n $.get('/api/posts/', function (data) {\n var postsToAdd = [];\n for (var i = 0; i < data.length; i++) {\n\n newPost = data[i];\n\n postsToAdd.push(createPostDiv(newPost));\n renderPost(postsToAdd);\n }\n });\n }", "function everyOtherItem(items) {\n\nlet result = []; \n\n for(let i in items){\n if(i % 2 === 0){\n result.push(items[i]); \n }\n }\n console.log(result)\n}", "function postHandler(post){\n\tvar likes = 0;\n\tvar comments = 0;\n\ttry {\n\t\tlikes = post.likes.summary.total_count;\n\t} catch (err) {\n\t\tlikes = 0;\n\t}\n\n\ttry {\n\t\tcomments = post.comments.summary.total_count;\n\t} catch (err) {\n\t\tcomments = 0;\n\t}\n\t//console.log(likes);\n\ttotal_likes_count = total_likes_count + likes;\n\ttotal_comments_count = total_comments_count + comments;\n\n\n\ttotal_posts_count = total_posts_count + 1;\n\n\tif(total_posts_count == actual_posts_get_count){\n\t\tresultComputation(total_likes_count, total_comments_count, total_posts_count);\n\t}\n}", "function getPosts() {\n setTimeout(() => {\n let output = '';\n posts.forEach((post, index) => {\n output += `<li> ${post.title}</li>`;\n });\n contentTag = document.querySelector('.content');\n contentTag.innerHTML = output;\n }, 1000);\n}", "function groupPages(){\n\t\t\tvar pageSet = $scope.pages\n\t\t\t, activePg = $scope.activePage\n\t\t\t, newSet = [];\n\t\t\t\n\t\t\t// Checks if the number of pages is more than set limit (5)\n\t\t\t// If true, the following will be executed.\n\t\t\t// The newSet array length should be equal to the set limit (5) value\n\t\t\tif($scope.numOfPages >= $scope.setLimit){\n\t\t\t\tif(activePg === 1){\n\t\t\t\t\tnewSet = [activePg, activePg1, activePg2, activePg3, activePg4];\n\t\t\t\t\t$scope.pages = newSet;\n\t\t\t\t}else if(activePg >= 3 && activePg < $scope.numOfPages-1){\n\t\t\t\t\tnewSet = [activePg-2, activePg-1, activePg, activePg1, activePg2];\n\t\t\t\t\t$scope.pages = newSet;\n\t\t\t\t}else if(activePg === $scope.numOfPages){\n\t\t\t\t\tnewSet = [activePg-4, activePg-3, activePg-2, activePg-1, activePg];\n\t\t\t\t\t$scope.pages = newSet;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}", "function getPosts(subreddit, processFunction){\n\n let done = 0;\n while(done <= pageLimit){\n\n }\n parser.parseURL(`https://www.reddit.com/r/${subreddit}/.rss?count=25&after=t3_87u4di`, (err, feed) => {\n if(err){\n throw err;\n }\n\n feed.items.forEach(item => {\n // TODO Massage the thing a bit so that we just have markdown in the content\n processFunction(item);\n });\n });\n}", "function getPosts(){\r\n setTimeout( () => {\r\n let output = '';\r\n posts.forEach( (post, index) => {\r\n output += `<li> ${post.title} </li>`;\r\n });\r\n document.querySelector('div').innerHTML = output;\r\n }, 1000 );\r\n}", "function getPosts(){\r\n setTimeout( () => {\r\n let output = '';\r\n posts.forEach( (post, index) => {\r\n output += `<li> ${post.title} </li>`;\r\n });\r\n document.querySelector('div').innerHTML = output;\r\n }, 1000 );\r\n}", "function makeGetPostsForThread() {\n return reselect_1.createSelector(getAllPosts, function (state, _a) {\n var rootId = _a.rootId;\n return state.entities.posts.postsInThread[rootId] || [];\n }, function (state, _a) {\n var rootId = _a.rootId;\n return state.entities.posts.posts[rootId];\n }, function (posts, postsForThread, rootPost) {\n var thread = [];\n if (rootPost) {\n thread.push(rootPost);\n }\n postsForThread.forEach(function (id) {\n var post = posts[id];\n if (post) {\n thread.push(post);\n }\n });\n thread.sort(post_utils_1.comparePosts);\n return thread;\n });\n}", "function collectPosts(){\n\tvar result = [];\n\tvar content = document.getElementsByClassName('post');\n\tfor(i =0; i < content.length; i++){ \n\t\tresult.push(content[i]);\n\t}\n\treturn result;\n}", "function logPostsExample2(posts) {\n for (var post of posts) {\n console.log(post.title);\n console.log(post.content);\n }\n}", "renderPendingPosts() {\n var email = Meteor.user().emails[0].address.toString();\n let postsToDisplay = Posts.find({ type: 'CrewRequest', requestor: email, username: null });\n var today = new Date();\n return postsToDisplay.map((post) => {\n var dayMonthYear = post.date.split('/');\n var postDate = new Date(dayMonthYear[2], dayMonthYear[0] - 1, dayMonthYear[1]);\n postDate.setDate(postDate.getDate() + 1);\n //Check if the event is in the past\n if(postDate.getTime() >= today.getTime())\n return (\n <Post key={post._id} post={post} role={Profiles.findOne({ accountId: Meteor.user()._id }).member} />\n )\n });\n }", "groupByDate(xs) {\n return xs.reduce(function(groups, item) {\n const val = moment(item.scannedDate).format(\"YYYY-MM-DD\");\n groups[val] = groups[val] || [];\n groups[val].push(item);\n return groups;\n }, {});\n }", "async function _findPosts (filter) {\n const posts = await model.findAll({\n where: filter\n })\n const result = []\n for (const post of posts) {\n const author = await model._models.User.findById(post.authorId)\n const replies = await model.count({ where: { parentId: { [Op.eq]: post.id } } })\n result.push({ author: author, date: post.createdOn, text: post.content, replyCount: replies, id: post.id })\n }\n return result\n}", "function renderPosts(posts) {\n //delete\n \n let divchild = document.createElement(\"div\");\n let article = document.createElement(\"p\");\n let title = document.createElement(\"h2\");\n \n divchild.setAttribute(\"class\", \"post\");\n\n title.appendChild(document.createTextNode(posts[0].title));\n \n article.appendChild(document.createTextNode(posts[0].body))\n \n divchild.appendChild(title)\n divchild.appendChild(article)\n \n divContenedorPost.appendChild(divchild);\n\n \n}", "function get_posts(time_itr) {\n\n document.getElementById('load_more_btn').classList.add('hidden') // Hide load more button untill we get posts;check if we have more posts\n //In Db,if so then only display the button\n\n var max_itr = 3 // How many times should we call this function again, ie. no of recucurtions\n if (time_itr == max_itr) {\n document.getElementById('load_more_btn').classList.remove('hidden') //Diaply -- If we are here that means that we have\n //More Posts,since if we had'nt ,function would have been terminated \n /**\n * The load more button can be replaced with scrol / i mean if user scrools after the last post -- at a point of time -- /n\n * then call the funtion and load a ton more posts\n */\n return\n }\n\n var url = '../profile/api/get/data/posts/'\n //Before the fetch , if possible, add a loading animination so that user knows posts are loading\n fetch(url, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRFToken': csrftoken,\n },\n body: JSON.stringify({ 'user': user, 'total_recived': total_posts_recived, 'posts_per_call': posts_per_call })\n }).then((response) => {\n return response.json()\n })\n .then((data) => {\n\n var last = data['others']['last']\n var posts = data['posts']\n\n var has = true\n if (posts == null) {\n //user has no posts\n var has = false\n }\n\n if (has) {\n total_posts_recived += data['total_recived'] //Change one to No of posts we recive / // Increment the variable so as to keep record of total posts recived\n //Hide the animination, if added\n for (i in posts) {\n\n var item = ('<div style=\"max-width:33%;\" data-loc=\"' + posts[i][0] + '\"' + 'class=\"post p-1\"><img style=\"width:100%; height:100%; margin-right:auto; margin-left:auto\" src=' + posts[i][1] + '></div>')\n document.getElementById('postss').innerHTML += item\n\n }\n if (last) {\n document.getElementById('load_more_btn').classList.add('hidden')\n //No more posts now can display the footer -- which we dont have ,lol\n\n } else {\n //Recurtion\n get_posts(time_itr + 1)\n }\n }\n\n })\n}", "function showLimitedPosts(response){\n\n /* html to format the posts displayed*/\n var startFormatContent = \"<div class='row' id='feed'><div class='col-md-3 col-xs-12'></div><div class='col-md-8 col-xs-12' id='post'>\";\n var endFormatContent = \"<hr></div></div>\";\n\n var content = \"\"; // empty string to store the whole div before adding it to html\n response.map(function(eachPost){\n content = \"\";\n var userId = eachPost.from.id; //saving userid for accessing their profile picture\n pictureUrl = \"https://graph.facebook.com/\"+ userId + \"/picture?type=large\"; //saving url of profile picture of user\n switch (eachPost.type) { // for checking which type of post user posted\n case \"status\":\n content += startFormatContent;\n content += \"<img class='feed-img' id='feed-img-id' src='\" + pictureUrl + \"' alt='pic'>\";\n content += \"<p class='feed-img'> \" + eachPost.from.name + \"</p>\";\n content += \"<p class='feed-img time'>\" + dateFormat(eachPost.created_time) + \"</p>\";\n content += \"<p class='format-msg'>\" + checkMessage(eachPost.message) + \"</p>\";\n content += \"<p class='feed-img'> \" + checkMessage(eachPost.story) + \"</p>\";\n content += endFormatContent;\n $(\"div#myfeed\").append(content);\n break;\n\n case \"photo\":\n content += startFormatContent;\n content += \"<img class='feed-img' id='feed-img-id' src='\" + pictureUrl + \"' alt='pic'>\";\n content += \"<p class='feed-img'> \" + eachPost.from.name + \"</p>\";\n content += \"<p class='feed-img time'>\" + dateFormat(eachPost.created_time) + \"</p>\";\n content += \"<p class='format-msg'>\" + checkMessage(eachPost.message) + \"</p>\";\n content += \"<img src='\" + eachPost.picture + \"' class='post-img' alt='post pic'>\";\n content += endFormatContent;\n $(\"div#myfeed\").append(content);\n break;\n\n case \"video\":\n content += startFormatContent;\n content += \"<img class='feed-img' id='feed-img-id' src='\" + pictureUrl + \"' alt='pic'>\";\n content += \"<p class='feed-img'> \" + eachPost.from.name + \"</p>\";\n content += \"<p class='feed-img time'>\" + dateFormat(eachPost.created_time) + \"</p>\";\n content += \"<p class='format-msg'>\" + checkMessage(eachPost.message) + \"</p>\";\n content += \"<video width='240' height='180' controls><source src='\" + eachPost.source +\"' type='video/mp4'></video>\";\n content += endFormatContent;\n $(\"div#myfeed\").append(content);\n break;\n\n case \"link\":\n content += startFormatContent;\n content += \"<img class='feed-img' id='feed-img-id' src='\" + pictureUrl + \"' alt='pic'>\";\n content += \"<p class='feed-img'> \" + eachPost.from.name + \"</p>\";\n content += \"<p class='feed-img time'>\" + dateFormat(eachPost.created_time) + \"</p>\";\n content += \"<p class='format-msg'>\" + checkMessage(eachPost.message) + \"</p>\";\n content += \"<a href='\" + eachPost.link + \"'class='format-msg' style='text-decoration: underline' \\\n target='_blank'><b>\" + checkMessage(eachPost.name) + \"</b></a>\";\n content += \"<p class='format-msg'>\" + checkMessage(eachPost.description) + \"</p>\";\n content += endFormatContent;\n $(\"div#myfeed\").append(content);\n break;\n\n default:\n break;\n }\n\n });\n\n /*to style and append load more button*/\n content = \"\";\n content += \"<div class='row' id='feed'><div class='col-md-3 col-xs-12'></div><div class='col-md-8 col-xs-12' id='post'\\\n style='background-color: transparent; box-shadow: none'>\";\n content += \"<button class='btn btn-primary btn-center'>Load More</button>\";\n content += endFormatContent;\n $(\"div#myfeed\").append(content);\n\n }", "static async getAll() {\n let page = 1;\n let shouldQueryMorePosts = true;\n const returnPosts = [];\n\n while (shouldQueryMorePosts) {\n const response = await this.getPaginated(page);\n\n if (response.posts.length > 0) {\n returnPosts.push(...response.posts);\n }\n\n shouldQueryMorePosts = returnPosts.length < response.total;\n page++;\n }\n\n return returnPosts;\n }", "function makeFilterPostsAndAddSeparators() {\n var getPostsForIds = posts_1.makeGetPostsForIds();\n return helpers_1.createIdsSelector(function (state, _a) {\n var postIds = _a.postIds;\n return getPostsForIds(state, postIds);\n }, function (state, _a) {\n var lastViewedAt = _a.lastViewedAt;\n return lastViewedAt;\n }, function (state, _a) {\n var indicateNewMessages = _a.indicateNewMessages;\n return indicateNewMessages;\n }, function (state) { return state.entities.posts.selectedPostId; }, users_1.getCurrentUser, shouldShowJoinLeaveMessages, timezone_1.isTimezoneEnabled, function (posts, lastViewedAt, indicateNewMessages, selectedPostId, currentUser, showJoinLeave, timeZoneEnabled) {\n if (posts.length === 0 || !currentUser) {\n return [];\n }\n var out = [];\n var lastDate;\n var addedNewMessagesIndicator = false;\n // Iterating through the posts from oldest to newest\n for (var i = posts.length - 1; i >= 0; i--) {\n var post = posts[i];\n if (!post ||\n (post.type === constants_1.Posts.POST_TYPES.EPHEMERAL_ADD_TO_CHANNEL && !selectedPostId)) {\n continue;\n }\n // Filter out join/leave messages if necessary\n if (post_utils_1.shouldFilterJoinLeavePost(post, showJoinLeave, currentUser.username)) {\n continue;\n }\n // Push on a date header if the last post was on a different day than the current one\n var postDate = new Date(post.create_at);\n if (timeZoneEnabled) {\n var currentOffset = postDate.getTimezoneOffset() * 60 * 1000;\n var timezone = timezone_utils_1.getUserCurrentTimezone(currentUser.timezone);\n if (timezone) {\n var zone = moment_timezone_1.default.tz.zone(timezone);\n if (zone) {\n var timezoneOffset = zone.utcOffset(post.create_at) * 60 * 1000;\n postDate.setTime(post.create_at + (currentOffset - timezoneOffset));\n }\n }\n }\n postDate.setHours(0, 0, 0, 0);\n if (!lastDate || lastDate.toDateString() !== postDate.toDateString()) {\n out.push(exports.DATE_LINE + postDate.getTime());\n lastDate = postDate;\n }\n if (lastViewedAt &&\n post.create_at > lastViewedAt &&\n post.user_id !== currentUser.id &&\n !addedNewMessagesIndicator &&\n indicateNewMessages) {\n out.push(exports.START_OF_NEW_MESSAGES);\n addedNewMessagesIndicator = true;\n }\n out.push(post.id);\n }\n // Flip it back to newest to oldest\n return out.reverse();\n });\n}", "function grabFeedPosts()\n\t{\n\t\t$.ajax(`/poem/fetchmore/4?page=${$page}`, {\n\t\t\t\ttype:'GET',\n\t\t\terror:function(data) {\n\t\t\t\tconsole.log(data.responseText);\n\t\t\t},\n\t\t\tsuccess:function(data) {\n\t\t\t\t$poemscontainer.append(data);\n\n\t\t\t\tif($spanmore.text().trim() == $('.poem').length)\n\t\t\t\t{\n\t\t\t\t\t$loaderbody.remove();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$loaderbody.hide();\n\t\t\t\t}\n\n\t\t\t\t$page++;\n\t\t\t}\n\t\t})\n\t}", "function GroupHotels(hotellist) {\n data = []\n\n var targethotel = null\n\n // Loop as long as we still have hotels left to group\n while (hotellist.length > 0) {\n // Create empty group list and set the targethotel to the\n // first entry in the list\n currentHotelList = []\n targethotel = hotellist[0]\n\n // Add targethotel to the group\n currentHotelList.push(targethotel)\n for (var i = 0; i < hotellist.length; i++) {\n var hotel = hotellist[i]\n // Check if near, if it is, add it to the current group list, remove it\n // from the hotellist and decrease the iterator\n if (isNear(targethotel, hotel, 2)) {\n currentHotelList.push(hotel)\n hotellist.splice(i, 1)\n i--\n continue\n }\n }\n\n // Remove the currenthotel from the list\n hotellist.splice(0, 1)\n\n // Add group to data\n data.push(currentHotelList)\n }\n\n return data\n}", "function paginate_posts()\n{\n $('#thread>ul').each(function(index){\n if (index >= 5)\n {\n $(this).css('display', 'none')\n }\n })\n}", "function frontfeed(){\n const feed = frontapi.getFeed();\n feed\n .then(posts => {\n posts.reduce((parent, post) => {\n parent.appendChild(createPostTile(post));\n return parent;\n }, document.getElementById('large-feed'))\n }); \n}", "function getPosts() {\n setTimeout(() => {\n let output = \"\";\n posts.forEach((e, i) => {\n output += `<li>${e.title}</li>`;\n });\n document.body.innerHTML = output;\n }, 1000);\n}", "function processTwitterData(data) {\n const result = data.sort((a, b) => {\n return (b.retweet_count - a.retweet_count);\n }).slice(0, 5);\n\n return result; // {data[index].retweet_count}, {.text}, {.user.screen_name}\n}", "function populate_posts(parsed_json)\n{\n let post_counter = 0;\n const REDDIT_HOST = 'https://www.reddit.com';\n\n $.each(parsed_json, function (jsonkey, jsonval) {\n let media_html = '';\n let epoch_date = parsed_json[jsonkey]['date_created'];\n let date_object = new Date(epoch_date*1000);\n let string_date = date_object.getMonth() + '/' + date_object.getDate() + '/' + date_object.getFullYear() + ' ' + date_object.getHours() + ':' + date_object.getMinutes();\n post_counter++;\n\n if (typeof parsed_json[jsonkey]['author']['media'] !== 'undefined' && typeof parsed_json[jsonkey]['author']['media']['url'] !== 'undefined')\n {\n media_html = '<img src=\"' + parsed_json[jsonkey]['author']['media']['url'] + '\">';\n }\n\n $('.post_score', $('#thread>ul:nth-child(' + post_counter + ')')).text(\n parsed_json[jsonkey]['score']\n );\n $('.post_title', $('#thread>ul:nth-child(' + post_counter + ')')).html(\n '<div><a href=\"#\" onclick=\"call_external_url(\\'' + REDDIT_HOST + parsed_json[jsonkey]['permalink'] + '\\')\" class=\"button large\" target=\"_blank\">' + parsed_json[jsonkey]['title'] + '</a></div>'\n );\n $('.post_details', $('#thread>ul:nth-child(' + post_counter + ')')).html(\n 'Posted on ' + string_date + ' by ' + parsed_json[jsonkey]['author'] + '<br>' + media_html\n );\n });\n\n return post_counter;\n}", "function retrieveDislikedPosts(){\n\n let disliked_posts = [];\n for(let i =0; i<disliked_posts_id.length; i++){\n let j=0;\n while (j < posts.length){\n if(disliked_posts_id[i] == posts[j].id){\n disliked_posts.push(posts[j]);\n break;\n } else {\n j++;\n }\n }\n }\n displayDisikedPosts(disliked_posts);\n\n}", "function getPosts(number, offset, user_id) {\n let query = \"select p.post_id, p.post_subject, p.post_content, p.date_created, u.user_id, u.user_avatar_path, pt.post_topic_text, count(pc.post_comment_id) as reply_count\"\n + \" from post p\"\n + \" join user_biography u on u.user_id = p.user_id\"\n + \" join post_topic pt on pt.post_topic_code = p.post_topic_code\"\n + \" left join post_comment pc on pc.post_id = p.post_id\";\n\n user_id > 0 ? query += \" where u.user_id = \" + user_id : ''\n\n query += \" group by p.post_id\" + \" order by date_created desc\";\n\n number > 0 && offset >= 0 ? query += \" limit \" + offset + \",\" + number : '';\n\n return db.query(query);\n}", "likePost(data) {\n let dataList = [];\n for (let item of this.state.pageData) {\n let post = item;\n if (item.id === data.id) {\n data.user_has_liked === true\n ? (post.user_has_liked = false)\n : (post.user_has_liked = true);\n post.user_has_liked === false\n ? (post.likes.count = post.likes.count - 1)\n : (post.likes.count = post.likes.count + 1);\n }\n dataList.push(post);\n }\n this.setState({ pageData: dataList });\n }", "function enhanceAllSgpPosts($stream) {\n $stream.children(_C_ITEM + '[id^=\"' + ID_SGP_POST_PREFIX + '\"]:not(.gpme-enh):not([gpme-nukeme])').each(function(i, item) {\n debug(\"enhanceAllSgpPosts #\" + i);\n i++;\n var $item = $(item);\n updateItem($item);\n\n // We have to show because we temporarily hid in onSgpItemInserted()\n $item.show();\n //console.debug(\"enhanceAllSgpPosts inserting id=\" + item.id, $item);\n\n // Cache the DOM for re-use\n if (settings.nav_compatSgpCache) {\n $item = $item.clone(true, true);\n $item.children('.gpme-post-wrapper').children(':not([class^=\"gpme-\"])').remove();\n $sgpCachedItems[item.id] = $item;\n }\n });\n}", "createUserFeed() {\n let user = this.getUser()\n let userPosts = this.posts.filter((item) => { return item.userId === parseInt(this.userId) })\n let userFollowing = this.posts.filter((item) => { return user.following.includes(item.userId) })\n let rawFeed = userPosts.concat(userFollowing)\n let feed = rawFeed.map((item) => {\n let user = this.users.find((user) => { return parseInt(user.id) === parseInt(item.userId) })\n let userData = {\n name: user.name,\n id: item.userId\n }\n item.user = userData\n delete item.userId\n return item\n })\n feed.sort((a, b) => { return new Date(a.date) - new Date(b.date) })\n return feed.reverse()\n }", "function recent_posts() {\r\n\treturn app.getObjects('Post', {published:true}, {sort:{'date':'desc'}, maxlength:5});\r\n}", "sortPosts() {\n const orderBy = this.state.postsOrder;\n this.props.posts.sort((post1, post2) => {\n switch (orderBy) {\n case 'timestamp' : return post1.timestamp - post2.timestamp;\n case 'voteScore' : return post2.voteScore - post1.voteScore;\n case 'category' : return post1.category.localeCompare(post2.category);\n default : return post2.voteScore - post1.voteScore;\n }\n });\n }", "async getListOfPosts(pages) {\n var classifiedPosts = [];\n for (var index in pages) {\n const browser = await this.puppeteer.launch({\n ...this.browserConfig,\n ...{ userDataDir: this.users[this.getRandomInt(this.users.length)] }\n });\n const page = await browser.newPage();\n await page.setRequestInterception(true);\n page.on('request', request => {\n if (['image', 'stylesheet', 'font'].indexOf(request.resourceType()) != -1) {\n request.abort();\n }\n else if (this.domainsToExlcude.includes(new URL(request.url()).host)) {\n console.log(\"Blocked: \" + request.url());\n request.abort();\n }\n else {\n request.continue();\n }\n\n });\n await page.goto(pages[index].url);\n var elements = await page.evaluate(() => {\n return Array.from(document.querySelectorAll(\".cf.item\")).map((elem) => {\n return {\n title: elem.querySelector(\".listing-item .item-title .results-listing-title span a\").innerHTML.trim(),\n link: elem.querySelector(\".listing-item .item-title .results-listing-title span a\").href,\n price: elem.querySelector(\".listing-item .item-title .price\").innerText.trim(),\n };\n });\n });\n await page.close();\n await browser.close();\n classifiedPosts = [...classifiedPosts, ...elements];\n }\n return classifiedPosts;\n }", "function fakeIt() {\n for (var i = 20; i < 1000; i++) {\n posts.push({\n _id: \"5b21ca3eeb7f6fbccd47w1820\",\n byUser: \"Jan\",\n content:\n \"Integer suscipit, est eleifend rhoncus hendrerit, nisl ligula commodo metus, non tristique eros orci non sapien. Aliquam elit arcu, imperdiet a lectus euismod, convallis placerat metus. Nullam tincidunt nec tortor sit amet aliquam. Sed et rutrum nulla. In vel imperdiet lectus, sed condimentum quam. Nunc commodo eleifend mauris a tincidunt. Aenean euismod mauris nec enim scelerisque viverra. In sagittis quis leo sodales molestie. Nulla ornare condimentum velit nec imperdiet. Nullam molestie, dui nec vehicula accumsan, ex nunc pretium augue, imperdiet consequat nibh ante nec odio. Mauris mi odio, fringilla non diam id, blandit placerat dolor. Suspendisse sed tempor mauris. Aliquam nec rutrum ante, non feugiat urna. Sed id suscipit ante, et hendrerit nunc. Mauris et arcu eu sem bibendum sagittis ac non nulla.\",\n date: \"21.10.2018\",\n profileImg: \"./img/profiles/profile.svg\"\n });\n }\n\n for (var k in posts) {\n posts[k]._id = k;\n }\n}", "async function getCuratedPhotos({ count, pageSize }) {\n const existingPhotoIds = await Post.findAll({ attributes: ['pexelsId'] });\n const photoIdSet = new Set(existingPhotoIds.map((p) => p.pexelsId));\n\n // We only need a fixed amount of random words so one API call is all that is required\n const randomWords = await axios.get(\n `https://random-word-api.herokuapp.com/word?swear=0&number=${count}`\n );\n\n // Helper function to capitalize the randomly generated titles\n const capitalize = (word) => word.charAt(0).toUpperCase() + word.slice(1);\n\n // Keep calling Pexels service til we have enough unique photo posts\n const posts = [];\n let page = 1;\n while (posts.length !== count) {\n const pexelResponse = await pexelsClient.photos.curated({\n per_page: Math.max(pageSize, count),\n page,\n });\n\n for (const photo of pexelResponse.photos) {\n if (posts.length === count) {\n break;\n }\n if (!photoIdSet.has(photo.id)) {\n posts.push({\n pexelsId: photo.id,\n title: capitalize(randomWords.data.pop()),\n createdAt: new Date().toISOString(),\n imageSrc: photo.src.large,\n });\n photoIdSet.add(photo.id);\n }\n }\n // If page has been exhausted, go to the next one\n page += 1;\n }\n\n return posts;\n}", "function nextValues() {\n if (nextBlogs.length > 0) {\n var countNum = currentBlogs.length;\n for (var i=0;i<countNum;i++) {\n prevBlogs.unshift(currentBlogs[currentBlogs.length - 1]);\n currentBlogs.pop();\n //if there is a blog we assume there is a title\n prevTitles.unshift(currentTitles[currentTitles.length - 1]);\n currentTitles.pop();\n }\n for (var i=0;i<4;i++) {\n if (nextBlogs.length > 0) {\n currentBlogs.push(nextBlogs[0]);\n nextBlogs.shift();\n \n currentTitles.push(nextTitles[0]);\n nextTitles.shift();\n } \n }\n writeValues(); \n }\n\n}", "function getPostsForSubreddit(subredditName) {\n //limits to top 50 post \n\tvar url = `https://www.reddit.com/r/${subredditName}.json?limit=50`;\n\treturn request(url)\n\t\t.then(response => {\n\t\t\tvar result = JSON.parse(response);\n\t\t\treturn result.data.children\n\t\t\t\t.filter(response => {\n\t\t\t\t //filter returns a new array, removing entries that return false\n\t\t\t\t //this filters all self-posts from the request result\n\t\t\t\t\tif(response.data.is_self === false) {\n\t\t\t\t\t\treturn response.data;\n\t\t\t\t\t}\n\t\t\t\t\treturn false; //return false other wise\n\t\t\t\t})\n\t\t\t\t//this maps a new array which contains only necessary information for data creation\n\t\t\t\t.map(response => {\n\t\t\t\t\tvar mapped = {\n\t\t\t\t\t\tuser : response.data.author,\n\t\t\t\t\t\ttitle: response.data.title,\n\t\t\t\t\t\turl: response.data.url\n\t\t\t\t\t};\n\t\t\t\t\treturn mapped; // returning title,url & user objects only\n\t\t\t\t}); \n\t\t});\n}", "function getFeeds() {\n // Create an object for each feed in the blogs array\n // Get the content for each feed in the blogs array\n // Return when all asynchronous operations are complete\n // Create an object for each feed in the blogs array\n blogs = [\n{\n key: \"Agile\",\n url: 'http://blog.jayway.com/category/agile/feed/atom',\n title: 'tbd', updated: 'tbd',\n backgroundImage: '/images/logo.png',\n acquireSyndication: acquireSyndication, dataPromise: null\n},\n{\n key: \"Android\",\n url: 'http://blog.jayway.com/category/android/feed/atom',\n title: 'tbd', updated: 'tbd',\n backgroundImage: '/images/logo.png',\n acquireSyndication: acquireSyndication, dataPromise: null\n},\n{\n key: \"Architecture\",\n url: 'http://blog.jayway.com/category/architecture/feed/atom',\n title: 'tbd', updated: 'tbd',\n backgroundImage: '/images/logo.png',\n acquireSyndication: acquireSyndication, dataPromise: null\n},\n{\n key: \"Cloud\",\n url: 'http://blog.jayway.com/category/cloud/feed/atom',\n title: 'tbd', updated: 'tbd',\n backgroundImage: '/images/logo.png',\n acquireSyndication: acquireSyndication, dataPromise: null\n},\n{\n key: \"Cocoa\",\n url: 'http://blog.jayway.com/category/cocoa/feed/atom',\n title: 'tbd', updated: 'tbd',\n backgroundImage: '/images/logo.png',\n acquireSyndication: acquireSyndication, dataPromise: null\n},\n{\n key: \"Embedded\",\n url: 'http://blog.jayway.com/category/embedded/feed/atom',\n title: 'tbd', updated: 'tbd',\n backgroundImage: '/images/logo.png',\n acquireSyndication: acquireSyndication, dataPromise: null\n},\n{\n key: \"Events\",\n url: 'http://blog.jayway.com/category/events/feed/atom',\n title: 'tbd', updated: 'tbd',\n backgroundImage: '/images/logo.png',\n acquireSyndication: acquireSyndication, dataPromise: null\n},\n{\n key: \"Java\",\n url: 'http://blog.jayway.com/category/java/feed/atom',\n title: 'tbd', updated: 'tbd',\n backgroundImage: '/images/logo.png',\n acquireSyndication: acquireSyndication, dataPromise: null\n},\n{\n key: \"Dynamic languages\",\n url: 'http://blog.jayway.com/category/dynamic-languages/feed/atom',\n title: 'tbd', updated: 'tbd',\n backgroundImage: '/images/logo.png',\n acquireSyndication: acquireSyndication, dataPromise: null\n},\n{\n key: \"Testing\",\n url: 'http://blog.jayway.com/category/testing/feed/atom',\n title: 'tbd', updated: 'tbd',\n backgroundImage: '/images/logo.png',\n acquireSyndication: acquireSyndication, dataPromise: null\n},\n{\n key: \"Tips and tricks\",\n url: 'http://blog.jayway.com/category/tips-tricks/feed/atom',\n title: 'tbd', updated: 'tbd',\n backgroundImage: '/images/logo.png',\n acquireSyndication: acquireSyndication, dataPromise: null\n},\n{\n key: \"User experience\",\n url: 'http://blog.jayway.com/category/user-experience/feed/atom',\n title: 'tbd', updated: 'tbd',\n backgroundImage: '/images/logo.png',\n acquireSyndication: acquireSyndication, dataPromise: null\n},\n{\n key: \".NET\",\n url: 'http://blog.jayway.com/category/net/feed/atom',\n title: 'tbd', updated: 'tbd',\n backgroundImage: '/images/smalllogo.png', /* '/images/logo.png', */\n acquireSyndication: acquireSyndication, dataPromise: null\n}\n ];\n\n // Get the content for each feed in the blogs array\n blogs.forEach(function (feed) {\n feed.dataPromise = feed.acquireSyndication(feed.url);\n dataPromises.push(feed.dataPromise);\n });\n\n // Return when all asynchronous operations are complete\n return WinJS.Promise.join(dataPromises).then(function () {\n return blogs;\n });\n\n }", "function process(opts, callback) {\n\n callback = (opts instanceof Function ? opts : null) ||\n callback ||\n opts.callback ||\n function(){return [];};\n\n var date_query = {};\n\n // get collections from context\n var posts = this.posts;\n var meta = this.meta;\n\n // if no date query given, get all tweets in database before now\n if (!opts.min_date && !opts.max_date) {\n opts.max_date = new Date();\n }\n\n if (opts.min_date) {\n date_query.$gte = opts.min_date;\n }\n\n if (opts.max_date) {\n date_query.$lte = opts.max_date;\n }\n\n // build aggregation query\n var agg = [\n {\n $match : {date : date_query }\n },\n {\n $group: {\n _id: \"$url\",\n mentions: { $sum: 1 },\n weighted_mentions : { $sum : \"$followers\" },\n first: { $min: \"$date\" },\n last: { $max: \"$date\" }\n }\n }\n ];\n\n posts.aggregate(agg, function(err, results) {\n\n if (err) console.log(err);\n\n var vals = _.chain(results)\n .sortBy('mentions')\n .takeRight(opts.num || 20)\n .map(function(r) {\n return {\n \"url\" : r._id,\n \"count\" : r.mentions\n };\n })\n .reverse()\n .value();\n\n meta.find({_id : { $in: _.pluck(vals, 'url') }}).toArray(function(err, docs){\n\n if (err) console.log(err);\n\n var meta_dict = {};\n\n docs.forEach(function(d) { meta_dict[d.url] = d; })\n\n callback(\n vals.map(function(r) {\n r.meta = meta_dict[r.url] || {};\n return r;\n })\n );\n\n });\n\n });\n\n}", "function getSubPosts(prof, callback) {\n \n var temp = [];\n \n async.each(prof.subreddits, function(sub, callback) {\n reddit(\"/r/\" + sub + \"/\" + prof.sort).listing({limit: prof.posts}).then(function(slice) {\n slice.children.forEach(function(child) {\n temp.push({\n title: child.data.title,\n url: child.data.url,\n });\n });\n callback();\n });\n }, function (err) {\n if (err) {\n console.log(\"Uh, oh an error occurred\");\n } else {\n if (prof.hackernews) {\n hn.numberOfNewStories(prof.posts).then(stories => {\n addStories(stories, temp, callback, prof.email);\n });\n } else {\n mailer(prof.email, temp);\n callback();\n }\n }\n });\n}", "function getPosts() {\n setTimeout(() => {\n let output = \"\";\n posts.forEach((post, index) => {\n output += `<li> ${post.title}</li>`;\n });\n document.body.innerHTML = output;\n }, 1000);\n}", "function posts (state=[],action) {\n\tswitch (action.type) {\n\t\tcase 'INCREMENT_LIKES':\n const id = action.id;\n const posts = state.posts.map((item) => {\n if(item._id === id) {\n return {\n ...item,\n likes: item.likes + 1,\n }\n }\n return item;\n });\n\t\t\treturn {\n ...state,\n posts,\n };\n break;\n case 'GET_POSTS':\n return {\n ...state,\n posts: action.posts,\n total: action.total,\n }\n\t\tdefault:\n\t\treturn state;\n\t}\n}", "async function getPosts(option) {\n\n // Make search request to Reddit api\n await r.search(option).then(response => {\n\n // Sort FRESH posts by type\n response.forEach(function(post) {\n if (post.title.includes(\"ALBUM]\")) {\n albums.push(post);\n }\n else if (post.title.includes(\"MIXTAPE]\")) {\n mixtapes.push(post);\n }\n else if (post.title.includes(\"EP]\")) {\n eps.push(post);\n }\n else if (post.title.includes(\"VIDEO]\")) {\n videos.push(post);\n }\n else if (post.title.includes(\"[FRESH]\")) {\n singles.push(post);\n }\n // Unknown type\n else {\n other.push(post);\n }\n });\n\n new Promise(resolve => setTimeout(resolve, 300));\n });\n}", "function fetchPostsAnon() {\n const feed = document.querySelector('#feed');\n fetch(`${API_URL}/post/public`, {\n method: 'GET',\n })\n //check status messages \n .then(res => {\n console.log(res.status);\n return res.json();\n })\n //create each post element, add to them and append post to feed \n .then(json => {\n json.posts.sort(function(a,b) {\n return a.meta.published < b.meta.published;\n }); \n //upon succesful login, clear feed and append new feed \n while (feed.firstChild) {\n feed.removeChild(feed.firstChild);\n } \n feedHeader();\n //add to feed \n json.posts.forEach(post => {\n //create post list element\n const postElement = helper.createEleTextless('li', 'post')\n feed.appendChild(postElement);\n\n //create divs for each post bit \n //vote\n const vote = helper.createEleTextless('div', 'content');\n postElement.appendChild(vote);\n\n //MINI-DIV: CONTENT. Filled with the content of the post ofc. \n const content = helper.createEleTextless('div', 'content');\n postElement.appendChild(content);\n //title\n const postTitle = helper.createEle('h3', post.title, 'post', 'alt-text', 'post-title');\n //author\n //Create author node \n const time = helper.unixStampConverter(parseInt(post.meta.published));\n const author = helper.createEle('p', `Posted by ${post.meta.author} on ${time} \n to s/${post.meta.subseddit}`, 'post-author'); \n //text \n const postText = helper.createEle('p', post.text, 'post', 'text');\n\n const image = document.createElement('img');\n //create image if image is not null\n if(post.image !== NO_IMAGE) {\n image.src = `data:image/jpg;base64,${post.image}`;\n }\n helper.appendToParent(content,postTitle, postText, image, author);\n });\n })\n .catch(error => {\n //alert(\"He's dead Jim (Issue loading feed)\");\n });\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 loadPosts(array) {\n\tvar container = document.getElementById(outerDiv);\n\t\n\tfor (var i = 0; i < array.length; i++) {\n\t\tvar entry = array[i];\n\t\tvar article = \"\";\n\t\tvar thumbs = \"\";\n\t\t\n\t\t//Checks if an article is present\n\t\tif (entry.article.displayName) {\n\t\t\tarticle = '<div class=\"link\"><a class=\"title\" href=\"' + \n\t\t\t\tentry.article.url + '\">' +\n\t\t\t\tentry.article.displayName + '</a><p>' +\n\t\t\t\tentry.article.content + '</p></div>';\n\t\t}\n\t\t\n\t\t//Checks if a image, album, or video is present\n\t\tif (entry.thumbnails.length > 0) {\n\t\t\tconsole.log(i);\n\t\t\tthumbs = '<div class=\"attachments\">';\n\t\t\tfor (var k = 0; k < entry.thumbnails.length; k++) {\n\t\t\t\tthumbs += '<a href=\"' + entry.thumbnails[k].link +\n\t\t\t\t'\"><img src=\"' + entry.thumbnails[k].url + '\">';\n\t\t\t}\n\t\t\tthumbs += '</div>';\n\t\t}\n\t\t\n\t\t// If you would like to use abbreviated month names, change the array to:\n\t\t// [ \"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \n\t\t//\t\"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\" ]\n\t\tvar monthNames = [ \"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \n\t\t\t\"July\", \"August\", \"September\", \"October\", \"November\", \"December\" ];\n\t\t\n\t\t//Turns the data into an article div. You can change this if you want a different output\n\t\tcontainer.innerHTML += '<article>' +\n\t\t\tentry.body + article + thumbs +\n\t\t\t'<a class=\"ar-footer\" href=\"' + entry.url + '\">' + '<span class=\"date\">' + \n\t\t\tmonthNames[entry.date.getMonth()] + ' ' + entry.date.getDate() + ', ' +\n\t\t\tentry.date.getFullYear() + '</span> <span class=\"plusone\">+' + entry.plusones + \n\t\t\t'</span> <span class=\"comments\">' + entry.comments + \n\t\t\t' Comments</span> <span class=\"reshares\">' + entry.reshares + ' Reshares</span></a>' + \n\t\t\t'<a class=\"author\" href=\"' + entry.author.url + '\">By ' + entry.author.name + '</a>';\n\t}\n}", "function processNewPosts(updates) {\n updates.forEach(function(post) {\n var existing_post_indexes = getPostPageIndexes(post);\n if (!angular.isDefined(existing_post_indexes)) {\n // post doesn't exist in the list\n if (!post.deleted && post.post_status === 'open' && post.sticky === sticky) {\n self.uncountedPosts.push(post);\n }\n }\n });\n }", "function getPosts() {\n setTimeout(() => {\n let output = posts.map((post) => {\n return `${post.title}, ${post.body}`;\n });\n console.log(output.join(\"\\n\"));\n }, 1000);\n}", "function groupRecordsBy(docs, groupBy) {\n\tvar other = {},\n\tletter;\n\t\n\tfor (var i=0; i < docs.length; i++) {\n\t\tif(groupBy == \"startDate\" || groupBy == \"dueDate\") {\n\t\t\tletter = docs[i][groupBy];\n\t\t\tletter = letter.split(/\\s+/)[0];\n\t\t\tconsole.log(\"letter :: \", letter);\n\t\t}\n\t\telse {\n\t\t\tletter = docs[i][groupBy];\n\t\t}\n\t\t\n\t\t// if other doesn't already have a property for the current letter\n\t\t// create it and assign it to a new empty array\n\t\tif (!(letter in other)) {\n\t\t\t//other[letter] = [];\n\t\t\tother[letter] = {};\n\t\t\tother[letter].tasks = [];\n\t\t}\n\t\t//other[letter].push(docs[i]);\n\t\tother[letter].tasks.push(docs[i]);\n\t}\n\t\n\treturn other\n}", "function chunkDays(list) {\n var chunks = _.chunk(list, 8);\n return chunks;\n }", "function getPosts() {\r\n setTimeout(() => {\r\n let output = \"\";\r\n for(const post of posts) {\r\n output += \"<li>\" + post.title + \": \" + post.body + \"</li>\";\r\n }\r\n website.innerHTML = output;\r\n}, 1000);\r\n}", "function addLatestResources(sorted_data, number_of_items){\n var listElements = '';\n for(var i=0;i<number_of_items;i++){\n resource = sorted_data[i];\n if(resource.url.indexOf(\"https://connect.linaro.org\") == -1){\n // Connect URL exits set default image to the connect logo.\n resource_image = \"/assets/images/content/connect-icon-alt.png\";\n }\n else{\n resource_image = \"/assets/images/content/connect-icon-alt.png\";\n }\n var textEnd = \"\";\n if(post.title.length > 40){\n textEnd = \"...\";\n }\n listElements += '<a target=\"_self\" href=\"' + resource.url +'\">';\n listElements += '<li class=\"list-group-item fly\">';\n listElements += '<span class=\"post-title\">' + resource.title.substring(0, 40) + textEnd + '</span>';\n listElements += '<span class=\"post-date\">' + formatDate(Date.parse(extractDateString(resource.date_published))) + '</span>';\n listElements += '<span class=\"post-site\"><img class=\"img-responsive\" src=\"'+ resource_image + '\"/></span>';\n listElements += '</li>';\n listElements += '</a>';\n }\n $(\"#event-resources\").html(listElements);\n}", "function groupBy(group_by, words, limit, multiple) {\n\n // Find out what groupings are involved using these parts of speech\n var groupings = {};\n words.forEach(function(currVal, currIndex, listObj) {\n // Get the word itself\n var word = currVal.innerHTML.trim();\n\n // Get the grouping described in the metadata for this word\n var texthead = currVal.parentNode.previousElementSibling; \n var meta_grouping = texthead.querySelector(\"[metaclass=\\\"\"+groupings_metaclass[group_by]+\"\\\"]\");\n var grouping = \"\";\n if (meta_grouping != null) grouping = meta_grouping.innerHTML.split(\":\")[1].trim();\n\n // If there are multiple parts to this grouping criterion, separated by commas,\n // split them up and iterate over them\n if (multiple) {\n parts = grouping.split(\",\");\n for (var i = 0; i < parts.length; i++) {\n groupings = countFreqForWord(word, groupings, parts[i]);\n }\n } else {\n groupings = countFreqForWord(word, groupings, grouping);\n }\n\n });\n\n // Sort descending by the groupings with the most words\n var groupingsSorted = Object.keys(groupings).sort(function(a, b) {return -(groupings[a].sit_count - groupings[b].sit_count);});\n \n var group_html = \"\";\n for (var i = 0; i < groupingsSorted.length; i++) { \n var grouping = groupingsSorted[i];\n group_html += \"<h3>\"+grouping+\" (\"+groupings[grouping].sit_count+\" matches)\"+\"</h3><br>\" \n var freq_list_i = buildFreqList(groupings[grouping].freq_dict,\n groupings[grouping].sit_count,\n limit);\n group_html += freq_list_i;\n group_html += \"<br>\"; \n };\n\n return group_html;\n}", "function post(data) {\n\n var still;\n var animated;\n var rating;\n var title;\n\n for (var j = 0; j < data.data.length; j++) {\n \n still = data.data[j].images.fixed_height_still.url;\n animated = data.data[j].images.fixed_height.url;\n rating = data.data[j].rating;\n title = data.data[j].title;\n \n $(\"#post\").append(\"<div class = 'thumbnail'></div>\");\n $(\"#post .thumbnail\").eq(j).append(\"<img>\");\n \n $(\"#post .thumbnail img\").eq(j).attr({\n \n \"src\": still, \n \"data-still\": still, \n \"data-animated\": animated, \n \"alt\": title\n \n });\n \n $(\"#post .thumbnail\").eq(j).append(\"<div class = 'caption'><h3>Rating: \" + \n rating.toUpperCase() + \"</h3>\");\n }\n}", "function get_feed(toget, cb) {\n var gotten = 0\n var got = {};\n var need = toget.length;\n var posts = {};\n var called = false;\n console.log(\"NEED:\");\n console.log(toget);\n\n function check() {\n console.log(\"MIDAY:\" + Object.keys(got).length + \":\" + need);\n if (Object.keys(got).length >= need /* && !called*/ ) {\n console.log(\"Calling to get feed.\" + gotten + need);\n console.log(posts);\n cb(posts);\n called = true;\n\n } else {\n console.log(\"NOT READY\");\n console.log(got);\n console.log(need);\n }\n if (called) {\n console.log(\"called already!\");\n }\n }\n toget.forEach(function(get) {\n console.log(get);\n switch (get.type) {\n case 'tag':\n var pro;\n if (get.pro) {\n pro = get.pro;\n } else {\n pro = 1 / toget.length;\n }\n var amount = pro * toget.count;\n console.log(amount + \":amount\");\n get_even({\n count: amount,\n filter: \"tag\",\n filter_data: [get.tag],\n from: selfId,\n original: selfId,\n posts: {}\n }, function(gposts) {\n console.log(\"respost \" + gotten);\n got[get.tag + \"_tag\"] = true;\n Object.keys(gposts.posts).forEach(function(key) {\n console.log(\"I GOT ONE\" + key)\n posts[key] = gposts.posts[key];\n });\n check();\n });\n break\n case \"cur\":\n var pro;\n if (get.pro) {\n pro = get.pro;\n } else {\n pro = 1 / toget.length;\n }\n var amount = pro * toget.count;\n console.log(amount + \":amount\");\n get_curation_posts(get.cur, function(gposts) {\n console.log(\"GOT CURATUION PSOTS\");\n Object.keys(gposts).forEach(function(key) {\n posts[key] = gposts[key];\n });\n console.log(posts);\n console.log(\"THOSE WERE C POSTS\");\n got[get.cur + \"_cur\"] = true;\n console.log(got);\n check();\n }, amount);\n break;\n default:\n break;\n }\n });\n}", "function groupMemories(memories) {\n memories.forEach(\n datum =>\n (datum['groupingDate'] = moment(datum['createdAt']).format(DATE_FORMAT))\n );\n\n // Group memories by MM/YYYY\n // Create a dict of MM/YYYY => [mem1, mem2]\n return _.chain(memories)\n .groupBy('groupingDate')\n .toPairs()\n .map(pair => _.zipObject(['groupingDate', 'memories'], pair))\n .value();\n}" ]
[ "0.584434", "0.5771722", "0.5568487", "0.5404918", "0.52304906", "0.5187347", "0.5178116", "0.51092744", "0.50892144", "0.5088701", "0.5053758", "0.49986213", "0.4992475", "0.49838698", "0.49736896", "0.4966728", "0.49456382", "0.49372658", "0.49299955", "0.49046978", "0.48873538", "0.4871953", "0.4865952", "0.4857397", "0.48493838", "0.48454243", "0.48168805", "0.48042497", "0.47986597", "0.4771853", "0.47675723", "0.47646806", "0.47612533", "0.4757455", "0.47349238", "0.47330225", "0.47219166", "0.4713146", "0.4706748", "0.47028223", "0.4699763", "0.46989727", "0.46942702", "0.4691146", "0.46900487", "0.46881562", "0.46793127", "0.46777394", "0.4668201", "0.46681795", "0.46681795", "0.46536794", "0.46465012", "0.46464548", "0.46411425", "0.46353835", "0.4633133", "0.46270883", "0.462036", "0.46187097", "0.4616464", "0.46161258", "0.4610703", "0.46009842", "0.4600576", "0.45980382", "0.45978215", "0.45962554", "0.45949215", "0.45884213", "0.45827362", "0.45733222", "0.45716712", "0.4570326", "0.45667338", "0.45604748", "0.45523703", "0.45510736", "0.45480785", "0.45469847", "0.45400608", "0.45372882", "0.45351538", "0.45323777", "0.45309564", "0.4527767", "0.45228302", "0.45201436", "0.45170075", "0.451353", "0.45129853", "0.45128083", "0.4510509", "0.45099598", "0.44960603", "0.4494675", "0.44928387", "0.4492369", "0.44922656", "0.44857684" ]
0.6859666
0
sum(20,30)//argument function expression function expression simply means create a function and put it into the variables.
function sum1(a,b){ var total = a+b; console.log(total); // but it is not a fully function expression }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sum() {\n \n}", "function sum(a,b) {\n return function(c,d){\n return a+b+c+d\n }\n}", "function \n//declare a function\nfunction sum()\n//need parentheses for your parameters\nfunction sum(num1, num2) {}", "sum() {}", "function sum(a) {\n return function(b) {\n return a + b;\n }\n}", "function sum(a, b) {\n\n}", "function sum(a,b){\nreturn a+b\n}", "function sum(a) {\n return function(b) {\n return a+b\n }\n}", "function sum(x){\n return function(y){\n return x+y\n }\n}", "function sum(a, b){return a+b;}", "function plusSum (sum1, sum2, sum3) { // parameters gedeclareerd\n return sum1 + sum2 + sum3\n}", "function sum(a, b) {\n // code here...\n }", "function sum(a){ \n return function(b){\n return a+b;\n }\n}", "function sum(a,b){\n return a+b;\n \n}", "function sum (a){\n return function (b){\n return a+b;\n }\n}", "function Sum(a,b){\n return a+b;\n}", "function sum (x , y){\n return x + y;\n}", "function sumar(x1,x2) /* toma dos parametros y los guarda como x1 y x2*/\n{\n return x1+x2;/* devuelve la funcion*/\n}", "function calculateSum(a,b) //here are two argument/parameters given to calculateSum function\n{\n //sum of two numbers\n /* lekin sum karne ke kiye humko 2 no dene hoge jo ki hum waha dege */\n let sum = a + b;\n return sum; //return function value ko return kar deta hai jo usko call karega\n}", "function sum(x,y){\n return x + y;\n}", "function sum(x,y){\n return x + y;\n}", "function sum(x,y) \n{\n\treturn x+y;\n}", "function sum(x,y,z){\n return x + y + z;\n}", "function creaSumador(x) {\n return function(y) {\n return x + y;\n };\n }", "function sum(a, b){\n return a+b\n}", "function sum(a,b) {\n return a + b\n}", "function sum(a,b) {\n return a + b\n}", "function sum (a, b){\n return a+b\n}", "function sum(a,b){\n return a+b;\n}", "function sum(a,b){\n return a+b;\n}", "function sum(a,b){\n\treturn a+b;\n}", "function sum(a) {\n return function (b) {\n return a + b;\n };\n}", "function sum(a) {\n return function (b) {\n return function (c) {\n return function (d) {\n console.log(\"Sum is : \", a + b + c + d);\n };\n };\n };\n}", "function sum(x) {\n return function(y) {\n var res = x + y;\n return function (z) {\n return z + res;\n }\n }\n}", "function sum(x,y) {\n return x + y;\n}", "function sum(x, y) {\n return (x + y);\n }", "function sum(x, y, z) {\r\n return x + y + z\r\n}", "function sum(a, b){\n return a+b;\n}", "function sum()\n{\n if (arguments.length > 1)\n {\n var total = 0;\n for (var i = 0; i < arguments.length; i++)\n {\n if (arguments[i] instanceof Function)\n {\n total += arguments[i]();\n }\n else\n {\n total += arguments[i];\n }\n }\n return total;\n }\n else\n {\n var arg = arguments[0];\n return function (num)\n {\n return sum(arg, num);\n };\n }\n}", "function sumFunction(total, value) {\r\n return total + value;\r\n}", "function sum(a,b) {\n return a + b;\n}", "function sum(x,y,z) {\n return x + y + z;\n}", "function sum(a , b) {\n let theSum = a + b;\n return theSum;\n}", "function add(x) {\n \nreturn function(y) {\n return function(z) {\n return x + y + z\n }\n}\n\n \n}", "function sum(a, b, c) {\n return a + b + c\n}", "function addition(x){\n return function(y){\n return x+y\n }\n}", "function sum (a, b) {\n return a+b;\n}", "function sum(a, b){\n return a + b;\n}", "function sum(a, b) {\n return a + b;\n\n}", "function sum(a, b) {\n return a + b; // processamento\n}", "function add(){\n let sumFunc = sumOfThirty(30, 2, 20)\n let divFunc = divideProductFunc(sumFunc, 10, 2)\n return divFunc \n }", "function sum(a) {\n return (b) => {\n return (c) => {\n return a + b + c\n }\n }\n}", "function sum(a, b) {\n return a + b\n}", "function sum(a, b) {\r\n return a + b;\r\n}", "function calc(x,y){ // A fucntion fo x and y addition\n\treturn x+y;\n}", "function sum ( a, b) {\n return a + b;\n}", "function sum(a) {\n return function(b) {\n return a + b;\n };\n}", "function sum(x, y, z) {\r\n return x + y + z;\r\n}", "function sum(a, b) {\n return a+b;\n}", "function sum(a, b){\n return a + b;\n}", "function sum(x, y) {\n return x + y;\n}", "function sum(x, y) {\n return x + y;\n}", "function sum(tab, func) {\n if (typeof func != 'function') { // si f n est pas une fonction\n func = t => t; //func = function(t){return t;} equivalent a la fonction flechée\n\n }\n // let res=0;\n // for (const ox of tab){\n // res=res+func(x);\n // }\n\n return tab.reduce((a, x) => a + func(x), 0);\n\n }", "function addFunction(a,b,c){\n return a + b + c;\n}", "function sum(x, y) {\n return (x + y);\n}", "function somme(a,b) {\n var sum=a+b;\n return sum;\n }", "function sum (a, b) {\n return a + b\n}", "function suma(){\n resultado= 10 + 5;\n}", "function sum() { \n let sum = 0;\n for (let i = 0; i < arguments.length; i++) {\n sum += arguments[i]; \n }\n console.log(`Sum : ${sum}`);\n }", "function foo(n , f){ return n + f()}", "function sum() { // Take any number of parameters and return the sum\n var total = 0;\n for (var i = 0; i < arguments.length; ++i) {\n total += arguments[i];\n }\n return total;\n}", "function sum (a, b) {\n return a + b;\n}", "function sum(a, b) {\n return a + b;\n}", "function sum(a, b) {\n return a + b;\n}", "function sum(a, b) {\n return a + b;\n}", "function sum(a, b) {\n return a + b;\n}", "function sum(a, b) {\n return a + b;\n}", "function sum(a, b) {\n return a + b;\n}", "function sum(a, b) {\n return a + b;\n}", "function sum(a, b) {\n return a + b;\n}", "function sum(a, b) {\n return a + b;\n}", "function sum(a, b) {\n return a + b;\n}", "function sum(a, b) {\n return a + b;\n}", "function sum(a, b) {\n return a + b;\n}", "function sum(a, b) {\n return a + b;\n}", "function sum() {\n // FILL THIS IN\n var sumValue = 0;\n for (var i = 0; i < arguments.length; i++) {\n sumValue += arguments[i];\n }\n }", "function sumar(a,b){\n return a+b;\n}", "function sumar(a,b){\n return a+b;\n}", "function sumar(a,b){\n return a+b;\n}", "function example(sum){\r\nconsole.log(\"Sum\");\r\nif(typeof sum === 'function')\r\n\tsum();\r\n}", "function suma(a, b, c) {\n \n resultado = suma(a, b, c)\n return resultados\n\n}", "function sumar(a, b, c){\n return a + b + c;\n }", "function sum21(...args) {\n return args.reduce((a, b) => a + b);\n}", "function sumar(a,b){ // \"a\" y \"b\" son parametros.\n console.log(a+b);\n}", "function sum(a, b) {\n var result = a + b\n return result\n}", "function sum(a , b) {\n let add = a + b;\n return add;\n}", "function sum(a, b) {\nvar a = 1;\nvar b = 2;\nreturn a + b;\n}", "function suma(a,b){\n return a + b;\n}", "function sum(a, b) {\n return a + b;\n }", "function sum(a, b) {\n return a + b;\n }" ]
[ "0.74143606", "0.74037623", "0.72606206", "0.72070473", "0.7196615", "0.71475965", "0.7141033", "0.7139179", "0.7135075", "0.7130645", "0.70102155", "0.7009452", "0.6999755", "0.69970095", "0.69677067", "0.69579846", "0.6952157", "0.6918777", "0.6916012", "0.6862404", "0.6862404", "0.68622386", "0.68099874", "0.6801182", "0.6783266", "0.6782661", "0.6782661", "0.6770578", "0.67373514", "0.67373514", "0.6729787", "0.67288154", "0.67221934", "0.67201334", "0.6717252", "0.6698427", "0.6679834", "0.6677079", "0.66752857", "0.6674185", "0.6670232", "0.66684", "0.66608113", "0.6660457", "0.6660367", "0.6650605", "0.6649532", "0.663798", "0.6623439", "0.66124654", "0.66062796", "0.6603107", "0.6602555", "0.65944695", "0.6583027", "0.6579055", "0.6575156", "0.65672404", "0.65638876", "0.6552933", "0.6540245", "0.6540245", "0.6533506", "0.65262663", "0.651603", "0.65157366", "0.65134186", "0.65017", "0.6497929", "0.6497476", "0.64962316", "0.64951605", "0.6494678", "0.6494678", "0.6494678", "0.6494678", "0.6494678", "0.6494678", "0.6494678", "0.6494678", "0.6494678", "0.6494678", "0.6494678", "0.6494678", "0.6494678", "0.6488804", "0.6487163", "0.6487163", "0.6487163", "0.6480742", "0.64796436", "0.6479636", "0.6474184", "0.6473773", "0.6471848", "0.6470975", "0.64588904", "0.6457432", "0.6452726", "0.6452726" ]
0.73504925
2
Handler to call on window resize
function handleResize() { // Set window width/height to state setWindowSize({ width: window.innerWidth, height: window.innerHeight, }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onWindowResize() {\n\n\t\t\t}", "function onWindowResize() {\n updateSizes();\n }", "function onWindowResize() {\n\tonAggregateResize();\n}", "function edgtfOnWindowResize() {\n }", "onResize () {}", "onWindowResize() {\n\t\tthis.windowHeight = this.getWindowHeight();\n\t\tthis.updatePosition();\n\t}", "function on_window_resize() {\n var t = this;\n window.setTimeout(function() {\n t.onResize();\n }, 350);\n }", "function windowResized() {\n resize();\n redraw();\n}", "function handleResize(){\r\n console.log(\"I've been resized\")\r\n}", "_onResize () {\n }", "function onWindowResize(event) {\n\n layout();\n\n }", "function eltdfOnWindowResize() {\n\n }", "resizeListener() {\n this.windowWidth = global.innerWidth;\n this._checkFixedNeeded();\n }", "function qodeOnWindowResize() {\n qodeSelfHostedVideoSize();\n }", "onResize_() {\n dispatcher.getInstance().dispatchEvent(new GoogEvent(EventType.RESIZE));\n }", "function handleResize() {\n setWindowWidth(window.innerWidth);\n }", "function mkdfOnWindowResize() {\n\n }", "function resizeEvents(){\r\n\r\n}", "function handleResize () {\n if(typeof window != 'undefined'){\n setWidth(window.innerWidth)\n }\n }", "function onResize(){\n\t// Update new dimensions\n\tvar width = $(window).width();\n\tvar height = $(window).height();\n\t\n\t// Dispatch a resize event to all the elements\n\tdispatch.resize(width, height);\n\t\n\t// If a region was selected, updates also each chart\n//\tif(regionSelected.name)\n//\t\tdispatch.regionChange();\n\t\n\t//TODO: completare\n}", "function handleResize() {\n if (window?.innerWidth !== lastWidth.current) {\n const width = getSize();\n lastWidth.current = width;\n setWindowSize(width)\n }\n }", "_initResizeListener() {\n window.addEventListener('resize', () => this._onResize())\n }", "$_initResizeEvent() {\n window.addEventListener('resize', this.$_resizeHandler)\n }", "function handleResize() {\n // Set window width/height to state\n setWindowSize({\n width: window.outerWidth,\n height: window.outerHeight,\n });\n }", "function windowResized() {\n\n getWrapperWidth();\n resizeCanvas(wrapperWide, wrapperWide);\n\n widthVar = (width - 40) / 100;\n drawArea = (width - 40);\n\n switchBox();\n}", "onBeforeResize() {\n }", "function onResize() {\n\t\t\tsetWidths();\n\t\t\trepositionStickyHead();\n\t\t\trepositionStickyCol();\n\t\t}", "function handleResize() {\n\t\t\t// Set window width/height to state\n\t\t\tsetWindowSize({\n\t\t\t\twidth: window.innerWidth,\n\t\t\t});\n\t\t}", "handleWindowResize() {\n const { windowResizeDebounce } = this;\n clearTimeout(this.windowResizeListenerDebounce);\n this.windowResizeListenerDebounce = setTimeout(() => {\n const currentSizeMappingIndex = this.getCurrentSizeMappingIndex();\n if (currentSizeMappingIndex !== this.currentSizeMappingIndex) {\n if (!this.ghostMode) {\n this.refreshSlot();\n }\n this.currentSizeMappingIndex = currentSizeMappingIndex;\n }\n }, windowResizeDebounce);\n }", "_setWindowResize() {\n if (this.resizeEvent) return\n this.resizeEvent = true\n window.onresize = () => {\n this.resizeCallbacks.forEach(cb => cb())\n }\n }", "function onResize() {\n asyncDigestDebounced.add(checkWindowForRebuild);\n }", "function handleResize() {\n // Set window width/height to state\n setWindowSize({\n width: window.innerWidth,\n height: window.innerHeight,\n });\n\n }", "function onWindowResize() {\n deleteStatusOverlays();\n drawStatusOverlays();\n }", "function __resize_window_event()\n{\n\t// Avoid wrong resize\n\tif ( window_width == window.innerWidth && window_height == window.innerHeight )\n\t\treturn;\n\twindow_width = window.innerWidth;\n\twindow_height = window.innerHeight;\n\t// Resize mapview\n\tvar wl = ( $('#col_left') ? $('#col_left').width() : 0 );\n\tvar wr = ( $('#col_right') ? $('#col_right').width() : 0 );\n\tvar w = window.innerWidth - wl - wr;\n\t$('#col_middle').css('left', wl );\n\t$('#col_middle').width( w );\n\t$('#col_middle').height( window.innerHeight );\n\t$('#col_left').height( window.innerHeight );\n\t$('#col_right').height( window.innerHeight );\n\t// Resize Processing\n\tresize_processing();\n\t//\n\t// TABS\n\t// Minus 5 buttons: Save, Discard, Brush, Stencil, Sticker\n\tvar tab_total_height = window.innerHeight - ({{style.buttonHeight}", "function handleResize() {\n // Set window width/height to state\n setWindowSize({\n width: window.innerWidth,\n height: window.innerHeight,\n });\n }", "function handleResize() {\n // Set window width/height to state\n setWindowSize({\n width: window.innerWidth,\n height: window.innerHeight,\n });\n }", "function handleResize() {\n // Set window width/height to state\n setWindowSize({\n width: window.innerWidth,\n height: window.innerHeight,\n });\n }", "function handleResize() {\n // Set window width/height to state\n setWindowSize({\n width: window.innerWidth,\n height: window.innerHeight,\n });\n }", "function handleResize() {\n // Set window width/height to state\n setWindowSize({\n width: window.innerWidth,\n height: window.innerHeight,\n });\n }", "function handleResize() {\n // Set window width/height to state\n setWindowSize({\n width: window.innerWidth,\n height: window.innerHeight,\n });\n }", "function handleResize() {\n // Set window width/height to state\n setWindowSize({\n width: window.innerWidth,\n height: window.innerHeight,\n });\n }", "function handleResize() {\n // Set window width/height to state\n setWindowSize({\n width: window.innerWidth,\n height: window.innerHeight,\n });\n }", "function handleResize() {\n // Set window width/height to state\n setWindowSize({\n width: window.innerWidth,\n height: window.innerHeight,\n });\n }", "function resizeListener() {\n window.onresize = function(e) {\n toggleMenuOff();\n };\n }", "function resizeHandler(){\n //checking if it needs to get responsive\n responsive();\n\n // rebuild immediately on touch devices\n if (isTouchDevice) {\n var activeElement = $(document.activeElement);\n\n //if the keyboard is NOT visible\n if (!activeElement.is('textarea') && !activeElement.is('input') && !activeElement.is('select')) {\n var currentHeight = $window.height();\n\n //making sure the change in the viewport size is enough to force a rebuild. (20 % of the window to avoid problems when hidding scroll bars)\n if( Math.abs(currentHeight - previousHeight) > (20 * Math.max(previousHeight, currentHeight) / 100) ){\n FP.reBuild(true);\n previousHeight = currentHeight;\n }\n }\n }else{\n //in order to call the functions only when the resize is finished\n //http://stackoverflow.com/questions/4298612/jquery-how-to-call-resize-event-only-once-its-finished-resizing\n clearTimeout(resizeId);\n\n resizeId = setTimeout(function(){\n FP.reBuild(true);\n }, 350);\n }\n }", "function windowResized() {\n\tresizeCanvas(windowWidth, windowHeight);\n\tLogo.resize();\n}", "function resizeHandler() {\n //checking if it needs to get responsive\n responsive();\n\n // rebuild immediately on touch devices\n if (isTouchDevice) {\n var activeElement = $(document.activeElement);\n\n //if the keyboard is NOT visible\n if (!activeElement.is('textarea') && !activeElement.is('input') && !activeElement.is('select')) {\n var currentHeight = $window.height();\n\n //making sure the change in the viewport size is enough to force a rebuild. (20 % of the window to avoid problems when hidding scroll bars)\n if (Math.abs(currentHeight - previousHeight) > (20 * Math.max(previousHeight, currentHeight) / 100)) {\n reBuild(true);\n previousHeight = currentHeight;\n }\n }\n } else {\n //in order to call the functions only when the resize is finished\n //http://stackoverflow.com/questions/4298612/jquery-how-to-call-resize-event-only-once-its-finished-resizing\n clearTimeout(resizeId);\n\n resizeId = setTimeout(function() {\n reBuild(true);\n }, 350);\n }\n }", "function windowResized() {\n\tresizeCanvas(innerWidth, innerHeight);\n}", "function windowResized() {\n resizeCanvas(width, height);\n}", "function windowResized () {\n resizeCanvas(windowWidth, windowHeight);\n resize=1;\n}", "function onResize() {\n\tfm.resize();\n}", "function onResize() {\n\trender();\n}", "resize(windowRect) {}", "function onResize() {\n\t\t\t\t\tasyncDigestDebounced.add(checkWindowForRebuild);\n\t\t\t\t}", "function resizeHandler(){\n \tif($('#nectar_fullscreen_rows.afterLoaded').length == 0) return false;\n //checking if it needs to get responsive\n responsive();\n\n // rebuild immediately on touch devices\n if (isTouchDevice) {\n var activeElement = $(document.activeElement);\n\n //if the keyboard is NOT visible\n if (!activeElement.is('textarea') && !activeElement.is('input') && !activeElement.is('select')) {\n var currentHeight = $window.height();\n\n //making sure the change in the viewport size is enough to force a rebuild. (20 % of the window to avoid problems when hidding scroll bars)\n /* nectar addition */ \n //if( Math.abs(currentHeight - previousHeight) > (20 * Math.max(previousHeight, currentHeight) / 100) ){\n FP.reBuild(true);\n previousHeight = currentHeight;\n //}\n /* nectar addition end */ \n }\n }else{\n //in order to call the functions only when the resize is finished\n //http://stackoverflow.com/questions/4298612/jquery-how-to-call-resize-event-only-once-its-finished-resizing\n clearTimeout(resizeId);\n\n /* nectar addition */ \n // resizeId = setTimeout(function(){\n FP.reBuild(true);\n // }, 230);\n }\n }", "function resizedw(){\n\t\n}", "function resizeHandler(){\n //checking if it needs to get responsive\n responsive();\n\n // rebuild immediately on touch devices\n if (isTouchDevice) {\n var activeElement = $(document.activeElement);\n\n //if the keyboard is NOT visible\n if (!activeElement.is('textarea') && !activeElement.is('input') && !activeElement.is('select')) {\n var currentHeight = $window.height();\n\n //making sure the change in the viewport size is enough to force a rebuild. (20 % of the window to avoid problems when hidding scroll bars)\n if( Math.abs(currentHeight - previousHeight) > (20 * Math.max(previousHeight, currentHeight) / 100) ){\n reBuild(true);\n previousHeight = currentHeight;\n }\n }\n }else{\n //in order to call the functions only when the resize is finished\n //http://stackoverflow.com/questions/4298612/jquery-how-to-call-resize-event-only-once-its-finished-resizing\n clearTimeout(resizeId);\n\n resizeId = setTimeout(function(){\n reBuild(true);\n }, 350);\n }\n }", "function resizeHandler(){\n //checking if it needs to get responsive\n responsive();\n\n // rebuild immediately on touch devices\n if (isTouchDevice) {\n var activeElement = $(document.activeElement);\n\n //if the keyboard is NOT visible\n if (!activeElement.is('textarea') && !activeElement.is('input') && !activeElement.is('select')) {\n var currentHeight = $window.height();\n\n //making sure the change in the viewport size is enough to force a rebuild. (20 % of the window to avoid problems when hidding scroll bars)\n if( Math.abs(currentHeight - previousHeight) > (20 * Math.max(previousHeight, currentHeight) / 100) ){\n reBuild(true);\n previousHeight = currentHeight;\n }\n }\n }else{\n //in order to call the functions only when the resize is finished\n //http://stackoverflow.com/questions/4298612/jquery-how-to-call-resize-event-only-once-its-finished-resizing\n clearTimeout(resizeId);\n\n resizeId = setTimeout(function(){\n reBuild(true);\n }, 350);\n }\n }", "function windowResized () {\n\tresizeCanvas(windowWidth, windowHeight);\n }", "function windowResized() {\n setup();\n}", "function onResize() {\n\t\tvar TITLE_BAR_HEIGHT = 35;\t// Height of the title bar\n\t\tvar CONTENT_WIDTH = 100;\t// Aspect ratio width of content (minus the titlebar)\n\t\tvar CONTENT_HEIGHT = 100;\t// Aspect ratio height of content (minus the titlebar)\n\t\tvar NB_PADDING = 20;\t\t// The white space padding between the HTML and the widget border\n\t\tvar BORDER_PADDING = 0;\t\t// Any border around the HTML\n\n\t\t// Timeout wrapper is needed to prevent the function from triggering another resize immediately\n\t\tsetTimeout(function() {\n\t\t\tvar ratio = elements.body.width() / CONTENT_WIDTH;\n\t\t\tvar actualHeight = ratio * CONTENT_HEIGHT + TITLE_BAR_HEIGHT;\n\t\t\t// Turn off undomanager so this 'seamless' resize doesn't get recorded\n\t\t\tNB.undomanager.setAutoRecord(false);\n\t\t\tNB.getHostObject().height = actualHeight + NB_PADDING + BORDER_PADDING;\n\t\t\tNB.undomanager.setAutoRecord(true);\n\t\t}, 10);\n\t}", "function handleResize() {\n // Set window width/height to state\n setWindowSize({\n width: window.innerWidth,\n height: window.innerHeight,\n })\n }", "function windowResized() {\n\tresizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n\tresizeCanvas(windowWidth, windowHeight);\n}", "function resizeCallback() {\n var i = 0,\n j = observers.length;\n\n setDirection();\n setBreakpoint();\n setOrientation();\n for (i; i < j; i++) {\n observers[i]['func'].apply(null, [responsiveParams]);\n }\n\n running = false;\n }", "resize(windowRect) {\n }", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight, false);\n init();\n}", "_onResizeMe(e) {\n this._reflow();\n }", "function winResize() {\n window.addEventListener(\"resize\", debounce(function() {\n }, 500));\n }", "_onResize() {\n this.refresh();\n }", "function windowResized() {\r\n resizeCanvas(windowWidth, windowHeight);\r\n}", "function windowResized() {\r\n resizeCanvas(windowWidth, windowHeight);\r\n}", "_resize() {\n this._onChangeViewport({\n width: window.innerWidth,\n height: window.innerHeight\n });\n }", "function mkdOnWindowResize() {\n mkdSelfHostedVideoSize();\n }", "function windowResized() {\r\n resizeCanvas(windowWidth, windowHeight, false);\r\n}", "function bindResize() {\n $(window).resize(function () {\n sizeScrollable();\n });\n }", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight, false);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight, false);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight, false);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight, false);\n}", "function windowResized() {\n resizeCanvas(canvasX, canvasY);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}", "function windowResized() {\n resizeCanvas(windowWidth, windowHeight);\n}" ]
[ "0.87321997", "0.8683529", "0.83361626", "0.83318853", "0.8291285", "0.81736803", "0.81348217", "0.8123529", "0.810275", "0.80989", "0.80720466", "0.8034636", "0.7989424", "0.78245544", "0.7814024", "0.78111494", "0.7800373", "0.7796291", "0.7774407", "0.7746661", "0.76973426", "0.7694913", "0.7685373", "0.76592636", "0.76503205", "0.763419", "0.7633043", "0.76302946", "0.76291674", "0.762496", "0.76206046", "0.76107216", "0.7604648", "0.75980824", "0.7582342", "0.7582342", "0.7582342", "0.7582342", "0.7582342", "0.7582342", "0.7582342", "0.7582342", "0.7569458", "0.7558279", "0.75580585", "0.75543106", "0.75483656", "0.7546065", "0.7527688", "0.75222087", "0.75200737", "0.7519057", "0.7516448", "0.75118285", "0.7507869", "0.74988115", "0.7494677", "0.7494677", "0.7494166", "0.74925125", "0.7491037", "0.7485011", "0.7482152", "0.7482152", "0.7476215", "0.74714524", "0.7460483", "0.74598414", "0.7452369", "0.7452099", "0.7447832", "0.7447832", "0.7447174", "0.7439963", "0.74352556", "0.74323756", "0.74313736", "0.74313736", "0.74313736", "0.74313736", "0.7426099", "0.74234414", "0.74234414", "0.74234414", "0.74234414", "0.74234414", "0.74234414", "0.74234414", "0.74234414", "0.74234414", "0.74234414", "0.74234414", "0.74234414" ]
0.7538565
55
Check input for number and handle if not
function checkInput(e) { console.log(e.target.value); //check if value is a valid number (even number as strings) if (isNaN(e.target.value)) { //is not a number console.log("Not a number"); allowStep2 = false; sliderInputLine.style.background = "red"; step1Button.style.background = "#acacac"; } else { //is a number console.log("Nummberr"); allowStep2 = true; slider.value = e.target.value; sliderInputLine.style.removeProperty("background"); step1Button.style.removeProperty("background"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isInputNumber(evt){\n var ch =String.fromCharCode(evt.which);\n if(!(/[0-9]/.test(ch))){\n evt.preventDefault();\n }\n }", "function isInputNumber(e) {\n let regularExpresion = new RegExp('^[1-9]?[0-9]{1}$|^100$');\n let regExpOk = regularExpresion.test(e.target.value);\n if ( !regExpOk && (e.target.value != '') ){\n e.preventDefault();\n e.target.value = '';\n return false;\n } else {\n return true;\n }\n}", "function isValidNumber(input) {\n return typeof input === 'number' && isFinite(input);\n }", "function numberIsNumber(userInput) {\n var userInputNumber = parseInt(userInput)\n\n if (Number.isNaN(userInputNumber) && !userInput) {\n\n return false\n }\n return true\n}", "function isValidNumber(input) {\n // var num = Number.parseInt(input);\n // var numText = num + \"\";\n if (isNaN(input)) {\n return false;\n }\n return true;\n}", "function isNumeric(input) {\n return (typeof input) == \"number\";\n}", "function isValidNumber(input) {\n return typeof input === \"number\" && isFinite(input);\n }", "function isNumeric(input) { return (input - 0) == input && input.length > 0;}", "function isValidNumber(input) {\n return typeof input === 'number' && isFinite(input);\n }", "function isValidNumber ( input ) {\r\n\t\treturn typeof input === 'number' && isFinite( input );\r\n\t}", "function isValidNumber ( input ) {\r\n\t\treturn typeof input === 'number' && isFinite( input );\r\n\t}", "function isValidNumber ( input ) {\n\t\treturn typeof input === 'number' && isFinite( input );\n\t}", "function isValidNumber ( input ) {\n\t\treturn typeof input === 'number' && isFinite( input );\n\t}", "function validateInputNumber(input) {\n\tinput.value = formatNumber(input.value);\n\tif (!isNumber(input.value)) {\n\t\tinput.value = '';\n\t}\n}", "function validateNumber (inputVal) {\n let inputNum = Number(inputVal);\n if (inputNum || inputVal === '' || inputVal === '.' || Number.isInteger(inputNum)) {\n return true;\n }\n return false;\n}", "function validNumber(input){\r\n\treturn (input.length == 10 || input[0] == \"0\");\r\n}", "function checkNumber (input) {\n\t\tif (input <= 100 && input >= 1) {\n\t\t\tfizzbuzz();\n\t\t} else if (isNaN(input)) {\n\t\t\tprompt('You did not enter a number. Please enter a number between 1 and 100');\n\t\t} else {\n\t\t\tprompt('Your number (' + input + ') is not between 1 and 100. Please enter a number between 1 and 100');\n\t\t}\n\t}", "function checkInputTypeNumber(){\n\n\t\tvar inputElem = document.createElement('input'),\n\t\tsmile = ':)',\n\t\tbool = false;\n\n\t\tinputElem.setAttribute('type', 'number');\n\t\tbool = inputElem.type !== 'text';\n\t\tif( bool ) {\n\t\t\tinputElem.value = smile;\n\t\t\tbool = inputElem.value != smile;\n\t\t}\n\n\t\treturn bool;\n\t}", "function inputNumber (canEmpty, type, elementname) {\n var element = type + '[name=\"' + elementname + '\"]'\n var value = $(element).val()\n var returnValue\n if (canEmpty) {\n var regexIntOrEmpty = new RegExp(/^(\\s*|\\d+)$/)\n if (regexIntOrEmpty.test(value)) {\n resetinput(element)\n returnValue = false\n } else {\n inputwarning(element)\n returnValue = true\n }\n } else {\n var regexInt = new RegExp(/^\\d+$/)\n if (regexInt.test(value)) {\n resetinput(element)\n returnValue = false\n } else {\n inputwarning(element)\n returnValue = true\n }\n }\n return returnValue\n }", "hasNumber(inputString) {\r\n return /\\d/.test(inputString);\r\n }", "function isNumber(num){\n\t\treturn !isNaN(num);\n\t}", "function numberCheck(value, valueName){\n if(!Utils.isNumber(value) ){\n handleEmtpyValue(valueName +\" is not a number.\\n\");\n }\n }", "function numericTypeCheck(input) {\r\n return /^-?[0-9]\\d*(\\.\\d+)?$/.test(input);\r\n}", "function isNumber(input){\n\tif (input.match(/[0-9]+/)) {\n return true;\n } else {\n return false;\n }\n}", "function isNumericInput(event) {\n const key = event.keyCode;\n return ((key >= 48 && key <= 57) || // Allow number line\n (key >= 96 && key <= 105) // Allow number pad\n );\n}", "function numeric(campo){\r\n if (isNaN(parseInt(campo.value))) {\r\n alert('Este campo debe ser un número');\r\n return false;\r\n }else{\r\n \treturn true;\r\n }\r\n\r\n}", "function isNumber(num){\n return !isNaN(num)\n}", "function checkForNumber(t) {\n let regex = /\\d/g;\n return regex.test(t);\n}", "function checkForNumber(t) {\n let regex = /\\d/g;\n return regex.test(t);\n}", "function isNumber(input) {\n if (input.match(/[0-9]+/)) {\n return true;\n } else {\n return false;\n }\n}", "function number(value,input)\n{\n\tif (isNaN(value)){\n\t\treadline.question('Enter a number : ', value => {number(value,input); });\n\t\t}\n\telse\n\tcalculate(value,input);\n\t\n}", "function isNum(num){\r\n return typeof(num) === 'number'; \r\n}", "function isNumber(e){return!isNaN(parseFloat(e))&&isFinite(e)}", "function onlyNumeric() {\n //Get element id\n const idName = this.id;\n // Regex that checks if input has somethong that is not a digit\n const current_value = $(`#${idName}`).val();\n const re = new RegExp(/(\\D+)/gi);\n const match = re.exec(current_value);\n // Check match\n if (match != null) {\n // remove user input\n $(`#${idName}`).val(\"\");\n // Put error message\n $(`#${idName}_wi`).text(\"¡Sólo se admiten valores numéricos!\");\n $(`#${idName}_wi`).show();\n } else {\n // Hide error message\n $(`#${idName}_wi`).text(\"\");\n $(`#${idName}_wi`).hide();\n }\n}", "function number(value) {\r\n return typeof value === 'number' && !isNaN(value);\r\n }", "function isNumeric(input) {\n if(isNaN(parseFloat(input))) {\n return false;\n } else {\n return true;\n }\n}", "function CheckNumeric(num) {\r\n\tif (isNaN(num) || num == '' || num == null) {\r\n\t\tnum = 0;\r\n\t}\r\n\treturn num;\r\n}", "function CheckNumeric(num) {\r\n\tif (isNaN(num) || num == '' || num == null) {\r\n\t\tnum = 0;\r\n\t}\r\n\treturn num;\r\n}", "function isNumber(arg){\n if (isNaN(arg)){\n console.log (\"that ain't no number!\");\n }\n else {\n console.log ('that sure is a number!');\n }\n}", "function numCheck(entry) {\n\tlet regex = /^[0-9]+$/i;\n\tif (entry != null && entry.match(regex)) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "function isNum(num){\r\n return typeof(num) === 'number'; \r\n}", "function isNumeric(input) {\n return (input - 0) == input && (''+input).trim().length > 0;\n}", "function validateNumber(numberInput) {\n var x = numberInput;\n \n try {\n if(x == \"\") throw \"is empty\"\n if(isNaN(x)) throw \"is not a number\"\n x = Number(x);\n if(x > 10) throw \"is too high\"\n if(x < 5) throw \"is too low\"\n \n }\n catch(err) {\n console.log(\"Catch : \" + err);\n }\n finally {\n console.log(\"Finally : \");\n }\n}", "function numberCheck (input) {\n\tif (input >= 0 && input <= 9) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "function validateNumber(val) {\n if(Number.isInteger(parseFloat(val)) == true && Math.sign(val) == 1) {\n return true\n } else {\n return 'Invalid quantity input!!'\n } \n}", "function isNumeric(input) {\n return input !== undefined\n && input !== null\n && (typeof input === 'number' || parseInt(input, 10) == input);\n}", "function numCheck(){\n let input = document.querySelector('input[type=\"text\"]').value;\n let check = parseInt(input);\n if (isNaN(check) && input != \"\"){\n return false;\n } else {\n return true;\n }\n}", "function isNumber(value) { return typeof value === \"number\" || value instanceof Number; }", "function oneDigitAtLeastInput(input) {\n return /\\d+/.test(input.value);\n}", "function validInput(input) {\n return isInteger(input) && input > 0\n}", "function checkfornumber(element)\n{\n\tif(checkNumber(element) && checkRequired(element))\n\t{\n\t\treturn true;\n\t}\n\telse\n\t{\n\t\treturn false;\n\t}\n}", "function isNumber(n) { return /^-?[\\d.]+(?:e-?\\d+)?$/.test(n); }", "function isNumber(n) { return /^-?[\\d.]+(?:e-?\\d+)?$/.test(n); }", "function checkInput(value) {\n return !isNaN(value);\n}", "function CheckNumeric(num){\r\n if(isNaN(num) || num=='' || num==null)\r\n {\r\n num=0;\r\n }\r\n return num;\r\n}", "function CheckNumeric(num){\r\n if(isNaN(num) || num=='' || num==null)\r\n {\r\n num=0;\r\n }\r\n return num;\r\n}", "function EntryCheckForNumbers() {\r\n let userEntry ; \r\n do {userEntry = +prompt('attention please - only Numbers');} \r\n while (userEntry !== +userEntry || userEntry === 0); \r\n console.log ('Thank you very much');\r\n return userEntry;\r\n}", "function isNumeric(inputi) {\n return !isNaN(parseFloat(inputi));\n}", "function validarNumeros(parametro) {\r\n\tif (!/^([0-9])*$/.test(parametro)) {\r\n\t\treturn false;\r\n\t}else {\r\n\t\treturn true;\r\n\t}\r\n}", "function isItANumber(parameter) {\n if (isNaN(parameter) === false) {\n return \"That's a number!\"\n }\n}", "function checkisNum(number) {\n if(typeof number=== 'number' && number>0 ){\n return true;\n }\n return false;\n}", "function isNumeric(input) {\n var numericBoolean = !isNaN(input);\n return numericBoolean\n}", "function checkInputNumber(input){\n\t\tvar result = null;\n\n\t\tif(input.length == 3){\n\t\t\tif(result = isSixthPrize(input)){\n\t\t\t}else{result = isAdditionalPrize(input);}\n\t\t}else if(input.length == 4){\n\t\t\tresult = isFifthPrize(input);\n\t\t}else if(input.length == 5){\n\t\t\tresult = isForthPrize(input);\n\t\t}else if(input.length == 6){\n\t\t\tresult = isThirdPrize(input);\n\t\t}else if(input.length == 7){\n\t\t\tresult = isSecondPrize(input);\t\n\t\t}else if(input.length == 8){\n\t\t\tif(result = isSpecialPrize(input)){\n\t\t\t}else if (result = isTopPrize(input, 8)){\n\t\t\t}else { result = isFirstPrize(input, 8);}\n\t\t}else{\n\t\t\tconsole.log('Numbers of input error!');\n\t\t}\n\n\t\t//not get it\n\t\tif(result == null){\n\t\t\treturn null\n\t\t//if get it\n\t\t}else{\n\t\t\treturn result;\n\t\t}\n\t}", "function isNum(n) {\n return (!isNaN(parseFloat(n)) && isFinite(n));\n}", "function validate(num) {\r\n // return Number.isInteger(num);\r\n\r\n //return num !== isNaN && num >= 0 && num <= 100;\r\n return typeof num === \"number\" && num >= 0 && num <= 100;\r\n\r\n\r\n\r\n}", "checkNumInput(txt, min, max, err_reason, err_msg){\n var val\n // Handle input with errors\n if (txt === ''){\n val = ''\n }\n else if (Number.isNaN(parseInt(txt))){\n val = ''\n this.setInputNumberErrorMessage(err_reason, err_msg)\n } else if (parseInt(txt).toString() !== txt){\n val = parseInt(txt)\n this.setInputNumberErrorMessage(err_reason, err_msg)\n } else if (parseInt(txt) < min){\n val = min\n this.setInputNumberErrorMessage(err_reason, err_msg)\n } else if (parseInt(txt) > max){\n val = max\n this.setInputNumberErrorMessage(err_reason, err_msg)\n } else {\n val = parseInt(txt)\n }\n\n return val\n }", "function isNumber(n) { return !isNaN(parseFloat(n)) && !isNaN(n - 0) }", "function isNumber(n) {\n return !isNaN(n) && (typeof n === TYPE_NUMBER.toLowerCase() || isType(Number(n), TYPE_NUMBER));\n }", "function IsANumber(value) {//returns true if the given variable is a number.\n return (typeof value === \"number\");\n}", "function IsNumber(e) {\n\ttecla = (document.all) ? e.keyCode : e.which;\n\tif(tecla==0){\n\t\treturn true;\n\t}else{\n\t\tif (tecla==8) return true;\n\t\tpatron = /\\d/; // Solo acepta números\n\t\tte = String.fromCharCode(tecla);\n\t\treturn patron.test(te);\n\t}\n}", "function checkNumber(x) {\n return !isNaN(+x);\n}", "function numericCheck(inputString) {\n return /^[0-9]+$/.test(inputString);\n}", "function isNumeric(num){\n return !isNaN(num)\n}", "function isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n } //Apply cap a value at a high or low number", "function _isNumber(num){\n return typeof(num) === \"number\" && !isNaN(num);\n }", "function is_number(e) {\n\tvar c = e.which ? e.which : e.keyCode;\n\treturn (c <= 32 || (c >= 48 && c <= 57) || c == 40 || c == 41 || c == 45 || c == 46)\n}", "handleInputChange(event) {\n let input = event.target.value;\n if (!Number(input)) {\n this.setState({ valid: false });\n return;\n }\n this.setState({ input: event.target.value });\n this.setState({ valid: true });\n }", "function validateNum(){\r\n\tvar num = document.survey_form.informative.value; //get the value\r\n\t//make sure the entry is a number\r\n\tvar numPattern = /^[0-9]+$/;\r\n\tif(!numPattern.test(num)){alert(\"Please enter a numerical value.\" )}\r\n\t//if the value is less than 0 or greater than 10, it is not valid.\r\n\tif (num < 0 || num > 10)\t\t\t\r\n\t\t{alert(\"Please enter a number between 0 and 10\" )}\t\r\n\t}", "function verifyInt(input)\n{\n var x = parseInt(input.value, 10);\n if (isNaN(x) || x < 0) {\n input.value = \"\";\n input.focus();\n } else\n gasUse();\n return;\n}", "function validate_isNum(evt) {\n var theEvent = evt || window.event;\n var key = theEvent.keyCode || theEvent.which;\n key = String.fromCharCode( key );\n var regex = /[0-9]|\\./;\n if( !regex.test(key) ) {\n theEvent.returnValue = false;\n if(theEvent.preventDefault) theEvent.preventDefault();\n }\n}", "function allnumeric(unummer) {\n var numbers = /^[0-9]+$/;\n if (unummer.value.match(numbers)) {\n return true;\n } else {\n alert(\"Vul alle velden in. Sommige velden (gewicht, grootte) moeten ALLEEN numerieke tekens bevatten\");\n unummer.focus();\n return false;\n }\n}", "function checkNum() {\n for (let i = arguments.length - 1; i >= 0; i--) {\n if (isNaN(arguments[i]) || arguments[i] < 0) {\n return false;\n }\n continue;\n }\n return true;\n }", "function isItANumber(parameter) {\n // if (isNaN(parameter) === false) {\n // return \"That's a number!\"\n // } else {\n // return \"That's not a number...\"\n // }\n return (isNaN(parameter)) ? \"That's not a number...\" : \"That's a number!\";\n}", "function isNumeric(val){return(parseFloat(val,10)==(val*1));}", "function allnumeric(inputtxt){\n var numbers = /^[0-9]/\n if(inputtxt.match(numbers)){\n return true;\n }\n else{\n alert('Please input numeric characters above zero only');\n rawcode.value = \"\"\n return false;\n }\n }", "function controlNumberInput(question) {\n input = Number(readlineSync.question(question));\n if (isNaN(input)) {\n askAgain = '\\nSorry, I didn\\'t understand that. Please tell me a number. Like \"20\".\\n'\n while(isNaN(input)) {\n input = Number(readlineSync.question(askAgain));\n }\n }\n return input;\n}", "function CHMisNumber(theInputField)\r\n{\r\n\r\n theInput = theInputField.value;\r\n theLength = theInput.length ;\r\n for (var i = 0 ; i < theLength ; i++)\r\n {\r\n\t//check if number field contains alphabets or spaces\r\n if (theInput.charAt(i) < '0' || theInput.charAt(i) > '9')\r\n {\r\n\t return false;\r\n\t}\r\n }// for ends\r\n return true;\r\n}// function isNumber ends", "function esNumero(numero){\n console.log(\"Estoy en la funcion 'esNumero'\");\n return !isNaN(numero);\n}", "function esNumero(numero){\n console.log(\"Estoy en la funcion 'esNumero'\");\n return !isNaN(numero);\n}", "function isNumber(n) {\n return !isNaN(parseInt(n))\n}", "function validateNumber(value) {\n var valid = Number.isInteger(parseFloat(value));\n var sign = Math.sign(value);\n\n if (valid && (sign === 1)) {\n return true;\n } else {\n return \"Please enter a number\";\n }\n}", "function checkNum(str){\n var num = parseInt(str, 10);\n return (!isNaN(num) && !(num < 1));\n}", "function validateNumber(answer) {\n\n var reg = /^\\d+$/;\n return reg.test(answer) || \"Please input a number!\";\n\n}", "function validateNumber(answer) {\n\n var reg = /^\\d+$/;\n return reg.test(answer) || \"Please input a number!\";\n\n}", "function isNumeric(n) {\n return !isNaN(parseFloat(n));\n}", "function checkNum(objText){\r\n\tvar newNum = parseInt(objText.val());\r\n\tif(isNaN(newNum)){\r\n\t\treturn false;\r\n\t}else{return true;}\r\n}", "function checkAllowNumber(e) {\n var code = (e.which) ? e.which : e.keyCode;\n if ((code < 48 || code > 57) && code != 8 && code != 13 && code != 27 && code != 0 && code != 46 && (code < 37 || code > 40)) {\n return false;\n }\n return true;\n}", "function isNumeric(n){\n return !isNaN(parseFloat(n)) && isFinite(n);\n }", "function validNumber(obj){\n\tvar formObj = document.getElementById(obj.id);\n var filter = /^([0-9\\.])+$/;\n if (!filter.test(formObj.value)) {\n// \talert(\"Please input number !\");\n \tComShowCodeMessage('COM12178');\n \tformObj.value=\"\";\n }\n return true;\n}", "isNumeric(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }", "function isNumeric(n) {\n console.log(n, typeof n);\n return !isNaN(parseFloat(n)) && isFinite(n);\n }" ]
[ "0.75849277", "0.7581397", "0.7495194", "0.74772006", "0.7453199", "0.74108815", "0.73889863", "0.7386815", "0.7384658", "0.73415124", "0.73415124", "0.73023343", "0.73023343", "0.7276251", "0.72664434", "0.7257845", "0.7240908", "0.7210033", "0.71980447", "0.719417", "0.7186216", "0.71824497", "0.71601397", "0.7146858", "0.71387583", "0.7118356", "0.7088413", "0.70817786", "0.70817786", "0.70586544", "0.70419425", "0.7041422", "0.7026382", "0.7023842", "0.7008647", "0.700537", "0.70045227", "0.70045227", "0.69769114", "0.6971526", "0.6962654", "0.69455945", "0.6942773", "0.6932971", "0.6932499", "0.6919844", "0.690989", "0.6906846", "0.68987536", "0.6880865", "0.68770486", "0.6868647", "0.6868647", "0.6865973", "0.6865138", "0.6865138", "0.68639076", "0.68603724", "0.6853828", "0.6853303", "0.6851588", "0.6846658", "0.6838113", "0.6820268", "0.68013805", "0.6795541", "0.67856246", "0.6781712", "0.6781691", "0.67768234", "0.6774324", "0.67739034", "0.6770333", "0.6766531", "0.6756041", "0.67489797", "0.6748768", "0.6744089", "0.6733141", "0.6730748", "0.6727003", "0.6721716", "0.6721283", "0.6711342", "0.6704342", "0.66989666", "0.6694372", "0.66915953", "0.66915953", "0.66864836", "0.667956", "0.6678481", "0.66761345", "0.66761345", "0.6675559", "0.66752267", "0.6674739", "0.66721225", "0.6672068", "0.6670747", "0.66600716" ]
0.0
-1
Change between period with refreshing onclick
function addClickEventToLI() { dropdownLIS = document.querySelectorAll("#step-1 .dropdown li"); dropdownLIS.forEach(li => { li.addEventListener("click", togglePeriod); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function doRefresh(){\n let nextUpdate = new Date();\n nextUpdate.setMinutes(nextUpdate.getMinutes() + 1);\n $('#nextUpdate').html(nextUpdate.toLocaleString());\n clearTable();\n loadDefaults();\n}", "scheduleRefresh() {}", "scheduleRefresh() {}", "function setRefresh () {\n setInterval( function() {window.location.reload();}, 20000);\n}", "function updateIntervalTime(number) {\n if ( !isNaN(number) ) {\n // Change interval\n config.interval = Math.max(5, number);\n\n // Update text\n $('#abAutoRefreshText').text(i18n.msg('autoRefresh', config.interval).plain());\n\n // Restart cycle\n loadData();\n }\n }", "handleRefresh() {\n this.updateToday();\n }", "function refresh() {\r\nsetInterval(\"location.reload()\",2000);\r\n}", "function refreshOn()\n{\n refreshInterval = setInterval(function () {refresh()}, 1000);\n}", "function changeRefreshInterval(){\n\t// Update resolution\n\tresolution = document.getElementById(\"refresh_rate\").value;\n\t// Stop current redraw interval\n\tclearInterval(interval);\n\t\n\t// Settings Update for Decay Mode\n\tif(DECAY_MODE){\n\t\tlow_value_decay = resolution / 1000;\n\t\tdecay_modifier = resolution / 1000;\n\t\t\n\t\t// Sets redraw interval\n\t\tinterval = setInterval(decayTick, resolution);\t\t\n\t}\n\t// Settings Update for Window Mode\n\telse{\n\t\ttime_range = document.getElementById(\"window_range\").value;\n\t\t// Reinitialize windows\n\t\thist_length = Math.floor(time_range / resolution); \n\t\tgather_window = new Array();\n\t\tcurrent_sum = new Array();\n\t\thist_window = new Array();\n\t\tvar i;\n\t\tfor(i = 0; i < hist_length; i++){\n\t\t\thist_window.push([['null','null', 0]]);\n\t\t}\n\t\t\n\t\t// Sets rotation interval\n\t\tinterval = setInterval(rotateWindow, resolution);\n\t}\n\t\n\n}", "function refresh() {\nsetInterval(\"location.reload()\",1000);\n}", "function timeRefresh() {\n var currentTime = new Date();\n hour = currentTime.getHours();\n minute = currentTime.getMinutes();\n if(hour > 11){ period = \"PM\" } else { period = \"AM\" };\n if(hour > 12){ hour -= 12 };\n if(hour == 0){ hour = 12 };\n if(minute < 10){ minute = \"0\" + minute }\n $(\"#hour\").text(hour);\n $(\"#minute\").text(minute + \" \" + period );\n setTimeout(timeRefresh, 1000);\n }", "function refreshbtn() {\n clearInterval(timerId);\n myAnimantion();\n }", "function setAutoRefresh(seconds) {\n window.setTimeout(function () {\n window.location.href = window.location.href;\n }, seconds * 1000);\n } // execute functions necessary for takeover", "set refreshMode(value) {}", "function updateTimeRange(val) {\n document.getElementById(\"downtime\").innerHTML = val;\n sessionStorage.setItem(\"downtimeVal\", val);\n sessionStorage.setItem(\"downtimeValSecs\", \"00\");\n}", "function timedRefresh(timeoutPeriod) {\n setTimeout(\"location.reload(true);\",timeoutPeriod);\n }", "function refreshPage() {\n // we're on the scheduled page and there is a scheduled date (ie not cancellation)\n // and calendar view is active and the scheduledDateTime is not on the calendar\n // force calendar to go to the new scheduled date\n if ($('.scheduled-page').length > 0 && schedule.scheduleDateTime && $('.scheduled-page').hasClass('calendar-view') && !(moment(schedule.scheduleDateTime).isAfter($('#schedule-calendar').fullCalendar('getView').start) && moment(schedule.scheduleDateTime).isBefore($('#schedule-calendar').fullCalendar('getView').end))) {\n $('#schedule-calendar').fullCalendar('render'); // render then go to the date incase its in the current month\n $('#schedule-calendar').fullCalendar('gotoDate', schedule.scheduleDateTime);\n } else {\n sch.resetParameters();\n if (schedule.isScheduling === false && schedule.isAllScheduled === true) {\n window.location.reload(true);\n }\n }\n }", "function refresh() {\n }", "refresh() {\n this.hours.refresh();\n this.minutes.refresh();\n this.amPm.refresh();\n }", "function refresh () {\n // If the ticker is not running already...\n if (ticker === 0) {\n // Let's create a new one!\n ticker = self.setInterval(render, Math.round(1000 / 60));\n }\n }", "function tiendaUpdate() {\r\n\tlocation.reload(true);\r\n}", "function idleRefresh () {\r\n\tif (currency_data.hasOwnProperty('today') &&\r\n\t\t\tcurrency_data.hasOwnProperty('tomorrow'))\r\n\t{\r\n\t\twnd[0].label = 'Курсы валют от ЦБ';\r\n\t\twnd[1].label = 'Сегодня:';\r\n\t\twnd[2].label = currency_data.tomorrow.date + ' :';\r\n\r\n\t\tvar diff = parseFloat(currency_data.tomorrow.usd.replace(',', '.')) -\r\n\t\t\tparseFloat(currency_data.today.usd.replace(',', '.'));\r\n\r\n\t\twnd[4].label = currency_data.today.usd;\r\n\t\twnd[5].label = diff.toFixed(4);\r\n\t\twnd[6].label = currency_data.tomorrow.usd;\r\n\r\n\t\tdiff = parseFloat(currency_data.tomorrow.eur.replace(',', '.')) -\r\n\t\t\tparseFloat(currency_data.today.eur.replace(',', '.'));\r\n\r\n\t\twnd[8].label = currency_data.today.eur;\r\n\t\twnd[9].label = diff.toFixed(4);\r\n\t\twnd[10].label = currency_data.tomorrow.eur;\r\n\t}\r\n}", "function autoRefresh() {\n window.location.reload();\n}", "function updateTimer() {\n\ttimeLeft = Math.max(timeLeft-1,0);\n\t$(\"div#refresh\").html(\"This page will refresh in \" + timeLeft + \" seconds\");\t\n}", "function toggle_refresh()\n{\n refresh_con = refresh_con == 1 ? 0 : 1;\n $('refresh').innerHTML = refresh_con == 1 ? 'Refresh On' : 'Refresh Off';\n new Effect.Highlight( 'refresh', { duration: 3, endcolor: \"#2d2d2d\" } );\n}", "function refresh() {\n setTimeout(function () {\n location.reload();\n }, 60000);\n }", "function AutoRefresh( t ) {\nsetTimeout(\"location.reload(true);\", t);\n}", "function refreshfunc() {\r\n if (user) {\r\n refresh = setInterval(status, 3000);\r\n }\r\n}", "changeInterval(interval){\n this.interval = interval;\n }", "function reload() {\n myStopWatch.textContent = '00:00';\n window.location.reload();\n }", "function timedRefresh(timeoutPeriod) {\n\tsetTimeout(\"location.reload(true)\",timeoutPeriod);\n}", "function timeChange() {\n setInterval(function () {\n date = moment().format('MMMM Do YYYY, h:mm a');\n after = moment().format(\"a\");\n\n colors();\n timeDis();\n }, 1000);\n}", "function dashboardUpdateAll() {\n\t\tdashboardSet('stars', whiteStar + whiteStar + whiteStar);\n\t\tdashboardSet('tally', 0);\n\t\tdashboardSet('reset', semicircleArrow);\n\t\tdocument.getElementsByClassName('current-timer')[0].innerHTML = \"00:00\";\n}", "function UpdateClicked_Period()\n{\n\tshowWaitAlert(getSeaPhrase(\"UPDATING_PERIOD_TE\",\"TE\"))\n\n\tif(arguments.length>0 && arguments[0]==\"Submitted\")\n\t\tUpdateTimeCard(\"Period\", \"Submitted\")\n\telse\n\t\tUpdateTimeCard(\"Period\")\n}", "function timedRefresh(timeoutPeriod) {\n setTimeout(update,timeoutPeriod);\n}", "function refresh() {\n setTrigger(trigger + 1)\n }", "function refresh(loadFromVal) {\n\n if (loadFromVal) {\n var spl = $this.val().split(':');\n\n // validation\n if ($.isNumeric(spl[0]) && $.isNumeric(spl[1]))\n date = new Date(0, 0, 0, spl[0], spl[1], 0, 0);\n else {\n console.warn('Invalid value', $this.val(), ' given. Time must be in the format hh:mm:ss.');\n return;\n }\n }\n\n // cleanup\n date.setSeconds(0);\n date.setMilliseconds(0);\n\n var hours = date.getHours();\n\n // reset if out of range\n if (hours < hoursMin)\n hours = hoursMin;\n else if (hours > hoursMax)\n hours = hoursMax;\n\n date.setHours(hours); // update\n\n // ampm\n dateIsPM = date.getHours() > 11;\n\n if (dateIsPM)\n $time_ap.addClass('jq-ci-t_ap--s');\n else\n $time_ap.removeClass('jq-ci-t_ap--s');\n\n $hours.children().removeClass('jq-ci-h_h--s jq-ci-hide');\n hour_items[hours - (dateIsPM ? 12 : 0)].addClass('jq-ci-h_h--s');\n $time_h.html(hours == 0 ? 12 : (hours - (hours > 12 ? 12 : 0)));\n\n // hide out of range selections\n for (var i = 0; i < hoursMin; i++) {\n if (i >= 12 && dateIsPM)\n hour_items[i - 12].addClass('jq-ci-hide');\n else if (i < 12 && !dateIsPM)\n hour_items[i].addClass('jq-ci-hide');\n }\n\n for (var i = hoursMax; i < 24; i++) {\n // if max is 6 but minutes are 40, we still need\n // to show 6\n if (i > (hoursMax + (minutesMax / 60))) {\n if (i >= 12 && dateIsPM) {\n hour_items[i - 12].addClass('jq-ci-hide');\n }\n else if (i < 12 && !dateIsPM) {\n hour_items[i].addClass('jq-ci-hide');\n }\n }\n }\n\n // minutes\n var minutes = Math.round(date.getMinutes() / 5) * 5; // round to nearest five\n\n // contain bounds\n if (hours == hoursMax && minutes > minutesMax)\n minutes = minutesMax;\n else if (hours == hoursMin && minutes < minutesMin)\n minutes = minutesMin;\n\n date.setMinutes(minutes); // update\n\n $minutes.children().removeClass('jq-ci-m_m--s jq-ci-hide');\n minute_items[minutes / 5].addClass('jq-ci-m_m--s');\n $time_m.html(forceLength(minutes, 2));\n\n // hide out of range selections\n if (hours == hoursMax) {\n for (var i = minutesMax + 5 /* start hiding *after* max */; i < 60; i += 5) {\n minute_items[i / 5].addClass('jq-ci-hide');\n }\n }\n\n // prev version has elseif here.\n // this doesn't work if hoursMin == hoursMax\n if (hours == hoursMin) {\n for (var i = 0; i < minutesMin; i += 5) {\n minute_items[i / 5].addClass('jq-ci-hide');\n }\n }\n\n // update html input\n var newVal = forceLength(date.getHours(), 2) + \":\" + forceLength(date.getMinutes(), 2);\n\n if (newVal != $this.val())\n $this.val(newVal).trigger('change');\n }", "function run() {\n\tvar dateRangeContainerHTML = \"\";\n\tdateRangeContainerHTML += \"<tr>\";\n\tdateRangeContainerHTML += \"<td bgcolor='#bdbdbd' colspan='2'>\";\n\tdateRangeContainerHTML += \"Indicate your desired date range\";\n\tdateRangeContainerHTML += \"From: <input id='from-time' name='from-time ' type='datetime-local'>\";\n\tdateRangeContainerHTML += \"To: <input id='to-time' name='to-time ' type='datetime-local'>\";\n\tdateRangeContainerHTML += \"<button id='stop-refresh'>Stop Refresh</button> \";\n\tdateRangeContainerHTML += \"<button id='start-refresh'>Set and Start</button>\";\n\tdateRangeContainerHTML += \"</td>\";\n\tdateRangeContainerHTML += \"</tr>\";\n\t$(\"tbody\").first().prepend(dateRangeContainerHTML);\n\n\t/* declarations and initializations */\n\tvar fromDate = getCookie(\"dmv_dt_from\");\n\tvar toDate = getCookie(\"dmv_dt_to\");\n\tvar refreshTimeout;\n\n\t/* if range defined, proceed with refresh */\n\tif (fromDate.length && toDate.length) {\n\t\t$(\"input#from-time\").val(fromDate);\n\t\t$(\"input#to-time\").val(toDate);\n\t\trefreshAndCheck();\n\t}\n\n\tfunction refreshAndCheck() {\n\t\tvar dateString = getFormattedDate($('p.alert').text());\n\t\tconsole.log(\"Testing date: \" + dateString,\" From: \" + fromDate, \" To: \" + toDate); // check in console\n\t\tif (isDateWithinRange(dateString, fromDate, toDate))\n\t\t\talert(\"DATE DETECTED FOR \" + dateString);\n\t\trefreshTimeout = setTimeout(function () { location.reload(); }, 10000);\n\t}\n\n\tfunction stopRefresh() {\n\t\tclearTimeout(refreshTimeout);\n\t\talert(\"Refresh Stopped!\");\n\t}\n\n\t/* attach button handlers */\n\t$(\"#stop-refresh\").unbind().click(function () {\n\t\tstopRefresh();\n\t});\n\t$(\"#start-refresh\").unbind().click(function () {\n\t\tfromDate = $(\"input#from-time\").val(); // (YYYY-MM-DDThh:mm) e.g. \"2014-02-05T14:03\"\n\t\ttoDate = $(\"input#to-time\").val();\n\t\tsetCookie(\"dmv_dt_from\", fromDate, \"365\");\n\t\tsetCookie(\"dmv_dt_to\", toDate, \"365\");\n\t\trefreshAndCheck();\n\t});\n}", "function refreshTimer() {\n $scope.refreshJobStatus();\n }", "function reFresh() {\r\n location.reload(true)\r\n //window.setInterval(\"reFresh()\",2000);\r\n}", "function setTime(timeSelection) {\r\n localStorage.setItem('timeSpeed', timeSelection);\r\n document.getElementById('normal').setAttribute('class', 'time-btn');\r\n document.getElementById('fast').setAttribute('class', 'time-btn');\r\n document.getElementById('hyper').setAttribute('class', 'time-btn');\r\n document.location.reload(); \r\n }", "function autoClick() {\n //simulate a click of <button id=\"refresh\">Refresh</button>\n \n }", "function updateTime(){\n setTimeContent(\"timer\");\n}", "function onTableRefresh() {\n\tthis.nowDate = new Date();\n\tthis.now = Building.seconds( this.nowDate.getTime() );\n}", "function execRequest() {\n setInterval(handleRefresh, 3000);\n}", "function update_time()\n{\n\t$('.cronos').each(function() {\n\t\tvar name = $(this).attr(\"name\");\n\t\tvar estado = parseInt($(this).attr(\"estado\"));\n\t\tvar time = $(this).val();\n\t\tvar ID = name.substring(6); // a partir de la 6 posicio\n\t\tvar capa = '#time_'+ID;\n\t\tvar capabotons = '#capabotons_'+ID;\n\t\t\n\t\t// color\n\t\tvar color = \"blue\";\n\t\tif (time<3600) color = \"orange\";\n\t\tif (time<300) color = \"red\";\n\t\t$(capa).html(strtotime(time));\n\t\t$(capa).css(\"color\", color);\n\t\t$(this).val(time-1);\n\t\tif (time<0 && estado < 5)\n\t\t\t$(capabotons).hide();\t\n\t});\t\n}", "function enaAutoRefresh() {\n autoRefreshVar = setInterval(() => {\n printQuote();\n }, 5000);\n\n disableEnableBtns(enaAutoRefreshBtn, disAutoRefreshBtn);\n}", "function update() {\n $.get(\"views/refreshStatus.php\", function(data) {\n $(\"#refresh\").html(data);\n });\n window.setTimeout(\"update();\", 2000);\n}", "function refresh(time) {\n window.mockDate = new Date(time);\n init();\n}", "function refresh(){\n setUpdate(!update)\n }", "function refresh() {\n scheduleRefresh(editor.value, output);\n}", "function refreshOff()\n{\n clearInterval(refreshInterval);\n}", "function updateClock() {\n newDate = new Date();\n newStamp = newDate.getTime();\n var diff = Math.round((newStamp-startStamp)/1000);\n\n var d = Math.floor(diff/(24*60*60));\n diff = diff-(d*24*60*60);\n var h = Math.floor(diff/(60*60));\n diff = diff-(h*60*60);\n var m = Math.floor(diff/(60));\n diff = diff-(m*60);\n var s = diff;\n\n document.getElementById(item.id).innerHTML = d+\" day(s), \"+h+\" hour(s), \"+m+\" minute(s), \"+s+\" second(s) active\";\n }", "function changeDisplay(val) {\r\n pomodoro.stop();\r\n pomodoro.time = val * 60;\r\n sessionDisplay.innerHTML = `${val}:00`;\r\n }", "function mainTick(){\n updatePage(new Date());\n}", "function PageReload () {\n if(location.reload(true)) {\n // document.getElementById(\"hour9\").value = localStorage.getItem(\"timeStamp\",\"valueStamp\");\n console.log(\"Test\");\n }\n}", "function setRefreshInterval() {\n refreshInterval = setInterval( moveRight, autoSlideChange); \n}", "function changeTime ( time, logout ) {\r\n __TIMER = time;\r\n __EXITM = logout;\r\n document.getElementsByClassName('toptime')[0].innerHTML = '</a> <div class=\"toptime\">Time remaining: <span>' + __TIMER + '</span> <a href=\"/logout\">[' + __EXITM + ']</a></div>';\r\n}", "function manualDate() {\r\n $('#reload').removeClass('btn-primary');\r\n $('#reload').addClass('btn-success');\r\n}", "function refresh() {\n\t\n\tif(refreshTime === \"\") {\n\t\t$('#RefreshTime').val(2);\n\t\trefreshTime = 2;\n\t}\n\n\tsetTimeout(refresh, parseFloat(refreshTime)*1000);\n\t//console.log('refresh values');\n\t\n\txhr = $.ajax({\n\t\t\turl: \"sensor_values.php\"\n\t\t});\n\n\txhr.done(function(msg) {\n\t\t\t$('#TEMP_VAL').text(msg.split(\"\\n\")[0]);\n\t\t\t$('#LIGHT_VAL').text(msg.split(\"\\n\")[1]);\n\t\t\t$('#PIR_VAL').text(msg.split(\"\\n\")[2]);\n\t\t});\n}", "function updatePeriod(h, new_period) {\n\n\tvar old_period = document.getElementById('period'+h).value;\n\tdocument.getElementById('period'+h).value=new_period;\n\n\t//debugfilter(h+''+old_period+'-'+h+''+new_period);\n\tif (document.getElementById('check'+h).checked)\n\t{\n\t\tdeleteColumnCells(h+''+old_period);\n\t\taddColumnCells(h+''+new_period);\n\t\taddColumnAjax(h, h+''+new_period);\n\n\t\treplaceColumnConfiguration(h+''+old_period,h+''+new_period);\n\t}\n}", "function auto_reload_change() {\r\n\tif (localStorage.getItem(\"autoReloadPage\") == \"false\") {\r\n\t\tdocument.getElementById(\"autoReloadStatus\").innerHTML = \"Enabled\";\r\n\t\tdocument.getElementById(\"autoReloadStatus\").style.color = \"#228B22\";\r\n\t\tlocalStorage.setItem(\"autoReloadPage\", \"true\");\r\n\t\tactivatePageRefresh();\r\n\t}else {\r\n\t\tdocument.getElementById(\"autoReloadStatus\").innerHTML = \"Disabled\";\r\n\t\tdocument.getElementById(\"autoReloadStatus\").style.color = \"#FF4500\";\r\n\t\tlocalStorage.setItem(\"autoReloadPage\", \"false\");\r\n\t\tdisablePageReload();\r\n\t}\r\n}", "function autoRefresh() {\n counter++\n if (counter === 15) {\n printQuote();\n counter = 0;\n }\n}", "interval (){\n const d = this.timer.currentDuration;\n const qs = (s) => this.target.querySelector(s);\n const f = Math.floor;\n\n //minutes\n qs('[data-timer-value=minutes-dozen]').innerText = f((d / 60) / 10);\n qs('[data-timer-value=minutes]').innerText = f((d / 60) % 10);\n\n //seconds (always)\n qs('[data-timer-value=seconds-dozen]').innerText = f((d % 60) / 10);\n qs('[data-timer-value=seconds]').innerText = d % 60 % 10;\n }", "function timedRefresh() {\n if (!MAPP.refreshTimer) {\n MAPP.refreshTimer = setTimeout(insertHtml, 300);\n }\n}", "function updateSession(){\n\n $(\"#countersession\").html(SESSIONCOUNTER);\n BASICTIMER = ONEMINUTE * SESSIONCOUNTER;\n\n if(MODE == 'session'){\n REFERENCE = BASICTIMER;\n updatePomodoroView(BASICTIMER);\n }\n}", "function refreshClock() {\n $('#timer').html(CustomTime.getTime);\n}", "function nextPeriod() {\n resetPuck();\n resetStrikers();\n periodNum += 1;\n period.innerHTML = \"PERIOD \" + periodNum;\n seconds = 30;\n }", "toggleInterval(){\n if(this.repeat_enable.checked && parseInt(this.repeat.value)){\n this.startInterval();\n }\n else {\n this.stopInterval();\n }\n }", "function refreshPage() {\n setTimeout(\"location.reload(true);\",0);\n }", "@action.bound refreshChart() {\n this.newChart();\n }", "function refreshCurrentDate() {\n\t\t\t\tdateCurrent = getDateInRange(dateCurrent, dateShadow, before, after);\n\t\t\t}", "function init() {\n var interval = setInterval(handleRefresh, 3000);\n handleRefresh();\n}", "function startRefreshing(){\n var objThis = this;\n\n if (strModeRefresh == \"on\"){\n intIntervalId = setInterval(checkDoneChallenges.bind(objThis), intRefreshRate);\n }\n }", "function m_aux_Update(obj_stock, fechaInicio, fechaFin) {\n document.getElementById(\"inicio\").value = formatDate(fechaInicio);\n document.getElementById(\"fin\").value = formatDate(fechaFin);\n obj_stock.e_update_click();\n}", "function update() {\n //Location.reload() method reloads the current URL, like the Refresh button.\n document.location.reload()\n}", "refresh()\n\t{\n\t}", "function AutoRefresh() {\n if (document.getElementById(\"cbxClouds\").checked == true || document.getElementById(\"cbxDayNight\").checked == true) {\n if (document.getElementById(\"btnAutoRefresh\").value == \"Auto-Refresh ON\") {\n document.getElementById(\"cbxAutoRefresh\").checked = true;\n document.getElementById(\"btnAutoRefresh\").value = \"Auto-Refresh OFF\";\n }\n else {\n document.getElementById(\"cbxAutoRefresh\").checked = false;\n clearInterval(countdownTimer);\n document.getElementById(\"btnAutoRefresh\").value = \"Auto-Refresh ON\";\n document.getElementById('countdown').innerHTML = \"Auto Refresh is OFF\";\n }\n\n }\n\n var isAutoRefresh = document.getElementById(\"cbxAutoRefresh\").checked;\n if (isAutoRefresh == true) {\n if (document.getElementById(\"cbxClouds\").checked == true || document.getElementById(\"cbxDayNight\").checked == true) {\n seconds = 900;\n countdownTimer = setInterval('secondPassed()', 1000);\n }\n else {\n clearInterval(countdownTimer);\n document.getElementById('countdown').innerHTML = \"Auto Refresh is OFF\";\n document.getElementById(\"btnAutoRefresh\").value = \"Auto-Refresh ON\";\n }\n }\n else {\n clearInterval(countdownTimer);\n document.getElementById('countdown').innerHTML = \"Auto Refresh is OFF\";\n document.getElementById(\"btnAutoRefresh\").value = \"Auto-Refresh ON\";\n }\n}", "function updateTime() {\n\n}", "function refresh (valor){\n\t\tif(puntos < 100 === true){\n\t\t\tvar def = 60;\n\t\t\tvalor = def;\n\t\t}\n\t\tif(puntos > 200 === true){\n\t\t\tvar def = 10;\n\t\t\tvalor = def;\n\t\t}\n\t\treturn valor;\n\t}", "function refreshAll() {\n\t\thideGraphs();\n\t\tmyTimer = setInterval(refreshAllWait, 100);\n\t}", "function updateTime() {\n\t\tvar dateTime = tizen.time.getCurrentDateTime(), secondToday = dateTime.getSeconds() + dateTime.getMinutes() * 60 + dateTime.getHours() * 3600,\n\t\tminDigitLeft = document.querySelector(\"#time-min-digit-left\"),\n\t\tminDigitRight = document.querySelector(\"#time-min-digit-right\"),\n\t\thourDigitLeft = document.querySelector(\"#time-hour-digit-left\"), \n\t\thourDigitRight = document.querySelector(\"#time-hour-digit-right\");\n\n\t\tvar minutesNow = (secondToday % 3600) / 60;\n\t\tvar hourNow = (secondToday / 3600);\n\t\tslideDigit(minDigitRight, minutesNow % 10.0);\n\t\tslideDigit(minDigitLeft, minutesNow / 10.0);\n\t\tslideDigit(hourDigitRight, hourNow % 10.0);\n\t\tslideDigit(hourDigitLeft, hourNow / 10.0);\n\t}", "function changeBotonContent( elemento ){\r\n \r\n elemento.click(function(){\r\n startTimer(10, $('#timer'));\r\n $(this).text(\"Reiniciar\");\r\n if($(this).text() === \"Reiniciar\"){\r\n elemento.click(function(){\r\n location.reload();\r\n });\r\n }\r\n }); \r\n}", "function resetCountdown() {\r\n location.reload()\r\n}", "function BackToPeriod()\n{\n\tif (boolSaveChanges || bSelectChanged)\n\t{\n\t\tSaveChanges(\"MoveToBackToPeriod()\", \"Daily\");\n\t}\n\telse\n\t{\n\t\tMoveToBackToPeriod();\n\t}\n}", "function refresh() {\n display.innerText = currentCalculation;\n}", "function prev() {\n handleRefresh( (+window.sessionStorage.week) - 1 );\n}", "function prev() {\n handleRefresh( (+window.sessionStorage.week) - 1 );\n}", "@observe(\"activated\")\n activatedChanged(newValue) {\n if (newValue) {\n this._intervalId = window.setInterval(() => {\n this.currentDateTime = moment().format(\"YYYY-MM-DD HH:mm:ss\");\n },\n 1000);\n } else {\n window.clearInterval(this._intervalId);\n }\n }", "function refresh() {\nwindow.location.reload();\n}", "function onRefreshClicked(event) {\n refresh();\n event.preventDefault();\n }", "function refreshTime() {\n\t\t\tvar now = getTime();\n\t\t\tvar date = { \n\t\t\t\t\t'en': now.day + ', ' + now.month + ' ' + now.date + '.' ,\n\t\t\t\t\t'de': now.day + ', ' + now.date + '. ' + now.month \n\t\t\t};\n\t\t\t$('#date').html(date[lang]);\n\n\t\t\t// 24h format all langs\n\t\t\t$('#time').html(\"<span class='hour'>\" + now.hour + \":</span>\" + \"<span class='minute'>\" + now.minute + \"</span>\" );\n\t\t}", "function refresh() {\n location.reload();\n bx.disabled = false;\n}", "function updateClock() {\n let today = new Date();\n let hours = today.getHours();\n let mins = util.zeroPad(today.getMinutes());\n\n myLabel.text = `${hours}:${mins}`;\n \n triggerDownload();\n}", "function updateClock() {\n\n let today = new Date(); // get current date/time\n\n // obtaining hours in user-preferred format and split them into 2 digits\n let hours = dtlib.format1224hour(today.getHours());\n let h1 = Math.floor(hours / 10);\n let h2 = hours % 10;\n\n // obtaining minutes and split them into 2 digits\n let mins = today.getMinutes();\n let m1 = Math.floor(mins / 10);\n let m2 = mins % 10;\n\n h1img.href = `digits/${h1}.png`;\n h2img.href = `digits/${h2}.png`;\n m1img.href = `digits/${m1}.png`;\n m2img.href = `digits/${m2}.png`;\n\n if (preferences.showActivity != \"disabled\") updateActivity(preferences.showActivity);\n\n}", "function afterReload () {\n //based on today date valid our html field(date field)\n valid.dateValidHtml();\n //see last time wich page was active \n let wichPage = localStorage.getItem('page');\n //show actived page with info that has have before\n switch(wichPage) {\n case '1':\n ui.showfirst();\n break;\n case null:\n ui.showfirst();\n break;\n case '2':\n ui.showMid();\n ui.cul();\n ui.addTitle();\n break;\n case '3':\n ui.showLast();\n ui.done();\n break;\n }\n}", "function calNext()\n{\nnextdate= getCalValue();\nlocation.reload();\nsetSelectedMonth(1,nextdate);\n}", "function refresh() {\n window.location.reload(true);\n}", "function refresh() {\n window.location.reload(true);\n}", "function refresh() {\n window.location.reload(true);\n}", "function updateAgo() {\n $(\"#agolabel\").text(\"Updated \" + getTimeSinceLastRead());\n\n var today = new Date();\n var h = today.getHours();\n var m = today.getMinutes();\n h = checkTime(h);\n m = checkTime(m);\n\n var clockString = h + \":\" + m;\n $(\"#clock\").html(clockString);\n setTimeout(\"updateAgo();\", 1000);\n}" ]
[ "0.68825096", "0.67292047", "0.67292047", "0.6644801", "0.6534746", "0.65260994", "0.6498279", "0.6463243", "0.64344376", "0.6398418", "0.6382496", "0.63329375", "0.63287085", "0.6294224", "0.62608135", "0.62406343", "0.6226506", "0.6221737", "0.61603916", "0.6156099", "0.61326855", "0.6108484", "0.6058765", "0.60555536", "0.60408044", "0.60389555", "0.6038317", "0.603636", "0.6034815", "0.6032266", "0.6021442", "0.60198885", "0.6004629", "0.59899765", "0.5982023", "0.5970982", "0.5958388", "0.5931862", "0.5921392", "0.59193546", "0.5914637", "0.5905788", "0.58929354", "0.58627445", "0.58574796", "0.58555895", "0.58548266", "0.58265066", "0.5825947", "0.58183366", "0.5818003", "0.5805598", "0.5795863", "0.5791617", "0.5784991", "0.5780916", "0.5778502", "0.57757616", "0.5772151", "0.5764106", "0.5761038", "0.57540214", "0.5752938", "0.57519436", "0.5749845", "0.57454365", "0.57295716", "0.5728052", "0.57202846", "0.571963", "0.5717241", "0.5709294", "0.5706272", "0.5703843", "0.5696536", "0.56942785", "0.56918", "0.5691627", "0.56846994", "0.5684586", "0.56817967", "0.5678607", "0.5666633", "0.56631124", "0.5658391", "0.5654659", "0.56533873", "0.56533873", "0.56482357", "0.56436956", "0.5636409", "0.56359833", "0.56313527", "0.5626406", "0.56236434", "0.5622122", "0.56211525", "0.56190753", "0.56190753", "0.56190753", "0.56166285" ]
0.0
-1
Get overview of latets three donations and top three donators
function getOverview() { db.collection("overview_visitor") .get() .then(function(querySnapshot) { querySnapshot.forEach(function(doc) { // doc.data() is never undefined for query doc snapshots console.log("Your document data is: ", doc.data()); overview = doc.data(); displayRecentDonors(); displayTopDonors(); }); }) .catch(function(error) { console.log("Error getting documents: ", error); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getResults() {\n // Grab all of the current donations\n $.getJSON(\"/all\", function(data) {\n // For each donation...\n for (var i = 0; i < data.length; i++) {\n // ...populate #results with a p-tag that includes the donation's dollars and object id\n $(\"#results\").prepend(\"<p class='data-entry' data-id=\" + data[i]._id + \"><span class='dataTitle' data-id=\" +\n data[i]._id + \">\" + data[i].dollars + \"</span><span class=delete>X</span></p>\");\n }\n });\n }", "function listDonations() {\n\t\tvar newHTML = [];\n\t\tfor (var i = 0; i < recentDonations.length; i++) {\n\t\t\tnewHTML.push('<div class=\"donationfrom donation' + [i] + '\" \">'\n\t \t+ '<p class=\"col-xs-6 col-md-6\"><strong>' + recentDonations[i].name + '</strong></p>' \n\t \t+ '<p class=\"col-xs-6 col-md-6 donationamount\">' + '£' + recentDonations[i].amount.toFixed(2) + '</p>'\n\t \t+ '<p class=\"col-xs-12 col-md-12\"><strong>'+ recentDonations[i].date +'</strong> '+ recentDonations[i].comment +'</p>' \n\t \t+ '<div class=\"clearfix\"></div>'\n\t \t+ '</div>');\n\t\t}\n\t\t$(\".commentcontainer\").html(newHTML.join(\"\"));\n\t}", "function showAdministratorData() {\n const totalUsers = document.querySelector(\".total-users\");\n const averageShoesUser = document.querySelector(\".average-shoes-user\");\n\n if (totalUsers) {\n\n fetch(\"https://5bdffe29f2ef840013994a15.mockapi.io/users\")\n .then(res => res.json())\n .then(function (data) {\n totalUsers.textContent = data.length;\n let totalOfShoes = 0;\n for (let i = 0; i < data.length; i++) {\n let number = parseInt(data[i].bonusCode);\n totalOfShoes += number;\n }\n averageShoesUser.textContent = Math.round(totalOfShoes / data.length * 100) / 100;\n }\n );\n }\n\n const totalDonations = document.querySelector(\".total-donations\");\n const totalShoesDonated = document.querySelector(\".total-shoes-donated\");\n const averageShoesDonation = document.querySelector(\".average-shoes-donation\");\n\n\n\n if (totalDonations) {\n\n fetch(\"https://5bdffe29f2ef840013994a15.mockapi.io/orders\")\n .then(res => res.json())\n .then(function (data) {\n totalDonations.textContent = data.length;\n let totalShoes = 0;\n for (let i = 0; i < data.length; i++) {\n let number = parseInt(data[i].pairs);\n totalShoes += number;\n\n }\n /*==================================================================\n [ List all the orders ]*/\n if (document.querySelectorAll(\".donation\").length < data.length) {\n for (let j = 0; j < data.length; j++) {\n const donationsContainer = document.querySelector(\".donations-list\");\n const donationsTemplate = document.querySelector(\"#donations-template\").content;\n let clone = donationsTemplate.cloneNode(true);\n clone.querySelector(\".reference-number\").textContent = \"Reference number: #\" + data[j].id;\n clone.querySelector(\".customer-name\").textContent = \"Donor name: \" + data[j].firstName + \" \" + data[j].lastName;\n clone.querySelector(\".donated-pairs\").textContent = \"Donated pairs of shoes: \" + data[j].pairs;\n clone.querySelector(\".pick-up-week\").textContent = \"Pick-up: \" + data[j].week;\n clone.querySelector(\".pick-up-time\").textContent = \"Pick-up time: \" + data[j].hour;\n clone.querySelector(\".customer-email\").textContent = \"Donor email: \" + data[j].email;\n clone.querySelector(\".customer-phone\").textContent = \"Donor phone: \" + data[j].phone;\n clone.querySelector(\".customer-address\").textContent = \"Donor address: \" + data[j].address;\n clone.querySelector(\".customer-message\").textContent = \"Donor message: \" + data[j].message;\n donationsContainer.appendChild(clone);\n }\n }\n totalShoesDonated.textContent = totalShoes;\n averageShoesDonation.textContent = Math.round(totalShoes / data.length * 100) / 100;\n }\n );\n }\n\n const moneyIncome = document.querySelector(\".money-income\");\n const totalPurchases = document.querySelector(\".total-purchases\");\n const averageIncomePurchase = document.querySelector(\".average-income-purchase\");\n const bonusCodesUsed = document.querySelector(\".bonus-codes-used\");\n const totalDiscountsCash = document.querySelector(\".total-discounts-used\");\n\n if (moneyIncome) {\n fetch(\"https://5bdffe29f2ef840013994a15.mockapi.io/money\")\n .then(res => res.json())\n .then(function (data) {\n let myTotalIncome = 0;\n let totalBonusCodesUsed = 0;\n for (let i = 0; i < data.length; i++) {\n let number = parseInt(data[i].paid);\n myTotalIncome += number;\n let numberCodes = parseInt(data[i].bonusCodesUsed);\n totalBonusCodesUsed += numberCodes;\n }\n moneyIncome.textContent = myTotalIncome + \",-\";\n averageIncomePurchase.textContent = Math.round(myTotalIncome / data.length) + \",-\";\n totalPurchases.textContent = data.length;\n bonusCodesUsed.textContent = totalBonusCodesUsed;\n totalDiscountsCash.textContent = totalBonusCodesUsed * 20 + \",-\";\n }\n );\n }\n\n const shoesOnSell = document.querySelector(\".shoes-on-sell\");\n const newShoesSell = document.querySelector(\".new-shoes-sell\");\n const oldShoesSell = document.querySelector(\".old-shoes-sell\");\n\n if (shoesOnSell) {\n fetch(\"https://5bdffe29f2ef840013994a15.mockapi.io/products\")\n .then(res => res.json())\n .then(function (data) {\n shoesOnSell.textContent = data.length;\n let myNewShoes = 0;\n for (let i = 0; i < data.length; i++) {\n if (data[i].condition == \"New\") {\n myNewShoes++;\n }\n newShoesSell.textContent = myNewShoes;\n oldShoesSell.textContent = data.length - myNewShoes;\n }\n }\n );\n }\n}", "function donationFunc(crpID, year) {\n var donateurl2 = \"/donate/\" + crpID + \"/\" + year;\n var xhr = new XMLHttpRequest();\n console.log(crpID + year)\n xhr.open(\"GET\", donateurl2);\n xhr.addEventListener('load', function() {\n var donateObj = JSON.parse(xhr.responseText);\n var contributions = donateObj.response[\"contributors\"][\"contributor\"];\n donateList.appendChild(donateToggle2);\n for (var i = 0; i < contributions.length; i++) {\n console.log(\"WE ARE IN THE FIRST FOR LOOP\")\n var org_name = contributions[i][\"@attributes\"][\"org_name\"];\n var total = parseInt(contributions[i][\"@attributes\"][\"total\"]);\n newDonate = new currentDonation(org_name, total);\n donationArr.push(newDonate);\n }\n for (l = 0; l < donationArr.length; l++) {\n var donateUL = document.createElement('ul');\n donateUL.setAttribute('id', 'donationList');\n var keys = Object.keys(donationArr[l]);\n for (k = 0; k < keys.length; k++) {\n var values = keys[k];\n var newKey = values.replace(/[_]/g, \" \");\n var li = document.createElement('li');\n li.setAttribute('class', 'donations');\n li.innerText = newKey + \": \" + donationArr[l][values];\n donateUL.appendChild(li);\n }\n var donateNum = document.createElement('h4');\n donateNum.innerText = \"Donation: \" + donationArr[l].Organization_Name;\n donateList.appendChild(donateNum);\n donateList.appendChild(donateUL);\n infoBox.appendChild(donateList);\n donateCounter++;\n console.log(\"DONATION LIST WAS CREATED\");\n }\n for (i = 0; i < donationArr.length; i++) {\n totalDonate += donationArr[i].Total_Amount;\n };\n console.log(parseInt(totalDonate));\n donateTotal.innerText = \"Total Donation Amount: $\" + totalDonate;\n donateBubble.appendChild(donateTotal);\n donateBubble.appendChild(donateToggle1);\n infoBox.appendChild(donateBubble);\n page.appendChild(infoBox);\n donationCircles(processData(donationArr));\n console.log(\"THE BUBBLES WERE MADE!!!!\");\n })\n xhr.send();\n }", "function done() {\n console.log(\"*** 5 Most expensive items *** \");\n var pResults = answers.mostExpensiveItems();\n var a = Object.keys(pResults);\n a.forEach(function (key) {\n console.log(\"category: \", key, pResults[key].getMostExpensive());\n });\n\n var lCds = answers.longRunningCDs();\n console.log(\"*** Long running CDs *** \");\n console.log(lCds);\n\n console.log(\"*** Authors that have published CDs also *** \");\n var authors = answers.authorsWithCdAndBook();\n console.log(authors);\n\n console.log(\"*** Items that have a title, track, or chapter that contains a year *** \");\n var lastOne = answers.boringLastResult();\n console.log(lastOne);\n}", "function fetchTopFundraisers() {\n var page = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;\n var limit = arguments.length > 1 ? arguments[1] : undefined;\n var paginated = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n return new Promise(function (resolve, reject) {\n if (!paginated) {\n page = 1;\n }\n\n external_commonjs_vue_commonjs2_vue_root_Vue_default.a.axios.get(\"\".concat(baseURL, \"/donors?_sort=total_raised&_order=desc&_limit=\").concat(limit, \"&_page=\").concat(page++)).then(function (response) {\n if (response.data.length) {\n resolve(response.data);\n } else {\n reject({\n code: 404\n });\n }\n }).catch(function (e) {\n reject(e);\n });\n });\n}", "function populateDonorList(){\n sorted_full_donors = getSortedArrayByKey(donor_list, \"search_name\", true);\n\n\n for(index in sorted_full_donors){\n donor = sorted_full_donors[index];\n\n donor_html = \"\";\n\n donor_search_key = donor.search_name.toUpperCase();\n\n if(donor.categories.length == 0){\n donor_html += \"<li class='donor' data-search-name='\" + donor_search_key + \"' >\" +\n \"<span>\" + \n donor.title + \n \"</span></li>\";\n }\n\n for(cat_index in donor.categories){\n cat = donor.categories[cat_index];\n\n cat_key = cat.url_title.toLowerCase().replace(/\\ /g, '_');\n\n real_cat = donor_categories[cat_key];\n\n donor_text = \"<span class='donor-display-name'>\" + donor.title + \"</span><span class='donor-display-cat'>\" + real_cat.title + \"<span>\" ;\n\n donor_html = \"\";\n donor_html += \"<li class='donor donor-with-detail' data-search-name='\" + donor_search_key + \"'>\" +\n \"<a href='#' slider-nav='\" + real_cat.id +\"'>\" +\n donor_text + \n \"</a></li>\";\n \n\n $(\".donor-list\").append(donor_html);\n\n }\n }\n}", "function getData(donors) {\r\n\r\n\tjQuery.each(donors, function(i, donor) {\r\n\t\tvar id = donor.id;\r\n\t\tvar name = donor.firstName;\r\n\t\tvar lname = donor.lastName;\r\n\t\tvar address = donor.address.street + \",\" + donor.address.city + \",\"\r\n\t\t\t\t+ donor.address.state;\r\n\t\thelper(id, name, lname, address);\r\n\r\n\t});\r\n\r\n}", "getMultiOwnerInfo() {\n if (this._payingUsers.length <= 1) { return null; }\n const info = [];\n this._payingUsers.forEach((payerObj) => {\n const portionOfTipOwed = (payerObj.percentage / 100) * (this.tip || 0);\n const portionOfInvoiceOwed = (payerObj.percentage / 100) * this.addServiceFee(this.amount);\n const totalPaidAmt = (portionOfTipOwed + portionOfInvoiceOwed).toFixed(2);\n const ownerInfo = {\n name: payerObj._user.name,\n percentage: payerObj.percentage,\n paidAmount: totalPaidAmt,\n };\n info.push(ownerInfo);\n });\n return info;\n }", "function getDonationServices(){\n\tvar donationServices = [\n\t //renew registeration\n\t {\tserviceId:\t\"227\",\n\t \tamount:1\n\t },\n\t // fines\n\t {\tserviceId:\t\"1060\",\n\t \tamount:1\n\t },\n\t //Top up nol\n\t {\tserviceId:\t\"172\",\n\t \tamount:1\n\t },\n\t //Apply for Personalized nol Card\n\t {\tserviceId:\t\"171\",\n\t \tamount:1\n\t }\n\t ];\n\treturn {\n\t\tdonationServices : donationServices \n\t}\n}", "function show_top_dists() {\n $('div.t4').css('position', 'relative');\n $('<div />').attr('id', 'top_dists').css({ 'width' : '400px', 'border' : '1px solid #006699', 'position' : 'absolute', 'top' : '40px', 'right' : '0px', 'padding' : '8px', 'font-size' : '12px', 'font-weight' : 'normal', 'color': '#000' }).appendTo('div.t4');\n var txt = '<p style=\"text-align: center; font-size: 12px; font-weight: bold;\">Distributions in order of number of CPAN dependents:<p>';\n dependent_counts = assocSort(dependent_counts);\n for ( var dist in dependent_counts ) {\n txt += '<p>' + dist + ' (' + dependent_counts[dist] + ' dependents)';\n txt += '<br />';\n for ( module in infoblocks_by_module ) {\n if ( infoblocks_by_module[module] && dists_by_module[module] == dist ) {\n txt += '&nbsp;&nbsp;&nbsp;&nbsp;' + module + '<br />';\n }\n }\n txt += \"</p>\";\n }\n $(\"#top_dists\").html(txt);\n}", "function getTop30CustomersV3(deliveries) {\n const THIRTY_DAYS_IN_MS = 30 * 24 * 60 * 60 * 1000,\n top30 = [], // will return top 30\n today = Date.now(); // milliseconds\n\n // filter out all the deliveries that are older than 30 days\n const recentDeliveries = deliveries.filter(function(deliveries.date){\n return (today - Date.parse(deliveries.date)) < THIRTY_DAYS_IN_MS;\n });\n\n // sort asc\n recentDeliveries.sort(function(a,b){\n return Date.parse(a.date) - Date.parse(b.date);\n });\n\n // create hashtable\n const users = recentDeliveries.reduce((obj, item) => {\n let name = item.customer.name;\n (!obj[name]) ? obj[name] = {count: 0, date: ''} || null; // add the key if it doesn't exist\n obj[name].count++; // increment it\n obj[name].date = item.date; // get last date\n return obj;\n }, {}) // start with an empty array\n\n // fill in top30\n for (item in users) {\n top30.push({\n name: item,\n lastDeliveryDate: item.date,\n count: item.count\n });\n }\n\n // top 30 customers, unsorted\n return top30;\n}", "function updateDonations(gonations) {\n let sum = 0;\n let donations = [];\n for (donation of gonations) {\n sum += donation.amount;\n if (donation.name != \"Anonyymi\") {\n donations.push(donation);\n }\n }\n\n const activityDiv = document.getElementById('activities');\n\n if (donations.length == shown_donations.length || !donationsInitialized) {\n if (!activityRotationDisabled) {\n activityDiv.innerHTML = '';\n activityDiv.innerText = idletexts[current_idletext]\n }\n if (!donationsInitialized) {\n shown_donations = donations.reverse();\n }\n return sum;\n }\n\n activityDiv.innerHTML = '';\n // Update latest donations list\n \n let i = 0;\n\n for (donation of donations.reverse()) {\n var child = document.createElement('div');\n var text = document.createTextNode(`${donation.name}: ${donation.amount} e`);\n child.appendChild(text);\n child.id = donation.id;\n child.className = 'donation';\n\n // Add class the New entries in donations list\n if (!shown_donations.find((d) => d.id == donation.id)) {\n child.classList.add('new');\n }\n activityDiv.appendChild(child);\n var divider = document.createElement('div');\n text = document.createTextNode(\">\");\n divider.appendChild(text);\n divider.className = 'divider';\n activityDiv.appendChild(divider);\n i++;\n if (i > 15) {\n break;\n }\n }\n \n shown_donations = donations.reverse();\n\n // Show donations list immediately\n let classList = activityDiv.classList.toString();\n activityDiv.classList.remove('previous', 'next');\n activityDiv.classList.add('current', 'forced');\n if (activityRotationDisabled) {\n clearTimeout(activityRotationTimeout);\n }\n activityRotationDisabled = true;\n activityRotationTimeout = setTimeout(() => {\n activityDiv.className = classList;\n activityDiv.classList.remove('forced');\n activityRotationDisabled = false;\n rotateActivities();\n }, 45000);\n\n return sum;\n}", "function getUserDonations(data) {\n return dispatch => {\n dispatch(progressBarActions.start());\n baseServices.GET(queries.getUserDonationsQuery(data)).then(\n response => {\n dispatch(progressBarActions.stop());\n dispatch(success(response));\n },\n error => {\n dispatch(progressBarActions.stop());\n dispatch(snackBarActions.snackBarError(\"Connection Error!\"));\n }\n );\n };\n function success(payload) {\n return { type: baseConstants.GET_USER_DONATIONS_SUCCESS, payload };\n }\n}", "function getPartyMembers() {\n let democrats = [];\n let republicans = [];\n let independents = [];\n let total = [];\n\n let democratsVotes = [];\n let republicansVotes = [];\n let independentsVotes = [];\n let totalVotes = [];\n\n for (var i = 0; i < membersSenate.length; i++) {\n if (membersSenate[i].votes_with_party_pct != null) {\n if (membersSenate[i].party.includes(\"D\")) {\n democrats.push(membersSenate[i].party) //***Number of Resp - 1st table - PARTY LOYALTY\n democratsVotes.push(membersSenate[i].votes_with_party_pct) //***% Voted w/ Party - 1st table - PARTY LOYALTY\n\n } else if (membersSenate[i].party.includes(\"R\")) {\n republicans.push(membersSenate[i].party) //***Number of Resp - 1st table - PARTY LOYALTY\n republicansVotes.push(membersSenate[i].votes_with_party_pct) //***% Voted w/ Party - 1st table - PARTY LOYALTY\n\n } else if (membersSenate[i].party.includes(\"I\")) {\n independents.push(membersSenate[i].party) //***Number of Resp - 1st table - PARTY LOYALTY\n independentsVotes.push(membersSenate[i].votes_with_party_pct) //***% Voted w/ Party - 1st table - PARTY LOYALTY\n }\n total.push(membersSenate[i].party) //***Number of Resp - 1st table - PARTY LOYALTY\n totalVotes.push(membersSenate[i].votes_with_party_pct) //***% Voted w/ Party - 1st table - PARTY LOYALTY\n }\n }\n // console.log(democrats,republicans,independents)\n document.getElementById(\"democrats\").innerHTML = democrats.length;\n document.getElementById(\"republicans\").innerHTML = republicans.length;\n document.getElementById(\"independents\").innerHTML = independents.length;\n document.getElementById(\"total\").innerHTML = democrats.length + republicans.length + independents.length;\n\n\n // console.log(democratsVotes,republicansVotes,independentsVotes)\n\n let democratsVotesPct = (democratsVotes.reduce((a, b) => a + b) / democrats.length);\n let republicansVotesPct = (republicansVotes.reduce((a, b) => a + b) / republicans.length);\n if (independentsVotes.length != 0) {\n independentsVotesPct = (independentsVotes.reduce((a, b) => a + b) / independents.length);\n } else {\n independentsVotesPct = 0;\n }\n let totalVotesPct = (totalVotes.reduce((a, b) => a + b) / total.length);\n document.getElementById(\"democratsVotes\").innerHTML = democratsVotesPct.toFixed(2) + \"%\";\n document.getElementById(\"republicansVotes\").innerHTML = republicansVotesPct.toFixed(2) + \"%\";\n document.getElementById(\"independentsVotes\").innerHTML = independentsVotesPct.toFixed(2) + \"%\"\n document.getElementById(\"totalVotes\").innerHTML = totalVotesPct.toFixed(2) + \"%\";\n}", "function test_even_expense_debts() {\n\n let expense = new EvenExpense_1.EvenExpense(5, \"cat\", \"test\");\n\n let person1 = new Person_1.Person(1, \"Person 1\", \"\");\n let person2 = new Person_1.Person(2, \"Person 2\", \"\");\n let person3 = new Person_1.Person(3, \"Person 3\", \"\");\n\n let payment1 = new Payment_1.Payment(-1, person1, 2);\n let payment2 = new Payment_1.Payment(-1, person2, 4);\n let payment3 = new Payment_1.Payment(-1, person3, 9);\n\n expense.addPayment(payment1);\n expense.addPayment(payment2);\n expense.addPayment(payment3);\n\n // let payments = Array.from(expense.payments.values());\n // payments.forEach(p => console.log(p.creditor.firstName + \" payed \" + p.amount.toFixed(2)));\n\n console.log(\"Debts\");\n let debts = Array.from(expense.debts.values());\n debts.forEach(d => console.log(d.debtor.firstName + \" owes \" + d.creditor.firstName + \" \" + d.amount.toFixed(2)));\n\n console.log(expense.expenseAmount)\n\n}", "function getContributions(author, permlink) {\r\n var url = `https://utopian.rocks/api/posts?author=`+author;\r\n var m_body = '';\r\n https.get(url, function(res) {\r\n res.on('data', function(chunk) {\r\n m_body += String(chunk);\r\n });\r\n res.on('end', function() {\r\n try {\r\n const response = JSON.parse(m_body);\r\n console.log(\"Total Contributions \", response.length);\r\n if (response.length > 0) {\r\n var contributionsObj = {\r\n \"total\": response.length,\r\n \"approved\": 0,\r\n \"staff_picked\": 0,\r\n \"total_payout\": 0.0\r\n };\r\n \r\n var first_contribution_date = timeConverter(response[0].created.$date);\r\n \r\n contributionsObj['category'] = {};\r\n contributionsObj['approved'] = response.filter(function (el) { return el.voted_on == true;});\r\n contributionsObj['staff_picked'] = response.filter(function (el) { return el.staff_picked == true;});\r\n\r\n contributionsObj['category']['analysis'] = response.filter(function (el) { return el.category === 'analysis' && el.voted_on === true;});\r\n contributionsObj['category']['blog'] = response.filter(function (el) { return el.category === 'blog' && el.voted_on === true;});\r\n contributionsObj['category']['bughunting'] = response.filter(function (el) { return el.category === 'bug-hunting' && el.voted_on === true;});\r\n contributionsObj['category']['copywriting'] = response.filter(function (el) { return el.category === 'copywriting' && el.voted_on === true;});\r\n contributionsObj['category']['development'] = response.filter(function (el) { return el.category === 'development' && el.voted_on === true;});\r\n contributionsObj['category']['documentation'] = response.filter(function (el) { return el.category === 'documentation' && el.voted_on === true;});\r\n contributionsObj['category']['graphics'] = response.filter(function (el) { return el.category === 'graphics' && el.voted_on === true;});\r\n contributionsObj['category']['suggestions'] = response.filter(function (el) { return el.category === 'suggestions' && el.voted_on === true;});\r\n contributionsObj['category']['taskrequests'] = response.filter(function (el) { return el.category === 'task-requests' && el.voted_on === true;});\r\n contributionsObj['category']['tutorials'] = response.filter(function (el) { return el.category === 'tutorials' && el.voted_on === true;});\r\n contributionsObj['category']['videotutorials'] = response.filter(function (el) { return el.category === 'video-tutorials' && el.voted_on === true;});\r\n contributionsObj['category']['translations'] = response.filter(function (el) { return el.category === 'translations' && el.voted_on === true;});\r\n contributionsObj['category']['iamutopian'] = response.filter(function (el) { return el.category === 'iamutopian' && el.voted_on === true;}); \r\n contributionsObj['category']['task'] = response.filter(function (el) { return el.category.startsWith(\"task\") && el.voted_on === true;});\r\n contributionsObj['category']['ideas'] = response.filter(function (el) { return el.category === 'ideas' && el.voted_on === true;});\r\n contributionsObj['category']['visibility'] = response.filter(function (el) { return el.category === 'visibility' && el.voted_on === true;});\r\n\r\n response.forEach(function(contribution) {\r\n if(contribution.voted_on === true){\r\n contributionsObj.total_payout = contributionsObj.total_payout + contribution.total_payout;\r\n }\r\n });\r\n\r\n for(var key in contributionsObj.category) {\r\n const value = contributionsObj.category[key];\r\n if(value.length == 0){\r\n delete contributionsObj.category[key];\r\n }\r\n }\r\n\r\n commentOnAuthorPost(contributionsObj, first_contribution_date, author, permlink);\r\n }\r\n } catch (e) {\r\n console.log('Err' + e);\r\n }\r\n });\r\n }).on('error', function(e) {\r\n req.abort();\r\n console.log(\"Got an error: \", e);\r\n });\r\n}", "function top10Synergies(tally, agents, policyMatrix) {\n}", "function getEtrafficDonationServices(){\n\tvar donationServices = [\n\t // renew registeration\n\t {\tserviceId:\t\"227\",\n\t \tamount:1\n\t },\n\t // renew license\n\t {\tserviceId:\t\"1075\",\n\t \tamount:1\n\t },\n\t // fines\n\t {\tserviceId:\t\"1060\",\n\t \tamount:1\n\t }\n\t ];\n\treturn {\n\t\tdonationServices : donationServices \n\t}\n}", "function viewAllTransactionWithRewardPoints() {\n const data = getTransactions();\n const listItems = data.map(\n (d) =>\n <tr>\n <td>{d.date.toISOString().slice(0, 10)}</td>\n <td>{d.customer}</td>\n <td>{d.amount}</td>\n <td>{calculateRewardedPoint(d.amount)}</td>\n </tr>\n );\n\n return (\n <div class=\"report\">\n <p>PURCHASE HISTORY:</p>\n <table class=\"table\">\n <thead>\n <tr>\n <th scope=\"col\">Date</th>\n <th scope=\"col\">Customer</th>\n <th scope=\"col\">Purchase Amount</th>\n <th scope=\"col\">Points Earned</th>\n </tr>\n </thead>\n <tbody>\n {listItems}\n </tbody>\n </table>\n </div>\n );\n}", "function showIncome(n) {\n console.log(\"\\n\"+archive[n].name+\" has generated: \"+(archive[n].price*archive[n].Clients.length)+\" USD\"+\"\\n\");\n}", "function MostLoyal(){\n\n\tlet contador =[]\n\n\tfor (var i = 0; i < data.length; i++) {\n\t\tcontador.push(data[i].votes_with_party_pct)\n\t}\n\n/*--------------------------------------------------------*/\nlet orderList = contador.sort((a,b)=> b-a)\n\t\nlet indexOrderListRounded = Math.round( (10/100)*orderList.length) /*11*/\n\nlet finalIndex = orderList[indexOrderListRounded] /*98.72*/\n\n\nlet aux = []\n\nfor (var i = 0; i < orderList.length; i++) {\n\tif(orderList[i] >= finalIndex){aux.push(orderList[i] )}\n}\n\nlet final =[]\n\nfor (var i = 0; i < data.length; i++) {\n\tfor (var j = 0; j < aux.length; j++) {\n\t\tif(aux[j] == data[i].votes_with_party_pct && !final.includes(data[i]) ) {final.push(data[i])}\n\t}\n\n\n}\n\n\nfor (var i = 0; i < final.length; i++) {\n\t\n/*total_votes votes_with_party_pct */\nfunction num (a,b){\n\n\n\t\tlet x = (a*b)/100\n\t\tlet z = Math.floor(x)\n\t\treturn z\n\n\n}\n\n\n\n\ttbodyMostLoyal.innerHTML +=` \n\n\n\t\t\t\t<tr>\n\n\t\t\t\t\t<td>${final[i].first_name} </td>\n\t\t\t\t\t<td>${num(final[i].total_votes,final[i].votes_with_party_pct)} </td>\n\t\t\t\t\t<td>${final[i].votes_with_party_pct} </td>\n\t\t\t\t\t\n\n\t\t\t\t</tr>\n\n\t`\n\n\n}\n\n\n\n\n\n\n\n}", "function payActors()\n{\n for (var i=0; i<actors.length;i++)\n {\n for (var j=0; j<rentals.length;j++)\n {\n if(actors[i].rentalId == rentals[j].id) \n {\n for (var k=0; k<actors[i].payment.length; k++)\n //rajouté car plusieurs payments\n {\n //the driver must pay the rental price and the (optional) deductible reduction\n //if deductible reduction option is taken, it is directly included in the price (cf ex4)\n if (actors[i].payment[k].who == 'driver')\n {\n actors[i].payment[k].amount = rentals[j].price;\n }\n\n //the owner receives the rental price minus the commission\n if (actors[i].payment[k].who == 'owner')\n {\n actors[i].payment[k].amount = rentals[j].price \n - (rentals[j].commission.insurance + rentals[j].commission.assistance + rentals[j].commission.drivy);\n }\n\n //the insurance receives its part of the commission\n if (actors[i].payment[k].who == 'insurance')\n {\n actors[i].payment[k].amount = rentals[j].commission.insurance ;\n }\n\n //the assistance receives its part of the commission\n if (actors[i].payment[k].who == 'assistance')\n {\n actors[i].payment[k].amount = rentals[j].commission.assistance;\n }\n\n //drivy receives its part of the commission, plus the deductible reduction\n //if deductible reduction option is taken, it is directly included in the commission (cf ex4)\n if (actors[i].payment[k].who == 'drivy')\n {\n actors[i].payment[k].amount = rentals[j].commission.drivy ;\n }\n }\n }\n }\n }\n}", "function calculateDrinkDetails() {\n\n\t//Calculate drinks taken today & set html text\n\tvar drinksToday = getDrinksToday();\n\t\n\t//Calculate time since last drink\n\tvar timeSinceLastDrinkString = getTimeSinceLastDrink();\n\n\t//Calculate duration of drink\n\tvar durationOfDrink= getDurationOfDrink();\n\n\treturn [drinksToday, timeSinceLastDrinkString, durationOfDrink];\n\n}", "function moreOutfits() {\n getLooks();\n }", "async getCitationHistory(){\n //<== Html selectors ==>\n const citationDateClassName = \".gsc_oci_g_t\";\n const citationValClassName = \".gsc_oci_g_a\";\n // <== Logic ==>\n\n const page = this.page;\n const datesLst = await page.$$eval(citationDateClassName, (options) =>\n options.map((option) => option.textContent\n ));\n const valLst = await page.$$eval(citationValClassName, (options) =>\n options.map((option) => option.textContent\n ));\n\n this.json.yearscitation = [];\n var totalCitations = 0\n for (var i in valLst){\n const date = datesLst[i];\n totalCitations+= parseInt(valLst[i], 10)\n this.json.yearscitation.push(\n {\n [date]:valLst[i],\n }\n )\n }\n this.json.totalCitations = totalCitations\n\n }", "function getApplicants() {\n\tvar person1 = {\n\t\t\"name\" : \"Bill Riley\",\n\t\t\"DOB\" : \"August 4, 1991\",\n\t\t\"address\" : \"123 Street Road\",\n\t\t\"skills\" : [\"HTML\", \"CSS\", \"Illustrator\", \"Published\"] \n\t};\n\n\tvar person2 = {\n\t\t\"name\" : \"Jess Jillenger\",\n\t\t\"DOB\" : \"June 21, 1988\",\n\t\t\"address\" : \"456 Fake Road\",\n\t\t\"skills\" : [\"HTML\", \"PhotoShop\", \"CSS\", \"Ruby on Rails\"]\n\t};\n\n\tvar person3 = {\n\t\t\"name\" : \"Rebecca Simmons\",\n\t\t\"DOB\" : \"December 1, 1994\",\n\t\t\"address\" : \"1324 West Street\",\n\t\t\"skills\" : [\"HTML\", \"PhotoShop\", \"CSS\", \"JavaScript\", \"Angular\"]\n\t};\n\n\tvar person4 = {\n\t\t\"name\" : \"Jim Matthews\",\n\t\t\"DOB\" : \"January 14, 1990\",\n\t\t\"address\" : \"1324 East Street\",\n\t\t\"skills\" : [\"HTML\", \"PhotoShop\", \"CSS\", \"Cognitive Psychology\", \"Published\", \"UI/UX\"]\n\t};\n\n\tvar person5 = {\n\t\t\"name\" : \"Samantha Monico\",\n\t\t\"DOB\" : \"February 7, 1990\",\n\t\t\"address\" : \"1992 Johnson Street\",\n\t\t\"skills\" : [\"HTML\", \"CSS\", \"Cognitive Psychology\", \"UI/UX\", \"PhotoShop\"]\n\t};\n\n\tvar person6 = {\n\t\t\"name\" : \"Cindy Liu\",\n\t\t\"DOB\" : \"May 7, 1979\",\n\t\t\"address\" : \"18 Marr Road\",\n\t\t\"skills\" : [\"HTML\", \"CSS\", \"Published\", \"Angular\", \"JavaScript\", \"Node\"]\n\t};\n\n\treturn [person1, person2, person3, person4, person5, person6];\n}", "function getTreatments() {\n var tracker = $q.defer();\n var response = {\n treatments: [],\n total: 0\n };\n pdbMain.get($rootScope.amGlobals.configDocIds.treatment).then(treatmentDocFound).catch(failure);\n return tracker.promise;\n \n function treatmentDocFound(res) {\n if (res.regular)\n Object.keys(res.regular).forEach(iterateRegularTreatments);\n tracker.resolve(response);\n \n function iterateRegularTreatments(treatment) {\n if (res.regular[treatment]._deleted == true)\n return;\n response.treatments.push({\n name: treatment,\n rate: res.regular[treatment].rate\n });\n }\n }\n \n function failure(err) {\n tracker.reject(response);\n }\n }", "function glance(members) {\n for (var i = 0; i < members.length; i++) {\n if (members[i].party == \"D\") {\n statistics.Democrats.n_reps += 1;\n }\n }\n for (var i = 0; i < members.length; i++) {\n if (members[i].party == \"R\") {\n statistics.Republicans.n_reps += 1;\n }\n }\n for (var i = 0; i < members.length; i++) {\n if (members[i].party == \"I\") {\n statistics.Independents.n_reps += 1;\n }\n }\n\n statistics.Total.n_reps =\n statistics.Independents.n_reps +\n statistics.Republicans.n_reps +\n statistics.Democrats.n_reps;\n\n var votesWPT = 0;\n\n for (var i = 0; i < members.length; i++) {\n votesWPT = votesWPT + members[i].votes_with_party_pct;\n statistics.Total.vote_w_party =\n (votesWPT / statistics.Total.n_reps).toFixed(2) + \"%\";\n }\n\n var votesWPD = 0;\n\n for (var i = 0; i < members.length; i++) {\n if (members[i].party == \"D\") {\n votesWPD = votesWPD + members[i].votes_with_party_pct;\n statistics.Democrats.vote_w_party =\n (votesWPD / statistics.Democrats.n_reps).toFixed(2) + \"%\";\n }\n }\n\n var votesWPR = 0;\n\n for (var i = 0; i < members.length; i++) {\n if (members[i].party == \"R\") {\n votesWPR = votesWPR + members[i].votes_with_party_pct;\n statistics.Republicans.vote_w_party =\n (votesWPR / statistics.Republicans.n_reps).toFixed(2) + \"%\";\n }\n }\n\n var votesWPI = 0;\n\n for (var i = 0; i < members.length; i++) {\n if (members[i].party == \"I\") {\n votesWPI = votesWPI + members[i].votes_with_party_pct;\n statistics.Independents.vote_w_party =\n (votesWPI / statistics.Independents.n_reps).toFixed(2) + \"%\";\n }\n }\n\n //For with an Object to add .js to .html:\n\n var glance = document.getElementById(\"glance\");\n\n for (var party in statistics) {\n var row = document.createElement(\"tr\");\n var partyCell = document.createElement(\"td\");\n partyCell.innerHTML = party;\n var repsCell = document.createElement(\"td\");\n repsCell.innerHTML = statistics[party].n_reps;\n var voteCell = document.createElement(\"td\");\n voteCell.innerHTML = statistics[party].vote_w_party;\n row.append(partyCell, repsCell, voteCell);\n glance.appendChild(row);\n }\n}", "function returnDrugs()\n{\n var drugs = {\n title: 'Pharmacopeia',\n items: [\n {\n title: 'Analgesics',\n items: [\n {\n title: 'Acetaminophen/Paracetamol',// (Tylenol)',\n data: `\n <b class=\"uppercase\">Oral/Rectal Dosing</b><br>\n <b>Infants/Children:</b><br>\n PO: 10-15 mg/kg/dose; every 4-6 hours prn<br>\n PR: 25-40 mg/kg/dose; every 8 hours prn<br>\n <b>MAX: 90 mg/kg/day</b><br>\n <br>\n <b>Children >12 years/Adults:</b><br>\n If > 50 kg, otherwise use per kg doing above)<br>\n PO: 650-1000 mg/dose; every 4-6 hours prn<br>\n PR: 1300 mg/dose; every 4-6 hours prn<br>\n <b>MAX: 4 grams/day</b><br>\n <br>\n <b class=\"uppercase\">Intravenous Dosing</b>:<br>\n <b>Term Neonates/Children up to 1 year</b>:<br>\n IV: 7.5 mg/kg/dose; infuse over 15 minutes; every 6 hours<br>\n <b>MAX: 30 mg/kg/day</b><br>\n <br>\n <b>Children >1 year/Adults</b>:<br>\n IV: 10-15 mg/kg/dose; infuse over 15 minutes; every 4-6 hours<br>\n <b>MAX: 75 mg/kg/day</b>`\n },\n {\n title: 'Clonidine',\n data: `\n <b>Infants/Children/Adults:</b><br>\n IV: 1-2 micrograms/kg/dose; x1 as a single intraoperative dose<br>\n <br>\n * NOTE: Not indicated in patients in whom minimal or no postoperative pain is expected, such as cleft lip repair with infraorbital block.`\n },\n {\n title: 'Fentanyl',\n data: `\n <b>Infants/Children/Adults:</b><br>\n IV: 0.5-1.0 micrograms/kg/dose; may repeat after 5-10 minutes<br>\n <br>\n * Generally cleft lip patients require no narcotics.\n <br>\n ** Cleft palates typically require <b><span class=\"uppercase\">no more than 2 micrograms/kg total</span> intra-operatively</b>.`\n },\n {\n title: 'Test',\n data: `Example text`\n }\n ]\n },\n {\n title: 'Sedatives/Intravenous Anesthetics',\n items: []\n },\n {\n title: 'Local Anesthetics',\n items: []\n },\n {\n title: 'Anticonvulsants',\n items: []\n },\n {\n title: 'Antiemetics',\n items: []\n },\n {\n title: 'Antifibrinolytics',\n items: []\n },\n {\n title: 'Antimicrobials',\n items: []\n },\n {\n title: 'Antipruritics',\n items: []\n },\n {\n title: 'Antipyretics',\n items: []\n },\n {\n title: 'Cardiovascular',\n items: []\n },\n {\n title: 'Diuretics',\n items: []\n },\n {\n title: 'Anesthesia Inhalent',\n items: []\n },\n {\n title: 'Neuromuscular Blockers',\n items: []\n },\n {\n title: 'Post-exposure Prophylaxis',\n items: []\n },\n {\n title: 'Respiratory/Asthma',\n items: []\n },\n {\n title: 'Resuscitation/Patient Code Sheet',\n items: []\n },\n {\n title: 'Steroids',\n items: []\n },\n {\n title: 'Topicals',\n items: []\n },\n {\n title: 'Toxicology/Reversal Agents',\n items: []\n },\n {\n title: 'Miscellaneous',\n items: []\n }\n ]\n };\n\n return r(drugs);\n}", "advices() {\n if (this.total <= 17) {\n return [\n \"You currently do not need any immediate medical attention.\",\n\n \"Do not forget to exercise regularly to keep your body \" +\n \"and mind healthy and fit.\",\n\n \"Consult with a psychiatrist and ask for more advices fit for you.\"\n ];\n }\n else {\n return [\n \"You currently in need of immediate medical attention.\",\n\n \"Call a doctor and ask for a psych referral for your depression. \" +\n \"Most physicians and treatment professionals will offer a number of \" +\n \"resources you can use to get the help you need.\",\n\n \"Visit doctors with this report in hand so you that can use your answers \" +\n \"as a starting point.\",\n\n \"Follow your psychiatrist’s prescribed course of therapy for \" +\n \"several weeks before you decide whether it’s working or not. \" +\n \" Often some combination of antidepressants, psychodynamic therapy \" +\n \"and cognitive-behavioral therapy will yield promising results.\"\n ];\n }\n }", "function displayDoctors() {\n\n // Reading Doctors file.\n var d = readFromJson('doc');\n\n // For loop to run till all the doctor's are printed.\n for (var i = 0; i < d.doctors.length; i++) {\n\n // Printing doctor's id, name & speciality.\n console.log(d.doctors[i].id + \". \" + d.doctors[i].name + \" (\" + d.doctors[i].special + \")\");\n }\n}", "function showTotalIncident(transport) {\n let total = data.dataModified.get(\"1960\")[transport].length;\n let years = document.getElementById(\"selectYear\").value;\n\n document.getElementById(\"showTotalIncident\").innerHTML = total;\n document.getElementById(\"percent1\").innerHTML = \"Aire = \" + data.percent(years).percentair + \" %\";\n document.getElementById(\"percent2\").innerHTML = \"Tierra = \" + data.percent(years).percentland + \" %\";\n document.getElementById(\"percent3\").innerHTML = \"Agua = \" + data.percent(years).percentWater + \" %\";\n\n}", "function getTopTableInfo() {\n for (var i = 0; i < members.length; i++) {\n if (members[i].party === \"D\") {\n statistics.parties[0].number_of_members += 1;\n statistics.parties[0].votes_with_party_pct += members[i].votes_with_party_pct;\n } else if (members[i].party === \"R\") {\n statistics.parties[1].number_of_members += 1;\n statistics.parties[1].votes_with_party_pct += members[i].votes_with_party_pct;\n } else if (members[i].party === \"I\") {\n statistics.parties[2].number_of_members += 1;\n statistics.parties[2].votes_with_party_pct += members[i].votes_with_party_pct;\n }\n statistics.parties[3].votes_with_party_pct += members[i].votes_with_party_pct;\n }\n statistics.parties[0].votes_with_party_pct = (statistics.parties[0].votes_with_party_pct / statistics.parties[0].number_of_members).toFixed(2);\n statistics.parties[1].votes_with_party_pct = (statistics.parties[1].votes_with_party_pct / statistics.parties[1].number_of_members).toFixed(2);\n statistics.parties[3].number_of_members = members.length;\n if (statistics.parties[2].number_of_members == 0) {\n statistics.parties[2].votes_with_party_pct = 0;\n statistics.parties[3].votes_with_party_pct = ((Number(statistics.parties[0].votes_with_party_pct) + Number(statistics.parties[1].votes_with_party_pct)) / 2).toFixed(2);\n } else {\n statistics.parties[2].votes_with_party_pct = (statistics.parties[2].votes_with_party_pct / statistics.parties[2].number_of_members).toFixed(2);\n statistics.parties[3].votes_with_party_pct = (statistics.parties[3].votes_with_party_pct / members.length).toFixed(2);\n }\n}", "function fetchDonations(query, page, limit) {\n var paginated = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\n return new Promise(function (resolve, reject) {\n if (!paginated) {\n page = 1;\n }\n\n external_commonjs_vue_commonjs2_vue_root_Vue_default.a.axios.get(\"\".concat(baseURL, \"/donations?\").concat(query, \"&_limit=\").concat(limit, \"&_page=\").concat(page++)).then(function (response) {\n if (response.data.length) {\n resolve(response.data);\n } else {\n reject({\n code: 404\n });\n }\n }).catch(function (e) {\n reject(e);\n });\n });\n}", "function displayUndergrad() {\n\t\t$.getJSON(\"https://people.rit.edu/~sarics/web_proxy.php?path=degrees\")\n .done(function (data) {\n\t\t\t\t\t\n\t\t\t\t\t$(\"#list1\").append(document.createTextNode(data.undergraduate[0].title));\n\t\t\t\t\t$(\"#list2\").append(document.createTextNode(data.undergraduate[1].title));\n\t\t\t\t\t$(\"#list3\").append(document.createTextNode(data.undergraduate[2].title));\n\t\t\t\n\t\t\t})\n\t\t\t\n\t\t\t.fail(function () {\n alert('Some problem occured');\n });\n\t\t\n\t}", "tableLeastLoyalMostEngaged() {\n let tenPercent //la declaro global para usarla luego en el slice\n\n function leastArray(array, property) {\n let orderedArray = array.filter(arr => arr.total_votes > 0)\n .sort((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 tenPercent = Math.round(orderedArray.length * 10 / 100)\n return orderedArray\n }\n this.statistics.leastLoyal = leastArray(this.members, \"votes_with_party_pct\").slice(0, (tenPercent))\n // los que tienen menos missed votes - los que no votaron menos veces (mas comprometidos)\n this.statistics.mostEngaged = leastArray(this.members, \"missed_votes_pct\").slice(0, (tenPercent))\n\n //COMPARA EL PCT DEL RESTO DE MIEMBROS CON EL ULTIMO\n function compareRestMembers(funct, arrayUno, propiedad, arrayDos) {\n let moreMembers = funct(arrayUno, propiedad).slice(tenPercent)\n for (let i = 0; i < moreMembers.length; i++) {\n if (moreMembers[i][propiedad] === arrayDos[arrayDos.length - 1][propiedad]) {\n arrayDos.push(moreMembers[i])\n }\n }\n return arrayDos\n }\n compareRestMembers(leastArray, this.members, \"votes_with_party_pct\", this.statistics.leastLoyal)\n compareRestMembers(leastArray, this.members, \"missed_votes_pct\", this.statistics.mostEngaged)\n }", "function details() {\n let did = dsel.value;\n if (!did) return;\n fetch(base + \"/dispenser/\" + did)\n .then(resp => resp.json()).then(function(json) {\n let perc = Math.ceil(json[\"valor_atual\"]/json[\"vol_max\"]*100);\n curml.innerText = json[\"valor_atual\"] + \" mL (\" + perc + \"%)\";\n curdesc.innerText = json[\"desc\"];\n });\n}", "function getDiscount3(people) {\n const [ _, result ] = [\n [ function (valor) { return valor < 10 }, 500 ],\n [ function (valor) { return valor >= 10 && valor < 25}, 350 ],\n [ function (valor) { return valor >= 25 && valor < 100 }, 250 ],\n [ function (valor) { return valor >= 100 }, 200 ],\n ].find(function([ teste ]) {\n return teste(people)\n })\n\n return result\n}", "function getMostStargazers() {\n getAjaxData(\"https://api.github.com/orgs/HackYourFuture/repos\", allRepos => {\n clearAllTags(); \n const maxStar = findMaxStar(allRepos); \n renderRepositories_Stars(allRepos, maxStar); \n \n \n }); \n \n}", "function renderMyDonation(data) {\n // Setup an Empty Array\n let myDonation = [];\n // For each Index in Data, Add them to the Array\n for (let i in data) {\n let formattedDate = moment(data[i].created).format(\"LL\");\n myDonation += `<div class=\"donation-card\" donation-id=\"${data[i].id}\">\n <h4 class=\"donation-title\">${data[i].title}</h4>\n <p class='donation-date'>Created: ${formattedDate}</p>\n <p>Confirmation #: ${data[i].confNum}</p>\n <p>$<strong>${data[i].amount}</strong> to ${data[i].charity}</p>\n <button class=\"update-donation-btn\">update</button>\n <button class=\"delete-donation-btn\">delete</button>\n </div>`;\n }\n // Insert the Array into the Container inside the DOM\n $(\".my-donation-container\").html(myDonation);\n}", "function getGenInfo(rawData) {\n\t//-- Links to external resources\n\tvar genInfoLinks = '';\n\trawData.find('center a').each(function(){\n\t\tgenInfoLinks += $(this)[0].outerHTML + '|';\n\t});\n\tgenInfoLinks = genInfoLinks.substr(0,genInfoLinks.length-1).replace(/[|]/g,'<span>&nbsp;|&nbsp;</span>');\n\tvar genInfoTitle =\n\t\trawData\n\t\t.find('table:eq(1) tbody tr:eq(0) td:eq(0)')\n\t\t.text()\n\t\t.trim();\n\tvar genInfoFeePayment =\n\t\trawData\n\t\t.find('table:eq(2) a');\n\tvar genInfoNotice =\n\t\trawData\n\t\t.find('table:eq(3) tr:eq(0) td:eq(0)');\n\tvar genInfoPTRMTitle =\n\t\trawData\n\t\t.find('center')\n\t\t.siblings('b');\n\tvar genInfoPTRMTable =\n\t\trawData\n\t\t.find('table:eq(4)')\n\t\t.addClass('genInfo-ptrm')\n\t\t.find('td,th')\n\t\t.each(function(){\n\t\t\t$(this).find('br').remove();\n\t\t})\n\t\t.end();\n\tvar genInfoPlagiarism =\n\t\trawData\n\t\t.find('table:eq(5) tr:eq(0) td:eq(0)')\n\t\t.find('hr')\n\t\t.remove()\n\t\t.end();\n\tvar refreshDataLink =\n\t\t$('<a>')\n\t\t.attr({\n\t\t\t'href' : '#',\n\t\t\t'id' : 'refreshLink'\n\t\t})\n\t\t.addClass('no-print')\n\t\t.text('Refresh interactive content')\n\t\t.click(function(){\n\t\t\tlocalStorage.clear();\n\t\t\tlocation.reload();\n\t\t\treturn false;\n\t\t})\n\tvar result =\n\t$('<div>')\n\t.addClass('filter-genInfo filter-all filter-shown genInfo-container')\n\t.addClass('no-print')\n\t.append(\n\t\trefreshDataLink\n\t)\n\t.append(\n\t\trawData.find('h2')\n\t)\n\t.append(\n\t\trawData.find('table:eq(0)')\n\t)\n\t.append(\n\t\t$('<div>')\n\t\t.addClass('genInfo-title')\n\t\t.append(\n\t\t\t$('<center>')\n\t\t\t.html(genInfoTitle)\n\t\t)\n\t)\n\t.append(\n\t\t$('<p>')\n\t\t.addClass('genInfo-fee')\n\t\t.append(genInfoFeePayment)\n\t)\n\t.append(\n\t\t$('<div>')\n\t\t.addClass('genInfo-notice')\n\t\t.append(\n\t\t\tgenInfoNotice.html()\n\t\t)\n\t)\n\t.append(\n\t\t$('<div>')\n\t\t.addClass('genInfo-links')\n\t\t.append(\n\t\t\t$('<center>')\n\t\t\t.html(genInfoLinks)\n\t\t)\n\t)\n\t.append(\n\t\t$('<p>')\n\t\t.addClass('genInfo-ptrm-title')\n\t\t.append(genInfoPTRMTitle.html())\n\t)\n\t.append(\n\t\tgenInfoPTRMTable\n\t\t.addClass('genInfo-ptrm-table')\n\t)\n\t.append(\n\t\t$('<div>')\n\t\t.addClass('genInfo-plagiarism')\n\t\t.append(\n\t\t\tgenInfoPlagiarism.html()\n\t\t)\n\t)\n\t.find('a')\n\t.attr('target','_blank')\n\t.end();\n\treturn result;\n}", "function showIncidentsWihtMoreInjuries(totals) {\n let max1 = {\n \"nameSpanish\": \"\",\n \"totalRow\": 0\n };\n let max2 = {\n \"nameSpanish\": \"\",\n \"totalRow\": 0\n };\n for (let i = 0; i < totals.length; i++) {\n if (max1.totalRow < totals[i].totalRow) {\n max2 = max1;\n max1 = totals[i];\n } else if (max2.totalRow < totals[i].totalRow) {\n max2 = totals[i];\n }\n }\n document.getElementById(\"mainIncident1\").innerHTML = max1.nameSpanish;\n document.getElementById(\"mainIncident2\").innerHTML = max2.nameSpanish;\n}", "function _displayTotalRevenueOfOwner(list) {\n totalRevenue = list.reduce((prevVal, currVal) => {\n const val = currVal.cost;\n return {\n subTotal: prevVal.subTotal + val.subTotal,\n serviceTax: prevVal.serviceTax + val.serviceTax,\n swachhBharatCess: prevVal.swachhBharatCess + val.swachhBharatCess,\n krishiKalyanCess: prevVal.krishiKalyanCess + val.krishiKalyanCess,\n total: prevVal.total + val.total,\n tax: currVal.tax,\n }\n }, {\n subTotal: 0,\n serviceTax: 0,\n swachhBharatCess: 0,\n krishiKalyanCess: 0,\n total: 0,\n });\n console.log('Total Revenue');\n _displayLog(totalRevenue);\n }", "function getWinners(getFinals) {\n const finals = getFinals(fifaData);\n const winnersObj = finals.map((final) => {\n if (final[\"Home Team Goals\"] > final[\"Away Team Goals\"]) {\n return final[\"Home Team Name\"];\n } else {\n return final[\"Away Team Name\"];\n }\n });\n return winnersObj;\n}", "async find({ query, provider }) {\n const { id, $limit, $skip } = query;\n if (!id || !ObjectId.isValid(id)) {\n return { error: 400 };\n }\n\n const donationModel = donationsService.Model;\n\n const dataQuery = [{ $sort: { totalAmount: -1, updatedAt: 1, 'giver.address': -1 } }];\n if ($skip) dataQuery.push({ $skip: Number($skip) });\n if ($limit) dataQuery.push({ $limit: Number($limit) });\n\n const result = await donationModel\n .aggregate()\n .match({\n status: {\n $in: [DonationStatus.COMMITTED, DonationStatus.WAITING, DonationStatus.PENDING],\n },\n $or: [\n { ownerTypeId: id }, // Committed ones to project\n // { intendedProjectTypeId: id }, // Delegated via COMMUNITY\n {\n delegateTypeId: id,\n intendedProjectId: { $exists: false },\n }, // Dac donations\n ],\n amount: { $ne: '0' },\n isReturn: false,\n })\n .group({\n _id: '$giverAddress',\n totalAmount: { $sum: '$usdValue' },\n count: { $sum: 1 },\n donations: { $push: '$_id' },\n updatedAt: { $max: '$updatedAt' },\n })\n .facet({\n data: dataQuery,\n metadata: [{ $count: 'total' }],\n })\n .exec();\n\n const { data, metadata } = result[0];\n\n // Fetch donations\n const promises = data.map(async item => {\n const [donations, [giver] = []] = await Promise.all([\n donationsService.find({\n paginate: false,\n query: {\n _id: { $in: item.donations },\n $sort: { createdAt: -1 },\n },\n }),\n usersService.find({\n paginate: false,\n query: {\n address: item._id,\n },\n provider, // In order to resolve avatar field\n }),\n ]);\n\n return {\n ...item,\n donations,\n giver,\n };\n });\n\n return {\n data: await Promise.all(promises),\n skip: $skip,\n limit: $limit,\n total: metadata && metadata[0] && metadata[0].total,\n };\n }", "function people10(list, p, valor) {\n var number = tenList(list, p, valor);\n\n if (valor < 0 && p < 0.5) { // loyal bottom\n var listLess10 = list.filter(person => person.votes_with_party_pct <= number);\n listLess10.sort(function compareMember(m1, m2) {\n return m1.votes_with_party_pct - m2.votes_with_party_pct;\n });\n return listLess10;\n\n } else if (valor < 0 && p > 0.5) { //loyal top\n var listLess10 = list.filter(person => person.votes_with_party_pct >= number);\n listLess10.sort(function compareMember(m1, m2) {\n return m1.votes_with_party_pct - m2.votes_with_party_pct;\n });\n\n return listLess10.reverse();\n \n } else if (valor > 0 && p < 0.5) { // attendance bottom\n var listLess10 = list.filter(person => person.missed_votes_pct <= number);\n listLess10.sort(function compareMember(m1, m2) {\n return m1.missed_votes_pct - m2.missed_votes_pct;\n });\n\n return listLess10;\n\n } else if (valor > 0 && p > 0.5) { //attendance top\n var listLess10 = list.filter(person => person.missed_votes_pct >= number);\n listLess10.sort(function compareMember(m1, m2) {\n return m1.missed_votes_pct - m2.missed_votes_pct;\n });\n return listLess10.reverse();\n }\n return listLess10;\n }", "function tallyUpDonations(/* CODE HERE */) {\n /* CODE HERE */\n}", "function chart(data, d3) {\n \n // DECLARE CONTAINERS\n var lists = {\n population: [],\n emission: [],\n capita: []\n }\n\n // FETCH THE YEARS FOR TOOLTIPS\n var years = Object.keys(data.overview);\n\n // LOOP THROUGH & FILL THE LISTS\n years.forEach(year => {\n lists.population.push(data.overview[year].population);\n lists.emission.push(data.overview[year].emission);\n lists.capita.push(data.overview[year].emission / data.overview[year].population);\n });\n\n // CONVERT ARRAY DATA TO CHARTS\n generate_charts(lists, years, d3);\n}", "function question3 () {\n for (let i = 0; i < n; i++){\n if (data[i].currency_code == \"GBP\"){\n console.log(`${data[i].title} costs ${data[i].price} pounds.`);\n }\n }\n}", "function viewBudget3 (roles, roleSal) {\n empty = []\n roles.sort();\n\n var current = null;\n var cnt = 0;\n for (var i = 0; i < roles.length; i++) {\n if (roles[i] != current) {\n if (cnt > 0) {\n empty.push(cnt)\n }\n current = roles[i];\n cnt = 1;\n } else {\n cnt++;\n }\n }\n if (cnt > 0) {\n empty.push(cnt)\n }\n viewBudgetFinal(empty, roleSal)\n}", "function getInitialInfo() {\n bubbleInfoHead.textContent = 'Betrokkenen';\n bubbleInfoLi[0].textContent = getValue('Verdachte');\n bubbleInfoLi[1].textContent = getValue('Slachtoffer');\n bubbleInfoLi[2].textContent = getValue('Beide');\n bubbleInfoLi[3].textContent = d3.sum(rollupInvolved, item => item.value);\n }", "static async getTopCustomers(n) {\n const results = await db.query(\n `SELECT customers.id,\n first_name AS \"firstName\",\n last_name AS \"lastName\",\n phone,\n customers.notes\n FROM customers\n JOIN reservations ON reservations.customer_id=customers.id\n GROUP BY customers.id\n ORDER BY COUNT(reservations.id) DESC\n LIMIT $1`,\n [n]\n );\n return results.rows.map(c => new Customer(c));\n }", "async getDonorListing() {\n console.log(\"Entering getDonorListing()\");\n let donorListingAddressKidney = hash(FAMILY_NAME).substr(0, 6) + '11' + 'aa';\n let donorListingAddressHeart = hash(FAMILY_NAME).substr(0, 6) + '11' + 'bb';\n let donorListingAddressLiver = hash(FAMILY_NAME).substr(0, 6) + '11' + 'cc';\n return this.getStateDonor(donorListingAddressKidney, donorListingAddressHeart, donorListingAddressLiver, true);\n }", "function contributorsInfo(data) {\r\n const rightContainer = document.getElementById('rightContainer');\r\n rightContainer.innerHTML = '';\r\n return fetchJSON(data)\r\n .then(data => {\r\n const contrUrl = data.contributors_url;\r\n\r\n fetchJSON(contrUrl)\r\n .then(contrUrl => {\r\n const ul = createAndAppend('ul', rightContainer, {\r\n id: 'ulRightContr'\r\n });\r\n\r\n for (const contrs of contrUrl) {\r\n\r\n const li = createAndAppend('li', ul);\r\n\r\n createAndAppend('img', li, {\r\n src: contrs.avatar_url,\r\n alt: \"user's image\"\r\n });\r\n\r\n createAndAppend('div', li, {\r\n\r\n html: \"<a href=\" + contrs.html_url + ' target=\"_blank\" >' + contrs.login + \"</a>\"\r\n });\r\n\r\n createAndAppend('div', li, {\r\n html: contrs.contributions\r\n\r\n });\r\n };\r\n })\r\n })\r\n\r\n .catch(error => {\r\n console.log(error.message);\r\n });\r\n\r\n}", "function show_citations_DocGenerator(pString) {\n\t//----Debugging------------------------------------------\n\t// The following alert-Command is useful for debugging \n\t//alert(\"docgenerator.js:show_citations(pString)-Call\")\n\t//----Create Object/Instance of DocGenerator----\n\t// var vMyInstance = new DocGenerator();\n\t// vMyInstance.show_citations(pString);\n\t//-------------------------------------------------------\n\tvar vOuptut = \"<table border=1>\";\n\tfor (var i=0; i<this.aCitations.length;i++) {\n\t\tvar vCITE = \"[[[\"+this.aCitations[i]+\"]]]\";\n\t\tvar vCOUNT = \"Count Used=\"+this.assCitations[this.aCitations[i]][5];\n\t\t//alert(\"vCITE=\"+vCITE+\"\\ndocgenerator.js:340\");\n\t\tvOuptut += \"<tr><td>\"+i+\"</td><td>\"+vCITE+\"</td></td><td>\"+vCOUNT+\"</td></tr>\";\n\t}\n\tvOuptut += \"</table>\";\n return vOuptut;\n\n}", "function getRelevantData({results}) {\n const relevantData = [];\n\n for(const iNatObservation of results) {\n const organism = iNatObservation.taxon;\n\n /**\n * Use the organism's scientific name if it doesn't have a\n * preferred common name\n */\n let name = organism.preferred_common_name;\n if (organism.preferred_common_name == undefined) {\n name = organism.name;\n }\n\n // Ignore wildlife data that doesn't have a wikipedia URL\n if (organism.wikipedia_url != null) {\n const organismData = {};\n organismData.name = name;\n organismData.sightings = [];\n const sighting = getSightingData(iNatObservation);\n organismData.sightings.push(sighting);\n\n organismData.wikiURL = organism.wikipedia_url;\n\n relevantData.push(organismData);\n } else {\n console.log(`Removing observation for ${name}: no wikipedia link was found.`);\n }\n }\n\n return relevantData;\n }", "function showInventorsOfThe1500s(inventorsList, exercise) {\n const ul = document.createElement('ul');\n const inventorsOf1500s = inventorsList.filter(inventor =>\n inventor.year >= 1500 && inventor.year < 1600);\n\n exercise.appendChild(ul);\n\n inventorsOf1500s.forEach((inventor) => {\n const li = document.createElement('li');\n li.textContent = `${inventor.first} ${inventor.last}`;\n ul.appendChild(li);\n });\n}", "function allCashiers(req, res) {\n\n}", "function getTop10(){\n return DBA.query(\"SELECT * FROM friend order by debt desc LIMIT 10\")\n .then(function(result){\n return DBA.getAll(result);\n });\n }", "get totalDescendents() {\n \n }", "function getReviews() {\n const value = getExpiry(localPrefix);\n if (!value) {\n console.log(\" expired after 12 hours - fetching again \");\n fetch(API)\n .then((response) => response.json())\n .then((data) => showData(data.results));\n } else {\n document.querySelector(\".reviews\").innerHTML = value;\n }\n}", "display() {\n for (let i = 0; i < this.data.stock.length; i++) {\n console.log(i + 1 + \". \" + this.data.stock[i].corporation);\n }\n }", "getTop10() {\n return this.tallyAsArray.slice(0, 10);\n }", "get desserts() {}", "function getDiscounts() {\n var pagina = 'ProjectPlans/listDiscounts';\n var par = `[{\"level\":\"1\"}]`;\n var tipo = 'json';\n var selector = putDiscounts;\n fillField(pagina, par, tipo, selector);\n}", "function promedioPorcentaje(democrats, republicans, independents) {\n app.statistics.votesWithPartyD = promedio(democrats);\n app.statistics.votesWithPartyR = promedio(republicans);\n app.statistics.votesWithPartyI = promedio(independents);\n}", "function showPendingDonations(data) {\n //Get Donation data from the database\n $.getJSON( '/events/donations/' + $('#eventId').html(), function( dataDonation ) {\n //Populate the table\n var table = $('#tablePendingDonation').DataTable();\n table.clear().draw();\n var counter = 0; \n if(dataDonation != null) {\n $.each(dataDonation, function(){\n if(this.status == \"Pending\") {\n counter++;\n dateCreated = new Date(this.dateCreated); \n table.row.add([\n counter,\n '<center>'\n + '<a data-toggle=\"tooltip\" title=\"Approve\" class=\"btn btn-success btn-xs linkapprovedonation\" rel=\"' + this._id + '\" href=\"#\">'\n + '<span class=\"glyphicon glyphicon-ok\"></span>'\n + '</a>'\n + '<a data-toggle=\"tooltip\" title=\"Disapprove\" class=\"btn btn-danger btn-xs linkremovedonation\" rel=\"' + this._id + '\" href=\"#\">'\n + '<span class=\"glyphicon glyphicon-remove\"></span>'\n + '</a>'\n + '</center>',\n this.donatorName,\n this.donatorEmail,\n this.donatorPhoneNumber,\n this.donationItem,\n this.donationNumber, \n dateCreated.getDate() + '/' + (dateCreated.getMonth() + 1) + '/' + dateCreated.getFullYear()\n ]).draw( false );\n } \n });\n $('#countPendingDonations').html(counter);\n }\n $('[data-toggle=\"tooltip\"]').tooltip(); \n }); \n}", "function amountcommi()\n{\n for (var i=0; i<rentals.length;i++)\n {\n //Drivy take a 30% commission on the rental price to cover their costs.\n var commission= rentals[i].price *0.3;\n\n //insurance: half of commission\n rentals[i].commission.insurance = commission *0.5;\n\n //roadside assistance 1€ per day\n rentals[i].commission.assistance = getRentDays(rentals[i].pickupDate,rentals[i].returnDate) +1;\n\n //drivy takes the rest\n rentals[i].commission.drivy= commission - (rentals[i].commission.insurance + rentals[i].commission.assistance);\n }\n\n}", "function getLeecherInfo(page,cities,lang)\r\n{\r\n\tvar imgw = \"<img src='skin/resources/icon_wood.gif' alt='Legno' height='10' width='15'>\"\t// wood image\r\n\tvar donationList = document.getElementById('resourceUsers').childNodes[3].getElementsByTagName(\"tbody\")[0];\r\n\tvar scorewrk = getParam('score_wrk','10',page);\t\t\t// wood for every warker\r\n\tvar scorelvl = getParam('score_lvl','100',page);\t\t// wood for every level of the townHall\t\r\n\t\t\r\n\tvar donate = 0, Vdonate = 0, Adonate = 0;\r\n\tlvl_ary = new Array();\r\n\twrk_ary = new Array();\r\n\tdnt_ary = new Array();\r\n\tvar totlvl = 0, totwrk = 0;\r\n\tvar chkAlldnt = getParam(\"all\",false,page);\r\n\t\t\r\n\tfor (var j = 0; j < donationList.rows.length; j++)\r\n\t{\t\t\r\n\t\tlvl_ary[j] = getMultiValue(donationList.rows[j].cells[2].innerHTML);\r\n\t\twrk_ary[j] = getMultiValue(donationList.rows[j].cells[3].innerHTML);\r\n\t\tdnt_ary[j] = toInt(donationList.rows[j].cells[4].textContent);\r\n\t\t\t\r\n\t\t// all donated\r\n\t\tdonate += dnt_ary[j];\r\n\t\tif ((donationList.rows[j].cells[0].innerHTML.split('(i)').length) <= 1 )\r\n\t\t{\r\n\t\t\tif ((donationList.rows[j].cells[0].innerHTML.split('(v)').length) > 1 )\r\n\t\t\t{ \t\r\n\t\t\t\tif (chkAlldnt == true) Vdonate += getNegValue(toInt(document.getElementById('thiscaption'+ j ).textContent.split(\" = \")[1]));\r\n\t\t\t\telse Vdonate += getNegValue(toInt(getPart(document.getElementById('wooddnt'+ j ).textContent,'(',')')));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif (chkAlldnt == true) Adonate += getNegValue(toInt(document.getElementById('thiscaption'+ j ).textContent.split(\" = \")[1]));\r\n\t\t\t\telse Adonate += getNegValue(toInt(getPart(document.getElementById('wooddnt'+ j ).textContent,'(',')')));\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t// total warkers and level townHall\r\n\t\t\ttotlvl += lvl_ary[j];\r\n\t\t\ttotwrk += wrk_ary[j];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// Player inactive\r\n\t\t\tlvl_ary[j] = 0;\r\n\t\t\twrk_ary[j] = 0;\r\n\t\t\tdnt_ary[j] = 0;\r\n\t\t}\r\n\t} \r\n\t\t\t\r\n\tvar avglvl = parseInt(totlvl / cities);\t\t\t// avarage level of the townHall\t\r\n\tvar Reslvl = parseInt(document.getElementById('resUpgrade').childNodes[3].childNodes[3].innerHTML.split(\"</span>\")[1]);\t// Check deposite level\r\n\t\t\r\n\tif ( !isNaN(Reslvl) ) // Deposit not upgrade\r\n\t{\r\n\t\tvar txtwood;\t\r\n\t\tvar wood = document.getElementById('resUpgrade').childNodes[3].childNodes[11].innerHTML.split(\"</span>\")[1];\t// Check wood donated\r\n\t\tvar woodlvl = document.getElementById('resUpgrade').childNodes[3].childNodes[7].innerHTML.split(\"</span>\")[1];\t// Check wood for next level\r\n\t\tvar wooddiff = toInt(woodlvl) - toInt(wood);\t\t// necessary wood for next level\r\n\t\t\r\n\t\r\n\t\ttxtwood = lang.stat1 +\" <b>\" + (Reslvl+1) + \"</b> \"+ lang.stat2 +\" <b>\"+ replaceNum(wooddiff) +\"</b> \"+ imgw + \" \";\r\n\t\t\t\r\n\t\tif ((wooddiff + Adonate) <= 0)\t\t\t\t\t\t// only donated wood of active player \r\n\t\t{\r\n\t\t\ttxtwood += lang.stat31;\r\n\t\t}\r\n\t\telse if ((wooddiff + Adonate + Vdonate) <= 0)\t\t// donated wood of the player active and vacation \r\n\t\t{\r\n\t\t\ttxtwood += lang.stat32;\r\n\t\t}\r\n\t\telse\t\t\t\t\t\t\t\t\t\t\t\t// calculate new score for next level\r\n\t\t{\r\n\t\t\tvar K = scorelvl / scorewrk;\t\t\t\t\t// factor lvl/wrk score\t\r\n\t\t\tvar nwscorewrk = parseInt(scorewrk);\r\n\t\t\t\t\r\n\t\t\tdo\t\t// Search new value for deposit Upgrading\r\n\t\t\t{\r\n\t\t\t\tvar nwdonate = 0;\r\n\t\t\t\tnwscorewrk += 5;\r\n\t\t\t\tvar nwscorelvl = Math.ceil(nwscorewrk * K);\r\n\t\t\t\t\r\n\t\t\t\tfor ( j = 0; j < donationList.rows.length; j++)\r\n\t\t\t\t{\t\t\t\t\r\n\t\t\t\t\tnwdonate += getNegValue(dnt_ary[j] - (lvl_ary[j] * nwscorelvl) - (wrk_ary[j] * nwscorewrk));\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\tif ( (nwscorewrk- parseInt(scorewrk)) >= 1000) break;\t// esce dal loop\r\n\t\t\t\t\r\n\t\t\t} while ((wooddiff + nwdonate) > 0 ); \r\n\t\t\t\r\n\t\t\ttxtwood += lang.stat33 +\"<br />\"+\r\n\t\t\t\t\t\t\"<b>\" + replaceNum(nwscorewrk) + \"</b> \" + imgw + lang.stat33wrk +\r\n\t\t\t\t\t\t\"<b>\" + replaceNum(nwscorelvl) + \"</b> \" + imgw + lang.stat33lvl;\r\n\t\t}\r\n\t}\r\n\telse\t// deposit is upgrading\r\n\t{\r\n\t\tReslvl = parseInt(document.getElementById('resUpgrade').childNodes[3].childNodes[5].innerHTML.split(\"</span>\")[1]);\r\n\t\ttxtwood = lang.statupgrd1 +\" <b>\" + (Reslvl+1) + \"</b> \"+ lang.statupgrd2;\r\n\t}\r\n\t\r\n\tvar info = \"<center>\"+ lang.statinfo1 +\" <b>\" + cities + \"</b> \"+ lang.statinfo2 +\" <b>\" + avglvl +\r\n\t\t\"</b>. \"+ lang.statinfo3 +\" <b>\"+ replaceNum(donate) +\"</b> \" + imgw + lang.statinfo4 +\" <b>\" + \r\n\t\treplaceNum(totwrk) + \"</b> \"+ lang.statinfo5 + txtwood + \"</center>\";\r\n\t\t\r\n\t\t\r\n\treturn info;\r\n}", "function getTop10() {\n return DBA.query(\"SELECT * FROM friend order by case when debt <> 0 then 0 else 1 end, debt desc LIMIT 10\")\n .then(function (result) {\n return DBA.getAll(result);\n });\n }", "function ordersDisplayStringWithAccounting(cart_order_json, accounting_object) {\n return getOrders(cart_order_json)\n .map(function (order) {\n var name = getName(order.consumer);\n var subtotal = calculateConsumerSubtotal(order);\n var order_costs = calculcateOrderCosts(cart_order_json);\n var total = calculateConsumerTotal(subtotal, order_costs);\n var fees = total - subtotal;\n var paidStatus = accounting_object[name] ? \"\" : \"HAS NOT PAID!!\";\n return name + \" owes \" + formatter.format(subtotal / 100) + \" + \" + formatter.format(fees / 100) + \" = \" + formatter.format(total / 100) + \" -- \" + paidStatus;\n })\n .join(\"\\n\");\n}", "function prepareNutrientsView(nutrientsInfo) {\n\n Utils.smartLog([\"preparing nutrients info for rendering\"]);\n\n var collectedNutrients = {};\n var collectedNutrientsSize;\n\n // var total_daily = nutrientsInfo.totalDaily;\n // var total_quantity = nutrientsInfo.totalNutrients;\n\n var core = getCommonDesiredNutrientsList(CORE_NUTRIENTS_FOR_DISPLAY, DESIRED_NUTRIENTS_LENGTH, nutrientsInfo.totalDaily, nutrientsInfo.totalNutrients);\n // collectedNutrients = collectedNutrients.concat(core);\n collectedNutrients = $.extend({}, collectedNutrients, core);\n collectedNutrientsSize = Object.keys(collectedNutrients).length;\n\n // if not enough, try adding secondary core\n if (collectedNutrientsSize < DESIRED_NUTRIENTS_LENGTH) {\n var other_core = getCommonDesiredNutrientsList(OTHER_CORE_NUTRIENTS_FOR_DISPLAY, DESIRED_NUTRIENTS_LENGTH - collectedNutrientsSize, nutrientsInfo.totalDaily, nutrientsInfo.totalNutrients);\n // collectedNutrients = collectedNutrients.concat(other_core);\n collectedNutrients = $.extend({}, collectedNutrients, other_core);\n collectedNutrientsSize = Object.keys(collectedNutrients).length;\n }\n\n\n // if still not enough, add everything else that's there\n if (collectedNutrientsSize < DESIRED_NUTRIENTS_LENGTH) {\n var all_else = getCommonDesiredNutrientsList(ALL_ELSE, DESIRED_NUTRIENTS_LENGTH - collectedNutrientsSize , nutrientsInfo.totalDaily, nutrientsInfo.totalNutrients);\n // collectedNutrients = collectedNutrients.concat(all_else);\n collectedNutrients = $.extend({}, collectedNutrients, all_else);\n }\n\n // if still not enough, not much we could do\n renderNutritionAR(collectedNutrients);\n }", "function logOrderSummary(anwsers) {\n // create order data variables\n let customerName, productTotal, kiloTotal;\n anwsers.forEach((an) => {\n switch (an.questionId) {\n case 1:\n customerName = an.anwser;\n break;\n case 2:\n productTotal = an.anwser;\n break;\n case 3:\n kiloTotal = an.anwser;\n }\n });\n\n // create new order\n let newOrder = new Order(customerName, productTotal, kiloTotal);\n\n // take order data and turn it into information\n let customerOrder = {};\n customerOrder.total = newOrder.calculateTotal(0.14, 15);\n customerOrder.name = newOrder.getCustomerName();\n customerOrder.deliveryCost = newOrder.calculateDeliveryPrice(15);\n customerOrder.purchaseCost = newOrder.getCustomerTotalTaxed(0.14);\n\n // log order info to console\n console.log(\n `\\nPurchase summary for: ${customerOrder.name} \\nDelivery Cost: $${customerOrder.deliveryCost} \\nPurchase Cost: $${customerOrder.purchaseCost} \\nTotal Cost: $${customerOrder.total}`\n );\n}", "function viewAllDepts() {\n connection.query(\"SELECT d.name AS Department FROM department d ORDER BY d.name;\", function (err, res) {\n if (err) throw err;\n let tableResults = [];\n for (var i = 0; i < res.length; i++) {\n var deptObj = [res[i].Department];\n tableResults.push(deptObj);\n }\n console.clear();\n console.log(\n \" ------------------------------------ \\n ALL COMPANY DEPARTMENTS AT THIS TIME \\n ------------------------------------\"\n );\n console.table([\"Department\"], tableResults);\n actions();\n });\n}", "function getThreeTechDeets(){\n console.log(\"test\"); \n const twoThreeDeetsApiUrl = \"https://tas360feedbackapi.herokuapp.com/api/feedback\";\n\n\n fetch(twoThreeDeetsApiUrl).then(function(response){\n console.log(response); \n return response.json();\n \n }).then(function(json){\n\n let html = \"<ul>\";\n json.forEach((survey)=>{\n if (survey.employee_Feedback == 'EmployeeThree' && survey.techTotal >= 5 && survey.techTotal <= 7){ //red \n\n html+= \"<p><div><div class = \\\"scoreName\\\">Technology Score</div><div class = \\\"d-img-red\\\"></div></div></p>\" + \n \"<div class=\\\"d-box-2\\\"><div class = \\\"space2\\\"><p> ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎</p></div>\" +\n \"<p>‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‎Exceptionality ... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎\" + survey.tech1 + \"</p>\" +\n \"<div class = \\\"space2\\\"><p> ‎‏‏‎ ‎‏The exceptionality score describes an employee's willingness to go the extra mile on tasks and projects. </p></div>\" +\n \"<p>‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎Flexibility ... ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ \" + survey.tech2 + \"‎‏‏‎‏‎‎‏‏‎</p>\" +\n \"<div class = \\\"space2\\\"><p> ‎‏‏‎ ‎‏ ‎‏‏‎The flexibility score describes an employee's ability to react and adapt to changes in the workplace. ‏‏‎‎</p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎Cleverness ... ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎‏‏‎\" + survey.tech3 + \"‎‏‏‎‎‏‏‎‎</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The cleverness score describes an employee's ability to solve problems creatively and recourcefully. </p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎Producivity ... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎ ‏‏‎ \" + survey.tech4 + \"‎‏‏‎</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The productivty score describes an employee's level of time management skills. </p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ Knowledgeable... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎\" + survey.tech5 + \"</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The knowledgeable score describes an employee's ability to absorb new information quickly and apply it to projects.‎</p></div></div>\"; \n }\n else if (survey.employee_Feedback == 'EmployeeThree' && survey.techTotal >= 8 && survey.techTotal <= 13) {\n html+= \"<p><div><div class = \\\"scoreName\\\">Technology Score</div><div class = \\\"d-img-orange\\\"></div></div></p>\" + \n \"<div class=\\\"d-box-2\\\"><div class = \\\"space2\\\"><p> ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎</p></div>\" +\n \"<p>‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‎Exceptionality ... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎\" + survey.tech1 + \"</p>\" +\n \"<div class = \\\"space2\\\"><p> ‎‏‏‎ ‎‏The exceptionality score describes an employee's willingness to go the extra mile on tasks and projects. </p></div>\" +\n \"<p>‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎Flexibility ... ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ \" + survey.tech2 + \"‎‏‏‎‏‎‎‏‏‎</p>\" +\n \"<div class = \\\"space2\\\"><p> ‎‏‏‎ ‎‏ ‎‏‏‎The flexibility score describes an employee's ability to react and adapt to changes in the workplace. ‏‏‎‎</p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎Cleverness ... ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎‏‏‎\" + survey.tech3 + \"‎‏‏‎‎‏‏‎‎</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The cleverness score describes an employee's ability to solve problems creatively and recourcefully. </p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎Producivity ... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎ ‏‏‎ \" + survey.tech4 + \"‎‏‏‎</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The productivty score describes an employee's level of time management skills. </p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ Knowledgeable... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎\" + survey.tech5 + \"</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The knowledgeable score describes an employee's ability to absorb new information quickly and apply it to projects.‎</p></div></div>\"; \n }\n else if (survey.employee_Feedback == 'EmployeeThree' && survey.techTotal >= 14 && survey.techTotal <= 18) {\n html+= \"<p><div><div class = \\\"scoreName\\\">Technology Score</div><div class = \\\"d-img-yellow\\\"></div></div></p>\" + \n \"<div class=\\\"d-box-2\\\"><div class = \\\"space2\\\"><p> ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎</p></div>\" +\n \"<p>‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‎Exceptionality ... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎\" + survey.tech1 + \"</p>\" +\n \"<div class = \\\"space2\\\"><p> ‎‏‏‎ ‎‏The exceptionality score describes an employee's willingness to go the extra mile on tasks and projects. </p></div>\" +\n \"<p>‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎Flexibility ... ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ \" + survey.tech2 + \"‎‏‏‎‏‎‎‏‏‎</p>\" +\n \"<div class = \\\"space2\\\"><p> ‎‏‏‎ ‎‏ ‎‏‏‎The flexibility score describes an employee's ability to react and adapt to changes in the workplace. ‏‏‎‎</p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎Cleverness ... ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎‏‏‎\" + survey.tech3 + \"‎‏‏‎‎‏‏‎‎</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The cleverness score describes an employee's ability to solve problems creatively and recourcefully. </p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎Producivity ... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎ ‏‏‎ \" + survey.tech4 + \"‎‏‏‎</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The productivty score describes an employee's level of time management skills. </p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ Knowledgeable... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎\" + survey.tech5 + \"</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The knowledgeable score describes an employee's ability to absorb new information quickly and apply it to projects.‎</p></div></div>\"; \n }\n else if (survey.employee_Feedback == 'EmployeeThree' && survey.techTotal >= 19 && survey.techTotal <= 21) {\n html+= \"<p><div><div class = \\\"scoreName\\\">Technology Score</div><div class = \\\"d-img-lime\\\"></div></div></p>\" + \n \"<div class=\\\"d-box-2\\\"><div class = \\\"space2\\\"><p> ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎</p></div>\" +\n \"<p>‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‎Exceptionality ... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎\" + survey.tech1 + \"</p>\" +\n \"<div class = \\\"space2\\\"><p> ‎‏‏‎ ‎‏The exceptionality score describes an employee's willingness to go the extra mile on tasks and projects. </p></div>\" +\n \"<p>‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎Flexibility ... ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ \" + survey.tech2 + \"‎‏‏‎‏‎‎‏‏‎</p>\" +\n \"<div class = \\\"space2\\\"><p> ‎‏‏‎ ‎‏ ‎‏‏‎The flexibility score describes an employee's ability to react and adapt to changes in the workplace. ‏‏‎‎</p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎Cleverness ... ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎‏‏‎\" + survey.tech3 + \"‎‏‏‎‎‏‏‎‎</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The cleverness score describes an employee's ability to solve problems creatively and recourcefully. </p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎Producivity ... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎ ‏‏‎ \" + survey.tech4 + \"‎‏‏‎</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The productivty score describes an employee's level of time management skills. </p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ Knowledgeable... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎\" + survey.tech5 + \"</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The knowledgeable score describes an employee's ability to absorb new information quickly and apply it to projects.‎</p></div></div>\"; \n }\n else if (survey.employee_Feedback == 'EmployeeThree' && survey.techTotal >= 22 && survey.techTotal <= 25) {\n html+= \"<p><div><div class = \\\"scoreName\\\">Technology Score</div><div class = \\\"d-img-green\\\"></div></div></p>\" + \n \"<div class=\\\"d-box-2\\\"><div class = \\\"space2\\\"><p> ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎</p></div>\" +\n \"<p>‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‎Exceptionality ... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎\" + survey.tech1 + \"</p>\" +\n \"<div class = \\\"space2\\\"><p> ‎‏‏‎ ‎‏The exceptionality score describes an employee's willingness to go the extra mile on tasks and projects. </p></div>\" +\n \"<p>‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎Flexibility ... ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ \" + survey.tech2 + \"‎‏‏‎‏‎‎‏‏‎</p>\" +\n \"<div class = \\\"space2\\\"><p> ‎‏‏‎ ‎‏ ‎‏‏‎The flexibility score describes an employee's ability to react and adapt to changes in the workplace. ‏‏‎‎</p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎Cleverness ... ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎‏‏‎\" + survey.tech3 + \"‎‏‏‎‎‏‏‎‎</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The cleverness score describes an employee's ability to solve problems creatively and recourcefully. </p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎Producivity ... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎ ‏‏‎ \" + survey.tech4 + \"‎‏‏‎</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The productivty score describes an employee's level of time management skills. </p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ Knowledgeable... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎\" + survey.tech5 + \"</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The knowledgeable score describes an employee's ability to absorb new information quickly and apply it to projects.‎</p></div></div>\"; \n }\n });\n html += \"</ul>\"; \n document.getElementById(\"details\").innerHTML = html; \n }).catch(function(error){\n console.log(error);\n })\n}", "function fetchAllDrugs() {\n const url = \"https://rxnav.nlm.nih.gov/REST/interaction/interaction.json?rxcui=2653\";\n console.log(\"fetching drugs\");\n\n fetch(url)\n .then(response => response.json())\n .then(result => {\n\n\n // data from all sources(DrugBank + ONCHigh)\n for(source in result.interactionTypeGroup){\n const drug_name = result.interactionTypeGroup[source].interactionType[0].minConceptItem.name;\n\n // getting all interaction pairs\n for(idx in result.interactionTypeGroup[source].interactionType[0].interactionPair){\n const d = result.interactionTypeGroup[source].interactionType[0].interactionPair[idx]; // drug object \n var drug = [];\n drug.push(d.interactionConcept[1].sourceConceptItem.name); // sourceConceptItem vs minConceptItem\n drug.push(d.severity);\n drug.push(d.description);\n\n all_drugs.push(drug);\n }\n }\n\n console.log(all_drugs);\n\n // displaying the data\n updateTable(all_drugs);\n document.getElementById(\"data_here\").style.display = \"block\";\n\n showVisual();\n \n\n })\n .catch(function(err){\n console.log(err);\n });\n\n}", "getNumberOfTopBillers() {\n let numberOfTopBillers = 0;\n for (let i = 0; i < this.getGobjects().length; i++) {\n if (this.getGobjects()[i].requestsTopBilling) {\n numberOfTopBillers++;\n }\n }\n return numberOfTopBillers;\n }", "function viewDepatments() {\n var query = \"SELECT * FROM DEPARTMENTS\";\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\" + \"|| Name: \" + res[i].name + \"|| ID: \" + res[i].id);\n }\n runManager();\n });\n }", "function amountCovered(claim){\n\tvar paidOutPerClient = '';\n\tvar percent = percentageCovered(claim);\n\t//Amount paid out rounded to the nearest dollar amount.\n\tvar amount = Math.round(claim.visitCost * (percent / 100));\n\t//Add to the total money paid out. Logged at the end.\n\ttotalPayedOut += amount;\n\tpaidOutPerClient += ('Paid out $<mark>' + amount + '</mark> for ' + claim.patientName);\n\t//Add new ol item for each client's details\n\t$('table').append('<tr><td>' + paidOutPerClient + '</td></tr>');\n\tconsole.log('Paid out $' + amount + ' for ' + claim.patientName);\n}", "tableMostLoyalLeastEngaged() {\n function mostArray(array, property) {\n let orderedArrayDos = array.filter(arr => arr[property] > 0)\n .sort((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 tenPercent = Math.round(orderedArrayDos.length * 10 / 100)\n\n return orderedArrayDos\n }\n this.statistics.mostLoyal = mostArray(this.members, \"votes_with_party_pct\").slice(0, (tenPercent))\n // los que tienen mas missed votes - los que no votaron mas veces(menos comprometidos)\n this.statistics.leastEngaged = mostArray(this.members, \"missed_votes_pct\").slice(0, (tenPercent))\n\n \n }", "function getThreeLeadDeets(){\n console.log(\"test\"); \n //const threeLeadDeetsApiUrl = \"https://localhost:5001/api/feedback\";\n const threeLeadDeetsApiUrl =\"https://tas360feedbackapi.herokuapp.com/api/feedback\";\n\n\n fetch(threeLeadDeetsApiUrl).then(function(response){\n console.log(response); \n return response.json();\n \n }).then(function(json){\n\n let html = \"<ul>\";\n json.forEach((survey)=>{\n if (survey.employee_Feedback == 'EmployeeThree' && survey.leadTotal >= 5 && survey.leadTotal <= 7){ //red \n\n html+= \"<p><div><div class = \\\"scoreName\\\">Leadership Score</div><div class = \\\"d-img-red\\\"></div></div></p>\" + \n \"<div class=\\\"d-box-2\\\"><div class = \\\"space2\\\"><p> ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎</p></div>\" +\n \"<p>‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‎Motivation ... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎\" + survey.lead1 + \"</p>\" +\n \"<div class = \\\"space2\\\"><p> ‎‏‏‎ ‎‏The motivation score describes an employee's ability to motivate subordinates and peers during projects. </p></div>\" +\n \"<p>‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎Decisiveness ... ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎\" + survey.lead2 + \"‎‏‏‎‏‎‎‏‏‎</p>\" +\n \"<div class = \\\"space2\\\"><p> ‎‏‏‎ ‎‏ ‎‏‏‎The decisivness score describes an employee's ability to make concise decions & follow through on them. ‏‏‎‎</p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎Acknowledgement ... ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎‏‏‎\" + survey.lead3 + \"‎‏‏‎‎‏‏‎‎</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The acknowledgement score describes an employee's ability to recognize the effors of peers. </p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎Perseverance ... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎ ‏‏‎ ‎‏‏‎ \" + survey.lead4 + \"‎‏‏‎</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The perserverance score describes an employee's ability to remain consistant through adversity. </p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ Organization... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎ ‏‏‎ ‎‏‏‎ \" + survey.lead5 + \"</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The organizaiton score describes an employee's ability to navigate project management in a diciplined manner.‎</p></div></div>\"; \n }\n else if (survey.employee_Feedback == 'EmployeeThree' && survey.leadTotal >= 8 && survey.leadTotal <= 13) {\n html+= \"<p><div><div class = \\\"scoreName\\\">Leadership Score</div><div class = \\\"d-img-orange\\\"></div></div></p>\" + \n \"<div class=\\\"d-box-2\\\"><div class = \\\"space2\\\"><p> ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎</p></div>\" +\n \"<p>‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‎Motivation ... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎\" + survey.lead1 + \"</p>\" +\n \"<div class = \\\"space2\\\"><p> ‎‏‏‎ ‎‏The motivation score describes an employee's ability to motivate subordinates and peers during projects. </p></div>\" +\n \"<p>‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎Decisiveness ... ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎\" + survey.lead2 + \"‎‏‏‎‏‎‎‏‏‎</p>\" +\n \"<div class = \\\"space2\\\"><p> ‎‏‏‎ ‎‏ ‎‏‏‎The decisivness score describes an employee's ability to make concise decions & follow through on them. ‏‏‎‎</p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎Acknowledgement ... ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎‏‏‎\" + survey.lead3 + \"‎‏‏‎‎‏‏‎‎</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The acknowledgement score describes an employee's ability to recognize the effors of peers. </p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎Perseverance ... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎ ‏‏‎ ‎‏‏‎ \" + survey.lead4 + \"‎‏‏‎</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The perserverance score describes an employee's ability to remain consistant through adversity. </p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ Organization... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎ ‏‏‎ ‎‏‏‎ \" + survey.lead5 + \"</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The organizaiton score describes an employee's ability to navigate project management in a diciplined manner.‎</p></div></div>\";\n }\n else if (survey.employee_Feedback == 'EmployeeThree' && survey.leadTotal >= 14 && survey.leadTotal <= 18) {\n html+= \"<p><div><div class = \\\"scoreName\\\">Leadership Score</div><div class = \\\"d-img-yellow\\\"></div></div></p>\" + \n \"<div class=\\\"d-box-2\\\"><div class = \\\"space2\\\"><p> ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎</p></div>\" +\n \"<p>‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‎Motivation ... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎\" + survey.lead1 + \"</p>\" +\n \"<div class = \\\"space2\\\"><p> ‎‏‏‎ ‎‏The motivation score describes an employee's ability to motivate subordinates and peers during projects. </p></div>\" +\n \"<p>‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎Decisiveness ... ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎\" + survey.lead2 + \"‎‏‏‎‏‎‎‏‏‎</p>\" +\n \"<div class = \\\"space2\\\"><p> ‎‏‏‎ ‎‏ ‎‏‏‎The decisivness score describes an employee's ability to make concise decions & follow through on them. ‏‏‎‎</p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎Acknowledgement ... ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎‏‏‎\" + survey.lead3 + \"‎‏‏‎‎‏‏‎‎</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The acknowledgement score describes an employee's ability to recognize the effors of peers. </p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎Perseverance ... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎ ‏‏‎ ‎‏‏‎ \" + survey.lead4 + \"‎‏‏‎</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The perserverance score describes an employee's ability to remain consistant through adversity. </p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ Organization... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎ ‏‏‎ ‎‏‏‎ \" + survey.lead5 + \"</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The organizaiton score describes an employee's ability to navigate project management in a diciplined manner.‎</p></div></div>\";\n }\n else if (survey.employee_Feedback == 'EmployeeThree' && survey.leadTotal >= 19 && survey.leadTotal <= 21) {\n html+= \"<p><div><div class = \\\"scoreName\\\">Leadership Score</div><div class = \\\"d-img-lime\\\"></div></div></p>\" + \n \"<div class=\\\"d-box-2\\\"><div class = \\\"space2\\\"><p> ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎</p></div>\" +\n \"<p>‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‎Motivation ... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎\" + survey.lead1 + \"</p>\" +\n \"<div class = \\\"space2\\\"><p> ‎‏‏‎ ‎‏The motivation score describes an employee's ability to motivate subordinates and peers during projects. </p></div>\" +\n \"<p>‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎Decisiveness ... ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎\" + survey.lead2 + \"‎‏‏‎‏‎‎‏‏‎</p>\" +\n \"<div class = \\\"space2\\\"><p> ‎‏‏‎ ‎‏ ‎‏‏‎The decisivness score describes an employee's ability to make concise decions & follow through on them. ‏‏‎‎</p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎Acknowledgement ... ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎‏‏‎\" + survey.lead3 + \"‎‏‏‎‎‏‏‎‎</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The acknowledgement score describes an employee's ability to recognize the effors of peers. </p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎Perseverance ... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎ ‏‏‎ ‎‏‏‎ \" + survey.lead4 + \"‎‏‏‎</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The perserverance score describes an employee's ability to remain consistant through adversity. </p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ Organization... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎ ‏‏‎ ‎‏‏‎ \" + survey.lead5 + \"</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The organizaiton score describes an employee's ability to navigate project management in a diciplined manner.‎</p></div></div>\";\n }\n else if (survey.employee_Feedback == 'EmployeeThree' && survey.leadTotal >= 22 && survey.leadTotal <= 25) {\n html+= \"<p><div><div class = \\\"scoreName\\\">Leadership Score</div><div class = \\\"d-img-green\\\"></div></div></p>\" + \n \"<div class=\\\"d-box-2\\\"><div class = \\\"space2\\\"><p> ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎</p></div>\" +\n \"<p>‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‎Motivation ... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎\" + survey.lead1 + \"</p>\" +\n \"<div class = \\\"space2\\\"><p> ‎‏‏‎ ‎‏The motivation score describes an employee's ability to motivate subordinates and peers during projects. </p></div>\" +\n \"<p>‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎Decisiveness ... ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎\" + survey.lead2 + \"‎‏‏‎‏‎‎‏‏‎</p>\" +\n \"<div class = \\\"space2\\\"><p> ‎‏‏‎ ‎‏ ‎‏‏‎The decisivness score describes an employee's ability to make concise decions & follow through on them. ‏‏‎‎</p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎Acknowledgement ... ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎‏‏‎\" + survey.lead3 + \"‎‏‏‎‎‏‏‎‎</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The acknowledgement score describes an employee's ability to recognize the effors of peers. </p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎Perseverance ... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎ ‏‏‎ ‎‏‏‎ \" + survey.lead4 + \"‎‏‏‎</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The perserverance score describes an employee's ability to remain consistant through adversity. </p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ Organization... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎ ‏‏‎ ‎‏‏‎ \" + survey.lead5 + \"</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The organizaiton score describes an employee's ability to navigate project management in a diciplined manner.‎</p></div></div>\";\n }\n\n });\n html += \"</ul>\"; \n document.getElementById(\"details\").innerHTML = html; \n }).catch(function(error){\n console.log(error);\n })\n}", "async function getByYear() {\n let awards\n}", "function notaHse(sede, generation) {\n var ratings = data[sede][generation]['ratings'];\n var array = [];\n for (var i = 0 ; i < ratings.length; i++) {\n array[i] = ratings[i].teacher;\n }\n document.getElementById('total-enrollment').innerHTML = ratings;\n document.getElementById('total-enrollment blue').innerHTML = array;\n return array;\n}", "function getkCal(nutrients) {\n let calories = nutrients.ENERC_KCAL.quantity;\n return calories;\n}", "function returnOftotals () {\n return {\n billCallTotal,\n billSMSTotal,\n billTotalTotal,\n currentValueOfCall,\n currentValueOfSMS,\n costWarning,\n costCritical,\n levels\n\n }\n }", "function giveCommission()\n{\n for(var j=0; j<rentals.length;j++)\n {\n var timeDay=get_date(rentals[j].id);\n var commission = rentals[j].price*0.70;\n\n console.log('Commission for '+ rentals[j].driver.firstName+ ''+ rentals[j].driver.lastName + 'course is ' + commission + '.');\n var insurance = commission/2;\n\n console.log('Insurance for '+ rentals[j].driver.firstName+ ''+ rentals[j].driver.lastName + 'course is ' + insurance + '.');\n rentals[j].commission.insurance=insurance;\n\n var assistanceRoad=timeDay*1;\n console.log('Road assistance for '+ rentals[j].driver.firstName+ ''+ rentals[j].driver.lastName + 'course is ' + assistanceRoad + '.');\n\n rentals[j].commission.assistance=assistanceRoad;\n\n var drivy = commission - insurance - assistanceRoad;\n console.log('Drivy for '+ rentals[j].driver.firstName+ ''+ rentals[j].driver.lastName + 'course is ' + drivy + '.');\n\n rentals[j].commission.drivy=drivy;\n }\n}", "function getThreeCommDeets(){\n console.log(\"test\"); \n const threeCommDeetsApiUrl =\"https://tas360feedbackapi.herokuapp.com/api/feedback\";\n ;\n\n fetch(threeCommDeetsApiUrl).then(function(response){\n console.log(response); \n return response.json();\n \n }).then(function(json){\n\n let html = \"<ul>\";\n json.forEach((survey)=>{\n if (survey.employee_Feedback == 'EmployeeThree' && survey.commTotal >= 5 && survey.commTotal <= 7){ //red \n\n html+= \"<p><div><div class = \\\"scoreName\\\">Communication Score</div><div class = \\\"d-img-red\\\"></div></div></p>\" + \n \"<div class=\\\"d-box-2\\\"><div class = \\\"space2\\\"><p> ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎</p></div>\" +\n \"<p>‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‎Transparency ... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎\" + survey.comm1 + \"</p>\" +\n \"<div class = \\\"space2\\\"><p> ‎‏‏‎ ‎‏The transparency score describes an employee's ability to communicate ideas clearly and descriptively. </p></div>\" +\n \"<p>‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎Responsiveness ... ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ \" + survey.comm2 + \"‎‏‏‎‏‎‎‏‏‎</p>\" +\n \"<div class = \\\"space2\\\"><p> ‎‏‏‎ ‎‏ ‎‏‏‎The responsiveness score describes an employee's ability to accept and adapt to constructive criticism. ‏‏‎‎</p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎Punctuality ... ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎‏‏‎\" + survey.comm3 + \"‎‏‏‎‎‏‏‎‎</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The punctuality score describes an employee's ability to complete tasks in an quality and timely manner. </p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎Proactiveness ... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎ ‏‏‎ \" + survey.comm4 + \"‎‏‏‎</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The proactiveness score describes an employee's willingness to go the extra mile on tasks and projects. </p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ Conscientiousness... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎\" + survey.comm5 + \"</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The conscientiousness score describes an employee's ability to display appropriate workplace courtesy.‎</p></div></div>\"; \n }\n else if (survey.employee_Feedback == 'EmployeeThree' && survey.commTotal >= 8 && survey.commTotal <= 13) {\n html+= \"<p><div><div class = \\\"scoreName\\\">Communication Score</div><div class = \\\"d-img-orange\\\"></div></div></p>\" + \n \"<div class=\\\"d-box-2\\\"><div class = \\\"space2\\\"><p> ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎</p></div>\" +\n \"<p>‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‎Transparency ... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎\" + survey.comm1 + \"</p>\" +\n \"<div class = \\\"space2\\\"><p> ‎‏‏‎ ‎‏The transparency score describes an employee's ability to communicate ideas clearly and descriptively. </p></div>\" +\n \"<p>‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎Responsiveness ... ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ \" + survey.comm2 + \"‎‏‏‎‏‎‎‏‏‎</p>\" +\n \"<div class = \\\"space2\\\"><p> ‎‏‏‎ ‎‏ ‎‏‏‎The responsiveness score describes an employee's ability to accept and adapt to constructive criticism. ‏‏‎‎</p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎Punctuality ... ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎‏‏‎\" + survey.comm3 + \"‎‏‏‎‎‏‏‎‎</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The punctuality score describes an employee's ability to complete tasks in an quality and timely manner. </p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎Proactiveness ... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎ ‏‏‎ \" + survey.comm4 + \"‎‏‏‎</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The proactiveness score describes an employee's willingness to go the extra mile on tasks and projects. </p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ Conscientiousness... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎\" + survey.comm5 + \"</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The conscientiousness score describes an employee's ability to display appropriate workplace courtesy.‎</p></div></div>\"; \n }\n else if (survey.employee_Feedback == 'EmployeeThree' && survey.commTotal >= 14 && survey.commTotal <= 18) {\n html+= \"<p><div><div class = \\\"scoreName\\\">Communication Score</div><div class = \\\"d-img-yellow\\\"></div></div></p>\" + \n \"<div class=\\\"d-box-2\\\"><div class = \\\"space2\\\"><p> ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎</p></div>\" +\n \"<p>‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‎Transparency ... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎\" + survey.comm1 + \"</p>\" +\n \"<div class = \\\"space2\\\"><p> ‎‏‏‎ ‎‏The transparency score describes an employee's ability to communicate ideas clearly and descriptively. </p></div>\" +\n \"<p>‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎Responsiveness ... ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ \" + survey.comm2 + \"‎‏‏‎‏‎‎‏‏‎</p>\" +\n \"<div class = \\\"space2\\\"><p> ‎‏‏‎ ‎‏ ‎‏‏‎The responsiveness score describes an employee's ability to accept and adapt to constructive criticism. ‏‏‎‎</p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎Punctuality ... ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎‏‏‎\" + survey.comm3 + \"‎‏‏‎‎‏‏‎‎</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The punctuality score describes an employee's ability to complete tasks in an quality and timely manner. </p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎Proactiveness ... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎ ‏‏‎ \" + survey.comm4 + \"‎‏‏‎</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The proactiveness score describes an employee's willingness to go the extra mile on tasks and projects. </p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ Conscientiousness... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎\" + survey.comm5 + \"</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The conscientiousness score describes an employee's ability to display appropriate workplace courtesy.‎</p></div></div>\"; \n }\n else if (survey.employee_Feedback == 'EmployeeThree' && survey.commTotal >= 19 && survey.commTotal <= 21) {\n html+= \"<p><div><div class = \\\"scoreName\\\">Communication Score</div><div class = \\\"d-img-lime\\\"></div></div></p>\" + \n \"<div class=\\\"d-box-2\\\"><div class = \\\"space2\\\"><p> ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎</p></div>\" +\n \"<p>‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‎Transparency ... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎\" + survey.comm1 + \"</p>\" +\n \"<div class = \\\"space2\\\"><p> ‎‏‏‎ ‎‏The transparency score describes an employee's ability to communicate ideas clearly and descriptively. </p></div>\" +\n \"<p>‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎Responsiveness ... ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ \" + survey.comm2 + \"‎‏‏‎‏‎‎‏‏‎</p>\" +\n \"<div class = \\\"space2\\\"><p> ‎‏‏‎ ‎‏ ‎‏‏‎The responsiveness score describes an employee's ability to accept and adapt to constructive criticism. ‏‏‎‎</p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎Punctuality ... ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎‏‏‎\" + survey.comm3 + \"‎‏‏‎‎‏‏‎‎</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The punctuality score describes an employee's ability to complete tasks in an quality and timely manner. </p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎Proactiveness ... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎ ‏‏‎ \" + survey.comm4 + \"‎‏‏‎</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The proactiveness score describes an employee's willingness to go the extra mile on tasks and projects. </p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ Conscientiousness... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎\" + survey.comm5 + \"</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The conscientiousness score describes an employee's ability to display appropriate workplace courtesy.‎</p></div></div>\"; \n }\n else if (survey.employee_Feedback == 'EmployeeThree' && survey.commTotal >= 22 && survey.commTotal <= 25) {\n html+= \"<p><div><div class = \\\"scoreName\\\">Communication Score</div><div class = \\\"d-img-green\\\"></div></div></p>\" + \n \"<div class=\\\"d-box-2\\\"><div class = \\\"space2\\\"><p> ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎</p></div>\" +\n \"<p>‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‎Transparency ... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎\" + survey.comm1 + \"</p>\" +\n \"<div class = \\\"space2\\\"><p> ‎‏‏‎ ‎‏The transparency score describes an employee's ability to communicate ideas clearly and descriptively. </p></div>\" +\n \"<p>‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎Responsiveness ... ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ \" + survey.comm2 + \"‎‏‏‎‏‎‎‏‏‎</p>\" +\n \"<div class = \\\"space2\\\"><p> ‎‏‏‎ ‎‏ ‎‏‏‎The responsiveness score describes an employee's ability to accept and adapt to constructive criticism. ‏‏‎‎</p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎Punctuality ... ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‏‏‎‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‏‏‎‎‏‏‎ ‎‏‏‎‎‏‏‎‎‏‏‎‎‏‏‎‏‏‎\" + survey.comm3 + \"‎‏‏‎‎‏‏‎‎</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The punctuality score describes an employee's ability to complete tasks in an quality and timely manner. </p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎Proactiveness ... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎ ‎‏‏‎‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎ ‏‏‎ \" + survey.comm4 + \"‎‏‏‎</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The proactiveness score describes an employee's ability to stay up to date with the needs of managers and clients. </p></div>\" +\n \"<p> ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ Conscientiousness... ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎ ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‏‏‎\" + survey.comm5 + \"</p>\" +\n \"<div class = \\\"space2\\\"><p>‎ ‎‏‏‎ The conscientiousness score describes an employee's ability to display appropriate workplace courtesy.‎</p></div></div>\"; \n }\n\n });\n html += \"</ul>\"; \n document.getElementById(\"details\").innerHTML = html; \n }).catch(function(error){\n console.log(error);\n })\n}", "function getInitialDataToShow(callback) {\n getTips(20, function (error, tips) { //choose 65 tips initially\n if(error)\n callback(error, null);\n else{\n let final_results = [];\n addTransactionsIntoArray(tips, final_results, 'tip', function (final_results, branch_and_trunk) {\n addTransactionsIntoArray(branch_and_trunk, final_results, 'unconfirmed', function (final_results, branch_and_trunk) {\n addTransactionsIntoArray(branch_and_trunk, final_results, 'unconfirmed', function (final_results, branch_and_trunk) {\n addTransactionsIntoArray(branch_and_trunk, final_results, 'unconfirmed', function (final_results) {\n final_results = utils.deleteDuplicates(final_results);\n callback(null, final_results);\n }, callback);\n }, callback);\n }, callback);\n }, callback);\n }\n });\n}", "function printInventors(inventors){\n console.log(`${'Nombre'.padEnd(12,' ')}${'Apellido'.padEnd(12,' ')}Año`);\n console.log('------------------------------- ');\n inventors.forEach(inventor => console.log(`${inventor.first.padEnd(12,' ')}${inventor.last.padEnd(12,' ')}${inventor.year}`)); \n }", "function cumulativeNps(region, promotion) {\n var promoters = 0;\n var detractors = 0;\n var arrayNps = [];\n var arrayPromoters = [];\n var arrayDetractors = [];\n var arrayPassive = [];\n var totalNps = 0;\n var totalPromoters = 0;\n var totalDetractors = 0;\n var totalPassive = 0;\n var s1 = 0;\n var s2 = 0;\n var s3 = 0;\n var s4 = 0;\n var ratings = data[region][promotion]['ratings'];\n for (var i = 0; i < ratings.length; i++) {\n arrayPromoters[i] = ratings[i]['nps']['promoters'];\n arrayDetractors[i] = ratings[i]['nps']['detractors'];\n arrayPassive[i] = ratings[i]['nps']['passive'];\n arrayNps[i] = ratings[i]['nps']['promoters'] + ratings[i]['nps']['detractors'];\n }\n for (var i = 0; i < arrayNps.length; i++) {\n totalPromoters = totalPromoters + arrayPromoters[i];\n totalDetractors = totalPromoters + arrayDetractors[i];\n totalPassive = totalPromoters + arrayPassive[i];\n totalNps = totalNps + arrayNps[i];\n }\n\n totalNps = parseInt(totalNps / arrayNps.length) + '%';\n totalPromoters = parseInt(totalPromoters / arrayPromoters.length) + '%';\n totalDetractors = parseInt(totalDetractors / arrayDetractors.length) + '%';\n totalPassive = parseInt(totalPassive / arrayPassive.length) + '%';\n\n cumulativeNpsBox.textContent = totalNps;\n cumulativeNpsBox.classList.add('number-box-int');\n promotersBox.textContent = totalPromoters;\n detractorsBox.textContent = totalDetractors;\n passiveBox.textContent = totalPassive;\n\n\n if (arrayNps.length === 2) {\n s1 = arrayNps[0];\n s2 = arrayNps[1];\n } else if (arrayNps.length === 4) {\n s1 = arrayNps[0];\n s2 = arrayNps[1];\n s3 = arrayNps[2];\n s4 = arrayNps[3];\n }\n\n drawNetPromoter(s1, s2, s3, s4);\n}", "function get_all_info(template,callback)\n{\n var api_response = {};\n api_response[\"quote\"] = getRegexData(template,'<div class=\"quote\">(.*?)<\\/div>',0);\n api_response[\"author_name\"] = getRegexData(template,'<div class=\"author_name\">(.*?)<\\/div>',0);\n api_response[\"author_info\"] = getRegexData(template,'<div class=\"author_info\">(.*?)<\\/div>',0);\n\n var tags_links = getRegexData(template,'<div class=\"tags\">(.*?)<\\/div>',0);\n api_response[\"tags\"] = getTextFromLinks(tags_links);\n\n var reference_link = getRegexData(template,'<div class=\"reference_link\">(.*?)<\\/div>',0);\n api_response[\"ref_link\"] = getReferenceLink(reference_link);\n\n callback(api_response);\n\n}", "function makeDonut(location){\n // select data for year 2015\n var healthYear = [];\n for (var k = 0; k < healthYears.length; k++){\n if (healthYears[k].YEAR == \"2015\"){\n healthYear.push(healthYears[k]);\n };\n };\n\n // select data for gender total\n var healthYearTotal = [];\n for (var l = 0; l < healthYear.length; l++){\n if (healthYear[l].GENDER == \"total\"){\n healthYearTotal.push(healthYear[l]);\n };\n };\n\n // select data for NLD\n var dataDonut = [];\n for (var loc = 0; loc < healthYearTotal.length; loc++){\n if (location == healthYearTotal[loc].COU){\n dataDonut.push(healthYearTotal[loc]);\n };\n };\n\n // set chart dimensions\n var widthDonut = 450;\n var full_width = 620;\n var heightDonut = 300;\n var radius = Math.min(widthDonut - 10 , heightDonut - 10)/2;\n\n // set colours for the slices\n var color = d3.scale.ordinal()\n .range([\"#568203\", \"#7ebe03\", \"#bbfc3d\"]);\n\n // set arc dimensions\n var arc = d3.svg.arc()\n .outerRadius(radius - 10)\n .innerRadius(radius - 80);\n\n // set arc dimensions for hover\n var arcOver = d3.svg.arc()\n .outerRadius(radius + 5)\n .innerRadius(radius - 80);\n\n // transform data to correct format\n var pie = d3.layout.pie()\n .sort(null)\n .value(function(d) { return d.VALUE; });\n\n // make svg element\n var svg = d3.select(\"#donut\")\n .append(\"svg\")\n .attr(\"width\", full_width)\n .attr(\"height\", heightDonut)\n .append(\"g\")\n .attr(\"transform\", \"translate(\" + widthDonut / 2 + \",\"\n + heightDonut / 2 + \")\");\n\n // draw arcs and make donut\n var g = svg.selectAll(\".arc\")\n .data(pie(dataDonut))\n .enter().append(\"g\")\n .attr(\"class\", \"arc\");\n\n g.append(\"path\")\n .attr(\"d\", arc)\n .style(\"fill\", function(d) { return color(d.data.VARIABLE); })\n .on(\"mouseover\", function (d) {\n d3.select(this).transition()\n .duration(200)\n .attr(\"d\", arcOver)\n })\n .on(\"mouseout\", function (d) {\n d3.select(this).transition()\n .duration(200)\n .attr(\"d\", arc)\n });\n\n // add text to donut slices\n var text = svg.selectAll(\"text\")\n .data(pie(dataDonut))\n .enter()\n .append(\"text\")\n .attr(\"transform\", function (d) {\n return \"translate(\" + arc.centroid(d) + \")\";\n })\n .attr(\"dy\", \".4em\")\n .attr(\"text-anchor\", \"middle\")\n .text(function(d){\n return d.data.VALUE+\"%\";\n })\n .style({\n fill:\"black\",\n 'font-size':'14px',\n 'font-weight': 'bold'\n });\n\n // set legend dimensions\n var legendSize = 20;\n var legendSpace = 7;\n var heightLegend = legendSize + legendSpace;\n\n // add data to legend\n var legend = svg.selectAll(\".legend\")\n .data(color.domain())\n .enter()\n .append(\"g\")\n .attr({\n class:'legend',\n transform:function(d,i){\n return 'translate(160,' + ((i * heightLegend) - 40) + ')';}\n\n });\n\n // draw the legend coloured circles\n legend.append(\"rect\")\n .attr({\n width: legendSize,\n height: legendSize,\n rx:18,\n ry:18\n })\n .style({\n fill:color,\n stroke:color\n });\n\n // add text to the legend\n legend.append('text')\n .attr({\n x:30,\n y:15\n })\n .text(function(d){\n return d;\n })\n .style({\n fill:\"black\",\n 'font-size':'14px'\n });\n\n // add title to the chart\n var title = \"Health perception of \" + dataDonut[0][\"GENDER\"] + \" in \"\n + dataDonut[0][\"COUNTRY\"] + \" in \" + dataDonut[0][\"YEAR\"];\n d3.select(\"#donut\").select(\"h4\").text(title);\n}", "function getData(){\r\n\tdataArray = [];\r\n\t\r\n\t//unused\r\nvar myStatisticalObject = new statisticalObject(\"percentEnlisted\",0.387,\" of your friends Enlisted in the Army representing 38.7% of the population 18 - 44\");\r\n\tdataArray.push(myStatisticalObject);\r\n\t\r\n\t\r\n\t//total enlistments last year (1914) - 52561 - 12.6% total enlistment\r\nvar myStatisticalObject = new statisticalObject(\"enlistLastYear\",0.126,\" of your friends Enlisted last year (1914)\");\r\n\tdataArray.push(myStatisticalObject);\r\n\t\r\n\t//total enlistments this year (1915) - 165912 - 40% total enlistment\r\nvar myStatisticalObject = new statisticalObject(\"enlistthisYear\",0.4,\" of your friends will enlist this year (1915)\");\r\n\tdataArray.push(myStatisticalObject);\r\n\t\r\n\t\r\n\t//total enlistments remainder of war (1916 - 18) 47.5% total enlistment\r\nvar myStatisticalObject = new statisticalObject(\"enlistRemaining\",0.475,\" of your friends will enlist in the remaining years of WW1\");\r\n\tdataArray.push(myStatisticalObject);\r\n\t\r\n\t\r\n\t//total embarkations of 336931 (81%) - served overseas\r\nvar myStatisticalObject = new statisticalObject(\"embarkations\",0.81,\" of your friends will serve overseas during WW1\");\r\n\tdataArray.push(myStatisticalObject);\r\n\t\r\n\t//total deaths 61720 - 18.3% of enlistees who embarked\r\nvar myStatisticalObject = new statisticalObject(\"deaths\",0.183,\" of your friends serving overseas will die during WW1\");\r\n\tdataArray.push(myStatisticalObject);\r\n\r\n\r\n //total injured 155000 - 46% people of enlistees who embarked\r\nvar myStatisticalObject = new statisticalObject(\"injuries\",0.46,\" of your friends serving overseas will sustain Injuries during WW1\");\r\n\tdataArray.push(myStatisticalObject);\t\r\n\t\r\n\t//total taken prisoner of war - 4044 represents 1.2% of enlistees who embarked\r\nvar myStatisticalObject = new statisticalObject(\"pow\",0.012,\" of your friends serving overseas will be taken prisoner during WW1\");\r\n\tdataArray.push(myStatisticalObject);\r\n\t\r\n\t\r\n\t//total deaths while prisoners 397 represents 10% of prisoners of war\r\nvar myStatisticalObject = new statisticalObject(\"powDeaths\",0.1,\" of your friends taken prisoner during WW1 will die \");\r\n\tdataArray.push(myStatisticalObject);\r\n\t\r\n\treturn dataArray;\r\n}", "function main(){\n rentals.forEach(function (entry){ // rentals\n var carId = entry.carId;\n\n cars.forEach(function(value){ // cars\n if (value.id == carId){\n var time = days_between(stringToDate(entry.pickupDate,\"yyyy-mm-dd\",\"-\"),stringToDate(entry.returnDate,\"yyyy-mm-dd\",\"-\"))+ 1;\n //console.log(\"The time is \" , time);\n\n // Exercise 2 - Drive more, pay less\n if (time>1 && time<4){\n value.pricePerDay *= 0.9;\n }\n if (time >4 && time<10){\n value.pricePerDay *= 0.7;\n }\n if (time >10){\n value.pricePerDay *= 0.5;\n }\n //console.log(\"The priceperday is \" , value.pricePerDay);\n\n var timeComponent= value.pricePerDay * time;\n var distanceComponement = entry.distance*value.pricePerKm;\n var rentalPrice = timeComponent + distanceComponement;\n //console.log(\"The distance component is \" , distanceComponement);\n console.log(\"_____\");\n console.log(\"The rental price is \", rentalPrice);\n\n // Exercise 3 - Give me all your money\n var commission = rentalPrice*0.70;\n var insuranceComission = commission*0.5;\n var assistanceComission = time; // 1$ / day\n var drivyComission = commission - assistanceComission - insuranceComission;\n\n // Exercise 4 - The famous deductible\n var reductionOption = 0;\n if (entry.options.deductibleReduction){\n console.log(\"Reduction option : yes\");\n var reductionOption = 4*time;\n //console.log(\"reduction option : \", reductionOption);\n }\n\n // Exercise 5 - Pay the actors\n\n actors.forEach(function(actor){ // actors\n if (actor.rentalId==entry.id){\n for (var i=0; i<5; i++){\n //driver\n if (actor.payment[i].who==\"driver\"){\n var debitDriver = reductionOption + rentalPrice;\n console.log(\"Debit for driver : \", debitDriver);\n actor.payment[i].amount=debitDriver;\n }\n \n //owner\n if (actor.payment[i].who==\"owner\"){\n var creditOwner = rentalPrice - commission;\n console.log(\"Credit for car owner : \", creditOwner);\n actor.payment[i].amount=creditOwner;\n }\n\n // insurance\n if (actor.payment[i].who==\"insurance\"){\n var creditInsurance = insuranceComission;\n console.log(\"Credit for car insurance : \", creditInsurance);\n actor.payment[i].amount=creditInsurance;\n }\n\n // // assistance\n if (actor.payment[i].who==\"assistance\"){\n var creditAssistance = assistanceComission;\n console.log(\"Credit for car assistance : \", creditAssistance);\n actor.payment[i].amount=creditAssistance;\n }\n\n // drivy \n if (actor.payment[i].who==\"assistance\"){\n var creditDrivy = drivyComission+reductionOption;\n console.log(\"Credit for drivy : \", creditDrivy);\n actor.payment[i].amount=creditDrivy;\n }\n }\n } \n })\n\n\n // Exercise 6 - Rental modification\n\n\n // console.log(\"Comission : \",commission);\n // console.log(\"Comission for the insurance : \",insuranceComission);\n // console.log(\"Comission for the assistance : \",assistanceComission );\n // console.log(\"Comission for the drivy : \", drivyComission);\n // console.log(\"The new rental price with option and less comission is \", rentalPrice+reductionOption);\n }\n })\n })\n}", "function getCommercials() {\n const options = {\n method: \"GET\",\n headers: {\n \"Content-Type\": \"application/json\",\n Authorization: \"bearer \" + localStorage.getItem(\"token\"),\n },\n };\n\n fetch(\"http://localhost:4000/admin/view-commercials\", options)\n .then((response) => {\n return response.json();\n })\n .then(\n (data) => {\n setCommercial(data);\n },\n (error) => {\n console.log(error);\n }\n );\n }", "* detailsPrint (request, response) {\n const categories = yield Category.all(),\n result = yield Result.get(request.param('id')),\n user = yield request.auth.getUser(),\n type = request.input('type'),\n date = moment().format('YYYY-mm-DD hh:mm:ss')\n\n result.sortCandidates((a, b) => {\n return result.getJudgesAverage(b.id) - result.getJudgesAverage(a.id)\n })\n\n if (type == 'winner') {\n result.sliceTop(1)\n }\n\n if (type == 'top-5') {\n result.sliceTop(5)\n }\n\n yield response.sendView('dashboard/score/details_print', {\n categories, result, user, date\n })\n }", "function getAllRentalsForActiveRental (rentalForCalculationOfGame, rentals, gracePeriodForGames, isWeekend, chargeMultiplierWithoutFood, serviceCharge, serviceTaxParameter, gameCgst, gameSgst) {\n var rentalsForActiveRental = [];\n var gameRentalTemp;\n rentalForCalculationOfGame.gameRevenue = 0;\n rentalForCalculationOfGame.noOfMilisecond = 0;\n rentalForCalculationOfGame.cgstOnGame = 0;\n rentalForCalculationOfGame.sgstOnGame = 0;\n rentalForCalculationOfGame.totalOnGame = 0;\n // rentalForCalculationOfGame.totalOnFood = 0;\n var currentRental = rentalForCalculationOfGame;\n var j = 0;\n/* var gracePeriodSystemParameter = (filterFilter($scope.systemparameters, {systemParameterName : 'Grace Period'})).pop();\nvar gracePeriod = Number(gracePeriodSystemParameter.value); */\n var gracePeriod = Number(gracePeriodForGames);\n\n/* var weekendSystemParameter = (filterFilter($scope.systemparameters, {systemParameterName : 'Weekend Holiday Today'})).pop();\n var weekend = weekendSystemParameter.value; */\n var weekend = isWeekend;\n\n while (currentRental) {\n gameRentalTemp = currentRental;\n gameRentalTemp.noOfMilisecond = (gameRentalTemp.activeRental === true ? (new Date()).getTime() : (new Date(currentRental.rentalEnd)).getTime()) - (new Date(currentRental.renewalRentalStart)).getTime();\n rentalsForActiveRental.push(gameRentalTemp);\n\n if (currentRental.renewalRental) {\n for (j = 0; j < rentals.length; j++) {\n if (rentals[j]._id === currentRental.renewalRental) {\n currentRental = rentals[j];\n break;\n }\n }\n } else currentRental = '';\n }\n\n var summarizedGameRentals = [];\n var summarizedGameRentalsForCategoryId = [];\n var tempGameRental;\n var tempIndexForGame;\n var tempGameRentalForCategory;\n\n for (var k = 0; k < rentalsForActiveRental.length; k++) {\n // console.log(rentalsForActiveRental[k]);\n if (summarizedGameRentalsForCategoryId.indexOf(rentalsForActiveRental[k].serial.product.category._id) < 0) {\n summarizedGameRentalsForCategoryId.push(rentalsForActiveRental[k].serial.product.category._id);\n // tempGameRental = {category: rentalsForActiveRental[k].serial.product.category};\n // $scope.test = {category : rentalsForActiveRental[k].serial.product.category , noOfMilisecond: rentalsForActiveRental[k].noOfMilisecond};\n // $scope.test = tempGameRental;\n summarizedGameRentals.push({ category: rentalsForActiveRental[k].serial.product.category, noOfMilisecond: rentalsForActiveRental[k].noOfMilisecond });\n // summarizedGameRentals.push( rentalsForActiveRental[k]);\n } else {\n tempIndexForGame = summarizedGameRentalsForCategoryId.indexOf(rentalsForActiveRental[k].serial.product.category._id);\n tempGameRentalForCategory = summarizedGameRentalsForCategoryId.splice(tempIndexForGame, 1).pop();\n tempGameRental = summarizedGameRentals.splice(tempIndexForGame, 1).pop();\n tempGameRental.noOfMilisecond = Number(tempGameRental.noOfMilisecond) + Number(rentalsForActiveRental[k].noOfMilisecond);\n summarizedGameRentalsForCategoryId.push(tempGameRental.category._id);\n summarizedGameRentals.push(tempGameRental);\n }\n }\n\n var hours = 0;\n var minutes = 0;\n\n // $scope.test = rentalsForActiveRental;\n for (var m = 0; m < summarizedGameRentals.length; m++) {\n hours = Math.floor((Number(summarizedGameRentals[m].noOfMilisecond) + 30000) / 3600000);\n minutes = Math.round((Number(summarizedGameRentals[m].noOfMilisecond) - hours * 3600000) / 60000);\n summarizedGameRentals[m].timePlayed = (hours < 10 ? '0' : '') + hours + ':' + (minutes < 10 ? '0' : '') + minutes;\n // summarizedGameRentals[m].hoursCharged = Math.ceil((Number(summarizedGameRentals[m].noOfMilisecond) - gracePeriod * 60000)/3600000);\n // $scope.test=summarizedGameRentals[m].isMember;\n summarizedGameRentals[m].hoursCharged = (rentalForCalculationOfGame.isMember === true ? 0 : Math.ceil((Number(summarizedGameRentals[m].noOfMilisecond) - gracePeriod * 60000) / 3600000));\n console.log(chargeMultiplierWithoutFood);\n summarizedGameRentals[m].ratePerHourCharged = parseFloat(Math.round(chargeMultiplierWithoutFood * (weekend === 'Y' ? summarizedGameRentals[m].category.ratePerHourWeekendHoliday : summarizedGameRentals[m].category.ratePerHourWeekday) * 100) / 100).toFixed(2);\n\n summarizedGameRentals[m].amountCharged = parseFloat(Math.round(summarizedGameRentals[m].hoursCharged * summarizedGameRentals[m].ratePerHourCharged * 100) / 100).toFixed(2);\n\n rentalForCalculationOfGame.gameRevenue = parseFloat(Math.round((Number(rentalForCalculationOfGame.gameRevenue) + Number(summarizedGameRentals[m].amountCharged)) * 100) / 100).toFixed(2);\n }\n // rentalForCalculationOfGame.games = [];\n rentalForCalculationOfGame.games = summarizedGameRentals;\n // console.log(gameCgst);\n rentalForCalculationOfGame.serviceChargeOnGame = parseFloat(Math.round(Number(rentalForCalculationOfGame.gameRevenue) * serviceCharge) / 100).toFixed(2);\n rentalForCalculationOfGame.cgstOnGame = parseFloat(Math.round((Number(rentalForCalculationOfGame.gameRevenue) + Number(rentalForCalculationOfGame.serviceChargeOnGame)) * gameCgst) / 100).toFixed(2);\n // console.log(rentalForCalculationOfGame.gameRevenue);\n rentalForCalculationOfGame.sgstOnGame = parseFloat(Math.round((Number(rentalForCalculationOfGame.gameRevenue) + Number(rentalForCalculationOfGame.serviceChargeOnGame)) * gameSgst) / 100).toFixed(2);\n\n rentalForCalculationOfGame.totalOnGame = parseFloat(Number(rentalForCalculationOfGame.gameRevenue) + Number(rentalForCalculationOfGame.serviceChargeOnGame) + Number(rentalForCalculationOfGame.cgstOnGame) + Number(rentalForCalculationOfGame.sgstOnGame)).toFixed(2);\n rentalForCalculationOfGame.subTotalAmountForCustomer = parseFloat(Math.round((Number(rentalForCalculationOfGame.totalOnGame) + Number(rentalForCalculationOfGame.totalOnFood)) * 100) / 100).toFixed(2);\n\n if (rentalForCalculationOfGame.deposit == null) {\n rentalForCalculationOfGame.deposit = 0;\n }\n\n rentalForCalculationOfGame.totalAmountForCustomer = parseFloat(Math.round((Number(rentalForCalculationOfGame.subTotalAmountForCustomer) - Number(rentalForCalculationOfGame.deposit)) * 100) / 100).toFixed(2);\n\n return rentalForCalculationOfGame;\n }", "function discountRentalPrice()\n{\n for(var j=0; j<rentals.length;j++)\n {\n var timeDay=get_date(rentals[j].id);\n var rentalDiscount;\n if(timeDay==1)\n {\n rentalDiscount=rentals[j].price;\n \n console.log(rentals[j].driver.firstName + '' + rentals[j].driver.lastName+''+'\\nThe Rental Price (no discount): '+ rentalDiscount+'euros');\n }\n else if(timeDay>1 && timeDay<=4)\n {\n rentalDiscount=rentals[j].price*0.90;\n\n console.log(rentals[j].driver.firstName + '' + rentals[j].driver.lastName+''+'\\nThe Rental Price Discount -10% is : '+ rentalDiscount+'euros');\n\n rentals[j].price=rentalDiscount;\n }\n else if(timeDay>4 && timeDay<=10)\n {\n rentalDiscount=rentals[j].price*0.70;\n\n console.log(rentals[j].driver.firstName + '' + rentals[j].driver.lastName+''+'\\nThe Rental Price Discount -30% is : '+ rentalDiscount+ 'euros');\n\n rentals[j].price=rentalDiscount;\n }\n else if(timeDay>10)\n {\n rentalDiscount=rentals[j].price*0.50;\n\n console.log(rentals[j].driver.firstName + '' + rentals[j].driver.lastName+''+'\\nThe Rental Price Discount -50% is : '+ rentalDiscount+'euros');\n }\n }\n}", "function getLeecherInfo(cities)\r\n{ \r\ntry\r\n{\t\r\n\tvar imgw = \"<img src='skin/resources/icon_wood.gif' height='10' width='15'>\"\t// wood image\r\n\tvar donationList = document.getElementById('resourceUsers').childNodes[3].getElementsByTagName(\"tbody\")[0];\r\n\t\t\r\n\tvar donate = 0, Vdonate = 0, Adonate = 0;\r\n\tlvl_ary = new Array();\r\n\twrk_ary = new Array();\r\n\tdnt_ary = new Array();\r\n\tvar totlvl = 0, totwrk = 0;\r\n\t\t\r\n\tfor (var j = 0; j < donationList.rows.length; j++)\r\n\t{\t\t\r\n\t\tlvl_ary[j] = getMultiValue(donationList.rows[j].cells[2].innerHTML);\r\n\t\twrk_ary[j] = getMultiValue(donationList.rows[j].cells[3].innerHTML);\r\n\t\tdnt_ary[j] = toInt(donationList.rows[j].cells[4].textContent);\r\n\t\t\t\r\n\t\t// all donated\r\n\t\tdonate += dnt_ary[j];\r\n\t\tif ((donationList.rows[j].cells[0].innerHTML.split('(i)').length) <= 1 )\r\n\t\t{\r\n\t\t\tif ((donationList.rows[j].cells[0].innerHTML.split('(v)').length) > 1 )\r\n\t\t\t{ \t\r\n\t\t\t\tif (islePar['allDon'] == true) Vdonate += getNegValue(toInt(document.getElementById('thiscaption'+ j ).textContent.split(\" = \")[1]));\r\n\t\t\t\telse Vdonate += getNegValue(toInt(getPart(document.getElementById('wooddnt'+ j ).textContent,'(',')')));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif (islePar['allDon'] == true) Adonate += getNegValue(toInt(document.getElementById('thiscaption'+ j ).textContent.split(\" = \")[1]));\r\n\t\t\t\telse Adonate += getNegValue(toInt(getPart(document.getElementById('wooddnt'+ j ).textContent,'(',')')));\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t// total warkers and level townHall\r\n\t\t\ttotlvl += lvl_ary[j];\r\n\t\t\ttotwrk += wrk_ary[j];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// Player inactive\r\n\t\t\tlvl_ary[j] = 0;\r\n\t\t\twrk_ary[j] = 0;\r\n\t\t\tdnt_ary[j] = 0;\r\n\t\t}\r\n\t} \r\n\t\t\r\n\tvar avglvl = parseInt(totlvl / cities);\t\t\t// avarage level of the townHall\t\r\n\tvar Reslvl = parseInt(document.getElementById('resUpgrade').childNodes[3].childNodes[3].innerHTML.split(\"</span>\")[1]);\t// Check deposite level\r\n\t\t\r\n\tif ( !isNaN(Reslvl) ) // Deposit not upgrade\r\n\t{\r\n\t\tvar txtwood;\t\r\n\t\tvar wood = document.getElementById('resUpgrade').childNodes[3].childNodes[11].innerHTML.split(\"</span>\")[1];\t// Check wood donated\r\n\t\tvar woodlvl = document.getElementById('resUpgrade').childNodes[3].childNodes[7].innerHTML.split(\"</span>\")[1];\t// Check wood for next level\r\n\t\tvar wooddiff = toInt(woodlvl) - toInt(wood);\t\t// necessary wood for next level\r\n\t\t\r\n\t\r\n\t\ttxtwood = lang.stat1 +\" <b>\" + (Reslvl+1) + \"</b> \"+ lang.stat2 +\" <b>\"+ replaceNum(wooddiff) +\"</b> \"+ imgw + \" \";\r\n\t\t\t\r\n\t\tif ((wooddiff + Adonate) <= 0)\t\t\t\t\t\t// only donated wood of active player \r\n\t\t{\r\n\t\t\ttxtwood += lang.stat31;\r\n\t\t}\r\n\t\telse if ((wooddiff + Adonate + Vdonate) <= 0)\t\t// donated wood of the player active and vacation \r\n\t\t{\r\n\t\t\ttxtwood += lang.stat32;\r\n\t\t}\r\n\t\telse \t\t\t\t\t\t\t\t\t\t\t\t// calculate new score for next level\r\n\t\t{\r\n\t\t\tif (islePar[page]['wrk'] <= 0 || islePar[page]['lvl'] <= 0) {return;}\t// if yuor share is all 0 value\r\n\t\t\t\t\r\n\t\t\tvar nwscorewrk = islePar[page]['wrk'];\r\n\t\t\tvar nwscorelvl = islePar[page]['lvl']\r\n\t\t\tif (islePar[page]['wrk'] > 0) {var K = islePar[page]['lvl'] / islePar[page]['wrk'];}// factor lvl/wrk score\t\r\n\t\t\t\t\r\n\t\t\tdo\t\t// Search new value for deposit Upgrading\r\n\t\t\t{\r\n\t\t\t\tvar nwdonate = 0;\r\n\t\t\t\tif (islePar[page]['wrk'] > 0) \r\n\t\t\t\t{\r\n\t\t\t\t\tnwscorewrk += 5;\r\n\t\t\t\t\tnwscorelvl = Math.round(nwscorewrk * K);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tnwscorelvl += 5;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//if (scorelvl > 0) {nwscorelvl += 5;}\r\n\t\t\t\t\r\n\t\t\t\tfor ( j = 0; j < donationList.rows.length; j++)\r\n\t\t\t\t{\t\t\t\t\r\n\t\t\t\t\tnwdonate += getNegValue(dnt_ary[j] - (lvl_ary[j] * nwscorelvl) - (wrk_ary[j] * nwscorewrk));\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\tif ( (nwscorewrk - islePar[page]['wrk']) >= 1000 || (nwscorelvl - islePar[page]['lvl']) >= 1000) break;\t// exit loop\r\n\t\t\t\t\r\n\t\t\t} while ((wooddiff + nwdonate) > 0 ); \r\n\t\t\t\r\n\t\t\ttxtwood += lang.stat33 +\"<br />\"+\r\n\t\t\t\t\t\t\"<b>\" + replaceNum(nwscorewrk) + \"</b> \" + imgw + lang.stat33wrk +\r\n\t\t\t\t\t\t\"<b>\" + replaceNum(nwscorelvl) + \"</b> \" + imgw + lang.stat33lvl;\r\n\t\t}\r\n\t}\r\n\telse\t// deposit is upgrading\r\n\t{\r\n\t\tReslvl = parseInt(document.getElementById('resUpgrade').childNodes[3].childNodes[5].innerHTML.split(\"</span>\")[1]);\r\n\t\ttxtwood = lang.statupgrd1 +\" <b>\" + (Reslvl+1) + \"</b> \"+ lang.statupgrd2;\r\n\t}\r\n\t\t\r\n\r\n\t\t\r\n\tvar info = \"<center>\"+ lang.statinfo1 +\" <b>\" + cities + \"</b> \"+ lang.statinfo2 +\" <b>\" + avglvl +\r\n\t\t\"</b>. \"+ lang.statinfo3 +\" <b>\"+ replaceNum(donate) +\"</b> \" + imgw + lang.statinfo4 +\" <b>\" + \r\n\t\treplaceNum(totwrk) + \"</b> \"+ lang.statinfo5 + txtwood + \"</center>\";\r\n\t\t\r\n\t\t\r\n\treturn info;\r\n}\r\ncatch(er) \t\t\t\t\r\n\t{infoError(\"function getLeecherInfo \",er)}\r\n}", "function viewBudget() {\n connection.query(\n \"SELECT d.name AS 'Department', SUM(r.salary) AS 'Budget' FROM employee e INNER JOIN role r ON r.id = e.role_id INNER JOIN department d ON d.id = r.department_id GROUP BY Department;\",\n function (err, res) {\n if (err) throw err;\n let tableResults = [];\n for (let i = 0; i < res.length; i++) {\n let empObj = [res[i].Department, res[i].Budget];\n tableResults.push(empObj);\n }\n console.clear();\n console.log(\n \" ------------------------------------ \\n ALL COMPANY DEPARTMENTS & BUDGET UTILIZED \\n ------------------------------------\"\n );\n console.table([\"Department\", \"Budget\"], tableResults);\n actions();\n }\n );\n}" ]
[ "0.62073314", "0.5788435", "0.55614734", "0.55528474", "0.54944396", "0.5448022", "0.53475666", "0.52442676", "0.52006704", "0.51176554", "0.51054585", "0.50813174", "0.5071811", "0.50456935", "0.5022276", "0.5005735", "0.4976097", "0.49623036", "0.49599645", "0.4947852", "0.49460855", "0.49433768", "0.49363866", "0.493243", "0.4923422", "0.49083766", "0.49076068", "0.48577854", "0.48511887", "0.48455256", "0.48412097", "0.48410067", "0.48406333", "0.48359278", "0.48357514", "0.48183575", "0.48144066", "0.48090616", "0.48047173", "0.47996345", "0.4793335", "0.47828233", "0.47768974", "0.47688586", "0.47650847", "0.4762345", "0.4761636", "0.47563246", "0.47562966", "0.47531232", "0.47529778", "0.4747891", "0.47435078", "0.47384697", "0.47311082", "0.4730289", "0.47066456", "0.47020918", "0.47014564", "0.46986783", "0.4693819", "0.46807036", "0.46782887", "0.4676285", "0.46762452", "0.46756682", "0.46727443", "0.46722573", "0.46693054", "0.4667029", "0.46668443", "0.46646065", "0.4654939", "0.46492627", "0.46458274", "0.46429384", "0.46375477", "0.46363762", "0.46356815", "0.4634765", "0.46342722", "0.4630289", "0.4625751", "0.46231246", "0.46218058", "0.46191788", "0.46190876", "0.46183243", "0.461764", "0.4614896", "0.4612774", "0.46105713", "0.46099514", "0.45977858", "0.4596461", "0.45904124", "0.4588348", "0.45852157", "0.45846903", "0.45829114", "0.45817244" ]
0.0
-1
OBJETOS PARA USAR PROXIMAMENTE
function Compra(productos, importe, metodoDePago,cantCuotas){ this.productos = productos; this.importe = importe; this.metodoDePago = metodoDePago; this.cantCuotas = cantCuotas; financiar = function(){ if (this.metodoDePago = 'C' && this.cantCuotas > 1){ importe = importe/cantCuotas } } recibo = function(){ return `Productos ${Array.from(productos.nombre)}\n Importe final = ${importe} en ${cantCuotas}` } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SetItems() {\n //configuracion del tootip de ayuda\n //tooltip de navegacion superior\n $('.navigationTop a').cluetip({ splitTitle: '|', width: 250, delayedClose: 1200, cursor: 'pointer', sticky: false });\n //tooltip para el link del mapa\n $('.SiteMapa span a').cluetip({ splitTitle: '|', width: 250, delayedClose: 1200, cursor: 'pointer', sticky: false });\n \n $('.tooltip').cluetip({ splitTitle: '|',delayedClose: 1200, width: 150, cursor: 'pointer', sticky: false });\n //tooltip de los buttonfields\n $('input[type=image]').cluetip({ splitTitle: '|', attribute: 'alt', titleAttribute: 'alt', delayedClose: 1200, width: 150, cursor: 'pointer', sticky: false });\n \n //menu popup\n $('#toplistmenu01').popupmenu({ target: \"#PanelNew\", time: 300 });\n $('.note').truncate({ max_length: 40, showLinks: false });\n \n }", "function accionConsultarProducto(){\n listado1.actualizaDat();\n var numSelec = listado1.numSelecc();\n if ( numSelec < 1 ) {\n GestionarMensaje(\"PRE0025\", null, null, null); // Debe seleccionar un producto.\n } else {\n var codSeleccionados = listado1.codSeleccionados();\n var arrayDatos = obtieneLineasSeleccionadas(codSeleccionados, 'listado1'); \n var cadenaLista = serializaLineasDatos(arrayDatos);\n var obj = new Object();\n obj.hidCodSeleccionadosLE = \"[\" + codSeleccionados + \"]\";\n obj.hidListaEditable = cadenaLista;\n //set('frmContenido.conectorAction', 'LPModificarGrupo');\n mostrarModalSICC('LPModificarOferta','Consultar producto',obj,795,495);\n }\n}", "function initMenu()\n{\n\tcore_ativaPainelAjuda(\"ajuda\",\"botaoAjuda\");\n\tnew YAHOO.widget.Button(\"botao2\",{ onclick: { fn: function(){window.open('../../testainstal.php');}} });\n\t$parametros = {\n\t\"simples\": [\n\t\t{\n\t\t\tmensagem: \"ows_abstract\",\n\t\t\tcabeca: $trad(\"resumo\",i3GEOadmin.ogcws.dicionario),\n\t\t\tvariavel: \"ows_abstract\"\n\t\t},\n\t\t{\n\t\t\tmensagem: \"ows_keywordlist\",\n\t\t\tcabeca: $trad(\"palavraChave\",i3GEOadmin.ogcws.dicionario),\n\t\t\tvariavel: \"ows_keywordlist\"\n\t\t},\n\t\t{\n\t\t\tmensagem: \"ows_fees\",\n\t\t\tcabeca: $trad(\"taxas\",i3GEOadmin.ogcws.dicionario),\n\t\t\tvariavel: \"ows_fees\"\n\t\t},\n\t\t{\n\t\t\tmensagem: \"ows_accessconstraints\",\n\t\t\tcabeca: $trad(\"restricao\",i3GEOadmin.ogcws.dicionario),\n\t\t\tvariavel: \"ows_accessconstraints\"\n\t\t},\n\t\t{\n\t\t\tmensagem: \"ows_contactperson\",\n\t\t\tcabeca: $trad(\"pessoaContato\",i3GEOadmin.ogcws.dicionario),\n\t\t\tvariavel: \"ows_contactperson\"\n\t\t},\n\t\t{\n\t\t\tmensagem: \"ows_contactorganization\",\n\t\t\tcabeca: $trad(\"organizacao\",i3GEOadmin.ogcws.dicionario),\n\t\t\tvariavel: \"ows_contactorganization\"\n\t\t},\n\t\t{\n\t\t\tmensagem: \"ows_contactposition\",\n\t\t\tcabeca: $trad(\"cargo\",i3GEOadmin.ogcws.dicionario),\n\t\t\tvariavel: \"ows_contactposition\"\n\t\t},\n\t\t{\n\t\t\tmensagem: \"ows_addresstype\",\n\t\t\tcabeca: $trad(\"tipoEndereco\",i3GEOadmin.ogcws.dicionario),\n\t\t\tvariavel: \"ows_addresstype\"\n\t\t},\n\t\t{\n\t\t\tmensagem: \"ows_address\",\n\t\t\tcabeca: $trad(\"endereco\",i3GEOadmin.ogcws.dicionario),\n\t\t\tvariavel: \"ows_address\"\n\t\t},\n\t\t{\n\t\t\tmensagem: \"ows_city\",\n\t\t\tcabeca: $trad(\"cidade\",i3GEOadmin.ogcws.dicionario),\n\t\t\tvariavel: \"ows_city\"\n\t\t},\n\t\t{\n\t\t\tmensagem: \"ows_stateorprovince\",\n\t\t\tcabeca: $trad(\"estado\",i3GEOadmin.ogcws.dicionario),\n\t\t\tvariavel: \"ows_stateorprovince\"\n\t\t},\n\t\t{\n\t\t\tmensagem: \"ows_postcode\",\n\t\t\tcabeca: $trad(\"cep\",i3GEOadmin.ogcws.dicionario),\n\t\t\tvariavel: \"ows_postcode\"\n\t\t},\n\t\t{\n\t\t\tmensagem: \"ows_country\",\n\t\t\tcabeca: $trad(\"pais\",i3GEOadmin.ogcws.dicionario),\n\t\t\tvariavel: \"ows_country\"\n\t\t},\n\t\t{\n\t\t\tmensagem: \"ows_contactelectronicmailaddress\",\n\t\t\tcabeca: $trad(\"email\",i3GEOadmin.ogcws.dicionario),\n\t\t\tvariavel: \"ows_contactelectronicmailaddress\"\n\t\t},\n\t\t{\n\t\t\tmensagem: \"ows_name\",\n\t\t\tcabeca: $trad(\"nomeServico\",i3GEOadmin.ogcws.dicionario),\n\t\t\tvariavel: \"ows_name\"\n\t\t}\n\t]};\n\tcore_carregando(\"ativa\");\n\tcore_pegaDados($trad(\"buscaParametro\",i3GEOadmin.ogcws.dicionario),\"../php/ogcws.php?funcao=pegaParametrosConfigura\",\"pegaParametros\");\n}", "function menu_paquet(){\n\t\taction=prompt(\"F fin de tour | P piocher une carte\");\n\t\taction=action.toUpperCase();\n\t\tif (action != null){\n\t\t\tswitch(action){\n\t\t\t\tcase \"F\":\n\t\t\t\t\tif (att_me.length>0){\n\t\t\t\t\t\t//MAJ des cartes en INV_ATT1,2\n\t\t\t\t\t\tmajCartesEnAttaque();\n\t\t\t\t\t}\n\t\t\t\t\tif (pv_adv==0 || pv_me==0){\n\t\t\t\t\t\tif (pv_adv==0){\n\t\t\t\t\t\t\talert(\"Vous avez gagné !!!\");\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\talert(\"Vous avez perdu !!!\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t/////////////////////////////////Gérer la fin de partie ICI\n\t\t\t\t\t} else {\n\t\t\t\t\t\tIA_jouer(IA_stategie_basic);\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase \"P\":\n\t\t\t\t\tjeu_piocherDsPaquet(true);\t\t\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "efficacitePompes(){\n\n }", "function ouvrir() {\n creationModal();\n }", "procesarControles(){\n\n }", "function Go_Funciones()\n {\n if( g_listar == 1 )\n {\n Get_Marca_Producto();\n }\n \n }", "function ciniki_musicfestivals_main() {\n //\n // The panel to list the festival\n //\n this.menu = new M.panel('Music Festivals', 'ciniki_musicfestivals_main', 'menu', 'mc', 'medium', 'sectioned', 'ciniki.musicfestivals.main.menu');\n this.menu.data = {};\n this.menu.nplist = [];\n this.menu.sections = {\n// 'search':{'label':'', 'type':'livesearchgrid', 'livesearchcols':1,\n// 'cellClasses':[''],\n// 'hint':'Search festival',\n// 'noData':'No festival found',\n// },\n '_tabs':{'label':'', 'type':'paneltabs', 'selected':'festivals',\n 'visible':function() {return M.modFlagSet('ciniki.musicfestivals', 0x40); },\n 'tabs':{\n 'festivals':{'label':'Festivals', 'fn':'M.ciniki_musicfestivals_main.menu.switchTab(\"festivals\");'},\n 'trophies':{'label':'Trophies', 'fn':'M.ciniki_musicfestivals_main.menu.switchTab(\"trophies\");'},\n }},\n 'festivals':{'label':'Festival', 'type':'simplegrid', 'num_cols':2,\n 'visible':function() { return M.ciniki_musicfestivals_main.menu.sections._tabs.selected == 'festivals' ? 'yes' : 'no';},\n 'noData':'No Festivals',\n 'addTxt':'Add Festival',\n 'addFn':'M.ciniki_musicfestivals_main.edit.open(\\'M.ciniki_musicfestivals_main.menu.open();\\',0,null);'\n },\n 'trophies':{'label':'Trophies', 'type':'simplegrid', 'num_cols':2,\n 'visible':function() { return M.ciniki_musicfestivals_main.menu.sections._tabs.selected == 'trophies' ? 'yes' : 'no';},\n 'noData':'No Trophies',\n// 'headerValues':['Category', 'Name'],\n 'addTxt':'Add Trophy',\n 'addFn':'M.ciniki_musicfestivals_main.trophy.open(\\'M.ciniki_musicfestivals_main.menu.open();\\',0,null);'\n },\n }\n this.menu.liveSearchCb = function(s, i, v) {\n if( s == 'search' && v != '' ) {\n M.api.getJSONBgCb('ciniki.musicfestivals.festivalSearch', {'tnid':M.curTenantID, 'start_needle':v, 'limit':'25'}, function(rsp) {\n M.ciniki_musicfestivals_main.menu.liveSearchShow('search',null,M.gE(M.ciniki_musicfestivals_main.menu.panelUID + '_' + s), rsp.festivals);\n });\n }\n }\n this.menu.liveSearchResultValue = function(s, f, i, j, d) {\n return d.name;\n }\n this.menu.liveSearchResultRowFn = function(s, f, i, j, d) {\n return 'M.ciniki_musicfestivals_main.festival.open(\\'M.ciniki_musicfestivals_main.menu.open();\\',\\'' + d.id + '\\');';\n }\n this.menu.switchTab = function(tab) {\n if( tab != null ) { this.sections._tabs.selected = tab; }\n this.open();\n }\n this.menu.cellValue = function(s, i, j, d) {\n if( s == 'festivals' ) {\n switch(j) {\n case 0: return d.name;\n case 1: return d.status_text;\n }\n }\n if( s == 'trophies' ) {\n switch(j) {\n case 0: return d.category;\n case 1: return d.name;\n }\n }\n }\n this.menu.rowFn = function(s, i, d) {\n if( s == 'festivals' ) {\n return 'M.ciniki_musicfestivals_main.festival.open(\\'M.ciniki_musicfestivals_main.menu.open();\\',\\'' + d.id + '\\',M.ciniki_musicfestivals_main.festival.nplist);';\n }\n if( s == 'trophies' ) {\n return 'M.ciniki_musicfestivals_main.trophy.open(\\'M.ciniki_musicfestivals_main.menu.open();\\',\\'' + d.id + '\\',M.ciniki_musicfestivals_main.menu.nplist);';\n }\n }\n this.menu.open = function(cb) {\n if( this.sections._tabs.selected == 'trophies' ) {\n M.api.getJSONCb('ciniki.musicfestivals.trophyList', {'tnid':M.curTenantID}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_musicfestivals_main.menu;\n p.data = rsp;\n p.nplist = (rsp.nplist != null ? rsp.nplist : null);\n p.refresh();\n p.show(cb);\n });\n } else {\n M.api.getJSONCb('ciniki.musicfestivals.festivalList', {'tnid':M.curTenantID}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_musicfestivals_main.menu;\n p.data = rsp;\n p.nplist = (rsp.nplist != null ? rsp.nplist : null);\n p.refresh();\n p.show(cb);\n });\n }\n }\n this.menu.addClose('Back');\n\n //\n // The panel to display Festival\n //\n this.festival = new M.panel('Festival', 'ciniki_musicfestivals_main', 'festival', 'mc', 'large narrowaside', 'sectioned', 'ciniki.musicfestivals.main.festival');\n this.festival.data = null;\n this.festival.festival_id = 0;\n this.festival.section_id = 0;\n this.festival.schedulesection_id = 0;\n this.festival.scheduledivision_id = 0;\n this.festival.invoice_typestatus = '';\n this.festival.list_id = 0;\n this.festival.listsection_id = 0;\n this.festival.nplists = {};\n this.festival.nplist = [];\n this.festival.messages_status = 10;\n this.festival.city_prov = 'All';\n this.festival.province = 'All';\n this.festival.registration_tag = '';\n this.festival.sections = {\n '_tabs':{'label':'', 'type':'menutabs', 'selected':'sections', 'tabs':{\n 'sections':{'label':'Syllabus', 'fn':'M.ciniki_musicfestivals_main.festival.switchTab(\\'sections\\');'},\n 'registrations':{'label':'Registrations', 'fn':'M.ciniki_musicfestivals_main.festival.switchTab(\\'registrations\\');'},\n 'schedule':{'label':'Schedule', 'fn':'M.ciniki_musicfestivals_main.festival.switchTab(\\'schedule\\');'},\n 'videos':{'label':'Videos', 'fn':'M.ciniki_musicfestivals_main.festival.switchTab(\\'videos\\');',\n 'visible':function() { return (M.ciniki_musicfestivals_main.festival.data.flags&0x02) == 0x02 ? 'yes' : 'no'},\n },\n 'comments':{'label':'Comments', 'fn':'M.ciniki_musicfestivals_main.festival.switchTab(\\'comments\\');',\n 'visible':function() { return (M.ciniki_musicfestivals_main.festival.data.flags&0x02) == 0x02 ? 'yes' : 'no'},\n },\n 'competitors':{'label':'Competitors', 'fn':'M.ciniki_musicfestivals_main.festival.switchTab(\\'competitors\\');'},\n// 'adjudicators':{'label':'Adjudicators', 'fn':'M.ciniki_musicfestivals_main.festival.switchTab(\\'adjudicators\\');'},\n// 'files':{'label':'Files', 'fn':'M.ciniki_musicfestivals_main.festival.switchTab(\\'files\\');'},\n 'photos':{'label':'Photos', \n 'visible':function() { return M.modFlagSet('ciniki.musicfestivals', 0x04); },\n 'fn':'M.ciniki_musicfestivals_main.festival.switchTab(\\'photos\\');',\n },\n// 'sponsors':{'label':'Sponsors', 'fn':'M.ciniki_musicfestivals_main.festival.switchTab(\\'sponsors\\');',\n// 'visible':function() { return M.modFlagSet('ciniki.musicfestivals', 0x10); },\n// },\n 'messages':{'label':'Messages', 'fn':'M.ciniki_musicfestivals_main.festival.switchTab(\\'messages\\');',\n 'visible':function() { return M.modFlagSet('ciniki.musicfestivals', 0x0400); },\n },\n// 'sponsors-old':{'label':'Sponsors', \n// 'visible':function() { \n// return (M.curTenant.modules['ciniki.sponsors'] != null && (M.curTenant.modules['ciniki.sponsors'].flags&0x02) == 0x02) ? 'yes':'no'; \n// },\n// 'fn':'M.ciniki_musicfestivals_main.festival.switchTab(\\'sponsors-old\\');',\n// },\n 'more':{'label':'More...', 'fn':'M.ciniki_musicfestivals_main.festival.switchTab(\\'more\\');'},\n }},\n '_moretabs':{'label':'', 'type':'menutabs', 'selected':'adjudicators', \n 'visible':function() { return M.ciniki_musicfestivals_main.festival.sections._tabs.selected == 'more' ? 'yes' : 'no'; },\n 'tabs':{\n 'invoices':{'label':'Invoices', 'fn':'M.ciniki_musicfestivals_main.festival.switchMTab(\\'invoices\\');'},\n 'adjudicators':{'label':'Adjudicators', 'fn':'M.ciniki_musicfestivals_main.festival.switchMTab(\\'adjudicators\\');'},\n 'certificates':{'label':'Certificates', 'fn':'M.ciniki_musicfestivals_main.festival.switchMTab(\\'certificates\\');'},\n 'lists':{'label':'Lists', 'fn':'M.ciniki_musicfestivals_main.festival.switchMTab(\\'lists\\');',\n 'visible':function() { return M.modFlagSet('ciniki.musicfestivals', 0x20); },\n },\n 'emails':{'label':'Emails', 'fn':'M.ciniki_musicfestivals_main.festival.switchMTab(\\'emails\\');',\n 'visible':function() { return M.modFlagSet('ciniki.musicfestivals', 0x0200); },\n },\n 'files':{'label':'Files', 'fn':'M.ciniki_musicfestivals_main.festival.switchMTab(\\'files\\');'},\n 'sponsors':{'label':'Sponsors', 'fn':'M.ciniki_musicfestivals_main.festival.switchMTab(\\'sponsors\\');',\n 'visible':function() { return M.modFlagSet('ciniki.musicfestivals', 0x10); },\n },\n/* 'sponsors-old':{'label':'Sponsors', \n 'visible':function() { \n return (M.curTenant.modules['ciniki.sponsors'] != null && (M.curTenant.modules['ciniki.sponsors'].flags&0x02) == 0x02) ? 'yes':'no'; \n },\n 'fn':'M.ciniki_musicfestivals_main.festival.switchMTab(\\'sponsors-old\\');',\n }, */\n }},\n 'details':{'label':'Details', 'aside':'yes', \n 'visible':function() { return M.ciniki_musicfestivals_main.festival.sections._tabs.selected == 'sections' ? 'yes' : 'no';},\n 'list':{\n 'name':{'label':'Name'},\n 'start_date':{'label':'Start'},\n 'end_date':{'label':'End'},\n 'num_registrations':{'label':'# Reg'},\n }},\n// '_more':{'label':'', 'aside':'yes', \n// 'list':{\n// 'adjudicators':{'label':'Adjudicators', 'fn':'M.ciniki_musicfestivals_main.festival.switchTab(\\'adjudicators\\');'},\n// }},\n 'download_buttons':{'label':'', 'aside':'yes',\n 'visible':function() { return M.ciniki_musicfestivals_main.festival.sections._tabs.selected == 'sections' && M.ciniki_musicfestivals_main.festival.sections._stabs.selected == 'sections' ? 'yes' : 'no'; },\n 'buttons':{\n 'download':{'label':'Download Syllabus (PDF)', \n 'fn':'M.ciniki_musicfestivals_main.festival.syllabusDownload();',\n },\n }},\n 'syllabus_search':{'label':'', 'type':'livesearchgrid', 'livesearchcols':5,\n 'visible':function() { return M.ciniki_musicfestivals_main.festival.sections._tabs.selected == 'sections' ? 'yes' : 'no'; },\n 'hint':'Search class names',\n 'noData':'No classes found',\n 'headerValues':['Section', 'Category', 'Class', 'Fee', 'Registrations'],\n },\n '_stabs':{'label':'', 'type':'paneltabs', 'selected':'sections', \n 'visible':function() { return M.ciniki_musicfestivals_main.festival.sections._tabs.selected == 'sections' ? 'yes' : 'no'; },\n 'tabs':{\n 'sections':{'label':'Sections', 'fn':'M.ciniki_musicfestivals_main.festival.switchTab(null,\\'sections\\');'},\n 'categories':{'label':'Categories', 'fn':'M.ciniki_musicfestivals_main.festival.switchTab(null,\\'categories\\');'},\n 'classes':{'label':'Classes', 'fn':'M.ciniki_musicfestivals_main.festival.switchTab(null,\\'classes\\');'},\n }},\n 'sections':{'label':'', 'type':'simplegrid', 'num_cols':2,\n 'visible':function() { return M.ciniki_musicfestivals_main.festival.sections._tabs.selected == 'sections' && M.ciniki_musicfestivals_main.festival.sections._stabs.selected == 'sections' ? 'yes' : 'no'; },\n 'sortable':'yes',\n 'sortTypes':['text', 'number'],\n 'headerValues':['Section', 'Registrations'],\n 'addTxt':'Add Section',\n 'addFn':'M.ciniki_musicfestivals_main.section.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',0,M.ciniki_musicfestivals_main.festival.festival_id,null);',\n 'mailFn':function(s, i, d) {\n if( d != null ) {\n return 'M.ciniki_musicfestivals_main.message.addnew(\\'M.ciniki_musicfestivals_main.festival.open();\\',M.ciniki_musicfestivals_main.festival.festival_id,\\'ciniki.musicfestivals.section\\',\\'' + d.id + '\\');';\n } \n return '';\n },\n 'editFn':function(s,i,d) {\n if( d != null ) {\n return 'M.ciniki_musicfestivals_main.section.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',\\'' + d.id + '\\',M.ciniki_musicfestivals_main.festival.festival_id, M.ciniki_musicfestivals_main.festival.nplists.sections);';\n }\n return '';\n },\n },\n 'si_buttons':{'label':'', \n 'visible':function() { return M.ciniki_musicfestivals_main.festival.sections._tabs.selected == 'sections' && M.ciniki_musicfestivals_main.festival.sections._stabs.selected == 'sections' && M.ciniki_musicfestivals_main.festival.data.sections.length == 0 ? 'yes' : 'no'; },\n 'buttons':{\n 'copy':{'label':'Copy Previous Syllabus, Lists & Settings', \n 'fn':'M.ciniki_musicfestivals_main.festival.festivalCopy(\"previous\");',\n },\n }},\n 'categories':{'label':'', 'type':'simplegrid', 'num_cols':3,\n 'visible':function() { return M.ciniki_musicfestivals_main.festival.sections._tabs.selected == 'sections' && M.ciniki_musicfestivals_main.festival.sections._stabs.selected == 'categories' ? 'yes' : 'no'; },\n 'sortable':'yes',\n 'sortTypes':['text', 'text', 'number'],\n 'headerValues':['Section', 'Category', 'Registrations'],\n 'addTxt':'Add Category',\n 'addFn':'M.ciniki_musicfestivals_main.category.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',0,0,M.ciniki_musicfestivals_main.festival.festival_id,null);',\n 'mailFn':function(s, i, d) {\n if( d != null ) {\n return 'M.ciniki_musicfestivals_main.message.addnew(\\'M.ciniki_musicfestivals_main.festival.open();\\',M.ciniki_musicfestivals_main.festival.festival_id,\\'ciniki.musicfestivals.category\\',\\'' + d.id + '\\');';\n } \n return '';\n },\n },\n 'classes':{'label':'', 'type':'simplegrid', 'num_cols':5,\n 'visible':function() { return M.ciniki_musicfestivals_main.festival.sections._tabs.selected == 'sections' && M.ciniki_musicfestivals_main.festival.sections._stabs.selected == 'classes' ? 'yes' : 'no'; },\n 'sortable':'yes',\n 'sortTypes':['text', 'text', 'text', 'number', 'number'],\n 'headerValues':['Section', 'Category', 'Class', 'Fee', 'Registrations'],\n 'addTxt':'Add Class',\n 'addFn':'M.ciniki_musicfestivals_main.class.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',0,0,M.ciniki_musicfestivals_main.festival.festival_id,null);',\n 'mailFn':function(s, i, d) {\n if( d != null ) {\n return 'M.ciniki_musicfestivals_main.message.addnew(\\'M.ciniki_musicfestivals_main.festival.open();\\',M.ciniki_musicfestivals_main.festival.festival_id,\\'ciniki.musicfestivals.class\\',\\'' + d.id + '\\');';\n } \n return '';\n },\n },\n 'registration_tabs':{'label':'', 'aside':'yes', 'type':'paneltabs', 'selected':'sections',\n 'visible':function() { return ['registrations','videos'].indexOf(M.ciniki_musicfestivals_main.festival.sections._tabs.selected) >= 0 ? 'yes' : 'no'; },\n 'tabs':{\n 'sections':{'label':'Sections', 'fn':'M.ciniki_musicfestivals_main.festival.switchRegTab(\"sections\");'},\n 'teachers':{'label':'Teachers', 'fn':'M.ciniki_musicfestivals_main.festival.switchRegTab(\"teachers\");'},\n 'tags':{'label':'Tags', \n 'visible':function() { return M.modFlagSet('ciniki.musicfestivals', 0x2000); },\n 'fn':'M.ciniki_musicfestivals_main.festival.switchRegTab(\"tags\");',\n },\n }}, \n 'ipv_tabs':{'label':'', 'aside':'yes', 'type':'paneltabs', 'selected':'all',\n 'visible':function() { return (['registrations','videos'].indexOf(M.ciniki_musicfestivals_main.festival.sections._tabs.selected) >= 0 && (M.ciniki_musicfestivals_main.festival.data.flags&0x02) == 0x02) ? 'yes' : 'no'; },\n 'tabs':{\n 'all':{'label':'All', 'fn':'M.ciniki_musicfestivals_main.festival.switchLVTab(\"all\");'},\n 'inperson':{'label':'Live', 'fn':'M.ciniki_musicfestivals_main.festival.switchLVTab(\"inperson\");'},\n 'virtual':{'label':'Virtual', 'fn':'M.ciniki_musicfestivals_main.festival.switchLVTab(\"virtual\");'},\n }}, \n 'registration_sections':{'label':'', 'aside':'yes', 'type':'simplegrid', 'num_cols':1,\n 'visible':function() { return ['registrations','videos'].indexOf(M.ciniki_musicfestivals_main.festival.sections._tabs.selected) >= 0 && M.ciniki_musicfestivals_main.festival.sections.registration_tabs.selected == 'sections' ? 'yes' : 'no'; },\n 'mailFn':function(s, i, d) {\n if( d != null ) {\n return 'M.ciniki_musicfestivals_main.message.addnew(\\'M.ciniki_musicfestivals_main.festival.open();\\',M.ciniki_musicfestivals_main.festival.festival_id,\\'ciniki.musicfestivals.section\\',\\'' + d.id + '\\');';\n } \n return '';\n },\n },\n 'registration_teachers':{'label':'', 'aside':'yes', 'type':'simplegrid', 'num_cols':1,\n 'visible':function() { return ['registrations','videos'].indexOf(M.ciniki_musicfestivals_main.festival.sections._tabs.selected) >= 0 && M.ciniki_musicfestivals_main.festival.sections.registration_tabs.selected == 'teachers' ? 'yes' : 'no'; },\n 'mailFn':function(s, i, d) {\n if( d != null ) {\n return 'M.ciniki_musicfestivals_main.message.addnew(\\'M.ciniki_musicfestivals_main.festival.open();\\',M.ciniki_musicfestivals_main.festival.festival_id,\\'ciniki.musicfestivals.students\\',\\'' + d.id + '\\');';\n } \n return '';\n },\n },\n 'registration_tags':{'label':'', 'aside':'yes', 'type':'simplegrid', 'num_cols':1,\n 'visible':function() { return ['registrations','videos'].indexOf(M.ciniki_musicfestivals_main.festival.sections._tabs.selected) >= 0 && M.ciniki_musicfestivals_main.festival.sections.registration_tabs.selected == 'tags' ? 'yes' : 'no'; },\n 'mailFn':function(s, i, d) {\n if( d != null ) {\n return 'M.ciniki_musicfestivals_main.message.addnew(\\'M.ciniki_musicfestivals_main.festival.open();\\',M.ciniki_musicfestivals_main.festival.festival_id,\\'ciniki.musicfestivals.registrationtag\\',\\'' + d.name + '\\');';\n } \n return '';\n },\n },\n 'registration_buttons':{'label':'', 'aside':'yes', \n 'visible':function() {return M.ciniki_musicfestivals_main.festival.sections._tabs.selected=='registrations'?'yes':'no';},\n 'buttons':{\n 'excel':{'label':'Export to Excel', \n 'fn':'M.ciniki_musicfestivals_main.festival.downloadExcel(M.ciniki_musicfestivals_main.festival.festival_id);',\n },\n 'pdf':{'label':'Registrations PDF ', \n 'visible':function() {return M.ciniki_musicfestivals_main.festival.sections.registration_tabs.selected=='sections'?'yes':'no';},\n 'fn':'M.ciniki_musicfestivals_main.festival.downloadPDF(M.ciniki_musicfestivals_main.festival.festival_id);',\n },\n }},\n 'registration_search':{'label':'', 'type':'livesearchgrid', 'livesearchcols':5,\n 'visible':function() {return M.ciniki_musicfestivals_main.festival.sections._tabs.selected=='registrations'?'yes':'no';},\n 'hint':'Search',\n 'noData':'No registrations found',\n 'headerValues':['Class', 'Registrant', 'Teacher', 'Fee', 'Status', 'Virtual'],\n 'cellClasses':['', 'multiline', '', '', '', 'alignright'],\n },\n 'registrations':{'label':'Registrations', 'type':'simplegrid', 'num_cols':6,\n 'visible':function() { return M.ciniki_musicfestivals_main.festival.sections._tabs.selected == 'registrations' ? 'yes' : 'no'; },\n 'headerValues':['Class', 'Registrant', 'Teacher', 'Fee', 'Status', 'Virtual'],\n 'sortable':'yes',\n 'sortTypes':['text', 'text', 'text', 'altnumber', 'altnumber', 'text'],\n 'cellClasses':['', 'multiline', '', '', '', 'alignright'],\n },\n 'registrations_emailbutton':{'label':'', \n 'visible':function() {return M.ciniki_musicfestivals_main.festival.sections._tabs.selected=='registrations' && M.ciniki_musicfestivals_main.festival.teacher_customer_id > 0 ?'yes':'no';},\n 'buttons':{\n 'email':{'label':'Email List to Teacher', 'fn':'M.ciniki_musicfestivals_main.festival.emailTeacherRegistrations();'},\n 'comments':{'label':'Download Comments PDF', 'fn':'M.ciniki_musicfestivals_main.festival.downloadTeacherComments();'},\n 'registrations':{'label':'Download Registrations PDF', 'fn':'M.ciniki_musicfestivals_main.festival.downloadTeacherRegistrations();'},\n }},\n 'schedule_sections':{'label':'Schedules', 'type':'simplegrid', 'num_cols':2, 'aside':'yes',\n// 'visible':function() { return M.ciniki_musicfestivals_main.festival.sections._tabs.selected == 'schedule' ? 'yes' : 'no'; },\n 'visible':function() { return ['schedule', 'comments', 'photos'].indexOf(M.ciniki_musicfestivals_main.festival.sections._tabs.selected) >= 0 ? 'yes' : 'no'; },\n 'cellClasses':['', 'multiline alignright'],\n 'addTxt':'Unscheduled',\n 'addFn':'M.ciniki_musicfestivals_main.festival.openScheduleSection(\\'unscheduled\\',\"Unscheduled\");',\n 'changeTxt':'Add Schedule',\n 'changeFn':'M.ciniki_musicfestivals_main.schedulesection.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',0,M.ciniki_musicfestivals_main.festival.festival_id,null);',\n 'mailFn':function(s, i, d) {\n if( M.ciniki_musicfestivals_main.festival.sections._tabs.selected == 'comments' ) {\n return null;\n }\n if( M.ciniki_musicfestivals_main.festival.sections._tabs.selected == 'photos' ) {\n return null;\n }\n if( d != null ) {\n return 'M.ciniki_musicfestivals_main.message.addnew(\\'M.ciniki_musicfestivals_main.festival.open();\\',M.ciniki_musicfestivals_main.festival.festival_id,\\'ciniki.musicfestivals.schedulesection\\',\\'' + d.id + '\\');';\n } \n return '';\n },\n 'editFn':function(s, i, d) {\n if( M.ciniki_musicfestivals_main.festival.sections._tabs.selected == 'comments' ) {\n return '';\n }\n if( M.ciniki_musicfestivals_main.festival.sections._tabs.selected == 'photos' ) {\n return '';\n }\n return 'M.ciniki_musicfestivals_main.schedulesection.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',\\'' + d.id + '\\',M.ciniki_musicfestivals_main.festival.festival_id,null);';\n },\n },\n 'schedule_divisions':{'label':'Divisions', 'type':'simplegrid', 'num_cols':1, 'aside':'yes',\n 'visible':function() { return ['schedule', 'comments', 'photos'].indexOf(M.ciniki_musicfestivals_main.festival.sections._tabs.selected) >= 0 && M.ciniki_musicfestivals_main.festival.schedulesection_id>0? 'yes' : 'no'; },\n 'cellClasses':['multiline', 'multiline alignright'],\n 'addTxt':'Add Division',\n 'addFn':'M.ciniki_musicfestivals_main.scheduledivision.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',0,M.ciniki_musicfestivals_main.festival.schedulesection_id,M.ciniki_musicfestivals_main.festival.festival_id,null);',\n 'mailFn':function(s, i, d) {\n if( M.ciniki_musicfestivals_main.festival.sections._tabs.selected == 'comments' ) {\n return null;\n }\n if( M.ciniki_musicfestivals_main.festival.sections._tabs.selected == 'photos' ) {\n return null;\n }\n if( d != null ) {\n return 'M.ciniki_musicfestivals_main.message.addnew(\\'M.ciniki_musicfestivals_main.festival.open();\\',M.ciniki_musicfestivals_main.festival.festival_id,\\'ciniki.musicfestivals.scheduledivision\\',\\'' + d.id + '\\');';\n } \n return '';\n },\n 'editFn':function(s, i, d) {\n if( M.ciniki_musicfestivals_main.festival.sections._tabs.selected == 'comments' ) {\n return '';\n }\n if( M.ciniki_musicfestivals_main.festival.sections._tabs.selected == 'photos' ) {\n return '';\n }\n return 'M.ciniki_musicfestivals_main.scheduledivision.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',\\'' + d.id + '\\',M.ciniki_musicfestivals_main.festival.schedulesection_id,M.ciniki_musicfestivals_main.festival.festival_id,null);';\n },\n },\n 'program_options':{'label':'Download Program', 'aside':'yes',\n// 'visible':function() { return M.ciniki_musicfestivals_main.festival.sections._tabs.selected == 'schedule' ? 'yes' : 'no'; },\n 'visible':function() { return (M.ciniki_musicfestivals_main.festival.sections._tabs.selected == 'schedule' && (M.ciniki_musicfestivals_main.festival.data.flags&0x02) == 0x02) ? 'yes' : 'no'; },\n 'fields':{\n 'ipv':{'label':'Type', 'type':'toggle', 'default':'all', \n 'visible':function() { return (M.ciniki_musicfestivals_main.festival.data.flags&0x02) == 0x02 ? 'yes' : 'no'; },\n 'toggles':{'all':'All', 'inperson':'In Person', 'virtual':'Virtual'},\n },\n }},\n 'program_buttons':{'label':'', 'aside':'yes',\n 'visible':function() { return M.ciniki_musicfestivals_main.festival.sections._tabs.selected == 'schedule' ? 'yes' : 'no'; },\n 'buttons':{\n 'pdf':{'label':'Download Program PDF', 'fn':'M.ciniki_musicfestivals_main.festival.downloadProgramPDF();'},\n }},\n 'schedule_download':{'label':'Schedule PDF', 'aside':'yes',\n 'visible':function() { return M.ciniki_musicfestivals_main.festival.sections._tabs.selected == 'schedule' && M.ciniki_musicfestivals_main.festival.schedulesection_id>0? 'yes' : 'no'; },\n 'fields':{\n 'names':{'label':'Full Names', 'type':'toggle', 'default':'public', 'toggles':{'public':'No', 'private':'Yes'}},\n 's_titles':{'label':'Titles', 'type':'toggle', 'default':'yes', 'toggles':{'no':'No', 'yes':'Yes'}},\n 's_ipv':{'label':'Type', 'type':'toggle', 'default':'all', \n 'visible':function() { return (M.ciniki_musicfestivals_main.festival.data.flags&0x02) == 0x02 ? 'yes' : 'no'; },\n 'toggles':{'all':'All', 'inperson':'In Person', 'virtual':'Virtual'},\n },\n 'footerdate':{'label':'Footer Date', 'type':'toggle', 'default':'yes', 'toggles':{'no':'No', 'yes':'Yes'}},\n }},\n 'schedule_buttons':{'label':'', 'aside':'yes',\n 'visible':function() { return M.ciniki_musicfestivals_main.festival.sections._tabs.selected == 'schedule' && M.ciniki_musicfestivals_main.festival.schedulesection_id>0? 'yes' : 'no'; },\n 'buttons':{\n 'pdf':{'label':'Download Schedule PDF', 'fn':'M.ciniki_musicfestivals_main.festival.downloadSchedulePDF();'},\n 'certs':{'label':'Certificates PDF', 'fn':'M.ciniki_musicfestivals_main.festival.downloadCertificatesPDF();'},\n 'comments':{'label':'Adjudicators Comments PDF', 'fn':'M.ciniki_musicfestivals_main.festival.downloadCommentsPDF();'},\n }},\n 'schedule_timeslots':{'label':'Time Slots', 'type':'simplegrid', 'num_cols':2, \n 'visible':function() { return M.ciniki_musicfestivals_main.festival.sections._tabs.selected == 'schedule' && M.ciniki_musicfestivals_main.festival.schedulesection_id>0 && M.ciniki_musicfestivals_main.festival.scheduledivision_id>0 ? 'yes' : 'no'; },\n 'cellClasses':['label multiline', 'multiline', 'fabuttons'],\n 'addTxt':'Add Time Slot',\n 'addFn':'M.ciniki_musicfestivals_main.scheduletimeslot.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',0,M.ciniki_musicfestivals_main.festival.scheduledivision_id,M.ciniki_musicfestivals_main.festival.festival_id,null);',\n },\n 'timeslot_photos':{'label':'Time Slots', 'type':'simplegrid', 'num_cols':3,\n 'visible':function() { return M.ciniki_musicfestivals_main.festival.sections._tabs.selected == 'photos' && M.ciniki_musicfestivals_main.festival.schedulesection_id>0 && M.ciniki_musicfestivals_main.festival.scheduledivision_id>0 ? 'yes' : 'no'; },\n 'cellClasses':['multiline', 'thumbnails', 'alignright fabuttons'],\n },\n 'timeslot_comments':{'label':'Time Slots', 'type':'simplegrid', 'num_cols':5, \n 'visible':function() { return M.ciniki_musicfestivals_main.festival.sections._tabs.selected == 'comments' && M.ciniki_musicfestivals_main.festival.schedulesection_id>0 && M.ciniki_musicfestivals_main.festival.scheduledivision_id>0 ? 'yes' : 'no'; },\n 'headerValues':['Time', 'Name', '', '', ''],\n 'headerClasses':['', '', 'aligncenter', 'aligncenter', 'aligncenter'],\n 'cellClasses':['', '', 'aligncenter', 'aligncenter', 'aligncenter'],\n },\n 'unscheduled_registrations':{'label':'Unscheduled', 'type':'simplegrid', 'num_cols':3,\n 'visible':function() { return M.ciniki_musicfestivals_main.festival.sections._tabs.selected == 'schedule' && M.ciniki_musicfestivals_main.festival.schedulesection_id == 'unscheduled' ? 'yes' : 'no'; },\n 'headerValues':['Class', 'Registrant', 'Status'],\n 'sortable':'yes',\n 'sortTypes':['text', 'text', 'text'],\n 'cellClasses':['', 'multiline', ''],\n },\n 'video_search':{'label':'', 'type':'livesearchgrid', 'livesearchcols':5,\n 'visible':function() {return M.ciniki_musicfestivals_main.festival.sections._tabs.selected=='videos'?'yes':'no';},\n 'hint':'Search',\n 'noData':'No registrations found',\n 'headerValues':['Class', 'Registrant', 'Video Link', 'PDF', 'Status'],\n 'cellClasses':['', '', '', '', ''],\n },\n 'videos':{'label':'Registrations', 'type':'simplegrid', 'num_cols':5,\n 'visible':function() { return M.ciniki_musicfestivals_main.festival.sections._tabs.selected == 'videos' ? 'yes' : 'no'; },\n 'headerValues':['Class', 'Registrant', 'Video Link', 'PDF', 'Status', ''],\n 'sortable':'yes',\n 'sortTypes':['text', 'text', 'text', 'text', 'altnumber', ''],\n 'cellClasses':['', 'multiline', '', '', '', 'alignright'],\n// 'addTxt':'Add Registration',\n// 'addFn':'M.ciniki_musicfestivals_main.registration.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',0,0,0,M.ciniki_musicfestivals_main.festival.festival_id,null);',\n },\n 'competitor_tabs':{'label':'', 'aside':'yes', 'type':'paneltabs', 'selected':'cities',\n 'visible':function() { return M.ciniki_musicfestivals_main.festival.sections._tabs.selected == 'competitors' ? 'yes' : 'no'; },\n 'tabs':{\n 'cities':{'label':'Cities', 'fn':'M.ciniki_musicfestivals_main.festival.switchCompTab(\"cities\");'},\n 'provinces':{'label':'Provinces', 'fn':'M.ciniki_musicfestivals_main.festival.switchCompTab(\"provinces\");'},\n }}, \n 'competitor_cities':{'label':'', 'type':'simplegrid', 'num_cols':1, 'aside':'yes',\n 'visible':function() { return M.ciniki_musicfestivals_main.festival.sections._tabs.selected == 'competitors' && M.ciniki_musicfestivals_main.festival.sections.competitor_tabs.selected == 'cities' ? 'yes' : 'no'; },\n 'editFn':function(s, i, d) {\n if( d.city != null && d.province != null ) {\n return 'M.ciniki_musicfestivals_main.editcityprov.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',\\'' + escape(d.city) + '\\',\\'' + escape(d.province) + '\\');';\n }\n return '';\n },\n },\n 'competitor_provinces':{'label':'', 'type':'simplegrid', 'num_cols':1, 'aside':'yes',\n 'visible':function() { return M.ciniki_musicfestivals_main.festival.sections._tabs.selected == 'competitors' && M.ciniki_musicfestivals_main.festival.sections.competitor_tabs.selected == 'provinces' ? 'yes' : 'no'; },\n 'editFn':function(s, i, d) {\n if( d.province != null ) {\n return 'M.ciniki_musicfestivals_main.editcityprov.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',null,\\'' + escape(d.province) + '\\');';\n }\n return '';\n },\n },\n 'competitors':{'label':'', 'type':'simplegrid', 'num_cols':3,\n 'visible':function() { return M.ciniki_musicfestivals_main.festival.sections._tabs.selected == 'competitors' ? 'yes' : 'no'; },\n 'headerValues':['Name', 'Classes', 'Waiver'],\n },\n 'lists':{'label':'Lists', 'type':'simplegrid', 'num_cols':1, 'aside':'yes',\n 'visible':function() { return M.ciniki_musicfestivals_main.festival.isSelected('more', 'lists'); },\n 'addTxt':'Add List',\n 'addFn':'M.ciniki_musicfestivals_main.list.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',0,M.ciniki_musicfestivals_main.festival.festival_id,null);',\n 'editFn':function(s, i, d) {\n return 'M.ciniki_musicfestivals_main.list.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',\\'' + d.id + '\\',M.ciniki_musicfestivals_main.festival.festival_id,null);';\n },\n },\n 'listsections':{'label':'Sections', 'type':'simplegrid', 'num_cols':1, 'aside':'yes',\n 'visible':function() { return (M.ciniki_musicfestivals_main.festival.isSelected('more', 'lists') == 'yes' && M.ciniki_musicfestivals_main.festival.list_id > 0) ? 'yes' : 'no'; },\n 'addTxt':'Add Section',\n 'addFn':'M.ciniki_musicfestivals_main.listsection.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',0,M.ciniki_musicfestivals_main.festival.list_id,null);',\n 'editFn':function(s, i, d) {\n return 'M.ciniki_musicfestivals_main.listsection.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',\\'' + d.id + '\\',M.ciniki_musicfestivals_main.festival.list_id,null);';\n },\n },\n 'listentries':{'label':'Sections', 'type':'simplegrid', 'num_cols':4, \n 'visible':function() { return (M.ciniki_musicfestivals_main.festival.isSelected('more', 'lists') == 'yes' && M.ciniki_musicfestivals_main.festival.listsection_id > 0) ? 'yes' : 'no'; },\n 'headerValues':['Award', 'Amount', 'Donor', 'Winner'],\n 'addTxt':'Add Entry',\n 'addFn':'M.ciniki_musicfestivals_main.listentry.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',0,M.ciniki_musicfestivals_main.festival.listsection_id,null);',\n 'seqDrop':function(e,from,to) {\n M.api.getJSONCb('ciniki.musicfestivals.festivalGet', {'tnid':M.curTenantID, \n 'action':'listentrysequenceupdate',\n 'festival_id':M.ciniki_musicfestivals_main.festival.festival_id,\n 'lists':'yes',\n 'list_id':M.ciniki_musicfestivals_main.festival.list_id,\n 'listsection_id':M.ciniki_musicfestivals_main.festival.listsection_id,\n 'entry_id':M.ciniki_musicfestivals_main.festival.data.listentries[from].id, \n 'sequence':M.ciniki_musicfestivals_main.festival.data.listentries[to].sequence, \n }, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_musicfestivals_main.festival;\n p.data.listentries = rsp.festival.listentries;\n p.refreshSection(\"listentries\");\n });\n },\n },\n 'invoice_statuses':{'label':'Status', 'type':'simplegrid', 'num_cols':1, 'aside':'yes',\n 'visible':function() { return M.ciniki_musicfestivals_main.festival.isSelected('more', 'invoices'); },\n },\n 'invoices':{'label':'Invoices', 'type':'simplegrid', 'num_cols':6,\n 'visible':function() { return M.ciniki_musicfestivals_main.festival.isSelected('more', 'invoices'); },\n 'headerValues':['#', 'Customer', 'Students', 'Total', 'Status'],\n 'noData':'No invoices',\n 'sortable':'yes',\n 'sortTypes':['number', 'text', 'text', 'number', 'text', ''],\n },\n 'adjudicators':{'label':'', 'type':'simplegrid', 'num_cols':1,\n 'visible':function() { return M.ciniki_musicfestivals_main.festival.isSelected('more', 'adjudicators'); },\n 'addTxt':'Add Adjudicator',\n 'addFn':'M.ciniki_musicfestivals_main.adjudicator.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',0,0,M.ciniki_musicfestivals_main.festival.festival_id,null);',\n },\n 'files':{'label':'', 'type':'simplegrid', 'num_cols':2,\n 'visible':function() { return M.ciniki_musicfestivals_main.festival.isSelected('more', 'files'); },\n 'addTxt':'Add File',\n 'addFn':'M.ciniki_musicfestivals_main.addfile.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',M.ciniki_musicfestivals_main.festival.festival_id);',\n },\n 'certificates':{'label':'', 'type':'simplegrid', 'num_cols':1,\n 'visible':function() { return M.ciniki_musicfestivals_main.festival.isSelected('more', 'certificates'); },\n 'headerValues':['Name', 'Section', 'Min Score'],\n 'addTxt':'Add Certificate',\n 'addFn':'M.ciniki_musicfestivals_main.certificate.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',0,M.ciniki_musicfestivals_main.festival.festival_id);',\n },\n 'lists':{'label':'Lists', 'type':'simplegrid', 'num_cols':1, 'aside':'yes',\n 'visible':function() { return M.ciniki_musicfestivals_main.festival.isSelected('more', 'lists'); },\n 'addTxt':'Add List',\n 'addFn':'M.ciniki_musicfestivals_main.list.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',0,M.ciniki_musicfestivals_main.festival.festival_id,null);',\n 'editFn':function(s, i, d) {\n return 'M.ciniki_musicfestivals_main.list.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',\\'' + d.id + '\\',M.ciniki_musicfestivals_main.festival.festival_id,null);';\n },\n },\n 'message_statuses':{'label':'', 'type':'simplegrid', 'aside':'yes', 'num_cols':1,\n 'visible':function() { return M.ciniki_musicfestivals_main.festival.isSelected('messages', ''); },\n },\n 'message_buttons':{'label':'', 'aside':'yes', \n 'visible':function() { return M.ciniki_musicfestivals_main.festival.isSelected('messages', ''); },\n 'buttons':{\n 'add':{'label':'Add Message', 'fn':'M.ciniki_musicfestivals_main.message.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',0,M.ciniki_musicfestivals_main.festival.festival_id);'},\n }},\n 'messages':{'label':'', 'type':'simplegrid', 'num_cols':2,\n 'visible':function() { return M.ciniki_musicfestivals_main.festival.isSelected('messages', ''); },\n 'headerValues':['Subject', 'Date'],\n 'noData':'No Messages',\n },\n 'emails_tabs':{'label':'', 'aside':'yes', 'type':'paneltabs', 'selected':'all',\n 'visible':function() { return M.ciniki_musicfestivals_main.festival.isSelected('more', 'emails'); },\n 'tabs':{\n 'all':{'label':'All', 'fn':'M.ciniki_musicfestivals_main.festival.switchEmailsTab(\"all\");'},\n 'teachers':{'label':'Teachers', 'fn':'M.ciniki_musicfestivals_main.festival.switchEmailsTab(\"teachers\");'},\n 'competitors':{'label':'Competitors', 'fn':'M.ciniki_musicfestivals_main.festival.switchEmailsTab(\"competitors\");'},\n }}, \n 'emails_sections':{'label':'Sections', 'aside':'yes', 'type':'simplegrid', 'num_cols':1,\n 'visible':function() { return M.ciniki_musicfestivals_main.festival.isSelected('more', 'emails'); },\n },\n 'emails_html':{'label':'Emails', 'type':'html', \n 'visible':function() { return M.ciniki_musicfestivals_main.festival.isSelected('more', 'emails'); },\n },\n 'sponsors':{'label':'', 'type':'simplegrid', 'num_cols':2,\n 'visible':function() { return M.ciniki_musicfestivals_main.festival.isSelected('more', 'sponsors'); },\n 'headerValues':['Name', 'Level'],\n 'addTxt':'Add Sponsor',\n 'addFn':'M.ciniki_musicfestivals_main.sponsor.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',0,M.ciniki_musicfestivals_main.festival.festival_id);',\n },\n 'sponsors-old':{'label':'', 'type':'simplegrid', 'num_cols':1,\n 'visible':function() { return M.ciniki_musicfestivals_main.festival.isSelected('more', 'sponsors-old'); },\n 'addTxt':'Manage Sponsors',\n 'addFn':'M.startApp(\\'ciniki.sponsors.ref\\',null,\\'M.ciniki_musicfestivals_main.festival.open();\\',\\'mc\\',{\\'object\\':\\'ciniki.musicfestivals.festival\\',\\'object_id\\':M.ciniki_musicfestivals_main.festival.festival_id});',\n },\n }\n this.festival.isSelected = function(t, m) {\n if( this.sections._tabs.selected == t ) {\n if( t == 'more' ) {\n return this.sections._moretabs.selected == m ? 'yes' : 'no';\n }\n return 'yes';\n }\n return 'no';\n }\n this.festival.sectionData = function(s) {\n if( s == 'videos' ) {\n return this.data.registrations;\n }\n return M.panel.prototype.sectionData.call(this, s);\n }\n this.festival.downloadProgramPDF = function() {\n var args = {\n 'tnid':M.curTenantID, \n 'festival_id':this.festival_id, \n 'ipv':this.formValue('ipv'),\n };\n M.api.openPDF('ciniki.musicfestivals.programPDF',args);\n }\n this.festival.downloadSchedulePDF = function() {\n var args = {'tnid':M.curTenantID,\n 'festival_id':this.festival_id,\n 'schedulesection_id':this.schedulesection_id,\n 'names':this.formValue('names'),\n 'ipv':this.formValue('s_ipv'),\n 'titles':this.formValue('s_titles'),\n 'footerdate':this.formValue('footerdate'),\n };\n M.api.openPDF('ciniki.musicfestivals.schedulePDF',args);\n }\n this.festival.downloadCertificatesPDF = function() {\n var args = {'tnid':M.curTenantID,\n 'festival_id':this.festival_id,\n 'schedulesection_id':this.schedulesection_id,\n 'ipv':this.formValue('s_ipv'),\n };\n M.api.openFile('ciniki.musicfestivals.certificatesPDF',args);\n }\n this.festival.downloadCommentsPDF = function() {\n var args = {'tnid':M.curTenantID,\n 'festival_id':this.festival_id,\n 'schedulesection_id':this.schedulesection_id,\n 'ipv':this.formValue('s_ipv'),\n };\n M.api.openPDF('ciniki.musicfestivals.commentsPDF',args);\n }\n this.festival.downloadTeacherComments = function() {\n var args = {'tnid':M.curTenantID,\n 'festival_id':this.festival_id,\n 'teacher_customer_id':this.teacher_customer_id,\n };\n M.api.openPDF('ciniki.musicfestivals.commentsPDF',args);\n }\n this.festival.downloadTeacherRegistrations = function() {\n var args = {'tnid':M.curTenantID,\n 'festival_id':this.festival_id,\n 'teacher_customer_id':this.teacher_customer_id,\n };\n M.api.openPDF('ciniki.musicfestivals.teacherRegistrationsPDF',args);\n }\n this.festival.listLabel = function(s, i, d) { \n if( s == 'details' ) {\n return d.label; \n }\n return '';\n }\n this.festival.listValue = function(s, i, d) { \n if( s == 'details' ) {\n return this.data[i]; \n }\n if( s == '_more' ) {\n return d.label;\n }\n }\n this.festival.fieldValue = function(s, i, d) { \n if( this.data[i] == null ) { return ''; }\n return this.data[i]; \n }\n this.festival.liveSearchCb = function(s, i, v) {\n if( s == 'syllabus_search' && v != '' ) {\n M.api.getJSONBgCb('ciniki.musicfestivals.syllabusSearch', {'tnid':M.curTenantID, 'start_needle':v, 'festival_id':this.festival_id, 'limit':'50'}, function(rsp) {\n M.ciniki_musicfestivals_main.festival.liveSearchShow(s,null,M.gE(M.ciniki_musicfestivals_main.festival.panelUID + '_' + s), rsp.classes);\n if( M.ciniki_musicfestivals_main.festival.lastY > 0 ) {\n window.scrollTo(0,M.ciniki_musicfestivals_main.festival.lastY);\n }\n });\n }\n if( (s == 'registration_search' || s == 'video_search') && v != '' ) {\n M.api.getJSONBgCb('ciniki.musicfestivals.registrationSearch', {'tnid':M.curTenantID, 'start_needle':v, 'festival_id':this.festival_id, 'limit':'50'}, function(rsp) {\n M.ciniki_musicfestivals_main.festival.liveSearchShow(s,null,M.gE(M.ciniki_musicfestivals_main.festival.panelUID + '_' + s), rsp.registrations);\n if( M.ciniki_musicfestivals_main.festival.lastY > 0 ) {\n window.scrollTo(0,M.ciniki_musicfestivals_main.festival.lastY);\n }\n });\n }\n }\n this.festival.liveSearchResultValue = function(s, f, i, j, d) {\n if( s == 'syllabus_search' ) { \n return this.cellValue(s, i, j, d);\n }\n if( s == 'registration_search' ) { \n return this.cellValue(s, i, j, d);\n/* switch(j) {\n case 0: return d.class_code;\n case 1: return d.display_name;\n case 2: return d.teacher_name;\n case 3: return '$' + d.fee;\n case 4: return d.status_text;\n } */\n }\n if( s == 'video_search' ) { \n switch(j) {\n case 0: return d.class_code;\n case 1: return d.display_name;\n case 2: return M.hyperlink(d.video_url1);\n case 3: return d.music_orgfilename;\n case 4: return d.status_text;\n }\n }\n }\n this.festival.liveSearchResultRowFn = function(s, f, i, j, d) {\n if( s == 'syllabus_search' ) { \n return 'M.ciniki_musicfestivals_main.festival.savePos();M.ciniki_musicfestivals_main.class.open(\\'M.ciniki_musicfestivals_main.festival.reopen();\\',\\'' + d.id + '\\',0,M.ciniki_musicfestivals_main.festival.festival_id, M.ciniki_musicfestivals_main.festival.nplists.classes);';\n }\n if( s == 'registration_search' || s == 'video_search' ) { \n return 'M.ciniki_musicfestivals_main.festival.savePos();M.ciniki_musicfestivals_main.registration.open(\\'M.ciniki_musicfestivals_main.festival.reopen();\\',\\'' + d.id + '\\',0,0,M.ciniki_musicfestivals_main.festival.festival_id, M.ciniki_musicfestivals_main.festival.nplists.registrations,\\'festival\\');';\n }\n }\n this.festival.cellValue = function(s, i, j, d) {\n if( s == 'sections' ) {\n switch(j) {\n case 0: return d.name;\n case 1: return (d.num_registrations!=0 ? d.num_registrations : '');\n }\n }\n if( s == 'categories' ) {\n switch(j) {\n case 0: return d.section_name;\n case 1: return d.name;\n case 2: return (d.num_registrations!=0 ? d.num_registrations : '');\n }\n }\n if( s == 'classes' || s == 'syllabus_search' ) {\n switch(j) {\n case 0: return d.section_name;\n case 1: return d.category_name;\n case 2: return d.code + ' - ' + d.name;\n case 3: return d.earlybird_fee + '/' + d.fee;\n case 4: return (d.num_registrations!=0 ? d.num_registrations : '');\n }\n }\n if( s == 'unscheduled_registrations' ) {\n switch (j) {\n case 0: return d.class_code;\n case 1: return '<span class=\"maintext\">' + d.display_name + '</span><span class=\"subtext\">' + d.title1 + '</span>';\n case 2: return d.status_text;\n }\n }\n if( s == 'registrations' || s == 'registration_search' ) {\n switch (j) {\n case 0: return d.class_code;\n case 1: return '<span class=\"maintext\">' + d.display_name + '</span><span class=\"subtext\">' + d.title1 + '</span>';\n case 2: return d.teacher_name;\n case 3: return '$' + d.fee;\n case 4: return d.status_text;\n }\n if( j == 5 && (this.data.flags&0x10) == 0x10 ) {\n return (d.participation == 2 ? 'Plus' : '');\n } else if( j == 5 && (this.data.flags&0x02) == 0x02 ) {\n return (d.participation == 2 ? 'Virtual' : 'In Person');\n }\n }\n if( s == 'registration_sections' || s == 'emails_sections' ) {\n return M.textCount(d.name, d.num_registrations);\n }\n if( s == 'registration_teachers' ) {\n return M.textCount(d.display_name, d.num_registrations);\n }\n if( s == 'registration_tags' ) {\n return M.textCount(d.name, d.num_registrations);\n }\n if( s == 'schedule_sections' ) {\n switch(j) {\n case 0: return d.name;\n// case 1: return '<button onclick=\"event.stopPropagation();M.ciniki_musicfestivals_main.schedulesection.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',\\'' + d.id + '\\',M.ciniki_musicfestivals_main.festival.festival_id,null);\">Edit</span>';\n }\n }\n if( s == 'schedule_divisions' && M.ciniki_musicfestivals_main.festival.sections._tabs.selected == 'comments' ) {\n return '<span class=\"maintext\">' + d.name + ' <span class=\"subtext\">' + d.division_date_text + '</span>';\n }\n if( s == 'schedule_divisions' ) {\n return '<span class=\"maintext\">' + d.name + ' <span class=\"subdue\">' + d.division_date_text + '</span><span class=\"subtext\">' + d.address + '</span>';\n }\n if( s == 'schedule_timeslots' ) {\n switch(j) {\n case 0: return M.multiline(d.slot_time_text, d.perf_time_text);\n case 1: return '<span class=\"maintext\">' + d.name + '</span><span class=\"subtext\">' + d.description.replace(/\\n/g, '<br/>') + '</span>';\n }\n }\n if( s == 'timeslot_photos' ) {\n if( j == 1 && d.images != null && d.images.length > 0 ) {\n var thumbs = '';\n for(var k in d.images) {\n thumbs += '<img class=\"clickable\" onclick=\"M.ciniki_musicfestivals_main.timeslotimage.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',\\'' + d.images[k].timeslot_image_id + '\\');\" width=\"50px\" height=\"50px\" src=\\'' + d.images[k].image + '\\' />';\n }\n return thumbs;\n }\n switch(j) {\n case 0: return M.multiline(d.slot_time_text, d.name);\n case 1: return '';\n case 2: return M.faBtn('&#xf030;', 'Photos', 'M.ciniki_musicfestivals_main.festival.timeslotImageAdd(' + d.id + ',' + i + ');');\n }\n }\n if( s == 'timeslot_comments' ) {\n switch(j) {\n case 0: return d.time;\n case 1: return '<span class=\"maintext\">' + d.name + '</span><span class=\"subtext\">' + d.description.replace(/\\n/g, '<br/>') + '</span>';\n case 2: return d.status1;\n case 3: return d.status2;\n case 4: return d.status3;\n }\n }\n if( s == 'videos' ) {\n switch (j) {\n case 0: return d.class_code;\n case 1: return '<span class=\"maintext\">' + d.display_name + '</span><span class=\"subtext\">' + d.title + '</span>';\n case 2: return M.hyperlink(d.video_url1);\n case 3: return d.music_orgfilename;\n case 4: return d.status_text;\n }\n }\n if( s == 'competitor_cities' ) {\n return M.textCount(d.name, d.num_competitors);\n }\n if( s == 'competitor_provinces' ) {\n return M.textCount(d.name, d.num_competitors);\n }\n if( s == 'competitors' ) {\n switch(j) {\n case 0: return d.name + M.subdue(' (',d.pronoun,')');\n case 1: return d.classcodes;\n case 2: return d.waiver_signed;\n }\n }\n if( s == 'invoice_statuses' ) {\n return M.textCount(d.status_text, d.num_invoices);\n }\n if( s == 'invoices' ) {\n switch(j) { \n case 0: return d.invoice_number;\n case 1: return d.customer_name;\n case 2: return d.competitor_names;\n case 3: return M.formatDollar(d.total_amount);\n case 4: return d.status_text;\n }\n if( j == 5 && d.status < 50 ) {\n return '<button onclick=\"event.stopPropagation();M.ciniki_musicfestivals_main.festival.invoiceTransaction(\\'' + d.id + '\\',\\'' + M.formatDollar(d.balance_amount) + '\\');\">Paid</button>';\n }\n }\n if( s == 'adjudicators' ) {\n return d.name;\n }\n if( s == 'certificates' ) {\n switch(j) {\n case 0: return d.name;\n case 1: return d.section_name;\n case 2: return d.min_score;\n }\n }\n if( s == 'files' ) {\n switch(j) {\n case 0: return d.name;\n case 1: return (d.webflags&0x01) == 0x01 ? 'Visible' : 'Hidden';\n }\n }\n if( s == 'message_statuses' ) {\n return M.textCount(d.label, d.num_messages);\n }\n if( s == 'messages' ) {\n switch(j) {\n case 0: return d.subject;\n case 1: return d.date_text;\n }\n }\n if( s == 'lists' ) {\n switch(j) { \n case 0: return d.name;\n }\n }\n if( s == 'listsections' ) {\n switch(j) { \n case 0: return d.name;\n }\n }\n if( s == 'listentries' ) {\n switch(j) { \n case 0: return d.award;\n case 1: return d.amount;\n case 2: return d.donor;\n case 3: return d.winner;\n }\n }\n if( s == 'sponsors' ) {\n switch(j) { \n case 0: return d.name;\n case 1: return d.level;\n }\n }\n if( s == 'sponsors-old' && j == 0 ) {\n return '<span class=\"maintext\">' + d.sponsor.title + '</span>';\n }\n }\n this.festival.cellSortValue = function(s, i , j, d) {\n if( s == 'registrations' ) {\n switch(j) {\n case 3: return d.fee;\n case 4: return d.status;\n }\n }\n if( s == 'videos' ) {\n switch(j) {\n case 4: return d.status;\n }\n }\n return '';\n }\n this.festival.rowFn = function(s, i, d) {\n switch(s) {\n// case 'sections': return 'M.ciniki_musicfestivals_main.section.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',\\'' + d.id + '\\',M.ciniki_musicfestivals_main.festival.festival_id, M.ciniki_musicfestivals_main.festival.nplists.sections);';\n case 'sections': return 'M.ciniki_musicfestivals_main.classes.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',\\'' + d.id + '\\',M.ciniki_musicfestivals_main.festival.festival_id, M.ciniki_musicfestivals_main.festival.nplists.sections);';\n case 'categories': return 'M.ciniki_musicfestivals_main.category.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',\\'' + d.id + '\\',\\'' + d.section_id + '\\',M.ciniki_musicfestivals_main.festival.festival_id, M.ciniki_musicfestivals_main.festival.nplists.categories);';\n case 'classes': return 'M.ciniki_musicfestivals_main.class.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',\\'' + d.id + '\\',0,M.ciniki_musicfestivals_main.festival.festival_id, M.ciniki_musicfestivals_main.festival.nplists.classes);';\n case 'unscheduled_registrations': \n case 'registrations': \n case 'videos':\n return 'M.ciniki_musicfestivals_main.registration.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',\\'' + d.id + '\\',0,0,M.ciniki_musicfestivals_main.festival.festival_id, M.ciniki_musicfestivals_main.festival.nplists.registrations,\\'festival\\');';\n case 'registration_sections': return 'M.ciniki_musicfestivals_main.festival.openSection(\\'' + d.id + '\\',\"' + M.eU(d.name) + '\");';\n case 'emails_sections': return 'M.ciniki_musicfestivals_main.festival.openSection(\\'' + d.id + '\\',\"' + M.eU(d.name) + '\");';\n case 'registration_teachers': return 'M.ciniki_musicfestivals_main.festival.openTeacher(\\'' + d.id + '\\',\"' + M.eU(d.display_name) + '\");';\n case 'registration_tags': return 'M.ciniki_musicfestivals_main.festival.openTag(\\'' + M.eU(d.name) + '\\',\"' + M.eU(d.display_name) + '\");';\n case 'schedule_sections': return 'M.ciniki_musicfestivals_main.festival.openScheduleSection(\\'' + d.id + '\\',\"' + M.eU(d.name) + '\");';\n case 'schedule_divisions': return 'M.ciniki_musicfestivals_main.festival.openScheduleDivision(\\'' + d.id + '\\',\"' + M.eU(d.name) + '\");';\n// case 'schedule_sections': return 'M.ciniki_musicfestivals_main.schedulesection.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',\\'' + d.id + '\\',M.ciniki_musicfestivals_main.festival.festival_id,null);';\n// case 'schedule_divisions': return 'M.ciniki_musicfestivals_main.scheduledivision.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',\\'' + d.id + '\\',M.ciniki_musicfestivals_main.festival.schedulesection_id,M.ciniki_musicfestivals_main.festival.festival_id,null);';\n case 'schedule_timeslots': return 'M.ciniki_musicfestivals_main.scheduletimeslot.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',\\'' + d.id + '\\',M.ciniki_musicfestivals_main.festival.scheduledivision_id,M.ciniki_musicfestivals_main.festival.festival_id,null);';\n case 'timeslot_comments': return 'M.ciniki_musicfestivals_main.timeslotcomments.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',\\'' + d.id + '\\',M.ciniki_musicfestivals_main.festival.scheduledivision_id,M.ciniki_musicfestivals_main.festival.festival_id,null);';\n case 'timeslot_photos': return null;\n case 'competitor_cities': return 'M.ciniki_musicfestivals_main.festival.openCompetitorCity(\\'' + escape(d.name) + '\\');';\n case 'competitor_provinces': return 'M.ciniki_musicfestivals_main.festival.openCompetitorProv(\\'' + escape(d.name) + '\\');';\n case 'competitors': return 'M.ciniki_musicfestivals_main.competitor.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',\\'' + d.id + '\\',M.ciniki_musicfestivals_main.festival.festival_id);';\n case 'invoice_statuses': return 'M.ciniki_musicfestivals_main.festival.openInvoiceStatus(\\'' + d.typestatus + '\\');';\n case 'invoices': return 'M.startApp(\\'ciniki.sapos.invoice\\',null,\\'M.ciniki_musicfestivals_main.festival.open();\\',\\'mc\\',{\\'invoice_id\\':\\'' + d.id + '\\'});';\n case 'adjudicators': return 'M.ciniki_musicfestivals_main.adjudicator.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',\\'' + d.id + '\\',0,M.ciniki_musicfestivals_main.festival.festival_id, M.ciniki_musicfestivals_main.festival.nplists.adjudicators);';\n case 'certificates': return 'M.ciniki_musicfestivals_main.certificate.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',\\'' + d.id + '\\');';\n case 'files': return 'M.ciniki_musicfestivals_main.editfile.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',\\'' + d.id + '\\');';\n case 'message_statuses': return 'M.ciniki_musicfestivals_main.festival.openMessageStatus(' + d.status + ');';\n case 'messages': return 'M.ciniki_musicfestivals_main.message.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',\\'' + d.id + '\\');';\n case 'lists': return 'M.ciniki_musicfestivals_main.festival.openList(\\'' + d.id + '\\',\"' + M.eU(d.name) + '\");';\n case 'listsections': return 'M.ciniki_musicfestivals_main.festival.openListSection(\\'' + d.id + '\\',\"' + M.eU(d.name) + '\");';\n case 'listentries': return 'M.ciniki_musicfestivals_main.listentry.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',\\'' + d.id + '\\');';\n case 'sponsors': return 'M.ciniki_musicfestivals_main.sponsor.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',\\'' + d.id + '\\');';\n case 'sponsors-old': return 'M.startApp(\\'ciniki.sponsors.ref\\',null,\\'M.ciniki_musicfestivals_main.festival.open();\\',\\'mc\\',{\\'ref_id\\':\\'' + d.sponsor.ref_id + '\\'});';\n }\n return '';\n }\n this.festival.rowClass = function(s, i, d) {\n if( s == 'competitor_cities' && this.city_prov == d.name ) {\n return 'highlight';\n }\n if( s == 'competitor_provinces' && this.province == d.name ) {\n return 'highlight';\n }\n if( s == 'schedule_sections' && this.schedulesection_id == d.id ) {\n return 'highlight';\n }\n if( s == 'schedule_divisions' && this.scheduledivision_id == d.id ) {\n return 'highlight';\n }\n if( (s == 'registration_sections' || s == 'emails_sections') && this.section_id == d.id ) {\n return 'highlight';\n }\n if( s == 'registration_teachers' && this.teacher_customer_id == d.id ) {\n return 'highlight';\n }\n if( s == 'registration_tags' && this.registration_tag == d.name ) {\n return 'highlight';\n }\n if( s == 'lists' && this.list_id == d.id ) {\n return 'highlight';\n }\n if( s == 'listsections' && this.listsection_id == d.id ) {\n return 'highlight';\n }\n if( s == 'message_statuses' && this.messages_status == d.status ) {\n return 'highlight';\n }\n if( s == 'invoice_statuses' && this.invoice_typestatus == d.typestatus ) {\n return 'highlight';\n }\n if( s == 'invoices' && this.invoice_typestatus == '' && s == 'invoices' ) {\n switch(d.status) { \n case '10': return 'statusorange';\n case '15': return 'statusorange';\n case '40': return 'statusorange';\n case '42': return 'statusred';\n case '50': return 'statusgreen';\n case '55': return 'statusorange';\n case '60': return 'statusgrey';\n case '65': return 'statusgrey';\n }\n }\n }\n this.festival.switchTab = function(tab, stab) {\n if( tab != null ) { this.sections._tabs.selected = tab; }\n if( stab != null ) { this.sections._stabs.selected = stab; }\n this.open();\n }\n this.festival.switchMTab = function(t) {\n this.sections._moretabs.selected = t;\n this.open();\n }\n this.festival.switchRegTab = function(t) {\n this.sections.registration_tabs.selected = t;\n this.open();\n }\n this.festival.switchCompTab = function(t) {\n this.sections.competitor_tabs.selected = t;\n this.open();\n }\n this.festival.switchLVTab = function(t) {\n this.sections.ipv_tabs.selected = t;\n this.open();\n }\n this.festival.switchEmailsTab = function(t) {\n this.sections.emails_tabs.selected = t;\n this.open();\n }\n this.festival.emailTeacherRegistrations = function() {\n M.ciniki_musicfestivals_main.emailregistrations.open('M.ciniki_musicfestivals_main.festival.show();');\n }\n this.festival.openSection = function(id,n) {\n this.lastY = 0;\n this.section_id = id;\n this.teacher_customer_id = 0;\n this.registration_tag = '';\n if( id > 0 ) {\n this.sections.registrations.label = 'Registrations - ' + M.dU(n);\n// this.sections.emails_list.label = 'Emails - ' + M.dU(n);\n this.sections.emails_html.label = 'Emails - ' + M.dU(n);\n this.sections.videos.label = 'Registrations - ' + M.dU(n);\n } else {\n this.sections.registrations.label = 'Registrations';\n// this.sections.emails_list.label = 'Emails';\n this.sections.emails_html.label = 'Emails';\n this.sections.videos.label = 'Registrations';\n }\n this.open();\n }\n this.festival.openTeacher = function(id,n) {\n this.lastY = 0;\n this.teacher_customer_id = id;\n this.section_id = 0;\n this.registration_tag = '';\n if( id > 0 ) {\n this.sections.registrations.label = 'Registrations - ' + M.dU(n);\n this.sections.videos.label = 'Registrations - ' + M.dU(n);\n } else {\n this.sections.registrations.label = 'Registrations';\n this.sections.videos.label = 'Registrations';\n }\n this.open();\n }\n this.festival.openTag = function(name, n) {\n this.lastY = 0;\n this.section_id = 0;\n this.teacher_customer_id = 0;\n this.registration_tag = unescape(name);\n if( name != '' ) {\n this.sections.registrations.label = 'Registrations - ' + M.dU(n);\n this.sections.videos.label = 'Registrations - ' + M.dU(n);\n } else {\n this.sections.registrations.label = 'Registrations';\n this.sections.videos.label = 'Registrations';\n }\n this.open();\n \n }\n this.festival.openScheduleSection = function(i, n) {\n this.schedulesection_id = i;\n this.sections.schedule_divisions.label = M.dU(n);\n this.scheduledivision_id = 0;\n this.open();\n }\n this.festival.openScheduleDivision = function(i, n) {\n this.lastY = 0;\n this.scheduledivision_id = i;\n this.sections.schedule_timeslots.label = M.dU(n);\n this.open();\n }\n this.festival.openList = function(i, n) {\n this.list_id = i;\n this.sections.listsections.label = M.dU(n);\n this.scheduledivision_id = 0;\n this.open();\n }\n this.festival.openListSection = function(i, n) {\n this.lastY = 0;\n this.listsection_id = i;\n this.sections.listentries.label = M.dU(n);\n this.open();\n }\n this.festival.downloadExcel = function(fid) {\n if( this.sections.registration_tabs.selected == 'sections' && this.section_id > 0 ) {\n M.api.openFile('ciniki.musicfestivals.registrationsExcel', {'tnid':M.curTenantID, 'festival_id':fid, 'section_id':this.section_id});\n } else if( this.sections.registration_tabs.selected == 'teachers' && this.teacher_customer_id > 0 ) {\n M.api.openFile('ciniki.musicfestivals.registrationsExcel', {'tnid':M.curTenantID, 'festival_id':fid, 'teacher_customer_id':this.teacher_customer_id});\n } else if( this.sections.registration_tabs.selected == 'tags' && this.registration_tag != '' ) {\n M.api.openFile('ciniki.musicfestivals.registrationsExcel', {'tnid':M.curTenantID, 'festival_id':fid, 'registration_tag':this.registration_tag});\n } else {\n M.api.openFile('ciniki.musicfestivals.registrationsExcel', {'tnid':M.curTenantID, 'festival_id':fid});\n }\n }\n this.festival.downloadPDF = function(fid) {\n if( this.sections.registration_tabs.selected == 'sections' && this.section_id > 0 ) {\n M.api.openFile('ciniki.musicfestivals.registrationsPDF', {'tnid':M.curTenantID, 'festival_id':fid, 'section_id':this.section_id});\n } else {\n M.api.openFile('ciniki.musicfestivals.registrationsPDF', {'tnid':M.curTenantID, 'festival_id':fid});\n }\n }\n this.festival.openInvoiceStatus = function(s) {\n this.lastY = 0;\n this.invoice_typestatus = s;\n this.open();\n }\n this.festival.invoiceTransaction = function(i, t) {\n M.startApp('ciniki.sapos.invoice', null, 'M.ciniki_musicfestivals_main.festival.open();', 'mc', {'invoice_id':i, 'transaction_amount':t});\n }\n this.festival.openCompetitorCity = function(c) {\n this.lastY = 0;\n this.city_prov = unescape(c);\n this.open();\n }\n this.festival.openCompetitorProv = function(c) {\n this.lastY = 0;\n this.province = unescape(c);\n this.open();\n }\n this.festival.openMessageStatus = function(s) {\n this.messages_status = s;\n this.open();\n }\n this.festival.reopen = function(cb,fid,list) {\n if( this.sections._tabs.selected == 'sections' ) {\n if( M.gE(this.panelUID + '_syllabus_search').value != '' ) {\n this.sections.syllabus_search.lastsearch = M.gE(this.panelUID + '_syllabus_search').value;\n }\n }\n if( this.sections._tabs.selected == 'registrations' ) {\n if( M.gE(this.panelUID + '_registration_search').value != '' ) {\n this.sections.registration_search.lastsearch = M.gE(this.panelUID + '_registration_search').value;\n }\n }\n this.open(cb,fid,list);\n }\n this.festival.open = function(cb, fid, list) {\n if( fid != null ) { this.festival_id = fid; }\n var args = {'tnid':M.curTenantID, 'festival_id':this.festival_id};\n this.size = 'xlarge narrowaside';\n if( this.sections._tabs.selected == 'sections' ) {\n if( this.sections._stabs.selected == 'sections' ) {\n args['sections'] = 'yes';\n } else if( this.sections._stabs.selected == 'categories' ) {\n args['categories'] = 'yes';\n } else if( this.sections._stabs.selected == 'classes' ) {\n args['classes'] = 'yes';\n }\n } else if( this.sections._tabs.selected == 'registrations' || this.sections._tabs.selected == 'videos' ) {\n this.size = 'xlarge narrowaside';\n args['sections'] = 'yes';\n args['registrations'] = 'yes';\n args['ipv'] = this.sections.ipv_tabs.selected;\n\n } else if( this.sections._tabs.selected == 'schedule' ) {\n this.size = 'medium mediumaside';\n args['schedule'] = 'yes';\n args['ssection_id'] = this.schedulesection_id;\n args['sdivision_id'] = this.scheduledivision_id;\n this.sections.schedule_sections.changeTxt = 'Add Schedule';\n this.sections.schedule_sections.addTxt = 'Unscheduled';\n this.sections.schedule_divisions.addTxt = 'Add Division';\n } else if( this.sections._tabs.selected == 'comments' ) {\n this.size = 'xlarge narrowaside';\n args['schedule'] = 'yes';\n args['comments'] = 'yes';\n args['ssection_id'] = this.schedulesection_id;\n args['sdivision_id'] = this.scheduledivision_id;\n args['adjudicators'] = 'yes';\n this.sections.schedule_sections.addTxt = '';\n this.sections.schedule_sections.changeTxt = '';\n this.sections.schedule_divisions.addTxt = '';\n } else if( this.sections._tabs.selected == 'competitors' ) {\n this.size = 'xlarge narrowaside';\n args['competitors'] = 'yes';\n if( this.sections.competitor_tabs.selected == 'cities' ) {\n args['city_prov'] = M.eU(this.city_prov);\n } else if( this.sections.competitor_tabs.selected == 'provinces' ) {\n args['province'] = M.eU(this.province);\n } \n } else if( this.sections._tabs.selected == 'photos' ) {\n this.size = 'xlarge narrowaside';\n args['schedule'] = 'yes';\n args['photos'] = 'yes';\n args['ssection_id'] = this.schedulesection_id;\n args['sdivision_id'] = this.scheduledivision_id;\n args['adjudicators'] = 'no';\n this.sections.schedule_sections.addTxt = '';\n this.sections.schedule_sections.changeTxt = '';\n this.sections.schedule_divisions.addTxt = '';\n this.sections.schedule_divisions.changeTxt = '';\n } else if( this.isSelected('more', 'lists') == 'yes' ) {\n args['lists'] = 'yes';\n args['list_id'] = this.list_id;\n args['listsection_id'] = this.listsection_id;\n } else if( this.isSelected('more', 'invoices') == 'yes' ) {\n this.size = 'xlarge narrowaside';\n args['invoices'] = 'yes';\n if( this.invoice_typestatus > 0 ) {\n args['invoice_typestatus'] = this.invoice_typestatus;\n }\n } else if( this.isSelected('more', 'adjudicators') == 'yes' ) {\n this.size = 'xlarge';\n args['adjudicators'] = 'yes';\n } else if( this.isSelected('more', 'files') == 'yes' ) {\n this.size = 'xlarge';\n args['files'] = 'yes';\n } else if( this.isSelected('more', 'certificates') == 'yes' ) {\n this.size = 'xlarge';\n args['certificates'] = 'yes';\n } else if( this.sections._tabs.selected == 'messages' ) {\n args['messages'] = 'yes';\n // Which emails to get\n args['messages_status'] = this.messages_status;\n this.sections.messages.headerValues[1] = 'Date';\n if( this.messages_status == 30 ) {\n this.sections.messages.headerValues[1] = 'Scheduled';\n } else if( this.messages_status == 50 ) {\n this.sections.messages.headerValues[1] = 'Sent';\n }\n } else if( this.isSelected('more', 'emails') == 'yes' ) {\n args['sections'] = 'yes';\n // Which emails to get\n args['emails_list'] = this.sections.emails_tabs.selected;\n } else if( this.isSelected('more', 'sponsors') == 'yes' ) {\n //} else if( this.sections._tabs.selected == 'sponsors' ) {\n this.size = 'xlarge';\n args['sponsors'] = 'yes';\n } else if( this.isSelected('more', 'sponsors-old') == 'yes' ) {\n args['sponsors'] = 'yes';\n }\n if( this.section_id > 0 ) {\n args['section_id'] = this.section_id;\n }\n if( this.teacher_customer_id > 0 ) {\n args['teacher_customer_id'] = this.teacher_customer_id;\n }\n if( this.registration_tag != '' ) {\n args['registration_tag'] = this.registration_tag;\n }\n M.api.getJSONCb('ciniki.musicfestivals.festivalGet', args, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_musicfestivals_main.festival;\n p.data = rsp.festival;\n p.label = rsp.festival.name;\n p.sections.registration_search.livesearchcols = 5;\n p.sections.registrations.num_cols = 5;\n p.sections.registration_search.headerValues = ['Class', 'Registrant', 'Teacher', 'Fee', 'Status'];\n if( (rsp.festival.flags&0x10) == 0x10 ) {\n p.sections.registration_search.livesearchcols = 6;\n p.sections.registrations.num_cols = 6;\n p.sections.registration_search.headerValues = ['Class', 'Registrant', 'Teacher', 'Fee', 'Status', 'Plus'];\n } else if( (rsp.festival.flags&0x02) == 0x02 ) {\n p.sections.registration_search.livesearchcols = 6;\n p.sections.registrations.num_cols = 6;\n p.sections.registration_search.headerValues = ['Class', 'Registrant', 'Teacher', 'Fee', 'Status', 'Virtual'];\n }\n p.sections.timeslot_comments.headerValues[2] = '';\n p.sections.timeslot_comments.headerValues[3] = '';\n p.sections.timeslot_comments.headerValues[4] = '';\n if( rsp.festival.sections != null ) {\n p.data.registration_sections = [];\n p.data.emails_sections = [];\n p.data.registration_sections.push({'id':0, 'name':'All'});\n p.data.emails_sections.push({'id':0, 'name':'All'});\n for(var i in rsp.festival.sections) {\n// p.data.registration_sections.push({'id':rsp.festival.sections[i].id, 'name':rsp.festival.sections[i].name});\n p.data.registration_sections.push(rsp.festival.sections[i]);\n p.data.emails_sections.push({'id':rsp.festival.sections[i].id, 'name':rsp.festival.sections[i].name});\n }\n// p.data.registration_sections = rsp.festival.sections;\n }\n if( rsp.festival.schedule_sections != null ) {\n for(var i in rsp.festival.schedule_sections) {\n if( p.schedulesection_id > 0 && rsp.festival.schedule_sections[i].id == p.schedulesection_id ) {\n if( rsp.festival.schedule_sections[i].adjudicator1_id > 0 && rsp.festival.adjudicators != null && rsp.festival.adjudicators[rsp.festival.schedule_sections[i].adjudicator1_id] != null ) {\n p.sections.timeslot_comments.headerValues[2] = rsp.festival.adjudicators[rsp.festival.schedule_sections[i].adjudicator1_id].name;\n }\n if( rsp.festival.schedule_sections[i].adjudicator2_id > 0 && rsp.festival.adjudicators != null && rsp.festival.adjudicators[rsp.festival.schedule_sections[i].adjudicator2_id] != null ) {\n p.sections.timeslot_comments.headerValues[2] = rsp.festival.adjudicators[rsp.festival.schedule_sections[i].adjudicator2_id].name;\n }\n if( rsp.festival.schedule_sections[i].adjudicator3_id > 0 && rsp.festival.adjudicators != null && rsp.festival.adjudicators[rsp.festival.schedule_sections[i].adjudicator3_id] != null ) {\n p.sections.timeslot_comments.headerValues[2] = rsp.festival.adjudicators[rsp.festival.schedule_sections[i].adjudicator3_id].name;\n }\n }\n }\n }\n p.nplists = {};\n if( rsp.nplists != null ) {\n p.nplists = rsp.nplists;\n }\n p.refresh();\n p.show(cb);\n // \n // Auto remember last search\n //\n if( p.sections['syllabus_search'].lastsearch != null \n && p.sections['syllabus_search'].lastsearch != '' \n ) {\n M.gE(p.panelUID + '_syllabus_search').value = p.sections['syllabus_search'].lastsearch;\n var t = M.gE(p.panelUID + '_syllabus_search_livesearch_grid');\n t.style.display = 'table';\n p.liveSearchCb('syllabus_search', null, p.sections['syllabus_search'].lastsearch);\n delete p.sections['syllabus_search'].lastsearch;\n }\n else if( p.sections['registration_search'].lastsearch != null \n && p.sections['registration_search'].lastsearch != '' \n ) {\n M.gE(p.panelUID + '_registration_search').value = p.sections['registration_search'].lastsearch;\n var t = M.gE(p.panelUID + '_registration_search_livesearch_grid');\n t.style.display = 'table';\n p.liveSearchCb('registration_search', null, p.sections['registration_search'].lastsearch);\n delete p.sections['registration_search'].lastsearch;\n }\n });\n }\n this.festival.timeslotImageAdd = function(tid, row) {\n this.timeslot_image_uploader_tid = tid;\n this.timeslot_image_uploader_row = row;\n this.image_uploader = M.aE('input', this.panelUID + '_' + tid + '_upload', 'file_uploader');\n this.image_uploader.setAttribute('name', tid);\n this.image_uploader.setAttribute('type', 'file');\n this.image_uploader.setAttribute('onchange', 'M.ciniki_musicfestivals_main.festival.timeslotImageUpload();');\n this.image_uploader.click();\n }\n this.festival.timeslotImageUpload = function() {\n var files = this.image_uploader.files;\n M.startLoad();\n M.api.postJSONFile('ciniki.musicfestivals.timeslotImageDrop', {'tnid':M.curTenantID, 'festival_id':this.festival_id, \n 'timeslot_id':this.timeslot_image_uploader_tid},\n files[0],\n function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.stopLoad();\n M.api.err(rsp);\n return false;\n }\n M.stopLoad();\n var p = M.ciniki_musicfestivals_main.festival;\n var t = M.gE(p.panelUID + '_timeslot_photos_grid');\n var cell = t.children[0].children[p.timeslot_image_uploader_row].children[1];\n cell.innerHTML += '<img class=\"clickable\" onclick=\"M.ciniki_musicfestivals_main.timeslotimage.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',\\'' + rsp.id + '\\');\" width=\"50px\" height=\"50px\" src=\\'' + rsp.image + '\\' />';\n });\n }\n this.festival.festivalCopy = function(old_fid) {\n M.api.getJSONCb('ciniki.musicfestivals.festivalCopy', {'tnid':M.curTenantID, 'festival_id':this.festival_id, 'old_festival_id':old_fid}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.festival.open();\n });\n }\n this.festival.syllabusDownload = function() {\n M.api.openPDF('ciniki.musicfestivals.festivalSyllabusPDF', {'tnid':M.curTenantID, 'festival_id':this.festival_id});\n }\n this.festival.nextButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.festival_id) < (this.nplist.length - 1) ) {\n return 'M.ciniki_musicfestivals_main.festival.open(null,' + this.nplist[this.nplist.indexOf('' + this.festival_id) + 1] + ');';\n }\n return null;\n }\n this.festival.prevButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.festival_id) > 0 ) {\n return 'M.ciniki_musicfestivals_main.festival_id.open(null,' + this.nplist[this.nplist.indexOf('' + this.festival_id) - 1] + ');';\n }\n return null;\n }\n this.festival.addButton('edit', 'Edit', 'M.ciniki_musicfestivals_main.edit.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',M.ciniki_musicfestivals_main.festival.festival_id);');\n this.festival.addClose('Back');\n this.festival.addButton('next', 'Next');\n this.festival.addLeftButton('prev', 'Prev');\n\n //\n // The panel to edit Festival\n //\n this.edit = new M.panel('Festival', 'ciniki_musicfestivals_main', 'edit', 'mc', 'large mediumaside', 'sectioned', 'ciniki.musicfestivals.main.edit');\n this.edit.data = null;\n this.edit.festival_id = 0;\n this.edit.nplist = [];\n this.edit.sections = {\n/* '_document_logo_id':{'label':'Document Header Logo', 'type':'imageform', 'aside':'yes', 'fields':{\n 'header_logo_id':{'label':'', 'type':'image_id', 'hidelabel':'yes', 'controls':'all', 'history':'no',\n 'addDropImage':function(iid) {\n M.ciniki_musicfestivals_main.edit.setFieldValue('header_logo_id', iid);\n return true;\n },\n 'addDropImageRefresh':'',\n 'deleteImage':function(fid) {\n M.ciniki_musicfestivals_main.edit.setFieldValue(fid,0);\n return true;\n },\n },\n }}, */\n 'general':{'label':'', 'aside':'yes', 'fields':{\n 'name':{'label':'Name', 'type':'text'},\n 'start_date':{'label':'Start', 'type':'date'},\n 'end_date':{'label':'End', 'type':'date'},\n 'status':{'label':'Status', 'type':'toggle', 'toggles':{'10':'Active', '30':'Current', '60':'Archived'}},\n 'flags1':{'label':'Registrations Open', 'type':'flagtoggle', 'default':'off', 'bit':0x01, 'field':'flags'},\n 'flags2':{'label':'Virtual Option', 'type':'flagtoggle', 'default':'off', 'bit':0x02, 'field':'flags',\n 'visible':function() { return M.modFlagSet('ciniki.musicfestivals', 0x4000); },\n 'on_fields':['flags3','virtual_date', 'upload_end_dt'],\n },\n 'flags3':{'label':'Virtual Pricing', 'type':'flagtoggle', 'default':'off', 'bit':0x04, 'field':'flags', 'visible':'no'},\n 'flags4':{'label':'Section End Dates', 'type':'flagtoggle', 'default':'off', 'bit':0x08, 'field':'flags'},\n 'flags5':{'label':'Adjudication Plus', 'type':'flagtoggle', 'default':'off', 'bit':0x10, 'field':'flags',\n 'visible':function() { return M.modFlagSet('ciniki.musicfestivals', 0x0800); },\n },\n 'earlybird_date':{'label':'Earlybird Deadline', 'type':'datetime'},\n 'live_date':{'label':'Live Deadline', 'type':'datetime'},\n 'virtual_date':{'label':'Virtual Deadline', 'type':'datetime', 'visible':'no'},\n 'edit_end_dt':{'label':'Edit Titles Deadline', 'type':'datetime'},\n 'upload_end_dt':{'label':'Upload Deadline', 'type':'datetime', 'visible':'no'},\n }},\n '_settings':{'label':'', 'aside':'yes', 'fields':{\n 'age-restriction-msg':{'label':'Age Restriction Message', 'type':'text'},\n 'president-name':{'label':'President Name', 'type':'text'},\n }},\n// Remove 2022, could be readded in future\n// '_hybrid':{'label':'In Person/Virtual Choices', 'aside':'yes', 'fields':{\n// 'inperson-choice-msg':{'label':'In Person Choice', 'type':'text', 'hint':'in person on a scheduled date'},\n// 'virtual-choice-msg':{'label':'Virtual Choice', 'type':'text', 'hint':'virtually and submit a video'},\n// }},\n '_tabs':{'label':'', 'type':'paneltabs', 'selected':'documents', 'tabs':{\n// 'website':{'label':'Website', 'fn':'M.ciniki_musicfestivals_main.edit.switchTab(\\'website\\');'},\n 'documents':{'label':'Documents', 'fn':'M.ciniki_musicfestivals_main.edit.switchTab(\\'documents\\');'},\n 'registrations':{'label':'Registrations', 'fn':'M.ciniki_musicfestivals_main.edit.switchTab(\\'registrations\\');'},\n }},\n '_primary_image_id':{'label':'Primary Image', 'type':'imageform', \n 'visible':function() { return M.ciniki_musicfestivals_main.edit.sections._tabs.selected == 'website' ? 'yes' : 'hidden'; },\n 'fields':{\n 'primary_image_id':{'label':'', 'type':'image_id', 'hidelabel':'yes', 'controls':'all', 'history':'no',\n 'addDropImage':function(iid) {\n M.ciniki_musicfestivals_main.edit.setFieldValue('primary_image_id', iid, null, null);\n return true;\n },\n 'addDropImageRefresh':'',\n 'deleteImage':function(fid) {\n M.ciniki_musicfestivals_main.edit.setFieldValue(fid,0);\n return true;\n },\n },\n }},\n '_description':{'label':'Description', \n 'visible':function() { return M.ciniki_musicfestivals_main.edit.sections._tabs.selected == 'website' ? 'yes' : 'hidden'; },\n 'fields':{\n 'description':{'label':'', 'hidelabel':'yes', 'type':'textarea'},\n }},\n '_document_logo_id':{'label':'Document Image', 'type':'imageform',\n 'visible':function() { return M.ciniki_musicfestivals_main.edit.sections._tabs.selected == 'documents' ? 'yes' : 'hidden'; },\n 'fields':{\n 'document_logo_id':{'label':'', 'type':'image_id', 'hidelabel':'yes', 'controls':'all', 'history':'no',\n 'addDropImage':function(iid) {\n M.ciniki_musicfestivals_main.edit.setFieldValue('document_logo_id', iid, null, null);\n return true;\n },\n 'addDropImageRefresh':'',\n 'deleteImage':function(fid) {\n M.ciniki_musicfestivals_main.edit.setFieldValue(fid,0);\n return true;\n },\n },\n }},\n '_document_header_msg':{'label':'Header Message', \n 'visible':function() { return M.ciniki_musicfestivals_main.edit.sections._tabs.selected == 'documents' ? 'yes' : 'hidden'; },\n 'fields':{\n 'document_header_msg':{'label':'', 'hidelabel':'yes', 'type':'text'},\n }},\n '_document_footer_msg':{'label':'Footer Message', \n 'visible':function() { return M.ciniki_musicfestivals_main.edit.sections._tabs.selected == 'documents' ? 'yes' : 'hidden'; },\n 'fields':{\n 'document_footer_msg':{'label':'', 'hidelabel':'yes', 'type':'text'},\n }},\n '_comments_pdf':{'label':'Comments PDF Options', \n 'visible':function() { return M.ciniki_musicfestivals_main.edit.sections._tabs.selected == 'documents' ? 'yes' : 'hidden'; },\n 'fields':{\n 'flags6':{'label':'Header Adjudicator Name', 'type':'flagtoggle', 'default':'off', 'bit':0x20, 'field':'flags'},\n 'flags7':{'label':'Timeslot Date/Time', 'type':'flagtoggle', 'default':'off', 'bit':0x40, 'field':'flags'},\n 'comments_grade_label':{'label':'Grade Label', 'default':'Mark', 'type':'text'},\n 'comments_footer_msg':{'label':'Footer Message', 'type':'text'},\n }},\n '_certificates_pdf':{'label':'Certificates PDF Options', \n 'visible':function() { return M.ciniki_musicfestivals_main.edit.sections._tabs.selected == 'documents' ? 'yes' : 'hidden'; },\n 'fields':{\n 'flags8':{'label':'Include Pronouns', 'type':'flagtoggle', 'default':'off', 'bit':0x80, 'field':'flags'},\n }},\n '_syllabus':{'label':'Syllabus Options', \n 'visible':function() { return M.ciniki_musicfestivals_main.edit.sections._tabs.selected == 'documents' ? 'yes' : 'hidden'; },\n 'fields':{\n 'flags5':{'label':'Include Section/Category as Class Name', 'type':'flagtoggle', 'default':'off', 'bit':0x0100, 'field':'flags'},\n }},\n '_registration_parent_msg':{'label':'Registration Form', \n 'visible':function() { return M.ciniki_musicfestivals_main.edit.sections._tabs.selected == 'registrations' ? 'yes' : 'hidden'; },\n 'fields':{\n 'registration-parent-msg':{'label':'Parents Intro', 'type':'textarea', 'size':'medium'},\n 'registration-teacher-msg':{'label':'Teachers Intro', 'type':'textarea', 'size':'medium'},\n 'registration-adult-msg':{'label':'Adult Intro', 'type':'textarea', 'size':'medium'},\n }},\n '_competitor_parent_msg':{'label':'Individual Competitor Form', \n 'visible':function() { return M.ciniki_musicfestivals_main.edit.sections._tabs.selected == 'registrations' ? 'yes' : 'hidden'; },\n 'fields':{\n 'competitor-parent-msg':{'label':'Parent Intro', 'type':'textarea', 'size':'medium'},\n 'competitor-teacher-msg':{'label':'Teacher Intro', 'type':'textarea', 'size':'medium'},\n 'competitor-adult-msg':{'label':'Adult Intro', 'type':'textarea', 'size':'medium'},\n 'competitor-individual-study-level':{'label':'Study Level', 'type':'toggle', 'default':'optional', 'toggles':{\n 'options':'Optional', 'required':'Required', 'hidden':'Hidden',\n }},\n }},\n '_competitor_group_parent_msg':{'label':'Group/Ensemble Competitor Form', \n 'visible':function() { return M.ciniki_musicfestivals_main.edit.sections._tabs.selected == 'registrations' ? 'yes' : 'hidden'; },\n 'fields':{\n 'competitor-group-parent-msg':{'label':'Parent Intro', 'type':'textarea', 'size':'medium'},\n 'competitor-group-teacher-msg':{'label':'Teacher Intro', 'type':'textarea', 'size':'medium'},\n 'competitor-group-adult-msg':{'label':'Adult Intro', 'type':'textarea', 'size':'medium'},\n 'competitor-group-study-level':{'label':'Study Level', 'type':'toggle', 'default':'optional', 'toggles':{\n 'options':'Optional', 'required':'Required', 'hidden':'Hidden',\n }},\n }},\n '_waiver':{'label':'Waiver Message', \n 'visible':function() { return M.ciniki_musicfestivals_main.edit.sections._tabs.selected == 'registrations' ? 'yes' : 'hidden'; },\n 'fields':{\n 'waiver-title':{'label':'Title', 'type':'text'},\n 'waiver-msg':{'label':'Message', 'type':'textarea', 'size':'medium'},\n }},\n '_buttons':{'label':'', 'buttons':{\n 'save':{'label':'Save', 'fn':'M.ciniki_musicfestivals_main.edit.save();'},\n 'updatename':{'label':'Update Public Names', \n 'visible':function() {return M.ciniki_musicfestivals_main.edit.festival_id > 0 ? 'yes' : 'no'; },\n 'fn':'M.ciniki_musicfestivals_main.edit.updateNames();'},\n 'delete':{'label':'Delete', \n 'visible':function() {return M.ciniki_musicfestivals_main.edit.festival_id > 0 ? 'yes' : 'no'; },\n 'fn':'M.ciniki_musicfestivals_main.edit.save();'},\n }},\n };\n this.edit.fieldValue = function(s, i, d) { return this.data[i]; }\n this.edit.fieldHistoryArgs = function(s, i) {\n return {'method':'ciniki.musicfestivals.festivalHistory', 'args':{'tnid':M.curTenantID, 'festival_id':this.festival_id, 'field':i}};\n }\n this.edit.switchTab = function(tab) {\n this.sections._tabs.selected = tab;\n this.showHideSection('_primary_image_id');\n this.showHideSection('_description');\n this.showHideSection('_document_logo_id');\n this.showHideSection('_document_header_msg');\n this.showHideSection('_document_footer_msg');\n this.showHideSection('_comments_pdf');\n this.showHideSection('_certificates_pdf');\n this.showHideSection('_syllabus');\n this.showHideSection('_registration_parent_msg');\n this.showHideSection('_registration_teacher_msg');\n this.showHideSection('_registration_adult_msg');\n this.showHideSection('_competitor_parent_msg');\n this.showHideSection('_competitor_teacher_msg');\n this.showHideSection('_competitor_adult_msg');\n this.showHideSection('_competitor_group_parent_msg');\n this.showHideSection('_competitor_group_teacher_msg');\n this.showHideSection('_competitor_group_adult_msg');\n this.showHideSection('_waiver');\n this.refreshSection('_tabs');\n }\n this.edit.updateNames = function() {\n M.api.getJSONCb('ciniki.musicfestivals.registrationNamesUpdate', {'tnid':M.curTenantID, 'festival_id':this.festival_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.alert(\"Done\");\n });\n }\n this.edit.open = function(cb, fid, list) {\n if( fid != null ) { this.festival_id = fid; }\n if( list != null ) { this.nplist = list; }\n M.api.getJSONCb('ciniki.musicfestivals.festivalGet', {'tnid':M.curTenantID, 'festival_id':this.festival_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_musicfestivals_main.edit;\n p.data = rsp.festival;\n if( (rsp.festival.flags&0x02) == 0x02 ) {\n p.sections.general.fields.flags3.visible = 'yes';\n p.sections.general.fields.virtual_date.visible = 'yes';\n p.sections.general.fields.upload_end_dt.visible = 'yes';\n } else {\n p.sections.general.fields.virtual_date.visible = 'no';\n p.sections.general.fields.upload_end_dt.visible = 'no';\n }\n p.refresh();\n p.show(cb);\n });\n }\n this.edit.save = function(cb) {\n if( cb == null ) { cb = 'M.ciniki_musicfestivals_main.edit.close();'; }\n if( this.festival_id > 0 ) {\n var c = this.serializeForm('no');\n if( c != '' ) {\n M.api.postJSONCb('ciniki.musicfestivals.festivalUpdate', {'tnid':M.curTenantID, 'festival_id':this.festival_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n eval(cb);\n });\n } else {\n eval(cb);\n }\n } else {\n var c = this.serializeForm('yes');\n M.api.postJSONCb('ciniki.musicfestivals.festivalAdd', {'tnid':M.curTenantID}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.edit.festival_id = rsp.id;\n eval(cb);\n });\n }\n }\n this.edit.remove = function() {\n M.confirm('Are you sure you want to remove festival?',null,function() {\n M.api.getJSONCb('ciniki.musicfestivals.festivalDelete', {'tnid':M.curTenantID, 'festival_id':M.ciniki_musicfestivals_main.edit.festival_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.edit.close();\n });\n });\n }\n this.edit.nextButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.festival_id) < (this.nplist.length - 1) ) {\n return 'M.ciniki_musicfestivals_main.edit.save(\\'M.ciniki_musicfestivals_main.edit.open(null,' + this.nplist[this.nplist.indexOf('' + this.festival_id) + 1] + ');\\');';\n }\n return null;\n }\n this.edit.prevButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.festival_id) > 0 ) {\n return 'M.ciniki_musicfestivals_main.edit.save(\\'M.ciniki_musicfestivals_main.festival_id.open(null,' + this.nplist[this.nplist.indexOf('' + this.festival_id) - 1] + ');\\');';\n }\n return null;\n }\n this.edit.addButton('save', 'Save', 'M.ciniki_musicfestivals_main.edit.save();');\n this.edit.addClose('Cancel');\n this.edit.addButton('next', 'Next');\n this.edit.addLeftButton('prev', 'Prev');\n\n //\n // The panel to edit Section\n //\n this.section = new M.panel('Section', 'ciniki_musicfestivals_main', 'section', 'mc', 'medium mediumaside', 'sectioned', 'ciniki.musicfestivals.main.section');\n this.section.data = null;\n this.section.festival_id = 0;\n this.section.section_id = 0;\n this.section.nplists = {};\n this.section.nplist = [];\n this.section.sections = {\n '_primary_image_id':{'label':'Image', 'type':'imageform', 'aside':'yes', 'fields':{\n 'primary_image_id':{'label':'', 'type':'image_id', 'hidelabel':'yes', 'controls':'all', 'history':'no',\n 'addDropImage':function(iid) {\n M.ciniki_musicfestivals_main.section.setFieldValue('primary_image_id', iid);\n return true;\n },\n 'addDropImageRefresh':'',\n 'deleteImage':function(fid) {\n M.ciniki_musicfestivals_main.section.setFieldValue('primary_image_id',0);\n return true;\n },\n },\n }},\n 'general':{'label':'Section', 'aside':'yes', 'fields':{\n 'name':{'label':'Name', 'type':'text', 'required':'yes'},\n 'sequence':{'label':'Order', 'type':'text', 'required':'yes', 'size':'small'},\n 'flags':{'label':'Options', 'type':'flags', 'flags':{'1':{'name':'Hidden'}}},\n 'live_end_dt':{'label':'Live Deadline', 'type':'datetime',\n 'visible':function() { return (M.ciniki_musicfestivals_main.festival.data.flags&0x08) == 0x08 ? 'yes' : 'no';},\n },\n 'virtual_end_dt':{'label':'Virtual Deadline', 'type':'datetime',\n 'visible':function() { return (M.ciniki_musicfestivals_main.festival.data.flags&0x0a) == 0x0a ? 'yes' : 'no';},\n },\n 'edit_end_dt':{'label':'Edit Titles Deadline', 'type':'datetime',\n 'visible':function() { return (M.ciniki_musicfestivals_main.festival.data.flags&0x0a) == 0x0a ? 'yes' : 'no';},\n },\n 'upload_end_dt':{'label':'Upload Deadline', 'type':'datetime',\n 'visible':function() { return (M.ciniki_musicfestivals_main.festival.data.flags&0x0a) == 0x0a ? 'yes' : 'no';},\n },\n }},\n '_tabs':{'label':'', 'type':'paneltabs', 'selected':'categories', 'tabs':{\n 'categories':{'label':'Categories', 'fn':'M.ciniki_musicfestivals_main.section.switchTab(\\'categories\\');'},\n 'synopsis':{'label':'Description', 'fn':'M.ciniki_musicfestivals_main.section.switchTab(\\'synopsis\\');'},\n }},\n '_synopsis':{'label':'Synopsis', \n 'visible':function() { return M.ciniki_musicfestivals_main.section.sections._tabs.selected == 'synopsis' ? 'yes' : 'hidden'; },\n 'fields':{'synopsis':{'label':'', 'hidelabel':'yes', 'type':'textarea', 'size':'small'}},\n },\n '_description':{'label':'Description', \n 'visible':function() { return M.ciniki_musicfestivals_main.section.sections._tabs.selected == 'synopsis' ? 'yes' : 'hidden'; },\n 'fields':{'description':{'label':'', 'hidelabel':'yes', 'type':'textarea'}},\n },\n 'categories':{'label':'Categories', 'type':'simplegrid', 'num_cols':1,\n 'visible':function() { return M.ciniki_musicfestivals_main.section.sections._tabs.selected == 'categories' ? 'yes' : 'hidden'; },\n 'addTxt':'Add Category',\n 'addFn':'M.ciniki_musicfestivals_main.section.openCategory(0);',\n },\n '_buttons':{'label':'', 'buttons':{\n 'syllabuspdf':{'label':'Download Syllabus (PDF)', 'fn':'M.ciniki_musicfestivals_main.section.downloadSyllabusPDF();'},\n 'save':{'label':'Save', 'fn':'M.ciniki_musicfestivals_main.section.save();'},\n 'delete':{'label':'Delete', \n 'visible':function() {return M.ciniki_musicfestivals_main.section.section_id > 0 ? 'yes' : 'no'; },\n 'fn':'M.ciniki_musicfestivals_main.section.remove();'},\n }},\n };\n this.section.fieldValue = function(s, i, d) { return this.data[i]; }\n this.section.fieldHistoryArgs = function(s, i) {\n return {'method':'ciniki.musicfestivals.sectionHistory', 'args':{'tnid':M.curTenantID, 'section_id':this.section_id, 'field':i}};\n }\n this.section.cellValue = function(s, i, j, d) {\n switch (j) {\n case 0: return d.name;\n }\n }\n this.section.rowFn = function(s, i, d) {\n return 'M.ciniki_musicfestivals_main.section.openCategory(\\'' + d.id + '\\');';\n }\n this.section.openCategory = function(cid) {\n this.save(\"M.ciniki_musicfestivals_main.category.open('M.ciniki_musicfestivals_main.section.open();', '\" + cid + \"', this.section_id, this.festival_id, this.nplists.categories);\");\n }\n this.section.switchTab = function(tab) {\n this.sections._tabs.selected = tab;\n this.refresh();\n this.show();\n }\n this.section.downloadSyllabusPDF = function() {\n M.api.openPDF('ciniki.musicfestivals.festivalSyllabusPDF', {'tnid':M.curTenantID, 'festival_id':this.festival_id, 'section_id':this.section_id});\n }\n this.section.open = function(cb, sid, fid, list) {\n if( sid != null ) { this.section_id = sid; }\n if( fid != null ) { this.festival_id = fid; }\n if( list != null ) { this.nplist = list; }\n M.api.getJSONCb('ciniki.musicfestivals.sectionGet', {'tnid':M.curTenantID, 'section_id':this.section_id, 'festival_id':this.festival_id, 'categories':'yes'}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_musicfestivals_main.section;\n p.data = rsp.section;\n p.festival_id = rsp.section.festival_id;\n p.nplists = {};\n if( rsp.nplists != null ) {\n p.nplists = rsp.nplists;\n }\n p.refresh();\n p.show(cb);\n });\n }\n this.section.save = function(cb) {\n if( cb == null ) { cb = 'M.ciniki_musicfestivals_main.section.close();'; }\n if( !this.checkForm() ) { return false; }\n if( this.section_id > 0 ) {\n var c = this.serializeForm('no');\n if( c != '' ) {\n M.api.postJSONCb('ciniki.musicfestivals.sectionUpdate', {'tnid':M.curTenantID, 'section_id':this.section_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n eval(cb);\n });\n } else {\n eval(cb);\n }\n } else {\n var c = this.serializeForm('yes');\n M.api.postJSONCb('ciniki.musicfestivals.sectionAdd', {'tnid':M.curTenantID, 'festival_id':this.festival_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.section.section_id = rsp.id;\n eval(cb);\n });\n }\n }\n this.section.remove = function() {\n M.confirm('Are you sure you want to remove section?',null,function() {\n M.api.getJSONCb('ciniki.musicfestivals.sectionDelete', {'tnid':M.curTenantID, 'section_id':M.ciniki_musicfestivals_main.section.section_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.section.close();\n });\n });\n }\n this.section.nextButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.section_id) < (this.nplist.length - 1) ) {\n return 'M.ciniki_musicfestivals_main.section.save(\\'M.ciniki_musicfestivals_main.section.open(null,' + this.nplist[this.nplist.indexOf('' + this.section_id) + 1] + ');\\');';\n }\n return null;\n }\n this.section.prevButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.section_id) > 0 ) {\n return 'M.ciniki_musicfestivals_main.section.save(\\'M.ciniki_musicfestivals_main.section.open(null,' + this.nplist[this.nplist.indexOf('' + this.section_id) - 1] + ');\\');';\n }\n return null;\n }\n this.section.addButton('save', 'Save', 'M.ciniki_musicfestivals_main.section.save();');\n this.section.addClose('Cancel');\n this.section.addButton('next', 'Next');\n this.section.addLeftButton('prev', 'Prev');\n\n //\n // The panel to edit Section Classes\n //\n this.classes = new M.panel('Section', 'ciniki_musicfestivals_main', 'classes', 'mc', 'full', 'sectioned', 'ciniki.musicfestivals.main.classes');\n this.classes.data = null;\n this.classes.festival_id = 0;\n this.classes.section_id = 0;\n this.classes.nplists = {};\n this.classes.nplist = [];\n this.classes.sections = {\n '_tabs':{'label':'', 'type':'paneltabs', 'selected':'fees', \n 'visible':function() { return M.modFlagSet('ciniki.musicfestivals', 0x40); },\n 'tabs':{\n 'fees':{'label':'Fees', 'fn':'M.ciniki_musicfestivals_main.classes.switchTab(\"fees\");'},\n 'trophies':{'label':'Trophies', 'fn':'M.ciniki_musicfestivals_main.classes.switchTab(\"trophies\");'},\n }},\n 'classes':{'label':'Classes', 'type':'simplegrid', 'num_cols':7,\n 'headerValues':['Order', 'Category', 'Code', 'Class', 'Levels', 'Earlybird', 'Live', 'Virtual'],\n 'sortable':'yes',\n 'sortTypes':['text', 'text', 'text', 'text', 'number', 'number', 'number'],\n 'dataMaps':['joined_sequence', 'category_name', 'code', 'class_name', 'level', 'earlybird_fee', 'fee', 'virtual_fee'],\n },\n/* '_buttons':{'label':'', 'halfsize':'yes', 'buttons':{\n 'syllabuspdf':{'label':'Download Syllabus (PDF)', 'fn':'M.ciniki_musicfestivals_main.section.downloadSyllabusPDF();'},\n 'save':{'label':'Save', 'fn':'M.ciniki_musicfestivals_main.section.save();'},\n 'delete':{'label':'Delete', \n 'visible':function() {return M.ciniki_musicfestivals_main.section.section_id > 0 ? 'yes' : 'no'; },\n 'fn':'M.ciniki_musicfestivals_main.section.remove();'},\n }}, */\n };\n this.classes.switchTab = function(t) {\n this.sections._tabs.selected = t;\n this.open();\n }\n this.classes.cellValue = function(s, i, j, d) {\n if( this.sections.classes.dataMaps[j] != null ) {\n if( this.sections.classes.dataMaps[j].match(/fee/) ) {\n return M.formatDollar(d[this.sections.classes.dataMaps[j]]);\n }\n if( this.sections.classes.dataMaps[j] == 'num_registrations' && d[this.sections.classes.dataMaps[j]] == 0 ) {\n return '';\n }\n return d[this.sections.classes.dataMaps[j]];\n }\n }\n this.classes.rowFn = function(s, i, d) {\n return 'M.ciniki_musicfestivals_main.class.open(\\'M.ciniki_musicfestivals_main.classes.open();\\',\\'' + d.id + '\\',\\'' + d.category_id + '\\',\\'' + this.festival_id + '\\',M.ciniki_musicfestivals_main.classes.nplists.classes);';\n }\n this.classes.downloadSyllabusPDF = function() {\n M.api.openPDF('ciniki.musicfestivals.festivalSyllabusPDF', {'tnid':M.curTenantID, 'festival_id':this.festival_id, 'section_id':this.section_id});\n }\n this.classes.open = function(cb, sid, fid, list) {\n if( sid != null ) { this.section_id = sid; }\n if( fid != null ) { this.festival_id = fid; }\n if( list != null ) { this.nplist = list; }\n M.api.getJSONCb('ciniki.musicfestivals.sectionClasses', {'tnid':M.curTenantID, 'section_id':this.section_id, 'festival_id':this.festival_id, 'list':this.sections._tabs.selected}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_musicfestivals_main.classes;\n p.data = rsp;\n p.sections.classes.headerValues = ['Order', 'Category', 'Code', 'Class'];\n p.sections.classes.sortTypes = ['text', 'text', 'text', 'text'];\n p.sections.classes.dataMaps = ['joined_sequence', 'category_name', 'code', 'class_name'];\n if( p.sections._tabs.selected == 'trophies' ) {\n p.sections.classes.headerValues.push('Trophies');\n p.sections.classes.sortTypes.push('text');\n p.sections.classes.dataMaps.push('trophies');\n } else {\n if( M.modFlagOn('ciniki.musicfestivals', 0x1000) ) {\n p.sections.classes.headerValues.push('Levels');\n p.sections.classes.sortTypes.push('text');\n p.sections.classes.dataMaps.push('levels');\n }\n p.sections.classes.headerValues.push('Earlybird');\n p.sections.classes.sortTypes.push('number');\n p.sections.classes.dataMaps.push('earlybird_fee');\n p.sections.classes.headerValues.push('Fee');\n p.sections.classes.sortTypes.push('number');\n p.sections.classes.dataMaps.push('fee');\n if( (rsp.festival.flags&0x04) == 0x04 ) {\n p.sections.classes.headerValues.push('Virtual');\n p.sections.classes.sortTypes.push('number');\n p.sections.classes.dataMaps.push('virtual_fee');\n }\n if( M.modFlagOn('ciniki.musicfestivals', 0x0800) ) {\n p.sections.classes.headerValues.push('Earlybird Plus');\n p.sections.classes.sortTypes.push('number');\n p.sections.classes.dataMaps.push('earlybird_plus_fee');\n p.sections.classes.headerValues.push('Plus');\n p.sections.classes.sortTypes.push('number');\n p.sections.classes.dataMaps.push('plus_fee');\n }\n p.sections.classes.headerValues.push('Registrations');\n p.sections.classes.sortTypes.push('number');\n p.sections.classes.dataMaps.push('num_registrations');\n p.sections.classes.num_cols = p.sections.classes.headerValues.length;\n }\n\n p.festival_id = rsp.section.festival_id;\n p.sections.classes.label = rsp.section.name + ' - Classes';\n p.nplists = {};\n if( rsp.nplists != null ) {\n p.nplists = rsp.nplists;\n }\n p.refresh();\n p.show(cb);\n });\n }\n this.classes.nextButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.section_id) < (this.nplist.length - 1) ) {\n return 'M.ciniki_musicfestivals_main.classes.open(null,' + this.nplist[this.nplist.indexOf('' + this.section_id) + 1] + ');';\n }\n return null;\n }\n this.classes.prevButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.section_id) > 0 ) {\n return 'M.ciniki_musicfestivals_main.classes.open(null,' + this.nplist[this.nplist.indexOf('' + this.section_id) - 1] + ');';\n }\n return null;\n }\n this.classes.addButton('save', 'Save', 'M.ciniki_musicfestivals_main.section.save();');\n this.classes.addClose('Cancel');\n this.classes.addButton('next', 'Next');\n this.classes.addLeftButton('prev', 'Prev');\n\n //\n // The panel to edit Category\n //\n this.category = new M.panel('Category', 'ciniki_musicfestivals_main', 'category', 'mc', 'medium mediumaside', 'sectioned', 'ciniki.musicfestivals.main.category');\n this.category.data = null;\n this.category.category_id = 0;\n this.category.nplists = {};\n this.category.nplist = [];\n this.category.sections = {\n '_primary_image_id':{'label':'Image', 'type':'imageform', 'aside':'yes', 'fields':{\n 'primary_image_id':{'label':'', 'type':'image_id', 'hidelabel':'yes', 'controls':'all', 'history':'no',\n 'addDropImage':function(iid) {\n M.ciniki_musicfestivals_main.category.setFieldValue('primary_image_id', iid);\n return true;\n },\n 'addDropImageRefresh':'',\n 'deleteImage':function(fid) {\n M.ciniki_musicfestivals_main.category.setFieldValue(fid,0);\n return true;\n },\n },\n }},\n 'general':{'label':'', 'aside':'yes', 'fields':{\n 'section_id':{'label':'Section', 'type':'select', 'complex_options':{'value':'id', 'name':'name'}, 'options':{}},\n 'name':{'label':'Name', 'required':'yes', 'type':'text'},\n 'sequence':{'label':'Order', 'required':'yes', 'type':'text'},\n }},\n '_tabs':{'label':'', 'type':'paneltabs', 'selected':'classes', 'tabs':{\n 'classes':{'label':'Classes', 'fn':'M.ciniki_musicfestivals_main.category.switchTab(\\'classes\\');'},\n 'synopsis':{'label':'Description', 'fn':'M.ciniki_musicfestivals_main.category.switchTab(\\'synopsis\\');'},\n }},\n '_synopsis':{'label':'Synopsis', \n 'visible':function() { return M.ciniki_musicfestivals_main.category.sections._tabs.selected == 'synopsis' ? 'yes' : 'hidden'; },\n 'fields':{'synopsis':{'label':'', 'hidelabel':'yes', 'type':'textarea', 'size':'small'}},\n },\n '_description':{'label':'Description', \n 'visible':function() { return M.ciniki_musicfestivals_main.category.sections._tabs.selected == 'synopsis' ? 'yes' : 'hidden'; },\n 'fields':{'description':{'label':'', 'hidelabel':'yes', 'type':'textarea'}},\n },\n 'classes':{'label':'Classes', 'type':'simplegrid', 'num_cols':5,\n 'visible':function() { return M.ciniki_musicfestivals_main.category.sections._tabs.selected == 'classes' ? 'yes' : 'hidden'; },\n 'headerValues':['Code', 'Name', 'Earlybird', 'Fee', 'Virtual'],\n 'addTxt':'Add Class',\n 'addFn':'M.ciniki_musicfestivals_main.category.openClass(0);',\n },\n '_buttons':{'label':'', 'buttons':{\n 'save':{'label':'Save', 'fn':'M.ciniki_musicfestivals_main.category.save();'},\n 'delete':{'label':'Delete', \n 'visible':function() {return M.ciniki_musicfestivals_main.category.category_id > 0 ? 'yes' : 'no'; },\n 'fn':'M.ciniki_musicfestivals_main.category.remove();'},\n }},\n };\n this.category.fieldValue = function(s, i, d) { return this.data[i]; }\n this.category.fieldHistoryArgs = function(s, i) {\n return {'method':'ciniki.musicfestivals.categoryHistory', 'args':{'tnid':M.curTenantID, 'category_id':this.category_id, 'field':i}};\n }\n this.category.cellValue = function(s, i, j, d) {\n switch (j) {\n case 0: return d.code;\n case 1: return d.name;\n case 2: return (d.earlybird_fee > 0 ? M.formatDollar(d.earlybird_fee) : '');\n case 3: return (d.fee > 0 ? M.formatDollar(d.fee) : '');\n case 4: return (d.virtual_fee > 0 ? M.formatDollar(d.virtual_fee) : '');\n }\n }\n this.category.rowFn = function(s, i, d) {\n return 'M.ciniki_musicfestivals_main.category.openClass(\\'' + d.id + '\\');';\n }\n this.category.openClass = function(cid) {\n this.save(\"M.ciniki_musicfestivals_main.class.open('M.ciniki_musicfestivals_main.category.open();','\" + cid + \"', this.category_id, this.festival_id, this.nplists.classes);\");\n }\n this.category.switchTab = function(tab) {\n this.sections._tabs.selected = tab;\n this.refresh();\n this.show();\n }\n this.category.open = function(cb, cid, sid,fid,list) {\n if( cid != null ) { this.category_id = cid; }\n if( sid != null ) { this.section_id = sid; }\n if( fid != null ) { this.festival_id = fid; }\n if( list != null ) { this.nplist = list; }\n M.api.getJSONCb('ciniki.musicfestivals.categoryGet', {'tnid':M.curTenantID, \n 'category_id':this.category_id, 'festival_id':this.festival_id, 'section_id':this.section_id,\n 'sections':'yes', 'classes':'yes'}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_musicfestivals_main.category;\n p.data = rsp.category;\n p.nplists = {};\n if( rsp.nplists != null ) {\n p.nplists = rsp.nplists;\n }\n p.sections.general.fields.section_id.options = rsp.sections;\n if( M.ciniki_musicfestivals_main.festival.data.flags != null \n && (M.ciniki_musicfestivals_main.festival.data.flags&0x04) == 0x04 \n ) {\n p.sections.classes.num_cols = 5;\n } else {\n p.sections.classes.num_cols = 4;\n }\n\n p.refresh();\n p.show(cb);\n });\n }\n this.category.save = function(cb) {\n if( cb == null ) { cb = 'M.ciniki_musicfestivals_main.category.close();'; }\n if( !this.checkForm() ) { return false; }\n if( this.category_id > 0 ) {\n var c = this.serializeForm('no');\n if( c != '' ) {\n M.api.postJSONCb('ciniki.musicfestivals.categoryUpdate', {'tnid':M.curTenantID, 'category_id':this.category_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n eval(cb);\n });\n } else {\n eval(cb);\n }\n } else {\n var c = this.serializeForm('yes');\n M.api.postJSONCb('ciniki.musicfestivals.categoryAdd', {'tnid':M.curTenantID, 'festival_id':this.festival_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.category.category_id = rsp.id;\n eval(cb);\n });\n }\n }\n this.category.remove = function() {\n M.confirm('Are you sure you want to remove category?',null,function() {\n M.api.getJSONCb('ciniki.musicfestivals.categoryDelete', {'tnid':M.curTenantID, 'category_id':M.ciniki_musicfestivals_main.category.category_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.category.close();\n });\n });\n }\n this.category.nextButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.category_id) < (this.nplist.length - 1) ) {\n return 'M.ciniki_musicfestivals_main.category.save(\\'M.ciniki_musicfestivals_main.category.open(null,' + this.nplist[this.nplist.indexOf('' + this.category_id) + 1] + ');\\');';\n }\n return null;\n }\n this.category.prevButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.category_id) > 0 ) {\n return 'M.ciniki_musicfestivals_main.category.save(\\'M.ciniki_musicfestivals_main.category.open(null,' + this.nplist[this.nplist.indexOf('' + this.category_id) - 1] + ');\\');';\n }\n return null;\n }\n this.category.addButton('save', 'Save', 'M.ciniki_musicfestivals_main.category.save();');\n this.category.addClose('Cancel');\n this.category.addButton('next', 'Next');\n this.category.addLeftButton('prev', 'Prev');\n\n //\n // The panel to edit Class\n //\n this.class = new M.panel('Class', 'ciniki_musicfestivals_main', 'class', 'mc', 'medium mediumaside', 'sectioned', 'ciniki.musicfestivals.main.class');\n this.class.data = null;\n this.class.festival_id = 0;\n this.class.class_id = 0;\n this.class.nplists = {};\n this.class.nplist = [];\n this.class.sections = {\n 'general':{'label':'', 'aside':'yes', 'fields':{\n 'category_id':{'label':'Category', 'type':'select', 'complex_options':{'value':'id', 'name':'name'}, 'options':{}},\n 'code':{'label':'Code', 'type':'text', 'size':'small'},\n 'name':{'label':'Name', 'type':'text'},\n// 'level':{'label':'Level', 'type':'text', 'livesearch':'yes', 'livesearchempty':'yes',\n// 'visible':function() {return M.modFlagSet('ciniki.musicfestivals', 0x1000); },\n// },\n 'levels':{'label':'Level', 'type':'tags', 'tags':[], 'hint':'Enter a new level:', 'sort':'no',\n 'visible':function() {return M.modFlagSet('ciniki.musicfestivals', 0x1000); },\n },\n 'sequence':{'label':'Order', 'type':'text'},\n 'earlybird_fee':{'label':'Earlybird Fee', 'type':'text', 'size':'small'},\n 'fee':{'label':'Fee', 'type':'text', 'size':'small'},\n 'virtual_fee':{'label':'Virtual Fee', 'type':'text', 'size':'small',\n 'visible':function() { \n if( M.ciniki_musicfestivals_main.festival.data.flags != null \n && (M.ciniki_musicfestivals_main.festival.data.flags&0x04) == 0x04 \n ) {\n return 'yes';\n }\n return 'no';\n },\n },\n 'earlybird_plus_fee':{'label':'Earlybird Plus Fee', 'type':'text', 'size':'small',\n 'visible':function() { return M.modFlagSet('ciniki.musicfestivals', 0x0800); },\n },\n 'plus_fee':{'label':'Plus Fee', 'type':'text', 'size':'small',\n 'visible':function() { return M.modFlagSet('ciniki.musicfestivals', 0x0800); },\n },\n }},\n// '_tags':{'label':'Tags', \n// 'visible':function() { return M.modFlagSet('ciniki.musicfestivals', 0x2000); },\n// 'fields':{\n// }},\n 'registration':{'label':'Registration Options', 'aside':'yes', 'fields':{\n 'flags1':{'label':'Online Registrations', 'type':'flagtoggle', 'default':'on', 'bit':0x01, 'field':'flags'},\n 'flags2':{'label':'Multiple/Registrant', 'type':'flagtoggle', 'default':'on', 'bit':0x02, 'field':'flags'},\n 'flags5':{'label':'2nd Competitor', 'type':'flagtoggle', 'default':'off', 'bit':0x10, 'field':'flags'},\n 'flags6':{'label':'3rd Competitor', 'type':'flagtoggle', 'default':'off', 'bit':0x20, 'field':'flags'},\n 'flags7':{'label':'4th Competitor', 'type':'flagtoggle', 'default':'off', 'bit':0x40, 'field':'flags'},\n 'flags13':{'label':'2nd Title & Time', 'type':'flagtoggle', 'default':'off', 'bit':0x1000, 'field':'flags'},\n 'flags14':{'label':'2nd Title & Time Optional', 'type':'flagtoggle', 'default':'off', 'bit':0x2000, 'field':'flags'},\n 'flags15':{'label':'3rd Title & Time', 'type':'flagtoggle', 'default':'off', 'bit':0x4000, 'field':'flags'},\n 'flags16':{'label':'3rd Title & Time Optional', 'type':'flagtoggle', 'default':'off', 'bit':0x8000, 'field':'flags'},\n }},\n 'registrations':{'label':'Registrations', 'type':'simplegrid', 'num_cols':3, \n 'headerValues':['Competitor', 'Teacher', 'Status'],\n 'noData':'No registrations',\n// 'addTxt':'Add Registration',\n// 'addFn':'M.ciniki_musicfestivals_main.registration.open(\\'M.ciniki_musicfestivals_main.festival.open();\\',0,0,M.ciniki_musicfestivals_main.class.class_id,M.ciniki_musicfestivals_main.festival.festival_id,null,\\'festival\\');',\n },\n 'trophies':{'label':'Trophies', 'type':'simplegrid', 'num_cols':3, \n 'headerValues':['Category', 'Name'],\n 'cellClasses':['', '', 'alignright'],\n 'noData':'No trophies',\n 'addTxt':'Add Trophy',\n 'addFn':'M.ciniki_musicfestivals_main.class.save(\"M.ciniki_musicfestivals_main.class.addTrophy();\");',\n },\n '_buttons':{'label':'', 'aside':'yes', 'buttons':{\n 'save':{'label':'Save', 'fn':'M.ciniki_musicfestivals_main.class.save();'},\n 'delete':{'label':'Delete', \n 'visible':function() {return M.ciniki_musicfestivals_main.class.class_id > 0 ? 'yes' : 'no'; },\n 'fn':'M.ciniki_musicfestivals_main.class.remove();'},\n }},\n };\n this.class.fieldValue = function(s, i, d) { return this.data[i]; }\n this.class.fieldHistoryArgs = function(s, i) {\n return {'method':'ciniki.musicfestivals.classHistory', 'args':{'tnid':M.curTenantID, 'class_id':this.class_id, 'field':i}};\n }\n this.class.cellValue = function(s, i, j, d) {\n if( s == 'registrations' ) {\n switch(j) {\n case 0: return d.display_name; // + M.subdue(' (',d.pronoun,')');\n case 1: return d.teacher_name;\n case 2: return d.status_text;\n }\n }\n if( s == 'trophies' ) {\n switch(j) {\n case 0: return d.category;\n case 1: return d.name;\n case 2: return '<button onclick=\"M.ciniki_musicfestivals_main.class.removeTrophy(\\'' + d.id + '\\');\">Remove</button>';\n }\n }\n }\n this.class.rowFn = function(s, i, d) {\n if( s == 'registrations' ) {\n return 'M.ciniki_musicfestivals_main.registration.open(\\'M.ciniki_musicfestivals_main.class.open();\\',\\'' + d.id + '\\',0,0,M.ciniki_musicfestivals_main.class.festival_id, null,\\'festival\\');';\n }\n return '';\n }\n this.class.addTrophy = function() {\n M.ciniki_musicfestivals_main.classtrophy.open('M.ciniki_musicfestivals_main.class.open();',this.class_id);\n }\n this.class.attachTrophy = function(i) {\n M.api.getJSONCb('ciniki.musicfestivals.classTrophyAdd', {'tnid':M.curTenantID, 'class_id':this.class_id, 'trophy_id':i}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.class.open();\n });\n }\n this.class.removeTrophy = function(i) {\n M.api.getJSONCb('ciniki.musicfestivals.classTrophyRemove', {'tnid':M.curTenantID, 'class_id':this.class_id, 'tc_id':i}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.class.open();\n });\n }\n/* this.class.liveSearchCb = function(s, i, value) {\n if( i == 'level' ) {\n M.api.getJSONBgCb('ciniki.musicfestivals.classFieldSearch', {'tnid':M.curTenantID, 'field':i, 'start_needle':value, 'festival_id':M.ciniki_musicfestivals_main.class.festival_id, 'limit':15}, \n function(rsp) {\n M.ciniki_musicfestivals_main.class.liveSearchShow(s, i, M.gE(M.ciniki_musicfestivals_main.class.panelUID + '_' + i), rsp.results); \n });\n }\n }\n this.class.liveSearchResultValue = function(s, f, i, j, d) {\n return d.name;\n }\n this.class.liveSearchResultRowFn = function(s, f, i, j, d) {\n if( f == 'level' ) {\n return 'M.ciniki_musicfestivals_main.class.updateField(\\'' + s + '\\',\\'' + f + '\\',\\'' + escape(d.name) + '\\');';\n }\n }\n this.class.updateField = function(s, f, r) {\n M.gE(this.panelUID + '_' + f).value = unescape(r);\n this.removeLiveSearch(s, f);\n } */\n this.class.open = function(cb, iid, cid, fid, list) {\n if( iid != null ) { this.class_id = iid; }\n if( cid != null ) { this.category_id = cid; }\n if( fid != null ) { this.festival_id = fid; }\n if( list != null ) { this.nplist = list; }\n M.api.getJSONCb('ciniki.musicfestivals.classGet', {'tnid':M.curTenantID, 'class_id':this.class_id, 'festival_id':this.festival_id, 'category_id':this.category_id, \n 'registrations':'yes', 'categories':'yes'}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_musicfestivals_main.class;\n p.data = rsp.class;\n p.nplists = {};\n if( rsp.nplists != null ) {\n p.nplists = rsp.nplists;\n }\n p.sections.general.fields.category_id.options = rsp.categories;\n p.sections.general.fields.levels.tags = [];\n if( rsp.levels != null ) {\n p.sections.general.fields.levels.tags = rsp.levels;\n }\n p.refresh();\n p.show(cb);\n });\n }\n this.class.save = function(cb) {\n if( cb == null ) { cb = 'M.ciniki_musicfestivals_main.class.close();'; }\n if( !this.checkForm() ) { return false; }\n if( this.class_id > 0 ) {\n var c = this.serializeForm('no');\n if( c != '' ) {\n M.api.postJSONCb('ciniki.musicfestivals.classUpdate', {'tnid':M.curTenantID, 'class_id':this.class_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n eval(cb);\n });\n } else {\n eval(cb);\n }\n } else {\n var c = this.serializeForm('yes');\n M.api.postJSONCb('ciniki.musicfestivals.classAdd', {'tnid':M.curTenantID, 'festival_id':this.festival_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.class.class_id = rsp.id;\n eval(cb);\n });\n }\n }\n this.class.remove = function() {\n M.confirm('Are you sure you want to remove class?',null,function() {\n M.api.getJSONCb('ciniki.musicfestivals.classDelete', {'tnid':M.curTenantID, 'class_id':M.ciniki_musicfestivals_main.class.class_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.class.close();\n });\n });\n }\n this.class.nextButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.class_id) < (this.nplist.length - 1) ) {\n return 'M.ciniki_musicfestivals_main.class.save(\\'M.ciniki_musicfestivals_main.class.open(null,' + this.nplist[this.nplist.indexOf('' + this.class_id) + 1] + ');\\');';\n }\n return null;\n }\n this.class.prevButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.class_id) > 0 ) {\n return 'M.ciniki_musicfestivals_main.class.save(\\'M.ciniki_musicfestivals_main.class.open(null,' + this.nplist[this.nplist.indexOf('' + this.class_id) - 1] + ');\\');';\n }\n return null;\n }\n this.class.addButton('save', 'Save', 'M.ciniki_musicfestivals_main.class.save();');\n this.class.addClose('Cancel');\n this.class.addButton('next', 'Next');\n this.class.addLeftButton('prev', 'Prev');\n\n //\n // This panel lets the user select a trophy to attach to a class\n //\n this.classtrophy = new M.panel('Select Trophy', 'ciniki_musicfestivals_main', 'classtrophy', 'mc', 'medium', 'sectioned', 'ciniki.musicfestivals.main.trophyclass');\n this.classtrophy.sections = {\n 'trophies':{'label':'Select Trophy', 'type':'simplegrid', 'num_cols':3,\n 'noData':'No trophies',\n },\n };\n this.classtrophy.cellValue = function(s, i, j, d) {\n if( s == 'trophies' ) {\n switch(j) {\n case 0: return d.category;\n case 1: return d.name;\n case 2: return '<button onclick=\"M.ciniki_musicfestivals_main.class.attachTrophy(\\'' + d.id + '\\');\">Add</button>';\n }\n }\n }\n this.classtrophy.open = function(cb, cid) {\n M.api.getJSONCb('ciniki.musicfestivals.trophyList', {'tnid':M.curTenantID, 'class_id':cid}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_musicfestivals_main.classtrophy;\n p.data = rsp;\n p.refresh();\n p.show(cb);\n });\n }\n this.classtrophy.addClose('Back');\n\n //\n // Registration\n //\n this.registration = new M.panel('Registration', 'ciniki_musicfestivals_main', 'registration', 'mc', 'medium mediumaside', 'sectioned', 'ciniki.musicfestivals.main.registration');\n this.registration.data = null;\n this.registration.festival_id = 0;\n this.registration.teacher_customer_id = 0;\n this.registration.competitor1_id = 0;\n this.registration.competitor2_id = 0;\n this.registration.competitor3_id = 0;\n this.registration.competitor4_id = 0;\n// this.registration.competitor5_id = 0;\n this.registration.registration_id = 0;\n this.registration.nplist = [];\n this.registration._source = '';\n this.registration.sections = {\n// '_tabs':{'label':'', 'type':'paneltabs', 'field_id':'rtype', 'selected':'30', 'tabs':{\n// '30':{'label':'Individual', 'fn':'M.ciniki_musicfestivals_main.registration.switchTab(\"30\");'},\n// '50':{'label':'Duet', 'fn':'M.ciniki_musicfestivals_main.registration.switchTab(\"50\");'},\n// '60':{'label':'Trio', 'fn':'M.ciniki_musicfestivals_main.registration.switchTab(\"60\");'},\n// '90':{'label':'Ensemble', 'fn':'M.ciniki_musicfestivals_main.registration.switchTab(\"90\");'},\n// }},\n 'teacher_details':{'label':'Teacher', 'type':'simplegrid', 'num_cols':2, 'aside':'yes',\n 'cellClasses':['label', ''],\n 'addTxt':'Edit',\n 'addFn':'M.startApp(\\'ciniki.customers.edit\\',null,\\'M.ciniki_musicfestivals_main.registration.updateTeacher();\\',\\'mc\\',{\\'next\\':\\'M.ciniki_musicfestivals_main.registration.updateTeacher\\',\\'customer_id\\':M.ciniki_musicfestivals_main.registration.teacher_customer_id});',\n 'changeTxt':'Change',\n 'changeFn':'M.startApp(\\'ciniki.customers.edit\\',null,\\'M.ciniki_musicfestivals_main.registration.updateTeacher();\\',\\'mc\\',{\\'next\\':\\'M.ciniki_musicfestivals_main.registration.updateTeacher\\',\\'customer_id\\':0});',\n },\n '_display_name':{'label':'Duet/Trio/Ensemble Name', 'aside':'yes',\n 'visible':'hidden',\n// 'visible':function(){return (parseInt(M.ciniki_musicfestivals_main.registration.sections._tabs.selected)>60?'yes':'hidden');},\n 'fields':{ \n 'display_name':{'label':'', 'hidelabel':'yes', 'type':'text'},\n }},\n 'competitor1_details':{'label':'Competitor 1', 'aside':'yes', 'type':'simplegrid', 'num_cols':2,\n 'cellClasses':['label', ''],\n 'addTxt':'',\n 'addFn':'M.ciniki_musicfestivals_main.registration.addCompetitor(M.ciniki_musicfestivals_main.registration.competitor1_id, 1);',\n 'changeTxt':'Add',\n 'changeFn':'M.ciniki_musicfestivals_main.registration.addCompetitor(0, 1);',\n },\n 'competitor2_details':{'label':'Competitor 2', 'aside':'yes', 'type':'simplegrid', 'num_cols':2,\n 'visible':'hidden',\n// 'visible':function(){return (parseInt(M.ciniki_musicfestivals_main.registration.sections._tabs.selected)>30?'yes':'hidden');},\n 'cellClasses':['label', ''],\n 'addTxt':'Edit',\n 'addFn':'M.ciniki_musicfestivals_main.registration.addCompetitor(M.ciniki_musicfestivals_main.registration.competitor1_id, 2);',\n 'changeTxt':'Change',\n 'changeFn':'M.ciniki_musicfestivals_main.registration.addCompetitor(0, 2);',\n },\n 'competitor3_details':{'label':'Competitor 3', 'aside':'yes', 'type':'simplegrid', 'num_cols':2,\n 'visible':'hidden',\n// 'visible':function(){return (parseInt(M.ciniki_musicfestivals_main.registration.sections._tabs.selected)>50?'yes':'hidden');},\n 'cellClasses':['label', ''],\n 'addTxt':'Edit',\n 'addFn':'M.ciniki_musicfestivals_main.registration.addCompetitor(M.ciniki_musicfestivals_main.registration.competitor1_id, 3);',\n 'changeTxt':'Change',\n 'changeFn':'M.ciniki_musicfestivals_main.registration.addCompetitor(0, 3);',\n },\n 'competitor4_details':{'label':'Competitor 4', 'aside':'yes', 'type':'simplegrid', 'num_cols':2,\n 'visible':'hidden',\n// 'visible':function(){return (parseInt(M.ciniki_musicfestivals_main.registration.sections._tabs.selected)>60?'yes':'hidden');},\n 'cellClasses':['label', ''],\n 'addTxt':'Edit',\n 'addFn':'M.ciniki_musicfestivals_main.registration.addCompetitor(M.ciniki_musicfestivals_main.registration.competitor1_id, 4);',\n 'changeTxt':'Change',\n 'changeFn':'M.ciniki_musicfestivals_main.registration.addCompetitor(0, 4);',\n },\n/* 'competitor5_details':{'label':'Competitor 5', 'aside':'yes', 'type':'simplegrid', 'num_cols':2,\n 'visible':function(){return (parseInt(M.ciniki_musicfestivals_main.registration.sections._tabs.selected)>60?'yes':'hidden');},\n 'cellClasses':['label', ''],\n 'addTxt':'Edit',\n 'addFn':'M.ciniki_musicfestivals_main.registration.addCompetitor(M.ciniki_musicfestivals_main.registration.competitor1_id, 5);',\n 'changeTxt':'Change',\n 'changeFn':'M.ciniki_musicfestivals_main.registration.addCompetitor(0, 5);',\n }, */\n 'invoice_details':{'label':'Invoice', 'type':'simplegrid', 'num_cols':2,\n 'cellClasses':['label', ''],\n },\n '_class':{'label':'Registration', 'fields':{\n// 'status':{'label':'Status', 'required':'yes', 'type':'toggle', 'toggles':{'5':'Draft', '10':'Applied', '50':'Paid', '60':'Cancelled'}},\n// 'payment_type':{'label':'Payment', 'type':'toggle', 'toggles':{'20':'Square', '50':'Visa', '55':'Mastercard', '100':'Cash', '105':'Cheque', '110':'Email', '120':'Other', '121':'Online'}},\n 'class_id':{'label':'Class', 'required':'yes', 'type':'select', 'complex_options':{'value':'id', 'name':'name'}, 'options':{}, \n 'onchangeFn':'M.ciniki_musicfestivals_main.registration.updateForm',\n },\n 'title1':{'label':'Title', 'type':'text'},\n 'perf_time1':{'label':'Perf Time', 'type':'minsec', 'size':'small'},\n 'title2':{'label':'2nd Title', 'type':'text',\n 'visible':'no',\n },\n 'perf_time2':{'label':'2nd Time', 'type':'minsec', 'max_minutes':30, 'second_interval':5, 'size':'small',\n 'visible':'no',\n },\n 'title3':{'label':'3rd Title', 'type':'text',\n 'visible':'no',\n },\n 'perf_time3':{'label':'3rd Time', 'type':'minsec', 'size':'small',\n 'visible':'no',\n },\n 'fee':{'label':'Fee', 'type':'text', 'size':'small'},\n 'participation':{'label':'Participate', 'type':'select', \n 'visible':function() { return (M.ciniki_musicfestivals_main.registration.data.festival.flags&0x12) > 0 ? 'yes' : 'no'},\n 'onchangeFn':'M.ciniki_musicfestivals_main.registration.updateForm',\n 'options':{\n '0':'in person on a date to be scheduled',\n '1':'virtually and submit a video online',\n }},\n 'video_url1':{'label':'1st Video', 'type':'text', \n 'visible':'no',\n },\n 'music_orgfilename1':{'label':'1st Music', 'type':'file',\n 'visible':'no',\n 'deleteFn':'M.ciniki_musicfestivals_main.registration.downloadMusic(1);',\n },\n 'video_url2':{'label':'2nd Video', 'type':'text', \n 'visible':'no',\n },\n 'music_orgfilename2':{'label':'2nd Music', 'type':'file',\n 'visible':'no',\n 'deleteFn':'M.ciniki_musicfestivals_main.registration.downloadMusic(2);',\n },\n 'video_url3':{'label':'3rd Video', 'type':'text', \n 'visible':'no',\n },\n 'music_orgfilename3':{'label':'3rd Music', 'type':'file',\n 'visible':'no',\n 'deleteFn':'M.ciniki_musicfestivals_main.registration.downloadMusic(3);',\n },\n 'placement':{'label':'Placement', 'type':'text',\n 'visible':function() { return M.modFlagSet('ciniki.musicfestivals', 0x08); },\n },\n }},\n '_tags':{'label':'Tags', \n 'visible':function() { return M.modFlagSet('ciniki.musicfestivals', 0x2000); },\n 'fields':{\n 'tags':{'label':'', 'hidelabel':'yes', 'type':'tags', 'tags':[], 'hint':'Enter a new tag:'},\n }},\n/* 'music_buttons':{'label':'', \n 'visible':function() { return (M.ciniki_musicfestivals_main.registration.data.festival.flags&0x02) == 0x02 ? 'yes' : 'no'},\n 'buttons':{\n 'add':{'label':'Upload Music PDF', 'fn':'M.ciniki_musicfestivals_main.registration.uploadPDF();',\n 'visible':function() { return M.ciniki_musicfestivals_main.registration.data.music_orgfilename == '' ? 'yes' : 'no'},\n },\n 'upload':{'label':'Replace Music PDF', 'fn':'M.ciniki_musicfestivals_main.registration.uploadPDF();',\n 'visible':function() { return M.ciniki_musicfestivals_main.registration.data.music_orgfilename != '' ? 'yes' : 'no'},\n },\n 'download':{'label':'Download PDF', 'fn':'M.ciniki_musicfestivals_main.registration.downloadPDF();',\n 'visible':function() { return M.ciniki_musicfestivals_main.registration.data.music_orgfilename != '' ? 'yes' : 'no'},\n },\n }}, */\n '_notes':{'label':'Registration Notes', 'fields':{\n 'notes':{'label':'', 'hidelabel':'yes', 'type':'textarea'},\n }},\n '_internal_notes':{'label':'Internal Admin Notes', 'fields':{\n 'internal_notes':{'label':'', 'hidelabel':'yes', 'type':'textarea'},\n }},\n '_buttons':{'label':'', 'buttons':{\n 'save':{'label':'Save', 'fn':'M.ciniki_musicfestivals_main.registration.save();'},\n 'printcert':{'label':'Download Certificate PDF', \n 'visible':function() {return M.ciniki_musicfestivals_main.registration.registration_id > 0 ? 'yes' : 'no'; },\n 'fn':'M.ciniki_musicfestivals_main.registration.printCert();'},\n 'printcomments':{'label':'Download Comments PDF', \n 'visible':function() {return M.ciniki_musicfestivals_main.registration.registration_id > 0 ? 'yes' : 'no'; },\n 'fn':'M.ciniki_musicfestivals_main.registration.printComments();'},\n 'delete':{'label':'Delete', \n 'visible':function() {return M.ciniki_musicfestivals_main.registration.registration_id > 0 ? 'yes' : 'no'; },\n 'fn':'M.ciniki_musicfestivals_main.registration.remove();'},\n }},\n };\n this.registration.fieldValue = function(s, i, d) { \n// if( i == 'music_orgfilename' ) {\n// if( this.data[i] == '' ) {\n// return '<button>Upload</button>';\n// } else {\n// return this.data[i] + ' <button>Upload</button>';\n// }\n// }\n return this.data[i]; \n }\n this.registration.fieldHistoryArgs = function(s, i) {\n return {'method':'ciniki.musicfestivals.registrationHistory', 'args':{'tnid':M.curTenantID, 'registration_id':this.registration_id, 'field':i}};\n }\n this.registration.cellValue = function(s, i, j, d) {\n if( s == 'competitor1_details' || s == 'competitor2_details' || s == 'competitor3_details' || s == 'competitor4_details' ) {\n switch(j) {\n case 0 : return d.label;\n case 1 : \n if( d.label == 'Email' ) {\n return M.linkEmail(d.value);\n } else if( d.label == 'Address' ) {\n return d.value.replace(/\\n/g, '<br/>');\n }\n return d.value;\n }\n }\n if( s == 'teacher_details' ) {\n switch(j) {\n case 0: return d.detail.label;\n case 1:\n if( d.detail.label == 'Email' ) {\n return M.linkEmail(d.detail.value);\n } else if( d.detail.label == 'Address' ) {\n return d.detail.value.replace(/\\n/g, '<br/>');\n }\n return d.detail.value;\n }\n }\n if( s == 'invoice_details' ) {\n switch(j) {\n case 0: return d.label;\n case 1: return d.value.replace(/\\n/, '<br/>');\n }\n }\n }\n this.registration.rowFn = function(s, i, d) {\n if( s == 'invoice_details' && this._source != 'invoice' && this._source != 'pos' ) {\n return 'M.startApp(\\'ciniki.sapos.invoice\\',null,\\'M.ciniki_musicfestivals_main.registration.open();\\',\\'mc\\',{\\'invoice_id\\':\\'' + this.data.invoice_id + '\\'});';\n }\n }\n this.registration.switchTab = function(t) {\n this.sections._tabs.selected = t;\n this.refreshSection('_tabs');\n this.showHideSection('_display_name');\n this.showHideSection('competitor2_details');\n this.showHideSection('competitor3_details');\n this.showHideSection('competitor4_details');\n// this.showHideSection('competitor5_details');\n }\n this.registration.updateForm = function(s, i, cf) {\n var festival = this.data.festival;\n var cid = this.formValue('class_id');\n var participation = this.formValue('participation');\n for(var i in this.classes) {\n if( this.classes[i].id == cid ) {\n var c = this.classes[i];\n if( cf == null ) {\n if( (festival.flags&0x10) == 0x10 && participation == 2 && c.earlybird_plus_fee > 0 ) {\n this.setFieldValue('fee', c.earlybird_plus_fee);\n } else if( (festival.flags&0x10) == 0x10 && participation == 2 && c.plus_fee > 0 ) {\n this.setFieldValue('fee', c.plus_fee);\n } else if( (festival.flags&0x04) == 0x04 && participation == 1 ) {\n this.setFieldValue('fee', c.virtual_fee);\n } else if( festival.earlybird == 'yes' && c.earlybird_fee > 0 ) {\n this.setFieldValue('fee', c.earlybird_fee);\n } else {\n this.setFieldValue('fee', c.fee);\n }\n }\n\n this.sections._class.fields.title2.visible = (c.flags&0x1000) == 0x1000 ? 'yes' : 'no';\n this.sections._class.fields.perf_time2.visible = (c.flags&0x1000) == 0x1000 ? 'yes' : 'no';\n this.sections._class.fields.title3.visible = (c.flags&0x4000) == 0x4000 ? 'yes' : 'no';\n this.sections._class.fields.perf_time3.visible = (c.flags&0x4000) == 0x4000 ? 'yes' : 'no';\n this.sections._class.fields.video_url1.visible = (participation == 1 ? 'yes' : 'no');\n this.sections._class.fields.video_url2.visible = (participation == 1 && (c.flags&0x1000) == 0x1000 ? 'yes' : 'no');\n this.sections._class.fields.video_url3.visible = (participation == 1 && (c.flags&0x4000) == 0x4000 ? 'yes' : 'no');\n this.sections._class.fields.music_orgfilename1.visible = (participation == 1 ? 'yes' : 'no');\n this.sections._class.fields.music_orgfilename2.visible = (participation == 1 && (c.flags&0x1000) == 0x1000 ? 'yes' : 'no');\n this.sections._class.fields.music_orgfilename3.visible = (participation == 1 && (c.flags&0x4000) == 0x4000 ? 'yes' : 'no');\n\n this.sections._display_name.visible = (c.flags&0x70) > 0 ? 'yes' : 'hidden';\n this.sections.competitor2_details.visible = (c.flags&0x10) == 0x10 ? 'yes' : 'hidden';\n this.sections.competitor3_details.visible = (c.flags&0x20) == 0x20 ? 'yes' : 'hidden';\n this.sections.competitor4_details.visible = (c.flags&0x40) == 0x40 ? 'yes' : 'hidden';\n this.showHideSection('competitor2_details');\n this.showHideSection('competitor3_details');\n this.showHideSection('competitor4_details');\n this.showHideSection('_display_name');\n this.showHideFormField('_class', 'title2');\n this.showHideFormField('_class', 'perf_time2');\n this.showHideFormField('_class', 'title3');\n this.showHideFormField('_class', 'perf_time3');\n this.showHideFormField('_class', 'video_url1');\n this.showHideFormField('_class', 'video_url2');\n this.showHideFormField('_class', 'video_url3');\n this.showHideFormField('_class', 'music_orgfilename1');\n this.showHideFormField('_class', 'music_orgfilename2');\n this.showHideFormField('_class', 'music_orgfilename3');\n }\n }\n }\n this.registration.addCompetitor = function(cid,c) {\n this.save(\"M.ciniki_musicfestivals_main.competitor.open('M.ciniki_musicfestivals_main.registration.updateCompetitor(\" + c + \");',\" + cid + \",\" + this.festival_id + \",null,M.ciniki_musicfestivals_main.registration.data.billing_customer_id);\");\n }\n this.registration.updateCompetitor = function(c) {\n var p = M.ciniki_musicfestivals_main.competitor;\n if( this['competitor' + c + '_id'] != p.competitor_id ) {\n this['competitor' + c + '_id'] = p.competitor_id;\n this.save(\"M.ciniki_musicfestivals_main.registration.open();\");\n } else { \n this.open();\n }\n/*\n M.api.getJSONCb('ciniki.musicfestivals.competitorGet', {'tnid':M.curTenantID, 'competitor_id':this['competitor'+c+'_id']}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_musicfestivals_main.registration;\n p.data['competitor'+c+'_details'] = rsp.details;\n if( p['competitor' + c + '_id'] == 0 ) {\n p.sections['competitor'+c+'_details'].addTxt = '';\n p.sections['competitor'+c+'_details'].changeTxt = 'Add';\n } else {\n p.sections['competitor'+c+'_details'].addTxt = 'Edit';\n p.sections['competitor'+c+'_details'].changeTxt = 'Change';\n }\n p.refreshSection('competitor'+c+'_details');\n p.show();\n }); */\n }\n this.registration.updateTeacher = function(cid) {\n if( cid != null ) { \n this.teacher_customer_id = cid;\n if( this.teacher_customer_id > 0 ) {\n M.api.getJSONCb('ciniki.customers.customerDetails', {'tnid':M.curTenantID, 'customer_id':this.teacher_customer_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_musicfestivals_main.registration;\n p.data.teacher_details = rsp.details;\n if( p.customer_id == 0 ) {\n p.sections.teacher_details.addTxt = '';\n p.sections.teacher_details.changeTxt = 'Add';\n } else {\n p.sections.teacher_details.addTxt = 'Edit';\n p.sections.teacher_details.changeTxt = 'Change';\n }\n p.refreshSection('teacher_details');\n p.show();\n });\n } else {\n this.data.teacher_details = [];\n this.sections.teacher_details.addTxt = '';\n this.sections.teacher_details.changeTxt = 'Add';\n this.refreshSection('teacher_details');\n this.show();\n }\n } else {\n this.show();\n }\n }\n this.registration.printCert = function() {\n M.api.openFile('ciniki.musicfestivals.registrationCertificatesPDF', {'tnid':M.curTenantID, 'festival_id':this.festival_id, 'registration_id':this.registration_id});\n }\n this.registration.printComments = function() {\n M.api.openFile('ciniki.musicfestivals.registrationCommentsPDF', {'tnid':M.curTenantID, 'festival_id':this.festival_id, 'registration_id':this.registration_id});\n }\n/* this.registration.uploadPDF = function() {\n if( this.upload == null ) {\n this.upload = M.aE('input', this.panelUID + '_music_orgfilename_upload', 'image_uploader');\n this.upload.setAttribute('name', 'music_orgfilename');\n this.upload.setAttribute('type', 'file');\n this.upload.setAttribute('onchange', this.panelRef + '.uploadFile();');\n }\n this.upload.value = '';\n this.upload.click();\n }\n this.registration.uploadFile = function() {\n var f = this.upload;\n M.api.postJSONFile('ciniki.musicfestivals.registrationMusicAdd', \n {'tnid':M.curTenantID, 'festival_id':this.festival_id, 'registration_id':this.registration_id}, \n f.files[0], \n function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_musicfestivals_main.registration;\n p.data.music_orgfilename = rsp.registration.music_orgfilename;\n// p.refreshSection('music_buttons');\n p.setFieldValue('music_orgfilename', rsp.registration.music_orgfilename);\n });\n } */\n this.registration.downloadMusic = function(i) {\n M.api.openFile('ciniki.musicfestivals.registrationMusicPDF',{'tnid':M.curTenantID, 'registration_id':this.registration_id, 'num':i});\n }\n// this.registration.downloadPDF = function() {\n// M.api.openFile('ciniki.musicfestivals.registrationMusicPDF',{'tnid':M.curTenantID, 'registration_id':this.registration_id});\n// }\n this.registration.open = function(cb, rid, tid, cid, fid, list, source) {\n if( rid != null ) { this.registration_id = rid; }\n if( tid != null ) { this.teacher_customer_id = tid; }\n if( fid != null ) { this.festival_id = fid; }\n if( cid != null ) { this.class_id = cid; }\n if( list != null ) { this.nplist = list; }\n if( source != null ) { this._source = source; }\n M.api.getJSONCb('ciniki.musicfestivals.registrationGet', {'tnid':M.curTenantID, 'registration_id':this.registration_id, \n 'teacher_customer_id':this.teacher_customer_id, 'festival_id':this.festival_id, 'class_id':this.class_id, \n }, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_musicfestivals_main.registration;\n p.data = rsp.registration;\n p.classes = rsp.classes;\n if( p.festival_id == 0 ) {\n p.festival_id = rsp.registration.festival_id;\n }\n// p.sections._tabs.selected = rsp.registration.rtype;\n p.sections._class.fields.class_id.options = rsp.classes;\n p.sections._class.fields.class_id.options.unshift({'id':0, 'name':''});\n p.teacher_customer_id = parseInt(rsp.registration.teacher_customer_id);\n if( p.teacher_customer_id == 0 ) {\n p.sections.teacher_details.addTxt = '';\n p.sections.teacher_details.changeTxt = 'Add';\n } else {\n p.sections.teacher_details.addTxt = 'Edit';\n p.sections.teacher_details.changeTxt = 'Change';\n }\n for(var i = 1; i<= 4; i++) {\n p['competitor' + i + '_id'] = parseInt(rsp.registration['competitor' + i + '_id']);\n if( p['competitor' + i + '_id'] == 0 ) {\n p.sections['competitor' + i + '_details'].addTxt = '';\n p.sections['competitor' + i + '_details'].changeTxt = 'Add';\n } else {\n p.sections['competitor' + i + '_details'].addTxt = 'Edit';\n p.sections['competitor' + i + '_details'].changeTxt = 'Change';\n }\n }\n if( (p.data.festival.flags&0x10) == 0x10 ) {\n p.sections._class.fields.participation.options = {\n '0':'Regular Adjudication',\n '2':'Adjudication Plus',\n };\n }\n else if( (p.data.festival.flags&0x02) == 0x02 ) {\n p.sections._class.fields.participation.options = {\n '0':'in person on a date to be scheduled',\n '1':'virtually and submit a video online',\n };\n if( p.data.festival['inperson-choice-msg'] != null && p.data.festival['inperson-choice-msg'] != '' ) {\n p.sections._class.fields.participation.options[0] = p.data.festival['inperson-choice-msg'];\n }\n if( p.data.festival['virtual-choice-msg'] != null && p.data.festival['virtual-choice-msg'] != '' ) {\n p.sections._class.fields.participation.options[1] = p.data.festival['virtual-choice-msg'];\n }\n }\n if( rsp.tags != null ) {\n p.sections._tags.fields.tags.tags = rsp.tags;\n }\n p.refresh();\n p.show(cb);\n p.updateForm(null,null,'no');\n });\n }\n this.registration.save = function(cb) {\n if( cb == null ) { cb = 'M.ciniki_musicfestivals_main.registration.close();'; }\n if( !this.checkForm() ) { return false; }\n if( this.formValue('class_id') == 0 ) {\n M.alert(\"You must select a class.\");\n return false;\n }\n// if( this.competitor1_id == 0 ) {\n// M.alert(\"You must have a competitor.\");\n// return false;\n// }\n if( this.registration_id > 0 ) {\n var c = this.serializeFormData('no');\n if( this.teacher_customer_id != this.data.teacher_customer_id ) {\n c.append('teacher_customer_id', this.teacher_customer_id);\n }\n if( this.competitor1_id != this.data.competitor1_id ) { c.append('competitor1_id', this.competitor1_id); }\n if( this.competitor2_id != this.data.competitor2_id ) { c.append('competitor2_id', this.competitor2_id); }\n if( this.competitor3_id != this.data.competitor3_id ) { c.append('competitor3_id', this.competitor3_id); }\n if( this.competitor4_id != this.data.competitor4_id ) { c.append('competitor4_id', this.competitor4_id); }\n// if( this.competitor5_id != this.data.competitor5_id ) { c.append('competitor5_id', this.competitor5_id); }\n if( c != '' ) {\n \n M.api.postJSONFormData('ciniki.musicfestivals.registrationUpdate', {'tnid':M.curTenantID, 'registration_id':this.registration_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n eval(cb);\n });\n } else {\n eval(cb);\n }\n } else {\n var c = this.serializeForm('yes');\n c += '&teacher_customer_id=' + this.teacher_customer_id;\n c += '&competitor1_id=' + this.competitor1_id;\n c += '&competitor2_id=' + this.competitor2_id;\n c += '&competitor3_id=' + this.competitor3_id;\n c += '&competitor4_id=' + this.competitor4_id;\n// c += '&competitor5_id=' + this.competitor5_id;\n M.api.postJSONCb('ciniki.musicfestivals.registrationAdd', {'tnid':M.curTenantID, 'festival_id':this.festival_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.registration.registration_id = rsp.id;\n eval(cb);\n });\n }\n }\n this.registration.remove = function() {\n var msg = 'Are you sure you want to remove this registration?';\n if( this.data.invoice_id > 0 && this.data.invoice_status >= 50 ) {\n msg = '**WARNING** Removing this registration will NOT remove the item from the Invoice. You will need make sure they have received a refund for the registration.';\n }\n M.confirm(msg,null,function() {\n M.api.getJSONCb('ciniki.musicfestivals.registrationDelete', {'tnid':M.curTenantID, 'registration_id':M.ciniki_musicfestivals_main.registration.registration_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.registration.close();\n });\n });\n }\n this.registration.nextButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.registration_id) < (this.nplist.length - 1) ) {\n return 'M.ciniki_musicfestivals_main.registration.save(\\'M.ciniki_musicfestivals_main.registration.open(null,' + this.nplist[this.nplist.indexOf('' + this.registration_id) + 1] + ');\\');';\n }\n return null;\n }\n this.registration.prevButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.registration_id) > 0 ) {\n return 'M.ciniki_musicfestivals_main.registration.save(\\'M.ciniki_musicfestivals_main.registration_id.open(null,' + this.nplist[this.nplist.indexOf('' + this.registration_id) - 1] + ');\\');';\n }\n return null;\n }\n this.registration.addButton('save', 'Save', 'M.ciniki_musicfestivals_main.registration.save();');\n this.registration.addClose('Cancel');\n this.registration.addButton('next', 'Next');\n this.registration.addLeftButton('prev', 'Prev');\n\n\n //\n // The panel to add/edit a competitor\n //\n this.competitor = new M.panel('Competitor', 'ciniki_musicfestivals_main', 'competitor', 'mc', 'medium mediumaside', 'sectioned', 'ciniki.musicfestivals.main.competitor');\n this.competitor.data = null;\n this.competitor.festival_id = 0;\n this.competitor.competitor_id = 0;\n this.competitor.billing_customer_id = 0;\n this.competitor.nplist = [];\n this.competitor.sections = {\n '_ctype':{'label':'', 'type':'paneltabs', 'selected':10, 'aside':'yes', 'tabs':{\n '10':{'label':'Individual', 'fn':'M.ciniki_musicfestivals_main.competitor.switchType(\"10\");'},\n '50':{'label':'Group/Ensemble', 'fn':'M.ciniki_musicfestivals_main.competitor.switchType(\"50\");'},\n }},\n 'general':{'label':'Competitor', 'aside':'yes', 'fields':{\n 'first':{'label':'First Name', 'required':'no', 'type':'text', 'livesearch':'yes', 'visible':'yes'},\n 'last':{'label':'Last Name', 'required':'no', 'type':'text', 'livesearch':'yes', 'visible':'yes'},\n 'name':{'label':'Name', 'required':'yes', 'type':'text', 'livesearch':'yes', 'visible':'hidden'},\n 'public_name':{'label':'Public Name', 'type':'text'},\n 'pronoun':{'label':'Pronoun', 'type':'text'},\n 'conductor':{'label':'Conductor', 'type':'text', 'visible':'no'},\n 'num_people':{'label':'# People', 'type':'number', 'size':'small', 'visible':'no'},\n 'parent':{'label':'Parent', 'type':'text', 'visible':'yes'},\n }},\n '_other':{'label':'', 'aside':'yes', 'fields':{\n 'age':{'label':'Age', 'type':'text'},\n 'study_level':{'label':'Study/Level', 'type':'text'},\n 'instrument':{'label':'Instrument', 'type':'text'},\n 'flags1':{'label':'Waiver', 'type':'flagtoggle', 'bit':0x01, 'field':'flags', 'toggles':{'':'Unsigned', 'signed':'Signed'}},\n }},\n '_tabs':{'label':'', 'type':'paneltabs', 'selected':'contact', 'visible':'yes',\n 'tabs':{\n 'contact':{'label':'Contact Info', 'fn':'M.ciniki_musicfestivals_main.competitor.switchTab(\"contact\");'},\n 'emails':{'label':'Emails', 'fn':'M.ciniki_musicfestivals_main.competitor.switchTab(\"emails\");'},\n 'registrations':{'label':'Registrations', 'fn':'M.ciniki_musicfestivals_main.competitor.switchTab(\"registrations\");'},\n }},\n '_address':{'label':'Contact Info', \n 'visible':function() { return M.ciniki_musicfestivals_main.competitor.sections._tabs.selected == 'contact' ? 'yes' : 'hidden';},\n 'fields':{\n 'address':{'label':'Address', 'type':'text'},\n 'city':{'label':'City', 'type':'text', 'size':'small'},\n 'province':{'label':'Province', 'type':'text', 'size':'small'},\n 'postal':{'label':'Postal Code', 'type':'text', 'size':'small'},\n 'country':{'label':'Country', 'type':'text', 'size':'small'},\n 'phone_home':{'label':'Home Phone', 'type':'text', 'size':'small'},\n 'phone_cell':{'label':'Cell Phone', 'type':'text', 'size':'small'},\n 'email':{'label':'Email', 'type':'text'},\n }},\n '_notes':{'label':'Competitor Notes', 'aside':'no', \n 'visible':function() { return M.ciniki_musicfestivals_main.competitor.sections._tabs.selected == 'contact' ? 'yes' : 'hidden';},\n 'fields':{\n 'notes':{'label':'', 'hidelabel':'yes', 'type':'textarea'},\n }},\n 'messages':{'label':'Draft Emails', 'type':'simplegrid', 'num_cols':2,\n 'visible':function() { return M.ciniki_musicfestivals_main.competitor.sections._tabs.selected == 'emails' ? 'yes' : 'hidden';},\n 'headerValues':['Status', 'Subject'],\n 'noData':'No drafts or scheduled emails',\n 'addTxt':'Send Email',\n 'addFn':'M.ciniki_musicfestivals_main.competitor.save(\"M.ciniki_musicfestivals_main.competitor.addmessage();\");',\n },\n 'emails':{'label':'Send Emails', 'type':'simplegrid', 'num_cols':2,\n 'visible':function() { return M.ciniki_musicfestivals_main.competitor.sections._tabs.selected == 'emails' ? 'yes' : 'hidden';},\n 'headerValues':['Date Sent', 'Subject'],\n 'noData':'No emails sent',\n },\n 'registrations':{'label':'Registrations', 'type':'simplegrid', 'num_cols':5,\n 'visible':function() { return M.ciniki_musicfestivals_main.competitor.sections._tabs.selected == 'registrations' ? 'yes' : 'hidden';},\n 'headerValues':['Category', 'Code', 'Class', 'Status'],\n 'noData':'No registrations',\n },\n '_buttons':{'label':'', 'buttons':{\n 'save':{'label':'Save', 'fn':'M.ciniki_musicfestivals_main.competitor.save();'},\n 'delete':{'label':'Delete', \n 'visible':function() {return M.ciniki_musicfestivals_main.competitor.competitor_id > 0 ? 'yes' : 'no'; },\n 'fn':'M.ciniki_musicfestivals_main.competitor.remove();'},\n }},\n };\n this.competitor.fieldValue = function(s, i, d) { return this.data[i]; }\n this.competitor.switchType = function(t) {\n this.sections._ctype.selected = t;\n if( t == 50 ) {\n this.sections.general.fields.first.visible = 'no';\n this.sections.general.fields.last.visible = 'no';\n this.sections.general.fields.name.visible = 'yes';\n this.sections.general.fields.public_name.visible = 'no';\n this.sections.general.fields.pronoun.visible = 'no';\n this.sections.general.fields.conductor.visible = 'yes';\n this.sections.general.fields.num_people.visible = 'yes';\n this.sections.general.fields.parent.label = 'Contact Person';\n } else {\n this.sections.general.fields.first.visible = 'yes';\n this.sections.general.fields.last.visible = 'yes';\n this.sections.general.fields.name.visible = 'no';\n this.sections.general.fields.public_name.visible = 'yes';\n this.sections.general.fields.pronoun.visible = M.modFlagSet('ciniki.musicfestivals', 0x80);\n this.sections.general.fields.conductor.visible = 'no';\n this.sections.general.fields.num_people.visible = 'no';\n this.sections.general.fields.parent.label = 'Parent';\n }\n this.showHideFormField('general', 'first');\n this.showHideFormField('general', 'last');\n this.showHideFormField('general', 'name');\n this.showHideFormField('general', 'public_name');\n this.showHideFormField('general', 'pronoun');\n this.showHideFormField('general', 'conductor');\n this.showHideFormField('general', 'num_people');\n this.showHideFormField('general', 'parent');\n this.refreshSections(['_ctype']);\n }\n this.competitor.switchTab = function(t) {\n this.sections._tabs.selected = t;\n this.refreshSections(['_tabs', '_address','_notes','messages', 'emails', 'registrations']);\n }\n this.competitor.fieldHistoryArgs = function(s, i) {\n return {'method':'ciniki.musicfestivals.competitorHistory', 'args':{'tnid':M.curTenantID, 'competitor_id':this.competitor_id, 'field':i}};\n }\n this.competitor.liveSearchCb = function(s, i, value) {\n if( i == 'name' || i == 'first' || i == 'last' ) {\n M.api.getJSONBgCb('ciniki.musicfestivals.competitorSearch', \n {'tnid':M.curTenantID, 'start_needle':value, 'limit':25}, function(rsp) { \n M.ciniki_musicfestivals_main.competitor.liveSearchShow(s, i, M.gE(M.ciniki_musicfestivals_main.competitor.panelUID + '_' + i), rsp.competitors); \n });\n }\n }\n this.competitor.liveSearchResultValue = function(s, f, i, j, d) {\n return d.name;\n }\n this.competitor.liveSearchResultRowFn = function(s, f, i, j, d) { \n return 'M.ciniki_musicfestivals_main.competitor.open(null,\\'' + d.id + '\\');';\n }\n this.competitor.cellValue = function(s, i, j, d) {\n if( s == 'messages' ) {\n switch(j) {\n case 0: return d.status_text;\n case 1: return d.subject;\n }\n }\n if( s == 'emails' ) {\n switch(j) {\n case 0: return (d.status != 30 ? d.status_text : d.date_sent);\n case 1: return d.subject;\n }\n }\n if( s == 'registrations' ) {\n switch(j) {\n case 0: return d.section_name + ' - ' + d.category_name;\n case 1: return d.class_code;\n case 2: return d.class_name;\n case 3: return d.status_text;\n }\n }\n }\n this.competitor.rowFn = function(s, i, d) {\n if( s == 'messages' ) {\n return 'M.ciniki_musicfestivals_main.competitor.save(\"M.ciniki_musicfestivals_main.message.open(\\'M.ciniki_musicfestivals_main.competitor.open();\\',\\'' + d.id + '\\');\");';\n }\n if( s == 'emails' ) {\n return 'M.startApp(\\'ciniki.mail.main\\',null,\\'M.ciniki_musicfestivals_main.competitor.reopen();\\',\\'mc\\',{\\'message_id\\':\\'' + d.id + '\\'});';\n }\n return '';\n }\n this.competitor.addmessage = function() {\n M.ciniki_musicfestivals_main.message.addnew('M.ciniki_musicfestivals_main.competitor.open();',this.festival_id,'ciniki.musicfestivals.competitor',this.competitor_id);\n }\n this.competitor.reopen = function() {\n this.show();\n }\n this.competitor.open = function(cb, cid, fid, list, bci) {\n if( cid != null ) { this.competitor_id = cid; }\n if( fid != null ) { this.festival_id = fid; }\n if( list != null ) { this.nplist = list; }\n if( bci != null ) { this.billing_customer_id = bci; }\n M.api.getJSONCb('ciniki.musicfestivals.competitorGet', {'tnid':M.curTenantID, 'festival_id':this.festival_id, 'competitor_id':this.competitor_id, 'emails':'yes', 'registrations':'yes'}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_musicfestivals_main.competitor;\n p.data = rsp.competitor;\n if( p.competitor_id == 0 ) {\n p.sections._tabs.selected = 'contact';\n p.sections._tabs.visible = 'no';\n } else {\n p.sections._tabs.visible = 'yes';\n }\n p.sections._ctype.selected = rsp.competitor.ctype;\n p.refresh();\n p.show(cb);\n p.switchType(p.sections._ctype.selected);\n });\n }\n this.competitor.save = function(cb) {\n if( cb == null ) { cb = 'M.ciniki_musicfestivals_main.competitor.close();'; }\n if( !this.checkForm() ) { return false; }\n if( this.competitor_id > 0 ) {\n var c = this.serializeForm('no');\n if( this.sections._ctype.selected != this.data.ctype ) {\n c += '&ctype=' + this.sections._ctype.selected;\n }\n if( c != '' ) {\n M.api.postJSONCb('ciniki.musicfestivals.competitorUpdate', {'tnid':M.curTenantID, 'festival_id':this.festival_id, 'competitor_id':this.competitor_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n eval(cb);\n });\n } else {\n eval(cb);\n }\n } else {\n var c = this.serializeForm('yes');\n c += '&ctype=' + this.sections._ctype.selected;\n M.api.postJSONCb('ciniki.musicfestivals.competitorAdd', {'tnid':M.curTenantID, 'festival_id':this.festival_id, 'billing_customer_id':this.billing_customer_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.competitor.competitor_name = rsp.name;\n M.ciniki_musicfestivals_main.competitor.competitor_id = rsp.id;\n eval(cb);\n });\n }\n }\n this.competitor.remove = function() {\n M.confirm('Are you sure you want to remove competitor?',null,function() {\n M.api.getJSONCb('ciniki.musicfestivals.competitorDelete', {'tnid':M.curTenantID, 'competitor_id':M.ciniki_musicfestivals_main.competitor.competitor_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.competitor.close();\n });\n });\n }\n this.competitor.nextButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.competitor_id) < (this.nplist.length - 1) ) {\n return 'M.ciniki_musicfestivals_main.competitor.save(\\'M.ciniki_musicfestivals_main.competitor.open(null,' + this.nplist[this.nplist.indexOf('' + this.competitor_id) + 1] + ');\\');';\n }\n return null;\n }\n this.competitor.prevButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.competitor_id) > 0 ) {\n return 'M.ciniki_musicfestivals_main.competitor.save(\\'M.ciniki_musicfestivals_main.competitor_id.open(null,' + this.nplist[this.nplist.indexOf('' + this.competitor_id) - 1] + ');\\');';\n }\n return null;\n }\n this.competitor.addButton('save', 'Save', 'M.ciniki_musicfestivals_main.competitor.save();');\n this.competitor.addClose('Cancel');\n this.competitor.addButton('next', 'Next');\n this.competitor.addLeftButton('prev', 'Prev');\n\n //\n // The panel to edit Schedule Section\n //\n this.schedulesection = new M.panel('Schedule Section', 'ciniki_musicfestivals_main', 'schedulesection', 'mc', 'medium', 'sectioned', 'ciniki.musicfestivals.main.schedulesection');\n this.schedulesection.data = null;\n this.schedulesection.festival_id = 0;\n this.schedulesection.schedulesection_id = 0;\n this.schedulesection.nplist = [];\n this.schedulesection.sections = {\n 'general':{'label':'', 'fields':{\n 'name':{'label':'Name', 'required':'yes', 'type':'text'},\n 'flags':{'label':'Options', 'type':'flags', 'flags':{\n '1':{'name':'Release Schedule'},\n '2':{'name':'Release Comments'},\n '3':{'name':'Release Certificates'},\n }},\n }},\n 'adjudicators':{'label':'Adjudicators', 'fields':{\n 'adjudicator1_id':{'label':'First', 'type':'select', 'complex_options':{'name':'name', 'value':'id'}, 'options':{}},\n 'adjudicator2_id':{'label':'Second', 'type':'select', 'complex_options':{'name':'name', 'value':'id'}, 'options':{}},\n 'adjudicator3_id':{'label':'Third', 'type':'select', 'complex_options':{'name':'name', 'value':'id'}, 'options':{}},\n }},\n '_buttons':{'label':'', 'buttons':{\n 'save':{'label':'Save', 'fn':'M.ciniki_musicfestivals_main.schedulesection.save();'},\n 'delete':{'label':'Delete', \n 'visible':function() {return M.ciniki_musicfestivals_main.schedulesection.schedulesection_id > 0 ? 'yes' : 'no'; },\n 'fn':'M.ciniki_musicfestivals_main.schedulesection.remove();'},\n }},\n };\n this.schedulesection.fieldValue = function(s, i, d) { return this.data[i]; }\n this.schedulesection.fieldHistoryArgs = function(s, i) {\n return {'method':'ciniki.musicfestivals.scheduleSectionHistory', 'args':{'tnid':M.curTenantID, 'schedulesection_id':this.schedulesection_id, 'field':i}};\n }\n this.schedulesection.downloadPDF = function(f,i,n) {\n M.api.openFile('ciniki.musicfestivals.schedulePDF',{'tnid':M.curTenantID, 'festival_id':f, 'schedulesection_id':i, 'names':n});\n }\n this.schedulesection.open = function(cb, sid, fid, list) {\n if( sid != null ) { this.schedulesection_id = sid; }\n if( fid != null ) { this.festival_id = fid; }\n if( list != null ) { this.nplist = list; }\n M.api.getJSONCb('ciniki.musicfestivals.scheduleSectionGet', \n {'tnid':M.curTenantID, 'schedulesection_id':this.schedulesection_id, 'festival_id':this.festival_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_musicfestivals_main.schedulesection;\n p.data = rsp.schedulesection;\n rsp.adjudicators.unshift({'id':'0', 'name':'None'});\n p.sections.adjudicators.fields.adjudicator1_id.options = rsp.adjudicators;\n p.sections.adjudicators.fields.adjudicator2_id.options = rsp.adjudicators;\n p.sections.adjudicators.fields.adjudicator3_id.options = rsp.adjudicators;\n p.refresh();\n p.show(cb);\n });\n }\n this.schedulesection.save = function(cb) {\n if( cb == null ) { cb = 'M.ciniki_musicfestivals_main.schedulesection.close();'; }\n if( !this.checkForm() ) { return false; }\n if( this.schedulesection_id > 0 ) {\n var c = this.serializeForm('no');\n if( c != '' ) {\n M.api.postJSONCb('ciniki.musicfestivals.scheduleSectionUpdate', \n {'tnid':M.curTenantID, 'schedulesection_id':this.schedulesection_id, 'festival_id':this.festival_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n eval(cb);\n });\n } else {\n eval(cb);\n }\n } else {\n var c = this.serializeForm('yes');\n M.api.postJSONCb('ciniki.musicfestivals.scheduleSectionAdd', {'tnid':M.curTenantID, 'festival_id':this.festival_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.schedulesection.schedulesection_id = rsp.id;\n eval(cb);\n });\n }\n }\n this.schedulesection.remove = function() {\n M.confirm('Are you sure you want to remove this section?',null,function() {\n M.api.getJSONCb('ciniki.musicfestivals.scheduleSectionDelete', {'tnid':M.curTenantID, 'schedulesection_id':M.ciniki_musicfestivals_main.schedulesection.schedulesection_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.schedulesection.close();\n });\n });\n }\n this.schedulesection.nextButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.schedulesection_id) < (this.nplist.length - 1) ) {\n return 'M.ciniki_musicfestivals_main.schedulesection.save(\\'M.ciniki_musicfestivals_main.schedulesection.open(null,' + this.nplist[this.nplist.indexOf('' + this.schedulesection_id) + 1] + ');\\');';\n }\n return null;\n }\n this.schedulesection.prevButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.schedulesection_id) > 0 ) {\n return 'M.ciniki_musicfestivals_main.schedulesection.save(\\'M.ciniki_musicfestivals_main.schedulesection_id.open(null,' + this.nplist[this.nplist.indexOf('' + this.schedulesection_id) - 1] + ');\\');';\n }\n return null;\n }\n this.schedulesection.addButton('save', 'Save', 'M.ciniki_musicfestivals_main.schedulesection.save();');\n this.schedulesection.addClose('Cancel');\n this.schedulesection.addButton('next', 'Next');\n this.schedulesection.addLeftButton('prev', 'Prev');\n\n //\n // The panel to edit Schedule Division\n //\n this.scheduledivision = new M.panel('Schedule Division', 'ciniki_musicfestivals_main', 'scheduledivision', 'mc', 'medium', 'sectioned', 'ciniki.musicfestivals.main.scheduledivision');\n this.scheduledivision.data = null;\n this.scheduledivision.festival_id = 0;\n this.scheduledivision.ssection_id = 0;\n this.scheduledivision.scheduledivision_id = 0;\n this.scheduledivision.nplist = [];\n this.scheduledivision.sections = {\n 'general':{'label':'', 'fields':{\n 'ssection_id':{'label':'Section', 'required':'yes', 'type':'select', 'complex_options':{'value':'id', 'name':'name'}, 'options':{}},\n 'name':{'label':'Name', 'required':'yes', 'type':'text'},\n 'division_date':{'label':'Date', 'required':'yes', 'type':'date'},\n 'address':{'label':'Address', 'type':'text'},\n }},\n '_buttons':{'label':'', 'buttons':{\n 'save':{'label':'Save', 'fn':'M.ciniki_musicfestivals_main.scheduledivision.save();'},\n 'delete':{'label':'Delete', \n 'visible':function() {return M.ciniki_musicfestivals_main.scheduledivision.scheduledivision_id > 0 ? 'yes' : 'no'; },\n 'fn':'M.ciniki_musicfestivals_main.scheduledivision.remove();'},\n }},\n };\n this.scheduledivision.fieldValue = function(s, i, d) { return this.data[i]; }\n this.scheduledivision.fieldHistoryArgs = function(s, i) {\n return {'method':'ciniki.musicfestivals.scheduleDivisionHistory', 'args':{'tnid':M.curTenantID, 'scheduledivision_id':this.scheduledivision_id, 'field':i}};\n }\n this.scheduledivision.open = function(cb, sid, ssid, fid, list) {\n if( sid != null ) { this.scheduledivision_id = sid; }\n if( ssid != null ) { this.ssection_id = ssid; }\n if( fid != null ) { this.festival_id = fid; }\n if( list != null ) { this.nplist = list; }\n M.api.getJSONCb('ciniki.musicfestivals.scheduleDivisionGet', \n {'tnid':M.curTenantID, 'scheduledivision_id':this.scheduledivision_id, 'festival_id':this.festival_id, 'ssection_id':this.ssection_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_musicfestivals_main.scheduledivision;\n p.data = rsp.scheduledivision;\n p.sections.general.fields.ssection_id.options = rsp.schedulesections;\n p.refresh();\n p.show(cb);\n });\n }\n this.scheduledivision.save = function(cb) {\n if( cb == null ) { cb = 'M.ciniki_musicfestivals_main.scheduledivision.close();'; }\n if( !this.checkForm() ) { return false; }\n if( this.scheduledivision_id > 0 ) {\n var c = this.serializeForm('no');\n if( c != '' ) {\n M.api.postJSONCb('ciniki.musicfestivals.scheduleDivisionUpdate', \n {'tnid':M.curTenantID, 'scheduledivision_id':this.scheduledivision_id, 'festival_id':this.festival_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n eval(cb);\n });\n } else {\n eval(cb);\n }\n } else {\n var c = this.serializeForm('yes');\n M.api.postJSONCb('ciniki.musicfestivals.scheduleDivisionAdd', {'tnid':M.curTenantID, 'festival_id':this.festival_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.scheduledivision.scheduledivision_id = rsp.id;\n eval(cb);\n });\n }\n }\n this.scheduledivision.remove = function() {\n M.confirm('Are you sure you want to remove this division?',null,function() {\n M.api.getJSONCb('ciniki.musicfestivals.scheduleDivisionDelete', {'tnid':M.curTenantID, 'scheduledivision_id':M.ciniki_musicfestivals_main.scheduledivision.scheduledivision_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.scheduledivision.close();\n });\n });\n }\n this.scheduledivision.nextButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.scheduledivision_id) < (this.nplist.length - 1) ) {\n return 'M.ciniki_musicfestivals_main.scheduledivision.save(\\'M.ciniki_musicfestivals_main.scheduledivision.open(null,' + this.nplist[this.nplist.indexOf('' + this.scheduledivision_id) + 1] + ');\\');';\n }\n return null;\n }\n this.scheduledivision.prevButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.scheduledivision_id) > 0 ) {\n return 'M.ciniki_musicfestivals_main.scheduledivision.save(\\'M.ciniki_musicfestivals_main.scheduledivision_id.open(null,' + this.nplist[this.nplist.indexOf('' + this.scheduledivision_id) - 1] + ');\\');';\n }\n return null;\n }\n this.scheduledivision.addButton('save', 'Save', 'M.ciniki_musicfestivals_main.scheduledivision.save();');\n this.scheduledivision.addClose('Cancel');\n this.scheduledivision.addButton('next', 'Next');\n this.scheduledivision.addLeftButton('prev', 'Prev');\n\n //\n // The panel to edit Schedule Time Slot\n //\n this.scheduletimeslot = new M.panel('Schedule Time Slot', 'ciniki_musicfestivals_main', 'scheduletimeslot', 'mc', 'xlarge', 'sectioned', 'ciniki.musicfestivals.main.scheduletimeslot');\n this.scheduletimeslot.data = null;\n this.scheduletimeslot.festival_id = 0;\n this.scheduletimeslot.scheduletimeslot_id = 0;\n this.scheduletimeslot.sdivision_id = 0;\n this.scheduletimeslot.nplist = [];\n this.scheduletimeslot.sections = {\n 'general':{'label':'', 'fields':{\n 'sdivision_id':{'label':'Division', 'required':'yes', 'type':'select', 'complex_options':{'value':'id', 'name':'name'}, 'options':{}},\n 'slot_time':{'label':'Time', 'required':'yes', 'type':'text', 'size':'small'},\n 'class1_id':{'label':'Class 1', 'required':'yes', 'type':'select', 'complex_options':{'value':'id', 'name':'name'}, 'options':{}, \n 'onchangeFn':'M.ciniki_musicfestivals_main.scheduletimeslot.updateRegistrations'},\n 'class2_id':{'label':'Class 2', 'required':'yes', 'type':'select', 'complex_options':{'value':'id', 'name':'name'}, 'options':{}, \n 'onchangeFn':'M.ciniki_musicfestivals_main.scheduletimeslot.updateRegistrations'},\n 'class3_id':{'label':'Class 3', 'required':'yes', 'type':'select', 'complex_options':{'value':'id', 'name':'name'}, 'options':{}, \n 'onchangeFn':'M.ciniki_musicfestivals_main.scheduletimeslot.updateRegistrations'},\n 'class4_id':{'label':'Class 4', 'required':'yes', 'type':'select', 'complex_options':{'value':'id', 'name':'name'}, 'options':{}, \n 'onchangeFn':'M.ciniki_musicfestivals_main.scheduletimeslot.updateRegistrations'},\n 'class5_id':{'label':'Class 5', 'required':'yes', 'type':'select', 'complex_options':{'value':'id', 'name':'name'}, 'options':{}, \n 'onchangeFn':'M.ciniki_musicfestivals_main.scheduletimeslot.updateRegistrations'},\n 'name':{'label':'Name', 'type':'text'},\n }},\n '_options':{'label':'',\n 'visible':function() {\n var p = M.ciniki_musicfestivals_main.scheduletimeslot;\n var c1 = p.formValue('class1_id');\n var c2 = p.formValue('class2_id');\n var c3 = p.formValue('class3_id');\n var c4 = p.formValue('class4_id');\n var c5 = p.formValue('class5_id');\n// if( c1 == null && p.data.class1_id > 0 && p.data.class2_id == 0 && p.data.class3_id == 0 && p.data.class4_id == 0 && p.data.class5_id == 0 ) { return 'yes'; }\n if( c1 == null && p.data.class1_id > 0 ) { \n return 'yes'; \n }\n// return (c1 != null && c1 > 0 && (c2 == null || c2 == 0) && (c3 == null || c3 == 0) ? 'yes' : 'hidden');\n return (c1 != null && c1 > 0 ? 'yes' : 'hidden');\n },\n 'fields':{\n 'flags1':{'label':'Split Class', 'type':'flagtoggle', 'default':'off', 'bit':0x01, 'field':'flags', \n 'fn':'M.ciniki_musicfestivals_main.scheduletimeslot.updateRegistrations'},\n }},\n '_registrations1':{'label':'Class 1 Registrations', \n 'visible':'hidden',\n 'fields':{\n 'registrations1':{'label':'', 'hidelabel':'yes', 'type':'idlist', 'list':[], \n 'fn':'M.ciniki_musicfestivals_main.scheduletimeslot.updateSorting',\n },\n }},\n '_registrations2':{'label':'Class 2 Registrations', \n 'visible':'hidden',\n 'fields':{\n 'registrations2':{'label':'', 'hidelabel':'yes', 'type':'idlist', 'list':[],\n 'fn':'M.ciniki_musicfestivals_main.scheduletimeslot.updateSorting',\n },\n }},\n '_registrations3':{'label':'Class 3 Registrations', \n 'visible':'hidden',\n 'fields':{\n 'registrations3':{'label':'', 'hidelabel':'yes', 'type':'idlist', 'list':[],\n 'fn':'M.ciniki_musicfestivals_main.scheduletimeslot.updateSorting',\n },\n }},\n '_registrations4':{'label':'Class 4 Registrations', \n 'visible':'hidden',\n 'fields':{\n 'registrations4':{'label':'', 'hidelabel':'yes', 'type':'idlist', 'list':[],\n 'fn':'M.ciniki_musicfestivals_main.scheduletimeslot.updateSorting',\n },\n }},\n '_registrations5':{'label':'Class 5 Registrations', \n 'visible':'hidden',\n 'fields':{\n 'registrations5':{'label':'', 'hidelabel':'yes', 'type':'idlist', 'list':[],\n 'fn':'M.ciniki_musicfestivals_main.scheduletimeslot.updateSorting',\n },\n }},\n '_sorting1':{'label':'Class 1 Registrations - Sorting', \n 'visible':'hidden',\n 'fields':{\n }},\n '_sorting2':{'label':'Class 2 Registrations - Sorting', \n 'visible':'hidden',\n 'fields':{\n }},\n '_sorting3':{'label':'Class 3 Registrations - Sorting', \n 'visible':'hidden',\n 'fields':{\n }},\n '_sorting4':{'label':'Class 4 Registrations - Sorting', \n 'visible':'hidden',\n 'fields':{\n }},\n '_sorting5':{'label':'Class 5 Registrations - Sorting', \n 'visible':'hidden',\n 'fields':{\n }},\n '_description':{'label':'Description', 'fields':{\n 'description':{'label':'Description', 'hidelabel':'yes', 'type':'textarea'},\n }},\n '_buttons':{'label':'', 'buttons':{\n 'save':{'label':'Save', 'fn':'M.ciniki_musicfestivals_main.scheduletimeslot.save();'},\n 'delete':{'label':'Delete', \n 'visible':function() {return M.ciniki_musicfestivals_main.scheduletimeslot.scheduletimeslot_id > 0 ? 'yes' : 'no'; },\n 'fn':'M.ciniki_musicfestivals_main.scheduletimeslot.remove();'},\n }},\n };\n this.scheduletimeslot.fieldValue = function(s, i, d) { \n if( i == 'registrations1' || i == 'registrations2' || i == 'registrations3' || i == 'registrations4' || i == 'registrations5' ) {\n return this.data.registrations;\n }\n return this.data[i]; \n }\n this.scheduletimeslot.fieldHistoryArgs = function(s, i) {\n return {'method':'ciniki.musicfestivals.scheduleTimeslotHistory', 'args':{'tnid':M.curTenantID, 'scheduletimeslot_id':this.scheduletimeslot_id, 'field':i}};\n }\n this.scheduletimeslot.updateRegistrations = function() {\n var c1_id = this.formValue('class1_id');\n var c2_id = this.formValue('class2_id');\n var c3_id = this.formValue('class3_id');\n var c4_id = this.formValue('class4_id');\n var c5_id = this.formValue('class5_id');\n this.sections._registrations1.visible = 'hidden';\n this.sections._registrations2.visible = 'hidden';\n this.sections._registrations3.visible = 'hidden';\n this.sections._registrations4.visible = 'hidden';\n this.sections._registrations5.visible = 'hidden';\n if( this.formValue('flags1') == 'on' && this.formValue('class1_id') > 0 && this.data.classes != null ) {\n for(var i in this.data.classes) {\n if( this.data.classes[i].id == c1_id ) {\n if( this.data.classes[i].registrations != null ) {\n this.sections._registrations1.visible = 'yes';\n this.sections._registrations1.fields.registrations1.list = this.data.classes[i].registrations;\n }\n }\n if( this.data.classes[i].id == c2_id ) {\n if( this.data.classes[i].registrations != null ) {\n this.sections._registrations2.visible = 'yes';\n this.sections._registrations2.fields.registrations2.list = this.data.classes[i].registrations;\n }\n }\n if( this.data.classes[i].id == c3_id ) {\n if( this.data.classes[i].registrations != null ) {\n this.sections._registrations3.visible = 'yes';\n this.sections._registrations3.fields.registrations3.list = this.data.classes[i].registrations;\n }\n }\n if( this.data.classes[i].id == c4_id ) {\n if( this.data.classes[i].registrations != null ) {\n this.sections._registrations4.visible = 'yes';\n this.sections._registrations4.fields.registrations4.list = this.data.classes[i].registrations;\n }\n }\n if( this.data.classes[i].id == c5_id ) {\n if( this.data.classes[i].registrations != null ) {\n this.sections._registrations5.visible = 'yes';\n this.sections._registrations5.fields.registrations5.list = this.data.classes[i].registrations;\n }\n }\n }\n }\n this.showHideSection('_registrations1');\n this.showHideSection('_registrations2');\n this.showHideSection('_registrations3');\n this.showHideSection('_registrations4');\n this.showHideSection('_registrations5');\n if( this.sections._registrations1.visible == 'yes' ) {\n this.refreshSection('_registrations1');\n }\n if( this.sections._registrations2.visible == 'yes' ) {\n this.refreshSection('_registrations2');\n }\n if( this.sections._registrations3.visible == 'yes' ) {\n this.refreshSection('_registrations3');\n }\n if( this.sections._registrations4.visible == 'yes' ) {\n this.refreshSection('_registrations4');\n }\n if( this.sections._registrations5.visible == 'yes' ) {\n this.refreshSection('_registrations5');\n }\n this.updateSorting();\n }\n this.scheduletimeslot.updateSorting = function() {\n var c1_id = this.formValue('class1_id');\n var c2_id = this.formValue('class2_id');\n var c3_id = this.formValue('class3_id');\n var c4_id = this.formValue('class4_id');\n var c5_id = this.formValue('class5_id');\n // Update the class registrations\n this.sections._sorting1.fields = {};\n this.sections._sorting2.fields = {};\n this.sections._sorting3.fields = {};\n this.sections._sorting4.fields = {};\n this.sections._sorting5.fields = {};\n this.sections._sorting1.visible = 'hidden';\n this.sections._sorting2.visible = 'hidden';\n this.sections._sorting3.visible = 'hidden';\n this.sections._sorting4.visible = 'hidden';\n this.sections._sorting5.visible = 'hidden';\n for(var i in this.data.classes) {\n if( c1_id > 0 && this.data.classes[i].id == c1_id ) {\n for(var j in this.data.classes[i].registrations) {\n if( this.formValue('flags1') == 'on' ) {\n var t = this.formValue('registrations1');\n if( t == '' ) {\n break;\n } \n var r = t.split(/,/);\n if( r.indexOf(this.data.classes[i].registrations[j].id) < 0 ) {\n continue;\n }\n }\n this.sections._sorting1.visible = 'yes';\n this.sections._sorting1.fields['seq_' + this.data.classes[i].registrations[j].id] = {\n 'label':this.data.classes[i].registrations[j].name + ' - ' + this.data.classes[i].registrations[j].title1,\n 'type':'text', \n 'size':'small',\n };\n this.data['seq_' + this.data.classes[i].registrations[j].id] = this.data.classes[i].registrations[j].timeslot_sequence;\n }\n }\n if( c2_id > 0 && this.data.classes[i].id == c2_id ) {\n for(var j in this.data.classes[i].registrations) {\n if( this.formValue('flags1') == 'on' ) {\n var t = this.formValue('registrations2');\n if( t == '' ) {\n break;\n } \n var r = t.split(/,/);\n if( r.indexOf(this.data.classes[i].registrations[j].id) < 0 ) {\n continue;\n }\n }\n this.sections._sorting2.visible = 'yes';\n this.sections._sorting2.fields['seq_' + this.data.classes[i].registrations[j].id] = {\n 'label':this.data.classes[i].registrations[j].name + ' - ' + this.data.classes[i].registrations[j].title1,\n 'type':'text', \n 'size':'small',\n };\n this.data['seq_' + this.data.classes[i].registrations[j].id] = this.data.classes[i].registrations[j].timeslot_sequence;\n }\n }\n if( c3_id > 0 && this.data.classes[i].id == c3_id ) {\n for(var j in this.data.classes[i].registrations) {\n if( this.formValue('flags1') == 'on' ) {\n var t = this.formValue('registrations3');\n if( t == '' ) {\n break;\n } \n var r = t.split(/,/);\n if( r.indexOf(this.data.classes[i].registrations[j].id) < 0 ) {\n continue;\n }\n }\n this.sections._sorting3.visible = 'yes';\n this.sections._sorting3.fields['seq_' + this.data.classes[i].registrations[j].id] = {\n 'label':this.data.classes[i].registrations[j].name + ' - ' + this.data.classes[i].registrations[j].title1,\n 'type':'text', \n 'size':'small',\n };\n this.data['seq_' + this.data.classes[i].registrations[j].id] = this.data.classes[i].registrations[j].timeslot_sequence;\n }\n }\n if( c4_id > 0 && this.data.classes[i].id == c4_id ) {\n for(var j in this.data.classes[i].registrations) {\n if( this.formValue('flags1') == 'on' ) {\n var t = this.formValue('registrations4');\n if( t == '' ) {\n break;\n } \n var r = t.split(/,/);\n if( r.indexOf(this.data.classes[i].registrations[j].id) < 0 ) {\n continue;\n }\n }\n this.sections._sorting4.visible = 'yes';\n this.sections._sorting4.fields['seq_' + this.data.classes[i].registrations[j].id] = {\n 'label':this.data.classes[i].registrations[j].name + ' - ' + this.data.classes[i].registrations[j].title1,\n 'type':'text', \n 'size':'small',\n };\n this.data['seq_' + this.data.classes[i].registrations[j].id] = this.data.classes[i].registrations[j].timeslot_sequence;\n }\n }\n if( c5_id > 0 && this.data.classes[i].id == c5_id ) {\n for(var j in this.data.classes[i].registrations) {\n if( this.formValue('flags1') == 'on' ) {\n var t = this.formValue('registrations5');\n if( t == '' ) {\n break;\n } \n var r = t.split(/,/);\n if( r.indexOf(this.data.classes[i].registrations[j].id) < 0 ) {\n continue;\n }\n }\n this.sections._sorting5.visible = 'yes';\n this.sections._sorting5.fields['seq_' + this.data.classes[i].registrations[j].id] = {\n 'label':this.data.classes[i].registrations[j].name + ' - ' + this.data.classes[i].registrations[j].title1,\n 'type':'text', \n 'size':'small',\n };\n this.data['seq_' + this.data.classes[i].registrations[j].id] = this.data.classes[i].registrations[j].timeslot_sequence;\n }\n }\n }\n this.showHideSection('_options');\n this.refreshSection('_sorting1');\n this.refreshSection('_sorting2');\n this.refreshSection('_sorting3');\n this.refreshSection('_sorting4');\n this.refreshSection('_sorting5');\n this.showHideSection('_sorting1');\n this.showHideSection('_sorting2');\n this.showHideSection('_sorting3');\n this.showHideSection('_sorting4');\n this.showHideSection('_sorting5'); \n return true;\n }\n this.scheduletimeslot.open = function(cb, sid, did, fid, list) {\n if( sid != null ) { this.scheduletimeslot_id = sid; }\n if( did != null ) { this.sdivision_id = did; }\n if( fid != null ) { this.festival_id = fid; }\n if( list != null ) { this.nplist = list; }\n M.api.getJSONCb('ciniki.musicfestivals.scheduleTimeslotGet', \n {'tnid':M.curTenantID, 'scheduletimeslot_id':this.scheduletimeslot_id, 'festival_id':this.festival_id, 'sdivision_id':this.sdivision_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_musicfestivals_main.scheduletimeslot;\n p.data = rsp.scheduletimeslot;\n p.data.classes = rsp.classes;\n p.sections.general.fields.sdivision_id.options = rsp.scheduledivisions;\n rsp.classes.unshift({'id':0, 'name':'No Class'});\n p.sections.general.fields.class1_id.options = rsp.classes;\n p.sections.general.fields.class2_id.options = rsp.classes;\n p.sections.general.fields.class3_id.options = rsp.classes;\n p.sections.general.fields.class4_id.options = rsp.classes;\n p.sections.general.fields.class5_id.options = rsp.classes;\n/* p.sections._registrations1.visible = 'hidden';\n if( rsp.scheduletimeslot.class1_id > 0 && rsp.classes != null ) {\n for(var i in rsp.classes) {\n if( rsp.classes[i].id == rsp.scheduletimeslot.class1_id ) {\n if( rsp.classes[i].registrations != null ) {\n if( (rsp.scheduletimeslot.flags&0x01) > 0 ) {\n p.sections._registrations1.visible = 'yes';\n }\n p.sections._registrations1.fields.registrations1.list = rsp.classes[i].registrations;\n }\n }\n }\n } */\n p.refresh();\n p.show(cb);\n p.updateRegistrations();\n });\n }\n this.scheduletimeslot.save = function(cb) {\n if( cb == null ) { cb = 'M.ciniki_musicfestivals_main.scheduletimeslot.close();'; }\n if( !this.checkForm() ) { return false; }\n if( this.scheduletimeslot_id > 0 ) {\n var c = this.serializeForm('no');\n if( c != '' ) {\n M.api.postJSONCb('ciniki.musicfestivals.scheduleTimeslotUpdate', \n {'tnid':M.curTenantID, 'scheduletimeslot_id':this.scheduletimeslot_id, 'festival_id':this.festival_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n eval(cb);\n });\n } else {\n eval(cb);\n }\n } else {\n var c = this.serializeForm('yes');\n M.api.postJSONCb('ciniki.musicfestivals.scheduleTimeslotAdd', {'tnid':M.curTenantID, 'festival_id':this.festival_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.scheduletimeslot.scheduletimeslot_id = rsp.id;\n eval(cb);\n });\n }\n }\n this.scheduletimeslot.remove = function() {\n M.confirm('Are you sure you want to remove timeslot?',null,function() {\n M.api.getJSONCb('ciniki.musicfestivals.scheduleTimeslotDelete', {'tnid':M.curTenantID, 'scheduletimeslot_id':M.ciniki_musicfestivals_main.scheduletimeslot.scheduletimeslot_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.scheduletimeslot.close();\n });\n });\n }\n this.scheduletimeslot.nextButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.scheduletimeslot_id) < (this.nplist.length - 1) ) {\n return 'M.ciniki_musicfestivals_main.scheduletimeslot.save(\\'M.ciniki_musicfestivals_main.scheduletimeslot.open(null,' + this.nplist[this.nplist.indexOf('' + this.scheduletimeslot_id) + 1] + ');\\');';\n }\n return null;\n }\n this.scheduletimeslot.prevButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.scheduletimeslot_id) > 0 ) {\n return 'M.ciniki_musicfestivals_main.scheduletimeslot.save(\\'M.ciniki_musicfestivals_main.scheduletimeslot_id.open(null,' + this.nplist[this.nplist.indexOf('' + this.scheduletimeslot_id) - 1] + ');\\');';\n }\n return null;\n }\n this.scheduletimeslot.addButton('save', 'Save', 'M.ciniki_musicfestivals_main.scheduletimeslot.save();');\n this.scheduletimeslot.addClose('Cancel');\n this.scheduletimeslot.addButton('next', 'Next');\n this.scheduletimeslot.addLeftButton('prev', 'Prev');\n\n //\n // The panel to edit Schedule Time Slot Comments\n //\n this.timeslotcomments = new M.panel('Comments', 'ciniki_musicfestivals_main', 'timeslotcomments', 'mc', 'medium mediumaside', 'sectioned', 'ciniki.musicfestivals.main.timeslotcomments');\n this.timeslotcomments.data = null;\n this.timeslotcomments.festival_id = 0;\n this.timeslotcomments.timeslot_id = 0;\n this.timeslotcomments.nplist = [];\n this.timeslotcomments.sections = {};\n this.timeslotcomments.fieldValue = function(s, i, d) { return this.data[i]; }\n this.timeslotcomments.fieldHistoryArgs = function(s, i) {\n return {'method':'ciniki.musicfestivals.scheduleTimeslotHistory', 'args':{'tnid':M.curTenantID, 'scheduletimeslot_id':this.timeslot_id, 'field':i}};\n }\n this.timeslotcomments.cellValue = function(s, i, j, d) {\n switch(j) {\n case 0 : return d.label;\n case 1 : return d.value;\n }\n }\n this.timeslotcomments.open = function(cb, tid, fid, list) {\n if( tid != null ) { this.timeslot_id = tid; }\n if( fid != null ) { this.festival_id = fid; }\n if( list != null ) { this.nplist = list; }\n M.api.getJSONCb('ciniki.musicfestivals.scheduleTimeslotCommentsGet', \n {'tnid':M.curTenantID, 'timeslot_id':this.timeslot_id, 'festival_id':this.festival_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_musicfestivals_main.timeslotcomments;\n p.data = rsp.timeslot;\n p.sections = {};\n for(var i in rsp.timeslot.registrations) {\n var registration = rsp.timeslot.registrations[i];\n p.sections['details_' + i] = {'label':'Registration', 'type':'simplegrid', 'num_cols':2, 'aside':'yes'};\n p.data['details_' + i] = [\n {'label':'Class', 'value':registration.reg_class_name},\n {'label':'Participant', 'value':registration.name},\n {'label':'Title', 'value':registration.title1},\n {'label':'Video', 'value':M.hyperlink(registration.video_url1)},\n {'label':'Music', 'value':registration.music_orgfilename1},\n ];\n if( (registration.reg_flags&0x1000) == 0x1000 ) {\n p.data['details_' + i].push({'label':'2nd Title', 'value':registration.title2});\n p.data['details_' + i].push({'label':'2nd Video', 'value':M.hyperlink(registration.video_url2)});\n p.data['details_' + i].push({'label':'2nd Music', 'value':registration.music_orgfilename2});\n }\n if( (registration.reg_flags&0x4000) == 0x4000 ) {\n p.data['details_' + i].push({'label':'3rd Title', 'value':registration.title3});\n p.data['details_' + i].push({'label':'3rd Video', 'value':M.hyperlink(registration.video_url3)});\n p.data['details_' + i].push({'label':'3rd Music', 'value':registration.music_orgfilename3});\n }\n // \n // Setup the comment, grade & score fields, could be for multiple adjudicators\n //\n for(var j in rsp.adjudicators) {\n p.sections['comments_' + i] = {'label':rsp.adjudicators[j].display_name, 'fields':{}};\n p.sections['comments_' + i].fields['comments_' + rsp.timeslot.registrations[i].id + '_' + rsp.adjudicators[j].id] = {\n 'label':'Comments', \n 'type':'textarea', \n 'size':'large',\n };\n// p.sections['comments_' + i].fields['grade_' + rsp.timeslot.registrations[i].id + '_' + rsp.adjudicators[j].id] = {\n// 'label':'Grade', \n// 'type':'text', \n// 'size':'small',\n// };\n p.sections['comments_' + i].fields['score_' + rsp.timeslot.registrations[i].id + '_' + rsp.adjudicators[j].id] = {\n 'label':'Mark', \n 'type':'text', \n 'size':'small',\n };\n/* if( M.modFlagOn('ciniki.musicfestivals', 0x08) ) {\n p.sections['comments_' + i].fields['placement_' + rsp.timeslot.registrations[i].id + '_' + rsp.adjudicators[j].id] = {\n 'label':'Placement', \n 'type':'text', \n 'size':'large',\n };\n }*/\n }\n }\n p.refresh();\n p.show(cb);\n });\n }\n this.timeslotcomments.save = function(cb) {\n if( cb == null ) { cb = 'M.ciniki_musicfestivals_main.timeslotcomments.close();'; }\n if( !this.checkForm() ) { return false; }\n var c = this.serializeForm('no');\n if( c != '' ) {\n M.api.postJSONCb('ciniki.musicfestivals.scheduleTimeslotCommentsUpdate', \n {'tnid':M.curTenantID, 'timeslot_id':this.timeslot_id, 'festival_id':this.festival_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n eval(cb);\n });\n } else {\n eval(cb);\n }\n }\n this.timeslotcomments.addButton('save', 'Save', 'M.ciniki_musicfestivals_main.timeslotcomments.save();');\n this.timeslotcomments.addClose('Cancel');\n\n\n //\n // Adjudicators\n //\n this.adjudicator = new M.panel('Adjudicator', 'ciniki_musicfestivals_main', 'adjudicator', 'mc', 'medium mediumaside', 'sectioned', 'ciniki.musicfestivals.main.adjudicator');\n this.adjudicator.data = null;\n this.adjudicator.festival_id = 0;\n this.adjudicator.adjudicator_id = 0;\n this.adjudicator.customer_id = 0;\n this.adjudicator.nplist = [];\n this.adjudicator.sections = {\n '_image_id':{'label':'Adjudicator Photo', 'type':'imageform', 'aside':'yes', 'fields':{\n 'image_id':{'label':'', 'type':'image_id', 'hidelabel':'yes', 'controls':'all', 'history':'no',\n 'addDropImage':function(iid) {\n M.ciniki_musicfestivals_main.adjudicator.setFieldValue('image_id', iid);\n return true;\n },\n 'addDropImageRefresh':'',\n 'deleteImage':function(fid) {\n M.ciniki_musicfestivals_main.adjudicator.setFieldValue(fid,0);\n return true;\n },\n },\n }}, \n 'customer_details':{'label':'Adjudicator', 'type':'simplegrid', 'num_cols':2, 'aside':'yes',\n 'cellClasses':['label', ''],\n 'addTxt':'Edit',\n 'addFn':'M.startApp(\\'ciniki.customers.edit\\',null,\\'M.ciniki_musicfestivals_main.adjudicator.updateCustomer();\\',\\'mc\\',{\\'next\\':\\'M.ciniki_musicfestivals_main.adjudicator.updateCustomer\\',\\'customer_id\\':M.ciniki_musicfestivals_main.adjudicator.data.customer_id});',\n 'changeTxt':'Change customer',\n 'changeFn':'M.startApp(\\'ciniki.customers.edit\\',null,\\'M.ciniki_musicfestivals_main.adjudicator.updateCustomer();\\',\\'mc\\',{\\'next\\':\\'M.ciniki_musicfestivals_main.adjudicator.updateCustomer\\',\\'customer_id\\':0});',\n },\n '_discipline':{'label':'Discipline', 'fields':{\n 'discipline':{'label':'', 'hidelabel':'yes', 'type':'text'},\n }},\n '_description':{'label':'Full Bio', 'fields':{\n 'description':{'label':'', 'hidelabel':'yes', 'type':'textarea', 'size':'xlarge'},\n }},\n '_buttons':{'label':'', 'buttons':{\n 'save':{'label':'Save', 'fn':'M.ciniki_musicfestivals_main.adjudicator.save();'},\n 'delete':{'label':'Remove Adjudicator', \n 'visible':function() {return M.ciniki_musicfestivals_main.adjudicator.adjudicator_id > 0 ? 'yes' : 'no'; },\n 'fn':'M.ciniki_musicfestivals_main.adjudicator.remove();'},\n }},\n };\n this.adjudicator.fieldValue = function(s, i, d) { return this.data[i]; }\n this.adjudicator.fieldHistoryArgs = function(s, i) {\n return {'method':'ciniki.musicfestivals.adjudicatorHistory', 'args':{'tnid':M.curTenantID, 'adjudicator_id':this.adjudicator_id, 'field':i}};\n }\n this.adjudicator.cellValue = function(s, i, j, d) {\n if( s == 'customer_details' && j == 0 ) { return d.detail.label; }\n if( s == 'customer_details' && j == 1 ) {\n if( d.detail.label == 'Email' ) {\n return M.linkEmail(d.detail.value);\n } else if( d.detail.label == 'Address' ) {\n return d.detail.value.replace(/\\n/g, '<br/>');\n }\n return d.detail.value;\n }\n };\n this.adjudicator.open = function(cb, aid, cid, fid, list) {\n if( cb != null ) { this.cb = cb; }\n if( aid != null ) { this.adjudicator_id = aid; }\n if( cid != null ) { this.customer_id = cid; }\n if( fid != null ) { this.festival_id = fid; }\n if( list != null ) { this.nplist = list; }\n if( aid != null && aid == 0 && cid != null && cid == 0 ) {\n M.startApp('ciniki.customers.edit',null,this.cb,'mc',{'next':'M.ciniki_musicfestivals_main.adjudicator.openCustomer', 'customer_id':0});\n return true;\n }\n M.api.getJSONCb('ciniki.musicfestivals.adjudicatorGet', {'tnid':M.curTenantID, 'customer_id':this.customer_id, 'adjudicator_id':this.adjudicator_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_musicfestivals_main.adjudicator;\n p.data = rsp.adjudicator;\n if( rsp.adjudicator.id > 0 ) {\n p.festival_id = rsp.adjudicator.festival_id;\n }\n p.customer_id = rsp.adjudicator.customer_id;\n if( p.customer_id == 0 ) {\n p.sections.customer_details.addTxt = '';\n p.sections.customer_details.changeTxt = 'Add';\n } else {\n p.sections.customer_details.addTxt = 'Edit';\n p.sections.customer_details.changeTxt = 'Change';\n }\n p.refresh();\n p.show();\n });\n }\n this.adjudicator.openCustomer = function(cid) {\n this.open(null,null,cid);\n }\n this.adjudicator.updateCustomer = function(cid) {\n if( cid != null ) { this.customer_id = cid; }\n M.api.getJSONCb('ciniki.customers.customerDetails', {'tnid':M.curTenantID, 'customer_id':this.customer_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_musicfestivals_main.adjudicator;\n p.data.customer_details = rsp.details;\n if( p.customer_id == 0 ) {\n p.sections.customer_details.addTxt = '';\n p.sections.customer_details.changeTxt = 'Add';\n } else {\n p.sections.customer_details.addTxt = 'Edit';\n p.sections.customer_details.changeTxt = 'Change';\n }\n p.refreshSection('customer_details');\n p.show();\n });\n }\n this.adjudicator.save = function(cb) {\n if( cb == null ) { cb = 'M.ciniki_musicfestivals_main.adjudicator.close();'; }\n if( !this.checkForm() ) { return false; }\n if( this.adjudicator_id > 0 ) {\n var c = this.serializeForm('no');\n if( c != '' ) {\n M.api.postJSONCb('ciniki.musicfestivals.adjudicatorUpdate', {'tnid':M.curTenantID, 'adjudicator_id':this.adjudicator_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n eval(cb);\n });\n } else {\n eval(cb);\n }\n } else {\n var c = this.serializeForm('yes');\n M.api.postJSONCb('ciniki.musicfestivals.adjudicatorAdd', {'tnid':M.curTenantID, 'customer_id':this.customer_id, 'festival_id':this.festival_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.adjudicator.adjudicator_id = rsp.id;\n eval(cb);\n });\n }\n }\n this.adjudicator.remove = function() {\n M.confirm('Are you sure you want to remove adjudicator?',null,function() {\n M.api.getJSONCb('ciniki.musicfestivals.adjudicatorDelete', {'tnid':M.curTenantID, 'adjudicator_id':M.ciniki_musicfestivals_main.adjudicator.adjudicator_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.adjudicator.close();\n });\n });\n }\n this.adjudicator.nextButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.adjudicator_id) < (this.nplist.length - 1) ) {\n return 'M.ciniki_musicfestivals_main.adjudicator.save(\\'M.ciniki_musicfestivals_main.adjudicator.open(null,' + this.nplist[this.nplist.indexOf('' + this.adjudicator_id) + 1] + ');\\');';\n }\n return null;\n }\n this.adjudicator.prevButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.adjudicator_id) > 0 ) {\n return 'M.ciniki_musicfestivals_main.adjudicator.save(\\'M.ciniki_musicfestivals_main.adjudicator_id.open(null,' + this.nplist[this.nplist.indexOf('' + this.adjudicator_id) - 1] + ');\\');';\n }\n return null;\n }\n this.adjudicator.addButton('save', 'Save', 'M.ciniki_musicfestivals_main.adjudicator.save();');\n this.adjudicator.addClose('Cancel');\n this.adjudicator.addButton('next', 'Next');\n this.adjudicator.addLeftButton('prev', 'Prev');\n\n //\n // The panel to display the add form\n //\n this.addfile = new M.panel('Add File', 'ciniki_musicfestivals_main', 'addfile', 'mc', 'medium', 'sectioned', 'ciniki.musicfestivals.main.addfile');\n this.addfile.default_data = {'type':'20'};\n this.addfile.festival_id = 0;\n this.addfile.data = {}; \n this.addfile.sections = {\n '_file':{'label':'File', 'fields':{\n 'uploadfile':{'label':'', 'type':'file', 'hidelabel':'yes'},\n }},\n 'info':{'label':'Information', 'type':'simpleform', 'fields':{\n 'name':{'label':'Title', 'type':'text'},\n 'webflags':{'label':'Website', 'type':'flags', 'default':'1', 'flags':{'1':{'name':'Visible'}}},\n }},\n '_save':{'label':'', 'buttons':{\n 'save':{'label':'Save', 'fn':'M.ciniki_musicfestivals_main.addfile.save();'},\n }},\n };\n this.addfile.fieldValue = function(s, i, d) { \n if( this.data[i] != null ) { return this.data[i]; } \n return ''; \n };\n this.addfile.open = function(cb, eid) {\n this.reset();\n this.data = {'name':''};\n this.file_id = 0;\n this.festival_id = eid;\n this.refresh();\n this.show(cb);\n };\n this.addfile.save = function() {\n var c = this.serializeFormData('yes');\n if( c != '' ) {\n M.api.postJSONFormData('ciniki.musicfestivals.fileAdd', {'tnid':M.curTenantID, 'festival_id':this.festival_id}, c,\n function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n } \n M.ciniki_musicfestivals_main.addfile.file_id = rsp.id;\n M.ciniki_musicfestivals_main.addfile.close();\n });\n } else {\n this.close();\n }\n };\n this.addfile.addButton('save', 'Save', 'M.ciniki_musicfestivals_main.addfile.save();');\n this.addfile.addClose('Cancel');\n\n //\n // The panel to display the edit form\n //\n this.editfile = new M.panel('File', 'ciniki_musicfestivals_main', 'editfile', 'mc', 'medium', 'sectioned', 'ciniki.musicfestivals.info.editfile');\n this.editfile.file_id = 0;\n this.editfile.data = null;\n this.editfile.sections = {\n 'info':{'label':'Details', 'type':'simpleform', 'fields':{\n 'name':{'label':'Title', 'type':'text'},\n 'webflags':{'label':'Website', 'type':'flags', 'default':'1', 'flags':{'1':{'name':'Visible'}}},\n }},\n '_save':{'label':'', 'buttons':{\n 'save':{'label':'Save', 'fn':'M.ciniki_musicfestivals_main.editfile.save();'},\n 'download':{'label':'Download', 'fn':'M.ciniki_musicfestivals_main.editfile.download(M.ciniki_musicfestivals_main.editfile.file_id);'},\n 'delete':{'label':'Delete', 'fn':'M.ciniki_musicfestivals_main.editfile.remove();'},\n }},\n };\n this.editfile.fieldValue = function(s, i, d) { \n return this.data[i]; \n }\n this.editfile.sectionData = function(s) {\n return this.data[s];\n };\n this.editfile.fieldHistoryArgs = function(s, i) {\n return {'method':'ciniki.musicfestivals.fileHistory', 'args':{'tnid':M.curTenantID, 'file_id':this.file_id, 'field':i}};\n };\n this.editfile.open = function(cb, fid) {\n if( fid != null ) { this.file_id = fid; }\n M.api.getJSONCb('ciniki.musicfestivals.fileGet', {'tnid':M.curTenantID, 'file_id':this.file_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_musicfestivals_main.editfile;\n p.data = rsp.file;\n p.refresh();\n p.show(cb);\n });\n };\n this.editfile.save = function() {\n var c = this.serializeFormData('no');\n if( c != '' ) {\n M.api.postJSONFormData('ciniki.musicfestivals.fileUpdate', {'tnid':M.curTenantID, 'file_id':this.file_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n } \n M.ciniki_musicfestivals_main.editfile.close();\n });\n }\n };\n this.editfile.remove = function() {\n M.confirm('Are you sure you want to delete \\'' + this.data.name + '\\'? All information about it will be removed and unrecoverable.',null,function() {\n M.api.getJSONCb('ciniki.musicfestivals.fileDelete', {'tnid':M.curTenantID, 'file_id':M.ciniki_musicfestivals_main.editfile.file_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n } \n M.ciniki_musicfestivals_main.editfile.close();\n });\n });\n };\n this.editfile.download = function(fid) {\n M.api.openFile('ciniki.musicfestivals.fileDownload', {'tnid':M.curTenantID, 'file_id':fid});\n };\n this.editfile.addButton('save', 'Save', 'M.ciniki_musicfestivals_main.editfile.save();');\n this.editfile.addClose('Cancel');\n\n //\n // The panel to email a teacher their list of registrations\n //\n this.emailregistrations = new M.panel('Email Registrations', 'ciniki_musicfestivals_main', 'emailregistrations', 'mc', 'medium mediumaside', 'sectioned', 'ciniki.musicfestivals.main.emailregistrations');\n this.emailregistrations.data = {};\n this.emailregistrations.sections = {\n '_subject':{'label':'', 'type':'simpleform', 'aside':'yes', 'fields':{\n 'subject':{'label':'Subject', 'type':'text'},\n }},\n '_message':{'label':'Message', 'type':'simpleform', 'aside':'yes', 'fields':{\n 'message':{'label':'', 'hidelabel':'yes', 'type':'textarea', 'size':'large'},\n }},\n '_save':{'label':'', 'aside':'yes', 'buttons':{\n 'send':{'label':'Send', 'fn':'M.ciniki_musicfestivals_main.emailregistrations.send();'},\n }},\n 'registrations':{'label':'Registrations', 'type':'simplegrid', 'num_cols':5,\n 'headerValues':['Class', 'Registrant', 'Title', 'Time', 'Virtual'],\n 'cellClasses':['', '', '', '', ''],\n },\n };\n this.emailregistrations.fieldValue = function(s, i, d) { return ''; }\n this.emailregistrations.cellValue = function(s, i, j, d) {\n if( s == 'registrations' ) {\n switch (j) {\n case 0: return d.class_code;\n case 1: return d.display_name;\n case 2: return d.title1;\n case 3: return d.perf_time1;\n case 4: return (d.participation == 1 ? 'Virtual' : 'In Person');\n }\n }\n }\n this.emailregistrations.open = function(cb, reg) {\n this.sections.registrations.label = M.ciniki_musicfestivals_main.festival.sections.registrations.label;\n this.data.registrations = M.ciniki_musicfestivals_main.festival.data.registrations;\n this.refresh();\n this.show(cb);\n };\n this.emailregistrations.send = function() {\n var c = this.serializeForm('yes');\n M.api.postJSONCb('ciniki.musicfestivals.registrationsEmailSend', \n {'tnid':M.curTenantID, 'teacher_id':M.ciniki_musicfestivals_main.festival.teacher_customer_id, 'festival_id':M.ciniki_musicfestivals_main.festival.festival_id}, c, \n function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n } \n M.ciniki_musicfestivals_main.emailregistrations.close();\n });\n }\n this.emailregistrations.addButton('send', 'Send', 'M.ciniki_musicfestivals_main.emailregistrations.send();');\n this.emailregistrations.addClose('Cancel');\n\n //\n // The panel to edit Sponsor\n //\n this.sponsor = new M.panel('Sponsor', 'ciniki_musicfestivals_main', 'sponsor', 'mc', 'medium', 'sectioned', 'ciniki.musicfestivals.main.sponsor');\n this.sponsor.data = null;\n this.sponsor.festival_id = 0;\n this.sponsor.sponsor_id = 0;\n this.sponsor.nplist = [];\n this.sponsor.sections = {\n '_image_id':{'label':'Logo', 'type':'imageform', 'aside':'yes', 'fields':{\n 'image_id':{'label':'', 'type':'image_id', 'hidelabel':'yes', 'controls':'all', 'history':'no',\n 'addDropImage':function(iid) {\n M.ciniki_musicfestivals_main.sponsor.setFieldValue('image_id', iid);\n return true;\n },\n 'addDropImageRefresh':'',\n 'deleteImage':function(fid) {\n M.ciniki_musicfestivals_main.sponsor.setFieldValue(fid, 0);\n return true;\n },\n },\n }},\n 'general':{'label':'', 'fields':{\n 'name':{'label':'Name', 'required':'yes', 'type':'text'},\n 'url':{'label':'Website', 'type':'text'},\n 'sequence':{'label':'Order', 'type':'text', 'size':'small'},\n 'flags':{'label':'Options', 'type':'flags', 'flags':{'1':{'name':'Level 1'}, '2':{'name':'Level 2'}}},\n }},\n '_buttons':{'label':'', 'buttons':{\n 'save':{'label':'Save', 'fn':'M.ciniki_musicfestivals_main.sponsor.save();'},\n 'delete':{'label':'Delete', \n 'visible':function() {return M.ciniki_musicfestivals_main.sponsor.sponsor_id > 0 ? 'yes' : 'no'; },\n 'fn':'M.ciniki_musicfestivals_main.sponsor.remove();'},\n }},\n };\n this.sponsor.fieldValue = function(s, i, d) { return this.data[i]; }\n this.sponsor.fieldHistoryArgs = function(s, i) {\n return {'method':'ciniki.musicfestivals.sponsorHistory', 'args':{'tnid':M.curTenantID, 'sponsor_id':this.sponsor_id, 'field':i}};\n }\n this.sponsor.open = function(cb, sid, fid) {\n if( sid != null ) { this.sponsor_id = sid; }\n if( fid != null ) { this.festival_id = fid; }\n M.api.getJSONCb('ciniki.musicfestivals.sponsorGet', {'tnid':M.curTenantID, 'sponsor_id':this.sponsor_id, 'festival_id':this.festival_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_musicfestivals_main.sponsor;\n p.data = rsp.sponsor;\n p.refresh();\n p.show(cb);\n });\n }\n this.sponsor.save = function(cb) {\n if( cb == null ) { cb = 'M.ciniki_musicfestivals_main.sponsor.close();'; }\n if( !this.checkForm() ) { return false; }\n if( this.sponsor_id > 0 ) {\n var c = this.serializeForm('no');\n if( c != '' ) {\n M.api.postJSONCb('ciniki.musicfestivals.sponsorUpdate', {'tnid':M.curTenantID, 'sponsor_id':this.sponsor_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n eval(cb);\n });\n } else {\n eval(cb);\n }\n } else {\n var c = this.serializeForm('yes');\n M.api.postJSONCb('ciniki.musicfestivals.sponsorAdd', {'tnid':M.curTenantID, 'festival_id':this.festival_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.sponsor.sponsor_id = rsp.id;\n eval(cb);\n });\n }\n }\n this.sponsor.remove = function() {\n M.confirm('Are you sure you want to remove sponsor?', null, function(rsp) {\n M.api.getJSONCb('ciniki.musicfestivals.sponsorDelete', {'tnid':M.curTenantID, 'sponsor_id':M.ciniki_musisfestivals_main.sponsor.sponsor_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.sponsor.close();\n });\n });\n }\n this.sponsor.nextButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.sponsor_id) < (this.nplist.length - 1) ) {\n return 'M.ciniki_musicfestivals_main.sponsor.save(\\'M.ciniki_musicfestivals_main.sponsor.open(null,' + this.nplist[this.nplist.indexOf('' + this.sponsor_id) + 1] + ');\\');';\n }\n return null;\n }\n this.sponsor.prevButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.sponsor_id) > 0 ) {\n return 'M.ciniki_musicfestivals_main.sponsor.save(\\'M.ciniki_musicfestivals_main.sponsor.open(null,' + this.nplist[this.nplist.indexOf('' + this.sponsor_id) - 1] + ');\\');';\n }\n return null;\n }\n this.sponsor.addButton('save', 'Save', 'M.ciniki_musicfestivals_main.sponsor.save();');\n this.sponsor.addClose('Cancel');\n this.sponsor.addButton('next', 'Next');\n this.sponsor.addLeftButton('prev', 'Prev');\n\n //\n // The panel to edit Schedule Time Slot Image\n //\n this.timeslotimage = new M.panel('Schedule Time Slot Image', 'ciniki_musicfestivals_main', 'timeslotimage', 'mc', 'medium mediumaside', 'sectioned', 'ciniki.musicfestivals.main.timeslotimage');\n this.timeslotimage.data = null;\n this.timeslotimage.timeslot_image_id = 0;\n this.timeslotimage.nplist = [];\n this.timeslotimage.sections = {\n '_image_id':{'label':'Image', 'type':'imageform', 'aside':'yes', 'fields':{\n 'image_id':{'label':'', 'type':'image_id', 'hidelabel':'yes', 'controls':'all', 'history':'no',\n 'addDropImage':function(iid) {\n M.ciniki_musicfestivals_main.timeslotimage.setFieldValue('image_id', iid);\n return true;\n },\n 'addDropImageRefresh':'',\n },\n }},\n 'general':{'label':'', 'fields':{\n 'title':{'label':'Title', 'type':'text'},\n 'flags':{'label':'Options', 'type':'text'},\n 'sequence':{'label':'Order', 'type':'text'},\n }},\n '_description':{'label':'Description', 'fields':{\n 'description':{'label':'', 'hidelabel':'yes', 'type':'textarea', 'size':'large'},\n }},\n '_buttons':{'label':'', 'buttons':{\n 'save':{'label':'Save', 'fn':'M.ciniki_musicfestivals_main.timeslotimage.save();'},\n 'delete':{'label':'Delete', \n 'visible':function() {return M.ciniki_musicfestivals_main.timeslotimage.timeslot_image_id > 0 ? 'yes' : 'no'; },\n 'fn':'M.ciniki_musicfestivals_main.timeslotimage.remove();'},\n }},\n };\n this.timeslotimage.fieldValue = function(s, i, d) { return this.data[i]; }\n this.timeslotimage.fieldHistoryArgs = function(s, i) {\n return {'method':'ciniki.musicfestivals.timeslotImageHistory', 'args':{'tnid':M.curTenantID, 'timeslot_image_id':this.timeslot_image_id, 'field':i}};\n }\n this.timeslotimage.open = function(cb, tid, list) {\n if( tid != null ) { this.timeslot_image_id = tid; }\n if( list != null ) { this.nplist = list; }\n M.api.getJSONCb('ciniki.musicfestivals.timeslotImageGet', {'tnid':M.curTenantID, 'timeslot_image_id':this.timeslot_image_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_musicfestivals_main.timeslotimage;\n p.data = rsp.image;\n p.refresh();\n p.show(cb);\n });\n }\n this.timeslotimage.save = function(cb) {\n if( cb == null ) { cb = 'M.ciniki_musicfestivals_main.timeslotimage.close();'; }\n if( !this.checkForm() ) { return false; }\n if( this.timeslot_image_id > 0 ) {\n var c = this.serializeForm('no');\n if( c != '' ) {\n M.api.postJSONCb('ciniki.musicfestivals.timeslotImageUpdate', {'tnid':M.curTenantID, 'timeslot_image_id':this.timeslot_image_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n eval(cb);\n });\n } else {\n eval(cb);\n }\n } else {\n var c = this.serializeForm('yes');\n M.api.postJSONCb('ciniki.musicfestivals.timeslotImageAdd', {'tnid':M.curTenantID}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.timeslotimage.timeslot_image_id = rsp.id;\n eval(cb);\n });\n }\n }\n this.timeslotimage.remove = function() {\n M.confirm('Are you sure you want to remove timeslotimage?', null, function(rsp) {\n M.api.getJSONCb('ciniki.musicfestivals.timeslotImageDelete', {'tnid':M.curTenantID, 'timeslot_image_id':M.ciniki_musicfestivals_main.timeslotimage.timeslot_image_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.timeslotimage.close();\n });\n });\n }\n this.timeslotimage.nextButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.timeslot_image_id) < (this.nplist.length - 1) ) {\n return 'M.ciniki_musicfestivals_main.timeslotimage.save(\\'M.ciniki_musicfestivals_main.timeslotimage.open(null,' + this.nplist[this.nplist.indexOf('' + this.timeslot_image_id) + 1] + ');\\');';\n }\n return null;\n }\n this.timeslotimage.prevButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.timeslot_image_id) > 0 ) {\n return 'M.ciniki_musicfestivals_main.timeslotimage.save(\\'M.ciniki_musicfestivals_main.timeslotimage.open(null,' + this.nplist[this.nplist.indexOf('' + this.timeslot_image_id) - 1] + ');\\');';\n }\n return null;\n }\n this.timeslotimage.addButton('save', 'Save', 'M.ciniki_musicfestivals_main.timeslotimage.save();');\n this.timeslotimage.addClose('Cancel');\n this.timeslotimage.addButton('next', 'Next');\n this.timeslotimage.addLeftButton('prev', 'Prev');\n\n //\n // The panel to edit a List\n //\n this.list = new M.panel('List', 'ciniki_musicfestivals_main', 'list', 'mc', 'medium', 'sectioned', 'ciniki.musicfestivals.main.list');\n this.list.data = null;\n this.list.list_id = 0;\n this.list.festival_id = 0;\n this.list.nplist = [];\n this.list.sections = {\n 'general':{'label':'', 'fields':{\n 'name':{'label':'Name', 'required':'yes', 'type':'text'},\n 'category':{'label':'Category', 'required':'yes', 'type':'text'},\n }},\n '_intro':{'label':'Introduction', 'fields':{\n 'intro':{'label':'', 'hidelabel':'yes', 'type':'textarea'},\n }},\n '_buttons':{'label':'', 'buttons':{\n 'save':{'label':'Save', 'fn':'M.ciniki_musicfestivals_main.list.save();'},\n 'delete':{'label':'Delete', \n 'visible':function() {return M.ciniki_musicfestivals_main.list.list_id > 0 ? 'yes' : 'no'; },\n 'fn':'M.ciniki_musicfestivals_main.list.remove();'},\n }},\n };\n this.list.fieldValue = function(s, i, d) { return this.data[i]; }\n this.list.fieldHistoryArgs = function(s, i) {\n return {'method':'ciniki.musicfestivals.listHistory', 'args':{'tnid':M.curTenantID, 'list_id':this.list_id, 'field':i}};\n }\n this.list.open = function(cb, lid, fid, list) {\n if( lid != null ) { this.list_id = lid; }\n if( fid != null ) { this.festival_id = fid; }\n if( list != null ) { this.nplist = list; }\n M.api.getJSONCb('ciniki.musicfestivals.listGet', {'tnid':M.curTenantID, 'list_id':this.list_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_musicfestivals_main.list;\n p.data = rsp.list;\n p.refresh();\n p.show(cb);\n });\n }\n this.list.save = function(cb) {\n if( cb == null ) { cb = 'M.ciniki_musicfestivals_main.list.close();'; }\n if( !this.checkForm() ) { return false; }\n if( this.list_id > 0 ) {\n var c = this.serializeForm('no');\n if( c != '' ) {\n M.api.postJSONCb('ciniki.musicfestivals.listUpdate', {'tnid':M.curTenantID, 'list_id':this.list_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n eval(cb);\n });\n } else {\n eval(cb);\n }\n } else {\n var c = this.serializeForm('yes');\n M.api.postJSONCb('ciniki.musicfestivals.listAdd', {'tnid':M.curTenantID, 'festival_id':this.festival_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.list.list_id = rsp.id;\n eval(cb);\n });\n }\n }\n this.list.remove = function() {\n M.confirm('Are you sure you want to remove list?', null, function(rsp) {\n M.api.getJSONCb('ciniki.musicfestivals.listDelete', {'tnid':M.curTenantID, 'list_id':this.list_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.list.close();\n });\n });\n }\n this.list.nextButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.list_id) < (this.nplist.length - 1) ) {\n return 'M.ciniki_musicfestivals_main.list.save(\\'M.ciniki_musicfestivals_main.list.open(null,' + this.nplist[this.nplist.indexOf('' + this.list_id) + 1] + ');\\');';\n }\n return null;\n }\n this.list.prevButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.list_id) > 0 ) {\n return 'M.ciniki_musicfestivals_main.list.save(\\'M.ciniki_musicfestivals_main.list.open(null,' + this.nplist[this.nplist.indexOf('' + this.list_id) - 1] + ');\\');';\n }\n return null;\n }\n this.list.addButton('save', 'Save', 'M.ciniki_musicfestivals_main.list.save();');\n this.list.addClose('Cancel');\n this.list.addButton('next', 'Next');\n this.list.addLeftButton('prev', 'Prev');\n\n //\n // The panel to edit List Section\n //\n this.listsection = new M.panel('List Section', 'ciniki_musicfestivals_main', 'listsection', 'mc', 'medium', 'sectioned', 'ciniki.musicfestivals.main.listsection');\n this.listsection.data = null;\n this.listsection.list_id = 0;\n this.listsection.listsection_id = 0;\n this.listsection.nplist = [];\n this.listsection.sections = {\n 'general':{'label':'', 'fields':{\n 'name':{'label':'Name', 'required':'yes', 'type':'text'},\n 'sequence':{'label':'Order', 'type':'text'},\n }},\n '_buttons':{'label':'', 'buttons':{\n 'save':{'label':'Save', 'fn':'M.ciniki_musicfestivals_main.listsection.save();'},\n 'delete':{'label':'Delete', \n 'visible':function() {return M.ciniki_musicfestivals_main.listsection.listsection_id > 0 ? 'yes' : 'no'; },\n 'fn':'M.ciniki_musicfestivals_main.listsection.remove();'},\n }},\n };\n this.listsection.fieldValue = function(s, i, d) { return this.data[i]; }\n this.listsection.fieldHistoryArgs = function(s, i) {\n return {'method':'ciniki.musicfestivals.listSectionHistory', 'args':{'tnid':M.curTenantID, 'listsection_id':this.listsection_id, 'field':i}};\n }\n this.listsection.open = function(cb, lid, list_id, list) {\n if( lid != null ) { this.listsection_id = lid; }\n if( list_id != null ) { this.list_id = list_id; }\n if( list != null ) { this.nplist = list; }\n M.api.getJSONCb('ciniki.musicfestivals.listSectionGet', {'tnid':M.curTenantID, 'listsection_id':this.listsection_id, 'list_id':this.list_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_musicfestivals_main.listsection;\n p.data = rsp.listsection;\n p.refresh();\n p.show(cb);\n });\n }\n this.listsection.save = function(cb) {\n if( cb == null ) { cb = 'M.ciniki_musicfestivals_main.listsection.close();'; }\n if( !this.checkForm() ) { return false; }\n if( this.listsection_id > 0 ) {\n var c = this.serializeForm('no');\n if( c != '' ) {\n M.api.postJSONCb('ciniki.musicfestivals.listSectionUpdate', {'tnid':M.curTenantID, 'listsection_id':this.listsection_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n eval(cb);\n });\n } else {\n eval(cb);\n }\n } else {\n var c = this.serializeForm('yes');\n M.api.postJSONCb('ciniki.musicfestivals.listSectionAdd', {'tnid':M.curTenantID, 'list_id':this.list_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.listsection.listsection_id = rsp.id;\n eval(cb);\n });\n }\n }\n this.listsection.remove = function() {\n M.confirm('Are you sure you want to remove listsection?', null, function(rsp) {\n M.api.getJSONCb('ciniki.musicfestivals.listSectionDelete', {'tnid':M.curTenantID, 'listsection_id':M.ciniki_musicfestivals_main.listsection.listsection_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.listsection.close();\n });\n });\n }\n this.listsection.nextButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.listsection_id) < (this.nplist.length - 1) ) {\n return 'M.ciniki_musicfestivals_main.listsection.save(\\'M.ciniki_musicfestivals_main.listsection.open(null,' + this.nplist[this.nplist.indexOf('' + this.listsection_id) + 1] + ');\\');';\n }\n return null;\n }\n this.listsection.prevButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.listsection_id) > 0 ) {\n return 'M.ciniki_musicfestivals_main.listsection.save(\\'M.ciniki_musicfestivals_main.listsection.open(null,' + this.nplist[this.nplist.indexOf('' + this.listsection_id) - 1] + ');\\');';\n }\n return null;\n }\n this.listsection.addButton('save', 'Save', 'M.ciniki_musicfestivals_main.listsection.save();');\n this.listsection.addClose('Cancel');\n this.listsection.addButton('next', 'Next');\n this.listsection.addLeftButton('prev', 'Prev');\n\n //\n // The panel to edit List Entry\n //\n this.listentry = new M.panel('List Entry', 'ciniki_musicfestivals_main', 'listentry', 'mc', 'medium', 'sectioned', 'ciniki.musicfestivals.main.listentry');\n this.listentry.data = null;\n this.listentry.listsection_id = 0;\n this.listentry.listentry_id = 0;\n this.listentry.nplist = [];\n this.listentry.sections = {\n 'general':{'label':'List Entry', 'fields':{\n 'sequence':{'label':'Number', 'type':'text'},\n 'award':{'label':'Award', 'type':'text'},\n 'amount':{'label':'Amount', 'type':'text'},\n 'donor':{'label':'Donor', 'type':'text'},\n 'winner':{'label':'Winner', 'type':'text'},\n }},\n '_buttons':{'label':'', 'buttons':{\n 'save':{'label':'Save', 'fn':'M.ciniki_musicfestivals_main.listentry.save();'},\n 'delete':{'label':'Delete', \n 'visible':function() {return M.ciniki_musicfestivals_main.listentry.listentry_id > 0 ? 'yes' : 'no'; },\n 'fn':'M.ciniki_musicfestivals_main.listentry.remove();'},\n }},\n };\n this.listentry.fieldValue = function(s, i, d) { return this.data[i]; }\n this.listentry.fieldHistoryArgs = function(s, i) {\n return {'method':'ciniki.musicfestivals.listEntryHistory', 'args':{'tnid':M.curTenantID, 'listentry_id':this.listentry_id, 'field':i}};\n }\n this.listentry.open = function(cb, lid, sid, list) {\n if( lid != null ) { this.listentry_id = lid; }\n if( sid != null ) { this.listsection_id = sid; }\n if( list != null ) { this.nplist = list; }\n M.api.getJSONCb('ciniki.musicfestivals.listEntryGet', {'tnid':M.curTenantID, 'listentry_id':this.listentry_id, 'section_id':this.listsection_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_musicfestivals_main.listentry;\n p.data = rsp.listentry;\n p.refresh();\n p.show(cb);\n });\n }\n this.listentry.save = function(cb) {\n if( cb == null ) { cb = 'M.ciniki_musicfestivals_main.listentry.close();'; }\n if( !this.checkForm() ) { return false; }\n if( this.listentry_id > 0 ) {\n var c = this.serializeForm('no');\n if( c != '' ) {\n M.api.postJSONCb('ciniki.musicfestivals.listEntryUpdate', {'tnid':M.curTenantID, 'listentry_id':this.listentry_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n eval(cb);\n });\n } else {\n eval(cb);\n }\n } else {\n var c = this.serializeForm('yes');\n M.api.postJSONCb('ciniki.musicfestivals.listEntryAdd', {'tnid':M.curTenantID, 'section_id':this.listsection_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.listentry.listentry_id = rsp.id;\n eval(cb);\n });\n }\n }\n this.listentry.remove = function() {\n M.confirm('Are you sure you want to remove listentry?', null, function(rsp) {\n M.api.getJSONCb('ciniki.musicfestivals.listEntryDelete', {'tnid':M.curTenantID, 'listentry_id':M.ciniki_musicfestivals_main.listentry.listentry_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.listentry.close();\n });\n });\n }\n this.listentry.nextButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.listentry_id) < (this.nplist.length - 1) ) {\n return 'M.ciniki_musicfestivals_main.listentry.save(\\'M.ciniki_musicfestivals_main.listentry.open(null,' + this.nplist[this.nplist.indexOf('' + this.listentry_id) + 1] + ');\\');';\n }\n return null;\n }\n this.listentry.prevButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.listentry_id) > 0 ) {\n return 'M.ciniki_musicfestivals_main.listentry.save(\\'M.ciniki_musicfestivals_main.listentry.open(null,' + this.nplist[this.nplist.indexOf('' + this.listentry_id) - 1] + ');\\');';\n }\n return null;\n }\n this.listentry.addButton('save', 'Save', 'M.ciniki_musicfestivals_main.listentry.save();');\n this.listentry.addClose('Cancel');\n this.listentry.addButton('next', 'Next');\n this.listentry.addLeftButton('prev', 'Prev');\n\n //\n // The panel to edit Certificate\n //\n this.certificate = new M.panel('Certificate', 'ciniki_musicfestivals_main', 'certificate', 'mc', 'medium mediumaside', 'sectioned', 'ciniki.musicfestivals.main.certificate');\n this.certificate.data = null;\n this.certificate.festival_id = 0;\n this.certificate.certificate_id = 0;\n this.certificate.nplist = [];\n this.certificate.sections = {\n '_image_id':{'label':'Image', 'type':'imageform', 'aside':'yes', 'fields':{\n 'image_id':{'label':'', 'type':'image_id', 'hidelabel':'yes', 'controls':'all', 'history':'no',\n 'addDropImage':function(iid) {\n M.ciniki_musicfestivals_main.certificate.setFieldValue('image_id', iid);\n return true;\n },\n 'addDropImageRefresh':'',\n },\n }},\n 'general':{'label':'Certificate', 'fields':{\n 'name':{'label':'Name', 'required':'yes', 'type':'text'},\n 'orientation':{'label':'Orientation', 'type':'toggle', 'toggles':{'L':'Landscape', 'P':'Portrait'}},\n// FIXME: Add section support and min score support\n// 'section_id':{'label':'Section', 'type':'select', 'options':{}, 'complex_options':{'name':'name', 'value':'id'}},\n// 'min_score':{'label':'Minimum Score', 'type':'text', 'size':'small'},\n }},\n 'fields':{'label':'Auto Filled Fields', 'type':'simplegrid', 'num_cols':1,\n 'addTxt':'Add Field',\n 'addFn':'M.ciniki_musicfestivals_main.certificate.save(\"M.ciniki_musicfestivals_main.certfield.open(\\'M.ciniki_musicfestivals_main.certificate.open();\\',0,M.ciniki_musicfestivals_main.certificate.certificate_id);\");',\n },\n '_buttons':{'label':'', 'buttons':{\n 'save':{'label':'Save', 'fn':'M.ciniki_musicfestivals_main.certificate.save();'},\n 'download':{'label':'Generate Test', \n 'visible':function() {return M.ciniki_musicfestivals_main.certificate.certificate_id > 0 ? 'yes' : 'no'; },\n 'fn':'M.ciniki_musicfestivals_main.certificate.generateTestOutlines();',\n },\n 'download2':{'label':'Generate Test No Outlines', \n 'visible':function() {return M.ciniki_musicfestivals_main.certificate.certificate_id > 0 ? 'yes' : 'no'; },\n 'fn':'M.ciniki_musicfestivals_main.certificate.generateTest();',\n },\n 'delete':{'label':'Delete', \n 'visible':function() {return M.ciniki_musicfestivals_main.certificate.certificate_id > 0 ? 'yes' : 'no'; },\n 'fn':'M.ciniki_musicfestivals_main.certificate.remove();',\n },\n }},\n };\n this.certificate.fieldValue = function(s, i, d) { return this.data[i]; }\n this.certificate.fieldHistoryArgs = function(s, i) {\n return {'method':'ciniki.musicfestivals.certificateHistory', 'args':{'tnid':M.curTenantID, 'certificate_id':this.certificate_id, 'field':i}};\n }\n this.certificate.cellValue = function(s, i, j, d) {\n if( s == 'fields' ) {\n switch(j) {\n case 0: return d.name;\n }\n }\n }\n this.certificate.rowFn = function(s, i, d) {\n return 'M.ciniki_musicfestivals_main.certificate.save(\"M.ciniki_musicfestivals_main.certfield.open(\\'M.ciniki_musicfestivals_main.certificate.open();\\',' + d.id + ',M.ciniki_musicfestivals_main.certificate.certificate_id);\");';\n }\n this.certificate.open = function(cb, cid, fid, list) {\n if( cid != null ) { this.certificate_id = cid; }\n if( fid != null ) { this.festival_id = fid; }\n if( list != null ) { this.nplist = list; }\n M.api.getJSONCb('ciniki.musicfestivals.certificateGet', {'tnid':M.curTenantID, 'certificate_id':this.certificate_id, 'festival_id':this.festival_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_musicfestivals_main.certificate;\n p.data = rsp.certificate;\n// p.sections.general.fields.section_id.options = rsp.sections;\n p.refresh();\n p.show(cb);\n });\n }\n this.certificate.save = function(cb) {\n if( cb == null ) { cb = 'M.ciniki_musicfestivals_main.certificate.close();'; }\n if( !this.checkForm() ) { return false; }\n if( this.certificate_id > 0 ) {\n var c = this.serializeForm('no');\n if( c != '' ) {\n M.api.postJSONCb('ciniki.musicfestivals.certificateUpdate', {'tnid':M.curTenantID, 'certificate_id':this.certificate_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n eval(cb);\n });\n } else {\n eval(cb);\n }\n } else {\n var c = this.serializeForm('yes');\n M.api.postJSONCb('ciniki.musicfestivals.certificateAdd', {'tnid':M.curTenantID, 'festival_id':this.festival_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.certificate.certificate_id = rsp.id;\n eval(cb);\n });\n }\n }\n this.certificate.generateTestOutlines = function() {\n M.api.openFile('ciniki.musicfestivals.certificateGet', {'tnid':M.curTenantID, 'certificate_id':this.certificate_id, 'festival_id':this.festival_id, 'output':'pdf', 'outlines':'yes'});\n }\n this.certificate.generateTest = function() {\n M.api.openFile('ciniki.musicfestivals.certificateGet', {'tnid':M.curTenantID, 'certificate_id':this.certificate_id, 'festival_id':this.festival_id, 'output':'pdf'});\n }\n this.certificate.remove = function() {\n M.confirm('Are you sure you want to remove certificate?', null, function(rsp) {\n M.api.getJSONCb('ciniki.musicfestivals.certificateDelete', {'tnid':M.curTenantID, 'certificate_id':M.ciniki_musicfestivals_main.certificate.certificate_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.certificate.close();\n });\n });\n }\n this.certificate.nextButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.certificate_id) < (this.nplist.length - 1) ) {\n return 'M.ciniki_musicfestivals_main.certificate.save(\\'M.ciniki_musicfestivals_main.certificate.open(null,' + this.nplist[this.nplist.indexOf('' + this.certificate_id) + 1] + ');\\');';\n }\n return null;\n }\n this.certificate.prevButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.certificate_id) > 0 ) {\n return 'M.ciniki_musicfestivals_main.certificate.save(\\'M.ciniki_musicfestivals_main.certificate.open(null,' + this.nplist[this.nplist.indexOf('' + this.certificate_id) - 1] + ');\\');';\n }\n return null;\n }\n this.certificate.addButton('save', 'Save', 'M.ciniki_musicfestivals_main.certificate.save();');\n this.certificate.addClose('Cancel');\n this.certificate.addButton('next', 'Next');\n this.certificate.addLeftButton('prev', 'Prev');\n\n //\n // The panel to edit Certificate Field\n //\n this.certfield = new M.panel('Certificate Field', 'ciniki_musicfestivals_main', 'certfield', 'mc', 'medium', 'sectioned', 'ciniki.musicfestivals.main.certfield');\n this.certfield.data = null;\n this.certfield.field_id = 0;\n this.certfield.certificate_id = 0;\n this.certfield.nplist = [];\n this.certfield.sections = {\n 'general':{'label':'', 'fields':{\n 'name':{'label':'Name', 'required':'yes', 'type':'text'},\n 'field':{'label':'Field', 'type':'select', 'options':{\n 'class':'Class',\n 'timeslotdate':'Timeslot Date',\n 'participant':'Participant',\n 'title':'Title',\n 'adjudicator':'Adjudicator',\n 'placement':'Placement',\n 'text':'Text',\n }},\n 'xpos':{'label':'X Position', 'required':'yes', 'type':'text'},\n 'ypos':{'label':'Y Position', 'required':'yes', 'type':'text'},\n 'width':{'label':'Width', 'required':'yes', 'type':'text'},\n 'height':{'label':'Height', 'required':'yes', 'type':'text'},\n 'font':{'label':'Font', 'type':'select', 'options':{\n 'times':'Times',\n 'helvetica':'Helvetica',\n 'vidaloka':'Vidaloka',\n 'scriptina':'Scriptina',\n 'allison':'Allison',\n 'greatvibes':'Great Vibes',\n }},\n 'size':{'label':'Size', 'type':'text'},\n 'style':{'label':'Style', 'type':'select', 'options':{\n '':'Normal',\n 'B':'Bold',\n 'I':'Italic',\n 'BI':'Bold Italic',\n }},\n 'align':{'label':'Align', 'type':'select', 'options':{\n 'L':'Left',\n 'C':'Center',\n 'R':'Right',\n }},\n 'valign':{'label':'Vertial', 'type':'select', 'options':{\n 'T':'Top',\n 'M':'Middle',\n 'B':'Bottom',\n }},\n// 'color':{'label':'Color', 'type':'text'},\n// 'bgcolor':{'label':'Background Color', 'type':'text'},\n 'text':{'label':'Text', 'type':'text'},\n }},\n '_buttons':{'label':'', 'buttons':{\n 'save':{'label':'Save', 'fn':'M.ciniki_musicfestivals_main.certfield.save();'},\n 'delete':{'label':'Delete', \n 'visible':function() {return M.ciniki_musicfestivals_main.certfield.field_id > 0 ? 'yes' : 'no'; },\n 'fn':'M.ciniki_musicfestivals_main.certfield.remove();'},\n }},\n };\n this.certfield.fieldValue = function(s, i, d) { return this.data[i]; }\n this.certfield.fieldHistoryArgs = function(s, i) {\n return {'method':'ciniki.musicfestivals.certfieldHistory', 'args':{'tnid':M.curTenantID, 'field_id':this.field_id, 'field':i}};\n }\n this.certfield.open = function(cb, fid, cid, list) {\n if( fid != null ) { this.field_id = fid; }\n if( cid != null ) { this.certificate_id = cid; }\n if( list != null ) { this.nplist = list; }\n M.api.getJSONCb('ciniki.musicfestivals.certfieldGet', {'tnid':M.curTenantID, 'field_id':this.field_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_musicfestivals_main.certfield;\n p.data = rsp.field;\n p.refresh();\n p.show(cb);\n });\n }\n this.certfield.save = function(cb) {\n if( cb == null ) { cb = 'M.ciniki_musicfestivals_main.certfield.close();'; }\n if( !this.checkForm() ) { return false; }\n if( this.field_id > 0 ) {\n var c = this.serializeForm('no');\n if( c != '' ) {\n M.api.postJSONCb('ciniki.musicfestivals.certfieldUpdate', {'tnid':M.curTenantID, 'field_id':this.field_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n eval(cb);\n });\n } else {\n eval(cb);\n }\n } else {\n var c = this.serializeForm('yes');\n M.api.postJSONCb('ciniki.musicfestivals.certfieldAdd', {'tnid':M.curTenantID, 'certificate_id':this.certificate_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.certfield.field_id = rsp.id;\n eval(cb);\n });\n }\n }\n this.certfield.remove = function() {\n M.confirm('Are you sure you want to remove certfield?', null, function(rsp) {\n M.api.getJSONCb('ciniki.musicfestivals.certfieldDelete', {'tnid':M.curTenantID, 'field_id':M.ciniki_musicfestivals_main.certfield.field_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.certfield.close();\n });\n });\n }\n this.certfield.nextButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.field_id) < (this.nplist.length - 1) ) {\n return 'M.ciniki_musicfestivals_main.certfield.save(\\'M.ciniki_musicfestivals_main.certfield.open(null,' + this.nplist[this.nplist.indexOf('' + this.field_id) + 1] + ');\\');';\n }\n return null;\n }\n this.certfield.prevButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.field_id) > 0 ) {\n return 'M.ciniki_musicfestivals_main.certfield.save(\\'M.ciniki_musicfestivals_main.certfield.open(null,' + this.nplist[this.nplist.indexOf('' + this.field_id) - 1] + ');\\');';\n }\n return null;\n }\n this.certfield.addButton('save', 'Save', 'M.ciniki_musicfestivals_main.certfield.save();');\n this.certfield.addClose('Cancel');\n this.certfield.addButton('next', 'Next');\n this.certfield.addLeftButton('prev', 'Prev');\n\n //\n // The panel to edit Trophy\n //\n this.trophy = new M.panel('Trophy', 'ciniki_musicfestivals_main', 'trophy', 'mc', 'medium mediumaside', 'sectioned', 'ciniki.musicfestivals.main.trophy');\n this.trophy.data = null;\n this.trophy.trophy_id = 0;\n this.trophy.nplist = [];\n this.trophy.sections = {\n '_primary_image_id':{'label':'Image', 'type':'imageform', 'aside':'yes', 'fields':{\n 'primary_image_id':{'label':'', 'type':'image_id', 'hidelabel':'yes', 'controls':'all', 'history':'no',\n 'addDropImage':function(iid) {\n M.ciniki_musicfestivals_main.trophy.setFieldValue('primary_image_id', iid);\n return true;\n },\n 'addDropImageRefresh':'',\n },\n }},\n 'general':{'label':'', 'aside':'yes', 'fields':{\n 'name':{'label':'Name', 'required':'yes', 'type':'text'},\n 'category':{'label':'Category', 'type':'text'},\n 'donated_by':{'label':'Donated By', 'type':'text'},\n 'first_presented':{'label':'First Presented', 'type':'text'},\n 'criteria':{'label':'Criteria', 'type':'text'},\n }},\n '_description':{'label':'Description', 'fields':{\n 'description':{'label':'', 'hidelabel':'yes', 'type':'textarea', 'size':'large'},\n }},\n 'winners':{'label':'Winners', 'type':'simplegrid', 'num_cols':2, \n 'addTxt':'Add Winner',\n 'addFn':'M.ciniki_musicfestivals_main.trophy.save(\"M.ciniki_musicfestivals_main.trophywinner.open(\\'M.ciniki_musicfestivals_main.trophy.open();\\',0,M.ciniki_musicfestivals_main.trophy.trophy_id);\");',\n },\n '_buttons':{'label':'', 'buttons':{\n 'save':{'label':'Save', 'fn':'M.ciniki_musicfestivals_main.trophy.save();'},\n 'delete':{'label':'Delete', \n 'visible':function() {return M.ciniki_musicfestivals_main.trophy.trophy_id > 0 ? 'yes' : 'no'; },\n 'fn':'M.ciniki_musicfestivals_main.trophy.remove();'},\n }},\n };\n this.trophy.fieldValue = function(s, i, d) { return this.data[i]; }\n this.trophy.fieldHistoryArgs = function(s, i) {\n return {'method':'ciniki.musicfestivals.trophyHistory', 'args':{'tnid':M.curTenantID, 'trophy_id':this.trophy_id, 'field':i}};\n }\n this.trophy.cellValue = function(s, i, j, d) {\n if( s == 'winners' ) {\n switch(j) {\n case 0: return d.year;\n case 1: return d.name;\n }\n }\n }\n this.trophy.rowFn = function(s, i, d) {\n if( s == 'winners' ) {\n return 'M.ciniki_musicfestivals_main.trophy.save(\"M.ciniki_musicfestivals_main.trophywinner.open(\\'M.ciniki_musicfestivals_main.trophy.open();\\',' + d.id + ',M.ciniki_musicfestivals_main.trophy.trophy_id);\");';\n }\n }\n this.trophy.open = function(cb, tid, list) {\n if( tid != null ) { this.trophy_id = tid; }\n if( list != null ) { this.nplist = list; }\n M.api.getJSONCb('ciniki.musicfestivals.trophyGet', {'tnid':M.curTenantID, 'trophy_id':this.trophy_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_musicfestivals_main.trophy;\n p.data = rsp.trophy;\n p.refresh();\n p.show(cb);\n });\n }\n this.trophy.save = function(cb) {\n if( cb == null ) { cb = 'M.ciniki_musicfestivals_main.trophy.close();'; }\n if( !this.checkForm() ) { return false; }\n if( this.trophy_id > 0 ) {\n var c = this.serializeForm('no');\n if( c != '' ) {\n M.api.postJSONCb('ciniki.musicfestivals.trophyUpdate', {'tnid':M.curTenantID, 'trophy_id':this.trophy_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n eval(cb);\n });\n } else {\n eval(cb);\n }\n } else {\n var c = this.serializeForm('yes');\n M.api.postJSONCb('ciniki.musicfestivals.trophyAdd', {'tnid':M.curTenantID}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.trophy.trophy_id = rsp.id;\n eval(cb);\n });\n }\n }\n this.trophy.remove = function() {\n M.confirm('Are you sure you want to remove trophy?', null, function(rsp) {\n M.api.getJSONCb('ciniki.musicfestivals.trophyDelete', {'tnid':M.curTenantID, 'trophy_id':M.ciniki_musicfestivals_main.trophy.trophy_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.trophy.close();\n });\n });\n }\n this.trophy.nextButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.trophy_id) < (this.nplist.length - 1) ) {\n return 'M.ciniki_musicfestivals_main.trophy.save(\\'M.ciniki_musicfestivals_main.trophy.open(null,' + this.nplist[this.nplist.indexOf('' + this.trophy_id) + 1] + ');\\');';\n }\n return null;\n }\n this.trophy.prevButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.trophy_id) > 0 ) {\n return 'M.ciniki_musicfestivals_main.trophy.save(\\'M.ciniki_musicfestivals_main.trophy.open(null,' + this.nplist[this.nplist.indexOf('' + this.trophy_id) - 1] + ');\\');';\n }\n return null;\n }\n this.trophy.addButton('save', 'Save', 'M.ciniki_musicfestivals_main.trophy.save();');\n this.trophy.addClose('Cancel');\n this.trophy.addButton('next', 'Next');\n this.trophy.addLeftButton('prev', 'Prev');\n\n //\n // The panel to edit Trophy Winner\n //\n this.trophywinner = new M.panel('Trophy Winner', 'ciniki_musicfestivals_main', 'trophywinner', 'mc', 'medium', 'sectioned', 'ciniki.musicfestivals.main.trophywinner');\n this.trophywinner.data = null;\n this.trophywinner.trophy_id = 0;\n this.trophywinner.winner_id = 0;\n this.trophywinner.nplist = [];\n this.trophywinner.sections = {\n 'general':{'label':'', 'fields':{\n 'name':{'label':'Name', 'required':'yes', 'type':'text'},\n 'year':{'label':'Year', 'type':'text'},\n }},\n '_buttons':{'label':'', 'buttons':{\n 'save':{'label':'Save', 'fn':'M.ciniki_musicfestivals_main.trophywinner.save();'},\n 'delete':{'label':'Delete', \n 'visible':function() {return M.ciniki_musicfestivals_main.trophywinner.winner_id > 0 ? 'yes' : 'no'; },\n 'fn':'M.ciniki_musicfestivals_main.trophywinner.remove();'},\n }},\n };\n this.trophywinner.fieldValue = function(s, i, d) { return this.data[i]; }\n this.trophywinner.fieldHistoryArgs = function(s, i) {\n return {'method':'ciniki.musicfestivals.trophyWinnerHistory', 'args':{'tnid':M.curTenantID, 'winner_id':this.winner_id, 'field':i}};\n }\n this.trophywinner.open = function(cb, wid, tid, list) {\n if( wid != null ) { this.winner_id = wid; }\n if( tid != null ) { this.trophy_id = tid; }\n if( list != null ) { this.nplist = list; }\n M.api.getJSONCb('ciniki.musicfestivals.trophyWinnerGet', {'tnid':M.curTenantID, 'winner_id':this.winner_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_musicfestivals_main.trophywinner;\n p.data = rsp.winner;\n p.refresh();\n p.show(cb);\n });\n }\n this.trophywinner.save = function(cb) {\n if( cb == null ) { cb = 'M.ciniki_musicfestivals_main.trophywinner.close();'; }\n if( !this.checkForm() ) { return false; }\n if( this.winner_id > 0 ) {\n var c = this.serializeForm('no');\n if( c != '' ) {\n M.api.postJSONCb('ciniki.musicfestivals.trophyWinnerUpdate', {'tnid':M.curTenantID, 'winner_id':this.winner_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n eval(cb);\n });\n } else {\n eval(cb);\n }\n } else {\n var c = this.serializeForm('yes');\n M.api.postJSONCb('ciniki.musicfestivals.trophyWinnerAdd', {'tnid':M.curTenantID, 'trophy_id':this.trophy_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.trophywinner.winner_id = rsp.id;\n eval(cb);\n });\n }\n }\n this.trophywinner.remove = function() {\n M.confirm('Are you sure you want to remove trophywinner?', null, function(rsp) {\n M.api.getJSONCb('ciniki.musicfestivals.trophyWinnerDelete', {'tnid':M.curTenantID, 'winner_id':M.ciniki_musicfestivals_main.trophywinner.winner_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.trophywinner.close();\n });\n });\n }\n this.trophywinner.nextButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.winner_id) < (this.nplist.length - 1) ) {\n return 'M.ciniki_musicfestivals_main.trophywinner.save(\\'M.ciniki_musicfestivals_main.trophywinner.open(null,' + this.nplist[this.nplist.indexOf('' + this.winner_id) + 1] + ');\\');';\n }\n return null;\n }\n this.trophywinner.prevButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.winner_id) > 0 ) {\n return 'M.ciniki_musicfestivals_main.trophywinner.save(\\'M.ciniki_musicfestivals_main.trophywinner.open(null,' + this.nplist[this.nplist.indexOf('' + this.winner_id) - 1] + ');\\');';\n }\n return null;\n }\n this.trophywinner.addButton('save', 'Save', 'M.ciniki_musicfestivals_main.trophywinner.save();');\n this.trophywinner.addClose('Cancel');\n this.trophywinner.addButton('next', 'Next');\n this.trophywinner.addLeftButton('prev', 'Prev');\n\n \n //\n // This panel will allow mass updates to City and Province\n //\n this.editcityprov = new M.panel('Update', 'ciniki_musicfestivals_main', 'editcityprov', 'mc', 'medium', 'sectioned', 'ciniki.musicfestivals.main.editcityprov');\n this.editcityprov.data = null;\n this.editcityprov.city = '';\n this.editcityprov.province = '';\n this.editcityprov.sections = {\n 'general':{'label':'', 'fields':{\n 'city':{'label':'City', 'type':'text', 'visible':'yes'},\n 'province':{'label':'Province', 'type':'text'},\n }},\n '_buttons':{'label':'', 'buttons':{\n 'save':{'label':'Save', 'fn':'M.ciniki_musicfestivals_main.editcityprov.save();'},\n }},\n };\n this.editcityprov.open = function(cb, c, p) {\n if( c != null ) {\n this.city = unescape(c);\n this.sections.general.fields.city.visible = 'yes';\n } else {\n this.sections.general.fields.city.visible = 'no';\n }\n this.province = unescape(p);\n this.data = {\n 'city':unescape(c),\n 'province':unescape(p),\n };\n this.refresh();\n this.show(cb);\n }\n this.editcityprov.save = function() {\n var args = {\n 'tnid':M.curTenantID, \n 'festival_id':M.ciniki_musicfestivals_main.festival.festival_id,\n };\n if( this.sections.general.fields.city.visible == 'yes' ) {\n args['old_city'] = M.eU(this.city);\n args['new_city'] = M.eU(this.formValue('city'));\n }\n args['old_province'] = M.eU(this.province);\n args['new_province'] = M.eU(this.formValue('province'));\n M.api.getJSONCb('ciniki.musicfestivals.competitorCityProvUpdate', args, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.editcityprov.close();\n });\n }\n this.editcityprov.addButton('save', 'Save', 'M.ciniki_musicfestivals_main.editcityprov.save();');\n this.editcityprov.addClose('Cancel');\n\n //\n // Create and send a email message to a selection of competitors/teachers with\n // filtering for section, timeslot sections, etc\n //\n this.message = new M.panel('Message',\n 'ciniki_musicfestivals_main', 'message',\n 'mc', 'xlarge mediumaside', 'sectioned', 'ciniki.musicfestivals.main.message');\n this.message.data = {};\n this.message.festival_id = 0;\n this.message.message_id = 0;\n this.message.upload = null;\n this.message.nplist = [];\n this.message.sections = {\n 'details':{'label':'Details', 'type':'simplegrid', 'num_cols':2, 'aside':'yes',\n 'cellClasses':['label mediumlabel', ''],\n // Status\n // # competitors\n // # teachers\n // 'dt_sent':{'label':'Year', 'type':'text'},\n },\n 'objects':{'label':'Recipients', 'type':'simplegrid', 'num_cols':2, 'aside':'yes',\n 'cellClasses':['label', ''],\n 'addTxt':'Add/Remove Recipient(s)',\n //'addFn':'M.ciniki_musicfestivals_main.messagerefs.open(\\'M.ciniki_musicfestivals_main.message.open();\\',M.ciniki_musicfestivals_main.message.message_id);',\n 'addFn':'M.ciniki_musicfestivals_main.message.save(\"M.ciniki_musicfestivals_main.message.openrefs();\");',\n },\n '_subject':{'label':'Subject', 'fields':{\n 'subject':{'label':'Subject', 'hidelabel':'yes', 'type':'text'},\n }},\n '_content':{'label':'Message', 'fields':{\n 'content':{'label':'', 'hidelabel':'yes', 'type':'textarea', 'size':'large'},\n }},\n/* '_file':{'label':'Attach Files', \n 'fields':{\n 'attachment1':{'label':'File 1', 'type':'file', 'hidelabel':'no'},\n 'attachment2':{'label':'File 2', 'type':'file', 'hidelabel':'no'},\n 'attachment3':{'label':'File 3', 'type':'file', 'hidelabel':'no'},\n 'attachment4':{'label':'File 4', 'type':'file', 'hidelabel':'no'},\n 'attachment5':{'label':'File 5', 'type':'file', 'hidelabel':'no'},\n }}, */\n 'files':{'label':'Attachments', 'type':'simplegrid', 'num_cols':2,\n 'cellClasses':['', 'alignright fabuttons'],\n 'noData':'No attachments',\n 'addTxt':'Attach File',\n 'addTopFn':'M.ciniki_musicfestivals_main.message.save(\"M.ciniki_musicfestivals_main.message.fileAdd();\");',\n },\n '_buttons':{'label':'', 'buttons':{\n 'save':{'label':'Save', \n 'visible':function() {return M.ciniki_musicfestivals_main.message.data.status == 10 ? 'yes' : 'no'; },\n 'fn':'M.ciniki_musicfestivals_main.message.save();',\n },\n 'back':{'label':'Back', \n 'visible':function() {return M.ciniki_musicfestivals_main.message.data.status > 10 ? 'yes' : 'no'; },\n 'fn':'M.ciniki_musicfestivals_main.message.close();',\n },\n 'sendtest':{'label':'Send Test Message', \n 'visible':function() {return M.ciniki_musicfestivals_main.message.data.send == 'yes' ? 'yes' : 'no'; },\n 'fn':'M.ciniki_musicfestivals_main.message.save(\"M.ciniki_musicfestivals_main.message.sendTest();\");',\n },\n 'schedule':{'label':'Schedule', \n 'visible':function() {return M.ciniki_musicfestivals_main.message.data.send == 'yes' ? 'yes' : 'no'; },\n 'fn':'M.ciniki_musicfestivals_main.message.schedule();',\n },\n 'unschedule':{'label':'Unschedule', \n 'visible':function() {return M.ciniki_musicfestivals_main.message.data.status == 30 ? 'yes' : 'no'; },\n 'fn':'M.ciniki_musicfestivals_main.message.unschedule();',\n },\n 'sendnow':{'label':'Send Now', \n 'visible':function() {return M.ciniki_musicfestivals_main.message.data.send == 'yes' ? 'yes' : 'no'; },\n 'fn':'M.ciniki_musicfestivals_main.message.save(\"M.ciniki_musicfestivals_main.message.sendNow();\");'},\n 'delete':{'label':'Delete', \n 'visible':function() {return M.ciniki_musicfestivals_main.message.message_id > 0 && M.ciniki_musicfestivals_main.message.data.status == 10 ? 'yes' : 'no'; },\n 'fn':'M.ciniki_musicfestivals_main.message.remove();',\n },\n }},\n };\n// this.message.fieldValue = function(s, i, d) {\n// return this.data[i];\n// }\n this.message.cellValue = function(s, i, j, d) {\n if( s == 'details' ) {\n switch(j) {\n case 0: return d.label;\n case 1: return d.value;\n }\n }\n if( s == 'objects' ) {\n switch(j) {\n case 0: return d.type;\n case 1: return d.label;\n }\n }\n if( s == 'files' ) {\n switch(j) {\n case 0: return d.filename;\n }\n if( this.data.status == 10 && j == 1 ) {\n return M.faBtn('&#xf019;', 'Download', 'M.ciniki_musicfestivals_main.message.fileDownload(\\'' + escape(d.filename) + '\\');')\n + M.faBtn('&#xf014;', 'Delete', 'M.ciniki_musicfestivals_main.message.fileDelete(\\'' + escape(d.filename) + '\\');');\n }\n if( this.data.status > 10 && j == 1 ) {\n return M.faBtn('&#xf019;', 'Download', 'M.ciniki_musicfestivals_main.message.fileDownload(\\'' + escape(d.filename) + '\\');');\n }\n return '';\n }\n }\n// this.message.cellFn = function(s, i, j, d) {\n// if( s == 'objects' ) {\n// }\n// return '';\n// }\n // Add a new message with object and object_id\n this.message.addnew = function(cb, fid, o, oid) {\n var args = {'tnid':M.curTenantID, 'festival_id':fid};\n args['subject'] = '';\n args['object'] = o;\n args['object_id'] = oid;\n M.api.getJSONCb('ciniki.musicfestivals.messageAdd', args, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.message.open(cb, rsp.id);\n });\n }\n this.message.openrefs = function() {\n M.ciniki_musicfestivals_main.messagerefs.open('M.ciniki_musicfestivals_main.message.open();', M.ciniki_musicfestivals_main.message.message_id);\n }\n this.message.fileAdd = function() {\n if( this.upload == null ) {\n this.upload = M.aE('input', this.panelUID + '_file_upload', 'image_uploader');\n this.upload.setAttribute('name', 'filename');\n this.upload.setAttribute('type', 'file');\n this.upload.setAttribute('onchange', this.panelRef + '.uploadFile();');\n }\n this.upload.value = '';\n this.upload.click();\n }\n this.message.uploadFile = function() {\n var f = this.upload;\n M.api.postJSONFile('ciniki.musicfestivals.messageFileAdd', {'tnid':M.curTenantID, 'message_id':this.message_id}, f.files[0],\n function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_musicfestivals_main.message;\n p.data.files = rsp.files;\n p.refreshSection('files');\n });\n }\n this.message.fileDelete = function(f) {\n M.api.getJSONCb('ciniki.musicfestivals.messageFileDelete', {'tnid':M.curTenantID, 'message_id':this.message_id, 'filename':f}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_musicfestivals_main.message;\n p.data.files = rsp.files;\n p.refreshSection('files');\n });\n }\n this.message.fileDownload = function(f) {\n M.api.openFile('ciniki.musicfestivals.messageFileDownload', {'tnid':M.curTenantID, 'message_id':this.message_id, 'filename':f});\n }\n this.message.open = function(cb, mid, fid, list) {\n if( mid != null ) { this.message_id = mid; }\n if( fid != null ) { this.festival_id = fid; }\n if( list != null ) { this.nplist = list; }\n M.api.getJSONCb('ciniki.musicfestivals.messageGet', {'tnid':M.curTenantID, 'message_id':this.message_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_musicfestivals_main.message;\n p.data = rsp.message;\n if( rsp.message.status == 10 ) {\n p.sections.objects.addTxt = \"Add/Remove Recipients\";\n } else {\n p.sections.objects.addTxt = \"View Recipients\";\n }\n if( rsp.message.status == 10 ) {\n p.addClose('Cancel');\n p.sections._subject.fields.subject.editable = 'yes';\n p.sections._content.fields.content.editable = 'yes';\n } else {\n p.addClose('Back');\n p.sections._subject.fields.subject.editable = 'no';\n p.sections._content.fields.content.editable = 'no';\n }\n p.refresh();\n p.show(cb);\n });\n }\n this.message.save = function(cb) {\n if( cb == null ) { cb = 'M.ciniki_musicfestivals_main.message.close();'; }\n if( !this.checkForm() ) { return false; }\n if( this.message_id > 0 ) {\n var c = this.serializeForm('no');\n if( c != '' ) {\n M.api.postJSONCb('ciniki.musicfestivals.messageUpdate', {'tnid':M.curTenantID, 'message_id':this.message_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n eval(cb);\n });\n } else {\n eval(cb);\n }\n } else {\n var c = this.serializeForm('yes');\n M.api.postJSONCb('ciniki.musicfestivals.messageAdd', {'tnid':M.curTenantID, 'festival_id':this.festival_id, 'status':10}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.message.message_id = rsp.id;\n eval(cb);\n });\n }\n }\n this.message.sendTest = function() {\n M.api.getJSONCb('ciniki.musicfestivals.messageSend', {'tnid':M.curTenantID, 'message_id':this.message_id, 'send':'test'}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.alert(rsp.msg);\n M.ciniki_musicfestivals_main.message.open();\n });\n }\n this.message.sendNow = function() {\n var msg = '<b>' + (this.data.num_teachers == 0 ? 'No' : this.data.num_teachers) + '</b> teacher' + (this.data.num_teachers != 1 ? 's' :'')\n + ' and <b>' + (this.data.num_competitors == 0 ? 'no' : this.data.num_competitors) + '</b> competitor' + (this.data.num_competitors != 1 ? 's' : '') \n + ' will receive this email. <br/></br>';\n M.confirm(msg + ' Is this email correct and ready to send?', null, function() {\n M.api.getJSONCb('ciniki.musicfestivals.messageSend', {'tnid':M.curTenantID, 'message_id':M.ciniki_musicfestivals_main.message.message_id, 'send':'all'}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.alert(rsp.msg);\n M.ciniki_musicfestivals_main.message.open();\n });\n });\n }\n this.message.schedule = function() {\n var msg = '<b>' + (this.data.num_teachers == 0 ? 'No' : this.data.num_teachers) + '</b> teacher' + (this.data.num_teachers != 1 ? 's' :'')\n + ' and <b>' + (this.data.num_competitors == 0 ? 'no' : this.data.num_competitors) + '</b> competitor' + (this.data.num_competitors != 1 ? 's' : '') \n + ' will receive this email. <br/></br>';\n M.confirm(msg + 'Are you sure the email is correct and ready to be sent?', null, function() {\n M.ciniki_musicfestivals_main.messageschedule.open();\n });\n }\n this.message.schedulenow = function() {\n var sd = M.ciniki_musicfestivals_main.messageschedule.formValue('dt_scheduled');\n if( sd != this.data.dt_scheduled ) {\n M.api.getJSONCb('ciniki.musicfestivals.messageUpdate', {'tnid':M.curTenantID, 'message_id':this.message_id, 'dt_scheduled':sd, 'status':30}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.message.close();\n });\n } else {\n this.close();\n }\n }\n this.message.unschedule = function() {\n M.api.getJSONCb('ciniki.musicfestivals.messageUpdate', {'tnid':M.curTenantID, 'message_id':this.message_id, 'status':10}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.message.open();\n });\n }\n this.message.remove = function() {\n M.confirm('Are you sure you want to remove message?', null, function() {\n M.api.getJSONCb('ciniki.musicfestivals.messageDelete', {'tnid':M.curTenantID, 'message_id':M.ciniki_musicfestivals_main.message.message_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_musicfestivals_main.message.close();\n });\n });\n }\n this.message.nextButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.message_id) < (this.nplist.length - 1) ) {\n return 'M.ciniki_musicfestivals_main.message.save(\\'M.ciniki_musicfestivals_main.message.open(null,' + this.nplist[this.nplist.indexOf('' + this.message_id) + 1] + ');\\');';\n }\n return null;\n }\n this.message.prevButtonFn = function() {\n if( this.nplist != null && this.nplist.indexOf('' + this.message_id) > 0 ) {\n return 'M.ciniki_musicfestivals_main.message.save(\\'M.ciniki_musicfestivals_main.message.open(null,' + this.nplist[this.nplist.indexOf('' + this.message_id) - 1] + ');\\');';\n }\n return null;\n }\n this.message.addButton('save', 'Save', 'M.ciniki_musicfestivals_main.message.save();');\n this.message.addButton('next', 'Next');\n this.message.addLeftButton('prev', 'Prev');\n this.message.helpSections = function() {\n return {\n 'help':{'label':'Substitutions', 'type':'htmlcontent',\n 'html':'The following substitutions are available in the Message:<br/><br/>'\n + '{_first_} = Teacher/Individual first name, Group/Ensemble full name<br/>'\n + '{_name_} = Teacher/Individual/Group full name<br/>'\n },\n };\n }\n\n //\n // This panel will let the user select a date and time to send the scheduled message\n //\n this.messageschedule = new M.panel('Schedule Message',\n 'ciniki_musicfestivals_main', 'messageschedule',\n 'mc', 'medium', 'sectioned', 'ciniki.musicfestivals.main.messageschedule');\n this.messageschedule.data = {};\n this.messageschedule.sections = {\n 'general':{'label':'Schedule Date and Time', 'fields':{\n 'dt_scheduled':{'label':'', 'hidelabel':'yes', 'type':'datetime'},\n }},\n '_buttons':{'label':'', 'buttons':{\n 'send':{'label':'Schedule', \n 'fn':'M.ciniki_musicfestivals_main.message.schedulenow();',\n },\n 'delete':{'label':'Cancel',\n 'fn':'M.ciniki_musicfestivals_main.message.open();',\n },\n }},\n };\n this.messageschedule.open = function() {\n if( M.ciniki_musicfestivals_main.message.data.dt_scheduled != '0000-00-00 00:00:00' ) {\n this.data = {\n 'dt_scheduled':M.ciniki_musicfestivals_main.message.data.dt_scheduled_text,\n };\n } else {\n this.data.dt_scheduled = '';\n }\n this.refresh();\n this.show();\n }\n\n\n //\n // This panel shows the available objects that can be used to send a message to.\n //\n this.messagerefs = new M.panel('Message Recipients',\n 'ciniki_musicfestivals_main', 'messagerefs',\n 'mc', 'xlarge mediumaside', 'sectioned', 'ciniki.musicfestivals.main.messagerefs');\n this.messagerefs.data = {};\n this.messagerefs.festival_id = 0;\n this.messagerefs.message_id = 0;\n this.messagerefs.section_id = 0;\n this.messagerefs.category_id = 0;\n this.messagerefs.schedule_id = 0;\n this.messagerefs.division_id = 0;\n this.messagerefs.nplist = [];\n this.messagerefs.sections = {\n 'details':{'label':'Details', 'type':'simplegrid', 'num_cols':2, 'aside':'yes',\n 'cellClasses':['label mediumlabel', ''],\n // Status\n // # competitors\n // # teachers\n // 'dt_sent':{'label':'Year', 'type':'text'},\n },\n 'excluded':{'label':'', 'aside':'yes', 'fields':{\n 'flags1':{'label':'Include', 'type':'flagspiece', 'default':'off', 'mask':0x03,\n 'field':'flags', 'toggle':'yes', 'join':'yes',\n\n 'flags':{'0':{'name':'Everybody'},'2':{'name':'Only Competitors'}, '1':{'name':'Only Teachers'}},\n 'onchange':'M.ciniki_musicfestivals_main.messagerefs.updateFlags',\n },\n }},\n/* '_excluded':{'label':'', 'aside':'yes', 'fields':{\n 'flags1':{'label':'Exclude Competitors', 'type':'flagtoggle', 'default':'off', 'bit':0x01,\n 'field':'flags',\n 'onchange':'M.ciniki_musicfestivals_main.messagerefs.updateFlags',\n },\n 'flags2':{'label':'Exclude Teachers', 'type':'flagtoggle', 'default':'off', 'bit':0x02,\n 'field':'flags',\n 'onchange':'M.ciniki_musicfestivals_main.messagerefs.updateFlags',\n },\n }}, */\n 'objects':{'label':'Recipients', 'type':'simplegrid', 'num_cols':3, 'aside':'yes',\n 'cellClasses':['label mediumlabel', '', 'alignright'],\n 'noData':'No Recipients',\n// 'addTxt':'Add Recipient(s)',\n// 'addFn':'M.ciniki_musicfestivals_main.message.addobjects();',\n },\n '_extract':{'label':'', 'aside':'yes', 'buttons':{\n 'extract':{'label':'Extract Recipients', 'fn':'M.ciniki_musicfestivals_main.messagerefs.extractRecipients();'},\n }},\n '_tabs':{'label':'', 'type':'paneltabs', 'selected':'sections', 'tabs':{\n 'sections':{'label':'Syllabus', 'fn':'M.ciniki_musicfestivals_main.messagerefs.switchTab(\"sections\");'},\n 'categories':{'label':'Categories', \n 'visible':function() { return M.ciniki_musicfestivals_main.messagerefs.section_id > 0 ? 'yes' : 'no'; },\n 'fn':'M.ciniki_musicfestivals_main.messagerefs.switchTab(\"categories\");',\n },\n 'classes':{'label':'Classes', \n 'visible':function() { return M.ciniki_musicfestivals_main.messagerefs.category_id > 0 ? 'yes' : 'no'; },\n 'fn':'M.ciniki_musicfestivals_main.messagerefs.switchTab(\"classes\");',\n },\n 'schedule':{'label':'Schedule', 'fn':'M.ciniki_musicfestivals_main.messagerefs.switchTab(\"schedule\");'},\n 'divisions':{'label':'Divisions', \n 'visible':function() { return M.ciniki_musicfestivals_main.messagerefs.schedule_id > 0 ? 'yes' : 'no'; },\n 'fn':'M.ciniki_musicfestivals_main.messagerefs.switchTab(\"divisions\");',\n },\n 'timeslots':{'label':'Timeslots', \n 'visible':function() { return M.ciniki_musicfestivals_main.messagerefs.division_id > 0 ? 'yes' : 'no'; },\n 'fn':'M.ciniki_musicfestivals_main.messagerefs.switchTab(\"timeslots\");',\n },\n 'tags':{'label':'Registration Tags', \n 'visible':function() { return M.modFlagSet('ciniki.musicfestivals', 0x2000); },\n 'fn':'M.ciniki_musicfestivals_main.messagerefs.switchTab(\"tags\");',\n },\n 'teachers':{'label':'Teachers', 'fn':'M.ciniki_musicfestivals_main.messagerefs.switchTab(\"teachers\");'},\n 'competitors':{'label':'Competitors', 'fn':'M.ciniki_musicfestivals_main.messagerefs.switchTab(\"competitors\");'},\n }},\n/* '_file':{'label':'Attach Files', \n 'fields':{\n 'attachment1':{'label':'File 1', 'type':'file', 'hidelabel':'no'},\n 'attachment2':{'label':'File 2', 'type':'file', 'hidelabel':'no'},\n 'attachment3':{'label':'File 3', 'type':'file', 'hidelabel':'no'},\n 'attachment4':{'label':'File 4', 'type':'file', 'hidelabel':'no'},\n 'attachment5':{'label':'File 5', 'type':'file', 'hidelabel':'no'},\n }}, */\n 'sections':{'label':'Syllabus', 'type':'simplegrid', 'num_cols':2,\n 'visible':function() { return M.ciniki_musicfestivals_main.messagerefs.sections._tabs.selected == 'sections' ? 'yes' : 'no';},\n 'cellClasses':['', 'alignright fabuttons'],\n },\n 'categories':{'label':'Categories', 'type':'simplegrid', 'num_cols':2,\n 'visible':function() { return M.ciniki_musicfestivals_main.messagerefs.sections._tabs.selected == 'categories' ? 'yes' : 'no';},\n 'cellClasses':['', 'alignright fabuttons'],\n },\n 'classes':{'label':'Classes', 'type':'simplegrid', 'num_cols':2,\n 'visible':function() { return M.ciniki_musicfestivals_main.messagerefs.sections._tabs.selected == 'classes' ? 'yes' : 'no';},\n 'cellClasses':['', 'alignright fabuttons'],\n },\n 'schedule':{'label':'Schedule', 'type':'simplegrid', 'num_cols':2,\n 'visible':function() { return M.ciniki_musicfestivals_main.messagerefs.sections._tabs.selected == 'schedule' ? 'yes' : 'no';},\n 'cellClasses':['', 'alignright fabuttons'],\n },\n 'divisions':{'label':'Divisions', 'type':'simplegrid', 'num_cols':2,\n 'visible':function() { return M.ciniki_musicfestivals_main.messagerefs.sections._tabs.selected == 'divisions' ? 'yes' : 'no';},\n 'cellClasses':['', 'alignright fabuttons'],\n },\n 'timeslots':{'label':'Timeslots', 'type':'simplegrid', 'num_cols':2,\n 'visible':function() { return M.ciniki_musicfestivals_main.messagerefs.sections._tabs.selected == 'timeslots' ? 'yes' : 'no';},\n 'cellClasses':['', 'alignright fabuttons'],\n },\n 'tags':{'label':'Registration Tags', 'type':'simplegrid', 'num_cols':2,\n 'visible':function() { return M.ciniki_musicfestivals_main.messagerefs.sections._tabs.selected == 'tags' ? 'yes' : 'no';},\n 'cellClasses':['', 'alignright fabuttons'],\n },\n// 'competitor_search':{'label':'Search Competitors', 'type':'simplegrid', 'num_cols':2,\n// 'visible':function() { return M.ciniki_musicfestivals_main.messagerefs.sections._tabs.selected == 'competitors' ? 'yes' : 'no';},\n// 'cellClasses':['', 'alignright fabuttons'],\n// },\n 'competitors':{'label':'Competitors', 'type':'simplegrid', 'num_cols':2,\n 'visible':function() { return M.ciniki_musicfestivals_main.messagerefs.sections._tabs.selected == 'competitors' ? 'yes' : 'no';},\n 'headerValues':['Name', 'Status'],\n 'headerClasses':['', 'alignright'],\n 'cellClasses':['', 'alignright fabuttons'],\n 'sortable':'yes',\n 'sortTypes':['text', 'alttext'],\n },\n 'teachers':{'label':'Teachers', 'type':'simplegrid', 'num_cols':2,\n 'visible':function() { return M.ciniki_musicfestivals_main.messagerefs.sections._tabs.selected == 'teachers' ? 'yes' : 'no';},\n 'headerValues':['Name', 'Status'],\n 'headerClasses':['', 'alignright'],\n 'cellClasses':['', 'alignright fabuttons'],\n 'sortable':'yes',\n 'sortTypes':['text', 'alttext'],\n },\n '_buttons':{'label':'', 'buttons':{\n 'done':{'label':'Done', 'fn':'M.ciniki_musicfestivals_main.messagerefs.close();'},\n }},\n };\n this.messagerefs.cellSortValue = function(s, i, j, d) {\n if( d.added != null && d.added == 'yes' ) {\n return 1;\n } else if( d.included != null && d.included == 'yes' ) {\n return 2;\n } else {\n return 3;\n }\n }\n this.messagerefs.cellValue = function(s, i, j, d) {\n if( s == 'details' ) {\n switch(j) {\n case 0: return d.label;\n case 1: return d.value;\n }\n }\n if( s == 'objects' ) {\n switch(j) {\n case 0: return d.type;\n case 1: return d.label;\n case 2: return '<span class=\"faicon\">&#xf014;</span>&nbsp;';\n }\n }\n if( s == 'sections' || s == 'categories' || s == 'classes' || s == 'schedule' || s == 'divisions' || s == 'timeslots' || s == 'tags' || s == 'competitors' ) {\n if( j == 0 ) {\n return d.name;\n }\n if( j == 1 ) {\n if( d.added != null && d.added == 'yes' ) {\n if( this.data.message.status == 10 ) {\n return '<button onclick=\"event.stopPropagation();M.ciniki_musicfestivals_main.messagerefs.removeObject(\\'' + d.object + '\\',\\'' + d.id + '\\');\">Remove</button>';\n } else {\n return 'Added';\n }\n } else if( d.included != null && d.included == 'yes' ) {\n return 'Included';\n } else if( d.object != null && d.partial == null ) {\n if( this.data.message.status == 10 ) {\n return '<button onclick=\"event.stopPropagation();M.ciniki_musicfestivals_main.messagerefs.addObject(\\'' + d.object + '\\',\\'' + d.id + '\\');\">Add</button>';\n } else {\n return '';\n }\n } else if( d.object != null && d.partial == null ) {\n return '';\n }\n }\n }\n if( s == 'teachers' ) {\n if( j == 0 ) {\n return d.name;\n }\n if( j == 1 ) {\n var html = '';\n if( d.included != null ) {\n return 'Included';\n }\n else if( d.students != null ) {\n return '<button onclick=\"event.stopPropagation();M.ciniki_musicfestivals_main.messagerefs.removeObject(\\'ciniki.musicfestivals.students\\',\\'' + d.id + '\\');\">Remove Teacher & Students</button>';\n }\n else if( d.added != null ) {\n return '<button onclick=\"event.stopPropagation();M.ciniki_musicfestivals_main.messagerefs.removeObject(\\'ciniki.musicfestivals.teacher\\',\\'' + d.id + '\\');\">Remove Teacher</button>';\n }\n else { \n return '<button onclick=\"event.stopPropagation();M.ciniki_musicfestivals_main.messagerefs.addObject(\\'ciniki.musicfestivals.students\\',\\'' + d.id + '\\');\">Add Teacher & Students</button>'\n + ' <button onclick=\"event.stopPropagation();M.ciniki_musicfestivals_main.messagerefs.addObject(\\'ciniki.musicfestivals.teacher\\',\\'' + d.id + '\\');\">Add Teacher Only</button>';\n }\n }\n \n }\n }\n this.messagerefs.cellFn = function(s, i, j, d) {\n if( s == 'objects' && j == 2 ) { \n return 'M.ciniki_musicfestivals_main.messagerefs.removeObject(\\'' + d.object + '\\',\\'' + d.object_id + '\\');';\n }\n }\n this.messagerefs.rowClass = function(s, i, d) {\n if( (d.partial != null && d.partial == 'yes') ) {\n return 'statusorange';\n }\n else if( (d.added != null && d.added == 'yes')\n || (d.included != null && d.included == 'yes') \n || (d.students != null && d.students == 'yes') \n ) {\n return 'statusgreen';\n }\n }\n this.messagerefs.rowFn = function(s, i, d) {\n if( s == 'sections' || s == 'categories' || s == 'schedule' || s == 'divisions' ) {\n if( d.added == null && d.included == null ) {\n return 'M.ciniki_musicfestivals_main.messagerefs.switchSubTab(\\'' + s + '\\',' + d.id + ');';\n }\n }\n return '';\n }\n this.messagerefs.extractRecipients = function() {\n M.api.getJSONCb('ciniki.musicfestivals.messageGet', {'tnid':M.curTenantID, \n 'message_id':this.message_id, \n 'allrefs':'yes', \n 'section_id':this.section_id, \n 'category_id':this.category_id,\n 'schedule_id':this.schedule_id, \n 'division_id':this.division_id,\n 'action':'extractrecipients',\n }, this.openFinish);\n }\n this.messagerefs.switchTab = function(t) {\n this.sections._tabs.selected = t;\n if( t == 'sections' || t == 'schedule' || t == 'teachers' || t == 'competitors' || t == 'tags' ) {\n this.section_id = 0;\n this.category_id = 0;\n this.schedule_id = 0;\n this.division_id = 0;\n this.registration_tag = '';\n }\n else if( t == 'categories' ) {\n this.category_id = 0;\n this.schedule_id = 0;\n this.division_id = 0;\n this.registration_tag = '';\n }\n else if( t == 'divisions' ) {\n this.section_id = 0;\n this.category_id = 0;\n this.division_id = 0;\n this.registration_tag = '';\n }\n this.open();\n }\n this.messagerefs.switchSubTab = function(s, id) {\n/* if( s == 'sections' || s == 'schedule' || s == 'teachers' || s == 'competitors' ) {\n this.section_id = 0;\n this.category_id = 0;\n this.schedule_id = 0;\n this.division_id = 0;\n }\n else if( s == 'categories' ) {\n this.category_id = 0;\n this.schedule_id = 0;\n this.division_id = 0;\n }\n else if( s == 'divisions' ) {\n this.section_id = 0;\n this.category_id = 0;\n this.division_id = 0;\n } */\n if( s == 'sections' ) {\n this.section_id = id;\n this.switchTab('categories');\n }\n if( s == 'categories' ) {\n this.category_id = id;\n this.switchTab('classes');\n }\n if( s == 'schedule' ) {\n this.schedule_id = id;\n this.switchTab('divisions');\n }\n if( s == 'divisions' ) {\n this.division_id = id;\n this.switchTab('timeslots');\n }\n }\n this.messagerefs.updateFlags = function() {\n var f = this.data.message.flags;\n if( (this.formValue('flags1')&0x01) == 0x01 ) {\n f |= 0x01;\n } else {\n f &= 0xFFFE;\n }\n if( (this.formValue('flags1')&0x02) == 0x02 ) {\n f |= 0x02;\n } else {\n f &= 0xFFFD;\n }\n if( f != this.data.message.flags ) {\n M.api.getJSONCb('ciniki.musicfestivals.messageGet', {'tnid':M.curTenantID, \n 'message_id':this.message_id, \n 'allrefs':'yes', \n 'section_id':this.section_id, \n 'category_id':this.category_id,\n 'schedule_id':this.schedule_id, \n 'division_id':this.division_id,\n 'action':'updateflags',\n 'flags':f,\n }, this.openFinish);\n } \n }\n this.messagerefs.addObject = function(o, oid) {\n M.api.getJSONCb('ciniki.musicfestivals.messageGet', {'tnid':M.curTenantID, \n 'message_id':this.message_id, \n 'allrefs':'yes', \n 'section_id':this.section_id, \n 'category_id':this.category_id,\n 'schedule_id':this.schedule_id, \n 'division_id':this.division_id,\n 'action':'addref',\n 'object':o,\n 'object_id':oid,\n }, this.openFinish);\n }\n this.messagerefs.removeObject = function(o, oid) {\n M.api.getJSONCb('ciniki.musicfestivals.messageGet', {'tnid':M.curTenantID, \n 'message_id':this.message_id, \n 'allrefs':'yes', \n 'section_id':this.section_id, \n 'category_id':this.category_id,\n 'schedule_id':this.schedule_id, \n 'division_id':this.division_id,\n 'action':'removeref',\n 'object':o,\n 'object_id':oid,\n }, this.openFinish);\n }\n this.messagerefs.open = function(cb, mid) {\n if( cb != null ) { this.cb = cb; }\n if( mid != null ) { this.message_id = mid; }\n M.api.getJSONCb('ciniki.musicfestivals.messageGet', {'tnid':M.curTenantID, \n 'message_id':this.message_id, \n 'allrefs':'yes', \n 'section_id':this.section_id, \n 'category_id':this.category_id,\n 'schedule_id':this.schedule_id, \n 'division_id':this.division_id,\n }, this.openFinish);\n }\n this.messagerefs.openFinish = function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_musicfestivals_main.messagerefs;\n p.data = rsp;\n p.data.flags = rsp.message.flags;\n p.data.details = rsp.message.details;\n p.data.objects = rsp.message.objects;\n p.refresh();\n p.show();\n }\n this.messagerefs.goback = function() {\n if( this.sections._tabs.selected == 'categories' ) {\n this.switchTab(\"sections\");\n } else if( this.sections._tabs.selected == 'classes' ) {\n this.switchTab(\"categories\");\n } else if( this.sections._tabs.selected == 'divisions' ) {\n this.switchTab(\"schedule\");\n } else if( this.sections._tabs.selected == 'timeslots' ) {\n this.switchTab(\"divisions\");\n } else {\n this.close();\n }\n }\n this.messagerefs.addLeftButton('back', 'Back', 'M.ciniki_musicfestivals_main.messagerefs.goback();');\n\n //\n // Start the app\n // cb - The callback to run when the user leaves the main panel in the app.\n // ap - The application prefix.\n // ag - The app arguments.\n //\n this.start = function(cb, ap, ag) {\n args = {};\n if( ag != null ) {\n args = eval(ag);\n }\n \n //\n // Create the app container\n //\n var ac = M.createContainer(ap, 'ciniki_musicfestivals_main', 'yes');\n if( ac == null ) {\n M.alert('App Error');\n return false;\n }\n\n //\n // Initialize for tenant\n //\n if( this.curTenantID == null || this.curTenantID != M.curTenantID ) {\n this.tenantInit();\n this.curTenantID = M.curTenantID;\n }\n\n if( args.item_object != null && args.item_object == 'ciniki.musicfestivals.registration' && args.item_object_id != null ) {\n this.registration.open(cb, args.item_object_id, 0, 0, 0, null, args.source);\n } else if( args.registration_id != null && args.registration_id != '' ) {\n this.registration.open(cb, args.registration_id, 0, 0, 0, null, '');\n } else if( args.festival_id != null && args.festival_id != '' ) {\n this.festival.list_id = 0;\n this.festival.open(cb, args.festival_id, null);\n } else {\n this.festival.list_id = 0;\n this.menu.sections._tabs.selected = 'festivals';\n this.menu.open(cb);\n }\n }\n\n this.tenantInit = function() {\n this.festival.typestatus = '';\n this.festival.sections.ipv_tabs.selected = 'all';\n this.classes.sections._tabs.selected = 'fees';\n this.festival.section_id = 0;\n this.festival.schedulesection_id = 0;\n this.festival.scheduledivision_id = 0;\n this.festival.list_id = 0;\n this.festival.listsection_id = 0;\n this.festival.nplists = {};\n this.festival.nplist = [];\n this.festival.messages_status = 10;\n this.festival.city_prov = 'All';\n this.festival.province = 'All';\n this.festival.registration_tag = '';\n }\n}", "function mostrarPlantearEje(){ // Cuando toque el boton \"plantear ejercicios\" voy a ver la seccion (plantear tarea a alumnos)\r\n limpiar(); //limpio campos de texto y mensajes al usuario\r\n document.querySelector(\"#divDevoluciones\").style.display = \"none\"; // oculto redactar devoluciones a tareas\r\n document.querySelector(\"#homeDocente\").style.display = \"block\"; //Habilito division docente\r\n document.querySelector(\"#bodyHome\").style.display = \"none\"; //Oculto body bienvenida\r\n document.querySelector(\"#divAsignarNivel\").style.display = \"none\"; // oculto plantear ejercicios a alumnos\r\n document.querySelector(\"#divPlantearEje\").style.display = \"block\"; // muestro plantear tarea\r\n document.querySelector(\"#divEntregas\").style.display = \"none\"; // oculto redactar devoluciones a tareas\r\n document.querySelector(\"#divEstadisticas\").style.display = \"none\"; // oculto visualizar estadisticas\r\n}", "function abreModalAceiteParcela(cd_projeto, cd_proposta, cd_parcela, tx_sigla_projeto, ni_parcela) {\r\n\r\n\tvar jsonData = {'cd_projeto':cd_projeto,\r\n\t\t\t\t\t'cd_proposta': cd_proposta,\r\n\t\t\t\t\t'cd_parcela': cd_parcela,\r\n\t\t\t\t\t'ni_parcela': ni_parcela,\r\n\t\t\t\t\t'tx_sigla_projeto': tx_sigla_projeto\r\n\t\t\t\t };\r\n\teval('var buttons = {\"'+i18n.L_VIEW_SCRIPT_BTN_CANCELAR+'\": '+function(){closeDialog( 'dialog_aceite_parcela' );}+', \"'+i18n.L_VIEW_SCRIPT_BTN_SALVAR+'\": '+function(){salvarAceiteParcela();}+'};');\r\n loadDialog({\r\n id : 'dialog_aceite_parcela',\t\t//id do pop-up\r\n title : i18n.L_VIEW_SCRIPT_TITLE_DIALOG_ACEITE_PARCELA,\t\t\t// titulo do pop-up\r\n url : systemName + '/aceite-parcela',\t// url onde encontra-se o phtml\r\n data : jsonData,\t\t\t\t\t\t\t// parametros para serem transferidos para o pop-up\r\n height : 300,\t\t\t\t\t\t\t\t\t// altura do pop-up\r\n buttons : buttons\r\n });\r\n}", "function PopupAcciones() {\n\n this.$id_boton_checklist = $('#id_boton_checklist')\n this.$id_boton_plan_auditoria = $('#id_boton_plan_auditoria')\n this.init_Events()\n}", "function DetailMenuMakanan(IdMenuMakanan)\n{\n Messi.load(\"module/content.php?m=menumakanan&a=DetailMenuMakanan&IdMenuMakanan=\"+IdMenuMakanan, \n {title: 'Detail Menu Makanan', titleClass: 'info', modal: true, width: '500px', buttons: [{id: 0, label: 'Close', val: 'X', btnClass: 'btn-success'}]});\n}", "function frmInicio_(container, opc){\n \n //Crear Panel Vertical\n var vPanel = container.createVerticalPanel()\n .setWidth(\"810\")\n .setStyleAttribute(\"padding\",\"20px\")\n .setStyleAttribute(\"fontSize\", \"12pt\")\n .setId(\"panel\");\n \n // Mensaje Inicial\n var lblTitulo = container.createLabel()\n .setId(\"lblTitulo\")\n .setText(\"Registrar Movimientos de Activos\");\n \n // Mensaje Busqueda\n var lblBusqueda = container.createLabel()\n .setId(\"lblBusqueda\")\n .setText(\"Busqueda General:\");\n \n // Sub-Mensaje Busqueda\n var lblsBusqueda = container.createLabel()\n .setId(\"lblsBusqueda\")\n .setText(\"Introduzca Palabra a Buscar\");\n \n // Text Box Busqueda\n var txtBuscar = container.createTextBox()\n .setFocus(true)\n .setName(\"txtBuscar\")\n // Accion Boton Buscar\n \n //Style\n styleTitulo_(lblTitulo);\n styleLbl_(lblBusqueda);\n styleSublbl_(lblsBusqueda);\n styleTxt_(txtBuscar);\n \n //Imagen\n var imgFondo = container.createImage(URLIMAGEN)\n .setStyleAttribute(\"margin-top\",\"20px\");\n \n //Crear Panel Horizontal\n var hPanel = container.createHorizontalPanel();\n \n //Boton Buscar\n var btnBuscar = container.createButton()\n .setText(\"Buscar\");\n \n //Boton Nuevo \n var btnNuevo = container.createButton()\n .setText(\"Crear Registro\");\n \n //Style\n styleBtn_(btnBuscar);\n styleBtn_(btnNuevo); \n \n // Accion Boton Buscar\n var lnzBuscar = container.createServerHandler('clickBuscarGral_')\n .addCallbackElement(vPanel);\n btnBuscar.addClickHandler(lnzBuscar);\n \n // Accion Boton Nuevo\n var lnzNuevo = container.createServerHandler('clickNuevo_')\n .addCallbackElement(vPanel);\n btnNuevo.addClickHandler(lnzNuevo);\n \n //Agregar al Panel Horizontal\n hPanel.add(btnBuscar);\n hPanel.add(btnNuevo);\n \n // Agrega a Panel Vertical\n vPanel.add(lblTitulo);\n vPanel.add(lblBusqueda);\n vPanel.add(lblsBusqueda);\n vPanel.add(txtBuscar);\n vPanel.add(hPanel);\n vPanel.add(imgFondo);\n \n \n //Agregar a APP\n container.add(vPanel);\n}", "function nuevo_producto(){\t\t\n\t\tllama_formulario('NUEVA CIUDAD','nuevo');\t \n\t\tVentana_modal.show();\t\t\t\n\t}", "function Estiliza_menu_itens()\n{\n //PARA CADA ITEM DO MENU, BASTA CHAMAR A FUNÇÃO ABAIXO, ESPECIFICANDO\n //SEU INDICE(NUMERO), SUA COR(STRING), SEU CONTEUDO(STRING), SEU LABEL(STRING)\n //Estiliza_item(Indice, Cor, Conteudo, Texto Lateral);\n Estiliza_item(0,\"blue\",\"+\",\"Adicionar\");\n Estiliza_item(1,\"red\",\"Botão\");\n}", "function maeEstatProduPostQueryActions(datos){\n\t//Primer comprovamos que hay datos. Si no hay datos lo indicamos, ocultamos las capas,\n\t//que estubiesen visibles, las minimizamos y finalizamos\n\tif(datos.length == 0){\n\t\tdocument.body.style.cursor='default';\n\t\tvisibilidad('maeEstatProduListLayer', 'O');\n\t\tvisibilidad('maeEstatProduListButtonsLayer', 'O');\n\t\tif(get('maeEstatProduFrm.accion') == \"remove\"){\n\t\t\tparent.iconos.set_estado_botonera('btnBarra',4,'inactivo');\n\t\t}\n\t\tresetJsAttributeVars();\n\t\tminimizeLayers();\n\t\tcdos_mostrarAlert(GestionarMensaje('MMGGlobal.query.noresults.message'));\n\t\treturn;\n\t}\n\t\n\t//Guardamos los parámetros de la última busqueda. (en la variable javascript)\n\tmaeEstatProduLastQuery = generateQuery();\n\n\t//Antes de cargar los datos en la lista preparamos los datos\n\t//Las columnas que sean de tipo valores predeterminados ponemos la descripción en vez del codigo\n\t//Las columnas que tengan widget de tipo checkbox sustituimos el true/false por el texto en idioma\n\tvar datosTmp = new Vector();\n\tdatosTmp.cargar(datos);\n\t\n\t\t\n\t\n\t\n\t//Ponemos en el campo del choice un link para poder visualizar el registro (DESHABILITADO. Existe el modo view.\n\t//A este se accede desde el modo de consulta o desde el modo de eliminación)\n\t/*for(var i=0; i < datosTmp.longitud; i++){\n\t\tdatosTmp.ij2(\"<A HREF=\\'javascript:maeEstatProduViewDetail(\" + datosTmp.ij(i, 0) + \")\\'>\" + datosTmp.ij(i, maeEstatProduChoiceColumn) + \"</A>\",\n\t\t\ti, maeEstatProduChoiceColumn);\n\t}*/\n\n\t//Filtramos el resultado para coger sólo los datos correspondientes a\n\t//las columnas de la lista Y cargamos los datos en la lista\n\tmaeEstatProduList.setDatos(datosTmp.filtrar([0,1,2],'*'));\n\t\n\t//La última fila de datos representa a los timestamps que debemos guardarlos\n\tmaeEstatProduTimeStamps = datosTmp.filtrar([3],'*');\n\t\n\t//SI hay mas paginas reigistramos que es así e eliminamos el último registro\n\tif(datosTmp.longitud > mmgPageSize){\n\t\tmaeEstatProduMorePagesFlag = true;\n\t\tmaeEstatProduList.eliminar(mmgPageSize, 1);\n\t}else{\n\t\tmaeEstatProduMorePagesFlag = false;\n\t}\n\t\n\t//Activamos el botón de borrar si estamos en la acción\n\tif(get('maeEstatProduFrm.accion') == \"remove\")\n\t\tparent.iconos.set_estado_botonera('btnBarra',4,'activo');\n\n\t//Estiramos y hacemos visibles las capas que sean necesarias\n\tmaximizeLayers();\n\tvisibilidad('maeEstatProduListLayer', 'V');\n\tvisibilidad('maeEstatProduListButtonsLayer', 'V');\n\n\t//Ajustamos la lista de resultados con el margen derecho de la ventana\n\tDrdEnsanchaConMargenDcho('maeEstatProduList',20);\n\teval(ON_RSZ); \n\n\t//Es necesario realizar un repintado de la tabla debido a que hemos eliminado registro\n\tmaeEstatProduList.display();\n\t\n\t//Actualizamos el estado de los botones \n\tif(maeEstatProduMorePagesFlag){\n\t\tset_estado_botonera('maeEstatProduPaginationButtonBar',\n\t\t\t3,\"activo\");\n\t}else{\n\t\tset_estado_botonera('maeEstatProduPaginationButtonBar',\n\t\t\t3,\"inactivo\");\n\t}\n\tif(maeEstatProduPageCount > 1){\n\t\tset_estado_botonera('maeEstatProduPaginationButtonBar',\n\t\t\t2,\"activo\");\n\t\tset_estado_botonera('maeEstatProduPaginationButtonBar',\n\t\t\t1,\"activo\");\n\t}else{\n\t\tset_estado_botonera('maeEstatProduPaginationButtonBar',\n\t\t\t2,\"inactivo\");\n\t\tset_estado_botonera('maeEstatProduPaginationButtonBar',\n\t\t\t1,\"inactivo\");\n\t}\n\t\n\t//Ponemos el cursor de vuelta a su estado normal\n\tdocument.body.style.cursor='default';\n}", "function calGuiasViewDetail(idRegistro){\n\t//Abrimos ventana modal en modo de detalle pasando como parametros el id del elemento seleccionado\n\t//y los parametros de acci?n, origen y previousAction para que la lp de startup pueda determinar el modo\n\tvar parametros = new Array();\n\tparametros[\"idSelection\"] = idRegistro;\n\tparametros[\"previousAction\"] = get('calGuiasFrm.accion');\n\tparametros[\"accion\"] = 'view'\n\tparametros[\"origen\"] = 'pagina';\n\t\n\t\n\tmostrarModalSICC('CalGuiasLPStartUp', 'view', parametros, null, null);\n}", "function mostrarDevoluciones(){ // Cuando toque el boton \"devoluciones\" voy a ver la seccion (hacer devoluciones)\r\n limpiar(); //limpio campos de texto y mensajes al usuario\r\n document.querySelector(\"#homeDocente\").style.display = \"block\"; // habilito division docente\r\n document.querySelector(\"#bodyHome\").style.display = \"none\"; // oculto body bienvenida\r\n document.querySelector(\"#divAsignarNivel\").style.display = \"none\"; // oculto plantear ejercicios a alumnos\r\n document.querySelector(\"#divPlantearEje\").style.display = \"none\"; // oculto plantear tarea\r\n document.querySelector(\"#divEntregas\").style.display = \"none\"; // oculto tabla\r\n document.querySelector(\"#divDevoluciones\").style.display = \"block\"; // muestro redactar devoluciones a tareas\r\n document.querySelector(\"#divEstadisticas\").style.display = \"none\"; // oculto visualizar estadisticas\r\n}", "function selectEventi(evt, tipoRecensione, tipoProfilo) {\r\n var i, tabcontent, button;\r\n \r\n // Prendo tutti gli elementi con class=\"tabcontent\" and li nascondo\r\n tabcontent = document.getElementsByClassName(\"tabcontent\" + tipoProfilo);\r\n for (i = 0; i < tabcontent.length; i++) {\r\n tabcontent[i].style.display = \"none\";\r\n }\r\n \r\n // Prendo tutti gli elementi con class=\"button\" e rimuovo la classe \"active\"\r\n button = document.getElementsByClassName(\"btn-profilo\");\r\n for (i = 0; i < button.length; i++) {\r\n button[i].className = button[i].className.replace(\" active\", \"\");\r\n }\r\n \r\n // Mostro la tab corrente e aggiungo un \"active\" class al bottone che ha aperto tab\r\n $(\".\" + tipoRecensione + tipoProfilo).css(\"display\",\"block\");\r\n evt.currentTarget.className += \" active\";\r\n \r\n if(tipoRecensione=='OspitatoProfilo'){\r\n $(\".OspitatoProfilo\" + tipoProfilo).empty(); //svuoto la tab\r\n appendRecensioni('Ospitato',tipoProfilo);\r\n }\r\n \r\n else if(tipoRecensione=='OspitanteProfilo'){\r\n $(\".OspitanteProfilo\" + tipoProfilo).empty();//svuoto la tab\r\n appendRecensioni('Ospitante',tipoProfilo);\r\n }\r\n}", "function inicia(){\n controlVisualizacion.iniciaControlVisualizacion();\n controlVisualizacion.creaHTMLGeneral(); \n controlVisualizacion.iniciaElementosDOM();\n\n //iniciamos con la escena 1\n controlVisualizacion.comenzamos();\n}", "function inicia(){\n controlVisualizacion.iniciaControlVisualizacion();\n controlVisualizacion.creaHTMLGeneral(); \n controlVisualizacion.iniciaElementosDOM();\n\n //iniciamos con la escena 1\n controlVisualizacion.comenzamos();\n}", "function mostrar() {\n miLibro.mostrar();\n}", "function mostrarPrimPantalla(){\n\n \t\t$('#cuadro-preguntas').addClass(\"hidden\");//ocultar\n\t\t$('#segunda-pantalla').removeClass(\"hidden\");//mostrar\n \t}", "function iniciar() {\n configurarBotonesMesas();\n configurarBotonesMenu();\n}", "function gameMenutoPrologue() {\n if (store.getState().lastAction == MENU_CHANGE && store.getState().previousPage == 'GAME_MENU' && store.getState().currentPage == 'PROLOGUE') {\n mainSfxController(preloaderSfxSource);\n preloaderStarter();\n\n setTimeout(function(){\n gameMenuBattlePanelDeleter();\n gameMenu.classList.add('pagehide');\n prologue.classList.remove('pagehide');\n prologueComic1id.classList.add('prologue-comic-1');\n prologueComic2id.classList.add('prologue-comic-2');\n prologueComic3id.classList.add('prologue-comic-3');\n prologueComic4id.classList.add('prologue-comic-4');\n prologueComic5id.classList.add('prologue-comic-5');\n prologueComicClickid.classList.add('prologue-comic-click');\n }, 600);\n\n setTimeout(function(){\n addEvent(prologue, 'click', prologuetoBattleMapStateChangeStarter, undefined);\n prologue.classList.add('pointer');\n }, 8600);\n }\n }", "function createInspektor()\n{\n addCSS(); //nahraje do hlavicky css pro inspektor\n setEventBody(); //definovani obsluznych funkci pro udalosti nakter ma reagovat puvodni telo\n \n createInspektorElem(); // tvoreni tela inspektrou\n \n modalWindow(); //pomocny \"dialog\" pro meneni atributu class a id\n setEventDialog();\n}", "function affiche_produit(MenuID) {\n\tchangeOpac(0,\"photo_menu\");\n\tnb_div=list_div.length;\n\tfor (i=0;i<nb_div;i++) {\n\tdocument.getElementById(list_div[i]).style.display=\"none\";\t\n\tdocument.getElementById('qte_'+MenuID).value=1;\n\t}\n\tdocument.getElementById(MenuID).style.display=\"block\";\n\tdocument.getElementById(\"photo_menu\").src=list_img[MenuID];\n\topacity('photo_menu',0,100,500);\n\tdocument.getElementById(\"name_produit\").innerHTML=\"<strong>\"+list_name[MenuID]+\"</strong>\";\n\tdocument.getElementById(\"note_produit\").innerHTML=list_note[MenuID];\n}", "function addButtonsToProductoBasicoGrid() {\r\n\tif ($('#addGrant').val() == 'S') {\r\n\t\tvar title = 'Agregar Producto';\r\n\t\t$('#gridProductosBasicosId').navButtonAdd(\r\n\t\t\t\t'#gridProductosBasicosPager',\r\n\t\t\t\t{\r\n\t\t\t\t\tcaption : 'Agregar',\r\n\t\t\t\t\tbuttonicon : 'ui-icon ui-icon-plus',\r\n\t\t\t\t\tonClickButton : function() {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t$('#gridProductosBasicosId').resetSelection();\r\n\t\t\t\t\t\t\tprocessEditProductoBasico(0, false,\r\n\t\t\t\t\t\t\t\t\t'Ingresar Producto', 'A');\r\n\t\t\t\t\t\t} catch (e) {\r\n\t\t\t\t\t\t\tjsError('loadProductosBasicosGrid(...)', e);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tposition : 'last',\r\n\t\t\t\t\ttitle : title\r\n\t\t\t\t});\r\n\t}\r\n\tif ($('#editGrant').val() == 'S') {\r\n\t\tvar title = 'Editar Producto';\r\n\t\t$('#gridProductosBasicosId').navButtonAdd(\r\n\t\t\t\t'#gridProductosBasicosPager',\r\n\t\t\t\t{\r\n\t\t\t\t\tcaption : 'Editar',\r\n\t\t\t\t\tbuttonicon : 'ui-icon ui-icon-pencil',\r\n\t\t\t\t\tonClickButton : function() {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tvar rowid = getSelRowFromProductoBasicoGrid();\r\n\t\t\t\t\t\t\tif (rowid != null) {\r\n\t\t\t\t\t\t\t\tprocessEditProductoBasico(rowid, false,\r\n\t\t\t\t\t\t\t\t\t\t'Editar Producto', 'E');\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tseleccioneRegistro();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} catch (e) {\r\n\t\t\t\t\t\t\tjsError('loadProductosBasicosGrid(...)', e);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tposition : 'last',\r\n\t\t\t\t\ttitle : title\r\n\t\t\t\t});\r\n\t}\r\n\tif ($('#deleteGrant').val() == 'S') {\r\n\t\tvar title = 'Eliminar Producto';\r\n\t\t$('#gridProductosBasicosId').navButtonAdd(\r\n\t\t\t\t'#gridProductosBasicosPager',\r\n\t\t\t\t{\r\n\t\t\t\t\tcaption : 'Eliminar',\r\n\t\t\t\t\tbuttonicon : 'ui-icon ui-icon-pencil',\r\n\t\t\t\t\tonClickButton : function() {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tvar rowid = getSelRowFromProductoBasicoGrid();\r\n\t\t\t\t\t\t\tif (rowid != null) {\r\n\t\t\t\t\t\t\t\tprocessEditProductoBasico(rowid, false,\r\n\t\t\t\t\t\t\t\t\t\t'Eliminar Producto', 'D');\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tseleccioneRegistro();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} catch (e) {\r\n\t\t\t\t\t\t\tjsError('loadProductosBasicosGrid(...)', e);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tposition : 'last',\r\n\t\t\t\t\ttitle : title\r\n\t\t\t\t});\r\n\t}\r\n\tif ($('#selectGrant').val() == 'S') {\r\n\t\tvar title = 'Consulta Producto';\r\n\t\t$('#gridProductosBasicosId').navButtonAdd(\r\n\t\t\t\t'#gridProductosBasicosPager',\r\n\t\t\t\t{\r\n\t\t\t\t\tcaption : 'Consultar',\r\n\t\t\t\t\tbuttonicon : 'ui-icon ui-icon-pencil',\r\n\t\t\t\t\tonClickButton : function() {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tvar rowid = getSelRowFromProductoBasicoGrid();\r\n\t\t\t\t\t\t\tif (rowid != null) {\r\n\t\t\t\t\t\t\t\tprocessEditProductoBasico(rowid, false,\r\n\t\t\t\t\t\t\t\t\t\t'Consultar Producto', 'C');\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tseleccioneRegistro();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} catch (e) {\r\n\t\t\t\t\t\t\tjsError('loadProductosBasicosGrid(...)', e);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tposition : 'last',\r\n\t\t\t\t\ttitle : title\r\n\t\t\t\t});\r\n\t}\r\n}", "function mostrarPermisos(data){\n\n\t\tif(data.add == 1){\n\t\t\taddIcoPermOk(\"add-est\");\n\t\t\taddBtnQuitar(\"add\");\n\t\t}else{\n\t\t\taddIcoPermNOk(\"add-est\");\n\t\t\taddBtnAdd(\"add\");\n\t\t}\n\t\tif(data.upd == 1){\n\t\t\taddIcoPermOk(\"upd-est\");\n\t\t\taddBtnQuitar(\"upd\");\n\t\t}else{\n\t\t\taddIcoPermNOk(\"upd-est\");\n\t\t\taddBtnAdd(\"upd\");\n\t\t}\n\t\tif(data.del == 1){\n\t\t\taddIcoPermOk(\"del-est\");\n\t\t\taddBtnQuitar(\"del\");\n\t\t}else{\n\t\t\taddIcoPermNOk(\"del-est\");\n\t\t\taddBtnAdd(\"del\");\n\t\t}\n\t\tif(data.list == 1){\n\t\t\taddIcoPermOk(\"list-est\");\n\t\t\taddBtnQuitar(\"list\");\n\t\t}else{\n\t\t\taddIcoPermNOk(\"list-est\");\n\t\t\taddBtnAdd(\"list\");\n\t\t}\n\n\t\t/*Una vez dibujados los permisos del usuario, \n\t\tel selector de usuario obtiene el foco */\n\t\t$('select#usuario').focus(); \n\n\t}", "function mostrarFormulario(){\n var acum; \n //variable que permite saber que es un registrar\n encontrado=0; \n if(ventana==null) \n ventana = Ext.create ('App.miVentanaBanco')\n limpiar();\n ventana.show();\n }", "function visualiserAuteurControls(){\n var vControles = [\"lbledNomAuteur\",\"txtedNomAuteur\",\n \"lbledPreAuteur\",\"txtedPreAuteur\",\"lbledSaveAute\",\"btnedSaveAute\"];\n visualiserControls(\"btnedaddAute\" ,vControles,\"cboxedAute\");\n} // end visualiser", "function abrirPantallaConfig() {\n\n Menu.setApplicationMenu(null);\n pantallaConfig = new BrowserWindow({\n width: 600,\n height: 400,\n icon: __dirname + \"/icons/favi.png\",\n transparent: true,\n webPreferences: {\n nodeIntegration: true\n },\n show: false\n })\n pantallaConfig.loadFile('src/frnt/views/conexiones.html')\n pantallaConfig.on('closed', () => { pantallaConfig = null })\n pantallaConfig.once('ready-to-show', () => { pantallaConfig.show() })\n /* pantallaConfig.webContents.openDevTools() */\n}", "function pReporAtras(){\r\n $(\"#generarReporte\").hide();\r\n\r\n $(\"#menu\").show();\r\n}", "function __m_menuBtns_init(){\n\t\t__m_menuBtns_effect();\n\t\t__m_menuBtns_click();\n\n\t\t_m_prozor_init();\n\t}", "function configurar()\n{\n\talert (\"en proceso...\");\n\treturn;\n\tvar rows = oTable._('tr', {\"filter\": \"applied\"});// oTable.fnGetNodes();\n\tvar total = rows.length;\n\tvar ids= [];\n\tfor (m in marcadores) {\n\t\tmarcadores[m].marca.map = null;\n }\n\tfor (var i = 0; i < rows.length; i++)\n\t{\n\t\t// cells.push($(rows[i]).find(\"td:eq(8)\" ).html());\n\t\tvar texto = rows[i];\n\t\tids.push( texto[0] );\n\t\tfor (m in marcadores) {\n\t\t\tif (marcadores[m].titulo === texto[0])\n\t\t\t{\n\t\t\t\tmarcadores[m].marca.map = map;\n\t\t\t\tbreak;\n\t\t\t}\n\t }\n\t\t\n\t}\n\t// alert( ids );\n\twindow.open(\"admin/orden.php?id=\"+ids,'','width=600,height=400,toolbar=no,location=no,left=200,top=200');\n}", "function limpiarCapaParadas(){\n lienzoParadas.destroyFeatures();\n //Comprobar si existe algun popUp abierto\n if (map.popups.length == 1) {\n map.removePopup(map.popups[0]);\n }\n}", "function Buscar() {\n var nombreTipoHabitacion = get(\"txtNombreTipoHabitacion\")\n //alert(nombreTipoHabitacion);\n pintar({\n url: \"TipoHabitacion/filtrarTipoHabitacionPorNombre/?nombreHabitacion=\" + nombreTipoHabitacion,\n id: \"divTabla\",\n cabeceras: [\"Id\", \"Nombre\", \"Descripcion\"],\n propiedades: [\"id\", \"nombre\", \"descripcion\"],\n editar: true,\n eliminar: true,\n propiedadID: \"id\"\n\n })\n\n}", "function visualiserEditeurControls(){\n //\"lbledPays\",\"cboxedPays\",\n var vControles = [\n \"lbledNomEditeur\", \"txtedNomEditeur\",\n \"lbledVille\", \"btnedaddVill\", \"cboxedVill\",\n \"lbledSaveEdit\",\"btnedSaveEdit\"//,\n //\"lbledaddVille\" , \"txtedaddVille\"\n ];\n visualiserControls(\"btnedaddEdit\",vControles,\"cboxedEdit\");\n} // end visualiser", "function addPratoSelecionado() {\n let qntMedidas = medidas.length;\n let qntValorSelecionado = arrayValores.length;\n\n if (qntValorSelecionado != qntMedidas) {\n alert(\"Selecione Um valor pra cada medidas ou escolha \\\"desativado\\\"\")\n } else {\n const criaArray = (array) => {\n const arr = [];\n for (const item of array) {\n arr.push(item.prato)\n }\n return arr;\n }\n\n let arrayPratos = criaArray(listaPratosDia);\n let existeItem = arrayPratos.findIndex(i => i == valueListaPrato);\n\n if (existeItem == -1) {\n listaPratosDia.push({\n prato: valueListaPrato,\n info: arrayValores\n });\n\n setctx_SP(listaPratosDia);\n } else {\n alert('Este prato já está na lista!');\n }\n /* console.log('-------------------------------------------------------------------------')\n console.log(ctx_SP);\n //console.log(listaPratosDia);\n console.log('-------------------------------------------------------------------------') */\n }\n }", "function solucioPanell( numpagines )\r\n {\r\n \t// creem fons de motor\r\n \tthis.fons = new createjs.Shape();\r\n \tthis.fons.graphics.beginFill(\"#0D3158\").drawRect(0, 0, 950, 51);\r\n \t// creem contenidor\r\n \tthis.contenedor = new createjs.Container();\r\n \tthis.contenedor.x = 0;\r\n\tthis.contenedor.y = 558;\r\n\t// configuremm dades de paginació\r\n\tthis.currentPag= Motor.currentNumPag;\r\n\tthis.numPagines = numpagines;\r\n \t//creem botons del panell\r\n \tthis.reintentar = new Boton( 146, 29, pppPreloader.from(\"module\", 'motor/images/btnRestaurar.png'), LangRes.lang[ LangRes.REINTENTAR ],\"left\");\r\n \tthis.solucio = new Boton( 148, 29, pppPreloader.from(\"module\", 'motor/images/btnSolucio.png'), LangRes.lang[ LangRes.SOLUCION ],\"left\");\r\n \t\r\n \tthis.solucio.contenedor.x = 786;\r\n \tthis.solucio.contenedor.y = 12;\r\n \t\r\n \tthis.reintentar.contenedor.x = 15; \r\n \tthis.reintentar.contenedor.y = 12;\r\n \t// afegim components al contenidor principal\r\n \tthis.contenedor.addChild( this.fons );\r\n \tthis.contenedor.addChild( this.text );\r\n \tthis.contenedor.addChild( this.solucio.contenedor );\r\n \t\r\n \tif( Scorm.modo != Scorm.MODO_REVISAR )\r\n \t\tthis.contenedor.addChild( this.reintentar.contenedor );\r\n \t\r\n \t\r\n \tthis.pagines =\"\";\r\n\r\n\tif( this.numPagines > 1 ){ // si tenim més d'una pagina mostrem la paginacio\r\n \t\t//creem paginador\r\n \t\tthis.pagines = new Paginador(this.numPagines);\r\n \t\tthis.pagines.contenedor.x =315;\r\n \t\tthis.pagines.contenedor.y = 11;\r\n \t\t// creem boto seguent pagina\r\n \t\tthis.seguent = new Boton(144,28,pppPreloader.from(\"module\", 'motor/images/btnSeguent.png'), LangRes.lang[ LangRes.SIGUIENTE ],\"left\");\r\n \t\tthis.seguent.contenedor.x = 285 + this.numPagines*31 + 40; \r\n \t\tthis.seguent.contenedor.y = 12;\r\n \t\t// afegim components a contenidor principal\r\n \t\tthis.contenedor.addChild( this.pagines.contenedor );\r\n \t\tthis.contenedor.addChild( this.seguent.contenedor );\r\n \t\t//seleccionem pagina actual\r\n \t\tthis.pagines.pags[this.currentPag].state(\"select\"); \r\n \t\tif(this.currentPag == this.numPagines - 1) this.seguent.contenedor.visible = false;\r\n \t}\r\n \t//posem contenidor al canvas amb transició\r\n \tMain.stage.removeChild(Contenedor.missatge.contenedor);\r\n\tMain.stage.addChild( this.contenedor );\r\n\tthis.contenedor.alpha =0;\r\n\tcreatejs.Tween.get(this.contenedor).to({alpha:1}, 1250, createjs.Ease.circOut);\r\n\t\r\n\tif(this.numPagines > 1)\r\n \t{\r\n \t\t//validació de estat de pagina (correcte / incorrecte)\r\n\t\tthis.validaPags();\r\n\t\t// seleccionem pagina actual\r\n\t\tthis.selectPag(this.currentPag+1);\r\n\t}\r\n }", "function mostrarFormCrearProv(){\n vista.mostrarPlantilla('formProveedor', 'areaTrabajo');\n document.getElementById(\"btnProveedorLimpiar\").addEventListener(\"click\", limpiarFormCrearProv);\n document.getElementById(\"btnProveedorModificar\").addEventListener(\"click\", modificarProveedor);\n document.getElementById(\"btnProveedorCrear\").addEventListener(\"click\", crearProveedor);\n document.getElementById(\"idProveedor\").addEventListener(\"change\", mostrarDatosProveedor);\n proveedor.consultarProveedores(consultarProveedoresRetorno); //cargar el select de proveedores\n}", "function displayfirstpropertiestab() {\n document.getElementById('propertiesmain').click();\n}", "function ciniki_events_registrations() {\n //\n // events panel\n //\n this.menu = new M.panel('Events', 'ciniki_events_registrations', 'menu', 'mc', 'medium narrowaside', 'sectioned', 'ciniki.events.registrations.menu');\n this.menu.event_id = 0;\n this.menu.price_id = 0;\n this.menu.sections = {\n// 'search':{'label':'', 'type':'livesearch'},\n 'prices':{'label':'Prices', 'type':'simplegrid', 'num_cols':1, 'aside':'yes',\n },\n '_buttons':{'label':'', 'aside':'yes', 'buttons':{\n// 'registrationspdf':{'label':'Registration List (PDF)', 'fn':'M.ciniki_courses_registrations.offeringRegistrationsPDF(M.ciniki_courses_registrations.menu.offering_id);'},\n 'registrationsexcel':{'label':'Registration List (Excel)', 'fn':'M.ciniki_events_registrations.menu.excel();'},\n 'individualtickets':{'label':'Tickets List (Excel)', \n 'visible':function() { return M.modFlagOn('ciniki.events', 0x08); },\n 'fn':'M.ciniki_events_registrations.menu.individualtickets();'},\n 'email':{'label':'Email Customers', \n 'fn':'M.ciniki_events_registrations.menu.emailCustomers();'},\n }},\n 'registrations':{'label':'Registrations', 'type':'simplegrid', 'num_cols':3,\n 'sortable':'yes',\n 'sortTypes':['text', 'number', 'text'],\n 'cellClasses':['multiline', 'multiline', 'multiline'],\n 'addTxt':'Add Registration',\n 'addFn':'M.ciniki_events_registrations.edit.addCustomer(\\'M.ciniki_events_registrations.menu.open();\\',M.ciniki_events_registrations.menu.event_id);',\n },\n };\n this.menu.cellValue = function(s, i, j, d) {\n if( s == 'prices' ) {\n return M.textCount(d.label, d.num_tickets);\n }\n if( s == 'registrations' ) {\n switch(j) {\n case 0: return '<span class=\"maintext\">' + d.customer_name + '</span><span class=\"subtext\">' + d.customer_notes + '</span>';\n case 1: return '<span class=\"maintext\">' + d.num_tickets + '</span>';\n case 2: \n var txt = '';\n if( (M.curTenant.modules['ciniki.events'].flags&0x04)>0 ) {\n txt += '<span class=\"maintext\">' + d.status_text + '</span>';\n } \n if( M.curTenant.modules['ciniki.sapos'] != null ) {\n if( txt != '' ) {\n txt += '<span class=\"subtext\">' + d.invoice_status_text + '</span>';\n } else {\n txt += '<span class=\"maintext\">' + d.invoice_status_text + '</span>';\n }\n }\n return txt;\n }\n }\n };\n this.menu.sectionData = function(s) {\n return this.data[s];\n };\n this.menu.rowFn = function(s, i, d) {\n if( s == 'prices' ) {\n return 'M.ciniki_events_registrations.menu.selectPrice(' + d.id + ');'; \n } \n if( s == 'registrations' ) {\n return 'M.ciniki_events_registrations.edit.open(\\'M.ciniki_events_registrations.menu.open();\\',null,null,\\'' + d.id + '\\');';\n }\n };\n this.menu.rowClass = function(s, i, d) {\n if( d.id == this.price_id ) {\n return 'highlight';\n }\n return '';\n }\n this.menu.emailCustomers = function() {\n var customers = [];\n for(var i in this.data.registrations) {\n customers[i] = {\n 'id':this.data.registrations[i].customer_id,\n 'name':this.data.registrations[i].customer_name,\n };\n }\n M.startApp('ciniki.mail.omessage',\n null,\n 'M.ciniki_events_registrations.menu.open();',\n 'mc',\n {'subject':'Re: Membership',\n 'list':customers, \n 'removeable':'yes',\n });\n }\n this.menu.selectPrice = function(id) {\n this.open(null,null,id);\n }\n this.menu.open = function(cb, eid, pid) {\n this.data = {};\n if( eid != null ) { this.event_id = eid; }\n if( pid != null ) { this.price_id = pid; }\n M.api.getJSONCb('ciniki.events.registrationList', {'tnid':M.curTenantID, \n 'event_id':this.event_id, 'price_id':this.price_id, }, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_events_registrations.menu;\n p.data = rsp;\n if( rsp.registrations.length > 0 ) {\n p.sections.registrations.headerValues = ['Name', 'Tickets', 'Status'];\n } else {\n p.sections.registrations.headerValues = null;\n }\n if( M.curTenant.modules['ciniki.sapos'] != null || (M.curTenant.modules['ciniki.events'].flags&0x04) > 0 ) {\n p.sections.registrations.num_cols = 3;\n } else {\n p.sections.registrations.num_cols = 2;\n }\n p.refresh();\n p.show(cb);\n });\n };\n this.menu.excel = function() {\n M.api.openFile('ciniki.events.eventRegistrations', {'tnid':M.curTenantID, 'output':'excel', 'event_id':this.event_id, 'price_id':this.price_id});\n }\n this.menu.individualtickets = function() {\n M.api.openFile('ciniki.events.eventRegistrations', {'tnid':M.curTenantID, 'output':'exceltickets', 'event_id':this.event_id, 'price_id':this.price_id});\n }\n this.menu.addButton('add', 'Add', 'M.ciniki_events_registrations.edit.addCustomer(\\'M.ciniki_events_registrations.menu.open();\\',M.ciniki_events_registrations.menu.event_id);');\n this.menu.addClose('Back');\n\n //\n // The panel for editing a registrant\n //\n this.edit = new M.panel('Registrant', 'ciniki_events_registrations', 'edit', 'mc', 'medium mediumaside', 'sectioned', 'ciniki.events.registrations.edit');\n this.edit.data = null;\n this.edit.customer_id = 0;\n this.edit.event_id = 0;\n this.edit.registration_id = 0;\n this.edit.sections = { \n 'customer_details':{'label':'Customer', 'type':'simplegrid', 'num_cols':2, 'aside':'yes',\n 'cellClasses':['label',''],\n 'addTxt':'Edit',\n 'addFn':'M.startApp(\\'ciniki.customers.edit\\',null,\\'M.ciniki_events_registrations.edit.updateCustomer(null);\\',\\'mc\\',{\\'next\\':\\'M.ciniki_events_registrations.edit.updateCustomer\\',\\'customer_id\\':M.ciniki_events_registrations.edit.customer_id});',\n },\n 'invoice':{'label':'Invoice', 'visible':'no', 'type':'simplegrid', 'num_cols':5,\n 'headerValues':['Invoice #', 'Date', 'Customer', 'Amount', 'Status'],\n 'cellClasses':['',''],\n// 'addTxt':'',\n// 'addFn':'M.ciniki_events_registrations.edit.save(\\'yes\\');',\n// 'addFn':'M.startApp(\\'ciniki.sapos.invoice\\',null,\\'M.ciniki_events_registrations.edit.open();\\',\\'mc\\',{\\'customer_id\\':M.ciniki_events_registrations.edit.customer_id});',\n },\n 'registration':{'label':'Registration', 'fields':{\n 'status':{'label':'Status', 'active':'no', 'type':'toggle', 'default':'10', 'toggles':{'10':'Reserved', '20':'Confirmed', '30':'Paid'}},\n 'num_tickets':{'label':'Number of Tickets', 'type':'text', 'size':'small'},\n 'price_id':{'label':'Price', 'type':'select', 'active':'no', 'options':{}},\n }},\n '_customer_notes':{'label':'Customer Notes', 'fields':{\n 'customer_notes':{'label':'', 'hidelabel':'yes', 'hint':'', 'size':'small', 'type':'textarea'},\n }},\n '_notes':{'label':'Private Notes', 'fields':{\n 'notes':{'label':'', 'hidelabel':'yes', 'hint':'', 'size':'small', 'type':'textarea'},\n }},\n '_buttons':{'label':'', 'buttons':{\n 'save':{'label':'Save', 'fn':'M.ciniki_events_registrations.edit.save();'},\n 'saveandinvoice':{'label':'Save and Invoice', 'fn':'M.ciniki_events_registrations.edit.save(\\'yes\\');'},\n 'delete':{'label':'Delete', 'fn':'M.ciniki_events_registrations.edit.remove();'},\n }},\n }; \n this.edit.fieldValue = function(s, i, d) { return this.data[i]; }\n this.edit.fieldHistoryArgs = function(s, i) {\n return {'method':'ciniki.events.registrationHistory', 'args':{'tnid':M.curTenantID, \n 'registration_id':this.registration_id, 'event_id':this.event_id, 'field':i}};\n }\n this.edit.sectionData = function(s) {\n if( s == 'invoice' ) { return this.data[s]!=null?{'invoice':this.data[s]}:{}; }\n return this.data[s];\n }\n this.edit.cellValue = function(s, i, j, d) {\n if( s == 'customer_details' ) {\n switch(j) {\n case 0: return d.detail.label;\n case 1: return d.detail.value.replace(/\\n/, '<br/>');\n }\n } \n if( s == 'invoice' ) {\n switch(j) {\n case 0: return d.invoice_number;\n case 1: return d.invoice_date;\n case 2: return (d.customer!=null&&d.customer.display_name!=null)?d.customer.display_name:'';\n case 3: return d.total_amount_display;\n case 4: return d.payment_status_text;\n }\n }\n };\n this.edit.rowFn = function(s, i, d) { \n if( s == 'invoice' ) { return 'M.startApp(\\'ciniki.sapos.invoice\\',null,\\'M.ciniki_events_registrations.edit.open();\\',\\'mc\\',{\\'invoice_id\\':\\'' + d.id + '\\'});'; }\n return ''; \n };\n this.edit.open = function(cb, cid, eid, rid) {\n this.reset();\n if( cid != null ) { this.customer_id = cid; }\n if( eid != null ) { this.event_id = eid; }\n if( rid != null ) { this.registration_id = rid; }\n\n // Check if this is editing a existing registration or adding a new one\n if( this.registration_id > 0 ) {\n this.sections._buttons.buttons.delete.visible = 'yes';\n M.api.getJSONCb('ciniki.events.registrationGet', {'tnid':M.curTenantID, \n 'registration_id':this.registration_id, 'customer':'yes', 'invoice':'yes'}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_events_registrations.edit;\n p.data = rsp.registration;\n p.event_id = rsp.registration.event_id;\n p.customer_id = rsp.registration.customer_id;\n p.sections.invoice.visible=(M.curTenant.modules['ciniki.sapos']!=null)?'yes':'no';\n p.sections._buttons.buttons.saveandinvoice.visible=(M.curTenant.modules['ciniki.sapos']!=null&&rsp.registration.invoice_id==0)?'yes':'no';\n p.event_id = rsp.registration.event_id;\n if( M.modOn('ciniki.sapos') ) {\n p.sections.registration.fields.price_id.active = 'yes';\n p.sections.registration.fields.price_id.options = {};\n if( rsp.registration.prices != null ) {\n for(var i in rsp.registration.prices) {\n p.sections.registration.fields.price_id.options[rsp.registration.prices[i].id] = rsp.registration.prices[i].name + ' ' + rsp.registration.prices[i].unit_amount_display;\n }\n }\n } else {\n p.sections.registration.fields.price_id.active = 'no';\n }\n// p.sections.registration.fields.price_id.active = (M.curTenant.modules['ciniki.events'].flags&0x04)>0?'yes':'no';\n p.refresh();\n p.show(cb);\n });\n } else if( this.customer_id > 0 ) {\n this.sections._buttons.buttons.delete.visible = 'no';\n M.api.getJSONCb('ciniki.customers.customerDetails', {'tnid':M.curTenantID, \n 'customer_id':this.customer_id, 'phones':'yes', 'emails':'yes'}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_events_registrations.edit;\n p.data = {'customer_details':rsp.details};\n p.sections._buttons.buttons.saveandinvoice.visible = (M.curTenant.modules['ciniki.sapos']!=null)?'yes':'no';\n p.refresh();\n p.show(cb);\n });\n }\n };\n this.edit.save = function(inv) {\n var quantity = this.formFieldValue(this.sections.registration.fields.num_tickets, 'num_tickets');\n var price_id = 0;\n if( M.modOn('ciniki.sapos') ) {\n price_id = this.formValue('price_id');\n }\n if( this.registration_id > 0 ) {\n var c = this.serializeForm('no');\n if( this.data.customer_id != this.customer_id ) {\n c += 'customer_id=' + this.customer_id + '&';\n }\n if( c != '' ) {\n M.api.postJSONCb('ciniki.events.registrationUpdate', \n {'tnid':M.curTenantID, \n 'registration_id':M.ciniki_events_registrations.edit.registration_id}, c,\n function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n } \n var p = M.ciniki_events_registrations.edit;\n if( inv != null && inv == 'yes' ) {\n p.newInvoice(this.registration_id, price_id, quantity);\n// M.ciniki_events_registrations.newinvoice.open('M.ciniki_events_registrations.edit.open(null,null,'+p.registration_id+',null);', p.event_id, p.customer_id, p.registration_id, quantity);\n } else {\n p.close();\n }\n });\n } else {\n if( inv != null && inv == 'yes' ) {\n this.newInvoice(this.registration_id, price_id, quantity);\n// M.ciniki_events_registrations.newinvoice.open('M.ciniki_events_registrations.edit.open(null,null,'+this.registration_id+',null);', this.event_id, this.customer_id, this.registration_id, quantity);\n } else {\n this.close();\n }\n }\n } else {\n var c = this.serializeForm('yes');\n M.api.postJSONCb('ciniki.events.registrationAdd', \n {'tnid':M.curTenantID, 'event_id':this.event_id,\n 'customer_id':this.customer_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n } \n if( inv != null && inv == 'yes' ) {\n M.ciniki_events_registrations.edit.newInvoice(this.registration_id, price_id, quantity);\n// M.ciniki_events_registrations.newinvoice.open(M.ciniki_events_registrations.edit.cb'M.ciniki_events_registrations.edit.open(null,null,'+rsp.id+',null);', M.ciniki_events_registrations.edit.event_id, M.ciniki_events_registrations.edit.customer_id, rsp.id, quantity);\n// M.ciniki_events_registrations.newinvoice.open(M.ciniki_events_registrations.edit.cb, M.ciniki_events_registrations.edit.event_id, M.ciniki_events_registrations.edit.customer_id, rsp.id, quantity);\n } else {\n M.ciniki_events_registrations.edit.close();\n }\n });\n }\n };\n this.edit.newInvoice = function(registration_id, price_id, quantity) {\n var items = [];\n items[0] = {\n 'status':0,\n 'object':'ciniki.events.registration',\n 'object_id':registration_id,\n 'price_id':price_id,\n 'description':'',\n 'quantity':quantity,\n 'unit_amount':0,\n 'unit_discount_amount':0,\n 'unit_discount_percentage':0,\n 'taxtype_id':0,\n 'notes':'',\n };\n // Find the price selected\n for(i in this.data.prices) {\n if( this.data.prices[i].id == price_id ) {\n items[0].price_id = this.data.prices[i].id;\n items[0].code = '';\n items[0].description = this.data.prices[i].event_name + (this.data.prices[i].name!=''?' - '+this.data.prices[i].name:'');\n items[0].unit_amount = this.data.prices[i].unit_amount;\n items[0].unit_discount_amount = this.data.prices[i].unit_discount_amount;\n items[0].unit_discount_percentage = this.data.prices[i].unit_discount_percentage;\n items[0].taxtype_id = this.data.prices[i].taxtype_id;\n items[0].flags = 0x20;\n }\n }\n M.startApp('ciniki.sapos.invoice',null,'M.ciniki_events_registrations.edit.open(null,null,' + registration_id + ');','mc',{'customer_id':this.customer_id,'items':items});\n }\n this.edit.remove = function() {\n M.confirm(\"Are you sure you want to remove this registration?\",null,function() {\n M.api.getJSONCb('ciniki.events.registrationDelete', {'tnid':M.curTenantID, 'registration_id':M.ciniki_events_registrations.edit.registration_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_events_registrations.edit.close(); \n });\n });\n };\n this.edit.updateCustomer = function(cid) {\n if( cid != null && this.customer_id != cid ) {\n this.customer_id = cid;\n }\n if( this.customer_id > 0 ) {\n M.api.getJSONCb('ciniki.customers.customerDetails', {'tnid':M.curTenantID, 'customer_id':this.customer_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_events_registrations.edit;\n p.data.customer = rsp.details;\n p.refreshSection('customer_details');\n p.show();\n });\n } \n };\n this.edit.addCustomer = function(cb, eid) {\n // Setup the edit panel for when the customer edit returns\n if( cb != null ) { this.cb = cb; }\n if( eid != null ) { this.event_id = eid; }\n M.startApp('ciniki.customers.edit',null,cb,'mc',{'next':'M.ciniki_events_registrations.edit.openFromCustomer','customer_id':0});\n };\n this.edit.openFromCustomer = function(cid) {\n this.open(this.cb, cid, this.event_id, 0);\n };\n this.edit.addButton('save', 'Save', 'M.ciniki_events_registrations.edit.save();');\n this.edit.addClose('Cancel');\n\n //\n // The add invoice panel, which display the price list for quantity\n //\n this.newinvoice = new M.panel('Create Invoice', 'ciniki_events_registrations', 'newinvoice', 'mc', 'medium', 'sectioned', 'ciniki.events.registrations.newinvoice');\n this.newinvoice.data = null;\n this.newinvoice.customer_id = 0;\n this.newinvoice.event_id = 0;\n this.newinvoice.registration_id = 0;\n this.newinvoice.quantity = 1;\n this.newinvoice.sections = {\n 'prices':{'label':'Price List', 'fields':{\n 'price_id':{'label':'Price', 'type':'select', 'options':{}},\n }},\n '_buttons':{'label':'', 'buttons':{\n 'save':{'label':'Create Invoice', 'fn':'M.ciniki_events_registrations.newinvoice.createInvoice();'},\n }},\n };\n this.newinvoice.fieldValue = function(s, i, d) { return this.data[i]; }\n this.newinvoice.open = function(cb, eid, cid, rid, quantity) {\n if( eid != null ) { this.event_id = eid; }\n if( cid != null ) { this.customer_id = cid; }\n if( rid != null ) { this.registration_id = rid; }\n if( quantity != null ) { this.quantity = quantity; }\n M.api.getJSONCb('ciniki.events.eventPriceList', {'tnid':M.curTenantID, 'event_id':this.event_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_events_registrations.newinvoice;\n p.prices = rsp.prices;\n p.data = {'price_id':0};\n // Setup the price list\n p.sections.prices.fields.price_id.options = {};\n for(i in rsp.prices) {\n p.sections.prices.fields.price_id.options[rsp.prices[i].price.id] = rsp.prices[i].price.name + ' ' + rsp.prices[i].price.unit_amount_display;\n if( i == 0 ) {\n p.data.price_id = rsp.prices[i].price.id;\n }\n }\n p.refresh();\n p.show(cb);\n });\n };\n this.newinvoice.createInvoice = function() {\n var items = [];\n items[0] = {\n 'status':0,\n 'object':'ciniki.events.registration',\n 'object_id':this.registration_id,\n 'description':'',\n 'quantity':this.quantity,\n 'unit_amount':0,\n 'unit_discount_amount':0,\n 'unit_discount_percentage':0,\n 'taxtype_id':0,\n 'notes':'',\n };\n var price_id = this.formFieldValue(this.sections.prices.fields.price_id, 'price_id');\n var prices = this.prices;\n // Find the price selected\n for(i in prices) {\n if( prices[i].price.id == price_id ) {\n items[0].price_id = prices[i].price.id;\n items[0].code = '';\n items[0].description = prices[i].price.event_name + (prices[i].price.name!=''?' - '+prices[i].price.name:'');\n items[0].unit_amount = prices[i].price.unit_amount;\n items[0].unit_discount_amount = prices[i].price.unit_discount_amount;\n items[0].unit_discount_percentage = prices[i].price.unit_discount_percentage;\n items[0].taxtype_id = prices[i].price.taxtype_id;\n items[0].flags = 0x20;\n }\n }\n M.startApp('ciniki.sapos.invoice',null,this.cb,'mc',{'customer_id':this.customer_id,'items':items});\n };\n this.newinvoice.addClose('Cancel');\n\n //\n // Arguments:\n // aG - The arguments to be parsed into args\n //\n this.start = function(cb, appPrefix, aG) {\n args = {};\n if( aG != null ) { args = eval(aG); }\n\n this.edit.sections.registration.fields.status.active = (M.curTenant.modules['ciniki.events'].flags&0x04)>0?'yes':'no';\n\n //\n // Create the app container if it doesn't exist, and clear it out\n // if it does exist.\n //\n var appContainer = M.createContainer(appPrefix, 'ciniki_events_registrations', 'yes');\n if( appContainer == null ) {\n M.alert('App Error');\n return false;\n } \n\n this.menu.open(cb, args.event_id, 0);\n }\n}", "function limpiarControles(){ //REVISAR BIEN ESTO\n clearControls(obtenerInputsIdsProducto());\n clearControls(obtenerInputsIdsTransaccion());\n htmlValue('inputEditar', 'CREACION');\n htmlDisable('txtCodigo', false);\n htmlDisable('btnAgregarNuevo', true);\n}", "function initMenu() {\n var ProjectionSelector = vjs.extend(vjs.getComponent('MenuButton'), {\n constructor : function(player, options) {\n player.availableProjections = options.availableProjections || [];\n vjs.getComponent('MenuButton').call(this, player, options);\n var items = this.el().firstChild\n var wrapper = vjs.createEl(\"div\", {\n className : 'vjs-control-content'\n })\n this.el().replaceChild(wrapper, items)\n wrapper.appendChild(items)\n }\n });\n\n vjs.registerComponent('ProjectionSelector', ProjectionSelector);\n\n var ProjectionSelection = vjs.extend(vjs.getComponent('Button'), {\n constructor : function(player, options) {\n this.availableProjections = options.availableProjections || [];\n },\n className : 'vjs-res-button vjs-menu-button vjs-control',\n role : 'button',\n 'aria-live' : 'polite', // let the screen reader user know that the text of the button may change\n tabIndex : 0\n });\n\n vjs.registerComponent('ProjectionSelection', ProjectionSelection);\n\n //Top Item - not selectable\n var ProjectionTitleMenuItem = vjs.extend(vjs.getComponent('MenuItem'), {\n constructor : function(player, options) {\n vjs.getComponent('MenuItem').call(this, player, options);\n this.off('click'); //no click handler\n }\n });\n\n vjs.registerComponent('ProjectionTitleMenuItem', ProjectionTitleMenuItem);\n\n //Menu Item\n var ProjectionMenuItem = vjs.extend(vjs.getComponent('MenuItem'), {\n constructor : function(player, options){\n options.label = options.res;\n options.selected = (options.res.toString() === player.getCurrentRes().toString());\n vjs.getComponent('MenuItem').call(this, player, options);\n this.resolution = options.res;\n this.on('click', this.onClick);\n player.on('changeProjection', vjs.bind(this, function() {\n if (this.resolution === player.getCurrentRes()) {\n this.selected(true);\n } else {\n this.selected(false);\n }\n }));\n }\n });\n\n // Handle clicks on the menu items\n ProjectionMenuItem.prototype.onClick = function() {\n var player = this.player(),\n button_nodes = player.controlBar.projectionSelection.el().firstChild.children,\n button_node_count = button_nodes.length;\n\n // Save the newly selected resolution in our player options property\n player.current_proj = this.resolution\n changeProjection(this.resolution);\n player.trigger('changeProjection');\n\n // Update the button text\n while ( button_node_count > 0 ) {\n button_node_count--;\n if ( 'vjs-current-res' === button_nodes[button_node_count].className ) {\n button_nodes[button_node_count].innerHTML = this.resolution;\n break;\n }\n }\n };\n\n vjs.registerComponent('ProjectionMenuItem', ProjectionMenuItem);\n\n // Create a menu item for each available projection\n vjs.getComponent('ProjectionSelector').prototype.createItems = function() {\n var player = this.player(),\n items = [];\n\n // Add the menu title item\n items.push( new vjs.getComponent('ProjectionTitleMenuItem')( player, {\n el : vjs.createEl( 'li', {\n className : 'vjs-menu-title vjs-res-menu-title',\n innerHTML : 'Projections'\n })\n }));\n\n // Add an item for each available resolution\n player.availableProjections.forEach(function (proj) {\n items.push( new vjs.getComponent('ProjectionMenuItem')( player, {\n res : proj\n }));\n });\n\n return items;\n };\n\n }", "function IntroducaoPros_elementsExtraJS() {\n // screen (IntroducaoPros) extra code\n\n }", "function Guarda_Clics_EPR_Menos()\r\n{\r\n\tGuarda_Clics(0,0);\r\n}", "function mostrarRegistrarseComoColaborador(){\n mostrarComo('colaborador')\n}", "function habilitaDesabilitaAbaPesquisa() {\n\n $scope.novoMenu = {};\n $scope.filtroMenu = '';\n\n $scope.tabsMenu = {\n tabPesquisar: {\n tabAtivar: \"active\",\n tabhabilitar: true,\n contentAtivar: \"tab-pane fade in active\",\n contentHabilitar: true\n },\n tabCadMenu: {\n tabAtivar: \"\",\n tabhabilitar: true,\n contentAtivar: \"tab-pane fade\",\n contentHabilitar: true\n }\n\n };\n }", "function TargetaResultados() {\n\n this.toolbar = new Toolbar()\n this.grid = new GridPrincipal()\n this.modal = new VentanaModal()\n}", "function onOpen() { // function must be called onOpen() (default function that executes on open of Google Sheet.)\n\n var ui = SpreadsheetApp.getUi()\n\n ui.createMenu( 'Get Promos' )\n .addItem( 'Get Promos', 'manualSlidesToTrix' )\n .addToUi();\n\n} // End getPromos()", "function setMenu() {\n //添加快捷键\n\tlet applicationOptions = [\n\t\t{ label: \"About Kungfu\", click: showKungfuInfo},\n\t\t{ label: \"Settings\", accelerator: \"CmdOrCtrl+,\", click: openSettingDialog },\n\t\t{ label: \"Close\", accelerator: \"CmdOrCtrl+W\", click: function() { console.log(BrowserWindow.getFocusedWindow().close()); }}\n\t]\n\n\tif(platform === 'mac') {\n\t\tapplicationOptions.push(\n\t\t\t{ label: \"Quit\", accelerator: \"Command+Q\", click: function() { app.quit(); }},\n\t\t)\n\t}\n\n\tconst template = [\n\t{\n\t\tlabel: \"Kungfu\",\n\t\tsubmenu: applicationOptions\n\t}, \n\t{\n\t\tlabel: \"Edit\",\n\t\tsubmenu: [\n\t\t\t{ label: \"Copy\", accelerator: \"CmdOrCtrl+C\", selector: \"copy:\" },\n\t\t\t{ label: \"Paste\", accelerator: \"CmdOrCtrl+V\", selector: \"paste:\" },\n\t\t]\n\t}];\n\t\n\tMenu.setApplicationMenu(Menu.buildFromTemplate(template))\n}", "function mostrarPalabra(){\n \n}", "function ciniki_tenants_plans() {\n \n this.planFlags = {\n '1':{'name':'Public'},\n };\n \n this.menu = new M.panel('Plans',\n 'ciniki_tenants_plans', 'menu',\n 'mc', 'medium', 'sectioned', 'ciniki.tenants.plans.menu');\n this.menu.data = {};\n this.menu.sections = {\n 'plans':{'label':'', 'type':'simplegrid', 'num_cols':4,\n 'headerValues':['Plan','Monthly','Yearly','Trial'],\n },\n '_buttons':{'label':'', 'buttons':{\n '_add':{'label':'Add Plan', 'fn':'M.ciniki_tenants_plans.edit.open(\\'M.ciniki_tenants_plans.menu.open();\\',0);'},\n }},\n };\n this.menu.noData = function(s) { return 'No plans added'; }\n this.menu.sectionData = function(s) { return this.data; }\n this.menu.cellValue = function(s, i, j, d) {\n switch(j) {\n case 0: return d.plan.name + (d.plan.ispublic == 'yes' ? ' (public)' : '');\n case 1: return d.plan.monthly; \n case 2: return d.plan.yearly; \n case 3: return d.plan.trial_days; \n }\n }\n this.menu.rowFn = function(s, i, d) {\n return 'M.ciniki_tenants_plans.edit.open(\\'M.ciniki_tenants_plans.menu.open();\\',\\'' + d.plan.id + '\\');';\n };\n this.menu.open = function(cb) {\n M.api.getJSONCb('ciniki.tenants.planList', {'tnid':M.curTenantID}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_tenants_plans.menu;\n p.data = rsp.plans;\n p.refresh();\n p.show(cb);\n });\n }\n this.menu.addButton('add', 'Add', 'M.ciniki_tenants_plans.edit.open(\\'M.ciniki_tenants_plans.menu.open();\\',0);');\n this.menu.addClose('Back');\n\n //\n // The edit plan panel\n //\n this.edit = new M.panel('Edit Plan',\n 'ciniki_tenants_plans', 'edit',\n 'mc', 'medium', 'sectioned', 'ciniki.tenants.plans.edit');\n this.edit.data = {'status':'1'};\n this.edit.sections = {\n 'info':{'label':'', 'fields':{\n 'name':{'label':'Name', 'type':'text'},\n 'flags':{'label':'', 'type':'flags', 'join':'yes', 'flags':this.planFlags},\n 'sequence':{'label':'Sequence', 'type':'text', 'size':'small'},\n 'monthly':{'label':'Monthly', 'type':'text', 'size':'small'},\n 'yearly':{'label':'Yearly', 'type':'text', 'size':'small'},\n 'trial_days':{'label':'Trial', 'type':'text', 'size':'small'},\n }},\n '_modules':{'label':'Modules', 'fields':{\n 'modules':{'label':'', 'hidelabel':'yes', 'type':'textarea', 'size':'small'},\n }},\n '_description':{'label':'Description', 'fields':{\n 'description':{'label':'', 'hidelabel':'yes', 'type':'textarea', 'size':'medium'},\n }},\n '_buttons':{'label':'', 'buttons':{\n 'save':{'label':'Save', 'fn':'M.ciniki_tenants_plans.edit.save();'},\n 'delete':{'label':'Delete', 'fn':'M.ciniki_tenants_plans.edit.remove();'},\n }},\n };\n this.edit.fieldValue = function(s, i, d) { return this.data[i]; }\n this.edit.fieldHistoryArgs = function(s, i) {\n return {'method':'ciniki.tenants.planHistory', 'args':{'tnid':M.curTenantID, \n 'plan_id':M.ciniki_tenants_plans.edit.plan_id, 'field':i}};\n }\n this.edit.open = function(cb, did) {\n this.reset();\n if( did != null ) {\n this.plan_id = did;\n }\n if( this.plan_id > 0 ) {\n this.sections._buttons.buttons.delete.visible = 'yes';\n M.api.getJSONCb('ciniki.tenants.planGet', {'tnid':M.curTenantID, 'plan_id':this.plan_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_tenants_plans.edit;\n p.data = rsp.plan;\n p.refresh();\n p.show(cb);\n });\n } else {\n this.reset();\n this.sections._buttons.buttons.delete.visible = 'no';\n this.data = {};\n this.refresh();\n this.show(cb);\n }\n }\n this.edit.save = function() {\n if( this.plan_id > 0 ) {\n var c = this.serializeForm('no');\n if( c != '' ) {\n M.api.postJSONCb('ciniki.tenants.planUpdate', {'tnid':M.curTenantID, 'plan_id':this.plan_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n } \n M.ciniki_tenants_plans.edit.close();\n });\n } else {\n this.close();\n }\n } else {\n var c = this.serializeForm('yes');\n M.api.postJSONCb('ciniki.tenants.planAdd', {'tnid':M.curTenantID}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n } \n M.ciniki_tenants_plans.edit.close();\n });\n }\n }\n this.edit.remove = function() {\n M.confirm(\"Are you sure you want to remove the plan '\" + this.data.name + \"' ?\",null,function() {\n M.api.getJSONCb('ciniki.tenants.planDelete', {'tnid':M.curTenantID, 'plan_id':M.ciniki_tenants_plans.edit.plan_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_tenants_plans.edit.close();\n });\n });\n }\n this.edit.addButton('save', 'Save', 'M.ciniki_tenants_plans.edit.save();');\n this.edit.addClose('Cancel');\n\n\n this.start = function(cb, ap, aG) {\n args = {};\n if( aG != null ) {\n args = eval(aG);\n }\n\n //\n // Create the app container if it doesn't exist, and clear it out\n // if it does exist.\n //\n var appContainer = M.createContainer(ap, 'ciniki_tenants_plans', 'yes');\n if( appContainer == null ) {\n M.alert('App Error');\n return false;\n } \n\n this.menu.open(cb);\n }\n}", "function mostrar() {}", "function mostrar() {}", "function addMenu(){\n var appMenu = new gui.Menu({ type: 'menubar' });\n if(os.platform() != 'darwin') {\n // Main Menu Item 1.\n item = new gui.MenuItem({ label: \"Options\" });\n var submenu = new gui.Menu();\n // Submenu Items.\n submenu.append(new gui.MenuItem({ label: 'Preferences', click :\n function(){\n // Add preferences options.\n // Edit Userdata and Miscellaneous (Blocking to be included).\n\n var mainWin = gui.Window.get();\n\n\n var preferWin = gui.Window.open('./preferences.html',{\n position: 'center',\n width:901,\n height:400,\n focus:true\n });\n mainWin.blur();\n }\n }));\n\n submenu.append(new gui.MenuItem({ label: 'User Log Data', click :\n function(){\n var mainWin = gui.Window.get();\n\n var logWin = gui.Window.open('./userlogdata.html',{\n position: 'center',\n width:901,\n height:400,\n toolbar: false,\n focus:true\n });\n }\n }));\n\n submenu.append(new gui.MenuItem({ label: 'Exit', click :\n function(){\n gui.App.quit();\n }\n }));\n\n item.submenu = submenu;\n appMenu.append(item);\n\n // Main Menu Item 2.\n item = new gui.MenuItem({ label: \"Transfers\"});\n var submenu = new gui.Menu();\n // Submenu 1.\n submenu.append(new gui.MenuItem({ label: 'File Transfer', click :\n function(){\n var mainWin = gui.Window.get();\n var aboutWin = gui.Window.open('./filetransfer.html',{\n position: 'center',\n width:901,\n height:400,\n toolbar: false,\n focus: true\n });\n mainWin.blur();\n }\n }));\n item.submenu = submenu;\n appMenu.append(item);\n\n // Main Menu Item 3.\n item = new gui.MenuItem({ label: \"Help\" });\n var submenu = new gui.Menu();\n // Submenu 1.\n submenu.append(new gui.MenuItem({ label: 'About', click :\n function(){\n var mainWin = gui.Window.get();\n var aboutWin = gui.Window.open('./about.html', {\n position: 'center',\n width:901,\n height:400,\n toolbar: false,\n focus: true\n });\n mainWin.blur();\n }\n }));\n item.submenu = submenu;\n appMenu.append(item);\n gui.Window.get().menu = appMenu;\n }\n else {\n // menu for mac.\n }\n\n}", "function TipoServico_elementsExtraJS() {\n // screen (TipoServico) extra code\n\n }", "function nuevoProceso(){\n let idProcesos = document.getElementById(\"procesos\").getElementsByTagName(\"textarea\");\n for( let i = 0; i < idProcesos.length; i++ ){\n procesos.push({ // Mete los procesos y los separa\n nombre: idProcesos[ i ] = `Proceso ${(i+1)}`,\n codigo: idProcesos[ i ].value.split(\"\\n\"),\n estado: \"activo\",\n });\n }\n }", "function mostrarDatosProducto(producto){\n let transaccion = obtenerTransaccionInicial(producto.getCodigo());\n let datosProducto = [obtenerInputsIdsProducto(),producto.fieldsToArray()];\n let datosTransaccion = [obtenerInputsIdsTransaccion(),transaccion.fieldsToArray()];\n fillFields(datosProducto);\n fillFields(datosTransaccion);\n htmlValue('inputEditar', 'EDICION');\n htmlDisable('txtCodigo');\n htmlDisable('btnAgregarNuevo', false);\n}", "function mostrarHoteles() {\n if (mostraStatus) {\n mostrarHotelesActivados();\n } else {\n mostrarHotelesDesactivados();\n }\n}", "function abreModalAceiteParcelaDetalhe(cd_projeto, cd_proposta, cd_parcela, tx_sigla_projeto, ni_parcela) {\r\n\r\n\tvar jsonData = {'cd_projeto':cd_projeto,\r\n\t\t\t\t\t'cd_proposta': cd_proposta,\r\n\t\t\t\t\t'cd_parcela': cd_parcela,\r\n\t\t\t\t\t'tx_sigla_projeto': tx_sigla_projeto,\r\n\t\t\t\t\t'ni_parcela': ni_parcela\r\n\t\t\t\t };\r\n\teval('var buttons = {\"'+i18n.L_VIEW_SCRIPT_BTN_CANCELAR+'\": '+function(){closeDialog( 'dialog_detalhe_aceite_parcela' );}+'};');\r\n loadDialog({\r\n id : 'dialog_detalhe_aceite_parcela',\t\t\t\t\t//id do pop-up\r\n title : i18n.L_VIEW_SCRIPT_TITLE_DIALOG_ACEITE_PARCELA,\t// titulo do pop-up\r\n url : systemName + '/controle-parcela/aceite-parcela',\t// url onde encontra-se o phtml\r\n data : jsonData,\t\t\t\t\t\t\t// parametros para serem transferidos para o pop-up\r\n height : 250,\t\t\t\t\t\t\t\t\t// altura do pop-up\r\n buttons : buttons\r\n });\r\n}", "function onLoadPag(){\t\n\tconfigurarMenuSecundario(\"formulario\");\n\tfMostrarMensajeError();\n\tmanejarLista('hidden');\n\n\tvar opcionMenu = get('formulario.opcionMenu').toLowerCase();\n\tif(opcionMenu == 'modificar concurso'){\n\t\tdocument.getElementById(\"lblVersion\").style.display='none';\n\t\tdocument.getElementById(\"txtVersion\").style.display='none';\n\t}\n\n\tfocaliza(\"formulario.cbNumConcurso\", \"\");\n\tif (window.dialogArguments) { // Si es modal (se abrió mediante showModalDialog) DBLG500000915\n btnProxy(2,1); // boton 'volver', habilitado\n btnProxy(3,0); // boton 'Ir a pantalla de inicio', deshabilitado\n }\n\n\n }", "function creaPrenotazione() {\n\t$('#modPrenotazione').window('open');\n\n}", "function activarHerramientaPerfil() {\n console.log(\"Activar herramienta perfil\");\n\n crearYCargarCapaLineaPerfil();\n activarControlDibujo();\n\n\n}", "function ClickGerarPontosDeVida(modo) {\n GeraPontosDeVida(modo);\n AtualizaGeral();\n}", "function ventanaNuevaParada(){\n if(!winNuevaParada){\n winNuevaParada = new Ext.Window({\n layout : 'fit',\n title : 'Nueva Parada',\n resizable : false,\n width : 600,\n height : 220,\n closeAction : 'hide',\n plain : false,\n items : [panelNuevaParada]\n });\n }\n booCapturarPuntosNuevaParada=true;\n winNuevaParada.show(this);\n}", "function buildUI (thisObj ) {\r var win = (thisObj instanceof Panel) ? thisObj : new Window('palette', 'FSS Fake Parallax',[0,0,150,260],{resizeable: true});\r\r if (win !== null) {\rvar red = win.graphics.newPen (win.graphics.PenType.SOLID_COLOR, [1, 0.1, 0.1],1);\rvar green = win.graphics.newPen (win.graphics.PenType.SOLID_COLOR, [0.1, 1, 0.1],1);\r\r var H = 25; // the height\r var W = 30; // the width\r var G = 5; // the gutter\r var x = G;\r var y = G;\r\r // win.check_box = win.add('checkbox',[x,y,x+W*2,y + H],'check');\r // win.check_box.value = metaObject.setting1;\r\r win.select_json_button = win.add('button',[x ,y,x+W*5,y + H], 'read json');\r x+=(W*5)+G;\r win.read_label = win.add('statictext',[x ,y,x+W*5,y + H],'NO JSON');\r win.read_label.graphics.foregroundColor = red;\r x=G;\r y+=H+G;\r win.do_it_button = win.add('button', [x ,y,x+W*5,y + H], 'simple import');\r x=G;\r y+=H+G;\r win.regen_it_button = win.add('button', [x ,y,x+W*5,y + H], 'regenerate');\r x=G;\r y+=H+G;\r win.prepare_logo_button = win.add('button', [x ,y,x+W*5,y + H], 'prepare logo');\r\r // win.up_button = win.add('button', [x + W*5+ G,y,x + W*6,y + H], 'Up'); \r\r // win.check_box.onClick = function (){\r // alert(\"check\");\r // };\r //\r //\r win.select_json_button.addEventListener (\"click\", function (k) {\r /**\r * if you hold alt you can clear the the json and all that stuff\r * \r */\r if (k.altKey) {\r mpo2ae.images_folder_flat = null;\r mpo2ae.json = null;\r mpo2ae.allfolders.length = 0;\r mpo2ae.pre_articles.length = 0;\r mpo2ae.articles.length = 0;\r win.read_label.text = 'NO JSON';\r win.read_label.graphics.foregroundColor = red;\r }else{\r\r\r\r// win.select_json_button.onClick = function () {\r /**\r * Why is this in here?\r * Because we can make changed to the GUI from the function\r * makeing some overview for the JSON and stuff like that\r *\r */\r mpo2ae.project = app.project;\r var presets = mpo2ae.settings.comp.layerpresets;\r var jsonFile = File.openDialog(\"Select a JSON file to import.\", \"*.*\",false);\r // var path = ((new File($.fileName)).path);\r if (jsonFile !== null) {\r mpo2ae.images_folder_flat = jsonFile.parent;\r\r var textLines = [];\r jsonFile.open(\"r\", \"TEXT\", \"????\");\r while (!jsonFile.eof){\r textLines[textLines.length] = jsonFile.readln();\r }\r jsonFile.close();\r var str = textLines.join(\"\");\r var reg = new RegExp(\"\\n|\\r\",\"g\");\r str.replace (reg, \" \");\r // var reghack = new RegExp('\"@a','g');\r // str.replace(reghack, '\"a');\r mpo2ae.json = eval(\"(\" + str + \")\"); // evaluate the JSON code\r if(mpo2ae.json !==null){\r // alert('JSON file import worked fine');\r // alert(mpo2ae.json);\r win.read_label.text = 'YES JSON';\r win.read_label.graphics.foregroundColor = green;\r mpo2ae.pre_articles = mpo2ae.json.seite.artikel;\r//~ $.write(mpo2ae.pre_articles.toSource());\r /**\r * This is only cheking if ther are some folders already there\r * \r */\r // var allfolders = [];\r if(mpo2ae.pre_articles.length > 0){\r var projItems = mpo2ae.project.items;\r for(var f = 1; f <= projItems.length;f++){\r if (projItems[f] instanceof FolderItem){\r // alert(projItems[f]);\r mpo2ae.allfolders.push(projItems[f]);\r }\r } // end folder loop\r\r for(var i = 0; i < mpo2ae.pre_articles.length;i++){\r var article = mpo2ae.pre_articles[i];\r var artfolder = null;\r var artimages = [];\r var artnr = null;\r var artprice = null;\r var arttxt = null;\r var artname = null;\r var artdiscr = null;\r var artbrand = null;\r var artfootage = [];\r var artgroup = null;\r if(article.hasOwnProperty('artikelInformation')){\r ainfo = article.artikelInformation;\r if(ainfo.hasOwnProperty('iArtikelNr')){\r // artnr = ainfo.iArtikelNr;\r // ------------ loop all folders per article ------------\r if(mpo2ae.allfolders !== null){\r for(var ff = 0; ff < mpo2ae.allfolders.length;ff++){\r if(mpo2ae.allfolders[ff].name == ainfo.iArtikelNr){\r artfolder = mpo2ae.allfolders[ff];\r break;\r }\r } // close ff loop\r } // close folder null check\r // ------------ end loop all folders per article ------------\r\r // if(artfolder === null){\r // artfolder = mpo2ae.project.items.addFolder(ainfo.iArtikelNr.toString());\r // } // close artfolder null\r }// close iArtikelNr check\r\r if(ainfo.hasOwnProperty('iHersteller')){\r artbrand = ainfo.iHersteller;\r }\r if(ainfo.hasOwnProperty('iGruppenFarbe')){\r artgroup = ainfo.iGruppenFarbe;\r }\r } // close artikelInformation check\r\r if(article.hasOwnProperty('preis')){\r artprice = article.preis;\r }\r if(article.hasOwnProperty('textPlatzieren')){\r if(article.textPlatzieren.hasOwnProperty('artikelBezeichnung')){\r artname = article.textPlatzieren.artikelBezeichnung;\r }\r if(article.textPlatzieren.hasOwnProperty('artikelBeschreibung')){\r artdiscr = article.textPlatzieren.artikelBeschreibung;\r }\r if(article.textPlatzieren.hasOwnProperty('artikelText')){\r arttxt = article.textPlatzieren.artikelText;\r }\r\r if(article.textPlatzieren.hasOwnProperty('artikelNr')){\r artnr = article.textPlatzieren.artikelNr;\r }\r }\r\r// ------------ this is start folder creation and image import ------------\r if(artfolder !== null){\r var imgpath = null;\r if(article.hasOwnProperty('bild')){\r if( Object.prototype.toString.call( article.bild ) === '[object Array]' ) {\r // article.bild is an array\r // lets loop it\r // \r for(var j =0;j < article.bild.length;j++){\r\r if(article.bild[j].hasOwnProperty('attributes')){\r imgpath = article.bild[j].attributes.href.substring(8);\r artimages.push(imgpath);\r alert(imgpath);\r return;\r }// article bild is an Array attributes close\r } // close J Loop\r }else{\r // now this is an error in the JSON\r // the property 'bild' comes as Array OR Object\r // we need to fix that\r if(article.bild.hasOwnProperty('attributes')){\r artimages.push(article.bild.attributes.href.substring(8));\r alert(imgpath);\r return;\r } // article bild is an object attributes close\r\r }// close Object.prototype.toString.call( article.bild )\r\r // alert( mpo2ae.images_folder_flat.fullName + \"\\n\" + artimages);\r // for(var ig = 0; ig < artimages.length;ig++){\r\r // var a_img = File( mpo2ae.images_folder_flat.fsName + \"/\" + artimages[ig]);\r // if(a_img.exists){\r // var footageitem = mpo2ae.project.importFile(new ImportOptions(File(a_img)));\r // footageitem.parentFolder = artfolder;\r // artfootage.push(footageitem);\r // }else{\r // artfootage.push(null);\r // } // close else image does not exist on HD\r // } // end of ig loop artimages\r }else{\r // artile has no property 'bild'\r $.writeln('There are no images on article ' + ainfo.iArtikelNr);\r // alert('There are no images on article ' + ainfo.iArtikelNr);\r }\r }else{\r // it was not possible to create folders\r // neither from the names nor did they exist\r // alert('Error creating folder for import');\r }\r// ------------ end of folder creation an image import ------------\r // var curComp = mpo2ae.project.items.addComp(\r // mpo2ae.settings.projectname + \" \" + ainfo.iArtikelNr,\r // mpo2ae.settings.comp.width,\r // mpo2ae.settings.comp.height,\r // mpo2ae.settings.comp.pixelAspect,\r // mpo2ae.settings.comp.duration,\r // mpo2ae.settings.comp.frameRate);\r // curComp.parentFolder = artfolder;\r\r // now we got all info togther and everything is checked\r // we create an cleaned object with the props we need\r // for later usage\r var art = new Article();\r art.nr = artnr;\r art.folder = artfolder;\r // art.images = artimages;\r // var regdash = new RegExp(\"--\",\"g\");\r art.price = regdashes(artprice);// artprice.replace(regdash,\"\\u2013\");\r art.txt = arttxt;\r art.name = artname;\r art.discr = artdiscr;\r art.brand = artbrand;\r art.footage = artfootage;\r art.group = artgroup;\r mpo2ae.articles.push(art);\r } // end article loop\r\r\r }else{\r alert('No articles in JSON');\r }\r }else{\r alert('JSON is null');\r }\r}else{\r\r alert('File is null');\r}\r } // end else not alt\r // };\r }); // end of eventListener\r\r win.do_it_button.onClick = function () {\r simple_import();\r alert('done');\r };\r\r win.regen_it_button.onClick = function () {\r // simple_import();\r if((app.project.selection < 1) && (!(app.project.selection[0] instanceof CompItem ))){\r alert('Please select your template composition');\r return;\r }\r regenerate_from_template(app.project.selection[0]);\r\r\r };\r\r win.prepare_logo_button.onClick = function () {\r prepare_selected_logo();\r };\r }\r return win;\r}", "function listar(){\n//funsiones a llenar combobox\n tipo();\n ciudad();\n inicializarSlider();\n playVideoOnScroll();\n\n}", "function BotonSeleccionado(jsonLicores) {\n const TodosLosBotones = document.querySelectorAll('.btn-danger');\n TodosLosBotones.forEach(btn => {\n btn.addEventListener('click', () => {\n const xencontrado = jsonLicores.find(item => item.id == btn.dataset.id); //Extraer los Datos del Producto Seleccionado, si existe en BD Jason\n xencontrado.cantidad = 1; //Agregar campo cantidad a xproducto con valor 1\n if (CarritoCompras.hasOwnProperty(xencontrado.id)){ //Verificar si el producto seleccionado ya existe en el carrito\n xencontrado.cantidad= CarritoCompras[xencontrado.id].cantidad + 1; //Si existe en carrito aumentar en 1;\n }\n CarritoCompras[xencontrado.id] = { ...xencontrado}; //Reemplazar registro producto seleccionado en carrito con xproducto\n localStorage.setItem(\"datosCarrito\",JSON.stringify(CarritoCompras))\n MostrarDatosCarrito();\n \n \n })\n })\n}", "function PunteroGuia(opciones)\n{\n let opcionesDefecto = {\n 'display' : false,\n 'golpeStyle' : 'red',\n 'lineaAncho' : 3\n };\n\n // Now loop through the default opciones and create properties of this class set to the value for\n // the option passed in if a value was, or if not then set the value of the default.\n for (let llave in opcionesDefecto) {\n if ((opciones != null) && (typeof(opciones[llave]) !== 'undefined')) {\n this[llave] = opciones[llave];\n } else {\n this[llave] = opcionesDefecto[llave];\n }\n }\n}", "function principal() {\n choquecuerpo();\n choquepared();\n dibujar();\n movimiento();\n \n if(cabeza.choque (comida)){\n comida.colocar();\n cabeza.meter();\n } \n}", "function ini() {\n\n // --- Select empresa Mae ---- //\n $('#empresaMaeSelect') //select data from EmpresaMae\n\n $('#btnAddEmpresaMae') // add functions to btnEmpresaMae\n\n $('#nomeRefood') // inherit Data from Refood module DB\n\n\n //TODO $('#contactinput') --> a fazer pelo Ricardo Castro\n // Tudo neste grupo é feito com o plugIn Contacts.js do RCastro\n\n // $('contact')//\n\n\n\n\n // ---- Plugin HORÁRIO ---- // Insert PickUp Schedule\n\n $('#horarioInicio').clockpicker({\n placement: 'top',\n align: 'left',\n autoclose: true\n });\n }", "function crearVentanaEdicionDinamicamente() {\n\n var ventanaEdicionHeader = $(\"#editorFeatures .panel-heading\");\n var ventanaEdicionBody = $(\"#editorFeatures .panel-body\");\n\n var body = \"\";\n\n var nombreCapa=getLayerName(_capa);\n \n var traerProductores=false;\n\n switch (_capa) {\n\n case \"AMBIENTE\": {\n\n body =\n //'<div id=\"comboProductores\" class=\"input-group\">' +\n\n // '</div>' +\n '<div class=\"input-group\">' +\n '<span class=\"input-group-addon\">Superficie</span>' +\n '<input data-field=\"sup\" data-autocalculate=\"area\" id=\"sup_tecnico\" type=\"number\" class=\"form-control editableFeatureField\" name=\"start\" />' +\n '</div>' +\n crearComboLeyenda();\n //'<div class=\"input-group\">' +\n // '<span class=\"input-group-addon\">Leyenda</span>' +\n // '<input data-field=\"leyenda\" type=\"text\" class=\"form-control editableFeatureField\" name=\"start\"/>' +\n //'</div>';\n traerProductores = true;\n break;\n }\n case \"PRESCRIPCION\": {\n\n body =\n // '<div id=\"comboProductores\" class=\"input-group\">' +\n\n // '</div>' +\n '<div class=\"input-group\">' +\n '<span class=\"input-group-addon\">Superficie</span>' +\n '<input data-field=\"sup\" data-autocalculate=\"area\" id=\"sup_tecnico\" type=\"number\" class=\"form-control editableFeatureField\" name=\"start\" />' +\n '</div>' +\n crearComboLeyenda()+\n //'<div class=\"input-group\">' +\n // '<span class=\"input-group-addon\">Leyenda</span>' +\n // '<input data-field=\"leyenda\" type=\"text\" class=\"form-control editableFeatureField\" name=\"start\"/>' +\n //'</div>' +\n '<div class=\"input-group\">' +\n '<span class=\"input-group-addon\">Comp</span>' +\n '<input data-field=\"comp\" type=\"text\" class=\"form-control editableFeatureField\" name=\"start\" />' +\n '</div>';\n traerProductores = true;\n break;\n }\n case \"PRODUCTOR\": {\n body = '<div class=\"input-group\">' +\n '<span class=\"input-group-addon\">Fecha</span>' +\n '<input data-field=\"fecha\" type=\"date\" class=\"form-control editableFeatureField\" name=\"start\" />' +\n '</div>' +\n '<div class=\"input-group\">' +\n '<span class=\"input-group-addon\">Establecimiento</span>' +\n '<input data-field=\"establecimiento\" type=\"text\" class=\"form-control editableFeatureField\" name=\"start\" />' +\n '</div>' +\n '<div class=\"input-group\">' +\n '<span class=\"input-group-addon\">Área (ha)</span>' +\n '<input data-field=\"ADP.SDE.productor.area\" data-autocalculate=\"area\" data-auxiliar-input=\"dPPrecio\" type=\"number\" class=\"form-control editableFeatureField\" name=\"start\" disabled/>' +\n '</div>' +\n '<div id=\"dPPrecio\" class=\"input-group\">' +\n '<span class=\"input-group-addon\">Precio (US$)</span>' +\n '<input data-field=\"precio\" type=\"number\" step=\"0.01\" placeholder=\"0.00\" data-autocalculate=\"precio\" class=\"form-control editableFeatureField\" name=\"start\" disabled/>' +\n '</div>'\n }\n }\n \n ventanaEdicionHeader.html(' <a class=\"collapsable\" role=\"button\" data-toggle=\"collapse\" href=\"#collapseEditor\" aria-expanded=\"true\" aria-controls=\"collapseEditor\">' +\n '<img src=\"../Assets/img/menu/pencil.png\"/><span>' + nombreCapa + '</span>' +\n '</a>' +\n ' <span class=\"myRight\">' +\n '<span id=\"currentFeatures' + _capa + '\">?</span>' +\n '<span> de </span>' +\n '<span id=\"cantFeatures' + _capa + '\">?</span>' +\n '<img data-type=\"forward\" class=\"myRight boton btnCurrentFeature\" src=\"../Assets/img/menu/forward.png\"/>' +\n '<img data-type=\"back\" class=\"myRight boton btnCurrentFeature\" src=\"../Assets/img/menu/back.png\"/>' +\n '</span>');\n\n ventanaEdicionBody.html(body);\n //if (traerProductores) {\n // getProductores(crearComboProductores);\n\n //}\n $(\"#editorFeatures\").removeClass(\"ocultar\");\n\n}", "function initMenu(){\n\toutlet(4, \"vpl_menu\", \"clear\");\n\toutlet(4, \"vpl_menu\", \"append\", \"properties\");\n\toutlet(4, \"vpl_menu\", \"append\", \"help\");\n\toutlet(4, \"vpl_menu\", \"append\", \"rename\");\n\toutlet(4, \"vpl_menu\", \"append\", \"expand\");\n\toutlet(4, \"vpl_menu\", \"append\", \"fold\");\n\toutlet(4, \"vpl_menu\", \"append\", \"---\");\n\toutlet(4, \"vpl_menu\", \"append\", \"duplicate\");\n\toutlet(4, \"vpl_menu\", \"append\", \"delete\");\n\n\toutlet(4, \"vpl_menu\", \"enableitem\", 0, myNodeEnableProperties);\n\toutlet(4, \"vpl_menu\", \"enableitem\", 1, myNodeEnableHelp);\n outlet(4, \"vpl_menu\", \"enableitem\", 3, myNodeEnableBody);\t\t\n outlet(4, \"vpl_menu\", \"enableitem\", 4, myNodeEnableBody);\t\t\n}", "setupMenu () {\n let dy = 17;\n // create buttons for the action categories\n this.menu.createButton(24, 0, () => this.selectionMode = 'info', this, null, 'info');\n this.menu.createButton(41, 0, () => this.selectionMode = 'job', this, null, 'job');\n // create buttons for each command\n for (let key of Object.keys(this.jobCommands)) {\n let button = this.menu.createButton(0, dy, () => this.jobCommand = key, this, this.jobCommands[key].name);\n dy += button.height + 1;\n }\n // set the hit area for the menu\n this.menu.calculateHitArea();\n // menu is closed by default\n this.menu.hideMenu();\n }", "function ClickVisualizacaoModoMestre() {\n gEntradas.modo_mestre = Dom('input-modo-mestre').checked;\n AtualizaGeralSemLerEntradas();\n}", "function dibujarFresado117(modelo,di,pos,document){\n\t\n\t//ESTABLECER CAPA\n\tvar op_fresado = new RAddObjectsOperation();\n\tdi.setCurrentLayer(\"Fresado\"); //Seleccionar la capa de fresado\n\t\n\tEAction.handleUserMessage(\"ha entrado 11111111111111111 \");\n\tvar plieguesInf=[pliegueInf1, pliegueInf2, pliegueInf3]\n\t\n\t//sacar el mayor pliegue\n\tpliegueInferior=pliegueInf1\n\tfor (var n=0; n<4 ;n=n+1){\n\t\tif (pliegueInferior<plieguesInf[n]){\n\t\t\tpliegueInferior=plieguesInf[n]\n }\n }\n\t\n\t\n\t\n\t//Puntos trayectoria \n\t\n\tvar fresado11 = new RVector(pos.x+alaIzquierda+anchura1,pos.y+alaInferior+pliegueInferior)\n\tvar fresado12 = new RVector(pos.x+alaIzquierda+anchura1+anchura2,pos.y+alaInferior+pliegueInferior)\n\tvar fresado13 = new RVector(pos.x+alaIzquierda+anchura1+anchura2+anchura3,pos.y+alaInferior+pliegueInferior)\n\tvar fresado14 = new RVector(pos.x+alaIzquierda+anchura1+anchura2+anchura3,pos.y+alaInferior+pliegueInferior)\n\t\n\tvar fresado16 = new RVector(pos.x+alaIzquierda,pos.y+alaInferior+pliegueInferior) \n\tvar fresado17 = new RVector(pos.x+alaIzquierda,pos.y+alaInferior+pliegueInferior+alturaPlaca)\n\t\n\tvar fresado18 = new RVector(pos.x+alaIzquierda+anchura1,pos.y+alaInferior+pliegueInferior+alturaPlaca)\n\tvar fresado19 = new RVector(pos.x+alaIzquierda+anchura1+anchura2,pos.y+alaInferior+pliegueInferior+alturaPlaca)\n\tvar fresado20 = new RVector(pos.x+alaIzquierda+anchura1+anchura2+anchura3,pos.y+alaInferior+pliegueInferior+alturaPlaca)\n\tvar fresado21 = new RVector(pos.x+alaIzquierda+anchura1+anchura2+anchura3,pos.y+alaInferior+pliegueInferior+alturaPlaca)\n\t\n\tvar fresado22 = new RVector(pos.x+alaIzquierda+anchura1+anchura2+anchura3,pos.y+alaInferior+pliegueInferior+alturaPlaca+pliegueSuperior)\n\t\n\t\n\t\n\tvar fresado2 = new RVector(pos.x+alaIzquierda,pos.y)\n\t\n var line = new RLineEntity(document, new RLineData( fresado16 , fresado14 ));\n\top_fresado.addObject(line,false);\n var line = new RLineEntity(document, new RLineData( fresado12 , fresado19 ));\n\top_fresado.addObject(line,false);\n var line = new RLineEntity(document, new RLineData( fresado18 , fresado11 ));\n\top_fresado.addObject(line,false);\n var line = new RLineEntity(document, new RLineData( fresado17 , fresado21 ));\n\top_fresado.addObject(line,false);\n\n\t\n\n\t\n\t\n\t//anchura1 - Inferior\n\tif (anchura1>pliegueInf1){\n\t\t//var fresado10 = new RVector(pos.x+alaIzquierda,pos.y+pliegueInferior+alaInferior) \n\t\tvar fresado1 = new RVector(pos.x+alaIzquierda,pos.y+alaInferior+pliegueInferior-pliegueInf1)\n\t\t//var fresado2 = new RVector(pos.x+alaIzquierda,pos.y+alaInferior+pliegueInferior-pliegueInf1)\n\t\tvar fresado3 = new RVector(pos.x+alaIzquierda+anchura1-pliegueInf1,pos.y+alaInferior+pliegueInferior-pliegueInf1)\n\t\t\n\t\t//dibujarFresado_auxiliar(doc,fresado10,fresado1)\n var line = new RLineEntity(document, new RLineData( fresado1 , fresado3 ));\n\t op_fresado.addObject(line,false);\n\n\t\t//dibujarFresado_auxiliar(doc,fresado2,fresado11)\n }\n\t\n\t//anchura2 - Inferior\n\tif (anchura2>(pliegueInf2*2)){\n\t\tvar fresado4 = new RVector(pos.x+alaIzquierda+anchura1+pliegueInf2,pos.y+alaInferior+pliegueInferior-pliegueInf2)\n\t\tvar fresado5 = new RVector(pos.x+alaIzquierda+anchura1+anchura2-pliegueInf2,pos.y+alaInferior+pliegueInferior-pliegueInf2)\n var line = new RLineEntity(document, new RLineData( fresado4 , fresado5 ));\n\t op_fresado.addObject(line,false);\n\n }\n\t\n\t//anchura3 - Inferior\n\tif (anchura3>(pliegueInf3)){\n\t\tvar fresado6 = new RVector(pos.x+alaIzquierda+anchura1+anchura2+pliegueInf3,pos.y+alaInferior+pliegueInferior-pliegueInf3)\n\t\tvar fresado7 = new RVector(pos.x+alaIzquierda+anchura1+anchura2+anchura3+pliegueDer,pos.y+alaInferior+pliegueInferior-pliegueInf3)\n var line = new RLineEntity(document, new RLineData( fresado6 , fresado7 ));\n\t op_fresado.addObject(line,false);\n\n }\n\t\n\t\n\t\n\t\n\t\n\t//Puntos extra para esta pieza\n\tvar fresado7 = new RVector(pos.x+alaIzquierda+anchura1+anchura2+anchura3+pliegueDer,pos.y+alaInferior+pliegueInferior-pliegueInf3)\n\tvar fresado8 = new RVector(pos.x+alaIzquierda+anchura1+anchura2+anchura3+pliegueDer,pos.y+alaInferior+pliegueInferior-pliegueDer)\n var line = new RLineEntity(document, new RLineData( fresado7 , fresado8 ));\n\top_fresado.addObject(line,false);\n\n\t\n\tvar fresado9 = new RVector(pos.x+alaIzquierda+anchura1+anchura2+anchura3+pliegueDer,pos.y+alaInferior+pliegueInferior+pliegueDer)\n\tvar fresado10 = new RVector(pos.x+alaIzquierda+anchura1+anchura2+anchura3+pliegueDer,pos.y+alaInferior+pliegueInferior+alturaPlaca)\n var line = new RLineEntity(document, new RLineData( fresado9 , fresado10 ));\n\top_fresado.addObject(line,false);\n\t\n\n var line = new RLineEntity(document, new RLineData( fresado21 , fresado10 ));\n\top_fresado.addObject(line,false);\n\t\n\tvar fresado11 = new RVector(pos.x+alaIzquierda+anchura1+anchura2+anchura3,pos.y+alaInferior)\n var line = new RLineEntity(document, new RLineData( fresado20 , fresado11 ));\n\top_fresado.addObject(line,false);\n\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t//anchura1 - Superior\n\tif (anchura1>(pliegueSuperior*2)){\n\t\tvar fresado25 = new RVector(pos.x+alaIzquierda,pos.y+alaInferior+pliegueInferior+alturaPlaca+pliegueSuperior)\n\t\tvar fresado26 = new RVector(pos.x+alaIzquierda+anchura1-pliegueSuperior,pos.y+alaInferior+pliegueInferior+alturaPlaca+pliegueSuperior)\n var line = new RLineEntity(document, new RLineData( fresado25 , fresado26 ));\n\t op_fresado.addObject(line,false);\n\t\t\n\t\t\n\t\tif (crearFresado==1){ //Esto es para hacer el fresado externo o no\n\t\t\tvar fresado27 = new RVector(pos.x+alaIzquierda+anchura1-pliegueSuperior+margenFresado,pos.y+alaInferior+pliegueInferior+alturaPlaca+pliegueSuperior)\n\t\t\tvar fresado28 = new RVector(pos.x+alaIzquierda+anchura1-pliegueSuperior+margenFresado,pos.y+alaInferior+pliegueInferior+alturaPlaca+pliegueSuperior+alaSuperior)\n var line = new RLineEntity(document, new RLineData( fresado27 , fresado28 ));\n\t op_fresado.addObject(line,false);\n\t\t\t\n }\n }\n\t\n\t//anchura2 - Superior\n\tif (anchura2>(pliegueSuperior*2)){\n\t\tvar fresado31 = new RVector(pos.x+alaIzquierda+anchura1+pliegueSuperior,pos.y+alaInferior+pliegueInferior+alturaPlaca+pliegueSuperior)\n\t\tvar fresado32 = new RVector(pos.x+alaIzquierda+anchura1+anchura2-pliegueSuperior,pos.y+alaInferior+pliegueInferior+alturaPlaca+pliegueSuperior)\n var line = new RLineEntity(document, new RLineData( fresado31 , fresado32 ));\n\t op_fresado.addObject(line,false);\n\t\t\n\t\t\n\t\tif (crearFresado==1) {\n\t\t\tvar fresado29 = new RVector(pos.x+alaIzquierda+anchura1+pliegueSuperior-margenFresado,pos.y+alaInferior+pliegueInferior+alturaPlaca+pliegueSuperior+alaSuperior)\n\t\t\tvar fresado30 = new RVector(pos.x+alaIzquierda+anchura1+pliegueSuperior-margenFresado,pos.y+alaInferior+pliegueInferior+alturaPlaca+pliegueSuperior)\n var line = new RLineEntity(document, new RLineData( fresado29 , fresado30 ));\n\t op_fresado.addObject(line,false);\n\t\t\n\t\t\tvar fresado33 = new RVector(pos.x+alaIzquierda+anchura1+anchura2-pliegueSuperior+margenFresado,pos.y+alaInferior+pliegueInferior+alturaPlaca+pliegueSuperior)\n\t\t\tvar fresado34 = new RVector(pos.x+alaIzquierda+anchura1+anchura2-pliegueSuperior+margenFresado,pos.y+alaInferior+pliegueInferior+alturaPlaca+pliegueSuperior+alaSuperior)\n var line = new RLineEntity(document, new RLineData( fresado33 , fresado34 ));\n\t op_fresado.addObject(line,false);\n\t\t\n }\n }\n\t\n\t//anchura3 - Superior\n\tif (anchura3>pliegueSuperior*2){\n\t\tvar fresado37 = new RVector(pos.x+alaIzquierda+anchura1+anchura2+pliegueSuperior,pos.y+alaInferior+pliegueInferior+alturaPlaca+pliegueSuperior)\n\t\tvar fresado38 = new RVector(pos.x+alaIzquierda+anchura1+anchura2+anchura3-pliegueSuperior,pos.y+alaInferior+pliegueInferior+alturaPlaca+pliegueSuperior)\n var line = new RLineEntity(document, new RLineData( fresado37 , fresado38 ));\n\t op_fresado.addObject(line,false);\n\t\t\n\t\t\n\t\tif (crearFresado==1){\n\t\t\tvar fresado35 = new RVector(pos.x+alaIzquierda+anchura1+anchura2+pliegueSuperior-margenFresado,pos.y+alaInferior+pliegueInferior+alturaPlaca+pliegueSuperior+alaSuperior)\n\t\t\tvar fresado36 = new RVector(pos.x+alaIzquierda+anchura1+anchura2+pliegueSuperior-margenFresado,pos.y+alaInferior+pliegueInferior+alturaPlaca+pliegueSuperior)\n var line = new RLineEntity(document, new RLineData( fresado35 , fresado36 ));\n\t op_fresado.addObject(line,false);\n\t\t\t\n\t\t\tvar fresado39 = new RVector(pos.x+alaIzquierda+anchura1+anchura2+anchura3-pliegueSuperior+margenFresado,pos.y+alaInferior+pliegueInferior+alturaPlaca+pliegueSuperior)\n\t\t\tvar fresado40 = new RVector(pos.x+alaIzquierda+anchura1+anchura2+anchura3-pliegueSuperior+margenFresado,pos.y+alaInferior+pliegueInferior+alturaPlaca+pliegueSuperior+alaSuperior)\n var line = new RLineEntity(document, new RLineData( fresado39 , fresado40 ));\n\t op_fresado.addObject(line,false);\n\t\t\n }\n }\n\t\n\t\n\tvar fresado2 = new RVector(pos.x+alaIzquierda,pos.y)\n\tvar fresado25 = new RVector(pos.x+alaIzquierda,pos.y+alaInferior+pliegueInferior+alturaPlaca+pliegueSuperior)\n var line = new RLineEntity(document, new RLineData( fresado2 , fresado25 ));\n\top_fresado.addObject(line,false);\n\t\n\t\n\t\n\t\n\n\treturn op_fresado; \n}", "function visProdukt(produkt) {\n console.log(produkt);\n\n\n /**** KLON PRODUKT_TEMPLATE ****/\n var klon = document.querySelector(\"#produkt_template\").content.cloneNode(true);\n\n\n /**** INDSÆTTER DATA I KLON I .ret ****/\n klon.querySelector(\".data_navn\").innerHTML = produkt.navn;\n klon.querySelector(\".data_kort_beskrivelse\").innerHTML = produkt.kortbeskrivelse;\n klon.querySelector(\".data_allergener\").innerHTML = produkt.allergener;\n klon.querySelector(\".data_pris\").innerHTML = produkt.pris;\n\n\n /**** INDSÆTTER DATA I KLON I MODAL ****/\n klon.querySelector(\".modal_overskrift\").innerHTML = produkt.navn;\n klon.querySelector(\".modal_lang_beskrivelse\").innerHTML = produkt.langbeskrivelse;\n klon.querySelector(\".modal_allergener\").innerHTML = produkt.allergener;\n klon.querySelector(\".modal_data_pris\").innerHTML = produkt.pris;\n\n\n /**** SE DETALJER-KNAP ****/\n klon.getElementById(\"modal_menukort\").setAttribute(\"id\", \"modal_menukort_\" + produkt.id);\n klon.getElementById(\"se_detaljer_knap\").setAttribute(\"data-target\", \"#modal_menukort_\" + produkt.id);\n\n\n /**** HENTER KORT BESKRIVELSE IND I MODAL, HVIS LANG BESKRIVELSE IKKE ER I DATA HOS SPECIFIKT PRODUKT ****/\n if (produkt.langbeskrivelse == \"\") {\n klon.querySelector(\".modal_lang_beskrivelse\").innerHTML = produkt.kortbeskrivelse;\n }\n\n\n /**** RABAT-BEREGNING I .ret ****/\n var rabatpris = Math.ceil(produkt.pris - (produkt.pris * produkt.rabatsats / 100));\n klon.querySelector(\".data_rabatpris\").innerHTML = rabatpris;\n\n\n /**** RABAT-BEREGNING I MODAL ****/\n var rabatpris = Math.ceil(produkt.pris - (produkt.pris * produkt.rabatsats / 100));\n klon.querySelector(\".modal_data_rabatpris\").innerHTML = rabatpris;\n\n\n /**** BILLEDER ****/\n klon.querySelector(\".data_billede\").src = \"./Billeder/imgs/Large/\" + produkt.billede + \".jpg\";\n\n\n /**** ALLERGENER I .ret ****/\n if (produkt.allergener == false) {\n var allergener = klon.querySelector(\".allergener_tekst\");\n allergener.parentNode.removeChild(allergener);\n } else {\n klon.querySelector(\".data_allergener\").innerHTML = produkt.allergener;\n }\n\n\n /**** ALLERGENER I MODAL ****/\n if (produkt.allergener == false) {\n var allergener = klon.querySelector(\".modal_allergener_tekst\");\n allergener.parentNode.removeChild(allergener);\n } else {\n klon.querySelector(\".modal_allergener\").innerHTML = produkt.allergener;\n }\n\n\n /**** VEGETAR I .ret ****/\n if (produkt.vegetar == false) {\n var vegetaregnet = klon.querySelector(\".vegetaregnet_tekst\");\n vegetaregnet.parentNode.removeChild(vegetaregnet);\n } else {\n var ikke_vegetaregnet = klon.querySelector(\".ikke_vegetaregnet_tekst\");\n ikke_vegetaregnet.parentNode.removeChild(ikke_vegetaregnet);\n }\n\n\n /**** VEGETAR I MODAL ****/\n if (produkt.vegetar == false) {\n var vegetaregnet = klon.querySelector(\".modal_vegetaregnet_tekst\");\n vegetaregnet.parentNode.removeChild(vegetaregnet);\n } else {\n var ikke_vegetaregnet = klon.querySelector(\".modal_ikke_vegetaregnet_tekst\");\n ikke_vegetaregnet.parentNode.removeChild(ikke_vegetaregnet);\n }\n\n\n /**** UDSOLGT I .ret ****/\n if (produkt.udsolgt == false) {\n //produktet er ikke udsolge\n //udsolgt_tekst skal fjernes\n var udsolgt_tekst = klon.querySelector(\".udsolgt_tekst\");\n udsolgt_tekst.parentNode.removeChild(udsolgt_tekst);\n } else {\n klon.querySelector(\".pris\").classList.add(\"udsolgt\");\n }\n\n\n /**** UDSOLGT I MODAL ****/\n if (produkt.udsolgt == false) {\n //produktet er ikke udsolge\n //udsolgt_tekst skal fjernes\n var modal_udsolgt_tekst = klon.querySelector(\".modal_udsolgt_tekst\");\n modal_udsolgt_tekst.parentNode.removeChild(modal_udsolgt_tekst);\n } else {\n klon.querySelector(\".modal_pris\").classList.add(\"udsolgt\");\n }\n\n\n /**** RABAT i .ret ****/\n if (produkt.udsolgt == true || produkt.rabatsats == 0) {\n //der er ikke rabat. Rabatprisen skal fjernes\n var rabatpris = klon.querySelector(\".rabatpris\");\n rabatpris.parentNode.removeChild(rabatpris);\n } else {\n klon.querySelector(\".pris\").classList.add(\"rabat\");\n }\n\n\n /**** RABAT I MODAL ****/\n if (produkt.udsolgt == true || produkt.rabatsats == 0) {\n //der er ikke rabat. Rabatprisen skal fjernes\n var modal_rabatpris = klon.querySelector(\".modal_rabatpris\");\n modal_rabatpris.parentNode.removeChild(modal_rabatpris);\n } else {\n klon.querySelector(\".modal_pris\").classList.add(\"rabat\");\n }\n\n\n var visMåskeProdukt = true;\n\n\n /**** FILTRERER PRODUKTER MED ALLERGENER FRA ****/\n if (udenAllergener) {\n visMåskeProdukt = visMåskeProdukt && produkt.allergener == \"\";\n }\n\n\n /**** FILTRERER IKKE VEGETAREGNEDE PRODUKTER FRA ****/\n if (vegetaregnet_filtrer) {\n visMåskeProdukt = visMåskeProdukt && produkt.vegetar;\n }\n\n\n /**** FILTRERER UDSOLGTE PRODUKTER FRA ****/\n if (påLager) {\n visMåskeProdukt = visMåskeProdukt && !produkt.udsolgt;\n }\n\n\n /**** FILTRERER PRODUKTER UDEN RABAT FRA ****/\n if (rabat) {\n visMåskeProdukt = visMåskeProdukt && produkt.rabatsats != 0;\n }\n\n\n /**** TILFØJER klon TIL KATEGORI ****/\n if (visMåskeProdukt) {\n document.querySelector(\".\" + produkt.kategori).appendChild(klon);\n }\n}", "function payerPanier(){\n \n // On cache le panier\n document.getElementById('panierModal').style.display='none';\n\n // On détruit le contenu du panier (car on va réutiliser la Somme, et on ne veut pas l'avoir 2 fois !)\n $(\"#panierModal\").remove();\n\n // On affiche la facture\n displayFacture();\n\n // On vide le panier\n panier.length = 0;\n \n // Nb article dans le panier\n refreshButtonPanier();\n\n // On affiche que le paiement a été effectué\n dipslaySnackbar(\"Paiement effectué. Merci !\");\n}", "showPropertyEditor() {\n const LayoutMng = require('../layout/layout_mng');\n // create the editor window if not exists\n if (null==this.propEditor) {\n let editor = this.propEditor = this.createFormWindow('Settings Editor #'+this.id, {\n parent: LayoutMng.singleton.uiParent,\n border: 'line',\n top: Math.max(parseInt(LayoutMng.singleton.uiParent.height/2)-20, 1),\n left: 'center',\n width: 35,\n shrink: true,\n });\n editor.compCount = 0;\n editor.comps = new Object();\n this.addPropertyEditorComps();\n let okay = this.createBtn('Okay', {\n parent: editor, \n right: 14, \n top: this.propEditor.compCount*2+1, \n width: 6, height: 1,\n });\n okay.on('press', ()=>{ editor.submit(); });\n editor.on('submit', (data)=>{\n this.propEditor.hide();\n LayoutMng.singleton.screen.render();\n for (let n in data) {\n if (typeof(data[n])!='string') {\n delete data[n];\n continue;\n }\n data[n] = data[n].trim();\n }\n bilog(\"settings submit: \"+JSON.stringify(data));\n this.onPropertyEditorSubmit(data);\n });\n let cancel = this.createBtn('Cancel', {\n parent: editor, \n right: 2, \n top: this.propEditor.compCount*2+1, \n width: 8, height: 1,\n });\n cancel.on('press', ()=>{\n this.propEditor.hide();\n });\n }\n // reset values of all fields\n LayoutMng.singleton.screen.render();\n this.resetPropertyEditorData();\n // show up\n this.propEditor.show();\n this.propEditor.focus();\n LayoutMng.singleton.screen.render();\n }", "ClickOnAddScene(){\n // Load add Scene Config\n this._Scene.RenderAddModScene(this._DeviceConteneur, this._DeviceConfig.Electrovannes)\n }", "function ciniki_web_pages() {\n //\n // Panels\n //\n this.childFormat = {\n '5':{'name':'List'},\n '8':{'name':'Image List'},\n '10':{'name':'Name List'},\n '11':{'name':'Thumbnails'},\n '12':{'name':'Buttons'},\n\n// '6':{'name':'Menu'},\n// '32':{'name':'List'},\n };\n this.parentChildrenFormat = {\n '5':{'name':'List'},\n '6':{'name':'Menu'},\n '7':{'name':'Page Menu'},\n '8':{'name':'Image List'},\n '11':{'name':'Thumbnails'},\n '12':{'name':'Buttons'},\n// '32':{'name':'List'},\n };\n this.menuFlags = {\n '1':{'name':'Header'},\n '2':{'name':'Footer'},\n };\n this.init = function() {\n }\n\n this.createEditPanel = function(cb, pid, parent_id, rsp) {\n var pn = 'edit_' + pid;\n //\n // Check if panel already exists, and reset for use\n //\n if( this.pn == null ) {\n //\n // The panel to display the edit form\n //\n this[pn] = new M.panel('Page', 'ciniki_web_pages', pn, 'mc', 'medium', 'sectioned', 'ciniki.web.pages.edit');\n this[pn].data = {}; \n this[pn].modules_pages = {};\n this[pn].stackedData = [];\n this[pn].page_id = pid;\n this[pn].page_type = (rsp.page != null && rsp.page.page_type != null ? rsp.page.page_type : 10);\n this[pn].showSelect = function() {\n M.ciniki_web_pages['edit_'+pid].editSelect('details', 'parent_id', 'yes');\n }\n this[pn].sections = {\n 'details':{'label':'', 'aside':'yes', 'fields':{\n 'parent_id':{'label':'Parent Page', 'type':'select', 'options':{},\n 'editable':'afterclick',\n 'confirmMsg':'Are you sure you want to move this page on your website?',\n 'confirmButton':'Move Page',\n 'confirmFn':this[pn].showSelect,\n },\n 'title':{'label':'Menu Title', 'type':'text'},\n 'article_title':{'label':'Page Title', 'visible':'no', 'type':'text'},\n 'sequence':{'label':'Page Order', 'type':'text', 'size':'small'},\n '_flags_1':{'label':'Visible', 'type':'flagtoggle', 'bit':0x01, 'field':'flags_1', 'default':'on'},\n '_flags_2':{'label':'Private', 'type':'flagtoggle', 'bit':0x02, 'field':'flags_2', 'default':'off',\n 'active':function() { return M.modFlagAny('ciniki.customers', 0x03); },\n },\n '_flags_3':{'label':'Members Only', 'type':'flagtoggle', 'bit':0x04, 'field':'flags_3', 'default':'off',\n 'active':function() { return M.modFlagSet('ciniki.customers', 0x02); },\n },\n 'menu_flags':{'label':'Menu Options', 'type':'flags', 'flags':this.menuFlags},\n '_flags_4':{'label':'Password', 'type':'flagtoggle', 'bit':0x08, 'field':'flags_4', 'default':'off',\n 'active':(M.modFlagSet('ciniki.web', 0x2000)),\n 'on_fields':['page_password'],\n },\n 'page_password':{'label':'', 'type':'text', 'visible':(M.modFlagOn('ciniki.web', 0x2000) && (rsp.page.flags&0x08) == 0x08 ? 'yes' : 'no')},\n }},\n '_page_type':{'label':'Page Type', 'aside':'yes', 'visible':'hidden', 'fields':{\n 'page_type':{'label':'', 'hidelabel':'yes', 'type':'toggle', 'toggles':{}, 'onchange':'M.ciniki_web_pages[\\'' + pn + '\\'].setPageType();'},\n }},\n '_redirect':{'label':'Redirect', 'visible':'hidden', \n 'visible':function() { return M.ciniki_web_pages[pn].sectionVisible('_redirect'); },\n 'fields':{\n 'page_redirect_url':{'label':'URL', 'type':'text'},\n }},\n '_tabs':{'label':'', 'type':'paneltabs', 'selected':'content', \n 'visible':function() { return M.ciniki_web_pages[pn].sectionVisible('_tabs'); },\n 'tabs':{\n 'content':{'label':'Content', 'fn':'M.ciniki_web_pages[\\'' + pn + '\\'].switchTab(\"content\");'},\n 'files':{'label':'Files', 'fn':'M.ciniki_web_pages[\\'' + pn + '\\'].switchTab(\"files\");'},\n 'gallery':{'label':'Gallery', 'fn':'M.ciniki_web_pages[\\'' + pn + '\\'].switchTab(\"gallery\");'},\n 'children':{'label':'Child Pages', 'fn':'M.ciniki_web_pages[\\'' + pn + '\\'].switchTab(\"children\");'},\n }},\n '_module':{'label':'Module', 'visible':'hidden', \n 'visible':function() { return M.ciniki_web_pages[pn].sectionVisible('_module'); },\n 'fields':{\n 'page_module':{'label':'Module', 'type':'select', 'options':{}, 'onchangeFn':'M.ciniki_web_pages[\\'' + pn + '\\'].setModuleOptions();'},\n }},\n '_module_options':{'label':'Options', \n 'visible':function() { return M.ciniki_web_pages[pn].sectionVisible('_module_options'); },\n 'fields':{\n }},\n '_image':{'label':'', 'type':'imageform', 'aside':'yes',\n 'visible':function() { return M.ciniki_web_pages[pn].sectionVisible('_image'); },\n 'fields':{\n 'primary_image_id':{'label':'', 'type':'image_id', 'hidelabel':'yes', \n 'controls':'all', 'history':'no', \n 'addDropImage':function(iid) {\n M.ciniki_web_pages[pn].setFieldValue('primary_image_id', iid, null, null);\n return true;\n },\n 'addDropImageRefresh':'',\n 'deleteImage':'M.ciniki_web_pages.'+pn+'.deletePrimaryImage',\n },\n }},\n '_image_caption':{'label':'', 'aside':'yes',\n 'visible':function() { return M.ciniki_web_pages[pn].sectionVisible('_image_caption'); },\n 'fields':{\n '_flags_15':{'label':'Show Image', 'type':'flagtoggle', 'field':'flags_15', 'reverse':'yes', 'bit':0x4000},\n 'primary_image_caption':{'label':'Caption', 'type':'text'},\n // 'primary_image_url':{'label':'URL', 'type':'text'},\n }},\n '_synopsis':{'label':'Synopsis', 'aside':'yes', \n 'visible':function() { return M.ciniki_web_pages[pn].sectionVisible('_synopsis'); },\n 'fields':{\n 'synopsis':{'label':'', 'type':'textarea', 'size':'small', 'hidelabel':'yes'},\n }},\n '_content':{'label':'Content', \n 'visible':function() { return M.ciniki_web_pages[pn].sectionVisible('_content'); },\n 'fields':{\n 'content':{'label':'', 'type':'textarea', 'size':'xlarge', 'hidelabel':'yes'},\n }},\n 'files':{'label':'Files', // 'aside':'yes', //'visible':'hidden', \n 'visible':function() { return M.ciniki_web_pages[pn].sectionVisible('files'); },\n 'type':'simplegrid', 'num_cols':1,\n 'headerValues':null,\n 'cellClasses':[''],\n 'addTxt':'Add File',\n 'addFn':'M.ciniki_web_pages.'+pn+'.editComponent(\\'ciniki.web.pagefiles\\',\\'M.ciniki_web_pages.'+pn+'.updateFiles();\\',{\\'file_id\\':\\'0\\'});',\n },\n '_files':{'label':'', // 'aside':'yes', //'visible':'hidden', \n 'visible':function() { return M.ciniki_web_pages[pn].sectionVisible('_files'); },\n 'fields':{\n '_flags_13':{'label':'Reverse Order', 'type':'flagtoggle', 'bit':0x1000, 'field':'flags_13', 'default':'on'},\n }},\n 'images':{'label':'Gallery', 'type':'simplethumbs',\n 'visible':function() { return M.ciniki_web_pages[pn].sectionVisible('images'); },\n },\n '_images':{'label':'', 'type':'simplegrid', 'num_cols':1,\n 'visible':function() { return M.ciniki_web_pages[pn].sectionVisible('_images'); },\n 'addTxt':'Add Image',\n 'addFn':'M.ciniki_web_pages.'+pn+'.editComponent(\\'ciniki.web.pageimages\\',\\'M.ciniki_web_pages.'+pn+'.addDropImageRefresh();\\',{\\'add\\':\\'yes\\'});',\n },\n '_children':{'label':'Child Pages', \n 'visible':function() { return M.ciniki_web_pages[pn].sectionVisible('_children'); },\n 'fields':{\n 'child_title':{'label':'Heading', 'type':'text'},\n 'child_format':{'label':'Format', 'active':'yes', 'type':'flags', 'toggle':'yes', 'none':'no', 'join':'yes', 'flags':this.childFormat},\n }},\n 'pages':{'label':'', 'type':'simplegrid', 'num_cols':1, \n 'visible':function() { return M.ciniki_web_pages[pn].sectionVisible('pages'); },\n 'seqDrop':function(e,from,to) {\n M.ciniki_web_pages[pn].savePos();\n M.api.getJSONCb('ciniki.web.pageUpdate', {'tnid':M.curTenantID, \n 'page_id':M.ciniki_web_pages[pn].data.pages[from].page.id,\n 'parent_id':M.ciniki_web_pages[pn].page_id,\n 'sequence':M.ciniki_web_pages[pn].data.pages[to].page.sequence, \n }, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_web_pages[pn].updateChildren();\n });\n },\n 'addTxt':'Add Child Page',\n 'addFn':'M.ciniki_web_pages.'+pn+'.childEdit(0);',\n },\n 'sponsors':{'label':'Sponsors', 'type':'simplegrid', 'visible':'hidden', 'num_cols':1,\n 'visible':function() { return M.ciniki_web_pages[pn].sectionVisible('sponsors'); },\n 'addTxt':'Manage Sponsors',\n 'addFn':'M.ciniki_web_pages.'+pn+'.sponsorEdit(0);',\n },\n '_buttons':{'label':'', 'buttons':{\n 'save':{'label':'Save', 'fn':'M.ciniki_web_pages.'+pn+'.savePage();'},\n 'delete':{'label':'Delete', 'visible':(pid==0?'no':'yes'), 'fn':'M.ciniki_web_pages.'+pn+'.deletePage();'},\n }},\n };\n this[pn].fieldHistoryArgs = function(s, i) {\n return {'method':'ciniki.web.pageHistory', 'args':{'tnid':M.curTenantID,\n 'page_id':this.page_id, 'field':i}};\n };\n this[pn].sectionData = function(s) { \n return this.data[s];\n };\n this[pn].sectionVisible = function(s) {\n if( s == '_tabs' && this.page_type == 10 ) {\n return 'yes';\n }\n// this.sections._image.visible = (pt=='10' || ((pt==20 || pt==30) && this.data.parent_id > 0) ?'yes':'hidden');\n// this.sections._image_caption.visible = (pt=='10'?'yes':'hidden');\n if( s == '_synopsis' && (this.page_type == 10 || (this.page_type == 11 && this.data.parent_id > 0)) ) {\n return 'yes';\n }\n if( s == '_synopsis' && this.page_type == 20 && this.data.parent_id > 0 ) {\n return 'yes';\n }\n if( s == '_content' && ((this.page_type == 10 && this.sections._tabs.selected == 'content') || this.page_type == 11) ) {\n return 'yes';\n }\n if( (s == '_image' || s == '_image_caption') && (this.page_type == 10 )) {\n return 'yes';\n }\n if( s == '_image' && (this.page_type == 11 || this.page_type == 20) && this.data.parent_id > 0 ) {\n return 'yes';\n }\n if( (s == 'images' || s == '_images') && this.page_type == 10 && this.sections._tabs.selected == 'gallery' ) {\n return 'yes';\n }\n if( (s == 'files' || s == '_files') && this.page_type == 10 && this.sections._tabs.selected == 'files' ) {\n return 'yes';\n }\n if( (s == '_children' || s == 'pages') && this.page_type == 10 && this.sections._tabs.selected == 'children' ) {\n return 'yes';\n }\n if( s == 'pages' && this.page_type == 11 ) {\n return 'yes';\n }\n if( s == '_redirect' && this.page_type == 20 ) {\n return 'yes';\n }\n if( (s == '_module' || s == '_module_options') && this.page_type == 30 ) {\n return 'yes';\n }\n return 'hidden';\n }\n this[pn].switchTab = function(t) {\n this.sections._tabs.selected = t;\n this.refreshSection('_tabs');\n this.showHideSections(['_synopsis', '_redirect', '_image', '_image_caption', '_content', 'images', '_images', 'files', '_files', '_children', 'pages', 'sponsors', '_modules', '_module_options']);\n }\n this[pn].fieldValue = function(s, i, j, d) {\n if( i == 'parent_id' ) { return ' ' + this.data[i]; }\n return this.data[i];\n };\n this[pn].cellValue = function(s, i, j, d) {\n if( s == 'pages' ) {\n return d.page.title;\n } else if( s == 'files' ) {\n return d.file.name;\n } else if( s == 'sponsors' && j == 0 ) { \n return '<span class=\"maintext\">' + d.sponsor.title + '</span>';\n }\n };\n this[pn].rowFn = function(s, i, d) {\n if( s == 'pages' ) {\n return 'M.ciniki_web_pages.'+pn+'.childEdit(\\'' + d.page.id + '\\');';\n } else if( s == 'files' ) {\n return 'M.startApp(\\'ciniki.web.pagefiles\\',null,\\'M.ciniki_web_pages.'+pn+'.updateFiles();\\',\\'mc\\',{\\'file_id\\':\\'' + d.file.id + '\\'});';\n } else if( s == 'sponsors' ) {\n return 'M.startApp(\\'ciniki.sponsors.ref\\',null,\\'M.ciniki_web_pages.'+pn+'.updateSponsors();\\',\\'mc\\',{\\'ref_id\\':\\'' + d.sponsor.ref_id + '\\'});';\n }\n };\n this[pn].thumbFn = function(s, i, d) {\n return 'M.startApp(\\'ciniki.web.pageimages\\',null,\\'M.ciniki_web_pages.'+pn+'.addDropImageRefresh();\\',\\'mc\\',{\\'page_id\\':M.ciniki_web_pages.'+pn+'.page_id,\\'page_image_id\\':\\'' + d.image.id + '\\'});';\n };\n this[pn].deletePrimaryImage = function(fid) {\n this.setFieldValue(fid, 0, null, null);\n return true;\n };\n this[pn].addDropImage = function(iid) {\n if( this.page_id == 0 ) {\n var c = this.serializeForm('yes');\n var rsp = M.api.postJSON('ciniki.web.pageAdd', \n {'tnid':M.curTenantID}, c);\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n this.page_id = rsp.id;\n }\n var rsp = M.api.getJSON('ciniki.web.pageImageAdd', \n {'tnid':M.curTenantID, 'image_id':iid, 'page_id':this.page_id});\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n return true;\n };\n this[pn].addDropImageRefresh = function() {\n if( M.ciniki_web_pages[pn].page_id > 0 ) {\n M.api.getJSONCb('ciniki.web.pageGet', {'tnid':M.curTenantID, \n 'page_id':M.ciniki_web_pages[pn].page_id, 'images':'yes'}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_web_pages[pn];\n p.data.images = rsp.page.images;\n p.refreshSection('images');\n p.show();\n });\n }\n return true;\n };\n this[pn].editComponent = function(a,cb,args) {\n if( this.page_id == 0 ) {\n var p = this;\n var c = this.serializeFormData('yes');\n M.api.postJSONFormData('ciniki.web.pageAdd', \n {'tnid':M.curTenantID}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n p.page_id = rsp.id;\n args['page_id'] = rsp.id;\n M.startApp(a,null,cb,'mc',args);\n });\n } else {\n args['page_id'] = this.page_id;\n M.startApp(a,null,cb,'mc',args);\n }\n };\n\n this[pn].updateFiles = function() {\n if( this.page_id > 0 ) {\n M.api.getJSONCb('ciniki.web.pageGet', {'tnid':M.curTenantID, \n 'page_id':this.page_id, 'files':'yes'}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_web_pages[pn];\n p.data.files = rsp.page.files;\n p.refreshSection('files');\n p.show();\n });\n }\n return true;\n };\n\n this[pn].updateChildren = function() {\n if( this.page_id > 0 ) {\n M.api.getJSONCb('ciniki.web.pageGet', {'tnid':M.curTenantID, \n 'page_id':this.page_id, 'children':'yes'}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_web_pages[pn];\n p.data.pages = rsp.page.pages;\n p.refreshSection('pages');\n p.show();\n });\n }\n return true;\n };\n this[pn].updateSponsors = function() {\n if( this.page_id > 0 ) {\n M.api.getJSONCb('ciniki.web.pageGet', {'tnid':M.curTenantID, \n 'page_id':this.page_id, 'sponsors':'yes'}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n var p = M.ciniki_web_pages[pn];\n p.data.sponsors = rsp.page.sponsors;\n p.refreshSection('sponsors');\n p.show();\n });\n }\n return true;\n };\n\n this[pn].childEdit = function(cid) {\n if( this.page_id == 0 ) {\n // Save existing data as new page\n var p = this;\n var c = this.serializeFormData('yes');\n M.api.postJSONFormData('ciniki.web.pageAdd', \n {'tnid':M.curTenantID}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n p.page_id = rsp.id;\n M.ciniki_web_pages.pageEdit('M.ciniki_web_pages.'+pn+'.updateChildren();',cid,p.page_id);\n });\n } else {\n M.ciniki_web_pages.pageEdit('M.ciniki_web_pages.'+pn+'.updateChildren();',cid,this.page_id);\n }\n };\n this[pn].sponsorEdit = function(cid) {\n if( this.page_id == 0 ) {\n // Save existing data as new page\n var p = this;\n var c = this.serializeFormData('yes');\n M.api.postJSONFormData('ciniki.web.pageAdd', \n {'tnid':M.curTenantID}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n p.page_id = rsp.id;\n// M.ciniki_web_pages.pageEdit('M.ciniki_web_pages.'+pn+'.updateChildren();',cid,p.page_id);\n M.startApp('ciniki.sponsors.ref',null,p.panelRef+'.updateSponsors();','mc',{'object':'ciniki.web.page','object_id':p.page_id});\n });\n } else {\n M.startApp('ciniki.sponsors.ref',null,this.panelRef+'.updateSponsors();','mc',{'object':'ciniki.web.page','object_id':this.page_id});\n }\n };\n // \n // Add or remove sections based on page type\n //\n this[pn].setPageType = function() {\n var pt = this.formValue('page_type');\n this.page_type = pt;\n var p = M.gE(this.panelUID);\n if( pt == '10' ) { //|| (pt == 11 && this.data.parent_id > 0) ) {\n p.children[0].className = 'large mediumaside';\n } else if( pt == '11' ) {\n p.children[0].className = 'large mediumaside';\n } else if( pt == '20' ) {\n p.children[0].className = 'medium';\n } else {\n p.children[0].className = 'medium mediumaside';\n }\n// this.sections._module_options.visible = 'hidden';\n// this.sections._image.visible = (pt=='10' || ((pt==20 || pt==30) && this.data.parent_id > 0) ?'yes':'hidden');\n// this.sections._image_caption.visible = (pt=='10'?'yes':'hidden');\n// this.sections._synopsis.visible = (pt=='10' || ((pt==20 || pt==30) && this.data.parent_id > 0)?'yes':'hidden');\n// this.sections._content.visible = ((pt=='10'||pt==11)?'yes':'hidden');\n// this.sections.files.visible = (pt=='10'?'yes':'hidden');\n// this.sections._files.visible = (pt=='10'?'yes':'hidden');\n// this.sections.images.visible = (pt=='10'?'yes':'hidden');\n// this.sections._images.visible = (pt=='10'?'yes':'hidden');\n// this.sections._children.visible = (pt=='10'?'yes':'hidden');\n// this.sections.pages.visible = (pt=='10'||pt=='11'?'yes':'hidden');\n// this.sections.sponsors.visible = (pt=='10'?'yes':'hidden');\n// this.sections._redirect.visible = (pt=='20'?'yes':'hidden');\n// this.sections._module.visible = (pt=='30'?'yes':'hidden');\n// this.sections._module_options.visible = (pt=='30'?'yes':'hidden');\n if( pt == '30' ) { \n this.setModuleOptions();\n }\n this.refreshSection('_tabs');\n this.showHideSections(['_synopsis', '_redirect', '_image', '_image_caption', '_content', 'images', '_images', 'files', '_files', '_children', 'pages', 'sponsors', '_module', '_module_options']);\n this.refreshSection('_module');\n/* for(i in this.sections) {\n var e = M.gE(this.panelUID + '_section_' + i);\n if( e != null && this.sections[i].visible != null && this.sections[i].visible != 'no' ) {\n if( this.sections[i].visible == 'hidden' ) {\n e.style.display = 'none';\n } else if( this.sections[i].visible == 'yes' ) {\n e.style.display = 'block';\n }\n }\n } */\n var e = M.gE(this.panelUID + '_article_title');\n if( pt == 10 || pt == 11 ) {\n this.sections.details.fields.article_title.visible = 'yes';\n e.parentNode.parentNode.style.display = '';\n } else {\n this.sections.details.fields.article_title.visible = 'no';\n e.parentNode.parentNode.style.display = 'none';\n }\n };\n this[pn].setModuleOptions = function() {\n// this.sections._module_options.visible = 'hidden';\n var mod = this.formValue('page_module');\n this.sections._module_options.fields = {};\n for(var i in this.modules_pages) {\n if( i == mod ) {\n if( this.modules_pages[i].options != null ) {\n for(var j in this.modules_pages[i].options) {\n// this.sections._module_options.visible = 'yes';\n this.setModuleOptionsField(this.modules_pages[i].options[j]);\n }\n }\n break;\n }\n }\n this.refreshSection('_module_options');\n// var e = M.gE(this.panelUID + '_section__module_options');\n// if( e != null && this.sections._module_options.visible == 'yes' && this.sections._module.visible == 'yes' ) {\n// e.style.display = 'block';\n// this.refreshSection('_module_options');\n// } else {\n// e.style.display = 'none';\n// }\n };\n this[pn].setModuleOptionsField = function(option) {\n this.sections._module_options.fields[option.setting] = {'label':option.label, 'type':option.type, 'hint':(option.hint!=null?option.hint:'')};\n if( option.type == 'toggle' ) {\n this.sections._module_options.fields[option.setting].toggles = {};\n for(var i in option.toggles) {\n this.sections._module_options.fields[option.setting].toggles[option.toggles[i].value] = option.toggles[i].label;\n }\n }\n else if( option.type == 'select' ) {\n this.sections._module_options.fields[option.setting].options = {};\n for(var i in option.options) {\n this.sections._module_options.fields[option.setting].options[option.options[i].value] = option.options[i].label;\n }\n }\n else if( option.type == 'image_id' ) {\n this.sections._module_options.fields[option.setting].addDropImage = function(iid) {\n M.ciniki_web_pages[pn].setFieldValue(option.setting, iid, null, null);\n return true;\n };\n if( option.controls != null ) {\n this.sections._module_options.fields[option.setting].controls = option.controls;\n } else {\n this.sections._module_options.fields[option.setting].controls = 'all';\n }\n }\n this.data[option.setting] = option.value;\n };\n this[pn].addButton('save', 'Save', 'M.ciniki_web_pages.'+pn+'.savePage();');\n this[pn].addClose('Cancel');\n this[pn].addLeftButton('website', 'Preview', 'M.ciniki_web_pages.'+pn+'.previewPage();');\n this[pn].savePage = function(preview) {\n var p = this;\n var flags = this.formValue('child_format');\n if( this.formValue('_flags_1') == 'on' ) {\n flags |= 0x01;\n } else {\n flags &= ~0x01;\n }\n if( this.formValue('_flags_2') == 'on' ) {\n flags |= 0x02;\n } else {\n flags &= ~0x02;\n }\n if( this.formValue('_flags_3') == 'on' ) {\n flags |= 0x04;\n } else {\n flags &= ~0x04;\n }\n if( this.formValue('_flags_4') == 'on' ) {\n flags |= 0x08;\n } else {\n flags &= ~0x08;\n }\n if( this.formValue('_flags_13') == 'on' ) {\n flags |= 0x1000;\n } else {\n flags &= ~0x1000;\n }\n if( this.formValue('_flags_15') == 'on' ) {\n flags |= 0x4000;\n } else {\n flags &= ~0x4000;\n }\n if( this.page_id > 0 ) {\n var c = this.serializeFormData('no');\n if( c != null || flags != this.data.flags ) {\n if( c == null ) { c = new FormData; }\n if( flags != this.data.flags ) {\n c.append('flags', flags);\n }\n M.api.postJSONFormData('ciniki.web.pageUpdate', \n {'tnid':M.curTenantID, 'page_id':this.page_id}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n if( preview != null ) {\n M.showWebsite(preview);\n } else {\n p.close();\n }\n });\n } else {\n if( preview != null ) {\n M.showWebsite(preview);\n } else {\n this.close();\n }\n }\n } else {\n var c = this.serializeFormData('yes');\n c.append('flags', flags);\n M.api.postJSONFormData('ciniki.web.pageAdd', \n {'tnid':M.curTenantID}, c, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n if( preview != null ) {\n M.showWebsite(preview);\n } else {\n p.close();\n }\n });\n }\n };\n this[pn].previewPage = function() {\n this.savePage(this.data.full_permalink);\n };\n this[pn].deletePage = function() {\n var p = this;\n M.confirm('Are you sure you want to delete this page? All files and images will also be removed from this page.',null,function() {\n M.api.getJSONCb('ciniki.web.pageDelete', {'tnid':M.curTenantID, \n 'page_id':p.page_id}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n p.close();\n });\n });\n };\n }\n\n// this[pn].sections.details.fields.parent_id.options = {'0':'None'};\n if( rsp.parentlist != null && rsp.parentlist.length > 0 ) {\n this[pn].sections.details.fields.parent_id.active = 'yes';\n this[pn].sections.details.fields.parent_id.options = {};\n this[pn].sections.details.fields.parent_id.options[' ' + 0] = 'None';\n for(var i in rsp.parentlist) {\n if( rsp.parentlist[i].page.id != this[pn].page_id ) {\n this[pn].sections.details.fields.parent_id.options[' ' + rsp.parentlist[i].page.id] = rsp.parentlist[i].page.title;\n }\n }\n } else {\n this[pn].sections.details.fields.parent_id.active = 'no';\n }\n this[pn].data = rsp.page;\n this[pn].modules_pages = rsp.modules_pages;\n // Remove child_format flags\n this[pn].data.flags_1 = (rsp.page.flags&0xFFFFFF0F);\n this[pn].data.flags_2 = (rsp.page.flags&0xFFFFFF0F);\n this[pn].data.flags_3 = (rsp.page.flags&0xFFFFFF0F);\n this[pn].data.flags_4 = (rsp.page.flags&0xFFFFFF0F);\n this[pn].data.flags_13 = (rsp.page.flags&0x00001000);\n this[pn].data.flags_15 = (rsp.page.flags&0x00004000);\n this[pn].data.child_format = (rsp.page.flags&0x00000FF0);\n this[pn].sections.details.fields.parent_id.active = 'yes';\n if( this[pn].page_id == 0 && parent_id != null ) {\n this[pn].data.parent_id = parent_id;\n if( parent_id == 0 ) {\n this[pn].data.title = '';\n }\n }\n this[pn].sections._page_type.visible = 'hidden';\n this[pn].sections._page_type.fields.page_type.toggles = {'10':'Custom'};\n // Check if flags for page menu and page redirects\n if( (M.curTenant.modules['ciniki.web'].flags&0x0640) > 0 ) {\n this[pn].sections._page_type.visible = 'yes';\n if( (M.curTenant.modules['ciniki.web'].flags&0x0800) > 0 ) {\n this[pn].sections._page_type.fields.page_type.toggles['11'] = 'Manual';\n }\n if( (M.curTenant.modules['ciniki.web'].flags&0x0400) > 0 ) {\n this[pn].sections._page_type.fields.page_type.toggles['20'] = 'Redirect';\n }\n if( (M.curTenant.modules['ciniki.web'].flags&0x0240) > 0 ) {\n this[pn].sections._page_type.fields.page_type.toggles['30'] = 'Module';\n this[pn].sections._module.fields.page_module.options = {};\n if( rsp.modules_pages != null ) {\n for(i in rsp.modules_pages) {\n this[pn].sections._module.fields.page_module.options[i] = rsp.modules_pages[i].name;\n }\n }\n }\n } else {\n this[pn].data.page_type = 10;\n }\n if( this[pn].data.parent_id == 0 ) {\n // Give them the option of how to display sub pages\n this[pn].sections._children.fields.child_format.flags = this.parentChildrenFormat;\n this[pn].sections.details.fields.menu_flags.visible = 'yes';\n } else {\n this[pn].sections._children.fields.child_format.flags = this.childFormat;\n this[pn].sections.details.fields.menu_flags.visible = 'no';\n }\n if( M.curTenant.modules['ciniki.sponsors'] != null \n && (M.curTenant.modules['ciniki.sponsors'].flags&0x02) ) {\n this[pn].sections.sponsors.visible = 'hidden';\n } else {\n this[pn].sections.sponsors.visible = 'no';\n }\n \n this[pn].refresh();\n this[pn].show(cb);\n this[pn].setPageType();\n }\n\n //\n // Arguments:\n // aG - The arguments to be parsed into args\n //\n this.start = function(cb, appPrefix, aG) {\n args = {};\n if( aG != null ) { args = eval(aG); }\n\n //\n // Create the app container if it doesn't exist, and clear it out\n // if it does exist.\n //\n var appContainer = M.createContainer(appPrefix, 'ciniki_web_pages', 'yes');\n if( appContainer == null ) {\n M.alert('App Error');\n return false;\n } \n\n this.pageEdit(cb, args.page_id, args.parent_id); \n }\n\n this.pageEdit = function(cb, pid, parent_id) {\n M.api.getJSONCb('ciniki.web.pageGet', {'tnid':M.curTenantID,\n 'page_id':pid, 'parent_id':parent_id, 'images':'yes', 'files':'yes', \n 'children':'yes', 'parentlist':'yes', 'sponsors':'yes'}, function(rsp) {\n if( rsp.stat != 'ok' ) {\n M.api.err(rsp);\n return false;\n }\n M.ciniki_web_pages.createEditPanel(cb, pid, parent_id, rsp); \n });\n };\n}", "function mostrarAsignarNivel(){ // Cuando toque el boton \"asignar nivel\" voy a ver la seccion (Asignar nivel a alumnos)\r\n limpiar(); //limpio campos de texto y mensajes al usuario\r\n document.querySelector(\"#divMostrarTablaXDocente\").innerHTML = \"\"; //limpio tabla por posible interaccion anterior\r\n document.querySelector(\"#homeDocente\").style.display = \"block\"; //Habilito division docente\r\n document.querySelector(\"#divAsignarNivel\").style.display = \"block\"; // muestro asignar nivel\r\n document.querySelector(\"#bodyHome\").style.display = \"none\"; //Oculto body bienvenida\r\n document.querySelector(\"#divPlantearEje\").style.display = \"none\"; // oculto plantear ejercicios a alumnos\r\n document.querySelector(\"#divDevoluciones\").style.display = \"none\"; // oculto redactar devoluciones a tareas\r\n document.querySelector(\"#divEstadisticas\").style.display = \"none\"; // oculto visualizar estadisticas\r\n}", "prepare() { this.createTopMenu(); this.createQuickMenu(); this.showQuickMenu(); }", "function IntroducaoContra_elementsExtraJS() {\n // screen (IntroducaoContra) extra code\n\n }", "static cambiarPantalla(pantalla){\n for (const property in pantallas) {//FOR IN - RECORRE EL OBJETO\n pantallas[property].style.display = \"none\";\n }\n pantallas[pantalla].style.display = \"flex\";\n }", "function addGestorActa(codigo) { \t\r\n\topen('addGestor.do?codEntidad='+codigo,'','top=100,left=300,width=600,height=300') ; \r\n}", "function addImagetoAssignment() {\r\n \r\n //Show success Modal and start confetti\r\n document.getElementById('modal3').style.display = 'block';\r\n\r\n\r\n }", "function mediacontrollermenu() {\r\n try { gvar.page_lang=get_page_lang(); } catch(err) { show_alert('Initialisation failed: '+err); }\r\n try { add_media_controller(); } catch(err) { show_alert('media_controller => '+err); }\r\n}", "function guardarParametrosF(modelo){\n\t\n\t\n\tif (modelo==101){\n\t\t//ABRIR INTERFAZ SECUNDARIA\n\t\tvar dialog = WidgetFactory.createWidget( KSDpanel.includeBasePath +\"/interfacesSecundarias\" , \"KSDpanel_modeloF1.ui\" );\n\t\tWidgetFactory.restoreState(dialog);\n\t\t\n\t\tif (!dialog.exec()){\n\t\t\tdialog.destroy();\n\t\t\tEAction.activateMainWindow();\n\t\t\t// User hit cancel:\n\t\t\tthis.terminate();\n\t\t\treturn;\n\t\t}\n\t\n\t\t//Cuando el usuario pulsa 'OK' se almacenan todos los valores en 'widgets'\n\t\tWidgetFactory.saveState(dialog);\n\t\tvar widgets = getWidgets(dialog);\n\t\t\n\t\t\n\t\t//Parametros especificos F1\n\t\talturaPlaca = parseInt(widgets[\"alturaPlacaUI\"].text);\n\t\tanchura1 = parseInt(widgets[\"anchura1UI\"].text);\n\t\tanchura2 = parseInt(widgets[\"anchura2UI\"].text);\n\t\tanchura3 = parseInt(widgets[\"anchura3UI\"].text);\n\t\tanchura4 = parseInt(widgets[\"anchura4UI\"].text);\n\t\tanchura5 = parseInt(widgets[\"anchura5UI\"].text);\n\t\tanchura6 = parseInt(widgets[\"anchura6UI\"].text);\n\t\tanchura7 = parseInt(widgets[\"anchura7UI\"].text);\n\t\tpliegueSuperior = parseInt(widgets[\"pliegueSuperiorUI\"].text);\n\t\talaSuperior = parseInt(widgets[\"alaSuperiorUI\"].text);\n\t\talaInferior = parseInt(widgets[\"alaInferiorUI\"].text);\n\t\tmargenFresado = parseInt(widgets[\"margenFresadoUI\"].text);\n\t\t\n\t\t\n\t}\n\t\n\t\n\t\n\t\n\t\n\telse if (modelo==102){\n\t\t//ABRIR INTERFAZ SECUNDARIA\n\t\tvar dialog = WidgetFactory.createWidget( KSDpanel.includeBasePath +\"/interfacesSecundarias\" , \"KSDpanel_modeloF2.ui\" );\n\t\tWidgetFactory.restoreState(dialog);\n\t\t\n\t\tif (!dialog.exec()){\n\t\t\tdialog.destroy();\n\t\t\tEAction.activateMainWindow();\n\t\t\t// User hit cancel:\n\t\t\tthis.terminate();\n\t\t\treturn;\n\t\t}\n\t\n\t\t//Cuando el usuario pulsa 'OK' se almacenan todos los valores en 'widgets'\n\t\tWidgetFactory.saveState(dialog);\n\t\tvar widgets = getWidgets(dialog);\n\t\t\n\t\t\n\t\t//Parametros especificos F2\n\t\talturaPlaca = parseInt(widgets[\"alturaPlacaUI\"].text);\n\t\tanchura1 = parseInt(widgets[\"anchura1UI\"].text);\n\t\tanchura2 = parseInt(widgets[\"anchura2UI\"].text);\n\t\tanchura3 = parseInt(widgets[\"anchura3UI\"].text);\n\t\tanchura4 = parseInt(widgets[\"anchura4UI\"].text);\n\t\tanchura5 = parseInt(widgets[\"anchura5UI\"].text);\n\t\tanchura6 = parseInt(widgets[\"anchura6UI\"].text);\n\t\tanchura7 = parseInt(widgets[\"anchura7UI\"].text);\n\t\tpliegueInf1 = parseInt(widgets[\"pliegueInf1UI\"].text);\n\t\tpliegueInf2 = parseInt(widgets[\"pliegueInf2UI\"].text);\n\t\tpliegueInf3 = parseInt(widgets[\"pliegueInf3UI\"].text);\n\t\tpliegueInf4 = parseInt(widgets[\"pliegueInf4UI\"].text);\n\t\tpliegueInf5 = parseInt(widgets[\"pliegueInf5UI\"].text);\n\t\tpliegueInf6 = parseInt(widgets[\"pliegueInf6UI\"].text);\n\t\tpliegueInf7 = parseInt(widgets[\"pliegueInf7UI\"].text);\n\t\tpliegueSuperior = parseInt(widgets[\"pliegueSuperiorUI\"].text);\n\t\talaSuperior = parseInt(widgets[\"alaSuperiorUI\"].text);\n\t\talaInferior = parseInt(widgets[\"alaInferiorUI\"].text);\n\t\tmargenFresado = parseInt(widgets[\"margenFresadoUI\"].text);\n\t\t\n\t\t\n\t}\n\t\n\t\n\telse if (modelo==103){\n\t\t//ABRIR INTERFAZ SECUNDARIA\n\t\tvar dialog = WidgetFactory.createWidget( KSDpanel.includeBasePath +\"/interfacesSecundarias\" , \"KSDpanel_modeloF3.ui\" );\n\t\tWidgetFactory.restoreState(dialog);\n\t\t\n\t\tif (!dialog.exec()){\n\t\t\tdialog.destroy();\n\t\t\tEAction.activateMainWindow();\n\t\t\t// User hit cancel:\n\t\t\tthis.terminate();\n\t\t\treturn;\n\t\t}\n\t\n\t\t//Cuando el usuario pulsa 'OK' se almacenan todos los valores en 'widgets'\n\t\tWidgetFactory.saveState(dialog);\n\t\tvar widgets = getWidgets(dialog);\n\t\t\n\t\t\n\t\t//Parametros especificos F3\n\t\tanchuraPlaca = parseInt(widgets[\"anchuraPlacaUI\"].text);\n\t\t\n\t\taltura1 = parseInt(widgets[\"altura1UI\"].text);\n\t\taltura2 = parseInt(widgets[\"altura2UI\"].text);\n\t\taltura3 = parseInt(widgets[\"altura3UI\"].text);\n\t\taltura4 = parseInt(widgets[\"altura4UI\"].text);\n\t\taltura5 = parseInt(widgets[\"altura5UI\"].text);\n\t\taltura6 = parseInt(widgets[\"altura6UI\"].text);\n\t\taltura7 = parseInt(widgets[\"altura7UI\"].text);\n\t\taltura8 = parseInt(widgets[\"altura8UI\"].text);\n\t\taltura9 = parseInt(widgets[\"altura9UI\"].text);\n\t\taltura10 = parseInt(widgets[\"altura10UI\"].text);\n\t\t\n\t\tpliegueIzq1 = widgets[\"pliegueIzq1UI\"].checked;\n\t\tpliegueIzq2 = widgets[\"pliegueIzq2UI\"].checked;\n\t\tpliegueIzq3 = widgets[\"pliegueIzq3UI\"].checked;\n\t\tpliegueIzq4 = widgets[\"pliegueIzq4UI\"].checked;\n\t\tpliegueIzq5 = widgets[\"pliegueIzq5UI\"].checked;\n\t\tpliegueIzq6 = widgets[\"pliegueIzq6UI\"].checked;\n\t\tpliegueIzq7 = widgets[\"pliegueIzq7UI\"].checked;\n\t\tpliegueIzq8 = widgets[\"pliegueIzq8UI\"].checked;\n\t\tpliegueIzq9 = widgets[\"pliegueIzq9UI\"].checked;\n\t\tpliegueIzq10 = widgets[\"pliegueIzq10UI\"].checked;\n\t\t\n\t\tpliegueDer1 = widgets[\"pliegueDer1UI\"].checked;\n\t\tpliegueDer2 = widgets[\"pliegueDer2UI\"].checked;\n\t\tpliegueDer3 = widgets[\"pliegueDer3UI\"].checked;\n\t\tpliegueDer4 = widgets[\"pliegueDer4UI\"].checked;\n\t\tpliegueDer5 = widgets[\"pliegueDer5UI\"].checked;\n\t\tpliegueDer6 = widgets[\"pliegueDer6UI\"].checked;\n\t\tpliegueDer7 = widgets[\"pliegueDer7UI\"].checked;\n\t\tpliegueDer8 = widgets[\"pliegueDer8UI\"].checked;\n\t\tpliegueDer9 = widgets[\"pliegueDer9UI\"].checked;\n\t\tpliegueDer10 = widgets[\"pliegueDer10UI\"].checked;\n\t\t\n\t\talaIzquierda = parseInt(widgets[\"alaIzquierdaUI\"].text);\n\t\talaDerecha = parseInt(widgets[\"alaDerechaUI\"].text);\n\t\t\n\t\tdibujoHorizontal = widgets[\"dibujoHorizontalUI\"].checked;\n\t\tdibujoVertical = widgets[\"dibujoVerticalUI\"].checked;\n\t\t\n\t}\n\t\n\telse if (modelo==107){\n\t\t//ABRIR INTERFAZ SECUNDARIA\n\t\tvar dialog = WidgetFactory.createWidget( KSDpanel.includeBasePath +\"/interfacesSecundarias\" , \"KSDpanel_modeloF4.ui\" );\n\t\tWidgetFactory.restoreState(dialog);\n\t\t\n\t\tif (!dialog.exec()){\n\t\t\tdialog.destroy();\n\t\t\tEAction.activateMainWindow();\n\t\t\t// User hit cancel:\n\t\t\tthis.terminate();\n\t\t\treturn;\n\t\t}\n\t\n\t\t//Cuando el usuario pulsa 'OK' se almacenan todos los valores en 'widgets'\n\t\tWidgetFactory.saveState(dialog);\n\t\tvar widgets = getWidgets(dialog);\n\t\t\n\t\t\n\t\t//Parametros especificos F4\n\t\talturaPlaca = parseInt(widgets[\"alturaPlacaUI\"].text);\n\t\t\n\t\tanchura1 = parseInt(widgets[\"anchura1UI\"].text);\n\t\tanchura2 = parseInt(widgets[\"anchura2UI\"].text);\n\t\tanchura3 = parseInt(widgets[\"anchura3UI\"].text);\n\t\tanchura4 = parseInt(widgets[\"anchura4UI\"].text);\n\t\t\n\t\tpliegueSuperior = parseInt(widgets[\"pliegueSuperiorUI\"].text);\n\t\talaSuperior = parseInt(widgets[\"alaSuperiorUI\"].text);\n\t\talaDerecha = parseInt(widgets[\"alaDerechaUI\"].text);\n\t\talaInferior = parseInt(widgets[\"alaInferiorUI\"].text);\n\t\t\n\t\tmargenFresado = parseInt(widgets[\"margenFresadoUI\"].text);\n\t\t\n\t\tcrearFresado = widgets[\"crearFresadoUI\"].checked;\n\t\t\n\t}\n\t\n\t\n\t\n\telse if (modelo==108){\n\t\t//ABRIR INTERFAZ SECUNDARIA\n\t\tvar dialog = WidgetFactory.createWidget( KSDpanel.includeBasePath +\"/interfacesSecundarias\" , \"KSDpanel_modeloF5.ui\" );\n\t\tWidgetFactory.restoreState(dialog);\n\t\t\n\t\tif (!dialog.exec()){\n\t\t\tdialog.destroy();\n\t\t\tEAction.activateMainWindow();\n\t\t\t// User hit cancel:\n\t\t\tthis.terminate();\n\t\t\treturn;\n\t\t}\n\t\n\t\t//Cuando el usuario pulsa 'OK' se almacenan todos los valores en 'widgets'\n\t\tWidgetFactory.saveState(dialog);\n\t\tvar widgets = getWidgets(dialog);\n\t\t\n\t\t\n\t\t//Parametros especificos F5\n\t\talturaPlaca = parseInt(widgets[\"alturaPlacaUI\"].text);\n\t\t\n\t\tanchura1 = parseInt(widgets[\"anchura1UI\"].text);\n\t\tanchura2 = parseInt(widgets[\"anchura2UI\"].text);\n\t\tanchura3 = parseInt(widgets[\"anchura3UI\"].text);\n\t\tanchura4 = parseInt(widgets[\"anchura4UI\"].text);\n\t\tanchura5 = parseInt(widgets[\"anchura5UI\"].text);\n\t\t\n\t\tpliegueSuperior = parseInt(widgets[\"pliegueSuperiorUI\"].text);\n\t\talaSuperior = parseInt(widgets[\"alaSuperiorUI\"].text);\n\t\talaDerecha = parseInt(widgets[\"alaDerechaUI\"].text);\n\t\talaInferior = parseInt(widgets[\"alaInferiorUI\"].text);\n\t\t\n\t\tmargenFresado = parseInt(widgets[\"margenFresadoUI\"].text);\n\t\t\n\t\tcrearFresado = widgets[\"crearFresadoUI\"].checked;\n\t\t\n\t}\n\t\n\t\n\t\n\t\n\telse if (modelo==109){\n\t\t//ABRIR INTERFAZ SECUNDARIA\n\t\tvar dialog = WidgetFactory.createWidget( KSDpanel.includeBasePath +\"/interfacesSecundarias\" , \"KSDpanel_modeloF6.ui\" );\n\t\tWidgetFactory.restoreState(dialog);\n\t\t\n\t\tif (!dialog.exec()){\n\t\t\tdialog.destroy();\n\t\t\tEAction.activateMainWindow();\n\t\t\t// User hit cancel:\n\t\t\tthis.terminate();\n\t\t\treturn;\n\t\t}\n\t\n\t\t//Cuando el usuario pulsa 'OK' se almacenan todos los valores en 'widgets'\n\t\tWidgetFactory.saveState(dialog);\n\t\tvar widgets = getWidgets(dialog);\n\t\t\n\t\t\n\t\t//Parametros especificos F6\n\t\talturaPlaca = parseInt(widgets[\"alturaPlacaUI\"].text);\n\t\t\n\t\tanchura1 = parseInt(widgets[\"anchura1UI\"].text);\n\t\tanchura2 = parseInt(widgets[\"anchura2UI\"].text);\n\t\tanchura3 = parseInt(widgets[\"anchura3UI\"].text);\n\t\tanchura4 = parseInt(widgets[\"anchura4UI\"].text);\n\t\t\n\t\tpliegueInf1 = parseInt(widgets[\"pliegueInf1UI\"].text);\n\t\tpliegueInf2 = parseInt(widgets[\"pliegueInf2UI\"].text);\n\t\tpliegueInf3 = parseInt(widgets[\"pliegueInf3UI\"].text);\n\t\tpliegueInf4 = parseInt(widgets[\"pliegueInf4UI\"].text);\n\t\t\n\t\tpliegueSuperior = parseInt(widgets[\"pliegueSuperiorUI\"].text);\n\t\tpliegueIzq = parseInt(widgets[\"pliegueIzqUI\"].text);\n\t\talaSuperior = parseInt(widgets[\"alaSuperiorUI\"].text);\n\t\talaIzquierda = parseInt(widgets[\"alaIzquierdaUI\"].text);\n\t\talaInferior = parseInt(widgets[\"alaInferiorUI\"].text);\n\t\t\n\t\tmargenFresado = parseInt(widgets[\"margenFresadoUI\"].text);\n\t\t\n\t\tcrearFresado = widgets[\"crearFresadoUI\"].checked;\n\t\t\n\t}\n\t\n\t\n\t\n\t\n\telse if (modelo==110){\n\t\t//ABRIR INTERFAZ SECUNDARIA\n\t\tvar dialog = WidgetFactory.createWidget( KSDpanel.includeBasePath +\"/interfacesSecundarias\" , \"KSDpanel_modeloF7.ui\" );\n\t\tWidgetFactory.restoreState(dialog);\n\t\t\n\t\tif (!dialog.exec()){\n\t\t\tdialog.destroy();\n\t\t\tEAction.activateMainWindow();\n\t\t\t// User hit cancel:\n\t\t\tthis.terminate();\n\t\t\treturn;\n\t\t}\n\t\n\t\t//Cuando el usuario pulsa 'OK' se almacenan todos los valores en 'widgets'\n\t\tWidgetFactory.saveState(dialog);\n\t\tvar widgets = getWidgets(dialog);\n\t\t\n\t\t\n\t\t//Parametros especificos F7\n\t\talturaPlaca = parseInt(widgets[\"alturaPlacaUI\"].text);\n\t\t\n\t\tanchura1 = parseInt(widgets[\"anchura1UI\"].text);\n\t\tanchura2 = parseInt(widgets[\"anchura2UI\"].text);\n\t\tanchura3 = parseInt(widgets[\"anchura3UI\"].text);\n\t\tanchura4 = parseInt(widgets[\"anchura4UI\"].text);\n\t\t\n\t\tpliegueInf1 = parseInt(widgets[\"pliegueInf1UI\"].text);\n\t\tpliegueInf2 = parseInt(widgets[\"pliegueInf2UI\"].text);\n\t\tpliegueInf3 = parseInt(widgets[\"pliegueInf3UI\"].text);\n\t\tpliegueInf4 = parseInt(widgets[\"pliegueInf4UI\"].text);\n\t\t\n\t\tpliegueSuperior = parseInt(widgets[\"pliegueSuperiorUI\"].text);\n\t\talaSuperior = parseInt(widgets[\"alaSuperiorUI\"].text);\n\t\talaDerecha = parseInt(widgets[\"alaDerechaUI\"].text);\n\t\talaInferior = parseInt(widgets[\"alaInferiorUI\"].text);\n\t\t\n\t\tmargenFresado = parseInt(widgets[\"margenFresadoUI\"].text);\n\t\t\n\t\tcrearFresado = widgets[\"crearFresadoUI\"].checked;\n\t\t\n\t}\n\t\n\t\n\telse if (modelo==111){\n\t\t//ABRIR INTERFAZ SECUNDARIA\n\t\tvar dialog = WidgetFactory.createWidget( KSDpanel.includeBasePath +\"/interfacesSecundarias\" , \"KSDpanel_modeloF8.ui\" );\n\t\tWidgetFactory.restoreState(dialog);\n\t\t\n\t\tif (!dialog.exec()){\n\t\t\tdialog.destroy();\n\t\t\tEAction.activateMainWindow();\n\t\t\t// User hit cancel:\n\t\t\tthis.terminate();\n\t\t\treturn;\n\t\t}\n\t\n\t\t//Cuando el usuario pulsa 'OK' se almacenan todos los valores en 'widgets'\n\t\tWidgetFactory.saveState(dialog);\n\t\tvar widgets = getWidgets(dialog);\n\t\t\n\t\t\n\t\t//Parametros especificos F8\n\t\talturaPlaca = parseInt(widgets[\"alturaPlacaUI\"].text);\n\t\t\n\t\tanchura1 = parseInt(widgets[\"anchura1UI\"].text);\n\t\tanchura2 = parseInt(widgets[\"anchura2UI\"].text);\n\t\tanchura3 = parseInt(widgets[\"anchura3UI\"].text);\n\t\tanchura4 = parseInt(widgets[\"anchura4UI\"].text);\n\t\tanchura5 = parseInt(widgets[\"anchura5UI\"].text);\n\t\t\n\t\tpliegueInf1 = parseInt(widgets[\"pliegueInf1UI\"].text);\n\t\tpliegueInf2 = parseInt(widgets[\"pliegueInf2UI\"].text);\n\t\tpliegueInf3 = parseInt(widgets[\"pliegueInf3UI\"].text);\n\t\tpliegueInf4 = parseInt(widgets[\"pliegueInf4UI\"].text);\n\t\tpliegueInf5 = parseInt(widgets[\"pliegueInf5UI\"].text);\n\t\t\n\t\tpliegueSuperior = parseInt(widgets[\"pliegueSuperiorUI\"].text);\n\t\talaSuperior = parseInt(widgets[\"alaSuperiorUI\"].text);\n\t\talaDerecha = parseInt(widgets[\"alaDerechaUI\"].text);\n\t\talaInferior = parseInt(widgets[\"alaInferiorUI\"].text);\n\t\t\n\t\tmargenFresado = parseInt(widgets[\"margenFresadoUI\"].text);\n\t\t\n\t\tcrearFresado = widgets[\"crearFresadoUI\"].checked;\n\t\t\n\t}\n\t\n\t\n\telse if (modelo==113){\n\t\t//ABRIR INTERFAZ SECUNDARIA\n\t\tvar dialog = WidgetFactory.createWidget( KSDpanel.includeBasePath +\"/interfacesSecundarias\" , \"KSDpanel_modeloF9.ui\" );\n\t\tWidgetFactory.restoreState(dialog);\n\t\t\n\t\tif (!dialog.exec()){\n\t\t\tdialog.destroy();\n\t\t\tEAction.activateMainWindow();\n\t\t\t// User hit cancel:\n\t\t\tthis.terminate();\n\t\t\treturn;\n\t\t}\n\t\n\t\t//Cuando el usuario pulsa 'OK' se almacenan todos los valores en 'widgets'\n\t\tWidgetFactory.saveState(dialog);\n\t\tvar widgets = getWidgets(dialog);\n\t\t\n\t\t\n\t\t//Parametros especificos F8\n\t\talturaPlaca = parseInt(widgets[\"alturaPlacaUI\"].text);\n\t\t\n\t\tanchura1 = parseInt(widgets[\"anchura1UI\"].text);\n\t\tanchura2 = parseInt(widgets[\"anchura2UI\"].text);\n\t\tanchura3 = parseInt(widgets[\"anchura3UI\"].text);\n\t\tanchura4 = parseInt(widgets[\"anchura4UI\"].text);\n\t\t\n\t\tpliegueInf1 = parseInt(widgets[\"pliegueInf1UI\"].text);\n\t\tpliegueInf2 = parseInt(widgets[\"pliegueInf2UI\"].text);\n\t\tpliegueInf3 = parseInt(widgets[\"pliegueInf3UI\"].text);\n\t\tpliegueInf4 = parseInt(widgets[\"pliegueInf4UI\"].text);\n\t\t\n\t\tpliegueSuperior = parseInt(widgets[\"pliegueSuperiorUI\"].text);\n\t\tpliegueIzq = parseInt(widgets[\"pliegueIzqUI\"].text);\n\t\talaSuperior = parseInt(widgets[\"alaSuperiorUI\"].text);\n\t\talaIzquierda = parseInt(widgets[\"alaIzquierdaUI\"].text);\n\t\talaInferior = parseInt(widgets[\"alaInferiorUI\"].text);\n\t\t\n\t\tmargenFresado = parseInt(widgets[\"margenFresadoUI\"].text);\n\t\t\n\t\tcrearFresado = widgets[\"crearFresadoUI\"].checked;\n\t\t\n\t}\n\t\n\t\n\telse if (modelo==114){\n\t\t//ABRIR INTERFAZ SECUNDARIA\n\t\tvar dialog = WidgetFactory.createWidget( KSDpanel.includeBasePath +\"/interfacesSecundarias\" , \"KSDpanel_modeloF10.ui\" );\n\t\tWidgetFactory.restoreState(dialog);\n\t\t\n\t\tif (!dialog.exec()){\n\t\t\tdialog.destroy();\n\t\t\tEAction.activateMainWindow();\n\t\t\t// User hit cancel:\n\t\t\tthis.terminate();\n\t\t\treturn;\n\t\t}\n\t\n\t\t//Cuando el usuario pulsa 'OK' se almacenan todos los valores en 'widgets'\n\t\tWidgetFactory.saveState(dialog);\n\t\tvar widgets = getWidgets(dialog);\n\t\t\n\t\tEAction.handleUserMessage(\"ha entrado ->->->->->->->->->12\");\n\t\t//Parametros especificos F10\n\t\talturaPlaca = parseInt(widgets[\"alturaPlacaUI\"].text);\n\t\t\n\t\tanchura1 = parseInt(widgets[\"anchura1UI\"].text);\n\t\tanchura2 = parseInt(widgets[\"anchura2UI\"].text);\n\t\tanchura3 = parseInt(widgets[\"anchura3UI\"].text);\n\t\tanchura4 = parseInt(widgets[\"anchura4UI\"].text);\n\t\n\t\t\n\t\t\n\t\tpliegueSuperior = parseInt(widgets[\"pliegueSuperiorUI\"].text);\n\t\n\t\talaSuperior = parseInt(widgets[\"alaSuperiorUI\"].text);\n\t\talaIzquierda = parseInt(widgets[\"alaIzquierdaUI\"].text);\n\t\talaInferior = parseInt(widgets[\"alaInferiorUI\"].text);\n\t\t\n\t\tmargenFresado = parseInt(widgets[\"margenFresadoUI\"].text);\n\t\t\n\t\tcrearFresado = widgets[\"crearFresadoUI\"].checked;\n\t\t\n\t}\n\t\n\t\n\t\n\t\n\telse if (modelo==115){\n\t\t//ABRIR INTERFAZ SECUNDARIA\n\t\tvar dialog = WidgetFactory.createWidget( KSDpanel.includeBasePath +\"/interfacesSecundarias\" , \"KSDpanel_modeloF11.ui\" );\n\t\tWidgetFactory.restoreState(dialog);\n\t\t\n\t\tif (!dialog.exec()){\n\t\t\tdialog.destroy();\n\t\t\tEAction.activateMainWindow();\n\t\t\t// User hit cancel:\n\t\t\tthis.terminate();\n\t\t\treturn;\n\t\t}\n\t\n\t\t//Cuando el usuario pulsa 'OK' se almacenan todos los valores en 'widgets'\n\t\tWidgetFactory.saveState(dialog);\n\t\tvar widgets = getWidgets(dialog);\n\t\t\n\t\t\n\t\t//Parametros especificos F11\n\t\talturaPlaca = parseInt(widgets[\"alturaPlacaUI\"].text);\n\t\t\n\t\tanchura1 = parseInt(widgets[\"anchura1UI\"].text);\n\t\tanchura2 = parseInt(widgets[\"anchura2UI\"].text);\n\t\tanchura3 = parseInt(widgets[\"anchura3UI\"].text);\n\t\tanchura4 = parseInt(widgets[\"anchura4UI\"].text);\n\t\t\n\t\tpliegueInf1 = parseInt(widgets[\"pliegueInf1UI\"].text);\n\t\tpliegueInf2 = parseInt(widgets[\"pliegueInf2UI\"].text);\n\t\tpliegueInf3 = parseInt(widgets[\"pliegueInf3UI\"].text);\n\t\tpliegueInf4 = parseInt(widgets[\"pliegueInf4UI\"].text);\n\t\n\t\t\n\t\t\n\t\tpliegueSuperior = parseInt(widgets[\"pliegueSuperiorUI\"].text);\n\t\n\t\talaSuperior = parseInt(widgets[\"alaSuperiorUI\"].text);\n\t\talaIzquierda = parseInt(widgets[\"alaIzquierdaUI\"].text);\n\t\talaInferior = parseInt(widgets[\"alaInferiorUI\"].text);\n\t\t\n\t\tmargenFresado = parseInt(widgets[\"margenFresadoUI\"].text);\n\t\t\n\t\tcrearFresado = widgets[\"crearFresadoUI\"].checked;\n\t\t\n\t}\n\t\n\telse if (modelo==116){\n\t\t//ABRIR INTERFAZ SECUNDARIA\n\t\tvar dialog = WidgetFactory.createWidget( KSDpanel.includeBasePath +\"/interfacesSecundarias\" , \"KSDpanel_modeloF12.ui\" );\n\t\tWidgetFactory.restoreState(dialog);\n\t\t\n\t\tif (!dialog.exec()){\n\t\t\tdialog.destroy();\n\t\t\tEAction.activateMainWindow();\n\t\t\t// User hit cancel:\n\t\t\tthis.terminate();\n\t\t\treturn;\n\t\t}\n\t\n\t\t//Cuando el usuario pulsa 'OK' se almacenan todos los valores en 'widgets'\n\t\tWidgetFactory.saveState(dialog);\n\t\tvar widgets = getWidgets(dialog);\n\t\t\n\t\t\n\t\t//Parametros especificos F12\n\t\talturaPlaca = parseInt(widgets[\"alturaPlacaUI\"].text);\n\t\t\n\t\tanchura1 = parseInt(widgets[\"anchura1UI\"].text);\n\t\tanchura2 = parseInt(widgets[\"anchura2UI\"].text);\n\t\tanchura3 = parseInt(widgets[\"anchura3UI\"].text);\n\t\n\t\n\t\t\n\t\t\n\t\tpliegueSuperior = parseInt(widgets[\"pliegueSuperiorUI\"].text);\n\t\tpliegueDerecha = parseInt(widgets[\"pliegueDerUI\"].text);\n\t\n\t\talaSuperior = parseInt(widgets[\"alaSuperiorUI\"].text);\n\t\talaIzquierda = parseInt(widgets[\"alaIzquierdaUI\"].text);\n\t\talaInferior = parseInt(widgets[\"alaInferiorUI\"].text);\n\t\talaDerecha = parseInt(widgets[\"alaDerechaUI\"].text);\n\t\t\n\t\tmargenFresado = parseInt(widgets[\"margenFresadoUI\"].text);\n\t\t\n\t\tcrearFresado = widgets[\"crearFresadoUI\"].checked;\n\t\t\n\t}\n\t\n\t\n\telse if (modelo==117){\n\t\t//ABRIR INTERFAZ SECUNDARIA\n\t\tvar dialog = WidgetFactory.createWidget( KSDpanel.includeBasePath +\"/interfacesSecundarias\" , \"KSDpanel_modeloF13.ui\" );\n\t\tWidgetFactory.restoreState(dialog);\n\t\t\n\t\tif (!dialog.exec()){\n\t\t\tdialog.destroy();\n\t\t\tEAction.activateMainWindow();\n\t\t\t// User hit cancel:\n\t\t\tthis.terminate();\n\t\t\treturn;\n\t\t}\n\t\n\t\t//Cuando el usuario pulsa 'OK' se almacenan todos los valores en 'widgets'\n\t\tWidgetFactory.saveState(dialog);\n\t\tvar widgets = getWidgets(dialog);\n\t\t\n\t\t\n\t\t\n\t\t//Parametros especificos F13\n\t\talturaPlaca = parseInt(widgets[\"alturaPlacaUI\"].text);\n\t\t\n\t\tanchura1 = parseInt(widgets[\"anchura1UI\"].text);\n\t\tanchura2 = parseInt(widgets[\"anchura2UI\"].text);\n\t\tanchura3 = parseInt(widgets[\"anchura3UI\"].text);\n\t\t\n\t\tpliegueInf1 = parseInt(widgets[\"pliegueInf1UI\"].text);\n\t\tpliegueInf2 = parseInt(widgets[\"pliegueInf2UI\"].text);\n\t\tpliegueInf3 = parseInt(widgets[\"pliegueInf3UI\"].text);\n\t\n\t\n\t\t\n\t\tpliegueSuperior = parseInt(widgets[\"pliegueSuperiorUI\"].text);\n\t\tpliegueDer = parseInt(widgets[\"pliegueDerUI\"].text);\n\t\t\n\t\n\t\talaSuperior = parseInt(widgets[\"alaSuperiorUI\"].text);\n\t\talaIzquierda = parseInt(widgets[\"alaIzquierdaUI\"].text);\n\t\talaInferior = parseInt(widgets[\"alaInferiorUI\"].text);\n\t\talaDerecha = parseInt(widgets[\"alaDerechaUI\"].text);\n\t\t\n\t\tmargenFresado = parseInt(widgets[\"margenFresadoUI\"].text);\n\t\t\n\t\tcrearFresado = widgets[\"crearFresadoUI\"].checked;\n\t}\n\t\n\telse if (modelo==118){\n\t\t//ABRIR INTERFAZ SECUNDARIA\n\t\tvar dialog = WidgetFactory.createWidget( KSDpanel.includeBasePath +\"/interfacesSecundarias\" , \"KSDpanel_modeloF14.ui\" );\n\t\tWidgetFactory.restoreState(dialog);\n\t\t\n\t\tif (!dialog.exec()){\n\t\t\tdialog.destroy();\n\t\t\tEAction.activateMainWindow();\n\t\t\t// User hit cancel:\n\t\t\tthis.terminate();\n\t\t\treturn;\n\t\t}\n\t\n\t\t//Cuando el usuario pulsa 'OK' se almacenan todos los valores en 'widgets'\n\t\tWidgetFactory.saveState(dialog);\n\t\tvar widgets = getWidgets(dialog);\n\t\t\n\t\t\n\t\t\n\t\t//Parametros especificos F13\n\t\talturaPlaca = parseInt(widgets[\"alturaPlacaUI\"].text);\n\t\t\n\t\tanchura1 = parseInt(widgets[\"anchura1UI\"].text);\n\t\tanchura2 = parseInt(widgets[\"anchura2UI\"].text);\n\t\tanchura3 = parseInt(widgets[\"anchura3UI\"].text);\n\t\tanchura4 = parseInt(widgets[\"anchura4UI\"].text);\n\t\tanchura5 = parseInt(widgets[\"anchura5UI\"].text);\n\t\t\n\t\tpliegueInf1 = parseInt(widgets[\"pliegueInf1UI\"].text);\n\t\tpliegueInf2 = parseInt(widgets[\"pliegueInf2UI\"].text);\n\t\tpliegueInf3 = parseInt(widgets[\"pliegueInf3UI\"].text);\n\t\tpliegueInf4 = parseInt(widgets[\"pliegueInf4UI\"].text);\n\t\tpliegueInf5 = parseInt(widgets[\"pliegueInf5UI\"].text);\n\t\n\t\n\t\t\n\t\tpliegueSuperior = parseInt(widgets[\"pliegueSuperiorUI\"].text);\n\t\n\t\t\n\t\n\t\talaSuperior = parseInt(widgets[\"alaSuperiorUI\"].text);\n\t\talaIzquierda = parseInt(widgets[\"alaIzquierdaUI\"].text);\n\t\talaInferior = parseInt(widgets[\"alaInferiorUI\"].text);\n\t\t\n\t\t\n\t\tmargenFresado = parseInt(widgets[\"margenFresadoUI\"].text);\n\t\t\n\t\tcrearFresado = widgets[\"crearFresadoUI\"].checked;\n\t}\n\telse if (modelo==119){\n\t\t//ABRIR INTERFAZ SECUNDARIA\n\t\tvar dialog = WidgetFactory.createWidget( KSDpanel.includeBasePath +\"/interfacesSecundarias\" , \"KSDpanel_modeloF15.ui\" );\n\t\tWidgetFactory.restoreState(dialog);\n\t\t\n\t\tif (!dialog.exec()){\n\t\t\tdialog.destroy();\n\t\t\tEAction.activateMainWindow();\n\t\t\t// User hit cancel:\n\t\t\tthis.terminate();\n\t\t\treturn;\n\t\t}\n\t\n\t\t//Cuando el usuario pulsa 'OK' se almacenan todos los valores en 'widgets'\n\t\tWidgetFactory.saveState(dialog);\n\t\tvar widgets = getWidgets(dialog);\n\t\t\n\t\t\n\t\t\n\t\t//Parametros especificos F15\n\t\talturaPlaca = parseInt(widgets[\"alturaPlacaUI\"].text);\n\t\t\n\t\tanchura1 = parseInt(widgets[\"anchura1UI\"].text);\n\t\tanchura2 = parseInt(widgets[\"anchura2UI\"].text);\n\t\tanchura3 = parseInt(widgets[\"anchura3UI\"].text);\n\t\tanchura4 = parseInt(widgets[\"anchura4UI\"].text);\n\t\tanchura5 = parseInt(widgets[\"anchura5UI\"].text);\n\t\t\n\n\t\n\t\n\t\t\n\t\tpliegueSuperior = parseInt(widgets[\"pliegueSuperiorUI\"].text);\n\t\n\t\t\n\t\n\t\talaSuperior = parseInt(widgets[\"alaSuperiorUI\"].text);\n\t\talaIzquierda = parseInt(widgets[\"alaIzquierdaUI\"].text);\n\t\talaInferior = parseInt(widgets[\"alaInferiorUI\"].text);\n\t\t\n\t\t\n\t\tmargenFresado = parseInt(widgets[\"margenFresadoUI\"].text);\n\t\t\n\t\tcrearFresado = widgets[\"crearFresadoUI\"].checked;\n\t}\n\telse if (modelo==120){\n\t\t//ABRIR INTERFAZ SECUNDARIA\n\t\tvar dialog = WidgetFactory.createWidget( KSDpanel.includeBasePath +\"/interfacesSecundarias\" , \"KSDpanel_modeloF16.ui\" );\n\t\tWidgetFactory.restoreState(dialog);\n\t\t\n\t\tif (!dialog.exec()){\n\t\t\tdialog.destroy();\n\t\t\tEAction.activateMainWindow();\n\t\t\t// User hit cancel:\n\t\t\tthis.terminate();\n\t\t\treturn;\n\t\t}\n\t\n\t\t//Cuando el usuario pulsa 'OK' se almacenan todos los valores en 'widgets'\n\t\tWidgetFactory.saveState(dialog);\n\t\tvar widgets = getWidgets(dialog);\n\t\t\n\t\t\n\t\t\n\t\t//Parametros especificos F16\n\t\talturaPlaca = parseInt(widgets[\"alturaPlacaUI\"].text);\n\t\t\n\t\tanchura1 = parseInt(widgets[\"anchura1UI\"].text);\n\t\tanchura2 = parseInt(widgets[\"anchura2UI\"].text);\n\t\n\t\t\n\t\tpliegueSuperior = parseInt(widgets[\"pliegueSuperiorUI\"].text);\n\t\t\n\t\t\n\t\n\t\talaSuperior = parseInt(widgets[\"alaSuperiorUI\"].text);\n\t\talaInferior = parseInt(widgets[\"alaInferiorUI\"].text);\n\t\talaDerecha = parseInt(widgets[\"alaDerechaUI\"].text);\n\t\t\n\t\tmargenFresado = parseInt(widgets[\"margenFresadoUI\"].text);\n\t\t\n\t\tcrearFresado = widgets[\"crearFresadoUI\"].checked;\n\t}\n\t\n\telse if (modelo==121){\n\t\t//ABRIR INTERFAZ SECUNDARIA\n\t\tvar dialog = WidgetFactory.createWidget( KSDpanel.includeBasePath +\"/interfacesSecundarias\" , \"KSDpanel_modeloF17.ui\" );\n\t\tWidgetFactory.restoreState(dialog);\n\t\t\n\t\tif (!dialog.exec()){\n\t\t\tdialog.destroy();\n\t\t\tEAction.activateMainWindow();\n\t\t\t// User hit cancel:\n\t\t\tthis.terminate();\n\t\t\treturn;\n\t\t}\n\t\n\t\t//Cuando el usuario pulsa 'OK' se almacenan todos los valores en 'widgets'\n\t\tWidgetFactory.saveState(dialog);\n\t\tvar widgets = getWidgets(dialog);\n\t\t\n\t\t\n\t\t\n\t\t//Parametros especificos F13\n\t\talturaPlaca = parseInt(widgets[\"alturaPlacaUI\"].text);\n\t\t\n\t\tanchuraPlaca = parseInt(widgets[\"anchuraPlacaUI\"].text);\n\t\n\t\t\n\t\tpliegueInf1 = parseInt(widgets[\"pliegueInf1UI\"].text);\n\t\tpliegueInf2 = parseInt(widgets[\"pliegueInf2UI\"].text);\n\t\t\n\t\n\t\n\t\t\n\t\tpliegueSuperior = parseInt(widgets[\"pliegueSuperiorUI\"].text);\n\t\t\n\t\n\t\talaSuperior = parseInt(widgets[\"alaSuperiorUI\"].text);\n\t\talaIzquierda = parseInt(widgets[\"alaIzquierdaUI\"].text);\n\t\talaInferior = parseInt(widgets[\"alaInferiorUI\"].text);\n\t\talaDerecha = parseInt(widgets[\"alaDerechaUI\"].text);\n\t\t\n\t\tmargenFresado = parseInt(widgets[\"margenFresadoUI\"].text);\n\t\t\n\t\tcrearFresado = widgets[\"crearFresadoUI\"].checked;\n\t\t\n\t}\n\t\n\telse if (modelo==123){\n\t\t//ABRIR INTERFAZ SECUNDARIA\n\t\tvar dialog = WidgetFactory.createWidget( KSDpanel.includeBasePath +\"/interfacesSecundarias\" , \"KSDpanel_modeloF18.ui\" );\n\t\tWidgetFactory.restoreState(dialog);\n\t\t\n\t\tif (!dialog.exec()){\n\t\t\tdialog.destroy();\n\t\t\tEAction.activateMainWindow();\n\t\t\t// User hit cancel:\n\t\t\tthis.terminate();\n\t\t\treturn;\n\t\t}\n\t\n\t\t//Cuando el usuario pulsa 'OK' se almacenan todos los valores en 'widgets'\n\t\tWidgetFactory.saveState(dialog);\n\t\tvar widgets = getWidgets(dialog);\n\t\t\n\t\t\n\t\t\n\t\t//Parametros especificos F18\n\t\talturaPlaca = parseInt(widgets[\"alturaPlacaUI\"].text);\n\t\n\t\tanchura1 = parseInt(widgets[\"anchura1UI\"].text);\n\t\tanchura2 = parseInt(widgets[\"anchura2UI\"].text);\n\t\n\t\n\t\t\n\t\tpliegueSuperior = parseInt(widgets[\"pliegueSuperiorUI\"].text);\n\t\t\n\t\n\t\talaSuperior = parseInt(widgets[\"alaSuperiorUI\"].text);\n\t\talaIzquierda = parseInt(widgets[\"alaIzquierdaUI\"].text);\n\t\talaInferior = parseInt(widgets[\"alaInferiorUI\"].text);\n\t\talaDerecha = parseInt(widgets[\"alaDerechaUI\"].text);\n\t\t\n\t\tmargenFresado = parseInt(widgets[\"margenFresadoUI\"].text);\n\t\t\n\t\tcrearFresado = widgets[\"crearFresadoUI\"].checked;\n\t\tEAction.handleUserMessage(\"ha entrado 33333333333333333333333333333333333333333 \");\n\t}\n\t\n\telse if (modelo==124){\n\t\t//ABRIR INTERFAZ SECUNDARIA\n\t\tvar dialog = WidgetFactory.createWidget( KSDpanel.includeBasePath +\"/interfacesSecundarias\" , \"KSDpanel_modeloF19.ui\" );\n\t\tWidgetFactory.restoreState(dialog);\n\t\t\n\t\tif (!dialog.exec()){\n\t\t\tdialog.destroy();\n\t\t\tEAction.activateMainWindow();\n\t\t\t// User hit cancel:\n\t\t\tthis.terminate();\n\t\t\treturn;\n\t\t}\n\t\n\t\t//Cuando el usuario pulsa 'OK' se almacenan todos los valores en 'widgets'\n\t\tWidgetFactory.saveState(dialog);\n\t\tvar widgets = getWidgets(dialog);\n\t\t\n\t\t\n\t\t\n\t\t//Parametros especificos F19\n\t\talturaPlaca = parseInt(widgets[\"alturaPlacaUI\"].text);\n\t\n\t\tanchura1 = parseInt(widgets[\"anchura1UI\"].text);\n\t\tanchura2 = parseInt(widgets[\"anchura2UI\"].text);\n\t\n\t\n\t\t\n\t\tpliegueSuperior = parseInt(widgets[\"pliegueSuperiorUI\"].text);\n\t\tpliegueInferior = parseInt(widgets[\"pliegueInferiorUI\"].text);\n\t\n\t\talaSuperior = parseInt(widgets[\"alaSuperiorUI\"].text);\n\t\talaIzquierda = parseInt(widgets[\"alaIzquierdaUI\"].text);\n\t\talaInferior = parseInt(widgets[\"alaInferiorUI\"].text);\n\t\talaDerecha = parseInt(widgets[\"alaDerechaUI\"].text);\n\t\t\n\t\tmargenFresado = parseInt(widgets[\"margenFresadoUI\"].text);\n\t\t\n\t\tcrearFresado = widgets[\"crearFresadoUI\"].checked;\n\t\t\n\t}\n\t\n\telse if (modelo==125){\n\t\t//ABRIR INTERFAZ SECUNDARIA\n\t\tvar dialog = WidgetFactory.createWidget( KSDpanel.includeBasePath +\"/interfacesSecundarias\" , \"KSDpanel_modeloF20.ui\" );\n\t\tWidgetFactory.restoreState(dialog);\n\t\t\n\t\tif (!dialog.exec()){\n\t\t\tdialog.destroy();\n\t\t\tEAction.activateMainWindow();\n\t\t\t// User hit cancel:\n\t\t\tthis.terminate();\n\t\t\treturn;\n\t\t}\n\t\n\t\t//Cuando el usuario pulsa 'OK' se almacenan todos los valores en 'widgets'\n\t\tWidgetFactory.saveState(dialog);\n\t\tvar widgets = getWidgets(dialog);\n\t\t\n\t\t\n\t\t\n\t\t//Parametros especificos F20\n\t\taltura1 = parseInt(widgets[\"altura1UI\"].text);\n\t\taltura2 = parseInt(widgets[\"altura2UI\"].text);\n\t\n\t\tanchura1 = parseInt(widgets[\"anchura1UI\"].text);\n\t\tanchura2 = parseInt(widgets[\"anchura2UI\"].text);\n\t\tanchura3 = parseInt(widgets[\"anchura3UI\"].text);\n\t\tanchura4 = parseInt(widgets[\"anchura4UI\"].text);\n\t\n\t\n\t\t\n\t\tpliegueIzq = parseInt(widgets[\"pliegueIzqUI\"].text);\n\t\tpliegueDer = parseInt(widgets[\"pliegueDerUI\"].text);\n\t\n\t\talaSuperior = parseInt(widgets[\"alaSuperiorUI\"].text);\n\t\talaIzquierda = parseInt(widgets[\"alaIzquierdaUI\"].text);\n\t\talaInferior = parseInt(widgets[\"alaInferiorUI\"].text);\n\t\talaDerecha = parseInt(widgets[\"alaDerechaUI\"].text);\n\t\t\n\t\t//margenFresado = parseInt(widgets[\"margenFresadoUI\"].text);\n\t\t\n\t\t//crearFresado = widgets[\"crearFresadoUI\"].checked;\n\t\tEAction.handleUserMessage(\"ha entrado gerththyhyhrtyhhrh \");\n\t}\n\t\n\telse if (modelo==126){\n\t\t//ABRIR INTERFAZ SECUNDARIA\n\t\tvar dialog = WidgetFactory.createWidget( KSDpanel.includeBasePath +\"/interfacesSecundarias\" , \"KSDpanel_modeloF21.ui\" );\n\t\tWidgetFactory.restoreState(dialog);\n\t\t\n\t\tif (!dialog.exec()){\n\t\t\tdialog.destroy();\n\t\t\tEAction.activateMainWindow();\n\t\t\t// User hit cancel:\n\t\t\tthis.terminate();\n\t\t\treturn;\n\t\t}\n\t\n\t\t//Cuando el usuario pulsa 'OK' se almacenan todos los valores en 'widgets'\n\t\tWidgetFactory.saveState(dialog);\n\t\tvar widgets = getWidgets(dialog);\n\t\t\n\t\t\n\t\t\n\t\t//Parametros especificos F21\n\t\talturaPlaca = parseInt(widgets[\"alturaPlacaUI\"].text);\n\t\t\n\t\n\t\tanchuraPlaca = parseInt(widgets[\"anchuraPlacaUI\"].text);\n\n\t\n\t\t\n\t\tpliegueIzq = parseInt(widgets[\"pliegueIzqUI\"].text);\n\t\n\t\n\t\talaSuperior = parseInt(widgets[\"alaSuperiorUI\"].text);\n\t\talaIzquierda = parseInt(widgets[\"alaIzquierdaUI\"].text);\n\t\talaInferior = parseInt(widgets[\"alaInferiorUI\"].text);\n\n\t\t\n\t\t//margenFresado = parseInt(widgets[\"margenFresadoUI\"].text);\n\t\t\n\t\t//crearFresado = widgets[\"crearFresadoUI\"].checked;\n\t\t\n\t}\n\t\n\telse if (modelo==127){\n\t\t//ABRIR INTERFAZ SECUNDARIA\n\t\tvar dialog = WidgetFactory.createWidget( KSDpanel.includeBasePath +\"/interfacesSecundarias\" , \"KSDpanel_modeloF22.ui\" );\n\t\tWidgetFactory.restoreState(dialog);\n\t\t\n\t\tif (!dialog.exec()){\n\t\t\tdialog.destroy();\n\t\t\tEAction.activateMainWindow();\n\t\t\t// User hit cancel:\n\t\t\tthis.terminate();\n\t\t\treturn;\n\t\t}\n\t\n\t\t//Cuando el usuario pulsa 'OK' se almacenan todos los valores en 'widgets'\n\t\tWidgetFactory.saveState(dialog);\n\t\tvar widgets = getWidgets(dialog);\n\t\t\n\t\t\n\t\t\n\t\t//Parametros especificos F22\n\t\talturaPlaca = parseInt(widgets[\"alturaPlacaUI\"].text);\n\t\t\n\t\n\t\tanchuraPlaca = parseInt(widgets[\"anchuraPlacaUI\"].text);\n\n\t\n\t\t\n\t\tpliegueDer = parseInt(widgets[\"pliegueDerUI\"].text);\n\t\n\t\n\t\talaSuperior = parseInt(widgets[\"alaSuperiorUI\"].text);\n\t\talaIzquierda = parseInt(widgets[\"alaIzquierdaUI\"].text);\n\t\talaInferior = parseInt(widgets[\"alaInferiorUI\"].text);\n\t\talaDerecha = parseInt(widgets[\"alaDerechaUI\"].text);\n\n\t\t\n\t\t//margenFresado = parseInt(widgets[\"margenFresadoUI\"].text);\n\t\t\n\t\t//crearFresado = widgets[\"crearFresadoUI\"].checked;\n\t\tEAction.handleUserMessage(\"ha entrado gerththyhyhrtyhhrh \");\n\t}\n\t\n\telse if (modelo==128){\n\t\t//ABRIR INTERFAZ SECUNDARIA\n\t\tvar dialog = WidgetFactory.createWidget( KSDpanel.includeBasePath +\"/interfacesSecundarias\" , \"KSDpanel_modeloF23.ui\" );\n\t\tWidgetFactory.restoreState(dialog);\n\t\t\n\t\tif (!dialog.exec()){\n\t\t\tdialog.destroy();\n\t\t\tEAction.activateMainWindow();\n\t\t\t// User hit cancel:\n\t\t\tthis.terminate();\n\t\t\treturn;\n\t\t}\n\t\n\t\t//Cuando el usuario pulsa 'OK' se almacenan todos los valores en 'widgets'\n\t\tWidgetFactory.saveState(dialog);\n\t\tvar widgets = getWidgets(dialog);\n\t\t\n\t\t\n\t\t\n\t\t//Parametros especificos F23\n\t\talturaPlaca = parseInt(widgets[\"alturaPlacaUI\"].text);\n\t\t\n\t\tanchura1 = parseInt(widgets[\"anchura1UI\"].text);\n\t\tanchura2 = parseInt(widgets[\"anchura2UI\"].text);\n\n\t\n\t\t\n\t\tpliegueSuperior = parseInt(widgets[\"pliegueSuperiorUI\"].text);\n\t\tpliegueInferior = parseInt(widgets[\"pliegueInferiorUI\"].text);\n\t\n\t\n\t\talaSuperior = parseInt(widgets[\"alaSuperiorUI\"].text);\n\t\talaIzquierda = parseInt(widgets[\"alaIzquierdaUI\"].text);\n\t\talaInferior = parseInt(widgets[\"alaInferiorUI\"].text);\n\n\t\t\n\t\tmargenFresado = parseInt(widgets[\"margenFresadoUI\"].text);\n\t\t\n\t\tcrearFresado = widgets[\"crearFresadoUI\"].checked;\n\t\n\t}\n\telse if (modelo==137){\n\t\t//ABRIR INTERFAZ SECUNDARIA\n\t\tvar dialog = WidgetFactory.createWidget( KSDpanel.includeBasePath +\"/interfacesSecundarias\" , \"KSDpanel_modeloF24.ui\" );\n\t\tWidgetFactory.restoreState(dialog);\n\t\tif (!dialog.exec()){\n\t\t\tdialog.destroy();\n\t\t\tEAction.activateMainWindow();\n\t\t\t// User hit cancel:\n\t\t\tthis.terminate();\n\t\t\treturn;\n\t\t}\n\t\n\t\t//Cuando el usuario pulsa 'OK' se almacenan todos los valores en 'widgets'\n\t\tWidgetFactory.saveState(dialog);\n\t\tvar widgets = getWidgets(dialog);\n\t\t\n\t\t\n\t\t//Parametros especificos F24\n\t\talturaPlaca = parseInt(widgets[\"alturaPlacaUI\"].text);\n\t\t\n\t\tanchura1 = parseInt(widgets[\"anchura1UI\"].text);\n\t\tanchura2 = parseInt(widgets[\"anchura2UI\"].text);\n\t\tanchura3 = parseInt(widgets[\"anchura3UI\"].text);\n\t\tanchura4 = parseInt(widgets[\"anchura4UI\"].text);\n\n\t\n\t\t\n\t\tpliegueInferior = parseInt(widgets[\"pliegueInferiorUI\"].text);\n\t\t\n\t\n\t\n\t\talaSuperior = parseInt(widgets[\"alaSuperiorUI\"].text);\n\t\talaIzquierda = parseInt(widgets[\"alaIzquierdaUI\"].text);\n\t\talaDerecha = parseInt(widgets[\"alaDerechaUI\"].text);\n\t\talaInferior = parseInt(widgets[\"alaInferiorUI\"].text);\n\n\t\t\n\t\tmargenFresado = parseInt(widgets[\"margenFresadoUI\"].text);\n\n\t\tcrearFresado = widgets[\"crearFresadoUI\"].checked;\n\t\t\n\t\n\t}\n\t\n\telse if (modelo==138){\n\t\t//ABRIR INTERFAZ SECUNDARIA\n\t\tvar dialog = WidgetFactory.createWidget( KSDpanel.includeBasePath +\"/interfacesSecundarias\" , \"KSDpanel_modeloF25.ui\" );\n\t\tWidgetFactory.restoreState(dialog);\n\t\t\n\t\tif (!dialog.exec()){\n\t\t\tdialog.destroy();\n\t\t\tEAction.activateMainWindow();\n\t\t\t// User hit cancel:\n\t\t\tthis.terminate();\n\t\t\treturn;\n\t\t}\n\t\n\t\t//Cuando el usuario pulsa 'OK' se almacenan todos los valores en 'widgets'\n\t\tWidgetFactory.saveState(dialog);\n\t\tvar widgets = getWidgets(dialog);\n\t\t\n\t\t\n\t\t\n\t\t//Parametros especificos F21\n\t\talturaPlaca = parseInt(widgets[\"alturaPlacaUI\"].text);\n\t\t\n\t\n\t\tanchura1 = parseInt(widgets[\"anchura1UI\"].text);\n\t\tanchura2 = parseInt(widgets[\"anchura2UI\"].text);\n\t\tanchura3 = parseInt(widgets[\"anchura3UI\"].text);\n\n\t\n\t\t\n\t\tpliegueInferior = parseInt(widgets[\"pliegueInferiorUI\"].text);\n\t\n\t\n\t\talaSuperior = parseInt(widgets[\"alaSuperiorUI\"].text);\n\t\talaIzquierda = parseInt(widgets[\"alaIzquierdaUI\"].text);\n\t\talaInferior = parseInt(widgets[\"alaInferiorUI\"].text);\n\t\talaDerecha = parseInt(widgets[\"alaDerechaUI\"].text);\n\n\t\t\n\t\tmargenFresado = parseInt(widgets[\"margenFresadoUI\"].text);\n\t\t\n\t\tcrearFresado = widgets[\"crearFresadoUI\"].checked;\n\t\t\n\t}\n\t\n\telse if (modelo==139){\n\t\t//ABRIR INTERFAZ SECUNDARIA\n\t\tvar dialog = WidgetFactory.createWidget( KSDpanel.includeBasePath +\"/interfacesSecundarias\" , \"KSDpanel_modeloF26.ui\" );\n\t\tWidgetFactory.restoreState(dialog);\n\t\t\n\t\tif (!dialog.exec()){\n\t\t\tdialog.destroy();\n\t\t\tEAction.activateMainWindow();\n\t\t\t// User hit cancel:\n\t\t\tthis.terminate();\n\t\t\treturn;\n\t\t}\n\t\n\t\t//Cuando el usuario pulsa 'OK' se almacenan todos los valores en 'widgets'\n\t\tWidgetFactory.saveState(dialog);\n\t\tvar widgets = getWidgets(dialog);\n\t\t\n\t\t\n\t\t\n\t\t//Parametros especificos F26\n\t\talturaPlaca = parseInt(widgets[\"alturaPlacaUI\"].text);\n\t\t\n\t\n\t\tanchura1 = parseInt(widgets[\"anchura1UI\"].text);\n\t\tanchura2 = parseInt(widgets[\"anchura2UI\"].text);\n\t\tanchura3 = parseInt(widgets[\"anchura3UI\"].text);\n\n\t\n\t\t\n\t\tpliegueInferior = parseInt(widgets[\"pliegueInferiorUI\"].text);\n\t\tpliegueSuperior = parseInt(widgets[\"pliegueSuperiorUI\"].text);\n\t\n\t\n\t\t\n\t\talaDerecha = parseInt(widgets[\"alaDerechaUI\"].text);\n\n\t\t\n\t\tmargenFresado = parseInt(widgets[\"margenFresadoUI\"].text);\n\t\t\n\t\tcrearFresado = widgets[\"crearFresadoUI\"].checked;\n\t\t\n\t}\n}", "function ClickBotaoAtributoMenos() {\n gEntradas.bonus_atributos.pop();\n AtualizaGeralSemLerEntradas();\n}", "function mostrarPregunta(indice){\n document.getElementById(\"p\"+indice).style.display = \"block\"; \n var menosIndice = indice - 1;\n document.getElementById(\"p\"+menosIndice).style.display = \"none\"; \n}", "function activarArrastradoPuntos(activar){\r\n if(activar){\r\n dragPuntosRuta.activate();\r\n }else{\r\n dragPuntosRuta.deactivate();\r\n selectFeatures.activate();\r\n }\r\n}", "function PratoDoDiaComponent() {\n }", "function TarjetaResultados(){\n this.grid = new Grid()\n this.popup_editar = new PopupEditar()\n this.toolbar = new Toolbar()\n this.popup_informacion = new PopupInformacion()\n}", "function onLoadPag(){\n configurarMenuSecundario(FORMULARIO);\n \n DrdEnsanchaConMargenDcho('listado1',12);\n document.all[\"Cplistado1\"].style.visibility='';\n document.all[\"CpLin1listado1\"].style.visibility='';\n document.all[\"CpLin2listado1\"].style.visibility='';\n document.all[\"CpLin3listado1\"].style.visibility='';\n document.all[\"CpLin4listado1\"].style.visibility='';\n document.all[\"separaDiv\"].style.visibility='';\n document.all[\"primera1Div\"].style.visibility='';\n document.all[\"ret1Div\"].style.visibility='';\n document.all[\"ava1Div\"].style.visibility='';\n \n eval (ON_RSZ); \n \n \n if (get(FORMULARIO+'.errDescripcion')!='') {\t\t\n var wnd = fMostrarMensajeError(get(FORMULARIO+'.errCodigo'),get(FORMULARIO+'.errDescripcion'));\n }\n \n var oidCliente=get(FORMULARIO+'.oidCliente');\n \n //alert('Antes del configurarpaginado oidCliente= '+ get(FORMULARIO+'.lbldtCodConsultora'));\n var idioma = get(FORMULARIO+'.idioma');\n var pais = get(FORMULARIO+'.pais');\n/*hecho en la lp\nDOTOID dto = new DTOOID();\n\tdto.setOidPais(this.pais);\n dto.setOidCliente(this.oidCliente);\n\tdto.setOidIdioma(this.idioma);\n\tparamEntrada.add(dto);\n \tparamEntrada.add(new MareBusinessID(\"CALConsultarConsultorasHijas\"));\n\tconector = conectar(\"ConectorConsultarConsultorasHijas\", paramEntrada);\n\tasignar(\"LISTAEDITABLE\", \"listado1\", conector, \"dtoSalida.resultado_ROWSET\");*/\n \n \n //configurarPaginado(mipgndo, \"CALConsultarConsultorasHijas\", \"ConectorConsultarConsultorasHijas\", \"es.indra.sicc.dtos.cal.DTODatosClien\", [[\"oidIdioma\", idioma],[\"oidPais\", pais],[\"oidCliente\", oidCliente]] ); \n//alert(\"Despues del configurarPaginado.oidCliente \"+ oidCliente);\n \n \n\n}", "function mostrarListaProductos(){\n reloadStore();\n let productos = obtenerProductos();\n \n let html = ``;\n for(let producto of productos){\n html += crearCardProducto(producto);\n }\n htmlRender('divProductos', html);\n \n //eliminar y editar\n document.querySelectorAll('.delete-asi').forEach(item => {\n item.addEventListener('click', event => {\n alertify.confirm(\"\",\"Las transacciones asociadas a este producto también serán eliminadas. ¿Desea continuar?\",\n function(){\n let res = item.id.split(\"-\");\n store.getObject().eliminarProducto(res[2]);\n store.save();\n mostrarListaProductos();\n alertify.success('Producto Eliminado');\n },\n function(){\n alertify.error('Operación Cancelada');\n });\n })\n });\n \n document.querySelectorAll('.modify-asi').forEach(item => {\n item.addEventListener('click', event => {\n let res = item.id.split(\"-\");\n let producto = store.getObject().buscarProducto(res[2]);\n if(producto != null){\n mostrarDatosProducto(producto);\n htmlValue('inputEditar', 'EDICION');\n }\n })\n });\n \n document.querySelectorAll('.check-asi').forEach(item => {\n item.addEventListener('click', event => {\n let res = item.id.split(\"-\");\n let producto = store.getObject().buscarProducto(res[2]);\n if(producto != null){\n mostrarTransaccionesProducto(producto);\n }\n })\n });\n \n document.querySelectorAll('.cons-asi').forEach(item => {\n item.addEventListener('click', event => {\n let res = item.id.split(\"-\");\n let producto = store.getObject().buscarProducto(res[2]);\n if(producto != null){\n mostrarTransaccionesProducto(producto);\n }\n })\n });\n}", "function initequipo() {\n q = {};\n q.ke = _ucode;\n q.lu = _ulcod;\n q.ti = _utval;\n tips = $(\".validateTips\");\n\n $('#dynamictable').dataTable({\n \"sPaginationType\": \"full_numbers\"\n });\n $('#dynamictable2').dataTable({\n \"sPaginationType\": \"full_numbers\"\n });\n $('#dynamictable3').dataTable({\n \"sPaginationType\": \"full_numbers\"\n });\n $('#dynamictable4').dataTable({\n \"sPaginationType\": \"full_numbers\"\n });\n\n $(\"#crearequipo\").button().click(function() {\n q.id = 0;\n $(\"#dialog-form\").dialog(\"open\");\n });\n $(\"#agregartipoequipo\").button().click(function() {\n q.id = 0;\n EQUIPO.teqget();\n });\n $(\"#agregarservicio\").button().click(function() {\n q.id = 0;\n EQUIPO.serget();\n });\n $(\"#agregarubicacion\").button().click(function() {\n q.id = 0;\n EQUIPO.ubiget();\n });\n\n $(\"#dialog-form\").dialog({\n autoOpen: false,\n height: 610,\n width: 950,\n modal: true,\n buttons: {\n \"Guardar\": function () {\n EQUIPO.savedata();\n },\n \"Cancelar\": function() {\n UTIL.clearForm('formcreate1');\n $(this).dialog(\"close\");\n }\n },\n close: function() {\n UTIL.clearForm('formcreate1');\n updateTips('');\n }\n });\n\n $(\"#dialog-form2\").dialog({\n autoOpen: false,\n height: 700,\n width: 950,\n modal: true,\n buttons: {\n \"Cancelar\": function() {\n UTIL.clearForm('formcreate2');\n $(this).dialog(\"close\");\n }\n },\n close: function() {\n UTIL.clearForm('formcreate2');\n updateTips('');\n $(this).dialog(\"close\");\n }\n });\n $(\"#dialog-form3\").dialog({\n autoOpen: false,\n height: 700,\n width: 950,\n modal: true,\n buttons: {\n \"Cancelar\": function() {\n UTIL.clearForm('formcreate2');\n $(this).dialog(\"close\");\n }\n },\n close: function() {\n UTIL.clearForm('formcreate2');\n updateTips('');\n $(this).dialog(\"close\");\n }\n });\n $(\"#dialog-form4\").dialog({\n autoOpen: false,\n height: 700,\n width: 950,\n modal: true,\n buttons: {\n \"Cancelar\": function() {\n UTIL.clearForm('formcreate2');\n $(this).dialog(\"close\");\n }\n },\n close: function() {\n UTIL.clearForm('formcreate2');\n updateTips('');\n $(this).dialog(\"close\");\n }\n });\n\n}", "function activarSelectorDeElementosControl() {\n\n console.log(\"Activando SelectorDeElementosControl\");\n actualizarSelectorDeCapasConCapasExportalbles();\n $('#selectorCapaExportacion').dialog(\"open\");\n var capaSeleccionada = $(\"#capaSeleccionadaSelectorCapaExportacioin\").val();\n\n // como el control depende de la capa seleccionada lo creamos desde aqui...\n pasarSelectorDeElementosControlACapa(capaSeleccionada);\n capaSeleccion.removeAllFeatures();\n selectorDeElementosControl.activate();\n\n}" ]
[ "0.6244575", "0.6229888", "0.6157935", "0.6088538", "0.5997714", "0.59884983", "0.59588945", "0.5954717", "0.5939371", "0.59172285", "0.59086657", "0.58998126", "0.5877936", "0.58721083", "0.58602405", "0.5857508", "0.58437175", "0.58403164", "0.5829069", "0.5820085", "0.5815751", "0.5815751", "0.58057463", "0.5794911", "0.57940954", "0.5772801", "0.5770592", "0.5766683", "0.5764553", "0.57582074", "0.5746258", "0.5741146", "0.5730458", "0.5717967", "0.57019466", "0.56911135", "0.5684698", "0.56828195", "0.5674018", "0.5667575", "0.5664219", "0.56639737", "0.5654627", "0.56542104", "0.5652896", "0.5647012", "0.56441104", "0.56289154", "0.56165403", "0.5609792", "0.5606223", "0.5591326", "0.5591075", "0.55820537", "0.55796003", "0.55777293", "0.55777293", "0.55767894", "0.55766135", "0.55734503", "0.5568947", "0.5563321", "0.55546737", "0.55522263", "0.55505955", "0.5550112", "0.55495", "0.55490905", "0.5545869", "0.5544854", "0.55433613", "0.55419934", "0.5538125", "0.55381054", "0.55335164", "0.5524871", "0.5521615", "0.55206364", "0.5520541", "0.552021", "0.55201536", "0.55190545", "0.551846", "0.55158895", "0.5512751", "0.5511215", "0.55077", "0.5507293", "0.550608", "0.55021316", "0.5494093", "0.54936343", "0.54918283", "0.5487971", "0.54865944", "0.548595", "0.54826075", "0.5471646", "0.5471379", "0.5470356", "0.54683083" ]
0.0
-1
Recursively encodes the supplied object according to the canonical JSON form as specified at It's a restricted dialect of JSON in which keys are lexically sorted, floats are not allowed, and only double quotes and backslashes are escaped.
function canonicalize(object) { const buffer = []; if (typeof object === 'string') { buffer.push(canonicalizeString(object)); } else if (typeof object === 'boolean') { buffer.push(JSON.stringify(object)); } else if (Number.isInteger(object)) { buffer.push(JSON.stringify(object)); } else if (object === null) { buffer.push(JSON.stringify(object)); } else if (Array.isArray(object)) { buffer.push(LEFT_SQUARE_BRACKET); let first = true; object.forEach((element) => { if (!first) { buffer.push(COMMA); } first = false; buffer.push(canonicalize(element)); }); buffer.push(RIGHT_SQUARE_BRACKET); } else if (typeof object === 'object') { buffer.push(LEFT_CURLY_BRACKET); let first = true; Object.keys(object) .sort() .forEach((property) => { if (!first) { buffer.push(COMMA); } first = false; buffer.push(canonicalizeString(property)); buffer.push(COLON); buffer.push(canonicalize(object[property])); }); buffer.push(RIGHT_CURLY_BRACKET); } else { throw new TypeError('cannot encode ' + object.toString()); } return buffer.join(''); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function json_encode(mixed_val) {\n var retVal, json = this.window.JSON;\n try {\n if (typeof json === 'object' && typeof json.stringify === 'function') {\n retVal = json.stringify(mixed_val); // Errors will not be caught here if our own equivalent to resource\n // (an instance of PHPJS_Resource) is used\n if (retVal === undefined) {\n throw new SyntaxError('json_encode');\n }\n return retVal;\n }\n\n var value = mixed_val;\n\n var quote = function(string) {\n var escapable =\n /[\\\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var meta = { // table of character substitutions\n '\\b': '\\\\b',\n '\\t': '\\\\t',\n '\\n': '\\\\n',\n '\\f': '\\\\f',\n '\\r': '\\\\r',\n '\"': '\\\\\"',\n '\\\\': '\\\\\\\\'\n };\n\n escapable.lastIndex = 0;\n return escapable.test(string) ? '\"' + string.replace(escapable, function(a) {\n var c = meta[a];\n return typeof c === 'string' ? c : '\\\\u' + ('0000' + a.charCodeAt(0)\n .toString(16))\n .slice(-4);\n }) + '\"' : '\"' + string + '\"';\n };\n\n var str = function(key, holder) {\n var gap = '';\n var indent = ' ';\n var i = 0; // The loop counter.\n var k = ''; // The member key.\n var v = ''; // The member value.\n var length = 0;\n var mind = gap;\n var partial = [];\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n if (value && typeof value === 'object' && typeof value.toJSON === 'function') {\n value = value.toJSON(key);\n }\n\n // What happens next depends on the value's type.\n switch (typeof value) {\n case 'string':\n return quote(value);\n\n case 'number':\n // JSON numbers must be finite. Encode non-finite numbers as null.\n return isFinite(value) ? String(value) : 'null';\n\n case 'boolean':\n case 'null':\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce 'null'. The case is included here in\n // the remote chance that this gets fixed someday.\n return String(value);\n\n case 'object':\n // If the type is 'object', we might be dealing with an object or an array or\n // null.\n // Due to a specification blunder in ECMAScript, typeof null is 'object',\n // so watch out for that case.\n if (!value) {\n return 'null';\n }\n if ((this.PHPJS_Resource && value instanceof this.PHPJS_Resource) || (window.PHPJS_Resource &&\n value instanceof window.PHPJS_Resource)) {\n throw new SyntaxError('json_encode');\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n gap += indent;\n partial = [];\n\n // Is the value an array?\n if (Object.prototype.toString.apply(value) === '[object Array]') {\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || 'null';\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n v = partial.length === 0 ? '[]' : gap ? '[\\n' + gap + partial.join(',\\n' + gap) + '\\n' + mind +\n ']' : '[' + partial.join(',') + ']';\n gap = mind;\n return v;\n }\n\n // Iterate through all of the keys in the object.\n for (k in value) {\n if (Object.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (gap ? ': ' : ':') + v);\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n v = partial.length === 0 ? '{}' : gap ? '{\\n' + gap + partial.join(',\\n' + gap) + '\\n' + mind + '}' :\n '{' + partial.join(',') + '}';\n gap = mind;\n return v;\n case 'undefined':\n // Fall-through\n case 'function':\n // Fall-through\n default:\n throw new SyntaxError('json_encode');\n }\n };\n\n // Make a fake root object containing our value under the key of ''.\n // Return the result of stringifying the value.\n return str('', {\n '': value\n });\n\n } catch (err) { // Todo: ensure error handling above throws a SyntaxError in all cases where it could\n // (i.e., when the JSON global is not available and there is an error)\n if (!(err instanceof SyntaxError)) {\n throw new Error('Unexpected error type in json_encode()');\n }\n this.php_js = this.php_js || {};\n this.php_js.last_error_json = 4; // usable by json_last_error()\n return null;\n }\n}", "encode(obj) {\n logger_1.Logger.log.debug(\"JsonEncoder.encode: start.\");\n return JSON.stringify(obj);\n }", "_encodeObject(object) {\n return object.termType === 'Literal' ? this._encodeLiteral(object) : this._encodeIriOrBlank(object);\n }", "function encode(object) {\n if (object === undefined) {\n return {\"%\": \"undefined\"};\n } else if (Object(object) !== object) {\n if (typeof object == \"number\") {\n if (object === Number.POSITIVE_INFINITY) {\n return {\"%\": \"+Infinity\"};\n } else if (object === Number.NEGATIVE_INFINITY) {\n return {\"%\": \"-Infinity\"};\n } else if (isNaN(object)) {\n return {\"%\": \"NaN\"};\n }\n }\n return object;\n } else if (Q.isPromise(object) || typeof object === \"function\") {\n var id = makeId();\n makeLocal(id);\n dispatchLocal(id, 'resolve', object);\n return {\"@\": id, \"type\": typeof object};\n } else if (Array.isArray(object)) {\n return object.map(encode);\n } else if (typeof object === \"object\") {\n var result = {};\n if (object instanceof Error) {\n result.message = object.message;\n result.stack = object.stack;\n }\n for (var key in object) {\n if (has.call(object, key)) {\n var newKey = key.replace(/[@!%\\\\]/, function ($0) {\n return \"\\\\\" + $0;\n });\n result[newKey] = encode(object[key]);\n }\n }\n return result;\n } else {\n return object;\n }\n }", "_encodeObject(object) {\n switch (object.termType) {\n case 'Quad':\n return this._encodeQuad(object);\n case 'Literal':\n return this._encodeLiteral(object);\n default:\n return this._encodeIriOrBlank(object);\n }\n }", "_jsonEncode( data ) {\n if ( typeof data === 'object' ) {\n try { let json = JSON.stringify( data ); return json; }\n catch ( e ) { return JSON.stringify( e ); }\n }\n return '{}';\n }", "function encode(object) {\n return cbor.encode(exchangeKeys(object, true));\n}", "function prepareObjectForSerialization(obj) {\n var JSONSafeRepresentation = Array.isArray(obj) ? [] : {};\n for (var prop in obj) {\n if (obj.hasOwnProperty(prop) && prop.indexOf('$') !== 0) {\n if (typeof obj[prop] === 'object' && !(obj[prop] instanceof Date)) {\n JSONSafeRepresentation[prop] = prepareObjectForSerialization(obj[prop]);\n } else if (obj[prop] instanceof Date) {\n JSONSafeRepresentation[prop] = {\n timestamp: obj[prop].getTime(),\n isDate: true\n };\n } else {\n JSONSafeRepresentation[prop] = obj[prop];\n }\n }\n }\n return JSONSafeRepresentation;\n }", "function jsonify(obj) {\n\n if (thing.isObject(obj) && obj._type) {\n delete obj._type;\n\n Object.keys(obj).forEach(function (key) {\n jsonify(obj[key]);\n });\n }\n else if (thing.isArray(obj)) {\n obj.forEach(function (item) {\n jsonify(item);\n });\n }\n\n return obj;\n}", "function toJSON(object) {\r\n var type = typeof object;\r\n if ('object' == type) {\r\n if (Array == object.constructor) type = 'array';\r\n else if (RegExp == object.constructor) type = 'regexp';\r\n else type = 'object';\r\n }\r\n switch (type) {\r\n case 'undefined':\r\n case 'unknown':\r\n return;\r\n break;\r\n case 'function':\r\n case 'boolean':\r\n case 'regexp':\r\n return object.toString();\r\n break;\r\n case 'number':\r\n return isFinite(object) ? object.toString() : 'null';\r\n break;\r\n case 'string':\r\n return '\"' + object.replace(/(\\\\|\\\")/g, \"\\\\$1\").replace(/\\n|\\r|\\t/g,\r\n function() {\r\n var a = arguments[0];\r\n return (a == '\\n') ? '\\\\n': (a == '\\r') ? '\\\\r': (a == '\\t') ? '\\\\t': \"\"\r\n }) + '\"';\r\n break;\r\n case 'object':\r\n if (object === null) return 'null';\r\n var results = [];\r\n for (var property in object) {\r\n if (property == \"parent\") continue;\r\n var value = toJSON(object[property]);\r\n if (value !== undefined) results.push(toJSON(property) + ':' + value);\r\n }\r\n return '{' + results.join(',') + '}';\r\n break;\r\n case 'array':\r\n var results = [];\r\n for (var i = 0; i < object.length; i++) {\r\n var value = toJSON(object[i]);\r\n if (value !== undefined) results.push(value);\r\n }\r\n return '[' + results.join(',') + ']';\r\n break;\r\n }\r\n }", "function encodeQueryComponents(obj) {\n if (Array.isArray(obj)) {\n obj = obj.map(function(item) {\n return encodeQueryComponents(item);\n });\n } else if (typeof(obj) === 'object') {\n Object.keys(obj).forEach(function(key) {\n obj[key] = encodeQueryComponents(obj[key]);\n });\n } else if (typeof(obj) === 'string') {\n //Return the encoded component (decode first for avoiding double encode)\n obj = encodeURIComponent(decodeURIComponent(obj));\n }\n return obj;\n }", "function stringifyJSONHelper(obj){\n\n var str = \"\";\n\n if(Array.isArray(obj)){\n str += \"[\";\n obj.forEach(function(item, i){\n if(i > 0){str += \",\"}\n str += stringifyJSONHelper(item);\n });\n\n return str += \"]\";\n }\n else if(obj === null){\n return null + \"\";\n }\n else if(typeof obj === 'object'){\n str += \"{\";\n\n var keys = Object.keys(obj);\n for(var i=0; i<keys.length; i++){\n if(typeof obj[keys[i]] !== 'function' && typeof obj[keys[i]] !== 'undefined'){\n if(i>0) {str += \",\"}\n str += \"\\\"\" + keys[i] + \"\\\"\" + \":\" + stringifyJSONHelper(obj[keys[i]]);\n }\n }\n\n return str += \"}\";\n }\n else if(typeof obj === 'string'){\n return str += \"\\\"\" + obj + \"\\\"\";\n }\n else if(typeof obj === 'boolean'){\n return str += obj + \"\";\n }\n else if(typeof obj === 'function'){\n return null;\n }\n else if(typeof obj === \"undefined\"){\n return null;\n }\n else{\n return str += obj + \"\";\n }\n\n }", "function stableJSONStringify(obj) {\n\t if (Array.isArray(obj)) {\n\t var result = [];\n\t for (var ii = 0; ii < obj.length; ii++) {\n\t var value = obj[ii] !== undefined ? obj[ii] : null;\n\t result.push(stableJSONStringify(value));\n\t }\n\t return '[' + result.join(',') + ']';\n\t } else if (typeof obj === 'object' && obj) {\n\t var _result = [];\n\t var keys = Object.keys(obj);\n\t keys.sort();\n\t for (var _ii = 0; _ii < keys.length; _ii++) {\n\t var key = keys[_ii];\n\t var _value = stableJSONStringify(obj[key]);\n\t _result.push('\"' + key + '\":' + _value);\n\t }\n\t return '{' + _result.join(',') + '}';\n\t } else {\n\t return JSON.stringify(obj);\n\t }\n\t}", "function encodeObject(o) {\n if (_.isNumber(o)) {\n if (_.isNaN(o)) {\n return ['SPECIAL_FLOAT', 'NaN'];\n } else if (o === Infinity) {\n return ['SPECIAL_FLOAT', 'Infinity'];\n } else if (o === -Infinity) {\n return ['SPECIAL_FLOAT', '-Infinity'];\n } else {\n return o;\n }\n } else if (_.isString(o)) {\n return o;\n } else if (_.isBoolean(o) || _.isNull(o) || _.isUndefined(o)) {\n return ['JS_SPECIAL_VAL', String(o)];\n } else if (typeof o === 'symbol') {\n // ES6 symbol\n return ['JS_SPECIAL_VAL', String(o)];\n } else {\n // render these as heap objects\n\n // very important to use _.has since we don't want to\n // grab the property in your prototype, only in YOURSELF ... SUBTLE!\n if (!_.has(o, 'smallObjId_hidden_')) {\n // make this non-enumerable so that it doesn't show up in\n // console.log() or other inspector functions\n Object.defineProperty(o, 'smallObjId_hidden_', { value: smallObjId,\n enumerable: false });\n smallObjId++;\n }\n assert(o.smallObjId_hidden_ > 0);\n\n var ret = ['REF', o.smallObjId_hidden_];\n\n if (encodedHeapObjects[String(o.smallObjId_hidden_)] !== undefined) {\n return ret;\n }\n else {\n assert(_.isObject(o));\n\n var newEncodedObj = [];\n encodedHeapObjects[String(o.smallObjId_hidden_)] = newEncodedObj;\n\n var i;\n\n if (_.isFunction(o)) {\n var funcProperties = []; // each element is a pair of [name, encoded value]\n\n var encodedProto = null;\n if (_.isObject(o.prototype)) {\n // TRICKY TRICKY! for inheritance to be displayed properly, we\n // want to find the prototype of o.prototype and see if it's\n // non-empty. if that's true, then even if o.prototype is\n // empty (i.e., has no properties of its own), then we should\n // still encode it since its 'prototype' \"uber-hidden\n // property\" is non-empty\n var prototypeOfPrototype = Object.getPrototypeOf(o.prototype);\n if (!_.isEmpty(o.prototype) ||\n (_.isObject(prototypeOfPrototype) && !_.isEmpty(prototypeOfPrototype))) {\n encodedProto = encodeObject(o.prototype);\n }\n }\n\n if (encodedProto) {\n funcProperties.push(['prototype', encodedProto]);\n }\n\n // now get all of the normal properties out of this function\n // object (it's unusual to put properties in a function object,\n // but it's still legal!)\n var funcPropPairs = _.pairs(o);\n for (i = 0; i < funcPropPairs.length; i++) {\n funcProperties.push([funcPropPairs[i][0], encodeObject(funcPropPairs[i][1])]);\n }\n\n var funcCodeString = o.toString();\n\n /*\n\n #craftsmanship -- make nested functions look better by indenting\n the first line of a nested function definition by however much\n the LAST line is indented, ONLY if the last line is simply a\n single ending '}'. otherwise it will look ugly since the\n function definition doesn't start out indented, like so:\n\nfunction bar(x) {\n globalZ += 100;\n return x + y + globalZ;\n }\n\n */\n var codeLines = funcCodeString.split('\\n');\n if (codeLines.length > 1) {\n var lastLine = _.last(codeLines);\n if (lastLine.trim() === '}') {\n var lastLinePrefix = lastLine.slice(0, lastLine.indexOf('}'));\n funcCodeString = lastLinePrefix + funcCodeString; // prepend!\n }\n }\n\n newEncodedObj.push('JS_FUNCTION',\n o.name,\n funcCodeString, /* code string*/\n funcProperties.length ? funcProperties : null, /* OPTIONAL */\n null /* parent frame */);\n } else if (_.isArray(o)) {\n newEncodedObj.push('LIST');\n for (i = 0; i < o.length; i++) {\n newEncodedObj.push(encodeObject(o[i]));\n }\n } else if (o.__proto__.toString() === canonicalSet.__proto__.toString()) { // dunno why 'instanceof' doesn't work :(\n newEncodedObj.push('SET');\n // ES6 Set (TODO: add WeakSet)\n for (let item of o) {\n newEncodedObj.push(encodeObject(item));\n }\n } else if (o.__proto__.toString() === canonicalMap.__proto__.toString()) { // dunno why 'instanceof' doesn't work :(\n // ES6 Map (TODO: add WeakMap)\n newEncodedObj.push('DICT'); // use the Python 'DICT' type since it's close enough; adjust display in frontend\n for (let [key, value] of o) {\n newEncodedObj.push([encodeObject(key), encodeObject(value)]);\n }\n } else {\n // a true object\n\n // if there's a custom toString() function (note that a truly\n // prototypeless object won't have toString method, so check first to\n // see if toString is *anywhere* up the prototype chain)\n var s = (o.toString !== undefined) ? o.toString() : '';\n if (s !== '' && s !== '[object Object]') {\n newEncodedObj.push('INSTANCE_PPRINT', 'object', s);\n } else {\n newEncodedObj.push('INSTANCE', '');\n var pairs = _.pairs(o);\n for (i = 0; i < pairs.length; i++) {\n var e = pairs[i];\n newEncodedObj.push([encodeObject(e[0]), encodeObject(e[1])]);\n }\n\n var proto = Object.getPrototypeOf(o);\n if (_.isObject(proto) && !_.isEmpty(proto)) {\n //log('obj.prototype', proto, proto.smallObjId_hidden_);\n // I think __proto__ is the official term for this field,\n // *not* 'prototype'\n newEncodedObj.push(['__proto__', encodeObject(proto)]);\n }\n }\n }\n\n return ret;\n }\n\n }\n assert(false);\n}", "function encode(object, memo, path ) {\n memo = memo || new Map();\n path = path || \"\";\n if (object === undefined) {\n return {\"%\": \"undefined\"};\n } else if (Object(object) !== object) {\n if (typeof object == \"number\") {\n if (object === Number.POSITIVE_INFINITY) {\n return {\"%\": \"+Infinity\"};\n } else if (object === Number.NEGATIVE_INFINITY) {\n return {\"%\": \"-Infinity\"};\n } else if (isNaN(object)) {\n return {\"%\": \"NaN\"};\n }\n }\n return object;\n } else {\n var encoded;\n if (memo.has(object)) {\n return {\"$\": memo.get(object)};\n } else {\n memo.set(object, path);\n }\n if (Q.isPromise(object) || typeof object === \"function\") {\n var id = makeId();\n makeLocal(id);\n dispatchLocal(id, \"resolve\", object);\n return {\"@\": id, \"type\": typeof object};\n } else if (Array.isArray(object)) {\n return object.map(function (value, index) {\n return encode(value, memo, path + \"/\" + index);\n });\n } else if (\n (\n object.constructor === Object &&\n Object.getPrototypeOf(object) === Object.prototype\n ) ||\n object instanceof Error\n ) {\n var result = {};\n if (object instanceof Error) {\n result.message = object.message;\n result.stack = object.stack;\n }\n for (var key in object) {\n if (has.call(object, key)) {\n var newKey = key.replace(/[@!%\\$\\/\\\\]/, function ($0) {\n return \"\\\\\" + $0;\n });\n result[newKey] = encode(object[key], memo, path + \"/\" + newKey);\n }\n }\n return result;\n } else {\n var id = makeId();\n makeLocal(id);\n dispatchLocal(id, \"resolve\", object);\n return {\"@\": id, \"type\": typeof object};\n }\n }\n }", "function _formEncode(obj) {\n var jsonString = '';\n for (var key in obj) {\n if (jsonString.length !== 0) {\n jsonString += '&';\n }\n jsonString += key + '=' + $filter('json')(obj[key]);\n }\n return jsonString;\n }", "function stringify(obj) {\n if (\"JSON\" in window) {\n return JSON.stringify(obj);\n }\n\n var t = typeof (obj);\n if (t != \"object\" || obj === null) {\n // simple data type\n if (t == \"string\") obj = '\"' + obj + '\"';\n\n return String(obj);\n } else {\n // recurse array or object\n var n, v, json = [],\n arr = (obj && obj.constructor == Array);\n\n for (n in obj) {\n v = obj[n];\n t = typeof (v);\n if (obj.hasOwnProperty(n)) {\n if (t == \"string\") {\n v = '\"' + v + '\"';\n } else if (t == \"object\" && v !== null) {\n v = stringify(v);\n }\n\n json.push((arr ? \"\" : '\"' + n + '\":') + String(v));\n }\n }\n\n return (arr ? \"[\" : \"{\") + String(json) + (arr ? \"]\" : \"}\");\n }\n }", "function jsonStringify(object, spaces, depth) {\n if (typeof spaces === 'undefined') {\n // primitive types\n return _stringify(object);\n }\n\n depth = depth || 1;\n var space = spaces * depth;\n var str = Array.isArray(object) ? '[' : '{';\n var end = Array.isArray(object) ? ']' : '}';\n var length = object.length || Object.keys(object).length;\n // `.repeat()` polyfill\n function repeat(s, n) {\n return new Array(n).join(s);\n }\n\n function _stringify(val) {\n switch (getType(val)) {\n case 'null':\n case 'undefined':\n val = '[' + val + ']';\n break;\n case 'array':\n case 'object':\n val = jsonStringify(val, spaces, depth + 1);\n break;\n case 'boolean':\n case 'regexp':\n case 'number':\n val = val === 0 && 1 / val === -Infinity // `-0`\n ? '-0'\n : val.toString();\n break;\n case 'date':\n var sDate = isNaN(val.getTime()) // Invalid date\n ? val.toString()\n : val.toISOString();\n val = '[Date: ' + sDate + ']';\n break;\n case 'buffer':\n var json = val.toJSON();\n // Based on the toJSON result\n json = json.data && json.type ? json.data : json;\n val = '[Buffer: ' + jsonStringify(json, 2, depth + 1) + ']';\n break;\n default:\n val = (val === '[Function]' || val === '[Circular]')\n ? val\n : JSON.stringify(val); // string\n }\n return val;\n }\n\n for (var i in object) {\n if (!object.hasOwnProperty(i)) {\n continue; // not my business\n }\n --length;\n str += '\\n ' + repeat(' ', space)\n + (Array.isArray(object) ? '' : '\"' + i + '\": ') // key\n + _stringify(object[i]) // value\n + (length ? ',' : ''); // comma\n }\n\n return str\n // [], {}\n + (str.length !== 1 ? '\\n' + repeat(' ', --space) + end : end);\n}", "function urlEncodeObject(obj) {\n let ret = {};\n for (const entry of Object.entries(obj)) {\n ret[encodeURIComponent(entry[0])] = encodeURIComponent(entry[1]);\n }\n return ret;\n}", "function serializeObject(obj) { // 2265\n var seen = []; // 2266\n // 2267\n return JSON.stringify(obj, function(key, val) { // 2268\n val = toJsonReplacer(key, val); // 2269\n if (isObject(val)) { // 2270\n // 2271\n if (seen.indexOf(val) >= 0) return '...'; // 2272\n // 2273\n seen.push(val); // 2274\n } // 2275\n return val; // 2276\n }); // 2277\n} // 2278", "function miniJSONify(o, exc) {\n if (typeof o === 'undefined') {\n return 'undefined';\n } else if (o == null) {\n return 'null';\n } else if (typeof o == 'string') {\n return \"'\" + o + \"'\";\n } else if (typeof o == 'number') {\n return \"\" + o;\n } else if (typeof o == 'boolean') {\n return \"\" + o;\n } else if ((typeof o === 'undefined' ? 'undefined' : _typeof(o)) == 'object') {\n if (o instanceof Array) {\n var s = null;\n for (var i = 0; i < o.length; ++i) {\n s = (s == null ? '' : s + ', ') + miniJSONify(o[i], exc);\n }\n return '[' + (s ? s : '') + ']';\n } else {\n exc = exc || {};\n var s = null;\n for (var k in o) {\n if (exc[k]) continue;\n if (k != undefined && typeof o[k] != 'function') {\n s = (s == null ? '' : s + ', ') + k + ': ' + miniJSONify(o[k], exc);\n }\n }\n return '{' + (s ? s : '') + '}';\n }\n } else {\n return typeof o === 'undefined' ? 'undefined' : _typeof(o);\n }\n}", "function JSONStringify(obj) {\n\t var json = '',\n\t lv = 0;\n\n\t // use a map to track parent relationship\n\t var objMap = [];\n\t function _hasSameParentAsChild(child) {\n\t // find upper item which child is equal to this child\n\t for (var i = objMap.length - 1; i >= 0; i--) {\n\t if (objMap[i].child == child) {\n\t return true;\n\t }\n\t }\n\t return false;\n\t }\n\n\t function _iterateObj(val) {\n\t if (isObject(val)) {\n\t // object\n\t if (_hasSameParentAsChild(val)) {\n\t // this object is circular, skip it\n\t json += \"CircularObject\";\n\t return;\n\t }\n\t objMap.push({ parent: parent, child: val });\n\n\t var keys = Object.keys(val);\n\t json += \"{\";\n\t lv++;\n\t for (var i = 0; i < keys.length; i++) {\n\t var k = keys[i];\n\t if (val.hasOwnProperty && !val.hasOwnProperty(k)) {\n\t continue;\n\t }\n\t json += k + ': ';\n\t _iterateObj(val[k], val);\n\t if (i < keys.length - 1) {\n\t json += ', ';\n\t }\n\t }\n\t lv--;\n\t json += '}';\n\n\t objMap.pop();\n\t } else if (isArray(val)) {\n\t // array\n\t if (_hasSameParentAsChild(val)) {\n\t // this array is circular, skip it\n\t json += \"CircularArray\";\n\t return;\n\t }\n\t objMap.push({ parent: parent, child: val });\n\n\t json += '[';\n\t lv++;\n\t for (var _i = 0; _i < val.length; _i++) {\n\t _iterateObj(val[_i], val);\n\t if (_i < val.length - 1) {\n\t json += ', ';\n\t }\n\t }\n\t lv--;\n\t json += ']';\n\n\t objMap.pop();\n\t } else if (isString(val)) {\n\t json += '\"' + val + '\"';\n\t } else if (isNumber(val)) {\n\t json += val;\n\t } else if (isBoolean(val)) {\n\t json += val;\n\t } else if (isNull(val)) {\n\t json += 'null';\n\t } else if (isUndefined(val)) {\n\t json += 'undefined';\n\t } else if (isFunction(val)) {\n\t json += 'function()';\n\t } else if (isSymbol(val)) {\n\t json += 'symbol';\n\t } else {\n\t json += 'unknown';\n\t }\n\t }\n\t _iterateObj(obj, null);\n\n\t return json;\n\t}", "function toJson(object, jsonFn, space) {\n\t if (jsonFn) {\n\t // We reparse the stringified json so that we can lean on JSON.stringify's\n\t // avoiding-infinite-recursion capabilities when stripping out any\n\t // remaining properties that begin with a dollar sign ($)\n\t object = JSON.parse(jsonFn(object));\n\t }\n\t return JSON.stringify(object, replacer, space);\n\t}", "function encode (obj) {\n return Buffer.from(JSON.stringify(obj)).toString('base64');\n}", "function serialize (object) {\n var type = typeof object;\n if ('object' == type) {\n if (Array == object.constructor)\n type = 'array';\n else if (RegExp == object.constructor)\n type = 'regexp';\n else\n type = 'object';\n }\n switch (type) {\n case 'undefined':\n case 'unknown':\n return;\n break;\n case 'function':\n case 'boolean':\n case 'regexp':\n return object.toString();\n break;\n case 'number':\n return isFinite(object) ? object.toString() : 'null';\n break;\n case 'string':\n return '\"' + object.replace(/(\\\\|\\\")/g, \"\\\\$1\").replace(/\\n|\\r|\\t/g,\n function() {\n var a = arguments[0];\n return (a == '\\n') ? '\\\\n' :(a == '\\r') ? '\\\\r' :(a == '\\t') ? '\\\\t' : \"\";\n }) + '\"';\n break;\n case 'object':\n if (object === null) return 'null';\n var results = [];\n for (var property in object) {\n \tif(!isNull(object[property])){\n var value = serialize(object[property]);\n\t if (value !== undefined){\n\t results.push(serialize(property) + ':' + value);\n\t }\n \t}\n }\n return '{' + results.join(',') + '}';\n break;\n case 'array':\n var results = [];\n for (var i = 0; i < object.length; i++) {\n \tif(!isNull(object[i])){\n\t var value = serialize(object[i]);\n\t if (value !== undefined) results.push(value);\n \t}\n }\n return '[' + results.join(',') + ']';\n break;\n }\n}", "function sanitizeKey(obj) {\n if (typeof obj !== 'object') return obj;\n if (Array.isArray(obj)) return obj;\n if (obj === null) return null;\n if (obj instanceof Boolean) return obj;\n if (obj instanceof Number) return obj;\n if (obj instanceof Buffer) return obj.toString();\n for (const k in obj) {\n const escapedK = sjs(k);\n if (escapedK !== k) {\n obj[escapedK] = sanitizeKey(obj[k]);\n obj[k] = undefined;\n } else {\n obj[k] = sanitizeKey(obj[k]);\n }\n }\n return obj;\n}", "function canonicalizeJ (object, map) {\n \"use strict\";\n for (const key in object) {\n const item = object[key];\n if (typeof item === \"object\") {\n object[key] = canonicalizeJ(item, map);\n } else if (map && ([\"node\", \"subject\", \"object\"]).indexOf(key) !== -1 &&\n typeof item === \"string\" && item.startsWith(\"_:\")) {\n if (!(item in map))\n map[item] = \"_:b\" + Object.keys(map).length;\n object[key] = map[item];\n }\n }\n if (\"shape\" in object && \"shapeExpr\" in object && \"id\" in object.shapeExpr)\n delete object.shapeExpr.id\n return object;\n}", "static toPrettyJson(obj) {\r\n return JSON.stringify(obj).replace(/\\{/g, '{\\n\\t').replace(/\\}/g, '\\n}').replace(/\\,/g,',\\n\\t');\r\n }", "function jsonize(str) {\n try {\n JSON.parse(str);\n return str;\n }\n catch (e) {\n return str\n .replace(/([\\$\\w]+)\\s*:/g, // wrap keys without double quote\n function (_, $1) {\n return '\"' + $1 + '\":';\n })\n .replace(/'([^']+)'/g, // replacing single quote to double quote\n function (_, $1) {\n return '\"' + $1 + '\"';\n });\n }\n}", "function safeJSONStringify(obj) {\n\t /* eslint no-extend-native:0 */\n\t\n\t if (Array.prototype.toJSON === undefined) {\n\t return JSON.stringify(obj);\n\t }\n\t\n\t var toJSON = Array.prototype.toJSON;\n\t delete Array.prototype.toJSON;\n\t var out = JSON.stringify(obj);\n\t Array.prototype.toJSON = toJSON;\n\t\n\t return out;\n\t}", "function safeJSONStringify(obj) {\n\t /* eslint no-extend-native:0 */\n\t\n\t if (Array.prototype.toJSON === undefined) {\n\t return JSON.stringify(obj);\n\t }\n\t\n\t var toJSON = Array.prototype.toJSON;\n\t delete Array.prototype.toJSON;\n\t var out = JSON.stringify(obj);\n\t Array.prototype.toJSON = toJSON;\n\t\n\t return out;\n\t}", "function JSONize(str) {\r\n return str\r\n // Wrap keys without quote with double quotes\r\n .replace(/([\\$\\w]+)\\s*:/g, function (_, $1) { return '\"' + $1 + '\":' })\r\n // Replace single quote wrapped ones to double quotes\r\n .replace(/'([^']+)'/g, function (_, $1) { return '\"' + $1 + '\"' })\r\n}", "function stringifyObject(obj, indent, stringifyLiteral) {\n if (obj !== null && typeof obj === 'object') {\n var newIndent = indent + '\\t';\n if (Array.isArray(obj)) {\n if (obj.length === 0) {\n return '[]';\n }\n var result = '[\\n';\n for (var i = 0; i < obj.length; i++) {\n result += newIndent + stringifyObject(obj[i], newIndent, stringifyLiteral);\n if (i < obj.length - 1) {\n result += ',';\n }\n result += '\\n';\n }\n result += indent + ']';\n return result;\n }\n else {\n var keys = Object.keys(obj);\n if (keys.length === 0) {\n return '{}';\n }\n var result = '{\\n';\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n result += newIndent + JSON.stringify(key) + ': ' + stringifyObject(obj[key], newIndent, stringifyLiteral);\n if (i < keys.length - 1) {\n result += ',';\n }\n result += '\\n';\n }\n result += indent + '}';\n return result;\n }\n }\n return stringifyLiteral(obj);\n}", "function safeJSONStringify(obj) {\n /* eslint no-extend-native:0 */\n\n if (Array.prototype.toJSON === undefined) {\n return JSON.stringify(obj);\n }\n\n var toJSON = Array.prototype.toJSON;\n delete Array.prototype.toJSON;\n var out = JSON.stringify(obj);\n Array.prototype.toJSON = toJSON;\n\n return out;\n}", "function safeJSONStringify(obj) {\n /* eslint no-extend-native:0 */\n\n if (Array.prototype.toJSON === undefined) {\n return JSON.stringify(obj);\n }\n\n var toJSON = Array.prototype.toJSON;\n delete Array.prototype.toJSON;\n var out = JSON.stringify(obj);\n Array.prototype.toJSON = toJSON;\n\n return out;\n}", "function safeJSONStringify(obj) {\n /* eslint no-extend-native:0 */\n\n if (Array.prototype.toJSON === undefined) {\n return JSON.stringify(obj);\n }\n\n var toJSON = Array.prototype.toJSON;\n delete Array.prototype.toJSON;\n var out = JSON.stringify(obj);\n Array.prototype.toJSON = toJSON;\n\n return out;\n}", "function safeJSONStringify(obj) {\n /* eslint no-extend-native:0 */\n\n if (Array.prototype.toJSON === undefined) {\n return JSON.stringify(obj);\n }\n\n var toJSON = Array.prototype.toJSON;\n delete Array.prototype.toJSON;\n var out = JSON.stringify(obj);\n Array.prototype.toJSON = toJSON;\n\n return out;\n}", "function safeJSONStringify(obj) {\n /* eslint no-extend-native:0 */\n\n if (Array.prototype.toJSON === undefined) {\n return JSON.stringify(obj);\n }\n\n var toJSON = Array.prototype.toJSON;\n delete Array.prototype.toJSON;\n var out = JSON.stringify(obj);\n Array.prototype.toJSON = toJSON;\n\n return out;\n}", "function safeJSONStringify(obj) {\n /* eslint no-extend-native:0 */\n\n if (Array.prototype.toJSON === undefined) {\n return JSON.stringify(obj);\n }\n\n var toJSON = Array.prototype.toJSON;\n delete Array.prototype.toJSON;\n var out = JSON.stringify(obj);\n Array.prototype.toJSON = toJSON;\n\n return out;\n}", "function toJSON1(obj, orderer, prefix) {\n if ( (typeof obj != 'object') || obj == null ) {\n return JSON.stringify(obj);\n }\n if (obj.isArray) {\n var prefix1 = prefix + ' ';\n var ret = '[';\n var sep = '\\n';\n for( var i=0; i < obj.length; i++ ) {\n ret += sep + prefix1 + toJSON1(obj[i], orderer, prefix1);\n sep = ',\\n';\n }\n ret += '\\n' + prefix + ']';\n }\n else {\n var prefix1 = prefix + ' ';\n var ret = '{';\n var sep = '\\n';\n var ordered = (orderer == null ? false : true);\n var properties = [];\n for( var property in obj ) {\n ordered =\n ordered &&\n (typeof obj[property] == 'object') &&\n (obj[property] != null) &&\n (orderer in obj[property]);\n properties.push(property);\n }\n if (ordered) {\n properties = sortedProperties(obj, orderer);\n }\n for( var i=0; i< properties.length; i++ ) {\n var propi = properties[i];\n ret += sep + prefix1 + '\"' + propi + '\": ' +\n toJSON1(obj[propi], orderer, prefix1);\n sep = ',\\n';\n }\n ret += '\\n' + prefix + '}';\n }\n return ret;\n }", "function serializeVerbatim (obj) {\n let i = 0\n const fns = []\n let res = JSON.stringify(obj, (k, v) => {\n if (typeof v === 'function') {\n fns.push(v.toString())\n return `__REPLACE${i++}`\n } else {\n return v\n }\n })\n res = res.replace(/\"__REPLACE(\\d{1})\"/g, (m, v) => {\n return fns[v]\n })\n return res\n}", "function plainObject(obj) {\n if (obj == undefined) {\n return \"undefined\";\n }\n if (typeof obj == \"string\" || obj instanceof String) {\n return \"\\\"\" + obj.replace(/\\\\/g, \"\\\\\\\\\").replace(/\\n/g, \"\\\\n\")\n .replace(/\\r/g, \"\\\\r\").replace(/\\\"/g, \"\\\\\\\"\")\n + \"\\\"\";\n }\n if (obj instanceof Function) {\n return \"\" + obj;\n }\n if (obj instanceof Array) {\n return \"[\" + arrayMap(obj, plainObject).join(\",\") + \"]\";\n }\n if (obj instanceof Object) {\n var os = [];\n for (var name in obj) {\n os.push(plainObject(name) + \":\" + plainObject(obj[name]));\n }\n return \"{\" + os.join(\",\") + \"}\";\n }\n return \"\" + obj;\n}", "function stringifyJSON(obj) {\n\t\t\n\t\tif(obj != undefined){\n\t\t\tif (obj.constructor === Object){\n\t\t\t\tvar holder = [];\n\t\t\t\tfor (prop in obj){\n\t\t\t\t\tif (typeof obj[prop] != 'function'){\n\t\t\t\t\t\tif (!isNaN(prop)){\n\t\t\t\t\t\t\tholder.push(stringifyJSON(obj[prop])); \n\t\t\t\t\t\t} else if (prop === \"undefined\"){\n\t\t\t\t\t\t\treturn \"{}\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tholder.push('\"'+ prop + '\":' + stringifyJSON(obj[prop]));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (holder.length>0){\n\t\t\t\t\t\treturn \"{\" + holder.join(\",\") + \"}\";\n\t\t\t\t} else {\n\t\t\t\t\treturn \"{}\"\n\t\t\t\t}\n\t\t\t} else if (obj.constructor === Array){\n\t\t\t\tvar result = \"[\";\n\t\t\t\tfor(var i=0;i<obj.length;i++)\n\t\t\t\t{\n\t\t\t\t\tif(i>0) result += \",\";\n\t\t\t\t\tresult += stringifyJSON(obj[i]);\n\t\t\t\t}\n\t\t\t\tresult += \"]\"\n\t\t\t\treturn result;\n\t\t\t} else if (obj.constructor === String){\n\t\t\t\treturn ('\"' + obj + '\"');\n\t\t\t} else {\n\t\t\t\treturn obj.toString();\n\t\t\t}\n\t\t} else {\n\t\treturn 'null';\n\t\t}\n\t}", "function safeStringify(obj) {\n\tconst cache = new Set();\n\n\tfunction replacer(key, value) {\n\t\tif(typeof value === \"object\" && value !== null) {\n\t\t\tif(cache.has(value)) {\n\t\t\t\treturn {}; // Replace circular reference with an empty object\n\t\t\t}\n\t\t\tcache.add(value);\n\t\t}\n\t\treturn value;\n\t}\n\n\treturn JSON.stringify(obj, replacer);\n}", "function serializeObject(value) {\n\tif (value === null) {\n\t\treturn '';\n\t}\n\tvar result;\n\tvar typeOf = typeof value;\n\n\tif (typeOf === 'object' && (value !== null)) {\n\t\tresult = '{';\n\t\tif (Array.isArray(value)) {\n\t\t\tvalue.forEach(function (arrayValue, i) {\n\t\t\t\tif (i !== 0) {\n\t\t\t\t\tresult += ',';\n\t\t\t\t}\n\t\t\t\tresult += serializeObject(arrayValue);\n\t\t\t});\n\t\t} else {\n\t\t\tObject.keys(value).forEach(function (key, i) {\n\t\t\t\tif (i !== 0) {\n\t\t\t\t\tresult += ',';\n\t\t\t\t}\n\t\t\t\tresult += key + ':' + serializeObject(value[key]);\n\t\t\t});\n\t\t}\n\n\t\tresult += '}';\n\t} else if (typeOf === 'string') {\n\t\tresult = '\"' + value + '\"';\n\t} else if (value === undefined) {\n\t\tresult = 'null';\n\t}\n\n\treturn result || value;\n}", "function encodeObject(obj) {\n return new Uint8Array(str2ab(JSON.stringify((obj))))\n}", "function safeSerialize(obj) {\n var str;\n try {\n var seenObjects_1 = [];\n str = JSON.stringify(obj, (function (key, value) {\n if (value === window) {\n return \"[window]\";\n }\n else if (value instanceof HTMLElement) {\n return \"[HTMLElement]\";\n }\n else if (typeof value === \"function\") {\n return \"[function]\";\n }\n else if (typeof value === \"object\") {\n if (value === null) {\n return value;\n }\n else if (seenObjects_1.indexOf(value) === -1) {\n seenObjects_1.push(value);\n return value;\n }\n else {\n return \"[circular]\";\n }\n }\n else {\n return value;\n }\n }));\n }\n catch (err) {\n // Note: we make this be a JSON string, so that consumers\n // can always call JSON.parse.\n str = JSON.stringify(\"[object]\");\n }\n return str;\n}", "serialize_object(obj) {\n if (!this.is_object(obj)) return false;\n var props = [];\n if (![null, undefined].includes(obj)) {\n for (const [prop, val] of Object.entries(obj)) {\n if (['apikey','secret','password'].includes(prop.toLowerCase())) {\n var newval = '********';\n } else {\n var newval = this.serialize(val);\n }\n props.push(prop + ': ' + newval);\n }\n return '{' + props.join(', ') + '}';\n }\n return 'null';\n }", "function standardiseObject(obj) {\n return JSON.parse(JSON.stringify(obj));\n}", "function prepareForStringify(obj) {\n if (isObject(obj) && getClass(obj) != \"[object Object]\") {\n if (obj.type == undefined)\n obj.type = obj.constructor.name;\n for (var entry in obj) {\n prepareForStringify(obj[entry]);\n }\n }\n else if (isArray(obj)) {\n for (var entry in obj) {\n prepareForStringify(obj[entry]);\n }\n }\n return obj;\n}", "function safeSerialize(obj) {\r\n var str;\r\n try {\r\n var seenObjects_1 = [];\r\n str = JSON.stringify(obj, function (key, value) {\r\n if (value === window) {\r\n return '[window]';\r\n }\r\n else if (value instanceof HTMLElement) {\r\n return '[HTMLElement]';\r\n }\r\n else if (typeof value === 'function') {\r\n return '[function]';\r\n }\r\n else if (typeof value === 'object') {\r\n if (value === null) {\r\n return value;\r\n }\r\n else if (seenObjects_1.indexOf(value) === -1) {\r\n seenObjects_1.push(value);\r\n return value;\r\n }\r\n else {\r\n return '[circular]';\r\n }\r\n }\r\n else {\r\n return value;\r\n }\r\n });\r\n }\r\n catch (err) {\r\n // Note: we make this be a JSON string, so that consumers\r\n // can always call JSON.parse.\r\n str = JSON.stringify('[object]');\r\n }\r\n return str;\r\n}", "function safeSerialize(obj) {\r\n var str;\r\n try {\r\n var seenObjects_1 = [];\r\n str = JSON.stringify(obj, function (key, value) {\r\n if (value === window) {\r\n return '[window]';\r\n }\r\n else if (value instanceof HTMLElement) {\r\n return '[HTMLElement]';\r\n }\r\n else if (typeof value === 'function') {\r\n return '[function]';\r\n }\r\n else if (typeof value === 'object') {\r\n if (value === null) {\r\n return value;\r\n }\r\n else if (seenObjects_1.indexOf(value) === -1) {\r\n seenObjects_1.push(value);\r\n return value;\r\n }\r\n else {\r\n return '[circular]';\r\n }\r\n }\r\n else {\r\n return value;\r\n }\r\n });\r\n }\r\n catch (err) {\r\n // Note: we make this be a JSON string, so that consumers\r\n // can always call JSON.parse.\r\n str = JSON.stringify('[object]');\r\n }\r\n return str;\r\n}", "function stringifyWithSchema(obj, schema) {\n const path = [];\n const stack = [];\n function stringifyValue(value) {\n if (typeof value === 'string') {\n // ///TODO: DIRTY HACK\n // if (value === 'integer'\n // && path[0] === 'call'\n // && path[1] === 'args'\n // && path[3] === 'type'\n // ) { return `\"${value}\"` }\n if (isLongProp(path, schema, obj)) {\n return value;\n }\n }\n if (typeof value === 'boolean' || value instanceof Boolean ||\n value === null ||\n typeof value === 'number' || value instanceof Number ||\n typeof value === 'string' || value instanceof String ||\n value instanceof Date) {\n return JSON.stringify(value);\n }\n if (Array.isArray(value)) {\n return stringifyArray(value);\n }\n if (value && typeof value === 'object') {\n return stringifyObject(value);\n }\n return undefined;\n }\n function stringifyArray(array) {\n let str = '[';\n const stackIndex = stack.length;\n stack[stackIndex] = array;\n for (let i = 0; i < array.length; i++) {\n let key = i + '';\n let item = array[i];\n if (typeof item !== 'undefined' && typeof item !== 'function') {\n path[stackIndex] = key;\n str += stringifyValue(item);\n }\n else {\n str += 'null';\n }\n if (i < array.length - 1) {\n str += ',';\n }\n }\n stack.length = stackIndex;\n path.length = stackIndex;\n str += ']';\n return str;\n }\n function stringifyObject(object) {\n let first = true;\n let str = '{';\n const stackIndex = stack.length;\n stack[stackIndex] = object;\n for (let key in object) {\n if (object.hasOwnProperty(key)) {\n let value = object[key];\n if (includeProperty(value)) {\n if (first) {\n first = false;\n }\n else {\n str += ',';\n }\n str += ('\"' + key + '\":');\n path[stackIndex] = key;\n str += stringifyValue(value);\n }\n }\n }\n stack.length = stackIndex;\n path.length = stackIndex;\n str += '}';\n return str;\n }\n function includeProperty(value) {\n return typeof value !== 'undefined'\n && typeof value !== 'function';\n }\n return stringifyValue(obj) || '';\n}", "function normalize(obj) {\n if (obj === null || typeof obj !== 'object') {\n return JSON.stringify(obj);\n }\n if (obj instanceof Array) {\n return '[' + obj.map(normalize).join(', ') + ']';\n }\n let answer = '{';\n for (const key of Object.keys(obj).sort()) {\n answer += key + ': ';\n answer += normalize(obj[key]);\n answer += ', ';\n }\n answer += '}';\n return answer;\n}", "function stringifyJSON(data) {\n // your code goes here\n \n if(data === undefined){\n return undefined;\n }else if(data === null){\n return 'null';\n }else if(typeof data === 'symbol' || typeof data === 'function'){\n return '';\n }else if(typeof data === 'string'){\n return '\"'+ data +'\"';\n }else if(typeof data === 'number'){\n return String(data);\n }else if(Array.isArray(data)){\n \n return '[' + data.reduce(function(acc, cur){\n if(cur === undefined)\n return [...acc,'null'];\n else\n return [...acc, stringifyJSON(cur)]\n },[]).join(',') + ']';\n \n }else if(typeof data === 'boolean'){\n return data ? 'true' : 'false';\n }else if(typeof data === 'object'){\n return '{' + Object.keys(data).reduce(function(acc, k){\n if(data[k] === undefined)\n return acc;\n else{\n if(k === 'functions')\n return [...acc, stringifyJSON(data[k])];\n else\n return [...acc, stringifyJSON(k) + ':' + stringifyJSON(data[k])];\n }\n \n }, []).join(',') + '}';\n \n }else{\n return '{}';\n }\n }", "function safeSerialize(obj) {\n var str;\n try {\n var seenObjects_1 = [];\n str = JSON.stringify(obj, function (key, value) {\n if (value === window) {\n return '[window]';\n }\n else if (value instanceof HTMLElement) {\n return '[HTMLElement]';\n }\n else if (typeof value === 'function') {\n return '[function]';\n }\n else if (typeof value === 'object') {\n if (value === null) {\n return value;\n }\n else if (seenObjects_1.indexOf(value) === -1) {\n seenObjects_1.push(value);\n return value;\n }\n else {\n return '[circular]';\n }\n }\n else {\n return value;\n }\n });\n }\n catch (err) {\n // Note: we make this be a JSON string, so that consumers\n // can always call JSON.parse.\n str = JSON.stringify('[object]');\n }\n return str;\n}", "function getTranslationString_JSON(obj) {\n\tfor (key in obj) {\n\t obj[key].description = addSlashes(obj[key].description);\n\t obj[key].value = addSlashes(obj[key].value);\n }\n return FormatJSON(obj);\n}", "function serializer() {\n var stack = [];\n var keys = [];\n var cycleReplacer = function (_, value) {\n if (stack[0] === value) {\n return '[Circular ~]';\n }\n return \"[Circular ~.\" + keys.slice(0, stack.indexOf(value)).join('.') + \"]\";\n };\n return function (key, value) {\n var currentValue = value;\n // NaN and undefined are not JSON.parseable, but we want to preserve this information\n if (is_1.isNaN(value)) {\n currentValue = NAN_VALUE;\n }\n else if (is_1.isUndefined(value)) {\n currentValue = UNDEFINED_VALUE;\n }\n if (stack.length > 0) {\n var thisPos = stack.indexOf(this);\n if (thisPos !== -1) {\n stack.splice(thisPos + 1);\n keys.splice(thisPos, Infinity, key);\n }\n else {\n stack.push(this);\n keys.push(key);\n }\n if (stack.indexOf(currentValue) !== -1) {\n currentValue = cycleReplacer.call(this, key, currentValue);\n }\n }\n else {\n stack.push(currentValue);\n }\n return currentValue instanceof Error ? objectifyError(currentValue) : currentValue;\n };\n}", "function toJSON(obj) { \n\treturn gadgets.json.stringify(obj); \n}", "function prettyJson(obj) {\n return JSON.stringify(obj).replace(/(\"id\"|\"memo\"|\"errors\"|\"invoiceNos\"|\"invoiceAmts\"|\"total\"|\"totalType\"|\"amt\"|\"bank\"|\"account\"|\"submitted\"|\"attachments\"|\"date\"|\"amts\"|\"inEmail\"|\"percents\"|\"classes\"|\"accounts\"|\"vendors\"|\"exact\"|\"from\")/g, '\\n $1').replace(/}/g, '\\n}') //.replace(/\\[\\n */g, '[ ').replace(/\\n *\\]/g, ' ]').replace(/([^\\]],)\\n */g, '$1')\n}", "function jstr(obj) {\n\n return JSON.stringify(obj);\n}", "function jsonStringifyCircs(object, space) {\n var cache = [];\n function turnCircsToStrings(key, value) {\n if (typeof(value) === 'object' && value !== null && arrayContains(cache, value)) {\n return \"circular: \"+key;\n // return null;\n }\n return value;\n }\n var jsonString = JSON.stringify(object, turnCircsToStrings, space);\n cache = null; // for GC\n return jsonString;\n}", "function packJS(o)\n{\n var s = '';\n\n if (_.isDate(o))\n {\n s += 'new Date(' + JSON.stringify(o) + ')';\n }\n else if (_.isArray(o))\n {\n s += '[';\n for (var i = 0; i < o.length; i++)\n {\n if (i > 0) s += ',';\n s += packJS(o[i]);\n }\n s += ']';\n }\n else if (_.isFunction(o))\n {\n s += o.toString();\n }\n else if (_.isObject(o))\n {\n var inner = '';\n\n for (var prop in o)\n {\n if (inner.length > 0) inner += ',';\n inner += '\\\"' + prop + '\\\"' + ':' + packJS(o[prop]);\n }\n\n s += '{' + inner + '}';\n }\n else s += JSON.stringify(o);\n\n return s;\n}", "function encodeJSON(options) {\n return btoa(JSON.stringify(options));\n}", "function stringifySimple (key, value) {\n var i, res\n switch (typeof value) {\n case 'object':\n if (value === null) {\n return 'null'\n }\n if (typeof value.toJSON === 'function') {\n value = value.toJSON(key)\n // Prevent calling `toJSON` again\n if (typeof value !== 'object') {\n return stringifySimple(key, value)\n }\n if (value === null) {\n return 'null'\n }\n }\n\n if (Array.isArray(value)) {\n if (value.length === 0) {\n return '[]'\n }\n res = '['\n // Use null as placeholder for non-JSON values.\n for (i = 0; i < value.length - 1; i++) {\n const tmp = stringifySimple(i, value[i])\n res += tmp !== undefined ? tmp : 'null'\n res += ','\n }\n const tmp = stringifySimple(i, value[i])\n res += tmp !== undefined ? tmp : 'null'\n res += ']'\n return res\n }\n\n const keys = insertSort(Object.keys(value))\n if (keys.length === 0) {\n return '{}'\n }\n res = '{'\n for (i = 0; i < keys.length - 1; i++) {\n key = keys[i]\n const tmp = stringifySimple(key, value[key])\n if (tmp !== undefined) {\n res += `\"${strEscape(key)}\":${tmp},`\n }\n }\n key = keys[i]\n const tmp = stringifySimple(key, value[key])\n if (tmp !== undefined) {\n res += `\"${strEscape(key)}\":${tmp}`\n }\n res += '}'\n return res\n case 'string':\n return `\"${strEscape(value)}\"`\n case 'number':\n // JSON numbers must be finite. Encode non-finite numbers as null.\n // Convert the numbers implicit to a string instead of explicit.\n return isFinite(value) ? String(value) : 'null'\n case 'boolean':\n return value === true ? 'true' : 'false'\n }\n}", "function serialize (obj) {\r\n var res;\r\n \r\n res = JSON.stringify(obj, function (k, v) {\r\n checkKey(k, v);\r\n \r\n if (v === undefined) { return undefined; }\r\n if (v === null) { return null; }\r\n\r\n // Hackish way of checking if object is Date (this way it works between execution contexts in node-webkit).\r\n // We can't use value directly because for dates it is already string in this function (date.toJSON was already called), so we use this\r\n if (typeof this[k].getTime === 'function') { return { $$date: this[k].getTime() }; }\r\n\r\n return v;\r\n });\r\n\r\n return res;\r\n}", "function serialize(obj) {\n var res;\n\n res = JSON.stringify(obj, function(k, v) {\n checkKey(k, v);\n\n if (v === undefined) {\n return undefined;\n }\n if (v === null) {\n return null;\n }\n\n // Hackish way of checking if object is Date (this way it works between execution contexts in node-webkit).\n // We can't use value directly because for dates it is already string in this function (date.toJSON was already called), so we use this\n if (typeof this[k].getTime === 'function') {\n return { $$date: this[k].getTime() };\n }\n\n return v;\n });\n\n return res;\n}", "function canonicalize(obj, stack, replacementStack) {\n stack = stack || [];\n replacementStack = replacementStack || [];\n\n var i = /*istanbul ignore start*/void 0 /*istanbul ignore end*/;\n\n for (i = 0; i < stack.length; i += 1) {\n if (stack[i] === obj) {\n return replacementStack[i];\n }\n }\n\n var canonicalizedObj = /*istanbul ignore start*/void 0 /*istanbul ignore end*/;\n\n if ('[object Array]' === objectPrototypeToString.call(obj)) {\n stack.push(obj);\n canonicalizedObj = new Array(obj.length);\n replacementStack.push(canonicalizedObj);\n for (i = 0; i < obj.length; i += 1) {\n canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack);\n }\n stack.pop();\n replacementStack.pop();\n return canonicalizedObj;\n }\n\n if (obj && obj.toJSON) {\n obj = obj.toJSON();\n }\n\n if ( /*istanbul ignore start*/(typeof /*istanbul ignore end*/obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && obj !== null) {\n stack.push(obj);\n canonicalizedObj = {};\n replacementStack.push(canonicalizedObj);\n var sortedKeys = [],\n key = /*istanbul ignore start*/void 0 /*istanbul ignore end*/;\n for (key in obj) {\n /* istanbul ignore else */\n if (obj.hasOwnProperty(key)) {\n sortedKeys.push(key);\n }\n }\n sortedKeys.sort();\n for (i = 0; i < sortedKeys.length; i += 1) {\n key = sortedKeys[i];\n canonicalizedObj[key] = canonicalize(obj[key], stack, replacementStack);\n }\n stack.pop();\n replacementStack.pop();\n } else {\n canonicalizedObj = obj;\n }\n return canonicalizedObj;\n}", "stringify (object) {\n const seen = new Map\n const replacements = new Map\n function visit (path, value) {\n switch (typeof value) {\n case 'object': {\n if (value != null) {\n const reference = seen.get(value)\n if (reference != null) {\n replacements.set(value, '_reference')\n } else {\n seen.set(value, path)\n if (Array.isArray(value)) {\n const array = []\n if (\n typeof value[0] == 'string' &&\n /^_reference|_array|_undefined$/.test(value[0])\n ) {\n replacements.set(value, [ '_array' ].concat(value))\n }\n } else if (value instanceof Error && ! (value instanceof Interrupt && value === object)) {\n const error = { message: value.message }\n for (const key in value) {\n error[key] = value[key]\n }\n replacements.set(value, error)\n } else {\n for (const property in value) {\n visit(path.concat(property), value[property])\n }\n }\n }\n }\n }\n default:\n return value\n }\n }\n const referenced = visit([], object)\n return JSON.stringify(referenced, function (index, value) {\n if (typeof value === 'undefined') {\n return [ '_undefined' ]\n }\n if (typeof value === 'function' || typeof value === 'symbol') {\n return value.toString()\n }\n if (typeof value == 'object' && value != null) {\n const replacement = replacements.get(value)\n if (replacement != null) {\n if (replacement === '_reference') {\n const path = seen.get(value)\n const origin = {\n object: get(object, path.slice(0, path.length - 1)),\n index: path[path.length - 1]\n }\n if (origin.object === this && origin.index === index) {\n return value\n }\n return [ '_reference', path ]\n }\n return replacement\n }\n }\n return value\n }, 4)\n }", "function stringify(obj, maxDepth) {\n return JSON.stringify(obj, replacer(maxDepth));\n }", "function stringify(o) {\n if(null === o) return 'null'\n if('symbol' === typeof o) return String(o)\n if('object' !== typeof o) return ''+o\n return JSON.stringify(\n Object.keys(o)\n .sort()\n .reduce((a,k)=>(a[k]=o[k],a),{}),\n stringify) // Recusively!\n}", "json(obj) {\n return this.string(JSON.stringify(obj));\n }", "function canonicalize(obj, stack, replacementStack) {\n stack = stack || [];\n replacementStack = replacementStack || [];\n\n var i = /*istanbul ignore start*/void 0;\n\n for (i = 0; i < stack.length; i += 1) {\n if (stack[i] === obj) {\n return replacementStack[i];\n }\n }\n\n var canonicalizedObj = /*istanbul ignore start*/void 0;\n\n if ('[object Array]' === objectPrototypeToString.call(obj)) {\n stack.push(obj);\n canonicalizedObj = new Array(obj.length);\n replacementStack.push(canonicalizedObj);\n for (i = 0; i < obj.length; i += 1) {\n canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack);\n }\n stack.pop();\n replacementStack.pop();\n return canonicalizedObj;\n }\n\n if (obj && obj.toJSON) {\n obj = obj.toJSON();\n }\n\n if ( /*istanbul ignore start*/(typeof /*istanbul ignore end*/obj === 'undefined' ? 'undefined' : _typeof$$1(obj)) === 'object' && obj !== null) {\n stack.push(obj);\n canonicalizedObj = {};\n replacementStack.push(canonicalizedObj);\n var sortedKeys = [],\n key = /*istanbul ignore start*/void 0;\n for (key in obj) {\n /* istanbul ignore else */\n if (obj.hasOwnProperty(key)) {\n sortedKeys.push(key);\n }\n }\n sortedKeys.sort();\n for (i = 0; i < sortedKeys.length; i += 1) {\n key = sortedKeys[i];\n canonicalizedObj[key] = canonicalize(obj[key], stack, replacementStack);\n }\n stack.pop();\n replacementStack.pop();\n } else {\n canonicalizedObj = obj;\n }\n return canonicalizedObj;\n }", "function urlEncode(object) {\r\n return Object.keys(object).map(\r\n // tslint:disable-next-line:no-unsafe-any\r\n function (key) {\r\n return encodeURIComponent(key) + \"=\" + encodeURIComponent(object[key]);\r\n }).join('&');\r\n}", "function escapeJSON (str) {\n//\tconsole.log(\"Removing \\\" from \" + str);\n return str.replace(/\\\\/gi,'');\n}", "function stringify($object) {\r\n try {\r\n if (this['uneval']) return uneval($object); //Firefox\r\n else if (this['JSON']) {\r\n if (typeof $object == 'object') return '('+JSON.stringify($object)+')';\r\n else return JSON.stringify($object);\r\n } //Chrome/Opera\r\n }\r\n catch (ex) { ; }\r\n}", "function encode(toEncode) {\n\tvar result = null;\n\n\tvar type = typeof toEncode;\n\tif (type == 'object') {\n\t if ('list' in toEncode) {\n\t\tresult = encodeList(toEncode);\n\t }\n\t else {\n\t\tthrow new Error(\"Unsupported object\");\n\t }\n\t}\n\telse if (type == 'number') {\n\t result = encodeNumber(toEncode);\n\t}\n\telse {\n\t throw new Error(\"Unsupported type \" + type);\n\t}\n\treturn result;\n }", "function stringify(o, simple) {\n var json = '', i, type = ({}).toString.call(o), parts = [];\n \n if (type == '[object String]') {\n json = '\"' + o.replace(/\"/g, '\\\\\"') + '\"';\n } else if (type == '[object Array]') {\n json = '[';\n for (i = 0; i < o.length; i++) {\n parts.push(stringify(o[i]));\n }\n json += parts.join(', ') + ']';\n json;\n } else if (type == '[object Object]') {\n json = '{';\n for (i in o) {\n parts.push(stringify(i) + ': ' + stringify(o[i]));\n }\n json += parts.join(', ') + '}';\n } else if (type == '[object Number]') {\n json = o+'';\n } else if (type == '[object Boolean]') {\n json = o ? 'true' : 'false';\n } else if (type == '[object Function]') {\n json = o.toString();\n } else if (o == null) {\n json = 'null';\n } else if (o == undefined) {\n json = 'undefined';\n } else if (simple == undefined) {\n json = o.toString() + '{\\n';\n for (i in o) {\n parts.push(i + ': ' + stringify(o[i], true));\n }\n json += parts.join(',\\n') + '\\n}';\n } else {\n json = '\"' + o + '\"';\n }\n return json.replace(/\\n/g, '\\\\n');\n}", "function urlEncode(object) {\n return Object.keys(object)\n .map(\n // tslint:disable-next-line:no-unsafe-any\n function (key) { return encodeURIComponent(key) + \"=\" + encodeURIComponent(object[key]); })\n .join('&');\n}", "function urlEncode(object) {\n return Object.keys(object)\n .map(\n // tslint:disable-next-line:no-unsafe-any\n function (key) { return encodeURIComponent(key) + \"=\" + encodeURIComponent(object[key]); })\n .join('&');\n}", "static objectToTrytes(obj) {\n const json = JSON.stringify(obj);\n const encoded = TextHelper.encodeNonASCII(json);\n return encoded ? TrytesHelper.fromAscii(encoded) : \"\";\n }", "toJSON() {\n var json = {};\n var self = this;\n if (typeof this.asBigInteger !== 'undefined') {\n json['asBigInteger'] = this.asBigInteger;\n }\n if (typeof this.asCharacter !== 'undefined') {\n json['asCharacter'] = this.asCharacter;\n }\n if (typeof this.asBoolean !== 'undefined') {\n json['asBoolean'] = this.asBoolean;\n }\n if (typeof this.asInt !== 'undefined') {\n json['asInt'] = this.asInt;\n }\n if (typeof this.jsonArray !== 'undefined') {\n json['jsonArray'] = this.jsonArray;\n }\n if (typeof this.jsonObject !== 'undefined') {\n json['jsonObject'] = this.jsonObject;\n }\n if (typeof this.asDouble !== 'undefined') {\n json['asDouble'] = this.asDouble;\n }\n if (typeof this.asString !== 'undefined') {\n json['asString'] = this.asString;\n }\n if (typeof this.asFloat !== 'undefined') {\n json['asFloat'] = this.asFloat;\n }\n if (typeof this.asJsonPrimitive !== 'undefined') {\n json['asJsonPrimitive'] = this.asJsonPrimitive.toJSON();\n }\n if (typeof this.asJsonObject !== 'undefined') {\n json['asJsonObject'] = this.asJsonObject.toJSON();\n }\n if (typeof this.asJsonArray !== 'undefined') {\n json['asJsonArray'] = this.asJsonArray.toJSON();\n }\n if (typeof this.asByte !== 'undefined') {\n json['asByte'] = this.asByte;\n }\n if (typeof this.asNumber !== 'undefined') {\n json['asNumber'] = this.asNumber.toJSON();\n }\n if (typeof this.jsonNull !== 'undefined') {\n json['jsonNull'] = this.jsonNull;\n }\n if (typeof this.asLong !== 'undefined') {\n json['asLong'] = this.asLong;\n }\n if (typeof this.asBigDecimal !== 'undefined') {\n json['asBigDecimal'] = this.asBigDecimal;\n }\n if (typeof this.asShort !== 'undefined') {\n json['asShort'] = this.asShort;\n }\n if (typeof this.jsonPrimitive !== 'undefined') {\n json['jsonPrimitive'] = this.jsonPrimitive;\n }\n if (typeof this.asJsonNull !== 'undefined') {\n json['asJsonNull'] = this.asJsonNull.toJSON();\n }\n return json;\n }", "function toJSON(rootObject, replacer, spacer) {\n var cache = [];\n var plainJavaScriptObject = ko.toJS(rootObject);\n var replacerFunction = replacer || cycleReplacer;\n var output = ko.utils.stringifyJson(plainJavaScriptObject, replacerFunction, spacer || 2);\n cache = null;\n return output;\n\n function cycleReplacer(key, value) {\n if (typeof value === 'object' && value !== null) {\n if (cache.indexOf(value) !== -1) {\n return; // cycle is found, skip it\n }\n cache.push(value);\n }\n return value;\n }\n}", "function _stringify(o,w,space) {\n if (o === undefined) {\n return undefined;\n }\n\n var replacer = isFunction(w) ? w : null,\n format = _toStr.call(space).match(/String|Number/) || [],\n _date = YAHOO.lang.JSON.dateToString,\n stack = [],\n tmp,i,len;\n\n if (replacer || !isArray(w)) {\n w = undefined;\n }\n\n // Ensure whitelist keys are unique (bug 2110391)\n if (w) {\n tmp = {};\n for (i = 0, len = w.length; i < len; ++i) {\n tmp[w[i]] = true;\n }\n w = tmp;\n }\n\n // Per the spec, strings are truncated to 10 characters and numbers\n // are converted to that number of spaces (max 10)\n space = format[0] === 'Number' ?\n new Array(Math.min(Math.max(0,space),10)+1).join(\" \") :\n (space || EMPTY).slice(0,10);\n\n function _serialize(h,key) {\n var value = h[key],\n t = _type(value),\n a = [],\n colon = space ? COLON_SP : COLON,\n arr, i, keys, k, v;\n\n // Per the ECMA 5 spec, toJSON is applied before the replacer is\n // called. Also per the spec, Date.prototype.toJSON has been added, so\n // Date instances should be serialized prior to exposure to the\n // replacer. I disagree with this decision, but the spec is the spec.\n if (isObject(value) && isFunction(value.toJSON)) {\n value = value.toJSON(key);\n } else if (t === DATE) {\n value = _date(value);\n }\n\n if (isFunction(replacer)) {\n value = replacer.call(h,key,value);\n }\n\n if (value !== h[key]) {\n t = _type(value);\n }\n\n switch (t) {\n case DATE : // intentional fallthrough. Pre-replacer Dates are\n // serialized in the toJSON stage. Dates here would\n // have been produced by the replacer.\n case OBJECT : break;\n case STRING : return _string(value);\n case NUMBER : return isFinite(value) ? value+EMPTY : NULL;\n case BOOLEAN : return value+EMPTY;\n case NULL : return NULL;\n default : return undefined;\n }\n\n // Check for cyclical references in nested objects\n for (i = stack.length - 1; i >= 0; --i) {\n if (stack[i] === value) {\n throw new Error(\"JSON.stringify. Cyclical reference\");\n }\n }\n\n arr = isArray(value);\n\n // Add the object to the processing stack\n stack.push(value);\n\n if (arr) { // Array\n for (i = value.length - 1; i >= 0; --i) {\n a[i] = _serialize(value, i) || NULL;\n }\n } else { // Object\n // If whitelist provided, take only those keys\n keys = w || value;\n i = 0;\n\n for (k in keys) {\n if (l.hasOwnProperty(keys, k)) {\n v = _serialize(value, k);\n if (v) {\n a[i++] = _string(k) + colon + v;\n }\n }\n }\n }\n\n // remove the array from the stack\n stack.pop();\n\n if (space && a.length) {\n return arr ?\n OPEN_A + CR + _indent(a.join(COMMA_CR), space) + CR + CLOSE_A :\n OPEN_O + CR + _indent(a.join(COMMA_CR), space) + CR + CLOSE_O;\n } else {\n return arr ?\n OPEN_A + a.join(COMMA) + CLOSE_A :\n OPEN_O + a.join(COMMA) + CLOSE_O;\n }\n }\n\n // process the input\n return _serialize({'':o},'');\n}", "function jsonPrettyFromObject(object) {\n return JSON.stringify(object, undefined, 2);\n}", "function stringify(o, simple) {\n var json = '', i, type = ({}).toString.call(o), parts = [];\n \n if (type == '[object String]') {\n json = '\"' + o.replace(/\"/g, '\\\\\"') + '\"';\n } else if (type == '[object Array]') {\n json = '[';\n for (i = 0; i < o.length; i++) {\n parts.push(stringify(o[i]));\n }\n json += parts.join(', ') + ']';\n json;\n } else if (type == '[object Object]') {\n json = '{';\n for (i in o) {\n parts.push(stringify(i) + ': ' + stringify(o[i]));\n }\n json += parts.join(', ') + '}';\n } else if (type == '[object Number]') {\n json = o+'';\n } else if (type == '[object Boolean]') {\n json = o ? 'true' : 'false';\n } else if (type == '[object Function]') {\n json = o.toString();\n } else if (o === null) {\n json = 'null';\n } else if (o === undefined) {\n json = 'undefined';\n } else if (simple == undefined) {\n json = type + '{\\n';\n for (i in o) {\n parts.push(i + ': ' + stringify(o[i], true)); // safety from max stack\n }\n json += parts.join(',\\n') + '\\n}';\n } else {\n json = o+''; // should look like an object\n }\n return json;\n}", "function stringifyJson (object) {\n try {\n var json_string = JSON.stringify(object);\n return json_string;\n } catch (e) {\n return JSON.stringify({});\n }\n }", "function stableStringify (data, opts) {\n if(!opts) opts = {};\n if(typeof opts === 'function') opts = { cmp: opts };\n let cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false;\n\n let cmp = opts.cmp && (function (f) {\n return function (node) {\n return function (a, b) {\n const aobj = { key: a, value: node[a] };\n const bobj = { key: b, value: node[b] };\n return f(aobj, bobj);\n };\n };\n })(opts.cmp);\n\n let seen = [];\n return (function stringify (node) {\n if(node && node.toJSON && typeof node.toJSON === 'function') {\n node = node.toJSON();\n }\n\n if(node === undefined) return;\n if(typeof node == 'number') return isFinite(node) ? '' + node : 'null';\n if(typeof node !== 'object') return JSON.stringify(node);\n\n let i, out;\n if(Array.isArray(node)) {\n out = '[';\n for (i = 0; i < node.length; i++) {\n if(i) out += ',';\n out += stringify(node[i]) || 'null';\n }\n return out + ']';\n }\n\n if(node === null) return 'null';\n\n if(seen.indexOf(node) !== -1) {\n if(cycles) return JSON.stringify('__cycle__');\n throw new TypeError('Converting circular structure to JSON');\n }\n\n let seenIndex = seen.push(node) - 1;\n let keys = Object.keys(node).sort(cmp && cmp(node));\n out = '';\n for (i = 0; i < keys.length; i++) {\n let key = keys[i];\n let value = stringify(node[key]);\n\n if(!value) continue;\n if(out) out += ',';\n out += JSON.stringify(key) + ':' + value;\n }\n seen.splice(seenIndex, 1);\n return '{' + out + '}';\n })(data);\n }", "function jsonEscape(str) {\n var esc = JSON.stringify(str);\n return esc.slice(1, esc.length - 1);\n}", "function stringify(obj, maxDepth) {\n return JSON.stringify(obj, replacer(maxDepth));\n}", "function serialize(obj) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var prefix = arguments[2];\n\n var str = [];\n var useArraySyntax = false;\n\n if ((0, _isArray2.default)(obj) && (0, _object.isDefined)(prefix)) {\n useArraySyntax = true;\n }\n\n Object.keys(obj).forEach(function (prop) {\n var query = void 0;\n var val = obj[prop];\n\n var key = prefix ? prefix + '[' + (useArraySyntax ? '' : prop) + ']' : prop;\n\n if ((0, _object.isDefined)(val) === false) {\n if (options.removeNull === true) {\n return;\n }\n\n query = options.encodeComponents === true ? encodeURIComponent(key) : key;\n } else if ((0, _isPlainObject2.default)(val)) {\n query = serialize(val, options, key);\n } else {\n query = options.encodeComponents ? encodeURIComponent(key) + '=' + encodeURIComponent(val) : key + '=' + val;\n }\n\n str.push(query);\n });\n\n return str.join('&');\n}", "function canonicalize(obj, stack, replacementStack) {\n\t stack = stack || [];\n\t replacementStack = replacementStack || [];\n\n\t var i = /*istanbul ignore start*/void 0 /*istanbul ignore end*/;\n\n\t for (i = 0; i < stack.length; i += 1) {\n\t if (stack[i] === obj) {\n\t return replacementStack[i];\n\t }\n\t }\n\n\t var canonicalizedObj = /*istanbul ignore start*/void 0 /*istanbul ignore end*/;\n\n\t if ('[object Array]' === objectPrototypeToString.call(obj)) {\n\t stack.push(obj);\n\t canonicalizedObj = new Array(obj.length);\n\t replacementStack.push(canonicalizedObj);\n\t for (i = 0; i < obj.length; i += 1) {\n\t canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack);\n\t }\n\t stack.pop();\n\t replacementStack.pop();\n\t return canonicalizedObj;\n\t }\n\n\t if (obj && obj.toJSON) {\n\t obj = obj.toJSON();\n\t }\n\n\t if ( /*istanbul ignore start*/(typeof /*istanbul ignore end*/obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && obj !== null) {\n\t stack.push(obj);\n\t canonicalizedObj = {};\n\t replacementStack.push(canonicalizedObj);\n\t var sortedKeys = [],\n\t key = /*istanbul ignore start*/void 0 /*istanbul ignore end*/;\n\t for (key in obj) {\n\t /* istanbul ignore else */\n\t if (obj.hasOwnProperty(key)) {\n\t sortedKeys.push(key);\n\t }\n\t }\n\t sortedKeys.sort();\n\t for (i = 0; i < sortedKeys.length; i += 1) {\n\t key = sortedKeys[i];\n\t canonicalizedObj[key] = canonicalize(obj[key], stack, replacementStack);\n\t }\n\t stack.pop();\n\t replacementStack.pop();\n\t } else {\n\t canonicalizedObj = obj;\n\t }\n\t return canonicalizedObj;\n\t}", "function canonicalize(obj, stack, replacementStack) {\n\t stack = stack || [];\n\t replacementStack = replacementStack || [];\n\n\t var i = /*istanbul ignore start*/void 0 /*istanbul ignore end*/;\n\n\t for (i = 0; i < stack.length; i += 1) {\n\t if (stack[i] === obj) {\n\t return replacementStack[i];\n\t }\n\t }\n\n\t var canonicalizedObj = /*istanbul ignore start*/void 0 /*istanbul ignore end*/;\n\n\t if ('[object Array]' === objectPrototypeToString.call(obj)) {\n\t stack.push(obj);\n\t canonicalizedObj = new Array(obj.length);\n\t replacementStack.push(canonicalizedObj);\n\t for (i = 0; i < obj.length; i += 1) {\n\t canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack);\n\t }\n\t stack.pop();\n\t replacementStack.pop();\n\t return canonicalizedObj;\n\t }\n\n\t if (obj && obj.toJSON) {\n\t obj = obj.toJSON();\n\t }\n\n\t if ( /*istanbul ignore start*/(typeof /*istanbul ignore end*/obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && obj !== null) {\n\t stack.push(obj);\n\t canonicalizedObj = {};\n\t replacementStack.push(canonicalizedObj);\n\t var sortedKeys = [],\n\t key = /*istanbul ignore start*/void 0 /*istanbul ignore end*/;\n\t for (key in obj) {\n\t /* istanbul ignore else */\n\t if (obj.hasOwnProperty(key)) {\n\t sortedKeys.push(key);\n\t }\n\t }\n\t sortedKeys.sort();\n\t for (i = 0; i < sortedKeys.length; i += 1) {\n\t key = sortedKeys[i];\n\t canonicalizedObj[key] = canonicalize(obj[key], stack, replacementStack);\n\t }\n\t stack.pop();\n\t replacementStack.pop();\n\t } else {\n\t canonicalizedObj = obj;\n\t }\n\t return canonicalizedObj;\n\t}", "function canonicalize(obj, stack, replacementStack) {\n\t stack = stack || [];\n\t replacementStack = replacementStack || [];\n\n\t var i = /*istanbul ignore start*/void 0 /*istanbul ignore end*/;\n\n\t for (i = 0; i < stack.length; i += 1) {\n\t if (stack[i] === obj) {\n\t return replacementStack[i];\n\t }\n\t }\n\n\t var canonicalizedObj = /*istanbul ignore start*/void 0 /*istanbul ignore end*/;\n\n\t if ('[object Array]' === objectPrototypeToString.call(obj)) {\n\t stack.push(obj);\n\t canonicalizedObj = new Array(obj.length);\n\t replacementStack.push(canonicalizedObj);\n\t for (i = 0; i < obj.length; i += 1) {\n\t canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack);\n\t }\n\t stack.pop();\n\t replacementStack.pop();\n\t return canonicalizedObj;\n\t }\n\n\t if (obj && obj.toJSON) {\n\t obj = obj.toJSON();\n\t }\n\n\t if ( /*istanbul ignore start*/(typeof /*istanbul ignore end*/obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && obj !== null) {\n\t stack.push(obj);\n\t canonicalizedObj = {};\n\t replacementStack.push(canonicalizedObj);\n\t var sortedKeys = [],\n\t key = /*istanbul ignore start*/void 0 /*istanbul ignore end*/;\n\t for (key in obj) {\n\t /* istanbul ignore else */\n\t if (obj.hasOwnProperty(key)) {\n\t sortedKeys.push(key);\n\t }\n\t }\n\t sortedKeys.sort();\n\t for (i = 0; i < sortedKeys.length; i += 1) {\n\t key = sortedKeys[i];\n\t canonicalizedObj[key] = canonicalize(obj[key], stack, replacementStack);\n\t }\n\t stack.pop();\n\t replacementStack.pop();\n\t } else {\n\t canonicalizedObj = obj;\n\t }\n\t return canonicalizedObj;\n\t}", "function canonicalize(obj, stack, replacementStack) {\n\t stack = stack || [];\n\t replacementStack = replacementStack || [];\n\n\t var i = /*istanbul ignore start*/void 0 /*istanbul ignore end*/;\n\n\t for (i = 0; i < stack.length; i += 1) {\n\t if (stack[i] === obj) {\n\t return replacementStack[i];\n\t }\n\t }\n\n\t var canonicalizedObj = /*istanbul ignore start*/void 0 /*istanbul ignore end*/;\n\n\t if ('[object Array]' === objectPrototypeToString.call(obj)) {\n\t stack.push(obj);\n\t canonicalizedObj = new Array(obj.length);\n\t replacementStack.push(canonicalizedObj);\n\t for (i = 0; i < obj.length; i += 1) {\n\t canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack);\n\t }\n\t stack.pop();\n\t replacementStack.pop();\n\t return canonicalizedObj;\n\t }\n\n\t if (obj && obj.toJSON) {\n\t obj = obj.toJSON();\n\t }\n\n\t if ( /*istanbul ignore start*/(typeof /*istanbul ignore end*/obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && obj !== null) {\n\t stack.push(obj);\n\t canonicalizedObj = {};\n\t replacementStack.push(canonicalizedObj);\n\t var sortedKeys = [],\n\t key = /*istanbul ignore start*/void 0 /*istanbul ignore end*/;\n\t for (key in obj) {\n\t /* istanbul ignore else */\n\t if (obj.hasOwnProperty(key)) {\n\t sortedKeys.push(key);\n\t }\n\t }\n\t sortedKeys.sort();\n\t for (i = 0; i < sortedKeys.length; i += 1) {\n\t key = sortedKeys[i];\n\t canonicalizedObj[key] = canonicalize(obj[key], stack, replacementStack);\n\t }\n\t stack.pop();\n\t replacementStack.pop();\n\t } else {\n\t canonicalizedObj = obj;\n\t }\n\t return canonicalizedObj;\n\t}", "function canonicalize(obj, stack, replacementStack, replacer, key) {\n stack = stack || [];\n replacementStack = replacementStack || [];\n\n if (replacer) {\n obj = replacer(key, obj);\n }\n\n var i = /*istanbul ignore start*/void 0 /*istanbul ignore end*/;\n\n for (i = 0; i < stack.length; i += 1) {\n if (stack[i] === obj) {\n return replacementStack[i];\n }\n }\n\n var canonicalizedObj = /*istanbul ignore start*/void 0 /*istanbul ignore end*/;\n\n if ('[object Array]' === objectPrototypeToString.call(obj)) {\n stack.push(obj);\n canonicalizedObj = new Array(obj.length);\n replacementStack.push(canonicalizedObj);\n for (i = 0; i < obj.length; i += 1) {\n canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, key);\n }\n stack.pop();\n replacementStack.pop();\n return canonicalizedObj;\n }\n\n if (obj && obj.toJSON) {\n obj = obj.toJSON();\n }\n\n if ( /*istanbul ignore start*/(typeof /*istanbul ignore end*/obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && obj !== null) {\n stack.push(obj);\n canonicalizedObj = {};\n replacementStack.push(canonicalizedObj);\n var sortedKeys = [],\n _key = /*istanbul ignore start*/void 0 /*istanbul ignore end*/;\n for (_key in obj) {\n /* istanbul ignore else */\n if (obj.hasOwnProperty(_key)) {\n sortedKeys.push(_key);\n }\n }\n sortedKeys.sort();\n for (i = 0; i < sortedKeys.length; i += 1) {\n _key = sortedKeys[i];\n canonicalizedObj[_key] = canonicalize(obj[_key], stack, replacementStack, replacer, _key);\n }\n stack.pop();\n replacementStack.pop();\n } else {\n canonicalizedObj = obj;\n }\n return canonicalizedObj;\n}", "function canonicalize(obj, stack, replacementStack, replacer, key) {\n stack = stack || [];\n replacementStack = replacementStack || [];\n\n if (replacer) {\n obj = replacer(key, obj);\n }\n\n var i = /*istanbul ignore start*/void 0 /*istanbul ignore end*/;\n\n for (i = 0; i < stack.length; i += 1) {\n if (stack[i] === obj) {\n return replacementStack[i];\n }\n }\n\n var canonicalizedObj = /*istanbul ignore start*/void 0 /*istanbul ignore end*/;\n\n if ('[object Array]' === objectPrototypeToString.call(obj)) {\n stack.push(obj);\n canonicalizedObj = new Array(obj.length);\n replacementStack.push(canonicalizedObj);\n for (i = 0; i < obj.length; i += 1) {\n canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, key);\n }\n stack.pop();\n replacementStack.pop();\n return canonicalizedObj;\n }\n\n if (obj && obj.toJSON) {\n obj = obj.toJSON();\n }\n\n if ( /*istanbul ignore start*/(typeof /*istanbul ignore end*/obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && obj !== null) {\n stack.push(obj);\n canonicalizedObj = {};\n replacementStack.push(canonicalizedObj);\n var sortedKeys = [],\n _key = /*istanbul ignore start*/void 0 /*istanbul ignore end*/;\n for (_key in obj) {\n /* istanbul ignore else */\n if (obj.hasOwnProperty(_key)) {\n sortedKeys.push(_key);\n }\n }\n sortedKeys.sort();\n for (i = 0; i < sortedKeys.length; i += 1) {\n _key = sortedKeys[i];\n canonicalizedObj[_key] = canonicalize(obj[_key], stack, replacementStack, replacer, _key);\n }\n stack.pop();\n replacementStack.pop();\n } else {\n canonicalizedObj = obj;\n }\n return canonicalizedObj;\n}", "function canonicalize(obj, stack, replacementStack, replacer, key) {\n stack = stack || [];\n replacementStack = replacementStack || [];\n\n if (replacer) {\n obj = replacer(key, obj);\n }\n\n var i = /*istanbul ignore start*/void 0 /*istanbul ignore end*/;\n\n for (i = 0; i < stack.length; i += 1) {\n if (stack[i] === obj) {\n return replacementStack[i];\n }\n }\n\n var canonicalizedObj = /*istanbul ignore start*/void 0 /*istanbul ignore end*/;\n\n if ('[object Array]' === objectPrototypeToString.call(obj)) {\n stack.push(obj);\n canonicalizedObj = new Array(obj.length);\n replacementStack.push(canonicalizedObj);\n for (i = 0; i < obj.length; i += 1) {\n canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, key);\n }\n stack.pop();\n replacementStack.pop();\n return canonicalizedObj;\n }\n\n if (obj && obj.toJSON) {\n obj = obj.toJSON();\n }\n\n if ( /*istanbul ignore start*/(typeof /*istanbul ignore end*/obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && obj !== null) {\n stack.push(obj);\n canonicalizedObj = {};\n replacementStack.push(canonicalizedObj);\n var sortedKeys = [],\n _key = /*istanbul ignore start*/void 0 /*istanbul ignore end*/;\n for (_key in obj) {\n /* istanbul ignore else */\n if (obj.hasOwnProperty(_key)) {\n sortedKeys.push(_key);\n }\n }\n sortedKeys.sort();\n for (i = 0; i < sortedKeys.length; i += 1) {\n _key = sortedKeys[i];\n canonicalizedObj[_key] = canonicalize(obj[_key], stack, replacementStack, replacer, _key);\n }\n stack.pop();\n replacementStack.pop();\n } else {\n canonicalizedObj = obj;\n }\n return canonicalizedObj;\n}", "function canonicalize(obj, stack, replacementStack, replacer, key) {\n stack = stack || [];\n replacementStack = replacementStack || [];\n\n if (replacer) {\n obj = replacer(key, obj);\n }\n\n var i = /*istanbul ignore start*/void 0 /*istanbul ignore end*/;\n\n for (i = 0; i < stack.length; i += 1) {\n if (stack[i] === obj) {\n return replacementStack[i];\n }\n }\n\n var canonicalizedObj = /*istanbul ignore start*/void 0 /*istanbul ignore end*/;\n\n if ('[object Array]' === objectPrototypeToString.call(obj)) {\n stack.push(obj);\n canonicalizedObj = new Array(obj.length);\n replacementStack.push(canonicalizedObj);\n for (i = 0; i < obj.length; i += 1) {\n canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, key);\n }\n stack.pop();\n replacementStack.pop();\n return canonicalizedObj;\n }\n\n if (obj && obj.toJSON) {\n obj = obj.toJSON();\n }\n\n if ( /*istanbul ignore start*/(typeof /*istanbul ignore end*/obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && obj !== null) {\n stack.push(obj);\n canonicalizedObj = {};\n replacementStack.push(canonicalizedObj);\n var sortedKeys = [],\n _key = /*istanbul ignore start*/void 0 /*istanbul ignore end*/;\n for (_key in obj) {\n /* istanbul ignore else */\n if (obj.hasOwnProperty(_key)) {\n sortedKeys.push(_key);\n }\n }\n sortedKeys.sort();\n for (i = 0; i < sortedKeys.length; i += 1) {\n _key = sortedKeys[i];\n canonicalizedObj[_key] = canonicalize(obj[_key], stack, replacementStack, replacer, _key);\n }\n stack.pop();\n replacementStack.pop();\n } else {\n canonicalizedObj = obj;\n }\n return canonicalizedObj;\n}", "function canonicalize(obj, stack, replacementStack, replacer, key) {\n stack = stack || [];\n replacementStack = replacementStack || [];\n\n if (replacer) {\n obj = replacer(key, obj);\n }\n\n var i = /*istanbul ignore start*/void 0 /*istanbul ignore end*/;\n\n for (i = 0; i < stack.length; i += 1) {\n if (stack[i] === obj) {\n return replacementStack[i];\n }\n }\n\n var canonicalizedObj = /*istanbul ignore start*/void 0 /*istanbul ignore end*/;\n\n if ('[object Array]' === objectPrototypeToString.call(obj)) {\n stack.push(obj);\n canonicalizedObj = new Array(obj.length);\n replacementStack.push(canonicalizedObj);\n for (i = 0; i < obj.length; i += 1) {\n canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, key);\n }\n stack.pop();\n replacementStack.pop();\n return canonicalizedObj;\n }\n\n if (obj && obj.toJSON) {\n obj = obj.toJSON();\n }\n\n if ( /*istanbul ignore start*/(typeof /*istanbul ignore end*/obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && obj !== null) {\n stack.push(obj);\n canonicalizedObj = {};\n replacementStack.push(canonicalizedObj);\n var sortedKeys = [],\n _key = /*istanbul ignore start*/void 0 /*istanbul ignore end*/;\n for (_key in obj) {\n /* istanbul ignore else */\n if (obj.hasOwnProperty(_key)) {\n sortedKeys.push(_key);\n }\n }\n sortedKeys.sort();\n for (i = 0; i < sortedKeys.length; i += 1) {\n _key = sortedKeys[i];\n canonicalizedObj[_key] = canonicalize(obj[_key], stack, replacementStack, replacer, _key);\n }\n stack.pop();\n replacementStack.pop();\n } else {\n canonicalizedObj = obj;\n }\n return canonicalizedObj;\n}" ]
[ "0.65108734", "0.6498207", "0.6440513", "0.6400591", "0.6358962", "0.6182721", "0.6169059", "0.61364204", "0.6134429", "0.61203116", "0.61112165", "0.61024374", "0.60910016", "0.60730433", "0.6054769", "0.6008793", "0.5993195", "0.59900856", "0.596988", "0.5943206", "0.59115595", "0.5895746", "0.5866867", "0.5843906", "0.579882", "0.57416534", "0.57384074", "0.5730602", "0.57246506", "0.5703379", "0.5703379", "0.5694624", "0.5663766", "0.56607014", "0.56607014", "0.56607014", "0.56607014", "0.56607014", "0.56607014", "0.5655635", "0.5645785", "0.5637795", "0.56321573", "0.56144476", "0.56094646", "0.55926925", "0.55797976", "0.55760473", "0.55726415", "0.5550517", "0.5540163", "0.5540163", "0.5531023", "0.5528339", "0.5519108", "0.55189574", "0.55036914", "0.5496515", "0.54931045", "0.5483099", "0.5481256", "0.5473577", "0.54711574", "0.5469393", "0.5461155", "0.54341114", "0.54272425", "0.5426558", "0.54149413", "0.54109114", "0.540971", "0.5401761", "0.5398145", "0.5385941", "0.53805953", "0.53766984", "0.53637403", "0.53627264", "0.53585106", "0.53585106", "0.53499293", "0.53481555", "0.53391033", "0.53284836", "0.532764", "0.5326294", "0.5321944", "0.53215146", "0.5321492", "0.5319779", "0.53159815", "0.5310276", "0.5310276", "0.5310276", "0.5310276", "0.5306858", "0.5306858", "0.5306858", "0.5306858", "0.5306858" ]
0.64422095
2
String canonicalization consists of escaping backslash (\) and double quote (") characters and wrapping the resulting string in double quotes.
function canonicalizeString(string) { const escapedString = string.replace(/\\/g, '\\\\').replace(/"/g, '\\"'); return '"' + escapedString + '"'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function quote(s) {\n /*\n * ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a\n * string literal except for the closing quote character, backslash,\n * carriage return, line separator, paragraph separator, and line feed.\n * Any character may appear in the form of an escape sequence.\n *\n * For portability, we also escape escape all control and non-ASCII\n * characters. Note that \"\\0\" and \"\\v\" escape sequences are not used\n * because JSHint does not like the first and IE the second.\n */\n return '\"' + s\n .replace(/\\\\/g, '\\\\\\\\') // backslash\n .replace(/\"/g, '\\\\\"') // closing quote character\n .replace(/\\x08/g, '\\\\b') // backspace\n .replace(/\\t/g, '\\\\t') // horizontal tab\n .replace(/\\n/g, '\\\\n') // line feed\n .replace(/\\f/g, '\\\\f') // form feed\n .replace(/\\r/g, '\\\\r') // carriage return\n .replace(/[\\x00-\\x07\\x0B\\x0E-\\x1F\\x80-\\uFFFF]/g, escape)\n + '\"';\n }", "function quote(s) {\n /*\n * ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a\n * string literal except for the closing quote character, backslash,\n * carriage return, line separator, paragraph separator, and line feed.\n * Any character may appear in the form of an escape sequence.\n *\n * For portability, we also escape escape all control and non-ASCII\n * characters. Note that \"\\0\" and \"\\v\" escape sequences are not used\n * because JSHint does not like the first and IE the second.\n */\n return '\"' + s\n .replace(/\\\\/g, '\\\\\\\\') // backslash\n .replace(/\"/g, '\\\\\"') // closing quote character\n .replace(/\\x08/g, '\\\\b') // backspace\n .replace(/\\t/g, '\\\\t') // horizontal tab\n .replace(/\\n/g, '\\\\n') // line feed\n .replace(/\\f/g, '\\\\f') // form feed\n .replace(/\\r/g, '\\\\r') // carriage return\n .replace(/[\\x00-\\x07\\x0B\\x0E-\\x1F\\x80-\\uFFFF]/g, escape)\n + '\"';\n }", "function quote(s) {\n /*\n * ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a\n * string literal except for the closing quote character, backslash,\n * carriage return, line separator, paragraph separator, and line feed.\n * Any character may appear in the form of an escape sequence.\n *\n * For portability, we also escape escape all control and non-ASCII\n * characters. Note that \"\\0\" and \"\\v\" escape sequences are not used\n * because JSHint does not like the first and IE the second.\n */\n return '\"' + s\n .replace(/\\\\/g, '\\\\\\\\') // backslash\n .replace(/\"/g, '\\\\\"') // closing quote character\n .replace(/\\x08/g, '\\\\b') // backspace\n .replace(/\\t/g, '\\\\t') // horizontal tab\n .replace(/\\n/g, '\\\\n') // line feed\n .replace(/\\f/g, '\\\\f') // form feed\n .replace(/\\r/g, '\\\\r') // carriage return\n .replace(/[\\x00-\\x07\\x0B\\x0E-\\x1F\\x80-\\uFFFF]/g, escape)\n + '\"';\n }", "function quote(s) {\n /*\n * ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a\n * string literal except for the closing quote character, backslash,\n * carriage return, line separator, paragraph separator, and line feed.\n * Any character may appear in the form of an escape sequence.\n *\n * For portability, we also escape escape all control and non-ASCII\n * characters. Note that \"\\0\" and \"\\v\" escape sequences are not used\n * because JSHint does not like the first and IE the second.\n */\n return '\"' + s\n .replace(/\\\\/g, '\\\\\\\\') // backslash\n .replace(/\"/g, '\\\\\"') // closing quote character\n .replace(/\\x08/g, '\\\\b') // backspace\n .replace(/\\t/g, '\\\\t') // horizontal tab\n .replace(/\\n/g, '\\\\n') // line feed\n .replace(/\\f/g, '\\\\f') // form feed\n .replace(/\\r/g, '\\\\r') // carriage return\n .replace(/[\\x00-\\x07\\x0B\\x0E-\\x1F\\x80-\\uFFFF]/g, escape)\n + '\"';\n }", "function quote(s) {\n /*\n * ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a\n * string literal except for the closing quote character, backslash,\n * carriage return, line separator, paragraph separator, and line feed.\n * Any character may appear in the form of an escape sequence.\n *\n * For portability, we also escape escape all control and non-ASCII\n * characters. Note that \"\\0\" and \"\\v\" escape sequences are not used\n * because JSHint does not like the first and IE the second.\n */\n return '\"' + s\n .replace(/\\\\/g, '\\\\\\\\') // backslash\n .replace(/\"/g, '\\\\\"') // closing quote character\n .replace(/\\x08/g, '\\\\b') // backspace\n .replace(/\\t/g, '\\\\t') // horizontal tab\n .replace(/\\n/g, '\\\\n') // line feed\n .replace(/\\f/g, '\\\\f') // form feed\n .replace(/\\r/g, '\\\\r') // carriage return\n .replace(/[\\x00-\\x07\\x0B\\x0E-\\x1F\\x80-\\uFFFF]/g, escape)\n + '\"';\n }", "function quote(s) {\n /*\n * ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a\n * string literal except for the closing quote character, backslash,\n * carriage return, line separator, paragraph separator, and line feed.\n * Any character may appear in the form of an escape sequence.\n *\n * For portability, we also escape escape all control and non-ASCII\n * characters. Note that \"\\0\" and \"\\v\" escape sequences are not used\n * because JSHint does not like the first and IE the second.\n */\n return '\"' + s\n .replace(/\\\\/g, '\\\\\\\\') // backslash\n .replace(/\"/g, '\\\\\"') // closing quote character\n .replace(/\\x08/g, '\\\\b') // backspace\n .replace(/\\t/g, '\\\\t') // horizontal tab\n .replace(/\\n/g, '\\\\n') // line feed\n .replace(/\\f/g, '\\\\f') // form feed\n .replace(/\\r/g, '\\\\r') // carriage return\n .replace(/[\\x00-\\x07\\x0B\\x0E-\\x1F\\x80-\\uFFFF]/g, escape)\n + '\"';\n }", "function quote(s) {\n /*\n * ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a\n * string literal except for the closing quote character, backslash,\n * carriage return, line separator, paragraph separator, and line feed.\n * Any character may appear in the form of an escape sequence.\n *\n * For portability, we also escape escape all control and non-ASCII\n * characters. Note that \"\\0\" and \"\\v\" escape sequences are not used\n * because JSHint does not like the first and IE the second.\n */\n return '\"' + s\n .replace(/\\\\/g, '\\\\\\\\') // backslash\n .replace(/\"/g, '\\\\\"') // closing quote character\n .replace(/\\x08/g, '\\\\b') // backspace\n .replace(/\\t/g, '\\\\t') // horizontal tab\n .replace(/\\n/g, '\\\\n') // line feed\n .replace(/\\f/g, '\\\\f') // form feed\n .replace(/\\r/g, '\\\\r') // carriage return\n .replace(/[\\x00-\\x07\\x0B\\x0E-\\x1F\\x80-\\uFFFF]/g, escape)\n + '\"';\n }", "function quote(s) {\n /*\n * ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a\n * string literal except for the closing quote character, backslash,\n * carriage return, line separator, paragraph separator, and line feed.\n * Any character may appear in the form of an escape sequence.\n *\n * For portability, we also escape escape all control and non-ASCII\n * characters. Note that \"\\0\" and \"\\v\" escape sequences are not used\n * because JSHint does not like the first and IE the second.\n */\n return '\"' + s\n .replace(/\\\\/g, '\\\\\\\\') // backslash\n .replace(/\"/g, '\\\\\"') // closing quote character\n .replace(/\\x08/g, '\\\\b') // backspace\n .replace(/\\t/g, '\\\\t') // horizontal tab\n .replace(/\\n/g, '\\\\n') // line feed\n .replace(/\\f/g, '\\\\f') // form feed\n .replace(/\\r/g, '\\\\r') // carriage return\n .replace(/[\\x00-\\x07\\x0B\\x0E-\\x1F\\x80-\\uFFFF]/g, escape)\n + '\"';\n }", "function quote(s) {\n /*\n * ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a\n * string literal except for the closing quote character, backslash,\n * carriage return, line separator, paragraph separator, and line feed.\n * Any character may appear in the form of an escape sequence.\n *\n * For portability, we also escape escape all control and non-ASCII\n * characters. Note that \"\\0\" and \"\\v\" escape sequences are not used\n * because JSHint does not like the first and IE the second.\n */\n return '\"' + s\n .replace(/\\\\/g, '\\\\\\\\') // backslash\n .replace(/\"/g, '\\\\\"') // closing quote character\n .replace(/\\x08/g, '\\\\b') // backspace\n .replace(/\\t/g, '\\\\t') // horizontal tab\n .replace(/\\n/g, '\\\\n') // line feed\n .replace(/\\f/g, '\\\\f') // form feed\n .replace(/\\r/g, '\\\\r') // carriage return\n .replace(/[\\x00-\\x07\\x0B\\x0E-\\x1F\\x80-\\uFFFF]/g, escape)\n + '\"';\n }", "function quote(s) {\n /*\n * ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a\n * string literal except for the closing quote character, backslash,\n * carriage return, line separator, paragraph separator, and line feed.\n * Any character may appear in the form of an escape sequence.\n *\n * For portability, we also escape escape all control and non-ASCII\n * characters. Note that \"\\0\" and \"\\v\" escape sequences are not used\n * because JSHint does not like the first and IE the second.\n */\n return '\"' + s\n .replace(/\\\\/g, '\\\\\\\\') // backslash\n .replace(/\"/g, '\\\\\"') // closing quote character\n .replace(/\\x08/g, '\\\\b') // backspace\n .replace(/\\t/g, '\\\\t') // horizontal tab\n .replace(/\\n/g, '\\\\n') // line feed\n .replace(/\\f/g, '\\\\f') // form feed\n .replace(/\\r/g, '\\\\r') // carriage return\n .replace(/[\\x00-\\x07\\x0B\\x0E-\\x1F\\x80-\\uFFFF]/g, escape)\n + '\"';\n }", "function quote(s) {\n /*\n * ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a\n * string literal except for the closing quote character, backslash,\n * carriage return, line separator, paragraph separator, and line feed.\n * Any character may appear in the form of an escape sequence.\n *\n * For portability, we also escape escape all control and non-ASCII\n * characters. Note that \"\\0\" and \"\\v\" escape sequences are not used\n * because JSHint does not like the first and IE the second.\n */\n return '\"' + s\n .replace(/\\\\/g, '\\\\\\\\') // backslash\n .replace(/\"/g, '\\\\\"') // closing quote character\n .replace(/\\x08/g, '\\\\b') // backspace\n .replace(/\\t/g, '\\\\t') // horizontal tab\n .replace(/\\n/g, '\\\\n') // line feed\n .replace(/\\f/g, '\\\\f') // form feed\n .replace(/\\r/g, '\\\\r') // carriage return\n .replace(/[\\x00-\\x07\\x0B\\x0E-\\x1F\\x80-\\uFFFF]/g, escape)\n + '\"';\n }", "function quote(s) {\n /*\n * ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a\n * string literal except for the closing quote character, backslash,\n * carriage return, line separator, paragraph separator, and line feed.\n * Any character may appear in the form of an escape sequence.\n *\n * For portability, we also escape escape all control and non-ASCII\n * characters. Note that \"\\0\" and \"\\v\" escape sequences are not used\n * because JSHint does not like the first and IE the second.\n */\n return '\"' + s\n .replace(/\\\\/g, '\\\\\\\\') // backslash\n .replace(/\"/g, '\\\\\"') // closing quote character\n .replace(/\\x08/g, '\\\\b') // backspace\n .replace(/\\t/g, '\\\\t') // horizontal tab\n .replace(/\\n/g, '\\\\n') // line feed\n .replace(/\\f/g, '\\\\f') // form feed\n .replace(/\\r/g, '\\\\r') // carriage return\n .replace(/[\\x00-\\x07\\x0B\\x0E-\\x1F\\x80-\\uFFFF]/g, escape)\n + '\"';\n }", "function quote(s) {\n /*\n * ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a\n * string literal except for the closing quote character, backslash,\n * carriage return, line separator, paragraph separator, and line feed.\n * Any character may appear in the form of an escape sequence.\n *\n * For portability, we also escape escape all control and non-ASCII\n * characters. Note that \"\\0\" and \"\\v\" escape sequences are not used\n * because JSHint does not like the first and IE the second.\n */\n return '\"' + s\n .replace(/\\\\/g, '\\\\\\\\') // backslash\n .replace(/\"/g, '\\\\\"') // closing quote character\n .replace(/\\x08/g, '\\\\b') // backspace\n .replace(/\\t/g, '\\\\t') // horizontal tab\n .replace(/\\n/g, '\\\\n') // line feed\n .replace(/\\f/g, '\\\\f') // form feed\n .replace(/\\r/g, '\\\\r') // carriage return\n .replace(/[\\x00-\\x07\\x0B\\x0E-\\x1F\\x80-\\uFFFF]/g, escape)\n + '\"';\n }", "function quote(s) {\n /*\n * ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a\n * string literal except for the closing quote character, backslash,\n * carriage return, line separator, paragraph separator, and line feed.\n * Any character may appear in the form of an escape sequence.\n *\n * For portability, we also escape escape all control and non-ASCII\n * characters. Note that \"\\0\" and \"\\v\" escape sequences are not used\n * because JSHint does not like the first and IE the second.\n */\n return '\"' + s\n .replace(/\\\\/g, '\\\\\\\\') // backslash\n .replace(/\"/g, '\\\\\"') // closing quote character\n .replace(/\\x08/g, '\\\\b') // backspace\n .replace(/\\t/g, '\\\\t') // horizontal tab\n .replace(/\\n/g, '\\\\n') // line feed\n .replace(/\\f/g, '\\\\f') // form feed\n .replace(/\\r/g, '\\\\r') // carriage return\n .replace(/[\\x00-\\x07\\x0B\\x0E-\\x1F\\x80-\\uFFFF]/g, escape)\n + '\"';\n }", "function quote(s) {\n /*\n * ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a\n * string literal except for the closing quote character, backslash,\n * carriage return, line separator, paragraph separator, and line feed.\n * Any character may appear in the form of an escape sequence.\n *\n * For portability, we also escape escape all control and non-ASCII\n * characters. Note that \"\\0\" and \"\\v\" escape sequences are not used\n * because JSHint does not like the first and IE the second.\n */\n return '\"' + s\n .replace(/\\\\/g, '\\\\\\\\') // backslash\n .replace(/\"/g, '\\\\\"') // closing quote character\n .replace(/\\x08/g, '\\\\b') // backspace\n .replace(/\\t/g, '\\\\t') // horizontal tab\n .replace(/\\n/g, '\\\\n') // line feed\n .replace(/\\f/g, '\\\\f') // form feed\n .replace(/\\r/g, '\\\\r') // carriage return\n .replace(/[\\x00-\\x07\\x0B\\x0E-\\x1F\\x80-\\uFFFF]/g, escape)\n + '\"';\n }", "function quote(s) {\n /*\n * ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a\n * string literal except for the closing quote character, backslash,\n * carriage return, line separator, paragraph separator, and line feed.\n * Any character may appear in the form of an escape sequence.\n *\n * For portability, we also escape escape all control and non-ASCII\n * characters. Note that \"\\0\" and \"\\v\" escape sequences are not used\n * because JSHint does not like the first and IE the second.\n */\n return '\"' + s\n .replace(/\\\\/g, '\\\\\\\\') // backslash\n .replace(/\"/g, '\\\\\"') // closing quote character\n .replace(/\\x08/g, '\\\\b') // backspace\n .replace(/\\t/g, '\\\\t') // horizontal tab\n .replace(/\\n/g, '\\\\n') // line feed\n .replace(/\\f/g, '\\\\f') // form feed\n .replace(/\\r/g, '\\\\r') // carriage return\n .replace(/[\\x00-\\x07\\x0B\\x0E-\\x1F\\x80-\\uFFFF]/g, escape)\n + '\"';\n }", "function quote(s) {\n /*\n * ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a\n * string literal except for the closing quote character, backslash,\n * carriage return, line separator, paragraph separator, and line feed.\n * Any character may appear in the form of an escape sequence.\n *\n * For portability, we also escape escape all control and non-ASCII\n * characters. Note that \"\\0\" and \"\\v\" escape sequences are not used\n * because JSHint does not like the first and IE the second.\n */\n return '\"' + s\n .replace(/\\\\/g, '\\\\\\\\') // backslash\n .replace(/\"/g, '\\\\\"') // closing quote character\n .replace(/\\x08/g, '\\\\b') // backspace\n .replace(/\\t/g, '\\\\t') // horizontal tab\n .replace(/\\n/g, '\\\\n') // line feed\n .replace(/\\f/g, '\\\\f') // form feed\n .replace(/\\r/g, '\\\\r') // carriage return\n .replace(/[\\x00-\\x07\\x0B\\x0E-\\x1F\\x80-\\uFFFF]/g, escape)\n + '\"';\n }", "function quote(s) {\n /*\n * ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a\n * string literal except for the closing quote character, backslash,\n * carriage return, line separator, paragraph separator, and line feed.\n * Any character may appear in the form of an escape sequence.\n *\n * For portability, we also escape escape all control and non-ASCII\n * characters. Note that \"\\0\" and \"\\v\" escape sequences are not used\n * because JSHint does not like the first and IE the second.\n */\n return '\"' + s\n .replace(/\\\\/g, '\\\\\\\\') // backslash\n .replace(/\"/g, '\\\\\"') // closing quote character\n .replace(/\\x08/g, '\\\\b') // backspace\n .replace(/\\t/g, '\\\\t') // horizontal tab\n .replace(/\\n/g, '\\\\n') // line feed\n .replace(/\\f/g, '\\\\f') // form feed\n .replace(/\\r/g, '\\\\r') // carriage return\n .replace(/[\\x00-\\x07\\x0B\\x0E-\\x1F\\x80-\\uFFFF]/g, escape)\n + '\"';\n }", "function quote(s) {\n /*\n * ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a\n * string literal except for the closing quote character, backslash,\n * carriage return, line separator, paragraph separator, and line feed.\n * Any character may appear in the form of an escape sequence.\n *\n * For portability, we also escape escape all control and non-ASCII\n * characters. Note that \"\\0\" and \"\\v\" escape sequences are not used\n * because JSHint does not like the first and IE the second.\n */\n return '\"' + s\n .replace(/\\\\/g, '\\\\\\\\') // backslash\n .replace(/\"/g, '\\\\\"') // closing quote character\n .replace(/\\x08/g, '\\\\b') // backspace\n .replace(/\\t/g, '\\\\t') // horizontal tab\n .replace(/\\n/g, '\\\\n') // line feed\n .replace(/\\f/g, '\\\\f') // form feed\n .replace(/\\r/g, '\\\\r') // carriage return\n .replace(/[\\x00-\\x07\\x0B\\x0E-\\x1F\\x80-\\uFFFF]/g, escape)\n + '\"';\n }", "function quote(s) {\n /*\n * ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a\n * string literal except for the closing quote character, backslash,\n * carriage return, line separator, paragraph separator, and line feed.\n * Any character may appear in the form of an escape sequence.\n *\n * For portability, we also escape escape all control and non-ASCII\n * characters. Note that \"\\0\" and \"\\v\" escape sequences are not used\n * because JSHint does not like the first and IE the second.\n */\n return '\"' + s\n .replace(/\\\\/g, '\\\\\\\\') // backslash\n .replace(/\"/g, '\\\\\"') // closing quote character\n .replace(/\\x08/g, '\\\\b') // backspace\n .replace(/\\t/g, '\\\\t') // horizontal tab\n .replace(/\\n/g, '\\\\n') // line feed\n .replace(/\\f/g, '\\\\f') // form feed\n .replace(/\\r/g, '\\\\r') // carriage return\n .replace(/[\\x00-\\x07\\x0B\\x0E-\\x1F\\x80-\\uFFFF]/g, escape)\n + '\"';\n }", "function quote(s) {\n /*\n * ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a\n * string literal except for the closing quote character, backslash,\n * carriage return, line separator, paragraph separator, and line feed.\n * Any character may appear in the form of an escape sequence.\n *\n * For portability, we also escape escape all control and non-ASCII\n * characters. Note that \"\\0\" and \"\\v\" escape sequences are not used\n * because JSHint does not like the first and IE the second.\n */\n return '\"' + s\n .replace(/\\\\/g, '\\\\\\\\') // backslash\n .replace(/\"/g, '\\\\\"') // closing quote character\n .replace(/\\x08/g, '\\\\b') // backspace\n .replace(/\\t/g, '\\\\t') // horizontal tab\n .replace(/\\n/g, '\\\\n') // line feed\n .replace(/\\f/g, '\\\\f') // form feed\n .replace(/\\r/g, '\\\\r') // carriage return\n .replace(/[\\x00-\\x07\\x0B\\x0E-\\x1F\\x80-\\uFFFF]/g, escape)\n + '\"';\n }", "function quote(s) {\n /*\n * ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a\n * string literal except for the closing quote character, backslash,\n * carriage return, line separator, paragraph separator, and line feed.\n * Any character may appear in the form of an escape sequence.\n *\n * For portability, we also escape escape all control and non-ASCII\n * characters. Note that \"\\0\" and \"\\v\" escape sequences are not used\n * because JSHint does not like the first and IE the second.\n */\n return '\"' + s\n .replace(/\\\\/g, '\\\\\\\\') // backslash\n .replace(/\"/g, '\\\\\"') // closing quote character\n .replace(/\\x08/g, '\\\\b') // backspace\n .replace(/\\t/g, '\\\\t') // horizontal tab\n .replace(/\\n/g, '\\\\n') // line feed\n .replace(/\\f/g, '\\\\f') // form feed\n .replace(/\\r/g, '\\\\r') // carriage return\n .replace(/[\\x00-\\x07\\x0B\\x0E-\\x1F\\x80-\\uFFFF]/g, escape)\n + '\"';\n }", "function quote(s) {\n /*\n * ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a\n * string literal except for the closing quote character, backslash,\n * carriage return, line separator, paragraph separator, and line feed.\n * Any character may appear in the form of an escape sequence.\n *\n * For portability, we also escape escape all control and non-ASCII\n * characters. Note that \"\\0\" and \"\\v\" escape sequences are not used\n * because JSHint does not like the first and IE the second.\n */\n return '\"' + s\n .replace(/\\\\/g, '\\\\\\\\') // backslash\n .replace(/\"/g, '\\\\\"') // closing quote character\n .replace(/\\x08/g, '\\\\b') // backspace\n .replace(/\\t/g, '\\\\t') // horizontal tab\n .replace(/\\n/g, '\\\\n') // line feed\n .replace(/\\f/g, '\\\\f') // form feed\n .replace(/\\r/g, '\\\\r') // carriage return\n .replace(/[\\x00-\\x07\\x0B\\x0E-\\x1F\\x80-\\uFFFF]/g, escape)\n + '\"';\n }", "function quote(s) {\n /*\n * ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a\n * string literal except for the closing quote character, backslash,\n * carriage return, line separator, paragraph separator, and line feed.\n * Any character may appear in the form of an escape sequence.\n *\n * For portability, we also escape escape all control and non-ASCII\n * characters. Note that \"\\0\" and \"\\v\" escape sequences are not used\n * because JSHint does not like the first and IE the second.\n */\n return '\"' + s\n .replace(/\\\\/g, '\\\\\\\\') // backslash\n .replace(/\"/g, '\\\\\"') // closing quote character\n .replace(/\\x08/g, '\\\\b') // backspace\n .replace(/\\t/g, '\\\\t') // horizontal tab\n .replace(/\\n/g, '\\\\n') // line feed\n .replace(/\\f/g, '\\\\f') // form feed\n .replace(/\\r/g, '\\\\r') // carriage return\n .replace(/[\\x00-\\x07\\x0B\\x0E-\\x1F\\x80-\\uFFFF]/g, escape)\n + '\"';\n }", "function quote(s) {\n /*\n * ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a\n * string literal except for the closing quote character, backslash,\n * carriage return, line separator, paragraph separator, and line feed.\n * Any character may appear in the form of an escape sequence.\n *\n * For portability, we also escape escape all control and non-ASCII\n * characters. Note that \"\\0\" and \"\\v\" escape sequences are not used\n * because JSHint does not like the first and IE the second.\n */\n return '\"' + s\n .replace(/\\\\/g, '\\\\\\\\') // backslash\n .replace(/\"/g, '\\\\\"') // closing quote character\n .replace(/\\x08/g, '\\\\b') // backspace\n .replace(/\\t/g, '\\\\t') // horizontal tab\n .replace(/\\n/g, '\\\\n') // line feed\n .replace(/\\f/g, '\\\\f') // form feed\n .replace(/\\r/g, '\\\\r') // carriage return\n .replace(/[\\x00-\\x07\\x0B\\x0E-\\x1F\\x80-\\uFFFF]/g, escape)\n + '\"';\n }", "function quote(s) {\n /*\n * ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a\n * string literal except for the closing quote character, backslash,\n * carriage return, line separator, paragraph separator, and line feed.\n * Any character may appear in the form of an escape sequence.\n *\n * For portability, we also escape escape all control and non-ASCII\n * characters. Note that \"\\0\" and \"\\v\" escape sequences are not used\n * because JSHint does not like the first and IE the second.\n */\n return '\"' + s\n .replace(/\\\\/g, '\\\\\\\\') // backslash\n .replace(/\"/g, '\\\\\"') // closing quote character\n .replace(/\\x08/g, '\\\\b') // backspace\n .replace(/\\t/g, '\\\\t') // horizontal tab\n .replace(/\\n/g, '\\\\n') // line feed\n .replace(/\\f/g, '\\\\f') // form feed\n .replace(/\\r/g, '\\\\r') // carriage return\n .replace(/[\\x00-\\x07\\x0B\\x0E-\\x1F\\x80-\\uFFFF]/g, escape)\n + '\"';\n }", "function quote(s) {\n /*\n * ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a\n * string literal except for the closing quote character, backslash,\n * carriage return, line separator, paragraph separator, and line feed.\n * Any character may appear in the form of an escape sequence.\n *\n * For portability, we also escape escape all control and non-ASCII\n * characters. Note that \"\\0\" and \"\\v\" escape sequences are not used\n * because JSHint does not like the first and IE the second.\n */\n return '\"' + s\n .replace(/\\\\/g, '\\\\\\\\') // backslash\n .replace(/\"/g, '\\\\\"') // closing quote character\n .replace(/\\x08/g, '\\\\b') // backspace\n .replace(/\\t/g, '\\\\t') // horizontal tab\n .replace(/\\n/g, '\\\\n') // line feed\n .replace(/\\f/g, '\\\\f') // form feed\n .replace(/\\r/g, '\\\\r') // carriage return\n .replace(/[\\x00-\\x07\\x0B\\x0E-\\x1F\\x80-\\uFFFF]/g, escape)\n + '\"';\n }", "function quote(s) {\n /*\n * ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a\n * string literal except for the closing quote character, backslash,\n * carriage return, line separator, paragraph separator, and line feed.\n * Any character may appear in the form of an escape sequence.\n *\n * For portability, we also escape escape all control and non-ASCII\n * characters. Note that \"\\0\" and \"\\v\" escape sequences are not used\n * because JSHint does not like the first and IE the second.\n */\n return '\"' + s\n .replace(/\\\\/g, '\\\\\\\\') // backslash\n .replace(/\"/g, '\\\\\"') // closing quote character\n .replace(/\\x08/g, '\\\\b') // backspace\n .replace(/\\t/g, '\\\\t') // horizontal tab\n .replace(/\\n/g, '\\\\n') // line feed\n .replace(/\\f/g, '\\\\f') // form feed\n .replace(/\\r/g, '\\\\r') // carriage return\n .replace(/[\\x00-\\x07\\x0B\\x0E-\\x1F\\x80-\\uFFFF]/g, escape)\n + '\"';\n }", "function quote( s ) {\n /*\n * ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a\n * string literal except for the closing quote character, backslash,\n * carriage return, line separator, paragraph separator, and line feed.\n * Any character may appear in the form of an escape sequence.\n *\n * For portability, we also escape escape all control and non-ASCII\n * characters. Note that \"\\0\" and \"\\v\" escape sequences are not used\n * because JSHint does not like the first and IE the second.\n */\n return '\"' + s\n .replace( /\\\\/g, '\\\\\\\\' ) // backslash\n .replace( /\"/g, '\\\\\"' ) // closing quote character\n .replace( /\\x08/g, '\\\\b' ) // backspace\n .replace( /\\t/g, '\\\\t' ) // horizontal tab\n .replace( /\\n/g, '\\\\n' ) // line feed\n .replace( /\\f/g, '\\\\f' ) // form feed\n .replace( /\\r/g, '\\\\r' ) // carriage return\n .replace( /[\\x00-\\x07\\x0B\\x0E-\\x1F\\x80-\\uFFFF]/g, escape )\n + '\"';\n }", "function quote(s) {\n // eslint-disable-next-line no-useless-escape\n if (/[\"\\s#!$&'()*,:;<=>?@\\[\\\\\\]^`{|}]/.test(s)) {\n if (/['\\n]/.test(s))\n return '\"' +\n s\n .replace(/([\"\\\\$`!])/g, '\\\\$1')\n .replace(/\\n/g, '\\\\n') +\n '\"';\n return \"'\" + s.replace(/(['\\\\])/g, '\\\\$1') + \"'\";\n }\n return s;\n}", "function esc(v) { return \"\\\"\" + v.replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g, \"\\\\\\\"\") + \"\\\"\"; }", "function esc(v) { return \"\\\"\" + v.replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g, \"\\\\\\\"\") + \"\\\"\"; }", "function esc(v) { return \"\\\"\" + v.replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g, \"\\\\\\\"\") + \"\\\"\"; }", "function esc(v) { return \"\\\"\" + v.replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g, \"\\\\\\\"\") + \"\\\"\"; }", "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}", "apply_string(str, quotation='\"') {\n var sb = quotation\n for( var i=0; i<str.length; i++ ){\n var c = str.charAt(i)\n switch( c ){\n case '\\\\': sb += \"\\\\\\\\\"; break;\n case '\\b': sb += \"\\\\b\"; break;\n case '\\f': sb += \"\\\\f\"; break;\n case '\\n': sb += \"\\\\n\"; break;\n case '\\r': sb += \"\\\\r\"; break;\n case '\\t': sb += \"\\\\t\"; break;\n default:\n var cc = c.charCodeAt(0)\n if( cc < 32 || cc > 255 ){\n sb += \"\\\\u\"\n c = cc.toString(16)\n while( c.length < 4 ) c = '0'+c\n sb += c\n }else if(c==quotation)\n sb += \"\\\\\"+quotation\n else\n sb += c\n break;\n }\n }\n sb += quotation\n return sb \n }", "stringEscape( s ) {\n\n return sourceEscape(\n s\n .replace( /\\\\/g, \"\\\\\\\\\" ) // backslash\n .replace( /\"/g, \"\\\\\\\"\" ), // closing double quote\n );\n\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 escSglQuote(str) {\r\n return str.toString().replace(/'/g,\"\\\\'\");\r\n}", "function quote(s) {\n\t return '\\\\Q' + s.replace('\\\\E', '\\\\E\\\\\\\\E\\\\Q') + '\\\\E';\n\t}", "function escapeQuotes(string, beforeHbsEscaping) {\n if(string instanceof handlebars.SafeString) {\n return string;\n }\n string = string + \"\"; // Ensure we've got a string\n\n\n // We want to replace '\\' with '\\\\', that's meta… indeed…\n // E.g {\"azer\": \"hello\\\\,\"} becomes {\"azer\": \"hello\\\\\\\\,\"}\n // Else it will be parsed later in the second JSON-parse, and fail miserably and make our lives a living nightmare.\n string = string.replace(/\\\\/g, '\\\\\\\\');\n\n if(beforeHbsEscaping !== false) {\n string = string.replace(/\"/g, '\\\\\"');\n }\n return string\n .replace(/[\\b]/g, '\\\\b')\n .replace(/[\\f]/g, '\\\\f')\n .replace(/[\\n]/g, '\\\\n')\n .replace(/[\\r]/g, '\\\\r')\n .replace(/[\\t]/g, '\\\\t')\n .trim();\n}", "function encode(str)\n{\n out = '';\n\n for (a = 0; a < str.length; a++)\n {\n c = str.charAt(a);\n\n if (c == \"'\")\n {\n out += '\\\\';\n }\n\n out += c;\n }\n\n return out;\n}", "function quote(s)\n{\n return s.replace(/[\\^\\$\\\\\\.\\*\\+\\?\\(\\)\\[\\]\\{\\}\\|]/g, '\\\\$&');\n}", "function encodeSingleQuote( str )\n{\n\treturn str.replace( /'/g, \"&apos;\" );\n}", "function sanitize(string) {\n return string.replace(/[\\u2018\\u2019]/g, \"'\").replace(/[\\u201C\\u201D]/g, '\"');\n}", "function escapeDoubleQuotes(str) {\n return str.replace(/\\\\([\\s\\S])|(\")/g, \"\\\\$1$2\");\n}", "function _escape(s) {\n return s.replace(_escapeRegex, function (match) {\n switch (match) {\n case '\"':\n return '\\\\\"';\n case '\\\\':\n return '\\\\\\\\';\n case '\\n':\n return '\\\\n';\n case '\\r':\n return '\\\\r';\n }\n });\n}", "function sanitize(str){\n return str.replace(\n /([^a-zA-Z0-9`!\\$%\\^\\*\\(\\)\\-_\\+=\\[\\]\\{\\};'#:@~,\\.\\/<>\\?\\|])/g,\n function(a){\n if(a=='\"'||a=='\\\\')\n // This is going into a string with double quotes, so escape those\n return'\\\\'+a;\n else if(a==' ')\n return a;\n else if(a=='\\t')\n return '\\\\t';\n else if(a=='\\r')\n return '\\\\r';\n else if(a=='\\n')\n return '\\\\n';\n else return '\\\\x'+((256+a.charCodeAt(0))&0x1ff).toString(16).slice(1)\n }\n );\n }", "function di_strEscapeSpclchar(str) {\n\t//return str.replace(\"'\", \"\\\\'\");\n\treturn str;\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 escapeQuotes(str) {\n return str.replace(/\\\"/g,'\\\\\"');\n }", "function sanitize(text) {\n return text.replace(/\\\\/g, '\\\\\\\\').replace(/\"/g, '\\\\\"');\n }", "function buildLiteralString(s) {\n return \"'\" + s.replace(/(['\\\\])/g, \"\\\\$1\") + \"'\";\n }", "function escape_r_literal_string(s) {\n return \"\\\"\" + s.replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g, \"\\\\\\\"\") + \"\\\"\";\n // return \"\\\"\" + s.replace(/\"/g, \"\\\\\\\"\") + \"\\\"\";\n}", "function testStrings() {\n var z = \"\\\"\"\n , a = \"\\\\\"\n , b = \"\\\\\\\"\"\n , c = \"\\\\\\\\\"\n , d = \"\\\\\\\\\\\"\"\n , e = \"\\\\\\\\\\\\\"\n ;\n return \"\\\\/*\\/\\/\";\n }", "escapeString(str) {\n return str\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(new RegExp(this.options.quoteChar, 'g'), `\\\\` + this.options.quoteChar);\n }", "function _string(s) {\n return QUOTE + s.replace(_SPECIAL_CHARS, _char) + QUOTE;\n}", "function _string(s) {\n return QUOTE + s.replace(_SPECIAL_CHARS, _char) + QUOTE;\n}", "function dquote$1(s) {\n var sq = s.indexOf('\\'') >= 0;\n var dq = s.indexOf('\"') >= 0;\n if (sq && dq) {\n s = s.replace(/\"/g, '\\\\\"');\n dq = false;\n }\n if (dq) {\n s = '\\'' + s + '\\'';\n } else {\n s = '\"' + s + '\"';\n }\n return s;\n}", "function _quote_no_esc(str) {\n if (/^\"/.test(str)) return true;\n let match;\n while (match = /^[\\s\\S]*?([\\s\\S])\"/.exec(str)) {\n if (match[1] !== '\\\\') {\n return true;\n }\n str = str.substr(match[0].length);\n }\n return false;\n}", "function escapeShellArg(s) {\n s = s.replace(/\"/g, '\\\\\"');\n return '\"' + s + '\"';\n}", "function _quote_no_esc(str) {\n if (/^\"/.test(str)) return true;\n var match = void 0;\n while (match = /^[\\s\\S]*?([\\s\\S])\"/.exec(str)) {\n if (match[1] !== '\\\\') {\n return true;\n }\n str = str.substr(match[0].length);\n }\n return false;\n}", "function escapeString(str){\n\tvar str = new String(str);\n\treturn str.replace(/\\\\/g, '\\\\\\\\').replace(/\"/g, '\\\\\"');\n}", "function wrap(str, opt_wrapper, opt_escape) {\r\n opt_wrapper = toArray(opt_wrapper);\r\n opt_escape = toArray(opt_escape);\r\n var opt_lWrap = (opt_wrapper[0] || '\"') + '',\r\n opt_rWrap = opt_wrapper[1] || opt_lWrap,\r\n opt_lEscape = v1(opt_escape[0], '') + '',\r\n opt_rEscape = v1(opt_escape[1], opt_lEscape) + '';\r\n return opt_lWrap\r\n + (str + '').replace(\r\n RegExp(quoteRegExp(opt_lWrap) + '|' + quoteRegExp(opt_rWrap), 'g'),\r\n function(m) { return m == opt_lWrap ? opt_lEscape : opt_rEscape; }\r\n )\r\n + opt_rWrap;\r\n }", "raw_string(txt, quotation='\"') {\n var str = \"\"\n var n = txt.length\n var end = 1\n var c=txt.charAt(end)\n while(end<n && c!=quotation){\n if(c=='\\\\'){\n str += this.escape(txt.substring(end,Math.min(n, end+6)))\n end++\n c=txt.charAt(end)\n if(c=='u') end += 4\n }else str += c\n end++\n c=txt.charAt(end)\n }\n return str\n }", "function escapeString(str) {\n return str.replace('\"', '\\\"');\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 clean(input){\n return input.replace('\\'', '');\n \n }", "function basicEscape(string) {\n return string.replace(/\\\\/g, '\\\\\\\\');\n}", "function escapeDoubleQuotes(text) {\n\treturn text.replace(/\"/g, '\\\\\"');\n}", "function add_slashes(s) {\n return s.replace(/['\"]/g, \"\\\\$&\"); \n}", "function escape(str) {\n if (!str) {\n return '';\n }\n return str\n .replace(/\\|/g, \"||\")\n .replace(/\\n/g, \"|n\")\n .replace(/\\r/g, \"|r\")\n .replace(/\\[/g, \"|[\")\n .replace(/\\]/g, \"|]\")\n .replace(/\\u0085/g, \"|x\")\n .replace(/\\u2028/g, \"|l\")\n .replace(/\\u2029/g, \"|p\")\n .replace(/'/g, \"|'\");\n}", "function wrapInQuote(value) {\n return `\\\"${value}\\\"`;\n}", "function wrapInQuote(value) {\n return `\\\"${value}\\\"`;\n}", "function quoteString(string) {\n return '\"' + string + '\"';\n}", "function escapeScript(s, escapeSingleQuotes, escapeDoubleQuotes){\n\tif (typeof(s) != \"string\") return \"\";\n\t\n\tvar result = \"\";\n\tfor (var i = 0; i < s.length; i++) {\n\t\tvar ch = s.charAt(i);\n\t\tswitch (ch) {\n\t\tcase '\\'':\n\t\t\tif (escapeSingleQuotes == null || escapeSingleQuotes)\n\t\t\t\tresult += \"\\\\\\'\";\n\t\t\tbreak;\n\t\tcase '\\\"':\n\t\t\tif (escapeDoubleQuotes == null || escapeDoubleQuotes)\n\t\t\t\tresult += \"\\\\\\\"\";\n\t\t\tbreak;\n\t\tcase '\\\\':\n\t\t\tresult += \"\\\\\\\\\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tresult += ch;\n\t\t}\n\t}\n\treturn result;\n}", "function escapeScript(s, escapeSingleQuotes, escapeDoubleQuotes){\n\tif (typeof(s) != \"string\") return \"\";\n\t\n\tvar result = \"\";\n\tfor (var i = 0; i < s.length; i++) {\n\t\tvar ch = s.charAt(i);\n\t\tswitch (ch) {\n\t\tcase '\\'':\n\t\t\tif (escapeSingleQuotes == null || escapeSingleQuotes)\n\t\t\t\tresult += \"\\\\\\'\";\n\t\t\tbreak;\n\t\tcase '\\\"':\n\t\t\tif (escapeDoubleQuotes == null || escapeDoubleQuotes)\n\t\t\t\tresult += \"\\\\\\\"\";\n\t\t\tbreak;\n\t\tcase '\\\\':\n\t\t\tresult += \"\\\\\\\\\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tresult += ch;\n\t\t}\n\t}\n\treturn result;\n}", "function escapeSpaces(s, shell) {\r\n if (!s.includes(' ')) {\r\n return s;\r\n }\r\n switch (shell) {\r\n case Shell.PowerShell:\r\n // Unescape\r\n s = s.replace(new RegExp('` ', 'g'), ' ');\r\n // Escape\r\n return s.replace(new RegExp(' ', 'g'), '` ');\r\n case Shell.CMD:\r\n s = s.concat();\r\n if (!s.startsWith('\"')) {\r\n s = '\"'.concat(s);\r\n }\r\n if (!s.endsWith('\"')) {\r\n s = s.concat('\"');\r\n }\r\n return s;\r\n case Shell.Shell:\r\n s = s.concat();\r\n if (!s.startsWith('\\'')) {\r\n s = '\\''.concat(s);\r\n }\r\n if (!s.endsWith('\\'')) {\r\n s = s.concat('\\'');\r\n }\r\n return s;\r\n }\r\n}", "function normalize(val) {\n var quotableRgx = /(\\n|,|\")/;\n if (quotableRgx.test(val)) return '\"' + val.replace(/\"/g, '\"\"') + '\"';\n return val;\n }", "function escapeSpecialCharacters(str) {\n // Replace \" with two ' b/c \" cannot be escaped properly in output onto DOM\n // Search for special characters \\, ', (, ) globally in string\n // and insert a forward slash \\ to escape those characters\n str = str.replace(/\\\"/gi,'\\'\\'').replace(/[\\\\\\'()]/gi, '\\\\$&');\n return str;\n}", "function e(a){return a.lastIndexOf(\"\\\\\")<0?a:a.replace(/\\\\\\\\/g,\"\\\\\").replace(/\\\\n/g,\"\\n\").replace(/\\\\r/g,\"\\r\").replace(/\\\\t/g,\"\t\").replace(/\\\\b/g,\"\\b\").replace(/\\\\f/g,\"\\f\").replace(/\\\\{/g,\"{\").replace(/\\\\}/g,\"}\").replace(/\\\\\"/g,'\"').replace(/\\\\'/g,\"'\")}", "function stripslashes( str ) {\t \r\n\t\treturn (str+'').replace(/\\\\(.?)/g, '$1');\r\n\t}", "function addslashes( str ) {\n return (str+'').replace(/([\\\\\"'])/g, \"\\\\$1\").replace(/\\0/g, \"\\\\0\");\n }", "function replaceSingleQuotes(str){\n\tstr = str.replace(\"'\", \"''\");\n\tconsole.log(str);\n\treturn str;\n}", "function escapeForTemplate(raw) {\n return raw\n .replace(/^['\"]|['\"]$/g, '')\n .replace(/`/g, '\\\\`')\n .replace(/\\\\(['\"])/g, '$1');\n}", "function quote(xs) {\n return array_map(xs, function (s) {\n return String(s).replace(/([#!\"$&'(),;<=>?@\\[\\\\\\]^`{|}])/g, '\\\\$1');\n }).join(' ');\n}", "function dquote() { return wrap('dquote', literal('\"')()); }", "function dquote() { return wrap('dquote', literal('\"')()); }", "function dquote() { return wrap('dquote', literal('\"')()); }", "function dquote() { return wrap('dquote', literal('\"')()); }", "function normalize(val) {\n var quotableRgx = /(\\n|,|\")/;\n if (quotableRgx.test(val)) return '\"' + val.replace(/\"/g, '\"\"') + '\"';\n return val;\n }", "function escapeChars(str){\n return String(str).replace(/'/g, '\\'\\'');\n}", "function unquote(str) {\n var res = str.trim();\n res = str.replace(/^'(.*)'$/, \"$1\");\n if (res == str) {\n res = str.replace(/^\"(.*)\"$/, \"$1\");\n }\n return res;\n}", "function sanitizeString(s) {\n return s.replace(/['\"]/g, '');\n}", "function reescape(str){\n\tfor(var i=0; i<str.length; i++){\n\t\tif(isEscapeable(str[i]) && str[i-1] != '\\\\'){\n\t\t\tstr = str.substring(0,i) + \"\\\\\" + str.substring(i);\n\t\t\ti++;\n\t\t}\n\t}\n\treturn str;\n}", "function quoted(str) {\n\t\treturn \"'\" + str + \"'\";\n\t}", "function quote(str) {\n return `'${str}'`;\n}", "function replaceEscapes(s) {\n return s.replace(/\\\\n/g, \"\\n\")\n .replace(/\\\\r/g, \"\\r\")\n .replace(/\\\\t/g, \"\\t\")\n .replace(/\\\\/g, \"\");\n }", "function quote(string) {\n return JSON.stringify(string);\n }", "function json_escape(s){\n return s.toString().replace(/&/g, \"\\u0026\")\n .replace(/</g, \"\\u003C\")\n .replace(/>/g, \"\\u003E\");\n}" ]
[ "0.70207036", "0.7013718", "0.70078886", "0.70078886", "0.70078886", "0.70078886", "0.70078886", "0.70078886", "0.70078886", "0.70078886", "0.70078886", "0.70078886", "0.70078886", "0.70078886", "0.70078886", "0.70078886", "0.70078886", "0.70078886", "0.70078886", "0.70078886", "0.70078886", "0.70078886", "0.70078886", "0.70078886", "0.70078886", "0.70078886", "0.70078886", "0.70078886", "0.6822742", "0.67761654", "0.6691356", "0.6691356", "0.6691356", "0.6691356", "0.65599936", "0.6484334", "0.64269155", "0.64168024", "0.63644975", "0.63386256", "0.63142097", "0.62479115", "0.622816", "0.619222", "0.6173448", "0.6149447", "0.6074444", "0.60239077", "0.60043067", "0.5994862", "0.5974166", "0.59613746", "0.5944695", "0.5940975", "0.59174675", "0.59141004", "0.5898376", "0.5898376", "0.5881967", "0.58684075", "0.584543", "0.58421576", "0.5814439", "0.57972515", "0.5790811", "0.57659817", "0.5760156", "0.5757213", "0.5751961", "0.57519484", "0.57399195", "0.5723204", "0.571643", "0.571643", "0.57139635", "0.5690736", "0.5690736", "0.5651513", "0.56513083", "0.56507945", "0.56487757", "0.56419194", "0.56406736", "0.56360996", "0.5623684", "0.55821276", "0.5579006", "0.5579006", "0.5579006", "0.5579006", "0.5570805", "0.5526592", "0.5526373", "0.5521851", "0.55161464", "0.5514977", "0.5512777", "0.55070907", "0.5504762", "0.5501675" ]
0.84380484
0
sync the location and zoom of the otherMaps to the sourceMap
function syncMaps(sourceMap, otherMaps) { var latlong = getLatLong(sourceMap); var zoom = getZoom(sourceMap); $.each(otherMaps, function(i, other) { centerMap(other, latlong); setZoom(other, zoom); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_synchronizeMaps(baseMap) {\n var targetMaps = this._maps.filter(function (m, i) { return m !== baseMap; });\n this._detachMapMoveHandlers();\n var cam = baseMap.getCamera();\n targetMaps.forEach(function (targetMap) {\n targetMap.setCamera({\n center: cam.center,\n zoom: cam.zoom,\n bearing: cam.bearing,\n pitch: cam.pitch,\n type: 'jump'\n });\n });\n this._attachMapMoveHandlers();\n }", "function changeMapState(src,tgt){\n tgt.setView(src.getCenter(), src.getZoom());\n}", "function sync(map, e) {\n map.setView(e.target.getCenter(), e.target.getZoom(), {\n animate: false,\n reset: true\n });\n }", "function synchronizeMap(){\n map.on(\"zoom-start\",function(){\n console.log(\"Graphic drawing suspended\");\n map.graphics.suspend();\n })\n\n map.on(\"zoom-end\",function(){\n console.log(\"Graphic drawing resumed\");\n map.graphics.resume();\n })\n }", "zoomMap() {\n PaintGraph.Pixels.zoomExtent(this.props.map, this.props.bbox)\n window.refreshTiles()\n window.updateTiles()\n }", "function initMap() {\r\n\r\n // Try HTML5 geolocation.\r\n if (navigator.geolocation) {\r\n navigator.geolocation.getCurrentPosition(function(position) {\r\n var pos = {\r\n lat: position.coords.latitude,\r\n lng: position.coords.longitude,\r\n };\r\n \r\n //set the zoom level to 11 on the map \r\n var map = new google.maps.Map(document.getElementById('map'), {\r\n zoom: 11\r\n });\r\n \r\n //set the zoom level to 6 on the map1 \r\n var map1 = new google.maps.Map(document.getElementById('map1'), {\r\n zoom: 6\r\n });\r\n \r\n //set the zoom level to 18 on the map2 \r\n var map2 = new google.maps.Map(document.getElementById('map2'), {\r\n zoom: 18,\r\n mapTypeId: google.maps.MapTypeId.SATELLITE\r\n });\r\n \r\n //set the position on the panorama map (streetView) pano \r\n var panorama = new google.maps.StreetViewPanorama(document.getElementById('pano'), {\r\n position: pos,\r\n pov: {heading: 34, pitch: 10}\r\n });\r\n \r\n //set the position on all the maps \r\n map.setStreetView(panorama); \r\n map.setCenter(pos);\r\n map1.setCenter(pos);\r\n map2.setCenter(pos);\r\n \r\n }, function() {\r\n handleLocationError(true, infoWindow, map.getCenter());\r\n });\r\n } else {\r\n // Browser doesn't support Geolocation\r\n handleLocationError(false, infoWindow, map.getCenter());\r\n }\r\n \r\n}", "function updateSource() {\n\n getPolygons(function(){\n map.panTo(sourceMarker.getLatLng())\n });\n updateAutocomplete(sourceAutoComplete, sourceMarker);\n }", "recenterMap() {\n const map = this.map;\n let curr = this.props.currentLocation;\n\n const google = this.props.google;\n const maps = google.maps;\n const zoom = this.props.zoom;\n\n if (map) {\n let center = new maps.LatLng(curr.lat, curr.lng);\n map.panTo(center);\n map.setZoom(zoom)\n }\n }", "function mapDataChanged(){\r\n //force an update\r\n onMapMoved();\r\n}", "function adjustToMyScaleAndLocation() {\n// GET MAP\nvar thisMap = getMap(_menuContentPane.id);\nvar thisMapScale = getMapScale(thisMap);\ndojo.forEach(_maps, function (otherMap) {\n if (otherMap.id !== thisMap.id) {\n\tvar otherMapLevel = getMapLevelByScale(otherMap, thisMapScale);\n\tif (otherMapLevel) {\n\t getCenter(thisMap, otherMap, function (otherCenter) {\n\t\totherMap.centerAndZoom(otherCenter, otherMapLevel);\n\t });\n\t}\n }\n});\n}", "function refreshMapPosition() {\n //alert(\"on Map\");\n roeMapTemp.resize();\n roeMapTemp.reposition();\n }", "function refreshMapPosition() {\n //alert(\"on Map\");\n roeMapCarbon.resize();\n roeMapCarbon.reposition();\n }", "function refreshMapPosition() {\n //alert(\"on Map\");\n roeMapSulf.resize();\n roeMapSulf.reposition();\n }", "function refreshMapPosition() {\n //alert(\"on Map\");\n roeMapLong.resize();\n roeMapLong.reposition();\n }", "function refreshMapPosition() {\n //alert(\"on Map\");\n roeMapRel.resize();\n roeMapRel.reposition();\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 setSecondMap(mapObject) {\n secondMap = new google.maps.Map(mapObject, mapOptions);\n google.maps.event.addListener(secondMap, 'idle', function () {\n google.maps.event.trigger(secondMap, 'resize');\n });\n \n }", "function refreshMapPosition() {\n //alert(\"on Map\");\n roeMapPrecip.resize();\n roeMapPrecip.reposition();\n }", "function refreshMapPosition() {\n //alert(\"on Map\");\n roeMapAbsSea.resize();\n roeMapAbsSea.reposition();\n }", "resetMapLocation() {\n\t\tthis.map.setCenter({\n\t\t\tlat: locsearch.map_attributes.initial_lat,\n\t\t\tlng: locsearch.map_attributes.initial_lng,\n\t\t});\n\t\tthis.map.setZoom( locsearch.map_attributes.max_zoom );\n\t}", "function optimizeZoom(){\n\t\t\tif(controller.mapData && controller.mapData.mapBounds){\n\t\t\t\t// fit map to given bounds\n\t\t\t\tvar bounds = controller.mapData.mapBounds;\n\t\t\t\tvar corr = 0.001;\n\t\t\t\tvar nw = new nokia.maps.geo.Coordinate(bounds.maxLatitude + corr, bounds.minLongitude -corr);\n\t\t\t\tvar se = new nokia.maps.geo.Coordinate(bounds.minLatitude - corr, bounds.maxLongitude + corr);\n\t\t\t\tscope.map.zoomTo(new nokia.maps.geo.BoundingBox(nw, se), false);\n\t\t\t\tscope.map.update();\n\t\t\t}\n\t\t}", "function refreshMapPosition() {\n //alert(\"on Map\");\n roeMapTNit.resize();\n roeMapTNit.reposition();\n }", "function updateMiniMapCoords() {\n\t\tif (this.hasExtendedInformation) {\n\t\t\tthis.minimap.updateMiniWindow();\n\t\t}\n\t}", "function reCenterMap() {\n // map.setCenter({ lat: yourLat, lng: yourLng })\n map.setCenter( origMapCenter );\n } // reCenterMap()", "function setMapOnAll(map) {\n for (let i = 0; i < originMarkersArray.length; i++) {\n originMarkersArray[i].setMap(map);\n }\n for (let i = 0; i < currentMarkersArray.length; i++) {\n currentMarkersArray[i].setMap(map);\n }\n for (var i = 0; i < destinationMarkersArray.length; i++) {\n destinationMarkersArray[i].setMap(map);\n }\n }", "function zoomOnMap(lats,lngs){\n map.getView().setCenter(ol.proj.transform([lats, lngs], 'EPSG:4326', 'EPSG:3857'));\n map.getView().setZoom(10);\n}", "function refreshMapPosition() {\n //alert(\"on Map\");\n roeMapWetS.resize();\n roeMapWetS.reposition();\n }", "recenterView(zoom) {\n const { sidePanelOpen, siteDetail } = this.props;\n const { siteCenterChange } = this.state;\n\n if (sidePanelOpen && siteDetail && siteCenterChange) {\n const siteLatlng = [siteDetail.geometry.coordinates[1], siteDetail.geometry.coordinates[0]];\n\n this.map.setView(siteLatlng, zoom);\n this.setState({ siteCenterChange: false });\n }\n }", "function refreshMapPosition() {\n //alert(\"on Map\");\n roeMapWetN.resize();\n roeMapWetN.reposition();\n }", "function refreshMapPosition() {\n //alert(\"on Map\");\n roeMapNLCD.resize();\n roeMapNLCD.reposition();\n }", "function refreshMapPosition() {\n //alert(\"on Map\");\n roeMapGulf.resize();\n roeMapGulf.reposition();\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}", "_updateMarkers() {\n\t const coords = [];\n\t const markers = [];\n\t const that = this;\n\n\t // console.debug( 'updating markers', this.points );\n\n\t if (this.markerLayer) {\n\t this.markerLayer.clearLayers();\n\t }\n\n\t if (this.points.length < 2 && this.points[0].join() === '') {\n\t return;\n\t }\n\n\t this.points.forEach((latLng, index) => {\n\t const icon =\n\t that.props.type === 'geopoint'\n\t ? iconSingle\n\t : index === that.currentIndex\n\t ? iconMultiActive\n\t : iconMulti;\n\t if (that._isValidLatLng(latLng)) {\n\t coords.push(that._cleanLatLng(latLng));\n\t markers.push(\n\t leafletSrc.marker(that._cleanLatLng(latLng), {\n\t icon,\n\t clickable: !that.props.readonly,\n\t draggable: !that.props.readonly,\n\t alt: index,\n\t opacity: 0.9,\n\t })\n\t .on('click', (e) => {\n\t if (\n\t e.target.options.alt === 0 &&\n\t that.props.type === 'geoshape'\n\t ) {\n\t that._closePolygon();\n\t } else {\n\t that._setCurrent(e.target.options.alt);\n\t }\n\t })\n\t .on('dragend', (e) => {\n\t const latLng = e.target.getLatLng();\n\t const index = e.target.options.alt;\n\n\t // reduce precision to 6 decimals\n\t latLng.lat =\n\t Math.round(latLng.lat * 1000000) / 1000000;\n\t latLng.lng =\n\t Math.round(latLng.lng * 1000000) / 1000000;\n\n\t if (\n\t that.polyline &&\n\t that.props.type === 'geoshape' &&\n\t that.updatedPolylineWouldIntersect(\n\t latLng,\n\t index\n\t )\n\t ) {\n\t that._showIntersectError();\n\t that._updateMarkers();\n\t } else {\n\t // first set the current index the point dragged\n\t that._setCurrent(index);\n\t that._updateInputs(latLng, 'change.bymap');\n\t that._updateMap();\n\t }\n\t })\n\t );\n\t } else {\n\t console.warn('this latLng was not considered valid', latLng);\n\t }\n\t });\n\n\t // console.log( 'markers to update', markers );\n\n\t if (markers.length > 0) {\n\t this.markerLayer = leafletSrc.layerGroup(markers).addTo(this.map);\n\t // change the view to fit all the markers\n\t // don't use this for multiple markers, it messed up map clicks to place points\n\t if (\n\t this.points.length === 1 ||\n\t !this._isValidLatLngList(this.points)\n\t ) {\n\t // center the map, keep zoom level unchanged\n\t this.map.setView(coords[0], this.lastZoom || defaultZoom);\n\t }\n\t }\n\t }", "function initiateZoom() {\n // Define a \"minzoom\" whereby the \"Countries\" is as small possible without leaving white space at top/bottom or sides\n minZoom = Math.max($(\"#map-holder\").width() / w, $(\"#map-holder\").height() / h);\n // set max zoom to a suitable factor of this value\n maxZoom = 20 * minZoom;\n // set extent of zoom to chosen values\n // set translate extent so that panning can't cause map to move out of viewport\n zoom.scaleExtent([minZoom, maxZoom])\n .translateExtent([[0, 0], [w, h]]);\n // define X and Y offset for centre of map to be shown in centre of holder\n let midX = ($(\"#map-holder\").width() - minZoom * w) / 2;\n let midY = ($(\"#map-holder\").height() - minZoom * h) / 2;\n // change zoom transform to min zoom and centre offsets\n svg.call(zoom.transform, d3.zoomIdentity.translate(midX, midY).scale(minZoom));\n }", "function refreshMapPosition() {\n //alert(\"on Map\");\n roeMapRadon.resize();\n roeMapRadon.reposition();\n }", "function map_update(){\n\n\n canvasWidth = canvasLayer.canvas.width;\n canvasHeight = canvasLayer.canvas.height;\n left_context.clearRect(0,0, canvasWidth, canvasHeight);\n left_context.globalAlpha = 1.0;\n\n /* We need to scale and translate the map for current view.\n * see https://developers.google.com/maps/documentation/javascript/maptypes#MapCoordinates\n */\n mapProjection = left_map.getProjection();\n\n /**\n * Clear transformation from last update by setting to identity matrix.\n * Could use context.resetTransform(), but most browsers don't support\n * it yet.\n */\n left_context.setTransform(1, 0, 0, 1, 0, 0);\n\n // scale is just 2^zoom\n // If canvasLayer is scaled (with resolutionScale), we need to scale by\n // the same amount to account for the larger canvas.\n var scale = Math.pow(2, left_map.zoom) * resolutionScale;\n left_context.scale(scale, scale);\n\n // Synchronize two maps.\n if(right_map != undefined){\n right_map.setZoom(left_map.zoom);\n if(left_map.getCenter()!=right_map.getCenter()){\n last_left_center = left_map.getCenter();\n right_map.setCenter(left_map.getCenter());\n }\n }\n\n /* If the map was not translated, the topLeft corner would be 0,0 in\n * world coordinates. Our translation is just the vector from the\n * world coordinate of the topLeft corder to 0,0.\n */\n if(mapProjection != undefined && coresetData.length != 0){\n var offset = mapProjection.fromLatLngToPoint(canvasLayer.getTopLeft());\n left_context.translate(-offset.x, -offset.y);\n map_draw();\n }\n\n //draw\n}", "function initDestinationMaps() {\n // Destination card 1 map\n var hike1 = { lat: markerData[0].lat, lng: markerData[0].lon };\n var map2 = new google.maps.Map(document.getElementById(\"map2\"), {\n zoom: 12,\n disableDefaultUI: true,\n center: hike1,\n mapTypeId: \"terrain\"\n });\n var marker = new google.maps.Marker({ position: hike1, map: map2 });\n\n // Destination card 2 map\n var hike2 = { lat: markerData[1].lat, lng: markerData[1].lon };\n var map3 = new google.maps.Map(document.getElementById(\"map3\"), {\n zoom: 12,\n disableDefaultUI: true,\n center: hike2,\n mapTypeId: \"terrain\"\n });\n var marker = new google.maps.Marker({ position: hike2, map: map3 });\n\n // Destination card 3 map\n var hike3 = { lat: markerData[2].lat, lng: markerData[2].lon };\n var map4 = new google.maps.Map(document.getElementById(\"map4\"), {\n zoom: 12,\n disableDefaultUI: true,\n center: hike3,\n mapTypeId: \"terrain\"\n });\n var marker = new google.maps.Marker({ position: hike3, map: map4 });\n\n // Destination card 4 map\n var hike4 = { lat: markerData[3].lat, lng: markerData[3].lon };\n var map5 = new google.maps.Map(document.getElementById(\"map5\"), {\n zoom: 12,\n disableDefaultUI: true,\n center: hike4,\n mapTypeId: \"terrain\"\n });\n var marker = new google.maps.Marker({ position: hike4, map: map5 });\n\n // Destination card 5 map\n var hike5 = { lat: markerData[4].lat, lng: markerData[4].lon };\n var map6 = new google.maps.Map(document.getElementById(\"map6\"), {\n zoom: 12,\n disableDefaultUI: true,\n center: hike5,\n mapTypeId: \"terrain\"\n });\n var marker = new google.maps.Marker({ position: hike5, map: map6 });\n}", "function refreshMapPosition() {\n //alert(\"on Map\");\n roeMapFAL.resize();\n roeMapFAL.reposition();\n }", "_updateMap() {\n const options = get(this, '_options');\n get(this, 'map').setOptions(options);\n }", "function refreshMapPosition() {\n //alert(\"on Map\");\n roeMapEco.resize();\n roeMapEco.reposition();\n }", "swapBasemap(toAdd) {\n this.currentSources = []\n this.currentLayers = []\n\n // First record which layers are currently on the map\n Object.keys(mapStyle.sources).forEach(source => {\n let isPresent = this.map.getSource(source)\n if (isPresent) {\n this.currentSources.push({\n id: source,\n config: mapStyle.sources[source],\n data: isPresent._data || null\n })\n }\n })\n\n mapStyle.layers.forEach(layer => {\n let isPresent = this.map.getLayer(layer.id)\n if (isPresent) {\n this.currentLayers.push({\n layer: layer,\n filters: this.map.getFilter(layer.id)\n })\n }\n })\n\n // Set the style. `style.load` will be fired after to readd other layers\n this.map.setStyle(toAdd)\n }", "function recenterMap(target) {\n console.log(target)\n map.setView(target,8);\n}", "recenterMap() {\n const map = this.map;\n const current = this.state.currentLocation;\n\n const google = this.props.google;\n const maps = google.maps;\n\n if (map) {\n let center = new maps.LatLng(current.lat, current.lng);\n map.panTo(center);\n }\n }", "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 initiateZoom() {\n // Define a \"minzoom\" whereby the \"Countries\" is as small possible without leaving white space at top/bottom or sides\n minZoom = Math.max($(\"#map-holder\").width() / w, $(\"#map-holder\").height() / h);\n // set max zoom to a suitable factor of this value\n maxZoom = 20 * minZoom;\n // set extent of zoom to chosen values\n // set translate extent so that panning can't cause map to move out of viewport\n zoom\n .scaleExtent([minZoom, maxZoom])\n .translateExtent([\n [0, 0],\n [w, h]\n ]);\n // define X and Y offset for centre of map to be shown in centre of holder\n midX = ($(\"#map-holder\").width() - minZoom * w) / 2;\n midY = ($(\"#map-holder\").height() - minZoom * h) / 2;\n // change zoom transform to min zoom and centre offsets\n svg.call(zoom.transform, d3.zoomIdentity.translate(midX, midY).scale(minZoom));\n}", "function refreshMapPosition() {\n //alert(\"on Map\");\n roeMapAcid.resize();\n roeMapAcid.reposition();\n }", "update() {\n super.update();\n\n this.updateMiniMap();\n }", "function refreshMapPosition() {\n //alert(\"on Map\");\n roeMapBio.resize();\n roeMapBio.reposition();\n }", "function setMapView() {\n var gmCenter = new google.maps.LatLng(STATE_GEOS[CURR_STATE].LocLat, STATE_GEOS[CURR_STATE].LocLon);\n MAP.setCenter(gmCenter);\n MAP.setZoom(parseInt(STATE_GEOS[CURR_STATE].ZoomLevel));\n}", "function initialize() {\n\n // definição do mapa\n var pos1 = origin.split(\",\");\n var x = parseFloat(pos1[0]);\n var y = parseFloat(pos1[1]);\n\n var mapProp = {\n center:new google.maps.LatLng(x, y),\n zoom:13,\n mapTypeId:google.maps.MapTypeId.ROADMAP\n };\n var map=new google.maps.Map(document.getElementById(\"googleMap\"), mapProp);\n\n // marcador de origem\n var myLatLng = {lat: x, lng: y};\n var OriginMarker = new google.maps.Marker({\n position: myLatLng,\n map: map,\n title: 'Origem!'\n });\n\n // descobrindo parada mais próxima\n var parada = nearestParada(x, y);\n\n var splitCoord = coordinates[parada].split(\",\");\n var paradaEntradaX = parseFloat(splitCoord[0]);\n var paradaEntradaY = parseFloat(splitCoord[1]);\n\n //marcador de destino\n var myDestLatLng = {lat: paradaEntradaX, lng: paradaEntradaY};\n var destMarker = new google.maps.Marker({\n position: myDestLatLng,\n map: map,\n title: 'Destino!'\n });\n /**/\n var latlngbounds = new LatLngBounds();\n latlngbounds.extend(myDestLatLng);\n latlngbounds.extend(myLatLng);\n\n map.setCenter(latlngbounds.getCenter(), map.getBoundsZoomLevel(latlngbounds));\n}", "forceUpdate() {\n this.props.dispatch({ type: \"FORCE_MAP_UPDATE_ENFORCED\"});\n this.setState({\n viewport:{\n ...this.state.viewport,\n latitude: this.props.store.cordReducer.lat,\n longitude: this.props.store.cordReducer.lng\n }\n });\n }", "initiateZoom() {\n var self = this;\n // Inside initiateZoon, reset the old scale factor\n self.previous_scale = 0;\n // Define a \"minzoom\" whereby the \"Countries\" is as small possible without leaving white space at top/bottom or sides\n self.minZoom = Math.min($(\"#map-holder\").width() / (self.w), $(\"#map-holder\").height() / (self.h));\n // set max zoom to a suitable factor of this value\n self.maxZoom = 20 * self.minZoom;\n\n \n // define X and Y offset for centre of map to be shown in centre of holder\n var midX = ($(\"#map-holder\").width() - self.minZoom * self.w) / 2;\n var midY = ($(\"#map-holder\").height() - self.minZoom * self.h) / 2;\n // change zoom transform to min zoom and centre offsets\n self.svg.call(self.zoom.transform, d3.zoomIdentity.translate(midX, midY).scale(self.minZoom));\n // self.previous_scale = self.minZoom;\n \n \n var box = self.path.bounds(self.selected_state_data);\n var centroid = self.path.centroid(self.selected_state_data);\n var paddingPerc = 20;\n var minXY = box[0];\n var maxXY = box[1];\n // find size of map area defined\n var zoomWidth = Math.abs(minXY[0] - maxXY[0]);\n var zoomHeight = Math.abs(minXY[1] - maxXY[1]);\n // find midpoint of map area defined\n var zoomMidX = centroid[0];\n var zoomMidY = centroid[1];\n // increase map area to include padding\n zoomWidth = zoomWidth * (1 + paddingPerc / 100);\n zoomHeight = zoomHeight * (1 + paddingPerc / 100);\n // find scale required for area to fill svg\n var maxXscale = $(\"svg\").width() / zoomWidth;\n var maxYscale = $(\"svg\").height() / zoomHeight;\n var zoomScale = Math.min(maxXscale, maxYscale);\n // handle some edge cases\n // limit to max zoom (handles tiny countries)\n zoomScale = Math.min(zoomScale, self.maxZoom);\n // limit to min zoom (handles large countries and countries that span the date line)\n zoomScale = Math.max(zoomScale, self.minZoom);\n // Find screen pixel equivalent once scaled\n var offsetX = zoomScale * zoomMidX;\n var offsetY = zoomScale * zoomMidY;\n // Find offset to centre, making sure no gap at left or top of holder\n var dleft = Math.min(0, $(\"svg\").width() / 2 - offsetX);\n var dtop = Math.min(0, $(\"svg\").height() / 2 - offsetY);\n // Make sure no gap at bottom or right of holder\n dleft = Math.max($(\"svg\").width() - self.w * zoomScale, dleft);\n dtop = Math.max($(\"svg\").height() - self.h * zoomScale, dtop);\n \n // Set zoom\n self.svg \n .call(\n self.zoom.transform,\n d3.zoomIdentity.translate(dleft, dtop).scale(zoomScale)\n );\n \n var minX = box[0][0];\n var minY = box[0][1];\n var maxX = box[1][0];\n var maxY = box[1][1]; \n \n // 20% Free movement\n minX = minX -(minX *.2);\n minY = minY -(minY *.2);\n maxX = maxX +(maxX *.2);\n maxY = maxY +(maxY *.2);\n \n self.zoom\n .scaleExtent([zoomScale, zoomScale*20])\n .translateExtent( [ [ minX, minY ], [ maxX, maxY ] ] );\n }", "function reZoomMap() {\n \n largeInfoWindow.close();\n var myLatlng = { lat: 40.706086, lng: -73.99686 };\n map.setCenter(myLatlng);\n map.setZoom(11);\n }", "function resetMap(map) {\r\n\r\n mapZoom = 1;\r\n\r\n viewBoxCoords[0] = 0;\r\n viewBoxCoords[1] = 0;\r\n viewBoxCoords[2] = originW;\r\n viewBoxCoords[3] = originH;\r\n\r\n originViewBox.x = 0;\r\n originViewBox.y = 0;\r\n originViewBox.width = originW;\r\n originViewBox.height = originH;\r\n\r\n //map.setViewBox(viewBoxCoords[0], viewBoxCoords[1], viewBoxCoords[2], viewBoxCoords[3], false);\r\n map.animateViewBox(originViewBox, viewBoxCoords[0], viewBoxCoords[1], viewBoxCoords[2], viewBoxCoords[3], 250, animationFinished);\r\n\r\n readyToAnimate = true;\r\n\r\n }", "function refreshAndInitMap() {\n // Remove all added layer:\n removeAllLayers();\n // Remove all source:\n removeAllSources();\n}", "function refreshMapPosition() {\n //alert(\"on Map\");\n roeMapFPL.resize();\n roeMapFPL.reposition();\n }", "constructor(primaryMap, spyMap, options) {\n this._options = {\n borderColor: '#555555',\n borderWidth: 5,\n opacity: 1,\n shape: 'circle',\n size: 350\n };\n this._syncEvents = [];\n this._maps = [];\n this._primaryMap = primaryMap;\n this._spyMap = spyMap;\n var container = this._spyMap.getMapContainer();\n container.style.position = 'absolute';\n this._spyMap.events.add('ready', () => {\n container.getElementsByClassName('azure-map-logo')[0].style.display = 'none';\n container.getElementsByClassName('map-copyright')[0].style.display = 'none';\n });\n this.setOptions(this._options);\n if (options) {\n this.setOptions(options);\n }\n this._maps = [this._primaryMap, this._spyMap];\n //Bind sync events and synchronize the map views.\n this._maps.forEach((map, index) => {\n this._syncEvents[index] = this._synchronizeMaps.bind(this, map);\n });\n //Sync all map views with the first map.\n this._syncEvents[0]();\n //Attach the map move handler.\n this._attachMapMoveHandlers();\n }", "function reloadMap () {\n const lastCenter = map.getCenter();\n const lastZoom = map.getZoom();\n google.maps.event.trigger(map, 'resize');\n map.setCenter(lastCenter);\n map.setZoom(lastZoom);\n }", "function gmapRecenter(map) {\n var latnew = Number(document.getElementById(\"pln-latitude\").value);\n const lngnew = Number(document.getElementById(\"pln-longitude\").value);\n const loca = { lat: latnew, lng: lngnew };\n map.setCenter(loca);\n map.setZoom(15);\n\n //* Also recentre Bing Map at the same time\n GetMap(document.getElementById(\"pln-latitude\").value, document.getElementById(\"pln-longitude\").value);\n}", "_combineOptions() {\n return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__[\"combineLatest\"])([this._options, this._center, this._zoom])\n .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__[\"map\"])(([options, center, zoom]) => {\n const combinedOptions = Object.assign(Object.assign({}, options), { \n // It's important that we set **some** kind of `center`, otherwise\n // Google Maps will render a blank rectangle which looks broken.\n center: center || options.center || DEFAULT_OPTIONS.center, zoom: zoom !== undefined ? zoom : options.zoom, mapTypeId: this.mapTypeId });\n return combinedOptions;\n }));\n }", "function setCoordinates()\n {\n var Coords = [];\n angular.forEach(map, function (relation) {\n var from = relation.source,\n to = relation.target;\n\n if(data[from] != undefined && data[to] != undefined) {\n var thisCord = getNearestPoints(from, to);\n if(thisCord !== null) {\n Coords.push(thisCord);\n }\n }\n });\n angular.extend(coordinates, Coords);\n }", "function mapper_initialize(\n map_markers_raw,\n mapper_countrycode,\n mapper_south,\n mapper_west,\n mapper_north,\n mapper_east,\n mapper_cover_all_points\n )\n{\n if(map_div) return;\n map_div = document.getElementById(\"map\");\n if(!map_div) return;\n\n if (!GBrowserIsCompatible()) return;\n\n if(map) return;\n map = new GMap2(document.getElementById(\"map\"));\n // map = new google.maps.Map2(document.getElementById(\"map\"));\n\n var mapControl = new GMapTypeControl();\n map.addControl(mapControl);\n map.addControl(new GSmallMapControl());\n // map.removeMapType(G_HYBRID_MAP);\n\n // setup custom icon support\n mapper_icons();\n\n // try to respect supplied map boundaries for the very first refresh before user does any actions\n map_countrycode = mapper_countrycode;\n map.south = mapper_south;\n map.west = mapper_west;\n map.north = mapper_north;\n map.east = mapper_east;\n\n // recenter now\n var map_please_recenter = true;\n if(map.north < 0.0 || map.north > 0.0 || map.south < 0.0 || map.south > 0.0) {\n map_please_recenter = false;\n var bounds = new GLatLngBounds( new GLatLng(map.south,map.west,false), new GLatLng(map.north,map.east,false) );\n var center = bounds.getCenter();\n var zoom = map.getBoundsZoomLevel(bounds);\n if(zoom < 2 ) zoom = 2;\n map.setCenter(center,zoom);\n }\n\n // capture map location whenever the map is moved and go ahead and ask for a view of that areas markers from our own server\n if(map_location_callback) {\n GEvent.addListener(map, \"moveend\", function() {\n mapper_save_location();\n // when the map is moved go ahead and fetch new markers [ but do not center on them ]\n mapper_page_paint_request(false);\n });\n // also capture map location once at least\n mapper_save_location();\n }\n\n // add features from a statically cached list if any [ this can help make first page display a bit faster ]\n mapper_inject(map_markers_raw);\n\n // center on any data we have already if any [ slight tension here with dynamic updates so can be disabled ]\n if( map_please_recenter && mapper_cover_all_points ) {\n \tmapper_center();\n }\n\n // ask to add features from a remote connection dynamically [ and will center on them ]\n mapper_page_paint_request(map_please_recenter);\n\n // call a user callback as a last step\n //if(self[mapper_usercallback] && typeof mapper_usercallback = 'function') {\n // mapper_usercallback();\n //}\n}", "function repositionMarkers(zoom) {\r\n\t\tvar sets = $['mapsettings'];\r\n\t\t$.each(sets.markers, function(i,item){\r\n\t\t\tif(typeof(sets.markerLocations[i][zoom]) != 'undefined') {\r\n\t\t\t\titem.css('left', sets.markerLocations[i][zoom].x).css('top', sets.markerLocations[i][zoom].y);\r\n\t\t\t} else {\r\n\t\t\t\tvar point = new Point(parseInt(item.css('left')), parseInt(item.css('top')));\r\n\t\t\t\tvar offset = getPointZoomOffset(point, zoom);\r\n\t\t\t\tsets.markerLocations[i][zoom] = offset;\r\n\t\t\t\titem.css('left', offset.x).css('top', offset.y);\r\n\t\t\t}\r\n\t\t});\r\n\t}", "function updateViewport(minx, miny, maxx, maxy) {\n \n //$('#map').LoadingOverlay(\"show\");\n //myUrlm = 'geo_small.php?minx=' + minx + '&miny=' + miny + '&maxx=' + maxx + '&maxy=' + maxy;\n //$.ajax({\n // url: myUrlm,\n // type: 'GET',\n // dataType: \"text json\",\n // success: function (res) {\n // var yields_dots = res;\n // const coll = [];\n // if (yields_dots.features){\n // for (let f of yields_dots.features) {\n // coll.push(turf.buffer(f, 50, {\n // units: 'meters'\n // }));\n // }\n // var yields = turf.featureCollection(coll);\n // var s = map.getSource('yields');\n // if (s){\n // s.setData(yields); \n // } else {\n // setTimeout(map.getSource('yields').setData(yields), 300);\n // }\n // }\n // $('#map').LoadingOverlay(\"hide\");\n // }\n //});\n myUrl = 'main.php?qry=getTopTen1&minx=' + minx + '&miny=' + miny + '&maxx=' + maxx + '&maxy=' + maxy;\n $.ajax({\n url: myUrl,\n type: 'GET',\n dataType: \"text json\",\n success: function (res) {\n if (res != \"\") {\n res.sort(function (a, b) {\n return a.y - b.y;\n });\n setTimeout(function () {\n loadbars(res);\n repImage(res[0].url);\n }, 200);\n }\n }\n });\n}", "function initMap() {\n const sharedOptions = {\n center: {\n lat: 47.609414458375674,\n lng: -122.33897030353548\n },\n zoom: 17,\n disableDefaultUI: true,\n gestureHandling: \"none\"\n };\n new google.maps.Map(document.getElementById(\"left\"), {\n ...sharedOptions,\n mapId: \"ed1309c122a3dfcb\",\n useStaticMap: false\n });\n new google.maps.Map(document.getElementById(\"right\"), {\n ...sharedOptions,\n mapId: \"ed1309c122a3dfcb\",\n useStaticMap: true\n });\n }", "refreshZoom() {}", "function update() {\n origins.attr('cx',function(d) { return map.latLngToLayerPoint(d.origin).x; });\n origins.attr('cy',function(d) { return map.latLngToLayerPoint(d.origin).y; });\n origins.attr('r',function(d) {\n return map.getZoom() < 13 ? 0.000732422*Math.pow(2,map.getZoom()) : 0.000488281*Math.pow(2,map.getZoom());\n });\n destinations.attr('cx',function(d) { return map.latLngToLayerPoint(d.destination).x; });\n destinations.attr('cy',function(d) { return map.latLngToLayerPoint(d.destination).y; });\n destinations. attr('r',function(d) {\n return map.getZoom() < 13 ? 0.000732422*Math.pow(2,map.getZoom()) : 0.000488281*Math.pow(2,map.getZoom());\n });\n connections.attr('x1', function (d) { return map.latLngToLayerPoint(d.origin).x; });\n connections.attr('y1', function (d) { return map.latLngToLayerPoint(d.origin).y; });\n connections.attr('x2', function (d) { return map.latLngToLayerPoint(d.destination).x; });\n connections.attr('y2', function (d) { return map.latLngToLayerPoint(d.destination).y; });\n connections.attr('stroke-width', function (d) {\n return map.getZoom() < 13 ? 0.000732422*Math.pow(2,map.getZoom()) : 0.000488281*Math.pow(2,map.getZoom());\n });\n }", "function reDirectMap(event) {\n console.log(\"clicked!\");\n var lat = parseFloat($(this).attr(\"lat\"));\n var lng = parseFloat($(this).attr(\"lng\"));\n console.log(`lat: ${lat}, lng: ${lng}`);\n map.setCenter({\n lat: lat,\n lng,\n lng\n });\n map.setZoom(10);\n}", "function mapReset() {\n\tinfoWindow.map ? reposInfoWindow() : map.fitBounds(bounds);\n}", "function initMap(location, location2) {\n\n //This function will draw a line between two points on the map\n //https://cloud.google.com/blog/products/maps-platform/how-calculate-distances-map-maps-javascript-api\n function haversine_distance(mk1, mk2) {\n var R = 3958.8; // Radius of the Earth in miles\n var rlat1 = mk1.position.lat() * (Math.PI / 180); // Convert degrees to radians\n var rlat2 = mk2.position.lat() * (Math.PI / 180); // Convert degrees to radians\n var difflat = rlat2 - rlat1; // Radian difference (latitudes)\n var difflon = (mk2.position.lng() - mk1.position.lng()) * (Math.PI / 180); // Radian difference (longitudes)\n\n var d = 2 * R * Math.asin(Math.sqrt(Math.sin(difflat / 2) * Math.sin(difflat / 2) + Math.cos(rlat1) * Math.cos(rlat2) * Math.sin(difflon / 2) * Math.sin(difflon / 2)));\n return d * 1.60934; //converted to km\n }\n\n var map = new google.maps.Map(document.getElementById(\"map\"), {\n zoom: 12,\n center: location\n });\n\n var marker = new google.maps.Marker({\n position: location,\n map: map\n });\n var infoWindow = new google.maps.InfoWindow({\n content: \"<h5> source </h5>\"\n });\n marker.addListener(\"click\", function() {\n infoWindow.open(map, marker);\n });\n\n\n var marker2 = new google.maps.Marker({\n position: location2,\n map: map\n });\n var infoWindow2 = new google.maps.InfoWindow({\n content: \"<h5> dest </h5>\"\n });\n marker2.addListener(\"click\", function() {\n infoWindow2.open(map, marker2);\n });\n\n // Draw a line showing the straight distance between the markers\n var line = new google.maps.Polyline({\n path: [location, location2],\n map: map\n });\n\n var distance = haversine_distance(marker, marker2);\n\n return distance;\n\n}", "function setMap(){\n\t//map frame dimensions\n\tvar width = window.innerWidth,\n\t\theight = window.innerHeight;\n\n\t//create new svg container for the map\n\tvar map = d3.select(\"body\")\n\t\t.append(\"svg\")\n\t\t.attr(\"class\", \"map\")\n\t\t.style(\"background-color\", '#d8fdff')\n\t\t.attr(\"width\", width)\n\t\t.attr(\"height\", height);\n\n\t//create Albers equal area conic projection centered on France\n\tvar projection = d3.geoOrthographic()\n\t\t.center([-16, 62]) //oblique view north from equator\n\t\t.rotate([123, 10, 36])\n\t\t.scale(5000)\n\t\t.translate([width / 2, height / 2]);\n\n\tvar path = d3.geoPath(projection);\n\n\t//use queue.js to parallelize asynchronous data loading\n\tqueue()\n\t\t.defer(d3.json, \"data/timesapprox.topojson\") //load topojson file\n\t\t.defer(d3.json, \"data/moves.geojson\")\n\t\t.defer(d3.json, \"data/cities.geojson\")\n\t\t.await(callback);\n\n\tfunction callback(error, data, moves, cities){\n\t\t//translate europe and France TopoJSONs\n\t\tvar land = topojson.feature(data, data.objects.land),\n\t\t\ta0lines = topojson.feature(data, data.objects.admin0_lines),\n\t\t\ta1lines = topojson.feature(data, data.objects.admin1_lines);\n\t\t\n\t\t//add geometries to map\n\t\tvar land_path = map.append(\"path\")\n\t\t\t.datum(land)\n\t\t\t.attr(\"class\", \"land\")\n\t\t\t.attr(\"fill\", \"#e2ffd8\")\n\t\t\t.attr(\"stroke\", \"#999\")\n\t\t\t.attr(\"stroke-width\", \"2px\")\n\t\t\t.attr(\"stroke-linejoin\", \"round\")\n\t\t\t.attr(\"d\", path);\n\n\t\tvar a1lines_path = map.append(\"path\")\n\t\t\t.datum(a1lines)\n\t\t\t.attr(\"class\", \"a1lines\")\n\t\t\t.attr(\"fill\", \"none\")\n\t\t\t.attr(\"stroke\", \"#BBC7B2\")\n\t\t\t.attr(\"stroke-width\", \"2px\")\n\t\t\t.attr(\"stroke-linejoin\", \"round\")\n\t\t\t.attr(\"d\", path);\n\n\t\tvar a0lines_path = map.append(\"path\")\n\t\t\t.datum(a0lines)\n\t\t\t.attr(\"class\", \"a0lines\")\n\t\t\t.attr(\"fill\", \"none\")\n\t\t\t.attr(\"stroke\", \"#999\")\n\t\t\t.attr(\"stroke-width\", \"2px\")\n\t\t\t.attr(\"stroke-linejoin\", \"round\")\n\t\t\t.attr(\"d\", path);\n\n\t\tvar c = 0;\n\t\tmap.on(\"click\", function(){\n\t\t\tif (c < 3){\n\t\t\t\teval('setRoute'+(c+1)+'(map, path, moves.features['+c+'], cities)');\n\t\t\t\tc++;\n\t\t\t}\n\t\t});\n\t};\n}", "moveCameraToFitBounds(){\n console.log('ShowMap - moveCamera');\n if (!this.props.src || !this.props.dest || !this.state.mapboxGL) {\n return;\n }\n\n console.log('ShowMap - moveCamera');\n this.state.mapboxGL.fitBounds(this.props.src, this.props.dest, 50);\n \n\n }", "function zoomTo(zoomLevel) {\r\n\t\tvar offset = getZoomOffset(zoomLevel); \r\n\t\trepositionMarkers(zoomLevel);\r\n\t\trepositionInfoWindow(zoomLevel);\r\n\t\tsets.zoom = zoomLevel;\r\n\t\tmoveMap(offset); \r\n\t\tloadImages();\r\n\t\tupdateZoomSlider();\r\n\t}", "function updateMarkers() {}", "function initMap() {\n\t//Load 'map' utilizing google map api\n\tvar middle_norway = {lat: 65.14611484756372, lng: 13.18359375};\n\n\tmap = new google.maps.Map(document.getElementById('map'), {\n\t\tzoom: 4,\n\t\tcenter: middle_norway,\n\t\tmapTypeId: 'satellite',\n\t\tstreetViewControl: false,\n\t\tclickableIcons: false\n\t});\n\n\t//Init map listener which handles\n\tmap.addListener('click', function(event) {\n\t\tvar new_LatLng = event.latLng;\n\t\tif(editing == true && markerSelected.getPosition() != new_LatLng){\n \t\tmarkerSelected.setPosition(new_LatLng);\n \t\tnew_lat = markerSelected.getPosition().lat();\n\t\t\tnew_lng = markerSelected.getPosition().lng();\n\t\t}\n\t\telse{\n\t\t\treturn;\n\t\t}\n\t});\n}", "function update() {\n console.log('Map moved, Redrawing markers');\n\n // Using the GUP\n g.selectAll('path').exit().transition().duration(100).remove();\n\n g.selectAll('path').transition().duration(250).attr('d', path);\n }", "function updateMap() {\n\t//\treturn;\n// not sure if i need this\n\t\tconsole.log(\"updateMap()\");\n\t\tif (!prop(tractLayer.eachLayer)) return;\n\n\t\ttractLayer.eachLayer(function(layer) {\n\t\t\tif (MAP_DEBUG) console.log(\" -> eachLayer()\", layer.feature, layer);\n\n\t\t\t// reset properties, popup, events for each tract feature\n\t\t\tonEachTractFeature(layer.feature, layer);\n\n\t\t\t// reset layer style based on new data\n\t\t\tif (prop(layer.feature))\n\t\t\t\tlayer.setStyle(initialTractStyle(layer.feature));\n\t\t});\n\t}", "updateFromCamera() {\n this.updateLabelOffsets();\n this.updateBillboardOffsets();\n dispatcher.getInstance().dispatchEvent(MapEvent.GL_REPAINT);\n }", "function changeMapCenter() {\n deleteMarkers(); // clear markers out of both arrays since they will change.\n var geocoder = new google.maps.Geocoder(); // new geocoder instance\n var address = vm.userDefLocation(); // retreive address from te search bar\n // run geocode:\n geocoder.geocode({\n address: address\n }, function(results, status) {\n if (status == google.maps.GeocoderStatus.OK) {\n newCenter = results[0].geometry.location;\n map.setCenter(newCenter);\n map.setZoom(12);\n mapCenterMarker.setPosition(newCenter);\n } else {\n // if error thrown, alerts user\n window.alert(\"location could not be found, try another one!\");\n }\n });\n // Need to run updateShops() once the map has loaded and the new map center has been established\n // Needed to find when map load has finished, found solution online using the map 'idle' throw.\n // map idle solution found on stack overflow: (http://stackoverflow.com/questions/832692/how-can-i-check-whether-google-maps-is-fully-loaded)\n google.maps.event.addListenerOnce(map, 'idle', function() {\n updateShops();\n });\n}", "function setupMap() {\n\tvar bbox = getURLParameter('bbox') || \"-11.0133787,51.222,-5.6582362,55.636\";\n\tapi_url = \"https://api.openstreetmap.org/api/0.6/changesets?bbox=\" + bbox\n\tvar fields = bbox.split(',');\n\tvar minlong = fields[0] * 1;\n\tvar minlat = fields[1] * 1;\n\tvar maxlong = fields[2] * 1;\n\tvar maxlat = fields[3] * 1;\n\tmymap = L.map(\"mapid\", {editable: true});\n\tvar OpenStreetMap_Mapnik = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {\n\t\tmaxZoom: 19,\n\t\tattribution: '&copy; <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a>'\n\t});\n\tvar southwest = new L.latLng(minlat, minlong);\n\tvar northeast = new L.latLng(maxlat, maxlong);\n\tbounds = new L.LatLngBounds([southwest, northeast]);\n\tupdateLocationBar(minlong, minlat, maxlong, maxlat);\n\n\tmymap.fitBounds(bounds);\n\n\tOpenStreetMap_Mapnik.addTo(mymap);\n\n\tL.EditControl = L.Control.extend({});\n\tL.NewRectangleControl = L.EditControl.extend({});\n\tvar rectangle = L.rectangle([southwest,northeast]).addTo(mymap);\n\trectangle.enableEdit();\n\trectangle.on(\"editable:dragend editable:vertex:dragend\", function() {\n\t\tbounds = this.getBounds();\n\t\tupdateMap();\n\t});\n}", "function initMap() {\n var uluru = getUserLocation();\n map = new google.maps.Map(document.getElementById('map'), {\n zoom: 8,\n center: uluru\n });\n\n getImages(uluru);\n\n map.addListener('dragend', function() {\n var center = map.getCenter();\n getImages({lat: center.lat(), lng: center.lng()});\n });\n}", "function mapSource() {\n\t\n\tlet dataSelect = selectedSSP;\n\tconsole.log('New scenario: ' + selectedSSP.toLowerCase());\n\n\t// Fly to interesting location according to the selected model\n\tmap.flyTo({\n center: [85, 20],\n\t\tzoom: 4\n });\n\t\n\n\t// Add source\n\tmap.addSource(\"earthquakes\", {\n\t\ttype: \"geojson\",\n\t\tdata: \"data_\" + dataSelect.toLowerCase() + \".geojson\",\n\t\t//data: _data,\n\t\tcluster: false, // Set to true to sow clusters of points\n\t\tclusterMaxZoom: 6, // Max zoom to cluster points on\n\t\tclusterRadius: 10 // Radius of each cluster when clustering points (defaults to 50)\n\t});\n\n\tconsole.log('Data file ==> ' + \"data_\" + dataSelect.toLowerCase() + \".geojson\");\n}", "function viewchange() \n{\n // keep map centered on shuttle's marker\n var latlng = new google.maps.LatLng(shuttle.position.latitude, shuttle.position.longitude);\n map.setCenter(latlng);\n bus.setPosition(latlng);\n}", "function viewchange() \n{\n // keep map centered on shuttle's marker\n var latlng = new google.maps.LatLng(shuttle.position.latitude, shuttle.position.longitude);\n map.setCenter(latlng);\n bus.setPosition(latlng);\n}", "function updateMap() {\n get_geolocation();\n\n if (geolocation === null || geolocation === undefined) {\n return;\n }\n\n if (marker !== null) {\n marker.removeFrom(map);\n }\n marker = L.marker(geolocation, {\n draggable: true\n }).addTo(map);\n\n marker.on('dragend', function() {\n var coords = marker.getLatLng();\n $(\"#lat\")[0].value = coords['lat'];\n $(\"#lon\")[0].value = coords['lng'];\n updatePlot();\n setPage('plot');\n });\n}", "function initMap() {\n map = new google.maps.Map(document.getElementById('map'), {\n center: new google.maps.LatLng(40.730610,-73.935242),\n zoom: 8,\n mapTypeId: 'terrain'\n });\n loadKmlLayer(src, src2, map);\n }", "function updateMap(worldcupData) {\n\n //Clear any previous selections;\n clearMap();\n\n // ******* TODO: PART IV *******\n\n // Add a marker for the winner and runner up to the map.\n\n //Hint: remember we have a conveniently labeled class called .winner\n // as well as a .silver. These have styling attributes for the two\n //markers.\n //console.log(worldcupData);\n var hostCode = worldcupData.host_country_code;\n var runnerUpPos = worldcupData.ru_pos;\n var winnerPos = worldcupData.win_pos;\n var teams = worldcupData.teams_iso;\n\n teams.forEach(function(team){\n d3.select(\"#\" + team).attr(\"class\", \"team-map\");\n })\n\n d3.select(\"#\" + hostCode).attr(\"class\", \"host-map\");\n\n //console.log(winnerPos[0] + \"hi\");\n var points = d3.select(\"#points\");\n var winner = [{long: winnerPos[0], lat: winnerPos[1]}];\n\n points.selectAll(\".gold-map\")\n .data(winner)\n .enter()\n .append(\"circle\")\n .attr(\"transform\", function(d) {\n return \"translate(\" + projection([d.long,d.lat]) + \")\";\n })\n .attr('r', 0)\n .transition().duration(3000).ease(d3.easeBounce)\n .attr('class','gold-map')\n .attr('cx', 0)\n .attr('cy', 0)\n .attr('r', 10)\n .attr(\"transform\", function(d) {\n return \"translate(\" + projection([d.long,d.lat]) + \")\";\n });\n\n var runnerUp = [{long: runnerUpPos[0], lat: runnerUpPos[1]}];\n\n points.selectAll(\".silver-map\")\n .data(runnerUp)\n .enter()\n .append(\"circle\")\n .attr(\"transform\", function(d) {\n return \"translate(\" + projection([d.long,d.lat]) + \")\";\n })\n .attr('r', 0)\n .transition().duration(3000).ease(d3.easeBounce)\n .attr('class','silver-map')\n .attr('cx', 0)\n .attr('cy', 0)\n .attr('r', 10)\n .attr(\"transform\", function(d) {\n return \"translate(\" + projection([d.long,d.lat]) + \")\";\n });\n\n\n //Select the host country and change it's color accordingly.\n\n //Iterate through all participating teams and change their color as well.\n\n //We strongly suggest using classes to style the selected countries.\n\n\n\n}", "function refreshMap(data,sourceData,gadgetID){\n \tvar options = {\n region: 'US',\n\t\tshowTip: true, \n\t\tmapType: 'normal', \n\t\tenableScrollWheel: true,\n\t\tuseMapTypeControl: true\n\t};\n\tvar map = new google.visualization.Map(document.getElementById(gadgetID));\n\tmap.draw(data, options);\n}", "function adjustToMyLocation() {\n// GET MAP\nvar thisMap = getMap(_menuContentPane.id);\n// ADJUST LOCATIONS\nsyncMapLocations(thisMap);\n}", "function setMapOnAll(map) {\n for (let i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n for (let i = 0; i < choiceMarkers.length; i++) {\n choiceMarkers[i].setMap(map);\n } \n for (let i = 0; i < searchResMarkers.length; i++) {\n searchResMarkers[i].setMap(map);\n } \n}//setMapOnAll", "function replaceMap() {\n //check is coordinates values are empty or not\n if ((document.getElementById(\"longi\").value) & (document.getElementById(\"lat\").value)) {\n\n map.center = [parseFloat((document.getElementById(\"longi\")).value), parseFloat((document.getElementById(\"lat\")).value)];\n\n // same point without altitude\n var point1 = new maptalks.Marker(\n [parseFloat((document.getElementById(\"longi\")).value), parseFloat((document.getElementById(\"lat\")).value)]\n );\n map.removeLayer(markerLayer);\n if (markerLayer1) {\n map.removeLayer(markerLayer1);\n }\n // var d = new Date();\n // var t = d.getTime();\n // new maptalks.VectorLayer(t, point1).addTo(map);\n markerLayer1 = new maptalks.VectorLayer('vector', point1).addTo(map);\n\n changeView();\n\n console.log(map);\n\n function changeView() {\n map.animateTo({\n center: [parseFloat((document.getElementById(\"longi\")).value), parseFloat((document.getElementById(\"lat\")).value)],\n zoom: 13,\n pitch: 0,\n bearing: 20\n }, {\n duration: 5000\n });\n setTimeout(function() {\n map.animateTo({\n center: [parseFloat((document.getElementById(\"longi\")).value), parseFloat((document.getElementById(\"lat\")).value)],\n zoom: 18,\n pitch: 0,\n bearing: 0\n }, {\n duration: 7000\n });\n }, 7000);\n }\n } else {\n alert(\"Please enter the Coordinate values\");\n }\n}", "function zoomMapToFull() {\n if (!mapData) return;\n var t = d3.zoomIdentity.translate(0, 0).scale(1)\n d3.select(\"#map\").call(zoom).transition()\n .duration(750)\n .call(zoom.transform, t);\n}", "function changeMapLocationforDrinkups(lat_user,lng_user,zoom){\n var user_location = {lat:lat_user , lng:lng_user};\n map.setCenter(user_location);\n map.setZoom(zoom);\n}", "function centerMap() {\n getLocation()\n }", "function resetMapMarkers() {\n bigMap.config.markers = angular.copy(defaultMarkers);\n }", "function initMap(){\r\n\t//load the svg data into the svg-map div\r\n\tmap = $('#svg-map').svg('get');\r\n\t//add the id to the svg map object\r\n\tmap.configure({id:'map'}, false);\r\n\t//do an initial window zoom based on the width and height of the screen and the map deminsions\r\n\tvar boundingBox = map.getElementById('map').getBBox();\r\n\tvar base_view = parseInt(boundingBox.x) + ', ' + parseInt(boundingBox.y) + ', ' + parseInt(boundingBox.width) + ', ' + parseInt(boundingBox.height);\r\n\t//animates the view change.\r\n\t\r\n\t/* The Animation Code\r\n\t$(\"#map\").fadeOut(500,function(){\r\n\t\t$(\"#map\").animate({svgViewBox: base_view}, 0, function(){\r\n\t\t\t$(\"#map\").fadeIn(500);\r\n\t\t});\r\n\t});\r\n\t*/\r\n\t$(\"#map\").animate({svgViewBox: base_view}, 0);\r\n\t\t\r\n\t//the zoom out icon sits at the bottom right of the page and a click on it shoud zoom out to the original zoom position\r\n\t$(\"#zoomout\").click(function(){\r\n\t\t/* The Animation Code\r\n\t\t$(\"#map\").fadeOut(500,function(){\r\n\t\t\tresetMap();\r\n\t\t\tmap.change(map.getElementById(\"Country_names_Lines\"), {display: 'none'});\r\n\t\t\t$(\"#map\").animate({svgViewBox: base_view}, 0, function(){\r\n\t\t\t\t$(\"#map\").fadeIn(500);\r\n\t\t\t});\r\n\t\t});\r\n\t\t*/\r\n\t\tresetMap();\r\n\t\tmap.change(map.getElementById(\"Country_names_Lines\"), {display: 'none'});\r\n\t\t$(\"#map\").animate({svgViewBox: base_view}, 0);\r\n\t});\r\n\t$(\"#map\").children('g').each(function(){\r\n\t\tvar id = $(this).attr('id');\r\n\t\tif(id == 'Country_names_Lines'){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif(id == 'internships'){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t//The region - as defined as the label name on the map (with underscores for spaces) is the key with an array of UN Codes as the value\r\n\t\tinternship_data.regions[id] = new Array();\r\n\t\t$(this).children('g').each(function(){\r\n\t\t\tinternship_data.regions[id].push($(this).attr('id'));\r\n\t\t});\r\n\t\t//Sets the class clickable as to show the pointer\r\n\t\tmap.change(map.getElementById($(this).attr('id')), {class: 'clickable'});\r\n\t\t//sets up the action to take on click\r\n\t\t$(this).click(function(){\r\n\t\t\t$('#dropdown').hide( 'fade', {}, 0);\r\n\t\t\tboundingBox = map.getElementById($(this).attr('id')).getBBox();\r\n\t\t\t//viewBox numbers => <min-x>, <min-y>, <width> and <height>\r\n\t\t\tvar view = parseInt(boundingBox.x) + ', ' + parseInt(boundingBox.y) + ', ' + parseInt(boundingBox.width) + ', ' + parseInt(boundingBox.height);\r\n\t\t\t//animates the view change. Maybe we should just fade out, move, and fade back in\r\n\t\t\t/* The Animation stuff\r\n\t\t\t$(\"#map\").fadeOut(500,function(){\r\n\t\t\t\t$(\"#map\").animate({svgViewBox: view}, 0, function(){\r\n\t\t\t\t\t$(\"#map\").fadeIn(500);\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t\t*/\r\n\t\t\t$(\"#map\").animate({svgViewBox: view}, 0);\r\n\t\t\t\r\n\t\t\t//Shows the Country Names\r\n\t\t\tmap.change(map.getElementById(\"Country_names_Lines\"), {display: ''});\r\n\t\t\t\r\n\t\t\tresetGroup('internships');\r\n\t\t\t$('#'+$(this).attr('id')).children('g').each(function(){\t\t\t\t\t\r\n\t\t\t\tdisplayInternships($(this).attr('id'), true);\r\n\t\t\t});\r\n\t\t});\r\n\t});\r\n\t//setup the group to handle interships\r\n\tmap.group(null, 'internships');\r\n\tresetMap();\r\n}", "function initMap() {\n L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}', {\n attribution: 'Map data &copy; <a href=\"https://www.openstreetmap.org/\">OpenStreetMap</a> contributors, <a href=\"https://creativecommons.org/licenses/by-sa/2.0/\">CC-BY-SA</a>, Imagery © <a href=\"https://www.mapbox.com/\">Mapbox</a>',\n maxZoom: 18,\n id: 'mapbox/streets-v11',\n tileSize: 512,\n zoomOffset: -1,\n accessToken: 'pk.eyJ1IjoiaWNoYmluYWJlIiwiYSI6ImNrYmI1Ymo4YjAxNDIydnQ3OHZra2Ryd24ifQ.0iaMyfT8z65OY1F-qDd98w'\n }).addTo(map)\n\n map.setView([emily.gps.lat, emily.gps.lng], 14);\n //adjust zoom here\n}", "function resetMap() {\r\n var windowWidth = window.innerWidth;\r\n if (windowWidth <= 1080) {\r\n map.setZoom(5);\r\n map.setCenter(mapOptions.center);\r\n } else if (windowWidth > 1080) {\r\n map.setZoom(5);\r\n map.setCenter(mapOptions.center);\r\n }\r\n }", "function mapForApproximateLocationCentreChanged()\n {\n determineLocationFromMap();\n }", "function setCenter(legs, secondMapIsSelected) {\n var bound = new google.maps.LatLngBounds();\n\n angular.forEach(legs, function (leg) {\n var myLatLng = new google.maps.LatLng(leg.start_location.lat(), leg.start_location.lng());\n bound.extend(myLatLng);\n });\n\n var latLng = new google.maps.LatLng(bound.getCenter().lat(), bound.getCenter().lng());\n if (secondMapIsSelected) {\n secondMap.setCenter(latLng);\n google.maps.event.trigger(secondMap, 'resize');\n } else {\n map.setCenter(latLng);\n google.maps.event.trigger(map, 'resize');\n }\n \n }" ]
[ "0.6934311", "0.6875341", "0.6770373", "0.6702336", "0.6663416", "0.633148", "0.6262989", "0.6157794", "0.6115247", "0.60888463", "0.60747707", "0.606771", "0.60570526", "0.60399926", "0.60247386", "0.5992457", "0.598272", "0.5982104", "0.5973126", "0.5970586", "0.59662515", "0.59647846", "0.5963238", "0.5961411", "0.59594333", "0.59544647", "0.5946796", "0.5945229", "0.5940977", "0.5928867", "0.5927389", "0.59070265", "0.59064275", "0.5897016", "0.589694", "0.58886033", "0.5879892", "0.587082", "0.5859391", "0.58558154", "0.58532625", "0.5851922", "0.5850506", "0.58360624", "0.5812635", "0.580707", "0.5797443", "0.5795724", "0.5794752", "0.57943183", "0.5790502", "0.57831335", "0.57804376", "0.5775811", "0.57727176", "0.576997", "0.57686555", "0.57673454", "0.57589775", "0.5735235", "0.57319295", "0.572926", "0.5727011", "0.5720655", "0.5718461", "0.57132727", "0.5696695", "0.568432", "0.5675933", "0.56732357", "0.566328", "0.5662874", "0.5658668", "0.56476194", "0.5644378", "0.5641071", "0.5640768", "0.5638649", "0.5634459", "0.5634037", "0.56321245", "0.5628858", "0.56085163", "0.56085163", "0.5603917", "0.5596361", "0.55945957", "0.55908173", "0.55849546", "0.558043", "0.5563892", "0.55598396", "0.55556023", "0.5555315", "0.55468804", "0.554641", "0.5545866", "0.55392456", "0.5538594", "0.552651" ]
0.7958602
0
get every other map besides the passed in one
function getMapsBesides(map) { return $.grep(getMapArray(), function(value) { return value != map }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_get2Groups(map) {\n let group1 = [],\n group2 = [];\n\n let keys = [...map.keys()];\n keys.forEach(k => map.get(k) == 1 ? group1.push(k) : group2.push(k))\n return [group1, group2];\n }", "function unionWithRewrite(map1, map2) {\n var unionMap = clone(map1);\n var map2Keys = Object.keys(map2);\n for (var i in map2Keys) {\n var map2Key = map2Keys[i];\n unionMap[map2Key] = map2[map2Key]; // re-write map1 param value with param value from map2\n }\n\n return unionMap;\n }", "map(other, before = false) { return other.empty ? this : mapSet(this, other, before, true); }", "values() {\n const result = [];\n for (let i = 0; i < this.map.length; i += 1) {\n if (this.map[i] !== undefined) {\n for (let j = 0; j < this.map[i].length; j += 1) {\n const value = this.map[i][j][1];\n if (!result.includes(value)) {\n result.push(value);\n }\n }\n }\n }\n\n return result;\n }", "function diff(map1, map2) {\n var diffMap = clone(map1);\n var map2Keys = Object.keys(map2);\n for (var i in map2Keys) {\n var map2Key = map2Keys[i];\n if (typeof diffMap[map2Key] != \"undefined\") {\n delete diffMap[map2Key];\n }\n }\n\n return diffMap;\n }", "mapDesc(other, before = false) { return other.empty ? this : mapSet(this, other, before); }", "function demo005(){\n var x = Immutable.Map({a: 10, b: 20, c: 30});\n var y = Immutable.Map({b: 40, a: 50, d: 60});\n x.merge(y) // { a: 50, b: 40, c: 30, d: 60 }\n y.merge(x) // { b: 20, a: 10, d: 60, c: 30 }\n}", "function get_input_map(nodes) {\n\n var in_map = new Map();\n for (var node_id of nodes.keys()) {\n for (var value_id of nodes.get(node_id).children.keys()) {\n if (value_id in in_map) {\n in_map[value_id].push(node_id);\n } else {\n in_map[value_id] = [];\n in_map[value_id].push(node_id);\n }\n }\n }\n //sort node ids (left edges have lower order in argument list than right edges)\n for (var key in in_map)\n in_map[key].sort(function (a, b) {\n return b - a\n });\n console.log(\"in map: \", in_map);\n return in_map;\n}", "flatten(){\n\n let scope = this;\n\n const result = new Map();\n const appliedValves = new Map();\n\n for(const [key, value] of scope._dataMap){\n result.set(key, value);\n }\n\n while(scope = scope._parent){\n\n const dataList = scope._dataMap;\n const valves = scope._valveMap;\n const mirrors = scope._mirrorMap;\n\n if(!dataList.size)\n continue;\n\n // further restrict valves with each new scope\n\n if(valves.size){\n if(appliedValves.size) {\n for (const key of appliedValves.keys()) {\n if(!valves.has(key))\n appliedValves.delete(key);\n }\n } else {\n for (const [key, value] of valves.entries()) {\n appliedValves.set(key, value);\n }\n }\n }\n\n const possibles = appliedValves.size ? appliedValves : dataList;\n\n for(const key of possibles.keys()) {\n if (!result.has(key)) {\n\n const data = mirrors.get(key) || dataList.get(key);\n if (data)\n result.set(key, data);\n }\n }\n\n }\n\n return result;\n\n }", "function mergeMaps(target) {\r\n var maps = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n maps[_i - 1] = arguments[_i];\r\n }\r\n for (var i = 0; i < maps.length; i++) {\r\n maps[i].forEach(function (v, k) {\r\n target.set(k, v);\r\n });\r\n }\r\n return target;\r\n}", "appendMappingInverted(mapping) {\n for (let i = mapping.maps.length - 1, totalSize = this.maps.length + mapping.maps.length; i >= 0; i--) {\n let mirr = mapping.getMirror(i);\n this.appendMap(mapping.maps[i].invert(), mirr != null && mirr > i ? totalSize - mirr - 1 : void 0);\n }\n }", "function everyOtherItem(items) {\n const result = []\n for (const i in items) {\n if (i % 2 == 0) {\n result.push(items[i]);\n } //end if\n } // end for\n return result;\n} //end function", "function setMask2() {\n var Masks = [];\n var x, y;\n for (x = 0; x < max_map_X; x++) {\n for (y = 0; y < max_map_Y; y++) {\n var Mask2 = new mapTile(0, 0); // Fill world with void\n Masks.push(Mask2);\n } \n }\n return Masks;\n}", "function findOutOfSyncMap() {\r\n var zoomedMap = findOddball(getMapArray(), zoomComparator);\r\n if (zoomedMap !== null) { \r\n return zoomedMap;\r\n }\r\n return findOddball(getMapArray(), latlongComparator);\r\n}", "function unfold(map){\n\tfor (var [key,val] of map) \n\t\t console.log(key + \" = \" + JSON.stringify(val));\n}", "values() {\n let valuesArr = [];\n for (let i = 0; i < this.keyMap.length; i++) {\n if (this.keyMap[i]) {\n for (let j = 0; j < this.keyMap[i].length; i++) {\n if (!valuesArr.includes(this.keyMap[i][j][1])) {\n valuesArr.push(this.keyMap[i][j][1]);\n }\n }\n }\n }\n return valuesArr;\n }", "function all() {\n return dictionary.slice();\n}", "values() {\n let valuesArray = [];\n for (let i = 0; i < this.keyMap.length; i++) {\n if (this.keyMap[i]) {\n for (let j = 0; j < this.keyMap[i].length; j++) {\n if (!valuesArray.includes(this.keyMap[i][j][1])) {\n valuesArray.push(this.keyMap[i][j][1]);\n }\n }\n }\n }\n return valuesArray;\n }", "function MapIterator() {}", "function getUncommonComponents(addressComponents) {\n const returningComponents = {};\n for(const component in addressComponents) {\n if (!commonAddressComponents.includes(component)) {\n returningComponents[component] = addressComponents[component];\n }\n }\n\n return returningComponents;\n }", "function allKeyMaps(cm) {\r\n var maps = cm.state.keyMaps.slice(0);\r\n if (cm.options.extraKeys) maps.push(cm.options.extraKeys);\r\n maps.push(cm.options.keyMap);\r\n return maps;\r\n }", "function initializeMap(list) {\n var result = {};\n for (var i = 0; i < list.length; i += 2) {\n // Call asFirstClass() here to prevent, for example, a toxic\n // function being used as the toString property of an object\n // literal.\n\tsetPub(result, list[$A$Num(i)], asFirstClass(list[$A$Num(i + 1)]));\n }\n return result;\n }", "function allKeyMaps(cm) {\n var maps = cm.state.keyMaps.slice(0);\n if (cm.options.extraKeys) maps.push(cm.options.extraKeys);\n maps.push(cm.options.keyMap);\n return maps;\n }", "function allKeyMaps(cm) {\n var maps = cm.state.keyMaps.slice(0);\n if (cm.options.extraKeys) maps.push(cm.options.extraKeys);\n maps.push(cm.options.keyMap);\n return maps;\n }", "function allKeyMaps(cm) {\n var maps = cm.state.keyMaps.slice(0);\n if (cm.options.extraKeys) maps.push(cm.options.extraKeys);\n maps.push(cm.options.keyMap);\n return maps;\n }", "get mapIn() {\n\t return _objectSpread({}, sanitizeExternalDrops(this.props.mapIn), {\n\t [this.rootKey]: internalMapIn\n\t });\n\t }", "function tf$mergeMappings(a, b) {\r\n\t\tif(a.length == 0 || b.length == 0)\r\n\t\t\treturn [];\r\n\r\n\t\tvar mapLength = a[0].length;\r\n\r\n\t\tvar mappings = [];\r\n\t\tfor(var i = 0; i < a.length; ++i) {\r\n\t\t\tfor(var j = 0; j < b.length; ++j) {\r\n\t\t\t\tvar candidate = [];\t\r\n\t\t\t\tfor(var k = 0; k < mapLength; ++k) {\r\n\t\t\t\t\tif(a[i][k] === null && b[j][k] === null) {\r\n\t\t\t\t\t\tcandidate.push(null);\r\n\t\t\t\t\t} else if(a[i][k] !== null && b[j][k] !== null) {\r\n\t\t\t\t\t\tif(ExprEqualExact(a[i][k], b[j][k], true)) {\r\n\t\t\t\t\t\t\tcandidate.push(OuterDoubleNegationElimination(a[i][k]));\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcandidate.push(a[i][k]===null?b[j][k]:a[i][k]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// If this candidate has a letter for each letter, then we do this:\r\n\t\t\t\tif (candidate.length == mapLength) {\r\n\t\t\t\t\tmappings.push(candidate);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn mappings;\r\n\t}", "function completeMap(pattern1, pattern2, distanceMetric, map) {\n\t\tvar [k1,k2,_,_] = getLargerAndSize(pattern1, pattern2);\n\t if(!map.includes(-1)) {\n\t\t return map;\n\t\t}\n\t\t// complete at the end\n\t\tvar lastUnassigned = map[map.length];\n\t\tvar mapLastTo = -1;\n\t\tfor(var i = map.length -1; i>=0;i--) {\n\t\t if(map[i] == -1) {\n\t\t\t lastUnassigned = i;\n\t\t\t} else {\n\t\t\t mapLastTo = map[i];\n\t\t\t break;\n\t\t\t}\n\t\t}\n\t\tfor(var i=lastUnassigned;i<map.length;i++) {\n\t\t map[i] = mapLastTo;\n\t\t}\n\t\t// complete at the beginning\n\t\tvar firstUnassigned = -1;\n\t\tvar mapFirstTo = -1;\n\t\tfor(var i = 0;i<map.length;i++) {\n\t\t if(map[i] == -1) {\n\t\t\t firstUnassigned = i;\n\t\t\t} else {\n\t\t\t mapFirstTo = map[i];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\t\t\n\t\tfor(var i=0;i<=firstUnassigned;i++) {\n\t\t map[i] = mapFirstTo;\n\t\t}\n\t\t// for the remaining unassigned, check\n\t\t// where to \"split\"\n for(var i=0;i<map.length;i++) {\n if(i+1 < map.length && map[i+1] == -1) {\n // we have a situation like this:\n // i i+1 i+2 ... i+n \n // start -1 ? -1 stop\n var start = i;\n\n var stop = i+1;\n while(stop<map.length && map[stop] == -1) {\n stop++;\n }\n\n var div = start;\n var max_dist = 1000000;\n for(var j=start;j<stop;j++) {\n var stroke_ab = k1[start];\n\t\t\t\t // iteration of concat, possibly slow\n\t\t\t\t // due to memory allocations; optimize?!\n\t\t\t \tfor(var temp=start+1;temp<=j;temp++) {\n\t\t\t\t stroke_ab = stroke_ab.concat(k1[temp]);\n\t\t\t \t}\n\t\t\t\t var stroke_bc = k1[j+1];\n\n\t\t\t\t for(var temp=j+2;temp<=stop;temp++) {\n\t\t\t\t stroke_bc = stroke_bc.concat(k1[temp]);\n\t\t\t\t }\n\n\t\t\t\t var d_ab = distanceMetric(stroke_ab, k2[map[start]]);\n\t\t\t\t var d_bc = distanceMetric(stroke_bc, k2[map[stop]]);\t\t\t\t\n if(d_ab + d_bc < max_dist) {\n div = j;\n max_dist = d_ab + d_bc;\n }\n }\n for(var j=start;j<=div;j++) {\n map[j] = map[start];\n }\n for(var j=div+1;j<stop;j++) {\n map[j] = map[stop];\n }\n } \n }\n return map;\n\t}", "function flipDay(newMap, neighborMap){\n for (let se in newMap){\n for (let e in newMap[se]){\n let pos = {se, e}\n let blackNeighbors = neighborMap[se][e]\n\n if (isPosBlack(newMap, pos)){\n if (blackNeighbors === 0 || blackNeighbors > 2){\n newMap[se][e] = false\n }\n } else{\n if (blackNeighbors === 2){\n newMap[se][e] = true\n }\n }\n }\n }\n return newMap\n }", "function copyMapAddGoal(departure){\n\tlet specialMap = new Map();\n\t//then re-point the nodes.\n\tfor(let city of cityMap){\n\n\t\tlet name = city[0];\n\t\t//if we don't call new, we'll mutate the master copy of cityMap!\n\t\tlet neighbors = new Map(city[1]);\n\n\t\tspecialMap.set(name, neighbors);\n\n\t\tfor(let n of neighbors){\n\t\t\tlet nbrName = n[0];\n\t\t\tlet nbrDist = n[1];\n\t\t\tif(nbrName == departure){\n\t\t\t\tneighbors.delete(nbrName);\n\t\t\t\tneighbors.set('$', nbrDist);\n\t\t\t}\n\t\t}\n\t}\n\n\tspecialMap.set('$', new Map());\n\treturn specialMap;\n}", "flatten(){\n\n let scope = this;\n\n const result = new Map();\n const appliedValves = new Map();\n\n for(const [key, value] of scope._dataList){\n result.set(key, value);\n }\n\n while(scope = scope._parent){\n\n const dataList = scope._dataList;\n const valves = scope._valves;\n const mirrors = scope._mirrors;\n\n if(!dataList.size)\n continue;\n\n // further restrict valves with each new scope\n\n if(valves.size){\n if(appliedValves.size) {\n for (const key of appliedValves.keys()) {\n if(!valves.has(key))\n appliedValves.delete(key);\n }\n } else {\n for (const [key, value] of valves.entries()) {\n appliedValves.set(key, value);\n }\n }\n }\n\n const possibles = appliedValves.size ? appliedValves : dataList;\n\n for(const key of possibles.keys()) {\n if (!result.has(key)) {\n\n const data = mirrors.get(key) || dataList.get(key);\n if (data)\n result.set(key, data);\n }\n }\n\n }\n\n return result;\n\n }", "diffMapElements(elementIds, data) {\n const result = {};\n let empty = true;\n\n for (const kind in elementIds) {\n if (!this.shouldDrawObjectOfThisElementKind(kind)) {\n continue;\n }\n\n result[kind] = [];\n const newIds = elementIds[kind];\n const oldData = data[kind];\n for (let i = 0; i < newIds.length; ++i) {\n const found = oldData ? oldData.find((old) => old.id.id === newIds[i]) : false;\n\n if (!found) {\n empty = false;\n result[kind].push(newIds[i]);\n }\n }\n }\n\n return empty ? {} : result;\n }", "function resetAll_exceptMap() {\n allCharts.slice(1).forEach(function(chart) {chart.filterAll();});\n resetTable();\n dc.redrawAll();\n}", "function Map2(data) {\n this.map = new Map;\n this.size = 0;\n if (data) {\n for (var i = 0; i < data.length; i++) {\n var d = data[i];\n this.set(d[0], d[1], d[2]);\n }\n }\n}", "function switchAll() {\n return switchMap(identity/* identity */.y);\n}", "function query_map(entities) {\n return entities.map(entity => [entity.a, entity.b]);\n}", "slice(from2 = 0, to = this.maps.length) {\n return new Mapping(this.maps, this.mirror, from2, to);\n }", "function setMapOnAll(map) {\n for (let i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n for (let i = 0; i < choiceMarkers.length; i++) {\n choiceMarkers[i].setMap(map);\n } \n for (let i = 0; i < searchResMarkers.length; i++) {\n searchResMarkers[i].setMap(map);\n } \n}//setMapOnAll", "function mapExpand(Wss) {\n var Rss = []\n for (var Ws of Wss) {\n var Hss = maybeExpand(Ws)\n if (null == Hss) {\n Rss.push(Ws)\n } else\n for (var X of Hss)\n Rss.push(X)\n }\n return Rss\n}", "function getClearMap() {\n return [\n 'None', 'None', 'None',\n 'None', 'None', 'None',\n 'None', 'None', 'None',\n ]\n}", "function $cf838c15c8b009ba$export$2f3eb4d6eb4663c9(key) {\n const getKey = typeof key === \"string\" ? (value)=>value && typeof value === \"object\" && value[key] !== undefined ? value[key] : value : null;\n const create = (iterating)=>{\n let i = 0, j, len, nOthers, args, result, memory;\n return function() {\n if (!args) {\n args = [].sort.call(arguments, (a, b)=>a.length - b.length);\n nOthers = args.length - 1;\n result = [];\n memory = new Map();\n i = 0;\n j = 0;\n }\n for(; i <= nOthers; i++){\n //j = j===-1 ? arguments[i].length : j;\n const len = args[i].length;\n while(j < len){\n const elem = args[i][j], key = getKey ? getKey(elem) : elem;\n if (memory.get(key) === i - 1) {\n if (i === nOthers) {\n result[result.length] = elem;\n memory.set(key, 0);\n if (iterating) {\n j++;\n return {\n value: elem\n };\n }\n } else memory.set(key, i);\n } else if (i === 0) memory.set(key, 0);\n j++;\n }\n j = 0;\n }\n args = null;\n return iterating ? {\n done: true\n } : result;\n };\n };\n const intersect = create();\n intersect.iterable = function(...args) {\n const intersect = create(true);\n let started;\n return {\n next () {\n if (started) return intersect();\n started = true;\n return intersect(...args);\n },\n [Symbol.iterator] () {\n return this;\n }\n };\n };\n return intersect;\n}", "function graftMap(obj) {\n obj.c = obj.b - obj.a;\n return obj;\n }", "function setMapOnAll(type, map) {\n\tif( type == 1 ) {\n\t\tfor (var i = 0; i < markers.length; i++)\n\t\t\tmarkers[i].setMap(map);\n\t}\n\telse if ( type == 2 ) {\n\t\tfor (var i = 0; i < blueMarkers.length; i++)\n\t\t\tblueMarkers[i].setMap(map);\n\t}\n}", "union(otherSet) {\n const unionSet = new mySet()\n const firstSet = this.values()\n const secondSet = otherSet.values()\n\n firstSet.forEach(e => {\n unionSet.add(e)\n })\n secondSet.forEach(e => {\n secondSet.add(e)\n })\n return unionSet\n }", "function mergeDicts(o, p){\n for (i in p){\n o = insert(p[i].m, p[i].r, o);\n }\n return o;\n}", "generateMap(shipments, drivers) {\n return Object.keys(shipments).reduce((acc, shipmentId) => {\n const shipment = shipments[shipmentId];\n const driversByDistance = this.getDriversByDistance(shipment, drivers);\n acc[shipmentId] = driversByDistance;\n return acc;\n }, {});\n }", "function mitt(n){return{all:n=n||new Map,on:function(t,e){var i=n.get(t);i?i.push(e):n.set(t,[e])},off:function(t,e){var i=n.get(t);i&&(e?i.splice(i.indexOf(e)>>>0,1):n.set(t,[]))},emit:function(t,e){var i=n.get(t);i&&i.slice().map(function(n){n(e)}),(i=n.get(\"*\"))&&i.slice().map(function(n){n(t,e)})}}}", "map(fn) {\n // console.log(iter.next())\n let array = [];\n for (let [key, val] of this) {\n array.push(key);\n }\n return array.map(fn);\n }", "get Mipmaps() {}", "difference(otherSet) {\n const differenceSet = new mySet()\n const firstSet = this.values()\n\n firstSet.forEach(e => {\n if (!otherSet.has(e)) {\n differenceSet.add(e)\n }\n })\n return differenceSet\n }", "function setAllMap(map)\n{\n for (var i = 0; i < markers.length; i++)\n {\n markers[i].setMap(map);\n }\n poly.setMap(map);\n}", "*entries() {\n for (const item of this) {\n yield [item, item];\n }\n }", "getAdjacentTiles(){\n const tiles = [\n [0, 1], [1, 0], [-1, 0], [0, -1], [1, 1], [-1, 1], [1, -1], [-1, -1]\n ] .map(([i, j]) => Tile.getTile({x: this.x + i, y: this.y + j}))\n .filter(tile => tile)\n\n return tiles;\n }", "function setMapOnAll(map) {\n\tfor (var i = 0; i < puntos.length; i++) {\n\t puntos[i].setMap(map);\n\t }\n\t}", "flattenByID(addonMap, hideLocation) {\n let map = new Map();\n\n for (let installLocation of XPIProvider.installLocations) {\n if (installLocation.name == hideLocation)\n continue;\n\n let locationMap = addonMap.get(installLocation.name);\n if (!locationMap)\n continue;\n\n for (let [id, addon] of locationMap) {\n if (!map.has(id))\n map.set(id, addon);\n }\n }\n\n return map;\n }", "function Wo(t,n){for(var r in n)t[r]=n[r];return t}", "function repeat2(arr) {\n\tlet map = {};\n\tfor (let i = 0; i < arr.length; i++) {\n\t\tif (map[arr[i]] !== undefined) {\n\t\t\treturn arr[i];\n\t\t} else {\n\t\t\tmap[arr[i]] = i;\n\t\t}\n\t}\n\tconsole.log(map);\n\treturn undefined;\n}", "static outerLeft(ensemble1,ensemble2) {\n var e1 = [...new Set([...ensemble1])]\n var e2 = [...new Set([...ensemble2])]\n return e1.filter((c) => !e2.includes(c) )\n }", "static syncMap(master = Err.required(\"master dict\"),\n slave = Err.required(\"slave dict\"),\n empty = {}){\n\n let slaveKeys = new CuteSet(Object.keys(slave))\n let masterKeys = new CuteSet(master)\n let keySet = masterKeys.intersection(slaveKeys).union(masterKeys);\n let result = {};\n for (let key of keySet){\n result[key] = slave[key] || empty;\n }\n return result;\n }", "appendMapping(mapping) {\n for (let i = 0, startSize = this.maps.length; i < mapping.maps.length; i++) {\n let mirr = mapping.getMirror(i);\n this.appendMap(mapping.maps[i], mirr != null && mirr < i ? startSize + mirr : void 0);\n }\n }", "function fill_in_gaps(a,b){\n // a = prices[graph][exchange][trace]\n // b = open_interest[exchange][graph][trace]\n\n var a_times = return_keys(a);\n var last_time = a_times[0];\n if (a.length != 0){\n for (var time in b){\n if (!a_times.includes(time)){\n a[time] = a[last_time];\n }\n last_time = time;\n }\n}\n\n if (b.length !=0){\n var b_times = return_keys(b);\n var last_time = b_times[0];\n for (var time in a){\n if (!b_times.includes(time)){\n b[time] = b[last_time];\n }\n last_time = time;\n }\n}\n}", "keys() {\n let keysArr = [];\n for (let i = 0; i < this.keyMap.length; i++) {\n if (this.keyMap[i]) {\n for (let j = 0; j < this.keyMap[i].length; i++) {\n if (!keysArr.includes(this.keyMap[i][j][1])) {\n keysArr.push(this.keyMap[i][j][1]);\n }\n }\n }\n }\n return keysArr;\n }", "function linksForFilteredMovies() {\n let newMap = new Map();\n // for each person\n mapCrewMovie.forEach(function (value, key, map) {\n let newSet = new Set();\n // for each movie linked to one person\n value.forEach(function (d) {\n // if the movie is in the list of filtered movie, keep the movie\n if (mapMovie_filtered.get(d.id_movie)) newSet.add(d);\n })\n // if there is movies for this person, add it to it\n if (newSet.size > 0) newMap.set(key, newSet)\n });\n // return the list of person only with filtered movies\n return newMap;\n}", "function setFringe2() {\n var Fringes = [];\n var x, y;\n for (x = 0; x < max_map_X; x++) {\n for (y = 0; y < max_map_Y; y++) {\n var Fringe2 = new mapTile(0, 0); // Fill world with void\n Fringes.push(Fringe2);\n } \n }\n return Fringes;\n}", "function mapWithoutIndex(range){return{start:range.start,end:range.end};}", "function n(t,e){return null==t?t:t instanceof Map?t.get(e):t[e]}", "get mapOut() {\n\t return _objectSpread({}, this.props.mapOut, {\n\t [this.rootKey]: internalMapOut\n\t });\n\t }", "\n ()\n {\n const aggregated_a = new Map() //:- [[linked_a],...]\n const linked_a = new Set() //:- Node.Facet.id_n \n this.node_a.forEach\n (\n node_c =>\n {\n const id_n = node_c.id__n()\n if ( !linked_a.has( id_n ) ) aggregated_a.set\n (\n id_n,\n this.linked__a( id_n, at_n => linked_a.add( at_n ) )\n )\n }\n )\n return aggregated_a\n }", "getUrlBookmarkIdMap () {\n const bmEnts = this.bookmarkIdMap.entrySeq()\n\n // bmEnts :: Iterator<[BookmarkId,TabWindow]>\n const getSavedUrls = (tw) => tw.tabItems.map((ti) => ti.url)\n\n const bmUrls = bmEnts.map(([bmid, tw]) => getSavedUrls(tw).map(url => [url, bmid])).flatten(true)\n\n const groupedIds = bmUrls.groupBy(([url, bmid]) => url).map(vs => Immutable.Set(vs.map(([url, bmid]) => bmid)))\n // groupedIds :: Seq.Keyed<URL,Set<BookmarkId>>\n\n return Immutable.Map(groupedIds)\n }", "function getOtherBlobs(){\n return _.omit(zeach.allNodes, zeach.myIDs);\n }", "getELLMap() {\n return {};\n }", "function setAllMap(map) {\n for (var i = 0; i < gmarkers.length; i++) {\n gmarkers[i].setMap(map);\n }\n}", "function findLastMap_(as, f) {\n const len = as.length;\n\n for (let i = len - 1; i >= 0; i--) {\n const v = f(as[i]);\n\n if ((0, _index.isSome)(v)) {\n return v;\n }\n }\n\n return _index.none;\n}", "function createStepMap(cur, old)\n\t{\n\t\tif (cur.length === old.length)\n\t\t\treturn [];\t// 1:1 array\n\n\t\t// It should be possible to combine the two, or reverse and use a separate function\n\t\tif (cur.length < old.length)\n\t\t{\n\t\t\treturn createDeltaMap(cur, old);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Exactly the same, but in reverse\n\t\t\tvar out = createDeltaMap(old, cur);\n\n\t\t\t// Reverse the array\n\t\t\treturn _.map(out, function(val) {\n\t\t\t\treturn [val[1], val[0]];\n\t\t\t});\n\t\t}\n\t}", "concat(map)\n\t{\n\t\tif (map != null)\n\t\t{\n\t\t\tvar res = this.copy();\n\t\t\tmap.each(\n\t\t\t\t(key)=>{\n\t\t\t\t\tres.set(key, map.item(key));\n\t\t\t\t}\n\t\t\t);\n\t\t\treturn res;\n\t\t}\n\t\treturn this;\n\t}", "function toMap2(items, keySelector, valueSelector) {\n var output = new Map();\n try {\n for (var items_3 = __values(items), items_3_1 = items_3.next(); !items_3_1.done; items_3_1 = items_3.next()) {\n var item = items_3_1.value;\n output.set(keySelector(item), valueSelector(item));\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (items_3_1 && !items_3_1.done && (_a = items_3.return)) _a.call(items_3);\n }\n finally { if (e_3) throw e_3.error; }\n }\n return output;\n var e_3, _a;\n}", "function getJoinsfromMaps() {\n\tvar joins = [];\n\tfor (var i=0; i<app.m; i++) {\n\t\tvar mapN = \"map\" + i;\n\t\tvar join = ($('input[type=radio][name=\"'+mapN+'-radio\"]:checked').val() == \"auto\") ? true : false;\n\t\tjoins.push(join);\n\t}\n\treturn joins;\n}", "function maps(x){\n return x.map((n) => n * 2);\n}", "function getSecond(x){\n for (item in x) {\n if (subject[x[item]]){\n \t y.subject = subject[x[item]]\n \t }\n }\n return x}", "groupBy(toKey) {\n const map = new Map();\n for (const value of this) {\n const key = toKey(value);\n map_1.multiMapAdd(map, key, value);\n }\n return map;\n }", "function setMapOnAll(map) {\n for (let i = 0; i < originMarkersArray.length; i++) {\n originMarkersArray[i].setMap(map);\n }\n for (let i = 0; i < currentMarkersArray.length; i++) {\n currentMarkersArray[i].setMap(map);\n }\n for (var i = 0; i < destinationMarkersArray.length; i++) {\n destinationMarkersArray[i].setMap(map);\n }\n }", "mapSubmissionIDToSighting () {\n var tmpMap = {}\n\n for (var index = 0; index < this.rows.length; index++) {\n var sighting = this.rows[index]\n var submissionID = sighting['Submission ID']\n\n if (!tmpMap[submissionID]) {\n tmpMap[submissionID] = sighting\n }\n }\n\n return tmpMap\n }", "function everyOtherItem(items) {\n\nlet result = []; \n\n for(let i in items){\n if(i % 2 === 0){\n result.push(items[i]); \n }\n }\n console.log(result)\n}", "values() {\n let valArr = [];\n for (let i = 0; i < this.keyMap.length; i++) {\n //loop through out entire hashmap\n if (this.keyMap[i]) {\n //check if exist and check for subarrays\n for (let j = 0; j < this.keyMap[i].length; j++) {\n //loop through subarrays\n if (!valArr.includes(this.keyMap[i][j][1])) {\n //make sure there are not duplicates of values in our hashmap if so, return once\n valArr.push(this.keyMap[i][j][1]); //push to our initialized arary because we want to keep in insisde of DS\n }\n }\n }\n }\n return valArr;\n }", "function getMap(pattern1, pattern2, distanceMetric) {\n var [k1,k2,n,m] = getLargerAndSize(pattern1, pattern2);\n\t // larger is now k1 with length n\n\t var L = 3;\n\t var map = initStrokeMap(k1, k2, distanceMetric);\n\t for(var l=0;l<L;l++) {\n\t for(var i=0;i<map.length;i++) {\n\t\t if(map[i] != -1) {\n dii = distanceMetric(k1[i], k2[map[i]]);\n\t\t\t\t for(var j=0;j<map.length;j++) {\n\t\t\t\t // we need to check again, since \n\t\t\t\t\t // manipulation of map[i] can occur within\n\t\t\t\t\t // the j-loop\n\t\t\t\t\t if(map[i] != -1) {\n\t\t\t\t\t if(map[j] != -1) {\n\t\t\t\t\t\t var djj = distanceMetric(k1[j],k2[map[j]]);\n var dij = distanceMetric(k1[j],k2[map[i]]);\n var dji = distanceMetric(k1[i],k2[map[j]]);\n\t\t\t\t\t\t\t if(dji + dij < dii + djj) {\n\t\t\t\t\t\t\t var mapj = map[j];\n\t\t\t\t\t\t\t\t map[j] = map[i];\n\t\t\t\t\t\t\t\t map[i] = mapj;\n\t\t\t\t\t\t\t\t dii = dij;\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t } else {\n\t\t\t\t\t\t var dij = distanceMetric(k1[j], k2[map[i]]);\n if(dij < dii) {\n map[j] = map[i];\n map[i] = -1;\n dii = dij;\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 }\t\t\t\t \n }\n\t\t }\n\t }\n return map;\t \n\t}", "function ge(e){return Array.isArray(e)?e.length>1?{$or:[].concat(e.map(e=>Object.assign({},e)))}:Object.assign({},e[0]):Object.assign({},e)}", "function step2(map) {\n\tconst root = { name: '/', nodes: [] };\n\treturn (function next(map, parent, level) {\n\t\tObject.keys(map).forEach(key => {\n\t\t\tlet val = map[key];\n\t\t\tlet node = { name: key };\n\t\t\tif (typeof val === 'object') {\n\t\t\t\tnode.nodes = [];\n\t\t\t\tnode.open = level < 1;\n\t\t\t\tnext(val, node, level + 1);\n\t\t\t} else {\n\t\t\t\tnode.src = val;\n\t\t\t}\n\t\t\tparent.nodes.push(node);\n\t\t});\n\t\treturn parent;\n\t})(map, root, 0);\n}", "sets () {\n const verticies = [...this.verticies.entries()];\n const sets = verticies.reduce((acc, curr) => {\n // create the set array if it doesn't exist\n if (acc[curr[1]] === undefined) { acc[curr[1]] = []; }\n acc[curr[1]].push(curr[0]);\n return acc;\n }, {});\n\n return Object.values(sets);\n }", "function misselement(array1,array2){\n tempdict = {};\n for(var i =0; i<array2.length;i++){\n tempdict[array2[i]] = 1\n console.log(tempdict)\n }\n \n for(var j=0;j<array1.length;j++){\n if (array1[j] in tempdict ){\n // console.log(array1[j])\n } else {\n return array1[j]\n }\n }\n \n }", "function twoSumMap(arr, goal) {\n if (!arr || arr.length <= 1) {\n return []\n }\n\n const map = new Map()\n\n let i = 0\n let j = arr.length\n\n while (i < j) {\n map.set(arr[i], i)\n map.set(arr[j], j)\n\n const difference = goal - arr[i]\n const difference2 = goal - arr[j]\n\n if (map.has(difference)) {\n return [map.get(difference), i]\n }\n if (map.has(difference2)) {\n return [map.get(difference2), j]\n }\n\n i++\n j--\n }\n\n return []\n}", "childMapping() {\n\t\treturn this[_nextMapping] || this[_impls];\n\t}", "for(ref, id) {\n const memo = keyed.get(ref) || keyed.set(ref, new MapSet);\n return memo.get(id) || memo.set(id, fixed(createCache$1()));\n }", "function setAllMap(map) {\r\n for (var i = 0; i < mm.markers.length; i++) {\r\n mm.markers[i].setMap(map);\r\n }\r\n}", "function mapify(elements) {\n var result = {};\n for (var i = 0; i+1 < elements.length;) {\n result[elements[i++]] = elements[i++];\n }\n return result;\n}", "function getGlobalJoinfromMaps() {\n\tvar joins = Array.from(new Set(getJoinsfromMaps())); // get unique joins from #mapN .map_sync\n\tvar join = false;\n\tif (joins.length == 1) join = joins[0];\n\treturn join;\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 mergeMaps(target) {\n var maps = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n maps[_i - 1] = arguments[_i];\n }\n for (var i = 0; i < maps.length; i++) {\n maps[i].forEach(function (v, k) {\n // let's not run the spfx context through Object.assign :)\n if ((typeof k === \"string\" && k !== \"spfxContext\") && Object.prototype.toString.call(v) === \"[object Object]\") {\n // we only handle one level of deep object merging\n target.set(k, Object.assign({}, target.get(k) || {}, v));\n }\n else {\n target.set(k, v);\n }\n });\n }\n return target;\n}", "function mergeMap(rules) {\n return (v1, v2) => v1.map(v => merge(v, v2, rules));\n}", "_setReverseMappingValues(mapReturnValues) {\n if (mapReturnValues) {\n this.reverseMappedReturnValues = {};\n for(let key in mapReturnValues){\n this.reverseMappedReturnValues[key] = {};\n for (let mappingKey in mapReturnValues[key]) {\n this.reverseMappedReturnValues[key][mapReturnValues[key][mappingKey]] = mappingKey;\n }\n }\n }\n }", "getFreePlaces() {\n return _.reduce(this.map, (acc, v, i) => {\n return (v.empty) ? acc.concat(i) : acc;\n }, []);\n }" ]
[ "0.664387", "0.5547924", "0.54715455", "0.5321724", "0.5314321", "0.53141475", "0.5274261", "0.5246803", "0.52312505", "0.5210243", "0.51902014", "0.5167166", "0.50993174", "0.50810695", "0.5032744", "0.50284076", "0.5013123", "0.49897864", "0.49639085", "0.4962114", "0.49564633", "0.49549714", "0.49512437", "0.49512437", "0.49512437", "0.49498948", "0.49158454", "0.49077985", "0.49031967", "0.4895593", "0.4866247", "0.48613125", "0.48284608", "0.48244578", "0.48225188", "0.48205218", "0.48134872", "0.4813109", "0.48023504", "0.47973692", "0.4752519", "0.47413749", "0.47379813", "0.47346616", "0.47280768", "0.47121423", "0.47120962", "0.47113773", "0.47104594", "0.47088948", "0.47001132", "0.4696438", "0.46892583", "0.4688642", "0.46847463", "0.46815106", "0.46799916", "0.4676896", "0.4675636", "0.46718988", "0.4668902", "0.4663597", "0.4661733", "0.46596757", "0.46553972", "0.46544456", "0.46446306", "0.4638667", "0.46376756", "0.462994", "0.4627458", "0.46229595", "0.46177527", "0.46126089", "0.46124133", "0.46085775", "0.46066964", "0.46064088", "0.46041948", "0.46004862", "0.45967886", "0.45931616", "0.45856467", "0.45814118", "0.45758775", "0.4574679", "0.45647067", "0.45628908", "0.45598072", "0.45575815", "0.45555124", "0.45490676", "0.454906", "0.45480347", "0.45413548", "0.45388496", "0.453295", "0.4531453", "0.45240793", "0.45225003" ]
0.5872471
1
two maps are close enough if the latitude and longitude are within 0.01 of each other
function closeEnough(latLong, otherLatLong) { return Math.abs(latLong[0] - otherLatLong[0]) < 0.01 && Math.abs(latLong[1] - otherLatLong[1]) < 0.01; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calculateDistance(lon1,lat1,lon2,lat2){\n\n var dGridSizeXReduction = Math.abs(Math.cos(lat1 * Math.PI / 180.0 ));\n var dRed2 = dGridSizeXReduction * dGridSizeXReduction;\n var dMinDist2 = (lon1 - lon2) * (lon1 - lon2) * dRed2 + (lat1 - lat2) * (lat1 - lat2);\t\n return Math.sqrt(dMinDist2);\n}", "function checkDistance(gps1, gps2) {\n var R = 6378137; //Radius in metres\n var distLat = toRad(gps2.latitude - gps1.latitude);\n var distLong = toRad(gps2.longitude - gps1.longitude);\n var lat1 = toRad(gps1.latitude);\n var lat2 = toRad(gps2.latitude);\n\n\n var a = Math.sin(distLat / 2) * Math.sin(distLat / 2) +\n Math.cos(lat1) * Math.cos(lat2) *\n Math.sin(distLong / 2) * Math.sin(distLong / 2);\n var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n var distance = R * c;\n console.log(\"You are \" + distance + \"m away from this target\");\n return distance; //Returns distance in metres\n}", "function CalcDistance(lat1, lon1, lat2, lon2) {\r\n if ((lat1 == lat2) && (lon1 == lon2)) {\r\n return 0;\r\n }\r\n else {\r\n var radlat1 = Math.PI * lat1 / 180;\r\n var radlat2 = Math.PI * lat2 / 180;\r\n var theta = lon1 - lon2;\r\n var radtheta = Math.PI * theta / 180;\r\n var dist = Math.sin(radlat1) * Math.sin(radlat2) + Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta);\r\n if (dist > 1) {\r\n dist = 1;\r\n }\r\n dist = Math.acos(dist);\r\n dist = dist * 180 / Math.PI;\r\n dist = dist * 60 * 1.1515;\r\n dist = dist * 1.609344; //km\r\n return Math.round(dist * 1000) / 1000;\r\n }\r\n} //end function CalcDistance()", "function distance(a,b) {\n return Math.sqrt(((b.lat - a.lat) * (b.lat - a.lat)) + ((b.lng - a.lng) * (b.lng - a.lng)));\n}", "function distance(lat1, lon1, lat2, lon2) {\n var p = 0.017453292519943295; // Math.PI / 180\n var c = Math.cos;\n var a = 0.5 - c((lat2 - lat1) * p) / 2 +\n c(lat1 * p) * c(lat2 * p) *\n (1 - c((lon2 - lon1) * p)) / 2;\n var milesAway = (12742 * Math.asin(Math.sqrt(a))) / 1.609344;\n return (milesAway).toFixed(1); // 2 * R; R = 6371 km\n}", "function distance(lat1, lon1, lat2, lon2) {\n var p = 0.017453292519943295; // Math.PI / 180\n var c = Math.cos;\n var a = 0.5 - c((lat2 - lat1) * p) / 2 +\n c(lat1 * p) * c(lat2 * p) *\n (1 - c((lon2 - lon1) * p)) / 2;\n var milesAway = (12742 * Math.asin(Math.sqrt(a))) / 1.609344;\n return (milesAway).toFixed(1); // 2 * R; R = 6371 km\n}", "function distance(lat1, lon1, lat2, lon2) {\n var p = 0.017453292519943295;\n var c = Math.cos;\n var a = 0.5 - c((lat2 - lat1) * p)/2 + c(lat1 * p) * c(lat2 * p) * (1 - c((lon2 - lon1) * p))/2;\n return 12742 * Math.asin(Math.sqrt(a)) * 0.621371;\n }", "function calcDistance(lat1,lon1,lat2,lon2){\n\tvar R = 6371; //earth's radius (KM)\n\treturn Math.acos(Math.sin(toRads(lat1))*Math.sin(toRads(lat2)) + \n Math.cos(toRads(lat1))*Math.cos(toRads(lat2)) *\n Math.cos(toRads(lon2-lon1))) * R;\n\n}", "function computeDistance( lat1, lon1, lat2, lon2 ) {\r\n\tvar degreeToSM = 60 * 1.15078; // 60 NM * (NM->SM factor)\r\n\tvar dlat = Math.abs( lat1 - lat2 ) * degreeToSM;\r\n\tvar dlon = Math.abs( lon1 - lon2 ) * degreeToSM * Math.cos( lat1 * Math.PI / 180 );\r\n\treturn Math.sqrt( dlat * dlat, dlon * dlon );\r\n}", "function calcDistanceOf2Bound(bound1,bound2){\n\tvar lng1 = (bound1.left+bound1.right)/2;\n\tvar lat1 = (bound1.top+bound1.bottom)/2;\n\n\tvar lng2 = (bound2.left+bound2.right)/2;\n\tvar lat2 = (bound2.top+bound2.bottom)/2;\n\n\treturn calcDistance(lng1,lat1,lng2,lat2);\n}", "function DistanceBetween2LatLng(lat1, lon1, lat2, lon2){\n let R = 6371;\n let dLat = deg2rad(lat2-lat1);\n let dLon = deg2rad(lon2-lon1); \n let a = Math.sin(dLat/2) * Math.sin(dLat/2) + Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2)) * Math.sin(dLon/2) * Math.sin(dLon/2);\n let c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)); \n let d = R * c;\n return d;\n}", "function distance(lat1, lon1, lat2, lon2) {\n\treturn Math.acos(Math.sin(lat1.toRadians()) * Math.sin(lat2.toRadians()) + Math.cos(lat1.toRadians()) * Math.cos(lat2.toRadians()) * Math.cos((lon2-lon1).toRadians())) * 6371e3;\n}", "function distance(lat1, lon1, lat2, lon2) {\n const p = 0.017453292519943295; // Math.PI / 180\n const c = Math.cos;\n const a = 0.5 - c((lat2 - lat1) * p) / 2 +\n c(lat1 * p) * c(lat2 * p) *\n (1 - c((lon2 - lon1) * p)) / 2;\n\n return 12742 * Math.asin(Math.sqrt(a)); // 2 * R; R = 6371 km\n}", "function lat_lng_diff(lat1, lng1, lat2, lng2) {\n var radius = 6378.137;\n var lat_diff = (lat2 - lat1) * Math.PI / 180;\n var lng_diff = (lng2 - lng1) * Math.PI / 180;\n var arc = Math.sin(lat_diff / 2) * Math.sin(lat_diff / 2) +\n Math.cos(lat1 * Math.PI / 180) * Math.cos(lat2 * Math.PI / 180) *\n Math.sin(lng_diff / 2) * Math.sin(lng_diff / 2);\n var c = 2 * Math.atan2(Math.sqrt(arc), Math.sqrt(1 - arc));\n var d = radius * c;\n return d * 1000*config.sizeRatio;\n}", "calDistance(lat1, lon1, lat2, lon2) {\n let R = 6371; // km\n let dLat = this.toRad(lat2 - lat1);\n let dLon = this.toRad(lon2 - lon1);\n let radlat1 = this.toRad(lat1);\n let radlat2 = this.toRad(lat2);\n let a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +\n Math.sin(dLon / 2) * Math.sin(dLon / 2) * Math.cos(radlat1) * Math.cos(radlat2);\n let c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n let d = R * c;\n return d;\n }", "function distanceInMiles(lat1, lon1, lat2, lon2) {\n if(lat1 == lat2 && lon1 == lon2)\n\treturn 0.;\n \n var rad = 3963.;\n var deg2rad = Math.PI/180.;\n var ang = Math.cos(lat1 * deg2rad) * Math.cos(lat2 * deg2rad) * Math.cos((lon1 - lon2)*deg2rad) + Math.sin(lat1 * deg2rad) * Math.sin(lat2 * deg2rad);\n return Math.acos(ang) * 1.02112 * rad;\n}", "function getDistance(lat1, lon1, lat2, lon2) {\n var p = 0.017453292519943295; // Math.PI / 180\n var c = Math.cos;\n var a = 0.5 - c((lat2 - lat1) * p)/2 + \n c(lat1 * p) * c(lat2 * p) * \n (1 - c((lon2 - lon1) * p))/2;\n \n return 12742 * Math.asin(Math.sqrt(a)); // 2 * R; R = 6371 km\n}", "function distance(lat1, lon1, lat2, lon2) {\n var p = 0.017453292519943295; // Math.PI / 180\n var c = Math.cos;\n\n var a = 0.5 - c((lat2 - lat1) * p)/2 +\n c(lat1 * p) * c(lat2 * p) *\n (1 - c((lon2 - lon1) * p))/2;\n\n return 2 * 3959 * Math.asin(Math.sqrt(a)); // Earth's Radius = 3959 miles\n}", "function initMap(location, location2) {\n\n //This function will draw a line between two points on the map\n //https://cloud.google.com/blog/products/maps-platform/how-calculate-distances-map-maps-javascript-api\n function haversine_distance(mk1, mk2) {\n var R = 3958.8; // Radius of the Earth in miles\n var rlat1 = mk1.position.lat() * (Math.PI / 180); // Convert degrees to radians\n var rlat2 = mk2.position.lat() * (Math.PI / 180); // Convert degrees to radians\n var difflat = rlat2 - rlat1; // Radian difference (latitudes)\n var difflon = (mk2.position.lng() - mk1.position.lng()) * (Math.PI / 180); // Radian difference (longitudes)\n\n var d = 2 * R * Math.asin(Math.sqrt(Math.sin(difflat / 2) * Math.sin(difflat / 2) + Math.cos(rlat1) * Math.cos(rlat2) * Math.sin(difflon / 2) * Math.sin(difflon / 2)));\n return d * 1.60934; //converted to km\n }\n\n var map = new google.maps.Map(document.getElementById(\"map\"), {\n zoom: 12,\n center: location\n });\n\n var marker = new google.maps.Marker({\n position: location,\n map: map\n });\n var infoWindow = new google.maps.InfoWindow({\n content: \"<h5> source </h5>\"\n });\n marker.addListener(\"click\", function() {\n infoWindow.open(map, marker);\n });\n\n\n var marker2 = new google.maps.Marker({\n position: location2,\n map: map\n });\n var infoWindow2 = new google.maps.InfoWindow({\n content: \"<h5> dest </h5>\"\n });\n marker2.addListener(\"click\", function() {\n infoWindow2.open(map, marker2);\n });\n\n // Draw a line showing the straight distance between the markers\n var line = new google.maps.Polyline({\n path: [location, location2],\n map: map\n });\n\n var distance = haversine_distance(marker, marker2);\n\n return distance;\n\n}", "calcDistance(lat1, lon1, lat2, lon2) {\n let radlat1 = Math.PI * lat1/180;\n \tlet radlat2 = Math.PI * lat2/180;\n \tlet theta = lon1-lon2;\n \tlet radtheta = Math.PI * theta/180;\n \tlet dist = Math.sin(radlat1) * Math.sin(radlat2)\n + Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta);\n \tdist = Math.acos(dist);\n \tdist = dist * 180/Math.PI;\n \tdist = dist * 60 * 1.1515;\n dist = dist * 1609.344;\n \treturn dist;\n }", "function distance(lat1, lon1, lat2, lon2) {\n var p = 0.017453292519943295; // Math.PI / 180\n var c = Math.cos;\n var a = 0.5 - c((lat2 - lat1) * p)/2 +\n c(lat1 * p) * c(lat2 * p) *\n (1 - c((lon2 - lon1) * p))/2;\n\n return 12742 * Math.asin(Math.sqrt(a)); // 2 * R; R = 6371 km\n}", "function distance(lat1, lon1, lat2, lon2) {\n var p = 0.017453292519943295; // Math.PI / 180\n var c = Math.cos;\n var a = 0.5 - c((lat2 - lat1) * p)/2 +\n c(lat1 * p) * c(lat2 * p) *\n (1 - c((lon2 - lon1) * p))/2;\n\n return 12742 * Math.asin(Math.sqrt(a)); // 2 * R; R = 6371 km\n}", "function distance(lat1, lon1, lat2, lon2) {\n var p = 0.017453292519943295; // Math.PI / 180\n var c = Math.cos;\n var a = 0.5 - c((lat2 - lat1) * p) / 2 +\n c(lat1 * p) * c(lat2 * p) *\n (1 - c((lon2 - lon1) * p)) / 2;\n return 12742 * Math.asin(Math.sqrt(a)); // 2 * R; R = 6371 km\n }", "ifInBound(currentPos, coordinates1, coordinates2){\n \n //check for inverted squares\n if(coordinates1.latitude < coordinates2.latitude){\n //swap\n var temp = coordinates1\n coordinates1 = coordinates2\n coordinates2 = temp\n }\n else{\n\n }\n console.log(\"====ALL MY COORDINATES ==== \")\n console.log(currentPos)\n console.log(coordinates1)\n console.log(coordinates2)\n\n if((currentPos.coords.latitude <= coordinates1.latitude) && (currentPos.coords.latitude >= coordinates2.latitude)){\n console.log(\"latitude inbound\")\n if((currentPos.coords.longitude >= coordinates1.longitude) && (currentPos.coords.longitude <= coordinates2.longitude)){\n console.log(\"longitude inbound\")\n return true\n }\n }\n return false\n\n }", "function differenceInLatitudeLongitude(lat1, lon1, lat2, lon2){ // generally used geo measurement function\n var R = 6378.137; // Radius of earth in KM\n var dLat = lat2 * Math.PI / 180 - lat1 * Math.PI / 180;\n var dLon = lon2 * Math.PI / 180 - lon1 * Math.PI / 180;\n var a = Math.sin(dLat/2) * Math.sin(dLat/2) +\n Math.cos(lat1 * Math.PI / 180) * Math.cos(lat2 * Math.PI / 180) *\n Math.sin(dLon/2) * Math.sin(dLon/2);\n var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));\n var d = R * c;\n return d * 1000; // meters\n}", "function getDifference(lat1, lng1, lat2, lng2){\n \n // calculating distance using Google api\n \n var p1 = new google.maps.LatLng(lat1,lng1);\n var p2 = new google.maps.LatLng(lat2,lng2);\n \n var googleDistance = (google.maps.geometry.spherical.computeDistanceBetween(p1, p2)).toFixed(9);\n console.log(\"Distance using google Api (in kms) = \"+ googleDistance/1000);\n\n \n\n// calculating ditance manually\n// using modified version of this answer https://stackoverflow.com/a/1502821\n \n var rad = function(x) {\n return x * Math.PI / 180;\n };\n\n var R = 6378137; // Earth’s mean radius in meter\n \n var dLat = rad(lat2 - lat1);\n \n var dLong = rad(lng2 - lng1);\n \n var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +\n Math.cos(rad(lat1) * Math.cos(rad(lat2))) *\n Math.sin(dLong / 2) * Math.sin(dLong / 2);\n \n var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n \n var manualDistance = R * c;\n \n var difference = Math.abs(googleDistance - manualDistance);\n console.log(\"Distance using manual algorithm used in jobMap (in kms) = \"+ manualDistance/1000);\n\n return difference/1000;\n}", "distance(lat1, lon1, lat2, lon2) {\n var radLat1 = Math.PI * lat1 / 180,\n radLat2 = Math.PI * lat2 / 180;\n\n var theta = lon1 - lon2,\n radTheta = Math.PI * theta / 180;\n\n var dist = Math.sin(radLat1) * Math.sin(radLat2) + Math.cos(radLat1) * Math.cos(radLat2) * Math.cos(radTheta);\n dist = Math.acos(dist);\n dist = dist * 180 / Math.PI;\n dist = dist * 60 * 1.1515;\n return dist;\n }", "function calculateDistance(lat1, lon1, lat2, lon2) {\n var R = 6371e3; // m\n var dLat = (lat2 - lat1).toRad();\n var dLon = (lon2 - lon1).toRad(); \n var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +\n Math.cos(lat1.toRad()) * Math.cos(lat2.toRad()) * \n Math.sin(dLon / 2) * Math.sin(dLon / 2); \n var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)); \n var d = R * c;\n console.log(\"distance=\"+d + \"R = \"+ R);\n return Math.round(d);\n }", "function gps_distance(lat1, lon1, lat2, lon2)\r\n{\r\n\t// http://www.movable-type.co.uk/scripts/latlong.html contains Algorithm\r\n var R = 6371; // km\r\n var dLat = (lat2-lat1) * (Math.PI / 180);\r\n var dLon = (lon2-lon1) * (Math.PI / 180);\r\n var lat1 = lat1 * (Math.PI / 180);\r\n var lat2 = lat2 * (Math.PI / 180);\r\n\r\n var a = Math.sin(dLat/2) * Math.sin(dLat/2) +\r\n Math.sin(dLon/2) * Math.sin(dLon/2) * Math.cos(lat1) * Math.cos(lat2);\r\n var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));\r\n var d = R * c;\r\n\r\n return d;\r\n}", "function harversineDistance(lat1, lon1, lat2, lon2){\n\t\tvar dLat = toRad(lat2-lat1);\n\t\tvar dLon = toRad(lon2-lon1);\n\t\tvar lat1 = toRad(lat1);\n\t\tvar lat2 = toRad(lat2);\n\t\tvar a = Math.sin(dLat/2) * Math.sin(dLat/2) +\n \t Math.sin(dLon/2) * Math.sin(dLon/2) * Math.cos(lat1) * Math.cos(lat2); \n\t\tvar c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)); \n\t\tvar distance = R * c;\n\treturn distance;\n\t}", "function calcDistance(p1, p2){\r\n\t//returns distance between the points with no decimals and in meters.\r\n return (google.maps.geometry.spherical.computeDistanceBetween(p1, p2)).toFixed(0);\r\n}", "function distance(lon1, lat1, lon2, lat2) {\n var R = 6371; // Radius of the earth in km\n var dLat = (lat2 - lat1) * Math.PI / 180; // deg2rad below\n var dLon = (lon2 - lon1) * Math.PI / 180;\n var a = \n 0.5 - Math.cos(dLat)/2 + \n Math.cos(lat1 * Math.PI / 180) * Math.cos(lat2 * Math.PI / 180) * \n (1 - Math.cos(dLon))/2;\n\n return R * 2 * Math.asin(Math.sqrt(a));\n}", "function calcCenterDistanceOf2Bound(bound1,bound2){\n\tvar lng1 = (bound1.left+bound1.right)/2;\n\tvar lat1 = (bound1.top+bound1.bottom)/2;\n\n\tvar lng2 = (bound2.left+bound2.right)/2;\n\tvar lat2 = (bound2.top+bound2.bottom)/2;\n\n\treturn calcDistance(lng1,lat1,lng2,lat2);\n}", "GetDistance(lat1, lng1, lat2, lng2) {// coordinates of two GPS positions\n    var radLat1 = this.Rad(lat1);\n     var radLat2 = this.Rad(lat2);\n var a = radLat1 - radLat2;\n var b = this.Rad(lng1) - this.Rad(lng2);\n var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) +\n     Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)));\n     s = s * 6378.137;// EARTH_RADIUS;\n   s = Math.round(s * 10000) / 10000; //output unit is kilo\n     s = s.toFixed(2);//2 digitals after dot\n return s;\n }", "calculateDistanceBetween(position, source) {\n if ((position.lat === source.lat) && (position.lng === source.lng)) {\n return 0\n }\n\n var radlat1 = Math.PI * position.lat/180\n var radlat2 = Math.PI * source.lat/180\n var theta = position.lng - source.lng\n var radtheta = Math.PI * theta/180\n var dist = Math.sin(radlat1) * Math.sin(radlat2) + Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta)\n if (dist > 1) {\n dist = 1\n }\n return Math.acos(dist) * 180/Math.PI * DISTANCE_BETWEEN_LATITUDE_IN_MILES * KILOMETRES_IN_A_MILE \n }", "function getDistance(p1, p2){\r\n\tvar dLon = Math.radians(p2.lng - p1.lng); \r\n\tvar dLat = Math.radians(p2.lat - p1.lat);\r\n\tvar lat1 = Math.radians(p1.lat);\r\n\tvar lat2 = Math.radians(p2.lat);\r\n\tvar a = Math.sin(dLat/2) * Math.sin(dLat/2) + Math.sin(dLon/2) * Math.sin(dLon/2) * Math.cos(lat1) * Math.cos(lat2); \r\n\tvar c = 2 * Math.atan2( Math.sqrt(a), Math.sqrt(1-a) ) ;\r\n\tvar output = 6371 * c ;\r\n\treturn output;\r\n}", "function distance(lat1, lon1, lat2, lon2, unit) {\r\r var radlat1 = Math.PI * lat1/180\r\r var radlat2 = Math.PI * lat2/180\r\r var radlon1 = Math.PI * lon1/180\r\r var radlon2 = Math.PI * lon2/180\r\r var theta = lon1-lon2\r\r var radtheta = Math.PI * theta/180\r\r var dist = Math.sin(radlat1) * Math.sin(radlat2) + Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta);\r\r dist = Math.acos(dist)\r\r dist = dist * 180/Math.PI\r\r dist = dist * 60 * 1.1515\r\r if (unit==\"K\") { dist = dist * 1.609344 }", "function cerca (posicion1, posicion2) {\n var distancia;\n // debugger;\n distancia = Math.pow((Math.pow(posicion1.latitud - posicion2.latitud, 2) + Math.pow(posicion1.longitud - posicion2.longitud,2)), 0.5);\n console.log(distancia);\n return distancia <= distancia_max;\n }", "function calcDistance(point_a, point_b){\n var lat = [point_a.lat(), point_b.lat()];\n var lng = [point_a.lng(), point_b.lng()];\n\n var R = 6378137; // RADIUS IN METER //\n\n var dLat = (lat[1]-lat[0]) * Math.PI / 180;\n var dLng = (lng[1]-lng[0]) * Math.PI / 180;\n\n var a = Math.sin(dLat/2) * Math.sin(dLat/2) + Math.cos(lat[0] * Math.PI / 180 ) * Math.cos(lat[1] * Math.PI / 180 ) * Math.sin(dLng/2) * Math.sin(dLng/2);\n var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));\n var d = R * c;\n\n return Math.round(d);\n}", "function gps_distance(lat1, lon1, lat2, lon2) {\n // http://www.movable-type.co.uk/scripts/latlong.html\n var R = 6371; // km\n var dLat = (lat2 - lat1) * (Math.PI / 180);\n var dLon = (lon2 - lon1) * (Math.PI / 180);\n var lat1 = lat1 * (Math.PI / 180);\n var lat2 = lat2 * (Math.PI / 180);\n\n var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +\n Math.sin(dLon / 2) * Math.sin(dLon / 2) * Math.cos(lat1) * Math.cos(lat2);\n var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n var d = R * c;\n\n return d;\n}", "function distanceBetweenPoints(p1, p2) {\r\n var R = 6371; // earth's mean radius in km\r\n var dLat = (p2.lat() - p1.lat())*Math.PI/180;\r\n var dLong =(p2.lng() - p1.lng())*Math.PI/180;\r\n var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) + Math.cos((p1.lat())*Math.PI/180) * Math.cos((p2.lat())*Math.PI/180) * Math.sin(dLong / 2) * Math.sin(dLong / 2);\r\n var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\r\n var d = R * c;\r\n return d;\r\n}", "function miniMapDistance(x, y)\n{\n\treturn Math.sqrt(Math.pow(x - 0, 2) + Math.pow(y - 0, 2));\n}", "distance(lat1, lon1, lat2, lon2, unit) {\n if ((lat1 == lat2) && (lon1 == lon2)) {\n return 0;\n }\n else {\n var radlat1 = Math.PI * lat1 / 180;\n var radlat2 = Math.PI * lat2 / 180;\n var theta = lon1 - lon2;\n var radtheta = Math.PI * theta / 180;\n var dist = Math.sin(radlat1) * Math.sin(radlat2) + Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta);\n if (dist > 1) {\n dist = 1;\n }\n dist = Math.acos(dist);\n dist = dist * 180 / Math.PI;\n dist = dist * 60 * 1.1515;\n if (unit == \"K\") { dist = dist * 1.609344 }\n if (unit == \"N\") { dist = dist * 0.8684 }\n if (dist > 80) {\n alert(AorE.A == true ? LangAr.Distance : LangEn.Distance)\n }\n }\n }", "function withinRange(range, lat1, lon1, lat2, lon2) {\n var R = 6371000; // meters\n var φ1 = lat1;\n var φ2 = lat2;\n var Δφ = (lat2 - lat1);\n var Δλ = (lon2 - lon1);\n\n var a = Math.sin(Δφ / 2) * Math.sin(Δφ / 2) +\n Math.cos(φ1) * Math.cos(φ2) *\n Math.sin(Δλ / 2) * Math.sin(Δλ / 2);\n var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n\n var d = R * c;\n\n //1609.34 converrts meters to miles\n return range < 0 || d / 1609.34 < range;\n }", "function getSpaceDiffernece(lat1, lat2, lon1, lon2){\n\n\t\t\t\tvar R = 6371000; // metres\n\t\t\t\tvar φ1 = Math.radians(lat1);\n\t\t\t\tvar φ2 = Math.radians(lat2);\n\t\t\t\tvar temp1 = (lat2-lat1)\n\t\t\t\tvar Δφ = Math.radians(temp1);\n\t\t\t\tvar temp2 = (lon2-lon1)\n\t\t\t\tvar Δλ = Math.radians(temp2);\n\n\t\t\t\tvar a = Math.sin(Δφ/2) * Math.sin(Δφ/2) +\n\t\t\t\tMath.cos(φ1) * Math.cos(φ2) *\n\t\t\t\tMath.sin(Δλ/2) * Math.sin(Δλ/2);\n\t\t\t\tvar c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));\n\n\t\t\t\tvar d = R * c;\n\t\t\t\treturn d\n\n\t\t\t}", "function distance(lat1, lon1, lat2, lon2) {\n\tvar radlat1 = Math.PI * lat1/180;\n\tvar radlat2 = Math.PI * lat2/180;\n\tvar theta = lon1-lon2;\n\tvar radtheta = Math.PI * theta/180;\n\tvar dist = Math.sin(radlat1) * Math.sin(radlat2) + Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta);\n\tdist = Math.acos(dist);\n\tdist = dist * 180/Math.PI;\n\tdist = dist * 60 * 1.1515;\n\treturn dist;\n}", "function distanciaPuntos(lat1,lon1,lat2,lon2)\n{\n\tvar R = 6371e3;//Radio de la tierra\n\tvar Ang1 = lat1 * Math.PI/180;\n\tvar Ang2 = lat2 * Math.PI/180;\n\tvar A1 = (lat2-lat1) * Math.PI/180;\n\tvar A2 = (lon2-lon1) * Math.PI/180;\n\n\tvar a = Math.sin(A1/2) * Math.sin(A1/2) +\n\t\t\t Math.cos(Ang1) * Math.cos(Ang2) *\n\t\t\t Math.sin(A2/2) * Math.sin(A2/2);\n\tvar c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));\n\n\treturn ((R * c)/1000).toFixed(2)+\" Km\";\n}", "function getDistanceScore(distance1, distance2) {\n console.log(\"getDistanceScore stepped in - \"+ distance1 + \" \" + distance2);\n if ((\"latitude\" in distance1) && (\"latitude\" in distance2) && (\"longitude\" in distance1) && (\"longitude\" in distance2)) {\n console.log(distance1[\"latitude\"]+\",\"+distance1[\"longitude\"]+\",\"+distance2[\"latitude\"]+\",\"+distance2[\"longitude\"]);\n var x = distance1[\"latitude\"] - distance2[\"latitude\"];\n var y = distance1[\"longitude\"] - distance2[\"longitude\"];\n //pythagorean theorem to find the distance between the two locations\n return (Math.sqrt(x*x + y*y) );\n }\n else {\n console.log(\"Locations have no latitude and longitude\");\n return 0;\n }\n}", "function distance(p1, p2) {\r\n lat1r = deg2rad(p1.lat);\r\n lat2r = deg2rad(p2.lat);\r\n\r\n x = (p2.lng - p1.lng) * Math.cos((lat1r + lat2r) / 2);\r\n y = p2.lat - p1.lat;\r\n return Math.sqrt(x * x + y * y) * deg2rad(R);\r\n}", "function computeDistance(p1, p2) {\n var R = 6371000; // m\n var d = Math.acos(Math.sin(p1.latitude) * Math.sin(p2.latitude) +\n Math.cos(p1.latitude) * Math.cos(p2.latitude) *\n Math.cos(p2.longitude - p1.longitude)) * R;\n return d;\n}", "distance(lat1, lon1) {\n if (lat1 === this.latitude && lon1 === this.longitude) {\n return 0;\n }\n else {\n const radlat1 = (Math.PI * lat1) / 180;\n const radlat2 = (Math.PI * this.latitude) / 180;\n const theta = lon1 - this.longitude;\n const radtheta = (Math.PI * theta) / 180;\n let dist = Math.sin(radlat1) * Math.sin(radlat2) +\n Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta);\n if (dist > 1) {\n dist = 1;\n }\n dist = Math.acos(dist);\n dist = (dist * 180) / Math.PI;\n dist = dist * 60 * 1.1515;\n dist = dist * 1.609344;\n return dist;\n }\n }", "function calcDistance(p1, p2){\r\n return (google.maps.geometry.spherical.computeDistanceBetween(p1, p2)/1000).toFixed(3);\r\n }", "function distance(lat1, lon1, lat2, lon2) {\n\tvar radlat1 = Math.PI * lat1/180\n\tvar radlat2 = Math.PI * lat2/180\n\tvar theta = lon1-lon2\n\tvar radtheta = Math.PI * theta/180\n\tvar dist = Math.sin(radlat1) * Math.sin(radlat2) + Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta);\n\tif (dist > 1) {\n\t\tdist = 1;\n\t}\n\tdist = Math.acos(dist)\n\tdist = dist * 180/Math.PI\n\tdist = dist * 60 * 1.1515\n\treturn dist\n}", "function calc_distance(lat1,lon1,lat2,lon2){//in degrees\n var R = 6371e3; //radius of earth in meters\n var φ1 = lat1.toRadians();\n var φ2 = lat2.toRadians();\n var Δφ = (lat2-lat1).toRadians();\n var Δλ = (lon2-lon1).toRadians();\n\n var a = Math.sin(Δφ/2) * Math.sin(Δφ/2) +\n Math.cos(φ1) * Math.cos(φ2) *\n Math.sin(Δλ/2) * Math.sin(Δλ/2);\n var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));\n\n var d = R * c;\n \n return d;\n}", "function calcDistanceFrom(lat1, lon1, lat2, lon2) {\n\tvar R = 6371; // km\n\tvar dLat = toRad(lat2-lat1);\n\tvar dLon = toRad(lon2-lon1);\n\tlat1 = toRad(lat1);\n\tlat2 = toRad(lat2);\n\n\tvar a = Math.sin(dLat/2) * Math.sin(dLat/2) +\n\t\tMath.sin(dLon/2) * Math.sin(dLon/2) * Math.cos(lat1) * Math.cos(lat2);\n\tvar c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)); \n\tvar d = R * c;\n\treturn d;\n}", "function distanceInKmBetweenCoords(lat1, lon1, lat2, lon2) {\n var earthRadiusKm = 6371;\n\n var dLat = degreesToRadians(lat2-lat1);\n var dLon = degreesToRadians(lon2-lon1);\n\n lat1 = degreesToRadians(lat1);\n lat2 = degreesToRadians(lat2);\n\n var a = Math.sin(dLat/2) * Math.sin(dLat/2) +\n Math.sin(dLon/2) * Math.sin(dLon/2) * Math.cos(lat1) * Math.cos(lat2); \n var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)); \n return earthRadiusKm * c;\n}", "function calcDistance(lat1,lat2,lon1,lon2) {\n var R = 6371; // km\n var dLat = ((lat2)-(lat1)).toRad();\n var dLon = ((lon2)-(lon1)).toRad();\n var lat1 = (lat1).toRad();\n var lat2 = (lat2).toRad();\n\n var a = Math.sin(dLat/2) * Math.sin(dLat/2) +\n Math.sin(dLon/2) * Math.sin(dLon/2) * Math.cos(lat1) * Math.cos(lat2); \n var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)); \n var d = R * c;\n //km\n //return d;\n //miles\n return parseInt(parseInt(d)*.62137);\n}", "function distance(lat1, lon1, lat2, lon2) {\n var radlat1 = Math.PI * lat1/180;\n var radlat2 = Math.PI * lat2/180;\n var radlon1 = Math.PI * lon1/180;\n var radlon2 = Math.PI * lon2/180;\n var theta = lon1-lon2;\n var radtheta = Math.PI * theta/180;\n var dist = Math.sin(radlat1) * Math.sin(radlat2) + Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta);\n dist = Math.acos(dist);\n dist = dist * 180/Math.PI;\n dist = dist * 60 * 1.1515;\n\n unit = \"K\";\n if (unit==\"K\") { dist = dist * 1.609344; }\n if (unit==\"N\") { dist = dist * 0.8684; }\n return dist;\n}", "distanceComparator(lat1, lon1, lat2, lon2){\n\n let radlat1 = Math.PI * lat1/180;\n let radlat2 = Math.PI * lat2/180;\n let theta = lon1-lon2;\n let radtheta = Math.PI * theta/180;\n let dist = Math.sin(radlat1) * Math.sin(radlat2) + Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta);\n dist = Math.acos(dist);\n dist = dist * 180/Math.PI;\n dist = dist * 60 * 1.1515;\n dist = dist * 1.609344;\n\n return dist;\n }", "function distanceBetween(lat1, lng1, lat2, lng2) {\n var earthRadius = 6371000.; // meters\n var dLat = toRadians(lat2 - lat1);\n var dLng = toRadians(lng2 - lng1);\n var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +\n Math.cos(toRadians(lat1)) * Math.cos(toRadians(lat2)) *\n Math.sin(dLng / 2) * Math.sin(dLng / 2);\n var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n var dist = earthRadius * c;\n\n return dist;\n}", "function distance(lat1, long1, lat2, long2) {\n var R = 3959; // Earth's radius in miles\n var x = (long2 - long1) * Math.cos((lat1 + lat2)/2);\n var y = lat2 - lat1;\n var d = Math.sqrt(x*x + y*y) * R;\n return d;\n}", "function distcalc(lat1, lng1, lat2, lng2) {\n\t//from www.movable-type.co.uk/scripts/latlong.html\n\tvar R = 6371; \n\tvar dLat = (lat2-lat1) * Math.PI / 180;\n\tvar dLng = (lng2-lng1) * Math.PI / 180;\n\tvar lat1 = lat1 * Math.PI / 180;\n\tvar lat2 = lat2 * Math.PI / 180;\n\t\n\tvar a = Math.sin(dLat/2) * Math.sin(dLat/2) +\n\tMath.sin(dLng/2) * Math.sin(dLng/2) * Math.cos(lat1) * Math.cos(lat2); \n\tvar c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)); \n\tvar d = (R * c)*0.6214; //in miles\n\treturn d.toFixed(2);\n}", "function calDistance(lat1, lon1, lat2, lon2, unit) {\n if ((lat1 === lat2) && (lon1 === lon2)) {\n return 0;\n }\n else {\n var radlat1 = Math.PI * lat1/180;\n var radlat2 = Math.PI * lat2/180;\n var theta = lon1-lon2;\n var radtheta = Math.PI * theta/180;\n var dist = Math.sin(radlat1) * Math.sin(radlat2) + Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta);\n if (dist > 1) {\n dist = 1;\n }\n dist = Math.acos(dist);\n dist = dist * 180/Math.PI;\n dist = dist * 60 * 1.1515;\n if (unit===\"K\") { dist = dist * 1.609344 }\n if (unit===\"N\") { dist = dist * 0.8684 }\n return dist;\n }\n}", "function calcDistance(p1, p2) {\n return (google.maps.geometry.spherical.computeDistanceBetween(p1, p2) / 1000).toFixed(2);\n}", "function calcDistance(p1, p2) {\n var valorKm = parseFloat((google.maps.geometry.spherical.computeDistanceBetween(p1, p2) / 1000).toFixed(2));\n\n if (valorKm <= parseInt(radioAccionHome)) { dentroRango = 1; }\n else { dentroRango = 0; }\n return dentroRango;\n}", "function coordinateDistance(latitude1, longitude1, latitude2, longitude2) {\n\n\tvar h = haversin(radian(latitude2 - latitude1)) + Math.cos(radian(latitude2))*Math.cos(radian(latitude1))*haversin(radian(longitude2 - longitude1));\n\n\t//h needs to be less than 1 (possible floating point error); it's mentioned in the wikipedia article\n\tif(h > 1.0) {\n\t\th = 1.0;\n\t}\n\n\t// distance = 2 * (earth radius) * arcsin ( sqrt ( h ) )\n\t// 3963.191 = earth's radius in miles\n\treturn 2.0 * 3963.191 * Math.asin(Math.sqrt(h));\n}", "function calcDistance(p1, p2) {\n return (google.maps.geometry.spherical.computeDistanceBetween(p1, p2) / 1000).toFixed(1);\n}", "function calcDistance(p1, p2) {\n\n return (google.maps.geometry.spherical.computeDistanceBetween(p1, p2) / 628).toFixed(3);\n }", "function get_distance(loc1, loc2) {\n var x1 = loc2[1] - loc1[1];\n var dLat = toRad(x1);\n var x2 = loc2[0] - loc1[0];\n var dLon = toRad(x2);\n var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +\n Math.cos(toRad(loc1[1])) * Math.cos(toRad(loc2[1])) *\n Math.sin(dLon / 2) * Math.sin(dLon / 2);\n var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n var distance = 6371 * c;\n return (distance * 1000);\n}", "function calculateDistance(lat1, lon1, lat2, lon2) {\n var R = 6371; // km\n var dLat = (lat2-lat1).toRad();\n var dLon = (lon2-lon1).toRad();\n var a = Math.sin(dLat/2) * Math.sin(dLat/2) +\n Math.cos(lat1.toRad()) * Math.cos(lat2.toRad()) *\n Math.sin(dLon/2) * Math.sin(dLon/2);\n var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));\n var d = R * c;\n return d;\n}", "function distance(lat1, lon1, lat2, lon2) {\n\n\tvar radlat1 = Math.PI * lat1 / 180;\n\tvar radlat2 = Math.PI * lat2 / 180;\n\tvar radlon1 = Math.PI * lon1 / 180;\n\tvar radlon2 = Math.PI * lon2 / 180;\n\tvar theta = lon1 - lon2;\n\tvar radtheta = Math.PI * theta / 180;\n\tvar dist = Math.sin(radlat1) * Math.sin(radlat2) + Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta);\n\tdist = Math.acos(dist);\n\tdist = dist * 180 / Math.PI;\n\tdist = dist * 60 * 1.1515;\n\tdist = dist * 1.609344 * 1000;\n\treturn dist;\n}", "function calculateDistance(lat1, lon1, lat2, lon2, unit) {\r\n\tvar radlat1 = Math.PI * lat1/180;\r\n\tvar radlat2 = Math.PI * lat2/180;\r\n\tvar radlon1 = Math.PI * lon1/180;\r\n\tvar radlon2 = Math.PI * lon2/180;\r\n\tvar theta = lon1-lon2;\r\n\tvar radtheta = Math.PI * theta/180;\r\n\tvar subAngle = Math.sin(radlat1) * Math.sin(radlat2) + Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta);\r\n\tsubAngle = Math.acos(subAngle);\r\n\tsubAngle = subAngle * 180/Math.PI; // convert the degree value returned by acos back to degrees from radians\r\n\tdist = (subAngle/360) * 2 * Math.PI * 3956; // ((subtended angle in degrees)/360) * 2 * pi * radius )\r\n\t// where radius of the earth is 3956 miles\r\n\tif (unit==\"K\") { dist = dist * 1.609344 ;} // convert miles to km\r\n\tif (unit==\"N\") { dist = dist * 0.8684 ;} // convert miles to nautical miles\r\n\treturn dist;\r\n}", "function CalculateDistance(first, second) {\n var R = 6371e3; // metres\n var φ1 = first.latitude * Math.PI / 180; // φ, λ in radians\n var φ2 = second.latitude * Math.PI / 180;\n var Δφ = (second.latitude - first.latitude) * Math.PI / 180;\n var Δλ = (second.longtitude - first.longtitude) * Math.PI / 180;\n\n var a = Math.sin(Δφ / 2) * Math.sin(Δφ / 2) +\n Math.cos(φ1) * Math.cos(φ2) *\n Math.sin(Δλ / 2) * Math.sin(Δλ / 2);\n var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n\n var d = R * c;\n\n return d;\n}", "function findPlaces(loc_1, loc_2, time_threshold, velocity_threshold){\n\tlat1 = sevenDays[loc_1]['latitudeE7'];\n\tlon1 = sevenDays[loc_1]['longitudeE7'];\n\tlat2 = sevenDays[loc_2]['latitudeE7'];\n\tlon2 = sevenDays[loc_2]['longitudeE7'];\n\t//console.log(haversineDist(lat1, lon1, lat2, lon2));\n\tdist = haversineDist(lat1, lon1, lat2, lon2);\n\ttime1 = parseInt(sevenDays[loc_1]['timestampMs']);\n\ttime2 = parseInt(sevenDays[loc_2]['timestampMs']);\n\tvelocity = getVelocity(dist, time1, time2);\n\ttime_diff = time2 - time1;\n\tif (time_diff > time_threshold) {\n\t\tif (velocity < velocity_threshold) {\n\t\t\treturn true;\n\t\t}\n\t}\n\telse {\n\t\treturn false;\n\t}\n}", "function distanceBetweenCoordinates(lat1, long1, lat2, long2) {\n var latDif, longDif, centralAngle, distance, earthRadius;\n\n earthRadius = 6371;\n latDif = Math.abs(lat1 - lat2);\n longDif = Math.abs(long1 - long2);\n\n centralAngle = 2 * Math.asin(\n Math.sqrt(\n Math.pow(Math.sin(latDif / 2), 2) +\n Math.cos(lat1) * Math.cos(lat2) *\n Math.pow(Math.sin(longDif / 2), 2)\n ));\n\n distance = Math.PI / 180 * centralAngle * earthRadius;\n\n return Math.round(distance * 1000);\n}", "IsWithinGeofence(position, location) {//coordinates of two GPS positions\n    let radLat1 = this.Rad(position.Latitude);\n     let radLat2 = this.Rad(location.Latitude);\n let a = radLat1 - radLat2;\n let b = this.Rad(position.Longitude) - this.Rad(location.Longitude);\n let s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) +\n     Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)));\n     s = s * 6378.137;// EARTH_RADIUS;\n   s = Math.round(s * 10000) / 10000; //the unit of output is Kilometer \n console.log(`DistanceToTarget is ${s}`);\n     s = s.toFixed(2);//Keep two digit after point\n if(s<location.Radius){\n return true;\n };\n return false;\n }", "function distanceLatLon(lat1, lon1, lat2, lon2, unit) {\n if ((lat1 == lat2) && (lon1 == lon2)) {\n return 0;\n }\n else {\n var radlat1 = Math.PI * lat1/180;\n var radlat2 = Math.PI * lat2/180;\n var theta = lon1-lon2;\n var radtheta = Math.PI * theta/180;\n var dist = Math.sin(radlat1) * Math.sin(radlat2) + Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta);\n if (dist > 1) {\n dist = 1;\n }\n dist = Math.acos(dist);\n dist = dist * 180/Math.PI;\n dist = dist * 60 * 1.1515;\n if (unit==\"K\") { dist = dist * 1.609344 }\n if (unit==\"N\") { dist = dist * 0.8684 }\n return dist;\n }\n}", "function dist(lat1, lon1, lat2, lon2) {\n var R = 6371e3; // metres\n var thetaOne = toRadians(lat1);\n var thetaTwo = toRadians(lat2);\n var deltaTheta = toRadians(lat2-lat1);\n var deltaLambda = toRadians(lon2-lon1);\n \n var a = Math.sin(deltaTheta/2) * Math.sin(deltaTheta/2) +\n Math.cos(thetaOne) * Math.cos(thetaTwo) *\n Math.sin(deltaLambda/2) * Math.sin(deltaLambda/2);\n var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));\n \n var d = R * c;\n \n return d;\n}", "function getDistance(lat1, lon1, lat2, lon2, unit = \"M\") {\n if ((lat1 === lat2) && (lon1 === lon2)) {\n return 0;\n }\n else {\n let radlat1 = Math.PI * lat1 / 180;\n let radlat2 = Math.PI * lat2 / 180;\n let theta = lon1 - lon2;\n let radtheta = Math.PI * theta / 180;\n let dist = Math.sin(radlat1) * Math.sin(radlat2) + Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta);\n if (dist > 1) {\n dist = 1;\n }\n dist = Math.acos(dist);\n dist = dist * 180 / Math.PI;\n dist = dist * 60 * 1.1515;\n if (unit === \"K\") { dist = dist * 1.609344 }\n if (unit === \"N\") { dist = dist * 0.8684 }\n return dist;\n }\n}", "function calcDistance(lat1,lat2,lon1,lon2) {\n var R = 6371; // km\n var dLat = (parseInt(lat2)-parseInt(lat1)).toRad();\n var dLon = (parseInt(lon2)-parseInt(lon1)).toRad();\n var lat1 = parseInt(lat1).toRad();\n var lat2 = parseInt(lat2).toRad();\n\n var a = Math.sin(dLat/2) * Math.sin(dLat/2) +\n Math.sin(dLon/2) * Math.sin(dLon/2) * Math.cos(lat1) * Math.cos(lat2); \n var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)); \n var d = R * c;\n //km\n //return d;\n //miles\n return parseInt(parseInt(d)*.62137);\n}", "function PythagorasEquirectangular( lat1, lon1, lat2, lon2 )\n{\n lat1 = Deg2Rad(lat1);\n lat2 = Deg2Rad(lat2);\n lon1 = Deg2Rad(lon1);\n lon2 = Deg2Rad(lon2);\n var R = 6371; // km\n var x = (lon2-lon1) * Math.cos((lat1+lat2)/2);\n var y = (lat2-lat1);\n var d = Math.sqrt(x*x + y*y) * R;\n return d;\n}", "function distance (p1, p2){\n return (google.maps.geometry.spherical.computeDistanceBetween(p1, p2)).toFixed(2);\n }", "function getDistanceBtw(lat1,lon1,lat2,lon2){\n\n var R = 6371; // km, radius\n var a1 = lat1.toRadians();\n var a2 = lat2.toRadians();\n var bb = (lat2-lat1).toRadians();\n var cc = (lon2-lon1).toRadians();\n\n var a = Math.sin(bb/2) * Math.sin(bb/2) +\n Math.cos(a1) * Math.cos(a2) *\n Math.sin(cc/2) * Math.sin(cc/2);\n var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));\n var d = R * c;\n return d;\n }", "function calculateDistance(lat1, lon1, lat2, lon2) {\n var R = 6371; // km\n var dLat = (lat2-lat1).toRad();\n var dLon = (lon2-lon1).toRad();\n var a = Math.sin(dLat/2) * Math.sin(dLat/2) +\n Math.cos(lat1.toRad()) * Math.cos(lat2.toRad()) *\n Math.sin(dLon/2) * Math.sin(dLon/2);\n var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));\n var d = R * c;\n // convert to miles\n d = d * 0.621371;\n var dis = d.toFixed(2);\n return dis;\n}", "function createLine(map) {\n latLngA = new google.maps.LatLng(latTest);\n latLngB = new google.maps.LatLng(latB, lngB);\n distance = google.maps.geometry.spherical.computeDistanceBetween (latLngA, latLngB) / 1000;\n console.log(latLngA)\n console.log(latLngB)\n console.log(distance.toFixed(2));\n\n const line = new google.maps.Polyline({\n path: [\n latLngA,\n latLngB\n ],\n strokeColor: \"#7eb324\",\n strokeOpacity: 1.0,\n strokeWeight: 5,\n map: map\n });\n}", "function markerSortWE(a, b) {\n return Number(a.vessel.lon) - Number(b.vessel.lon);\n}", "haversine(lat1, lon1, lat2, lon2) {\n let AVERAGE_RADIUS_OF_EARTH_METER = 6371000.0;\n\n let dLat = Math.PI*(lat1 - lat2)/180.0;\n let dLon = Math.PI*(lon1 - lon2)/180.0;\n\n let a = Math.sin(dLat / 2.0) * Math.sin(dLat / 2.0)\n + Math.cos(Math.PI*lat1/180.0) * Math.cos(Math.PI*lat2/180.0) * Math.sin(dLon / 2.0) * Math.sin(dLon / 2.0);\n\n let c = 2.0*Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n\n let dist = Math.round(AVERAGE_RADIUS_OF_EARTH_METER * c);\n return dist;\n }", "function calculateDistance(pointer_1, pointer_2) {\n var dist = (google.maps.geometry.spherical.computeDistanceBetween(pointer_1, pointer_2) / 1000).toFixed(2);\n return parseFloat(dist);\n\n }", "function calcDistance(lat1, lon1, lat2, lon2, unit) {\n var radlat1 = Math.PI * lat1 / 180\n var radlat2 = Math.PI * lat2 / 180\n var theta = lon1 - lon2\n var radtheta = Math.PI * theta / 180\n var dist = Math.sin(radlat1) * Math.sin(radlat2) + Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta);\n dist = Math.acos(dist)\n dist = dist * 180 / Math.PI\n dist = dist * 60 * 1.1515\n if (unit == \"K\") {\n dist = dist * 1.609344\n }\n if (unit == \"N\") {\n dist = dist * 0.8684\n }\n return dist\n}", "function distBetweenTwoGeoPoints(lat, long, lat2, long2) {\n const earthRadius = 6371;\n var deltaPhi = ((lat2 - lat) * Math.PI) / 180;\n var deltaLambda = ((long2 - long) * Math.PI) / 180;\n\n phi1 = (lat * Math.PI) / 180;\n phi2 = (lat2 * Math.PI) / 180;\n\n var a =\n Math.sin(deltaPhi / 2) ** 2 +\n Math.cos(phi1) * Math.cos(phi2) * Math.sin(deltaLambda / 2) ** 2;\n var c = 2 * Math.atan(Math.sqrt(a), Math.sqrt(1 - a));\n\n return earthRadius * c;\n}", "function distanzaAppartamenti(lat1,lon1,lat2,lon2)\n {\n var R = 6372.8; // Earth Radius in Kilometers\n\n var dLat = deg2Rad(lat2-lat1);\n var dLon = deg2Rad(lon2-lon1);\n var a = Math.sin(dLat/2) * Math.sin(dLat/2) + Math.cos(deg2Rad(lat1)) * Math.cos(deg2Rad(lat2)) * Math.sin(dLon/2) * Math.sin(dLon/2);\n var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));\n var d = R * c;\n\n // Return Distance in Kilometers\n return d;\n }", "function getDistanceBetweenTwoLatLonInKm(lat1, lon1, lat2, lon2) {\n var R = 6371; // Radius of the earth in km\n var dLat = degTorad(lat2 - lat1); \n var dLon = degTorad(lon2 - lon1); \n var a = \n Math.sin(dLat/2) * Math.sin(dLat/2) +\n Math.cos(degTorad(lat1)) * Math.cos(degTorad(lat2)) * \n Math.sin(dLon/2) * Math.sin(dLon/2); \n var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)); \n var d = R * c; // Distance in km\n return d;\n}", "_getDistanceFromLatLonInKm(lat1,lon1,lat2,lon2) {\r\n var R = 6371; // Radius of the earth in km\r\n var dLat = this._deg2rad(lat2-lat1);\r\n var dLon = this._deg2rad(lon2-lon1); \r\n var a = \r\n Math.sin(dLat/2) * Math.sin(dLat/2) +\r\n Math.cos(this._deg2rad(lat1)) * Math.cos(this._deg2rad(lat2)) * \r\n Math.sin(dLon/2) * Math.sin(dLon/2)\r\n ; \r\n var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)); \r\n var d = R * c; // Distance in km\r\n return d;\r\n }", "function distance(lat1, lon1, lat2, lon2, unit) {\n var radlat1 = (Math.PI * lat1) / 180;\n var radlat2 = (Math.PI * lat2) / 180;\n var theta = lon1 - lon2;\n var radtheta = (Math.PI * theta) / 180;\n var dist =\n Math.sin(radlat1) * Math.sin(radlat2) +\n Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta);\n if (dist > 1) {\n dist = 1;\n }\n dist = Math.acos(dist);\n dist = (dist * 180) / Math.PI;\n dist = dist * 60 * 1.1515;\n if (unit == \"K\") {\n dist = dist * 1.609344;\n }\n if (unit == \"N\") {\n dist = dist * 0.8684;\n }\n return dist;\n }", "function findDistance(lat1, lat2, lon1, lon2) {\n let distance = 0;\n // Earth's radius\n const R = 6371e3;\n const lat1_rad = (lat1 * Math.PI) / 180;\n const lat2_rad = (lat2 * Math.PI) / 180;\n const latDiff_rad = ((lat2 - lat1) * Math.PI) / 180;\n const lonDiff_rad = ((lon2 - lon1) * Math.PI) / 180;\n const a =\n Math.sin(latDiff_rad / 2) * Math.sin(latDiff_rad / 2) +\n Math.cos(lat1_rad) *\n Math.cos(lat2_rad) *\n Math.sin(lonDiff_rad / 2) *\n Math.sin(lonDiff_rad);\n const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n // Distance in meters\n distance = R * c;\n\n return distance;\n}", "function calculateDistance (lat1, lat2, lng1, lng2){\n\n\tvar lat1 = Math.radians(lat1);\n\tvar lat2 = Math.radians(lat2);\n\tvar lng1 = Math.radians(lng1);\n\tvar lng2 = Math.radians(lng2);\n\n\tvar distance = Math.acos(Math.sin(lat1) * Math.sin(lat2) + Math.cos(lat1) * Math.cos(lat2) * Math.cos(lng1 - lng2));\n\n\treturn 6371 * distance;\n}", "function getDistance(lat1, lon1, lat2, lon2, unit) {\n var radlat1 = Math.PI * lat1 / 180;\n var radlat2 = Math.PI * lat2 / 180;\n var radlon1 = Math.PI * lon1 / 180;\n var radlon2 = Math.PI * lon2 / 180;\n var theta = lon1 - lon2;\n var radtheta = Math.PI * theta / 180;\n var dist = Math.sin(radlat1) * Math.sin(radlat2) + Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta);\n dist = Math.acos(dist);\n dist = dist * 180 / Math.PI;\n dist = dist * 60 * 1.1515; //Miles\n if (unit == \"K\") {\n dist = dist * 1.609344;\n }\n return dist;\n }", "function distance(lat1, lon1, lat2, lon2, unit) {\n var radlat1 = Math.PI * lat1/180\n var radlat2 = Math.PI * lat2/180\n var theta = lon1-lon2\n var radtheta = Math.PI * theta/180\n var dist = Math.sin(radlat1) * Math.sin(radlat2) + Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta);\n \n if (dist > 1) {\n dist = 1;\n }\n\n dist = Math.acos(dist)\n dist = dist * 180/Math.PI\n dist = dist * 60 * 1.1515\n \n if (unit==\"K\") { dist = dist * 1.609344 }\n if (unit==\"N\") { dist = dist * 0.8684 }\n \n return dist\n}", "function distance(lat1, lon1, lat2, lon2, unit) {\n var radlat1 = (Math.PI * lat1) / 180;\n var radlat2 = (Math.PI * lat2) / 180;\n var theta = lon1 - lon2;\n var radtheta = (Math.PI * theta) / 180;\n var dist =\n Math.sin(radlat1) * Math.sin(radlat2) +\n Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta);\n if (dist > 1) {\n dist = 1;\n }\n dist = Math.acos(dist);\n dist = (dist * 180) / Math.PI;\n dist = dist * 60 * 1.1515;\n if (unit == \"K\") {\n dist = dist * 1.609344;\n }\n if (unit == \"N\") {\n dist = dist * 0.8684;\n }\n return dist;\n }", "function findDistance(latA, lonA, latB, lonB) {\n\n\t\tconsole.log(\"finding distance between:\",latA, lonA, latB, lonB);\n\n\t\tlet Rm = 3961; // mean radius of the earth (miles) at 39 degrees from the equator\n\t\tlet Rk = 6373; // mean radius of the earth (km) at 39 degrees from the equator\n\n\t\tlet t1, n1, t2, n2, lat1, lon1, lat2, lon2, dlat, dlon, a, c, dm, dk, mi, km;\n\t\t\n\t\t// get values for lat1, lon1, lat2, and lon2\n\t\tt1 = latA;\n\t\tn1 = lonA;\n\t\tt2 = latB;\n\t\tn2 = lonB;\n\t\tconsole.log(\"finding t distance between:\", t1, t2);\n\n\t\t// convert coordinates to radians\n\t\tlat1 = deg2rad(t1);\n\t\tlon1 = deg2rad(n1);\n\t\tlat2 = deg2rad(t2);\n\t\tlon2 = deg2rad(n2);\n\t\tconsole.log(\"finding deg2rad\", lat1, lon1, lat2, lon2);\n\n\t\t// find the differences between the coordinates\n\t\tdlat = lat2 - lat1;\n\t\tdlon = lon2 - lon1;\n\t\tconsole.log(\"dlat dlon\",dlat, dlon );\n\n\n\t\t// here's the heavy lifting\n\t\ta = Math.pow(Math.sin(dlat/2),2) + Math.cos(lat1) * Math.cos(lat2) * Math.pow(Math.sin(dlon/2),2);\n\t\tc = 2 * Math.atan2(Math.sqrt(a),Math.sqrt(1-a)); // great circle distance in radians\n\t\tdm = c * Rm; // great circle distance in miles\n\t\tdk = c * Rk; // great circle distance in km\n\t\t\n\t\tconsole.log(\"dm dk \",dm, dk);\n\n\t\t// round the results down to the nearest 1/1000\n\t\tmi = round(dm);\n\t\tkm = round(dk);\n\t\t\n\t\t\n\t\treturn {distanceMi: mi, distanceKm: km };\n\t}" ]
[ "0.68691903", "0.6734594", "0.66759187", "0.6652746", "0.6638453", "0.6638453", "0.66240364", "0.65910727", "0.657463", "0.6573136", "0.65559983", "0.6546252", "0.6521168", "0.65164185", "0.6516011", "0.6505852", "0.64942694", "0.64934486", "0.64902854", "0.64853597", "0.6484824", "0.6484824", "0.6453473", "0.64278954", "0.6389117", "0.63870203", "0.6371026", "0.63602465", "0.6356732", "0.63336354", "0.6330011", "0.63283926", "0.6319172", "0.63154966", "0.63128036", "0.63006604", "0.62960106", "0.62871265", "0.62868464", "0.6280426", "0.62800664", "0.62636054", "0.62615335", "0.62555516", "0.6239008", "0.62349087", "0.62342334", "0.62312126", "0.62300336", "0.6228913", "0.6222045", "0.6221154", "0.6220622", "0.62045664", "0.6200032", "0.6197894", "0.61947894", "0.6191837", "0.6185031", "0.6184982", "0.6181861", "0.61791444", "0.6173093", "0.6158473", "0.6157006", "0.6149605", "0.6143195", "0.61421895", "0.6140159", "0.614002", "0.6132597", "0.61293805", "0.61282635", "0.611996", "0.61193615", "0.61187327", "0.6115113", "0.6113684", "0.6112976", "0.6112861", "0.61125845", "0.6110749", "0.6108423", "0.61024016", "0.60935974", "0.60930705", "0.60895944", "0.6085421", "0.60822743", "0.6072881", "0.60726285", "0.6070865", "0.6069081", "0.6062149", "0.60616165", "0.60565215", "0.6052716", "0.6047972", "0.60464466", "0.6043429" ]
0.6781569
1
find a map that has a different center than the others
function findOutOfSyncMap() { var zoomedMap = findOddball(getMapArray(), zoomComparator); if (zoomedMap !== null) { return zoomedMap; } return findOddball(getMapArray(), latlongComparator); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calculateCenter() {\r\n center = map.getCenter();\r\n}", "function calculateCenter() {\n center = map.getCenter();\n}", "getMapCenter() {\n const windowPosition = new Cesium.Cartesian2(this.viewer.container.clientWidth / 2, this.viewer.container.clientHeight / 2);\n const pickRay = this.viewer.scene.camera.getPickRay(windowPosition);\n const result = {};\n const pickPosition = this.viewer.scene.globe.pick(pickRay, this.viewer.scene, result);\n if (pickPosition == undefined) {\n return null;\n }\n console.log(result);\n return result;\n }", "function findTileMapCoord(map){\n\tvar r,b; //iterators\n\n\tfor(r = 0; r < map.tiles.length; r++){\n\t\tfor(b=0; b < map.tiles[r].length; b++){\n\t\t\tif(map.tiles[r][b] !== undefined){\n\t\t\t\tmap.tiles[r][b].mapX = r;\n\t\t\t\tmap.tiles[r][b].mapY = b;\n map.tiles[r][b].image.alpha = 0;\n\n\t\t\t\tif(map.tiles[r][b].isPassable){\n map.openTiles.push(map.tiles[r][b]);\n findNeighborTiles(map,r,b);\n //Potentially can calculate this ahead of time, instead of on the fly\n //findViewableTiles(map.tiles[r][b],map);\n }\n\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t}\n}", "function centerlivemap() {\r\n\r\n\tvar havemarkers = false;\r\n\r\n\t//Go through units\r\n\tfor (unit in unitinfo) {\r\n\r\n\t\t//If unit marker is currently hidden or is shown but has has moved\r\n\t\tif (unitinfo[unit][\"marker\"] != undefined) {\r\n\t\t\thavemarkers = true;\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t//If there are markers\r\n\tif (havemarkers) {\r\n\t\t//Auto center and zoom on markers\r\n\t\tmapstraction.autoCenterAndZoom();\r\n\t\t\r\n\t}\r\n\r\n}", "function calculateCenter(){\n center = map.getCenter();\n }", "function mapCenter (){\n if (window.innerWidth > 600) {return [40, -125]}\n else {return [40, -98]}\n }", "function getMapsBesides(map) {\r\n return $.grep(getMapArray(), function(value) { return value != map });\r\n}", "function centerMapElt(elt){\n let ds = elt.dataset;\n map.fitBounds([[ds.min_lat,ds.min_lon],[ds.max_lat,ds.max_lon]]);\n}", "function centerMap() {\n getLocation()\n }", "function getBoundingRectLocs (center, grid) {\n var jQueryDoc = $(window.document),\n jQH = jQueryDoc.height(),\n jQW = jQueryDoc.width(),\n R = jQH/jQW,\n size = (grid ||.002);\n\n center.latitude = Math.round(center.latitude/(2*size))*(2*size);\n center.longitude = Math.round(center.longitude/(2*size/R))*(2*size/R);\n\n return [\n center.latitude + size,\n center.longitude - size/R,\n center.latitude - size,\n center.longitude + size/R\n ];\n\n }", "function CenterMap() {\n if(props.centerOnMarker && props.centerOnMarker[0] && props.centerOnMarker[1]) {\n const map = useMap();\n try { \n map.invalidateSize(true);\n map.flyTo(props.centerOnMarker, map.getMaxZoom());\n } catch (e) {\n // center map - when marker coords are not set (on new search request)\n map.flyTo(centerCoords, map.getZoom());\n } \n }\n return null;\n }", "function centerMap() {\r\n\t\tvar sets = $['mapsettings'];\r\n\t\tvar $this = sets.element;\r\n\t\tvar location = new Point(($this.innerWidth()/2)-(sets.resolutions[sets.zoom-1].width/2),($this.innerHeight()/2)-(sets.resolutions[sets.zoom-1].height/2));\r\n\t\tsetInnerDimentions(location);\r\n\t}", "static findIntersectingArtifactFromMap(clientBox,map,netScroll) {\n var box = svgHelpers.smoBox(clientBox); //svgHelpers.untransformSvgPoint(this.context.svg,clientBox);\n\n\t\t// box.y = box.y - this.renderElement.offsetTop;\n\t\t// box.x = box.x - this.renderElement.offsetLeft;\n\t\tvar rv = [];\n\n\t\tObject.keys(map).forEach((k) => {\n var object = map[k];\n\t\t\t// Measure has been updated, but not drawn.\n\t\t\tif (!object.box) {\n\t\t\t\t// console.log('there is no box');\n\t\t\t} else {\n\t\t\t\tvar obox = svgHelpers.adjustScroll(svgHelpers.smoBox(object.box),netScroll);\n\t\t\t\tvar i1 = box.x - obox.x; // handle edge not believe in x and y\n\t\t\t\tvar i2 = box.y - obox.y;\n\t\t\t\tif (i1 > 0 && i1 < object.box.width && i2 > 0 && i2 < object.box.height) {\n\t\t\t\t\trv.push(object);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\treturn rv;\n\n }", "function matchMapOrigin(){\r\n\t\t// do matchMap with error-fallback option\r\n\t\treturn Q.allSettled([contextMapping.matchMap(lat, lng), 'default'])\r\n\t\t\t\t.spread(function(matchResult, defaultResult){\r\n\t\t\t\t\tif (matchResult.state == 'fulfilled'){\r\n\t\t\t\t\t\tlat = matchResult.value.lat;\r\n\t\t\t\t\t\tlng = matchResult.value.lng;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t}", "function findBounds(lat_min,lat_max, lng_min, lng_max, map, maps) {\n\tmap.setCenter(maps.LatLng(((lat_max + lat_min) / 2.0),((lng_max + lng_min) / 2.0)));\n\tmap.fitBounds(maps.LatLngBounds(\n\t\t//bottom left\n\t\tmaps.LatLng(lat_min, lng_min),\n\t\t//top right\n\t\tmaps.LatLng(lat_max, lng_max)\n\t));\n}", "function compararmapa(elemento,escala){\n if ((elemento.x-1)%20==0 && (elemento.y-1)%20==0){\n elemento.xworld=Math.trunc(elemento.x/escala.x);\n elemento.yworld=Math.trunc(elemento.y/escala.y);\n }\n}", "function recognize_map(character)\r\n{\r\n var temp_position={x=0,y=0}\r\n for(var row=0;row<map.length;row++)\r\n {\r\n for(var col=0;col<map[0].length;col++)\r\n {\r\n if(map[row][col]==character){temp_position.x=row;temp_position.y=col;}\r\n }\r\n }\r\n return temp_position;\r\n}", "function getMapCenter() {\n \n var mapCenterCoords = [30, 0];\n\n return mapCenterCoords;\n \n}", "function latLngsToSearchShape(map, latLngs) {\n var p0 = map.options.crs.project(latLngs[0][0]);\n var p1 = map.options.crs.project(latLngs[0][2]);\n var dx = Math.abs(p0.x - p1.x);\n var dy = Math.abs(p0.y - p1.y);\n \n var distance = map.getProjectedPixelSize() * searchDistance();\n var geo;\n\n if (dx <= distance && dy <= distance) {\n geo = [ (p0.x + p1.x) * 0.5, (p0.y + p1.y) * 0.5, distance ];\n }\n else {\n geo = [ Math.min(p0.x, p1.x), Math.min(p0.y, p1.y), Math.max(p0.x, p1.x), Math.max(p0.y, p1.y) ];\n }\n\n return geo;\n }", "function mapForApproximateLocationCentreChanged()\n {\n determineLocationFromMap();\n }", "function SearchCorner() {\n for(let y=0; y<target_data_map.height; y++) {\n //cornerMap[y] = [];\n for(let x=0; x<target_data_map.width; x++) {\n Object.keys(DAT).forEach(function(key) {\n // Search the corner.\n var val = DAT[key];\n var is_corner = true;\n for(let i=x-2; i<=x+2; i++) {\n if(i< 0 ) continue;\n if(i>=target_data_map.width) continue;\n for(let j=y-2; j<=y+2; j++) {\n if(j< 0 ) continue;\n if(j>=target_data_map.height) continue;\n var n = i - x + 3;\n var m = j - y + 3;\n if(val.target[m][n] == ANY) continue;\n if(val.target[m][n] != map2d[j][i] ) {\n is_corner = false;\n }\n }\n }\n\n // Mask 2d map\n if(is_corner) {\n //cornerMap[y][x] = val.character;\n var mask = null;\n if(key.match(/outer/)) {\n switch ($.random.nextInt(1,3)) {\n case 1:\n mask = val.mask_a;\n break;\n case 2:\n mask = val.mask_b;\n break;\n case 3:\n mask = val.mask_c;\n break;\n }\n }else{\n mask = val.mask;\n }\n for(let i=x-2; i<=x+2; i++) {\n if(i< 0 ) continue;\n if(i>=target_data_map.width) continue;\n for(let j=y-2; j<=y+2; j++) {\n if(j< 0 ) continue;\n if(j>=target_data_map.height) continue;\n var n = i - x + 3;\n var m = j - y + 3;\n if(mask[m][n] == NO_MASK) continue;\n map2d[j][i] = mask[m][n];\n }\n }\n }\n }, DAT);\n }\n }\n\n //var hoge = \"\";\n //for(let y=0; y<target_data_map.height; y++) {\n // for(let x=0; x<target_data_map.width; x++) {\n // if(cornerMap[y][x] === undefined ) {\n // hoge += \"X\";\n // }else{\n // hoge += String(cornerMap[y][x]);\n // }\n // }\n // hoge += \"\\n\";\n //}\n //console.log(hoge);\n\n //var fuga = \"\";\n //for(let y=0; y<target_data_map.height; y++) {\n // for(let x=0; x<target_data_map.width; x++) {\n // if(map2d[y][x] == 0) {\n // fuga += \" 0\";\n // }else if (map2d[y][x] == 1) {\n // fuga += \" 1\";\n // }else {\n // fuga += String(map2d[y][x]);\n // }\n // }\n // fuga += \"\\n\";\n //}\n //console.log(fuga);\n }", "function initMap() {\n map = new google.maps.Map( document.getElementById( 'map' ),\n { center: { lat: 41.3326, lng: -72.9475 },\n zoom: origZoom,\n styles: [ { \"featureType\": \"poi\", \"stylers\": [ { \"visibility\": \"off\" } ] } ]\n }\n );\n // origMapCenter = new google.maps.LatLng( 41.3326, -72.9475 );\n origMapCenter = map.getCenter();\n}", "function recenterMap(target) {\n console.log(target)\n map.setView(target,8);\n}", "function kBounds(sw, ne) {\n this.sw = sw;\n this.ne = ne;\n this.center = new kPoint((sw.getLat() + ne.getLat()) / 2, (sw.getLng() + ne.getLng()) / 2);\n this.getSW = function () {\n return this.sw;\n }\n this.getNE = function () {\n return this.ne;\n }\n this.getCenter = function () {\n return this.center;\n }\n\n this.getOpticalCenter = function (themap) {\n var swXY = themap.latlngToXY(this.sw);\n var neXY = themap.latlngToXY(this.ne);\n var centerX = Math.abs(swXY[\"x\"] + neXY[\"x\"]) / 2;\n var centerY = Math.abs(swXY[\"y\"] + neXY[\"y\"]) / 2;\n var centerLatLng = themap.XYTolatlng(centerX, themap.height - centerY);\n return centerLatLng;\n }\n this.getZoomLevel = function (themap) {\n origZoom = themap.getZoom();\n var swXY = themap.latlngToXY(this.sw);\n var neXY = themap.latlngToXY(this.ne);\n var dx = Math.abs(swXY[\"x\"] - neXY[\"x\"]);\n var dy = Math.abs(swXY[\"y\"] - neXY[\"y\"]);\n var zoomX = themap.width / dx;\n var zoomY = themap.height / dy;\n if (zoomX > zoomY) var zoom = zoomY;\n if (zoomX <= zoomY) var zoom = zoomX;\n\n var dzoom = (Math.log(zoom)) / (Math.log(2));\n var newzoom = origZoom + dzoom;\n return (newzoom);\n }\n\n this.getDistance = function () {\n return distance(this.sw.getLat(), this.sw.getLng(), this.ne.getLat(), this.ne.getLng());\n }\n\n this.getDistanceText = function () {\n var d = parseFloat(distance(this.sw.getLat(), this.sw.getLng(), this.ne.getLat(), this.ne.getLng()));\n\n if (d < 1000) {\n return Math.round(d) + \"m\";\n }\n\n if (d < 10000) {\n var km = Math.round(d / 10) / 100;\n return km + \"km\";\n }\n if (d < 100000) {\n var km = Math.round(d / 100) / 10;\n return km + \"km\";\n }\n var km = Math.round(d / 1000);\n return km + \"km\";\n }\n\n this.getInnerRadius = function () {\n var w = distance(this.center.getLat(), this.sw.getLng(), this.center.getLat(), this.ne.getLng());\n var h = distance(this.sw.getLat(), this.center.getLng(), this.ne.getLat(), this.center.getLng());\n if (w > h) {\n return h / 2;\n } else {\n return w / 2;\n }\n }\n\n function distance(latdeg1, lngdeg1, latdeg2, lngdeg2) {\n //Umrechnung von Grad auf Radian\n var lat1 = latdeg1 * Math.PI / 180;\n var lng1 = lngdeg1 * Math.PI / 180;\n var lat2 = latdeg2 * Math.PI / 180;\n var lng2 = lngdeg2 * Math.PI / 180;\n\n //Eigentliche Berechnung\n var w = Math.acos(Math.sin(lat1) * Math.sin(lat2) + Math.cos(lat1) * Math.cos(lat2) * Math.cos(lng2 - lng1)) * 180 / Math.PI;\n var d = w / 360 * 40000 * 1000;\n\n return d; //in meter\n }\n}", "function initMap() {\r\n map = new google.maps.Map(document.getElementById('map'), {\r\n center: center,\r\n zoom: 9\r\n });\r\n //creating some markerIcons\r\n defaultIcon = makeMarkerIcon('0091ff');\r\n highlightedIcon = makeMarkerIcon('FFFF24');\r\n\r\n infowindow = new google.maps.InfoWindow();\r\n // it runs the first search\r\n search(center);\r\n //after moving the map, the location for search will chang too\r\n map.addListener('center_changed', function() {\r\n center = {\r\n lat: map.center.lat(),\r\n lng: map.center.lng()\r\n };\r\n });\r\n}", "function getMapCenterY()\r\n{\r\n\tvar frameY = getHeight()/2;\r\n\tvar mapTop = getMapTop();\r\n\treturn frameY - mapTop;\t\r\n}", "centre(){\n this.map.fitBounds(this.bounds)\n }", "function findNeighborTiles(map,xCoOrd, yCoOrd){\n var north = yCoOrd - 1;\n var south = yCoOrd + 1;\n var east = xCoOrd + 1;\n var west = xCoOrd - 1;\n\n \n if(isValidNeighbor(map.tiles[xCoOrd][south]))\n map.tiles[xCoOrd][yCoOrd].neighborTiles[\"south\"] = map.tiles[xCoOrd][south];\n if(isValidNeighbor(map.tiles[xCoOrd][north]))\n map.tiles[xCoOrd][yCoOrd].neighborTiles[\"north\"] = map.tiles[xCoOrd][north];\n if(isValidNeighbor(map.tiles[east][yCoOrd]))\n map.tiles[xCoOrd][yCoOrd].neighborTiles[\"east\"] = map.tiles[east][yCoOrd];\n if(isValidNeighbor(map.tiles[west][yCoOrd]))\n map.tiles[xCoOrd][yCoOrd].neighborTiles[\"west\"] = map.tiles[west][yCoOrd];\n if(isValidNeighbor(map.tiles[east][south]))\n map.tiles[xCoOrd][yCoOrd].neighborTiles[\"southeast\"] = map.tiles[east][south];\n if(isValidNeighbor(map.tiles[west][south]))\n map.tiles[xCoOrd][yCoOrd].neighborTiles[\"southwest\"] = map.tiles[west][south];\n if(isValidNeighbor(map.tiles[east][north]))\n map.tiles[xCoOrd][yCoOrd].neighborTiles[\"northeast\"] = map.tiles[east][north];\n if(isValidNeighbor(map.tiles[west][north]))\n map.tiles[xCoOrd][yCoOrd].neighborTiles[\"northwest\"] = map.tiles[west][north];\n //return whether current tile is a valid neighbor\n function isValidNeighbor(currentTile){\n if(currentTile !== undefined){\n if(currentTile.isPassable){\n return true;\n } else return false;\n }else return false;\n }\n}", "function getLocation(searchTile)\n{ \n for(var y = 0; y < mapHeight; y++)\n {\n for(var x = 0; x < mapWidth; x++)\n {\n //Store tile location\n if (map[((y*mapWidth)+x)] == searchTile)\n {\n targetLocation.x = x;\n targetLocation.y = y;\n return true;\n }\n }\n }\n return false;\n}", "function maps(name,x,y){\n if(name===\"classic\"){\n return (x<17 && y>10) || (x>5 && y<3)\n }\n else if(name===\"empty\"){\n return (false)\n }\n else if (name===\"eight\"){\n return (\n (x>18 && y>12 && x<24 && y<18) ||\n (x>18 && y>4 && x<24 && y<10) ||\n (x>26 && y>4 && x<32 && y<10) ||\n (x>26 && y>12 && x<32 && y<18)) ||\n (x>11 && y>4 && x<16 && y<18) ||\n (x>34 && y>4 && x<39 && y<18) ||\n (x>11 && y>=0 && x<39 && y<3) ||\n (x>11 && y>19 && x<39)\n }\n else if (name===\"hulk\"){\n return (\n (!(51>x && x>2 && 3>y && y>0)) &&\n (!(51>x && x>2 && 22>y && y>19)) &&\n (!(53>x && x>50 && 22>y && y>0)) &&\n (!(3>x && x>0 && 22>y && y>0)) &&\n (!(3>x && x>0 && 22>y && y>0))\n )\n }\n else if (name===\"columns\"){\n return (\n (x%2 && y%2)\n )\n }\n}", "function center_changer() { \n // marker filtering\n filter_result = filter_list()\n region1_filter = filter_result[0]\n version1_filter = filter_result[1]\n // list changing\n yes_chosen =[]\n for (var i = 0; i < Site_search.length; i++){\n if (eval(filter_result[2])) {\n yes_chosen.push(i)\n } \n }\n filtered_list_creator(yes_chosen)\n // map center changing\n multiple_selected = yes_chosen\n if (multiple_selected.length >= 1){\n multiple_selected_lat = []\n multiple_selected_lng = []\n for (var k = 0; k < multiple_selected.length; k++){\n multiple_selected_lat.push(Lat_search[multiple_selected[k]])\n multiple_selected_lng.push(Lng_search[multiple_selected[k]])\n }\n jun.map.flyTo({center : [(Math.max(...multiple_selected_lng)+Math.min(...multiple_selected_lng))/2,(Math.max(...multiple_selected_lat)+Math.min(...multiple_selected_lat))/2],zoom:1.1})\n document.getElementById(\"results_num\").innerText = (multiple_selected.length)\n }\n else {\n document.getElementById(\"results_num\").innerText = 0\n } \n}", "function initMap() {\n /* Initializing the map to given coordinates i.e. (32.75, -97.13) with zoom level 16 */\n map = new google.maps.Map(document.getElementById(\"map\"), {\n center: { lat: 32.75, lng: -97.13 },\n zoom: 16,\n });\n\n /* Get current center coordinates to use for search */\n google.maps.event.addListener(map, 'bounds_changed', function () {\n\n bounds = map.getBounds();\n center = bounds.getCenter();\n\n /* Get the radius from center to the current viewport */\n radius = getBoundsRadius(bounds);\n });\n}", "function getMapCenterX()\r\n{\r\n\tvar frameX = getWidth()/2;\r\n\tvar mapLeft = getMapLeft();\r\n\treturn frameX - mapLeft;\r\n}", "function centerMap(){\n map.fitBounds(b);\n map.setZoom(z);\n }", "function updateMapCenter(){\n\tif(lastPoint != null){\n\t\tmap.setCenter(new google.maps.LatLng(lastPoint.latitude, lastPoint.longitude));\n\t\tmap.setZoom(16);\n\t} else if(sizeListArea > 0){\n\t\tbiggestCircle = null;\n\t\tfor(i = 0; i < sizeListArea; i++){\n\t\t\tif(listArea[i].circle.fillColor == allowedColor && (biggestCircle == null || biggestCircle.radius < listArea[i].circle.radius)){\n\t\t\t\tbiggestCircle = listArea[i].circle;\n\t\t\t}\n\t\t}\n\t\tif(biggestCircle != null){\n\t\t\tmap.setCenter(biggestCircle.getCenter());\n\t\t\tmap.setZoom(16);\n\t\t}\n\t}\n}", "function initialMapSelector(div_id, mapcenter_lng, mapcenter_lat) {\n\tvar map = new BMap.Map(div_id, {enableAutoResize: true}); \n\tvar point = new BMap.Point(mapcenter_lng, mapcenter_lat);\n\tmap.centerAndZoom(point, 15);\n\tmap.enableScrollWheelZoom();\n\tmap.addControl(new BMap.NavigationControl());\n\n\t//addMarker(map, point, 0);\n\treturn map; \n}", "function testMapCollision(x, y, map) {\n\n var xx,\n yy,\n i,\n j;\n\n // If there is some error block\n if (isNaN(x) || isNaN(y)) {\n return true;\n }\n\n for (i = -0.1; i <= 0.1; i += 0.2) {\n xx = Math.floor(x + i);\n for (j = -0.1; j <= 0.1; j += 0.2) {\n yy = Math.floor(y + j);\n if (map[yy][xx] !== 0) {\n return true;\n }\n }\n }\n\n return false;\n }", "function findBoundaries() {\n\tgoogle.maps.event.addListener(map, 'bounds_changed', function() {\n\t \tconst bounds = map.getBounds();\n\t \tconst NE = bounds.getNorthEast();\n\t\tconst SW = bounds.getSouthWest();\n\t\tconst coordinates = [`${SW}`, `${NE}`];\n\t\tconst fixed = coordinates.map(e => e.replace(/[{()}]/g, '')).map(e => e.split(', ')).flat();\n\t\tconst parsed = fixed.map(e => parseFloat(e));\n\t\t[parsed[0], parsed[1]] = [parsed[1], parsed[0]];\n\t\t[parsed[2], parsed[3]] = [parsed[3], parsed[2]];\n\t\tconst formattedBounds = parsed.join();\n\t\tgetWheelMapNodes(formattedBounds);\n\t});\n}", "function centerOverAllLocations() {\n var bounds = new google.maps.LatLngBounds();\n var boundChange = false;\n if (routes.length > 0) {\n $(routes).each(function (key, route) {\n if (route.name == curRouteId) {\n if (route.path != null) {\n var array = route.path.getPath().getArray();\n for (var i = 0; i < array.length; i++) {\n bounds.extend(array[i]);\n }\n }\n }\n });\n boundChange = true;\n }\n if (stops.length > 0) {\n $(stops).each(function (key, stop) {\n if (stop.busstopinfo.map != null) {\n bounds.extend(stop.busstopinfo.position);\n }\n });\n boundChange = true;\n }\n if (markers.length > 0) {\n $(markers).each(function (key, bus) {\n if (markers.map_ != null) {\n bounds.extend(markers.pos_);\n }\n });\n }\n if (userLocationCircle && gpsPressed) {\n bounds.union(userLocationCircle.getBounds());\n boundChange = true;\n }\n if (boundChange) {\n newmap.fitBounds(bounds);\n }\n}", "function getCenter(thisMap, otherMap, callback) {\nif (thisMap.spatialReference.wkid === otherMap.spatialReference.wkid) {\n if (callback) {\n\tcallback(thisMap.extent.getCenter());\n }\n} else if (isWebMercator(thisMap.spatialReference) && isWebMercator(otherMap.spatialReference)) {\n if (callback) {\n\tcallback(thisMap.extent.getCenter());\n }\n} else {\n var geomSrv = new esri.tasks.GeometryService(userConfig.geometryServiceURL);\n geomSrv.project([thisMap.extent.getCenter()], otherMap.spatialReference, function (projectedGeoms) {\n\tif (callback) {\n\t callback(projectedGeoms[0]);\n\t}\n });\n}\n}", "get mapWidth() {return ~~(Math.abs(zeach.mapLeft) + zeach.mapRight)}", "function nearNullIsland(x, y, z) {\n\t if (z >= 7) {\n\t var center = Math.pow(2, z - 1),\n\t width = Math.pow(2, z - 6),\n\t min = center - (width / 2),\n\t max = center + (width / 2) - 1;\n\t return x >= min && x <= max && y >= min && y <= max;\n\t }\n\t return false;\n\t }", "function calcCenter(mkrs) {\n var index, len;\n var latSum = 0;\n var lngSum = 0;\n for(index = 0, len = mkrs.length; index < len; ++index) {\n latSum += mkrs[index]['lat'];\n lngSum += mkrs[index]['lng'];\n }\n var latMid = latSum/mkrs.length;\n var lngMid = lngSum/mkrs.length;\n return {lat: latMid, lng: lngMid};\n}", "function calcCenter(mkrs) {\n var index, len;\n var latSum = 0;\n var lngSum = 0;\n for(index = 0, len = mkrs.length; index < len; ++index) {\n latSum += mkrs[index]['lat'];\n lngSum += mkrs[index]['lng'];\n }\n var latMid = latSum/mkrs.length;\n var lngMid = lngSum/mkrs.length;\n return {lat: latMid, lng: lngMid};\n}", "function calculateCoordinatesForTiles(){\n var coordinates = {},\n\t\tc2 = new Cesium.Cartesian2(0, 0)\n \tleftTop = scene.camera.pickEllipsoid(c2)\n c2 = new Cesium.Cartesian2(canvas.width, canvas.height)\n var rightDown = scene.camera.pickEllipsoid(c2)\n\n if (leftTop != null && rightDown != null) {\n coordinates.leftTop = Cesium.Ellipsoid.WGS84.cartesianToCartographic(leftTop)\n coordinates.rightDown = Cesium.Ellipsoid.WGS84.cartesianToCartographic(rightDown)\n console.log(\"min lat/long - \", coordinates.leftTop.latitude, coordinates.leftTop.longitude)\n console.log(\"max lat/long - \", coordinates.rightDown.latitude, coordinates.rightDown.longitude)\n\n\t\treturn coordinates\n } else {\n //The sky is visible in 3D\n return null\n }\n}", "function centerOfMap(points, mapNum) {\n let totalLat = 0;\n let totalLong = 0;\n let counter = 0;\n for (let point of points) {\n if(point.map_id == mapNum) {\n counter += 1;\n totalLat += point.latitude;\n totalLong += point.longitude;\n }\n }\n\n let avgLat = totalLat / counter;\n let avgLong = totalLong / counter;\n\n return ({lat: avgLat, lng: avgLong});\n}", "function mapper_center() {\n var markers = map_markers;\n if (markers == null || markers.length < 1 ) return;\n var bounds = new GLatLngBounds();\n for (var i=0; i<markers.length; i++) {\n bounds.extend(markers[i].getPoint());\n }\n var thezoom = map.getBoundsZoomLevel(bounds);\n if(thezoom > 15 ) thezoom = 15;\n map.setCenter( bounds.getCenter( ), thezoom );\n}", "function gmapRecenter(map) {\n var latnew = Number(document.getElementById(\"pln-latitude\").value);\n const lngnew = Number(document.getElementById(\"pln-longitude\").value);\n const loca = { lat: latnew, lng: lngnew };\n map.setCenter(loca);\n map.setZoom(15);\n\n //* Also recentre Bing Map at the same time\n GetMap(document.getElementById(\"pln-latitude\").value, document.getElementById(\"pln-longitude\").value);\n}", "function centrer() {\n\tmap.setView(new L.LatLng(46.4328, 6.9136), 15);\n}", "function lockBounds(map)\n{\n\n var currentBounds = map.getBounds(),\n current_ne_lng = currentBounds.getNorthEast().lng(),\n current_ne_lat = currentBounds.getNorthEast().lat(),\n current_sw_lng = currentBounds.getSouthWest().lng(),\n current_sw_lat = currentBounds.getSouthWest().lat();\n\n strict_ne_lng = strictBounds.getNorthEast().lng(),\n strict_ne_lat = strictBounds.getNorthEast().lat(),\n strict_sw_lng = strictBounds.getSouthWest().lng(),\n strict_sw_lat = strictBounds.getSouthWest().lat();\n\n var currentCenter = map.getCenter();\n center_lng = currentCenter.lng(),\n center_lat = currentCenter.lat();\n\n if (current_ne_lng > strict_ne_lng) center_lng = 4.915720;\n if (current_ne_lat > strict_ne_lat) center_lat = 52.374288;\n if (current_sw_lng < strict_sw_lng) center_lng = 4.915720;\n if (current_sw_lat < strict_sw_lat) center_lat = 52.374288;\n\n map.setCenter(new google.maps.LatLng(center_lat, center_lng));\n}", "function centreMap() {\n if (Object.keys(people).length == 0) { // Can't possibly be POIs if < 2 people\n map.setCenter(new google.maps.LatLng(54.152141, -3.032227));\n map.setZoom(7);\n } else if (Object.keys(people).length == 1) {\n map.setCenter(people[Object.keys(people)[0]].marker.getPosition());\n map.setZoom(10);\n } else {\n map.fitBounds(bounds, {left: $overlay.width()});\n }\n }", "function tfnewCenterMap( map, zoom = 16 ) {\n\n // Set $ as jQuery.\n const $ = jQuery;\n\n // vars\n var bounds = new google.maps.LatLngBounds();\n\n // loop through all markers and create bounds\n $.each( map.markers, function( i, marker ){\n\n var latlng = new google.maps.LatLng( marker.position.lat(), marker.position.lng() );\n\n bounds.extend( latlng );\n\n });\n\n // only 1 marker?\n if( map.markers.length == 1 )\n {\n // set center of map\n map.setCenter( bounds.getCenter() );\n map.setZoom( zoom );\n }\n else\n {\n // fit to bounds\n map.fitBounds( bounds );\n }\n\n}", "function initMapInd() {\n //setting coordinates to center the map around (--> center about individual object in this case)\n var center = {\n lat: 43.8620,\n lng: -78.9428\n };\n //initializing map inside div with ID '#map-ind', setting zoom level and centering location\n var map = new google.maps.Map(document.getElementById('map-ind'), {\n zoom: 16, //the higher the number, the more zoomed in you are (--> in this case we zoom in a bit because we have narrowed our search)\n center: center\n });\n //placing marker on individual result map\n var marker = new google.maps.Marker({\n position: center,\n map: map\n });\n}", "function miniMapDistance(x, y)\n{\n\treturn Math.sqrt(Math.pow(x - 0, 2) + Math.pow(y - 0, 2));\n}", "getMapInnerBounds() {\n const mb = this.getMap()\n .getDiv()\n .getBoundingClientRect();\n\n let mib = {\n top: mb.top,\n right: mb.right,\n bottom: mb.bottom,\n left: mb.left\n };\n\n mib.width = mib.right - mib.left;\n mib.height = mib.bottom - mib.top;\n return mib;\n }", "function zoomZoneObservations (coordonnees) {\n\t\tecart_x = coordonnees[2] - coordonnees[0];\n\t\tcentre_x = coordonnees[0] + (ecart_x / 2);\n\t\tecart_y = coordonnees[3] - coordonnees[1];\n\t\tcentre_y = coordonnees[1] + (ecart_y / 2);\n\t\tplus_grand_ecart = Math.max(ecart_x,ecart_y);\n\t\tif (plus_grand_ecart < 1) {\n\t\t\tnivzoom = 8;\n\t\t} else {\n\t\t\tif (plus_grand_ecart < 2) {\n\t\t\t\tnivzoom = 7;\n\t\t\t} else {\n\t\t\t\tnivzoom = 6;\n\t\t\t}\n\t\t}\n\t\tmap.setCenter(new GLatLng(centre_x,centre_y), nivzoom);\n\t}", "function isCursorOverMap(xPos, yPos) {\n let visibleMapPopups = $('.popupdiv:visible');\n for(let el of visibleMapPopups) {\n let rect = el.getBoundingClientRect();\n if(isInsideRect(rect, xPos, yPos)) {\n return true;\n }\n }\n // Else, check all map nodes (non-popups)\n for(let map of maps) {\n let rect = $('#' + map.id)[0].getBoundingClientRect();\n if(isInsideRect(rect, xPos, yPos)) {\n return true;\n }\n }\n return false;\n}", "findCenter() {\n return {\n x: (this.right - this.left)/2 + this.left,\n y: (this.bottom - this.top)/2 + this.top\n };\n }", "function extendsMapBounds() {\n var radius = distanceInMeter(map.getCenter(), map.getBounds().getNorthEast()),\n circle = new gm.Circle({\n center: map.getCenter(),\n radius: 1.25 * radius // + 25%\n });\n return circle.getBounds();\n }", "function extendsMapBounds() {\n var radius = distanceInMeter(map.getCenter(), map.getBounds().getNorthEast()),\n circle = new gm.Circle({\n center: map.getCenter(),\n radius: 1.25 * radius // + 25%\n });\n return circle.getBounds();\n }", "function extendsMapBounds() {\n var radius = distanceInMeter(map.getCenter(), map.getBounds().getNorthEast()),\n circle = new gm.Circle({\n center: map.getCenter(),\n radius: 1.25 * radius // + 25%\n });\n return circle.getBounds();\n }", "function setMapCenter() {\n\t$(\"#leftDivInfo\").css({\n\t\t'width': '25%',\n\t\t'margin-top': '0px'\n\t});\n\t$(\"#map-canvas\").css({\n\t\t'height': '700px',\n\t\t'margin-top': '-740px',\n\t\t'margin-left': '25%',\n\t\t'width': '40%'\n\t});\n}", "function get_mapid() {\n var old_mapid = exports.mapid;\n var outer_grid = $('.shown-maps .grid_outer');\n if (outer_grid.length > 0) {\n exports.mapid = parseInt(outer_grid.attr('id').split(',')[0]);\n } else {\n exports.mapid = -1; // mapeditor mapid\n }\n\n if (old_mapid !== exports.mapid) {refresh_all();}\n\n return exports.mapid;\n}", "function findNetworkElementInsideMap(ne) {\n\t\tdocument.getElementById(MAP).scrollTop = ne.y - 100;\n\t\tdocument.getElementById(MAP).scrollLeft = ne.x - 250;\n\t\tvar nodeNumber = this.networkElements.indexOf(ne);\n\t\tvar bgc1 = ne.bgColor1;\n\t\tvar bgc2 = ne.bgColor2;\n\t\tvar bgColor1 = ne.isSelected() ? \"#FF5500\" : bgc1;\n\t\tvar bgColor2 = ne.isSelected() ? \"#FFDDCC\" : bgc2;\n\t\tne.setBackgroundColor(\"#22cc00\", \"#aaff99\");\n\t\tvar fnc = \"highlightFoundNetworkElement(\" + nodeNumber + \", '\" + bgColor1 + \"', '\" + bgColor2 + \"')\";\n\t\tsetTimeout(fnc, 100);\n\t\tfnc = \"highlightFoundNetworkElement(\" + nodeNumber + \", '#22cc00', '#aaff99')\";\n\t\tsetTimeout(fnc, 200);\n\t\tfnc = \"highlightFoundNetworkElement(\" + nodeNumber + \", '\" + bgColor1 + \"', '\" + bgColor2 + \"')\";\n\t\tsetTimeout(fnc, 300);\n\t\tfnc = \"highlightFoundNetworkElement(\" + nodeNumber + \", '#22cc00', '#aaff99')\";\n\t\tsetTimeout(fnc, 400);\n\t\tfnc = \"highlightFoundNetworkElement(\" + nodeNumber + \", '\" + bgColor1 + \"', '\" + bgColor2 + \"')\";\n\t\tsetTimeout(fnc, 500);\n\t\tfnc = \"highlightFoundNetworkElement(\" + nodeNumber + \", '#22cc00', '#aaff99')\";\n\t\tsetTimeout(fnc, 600);\n\t\tfnc = \"highlightFoundNetworkElement(\" + nodeNumber + \", '\" + bgColor1 + \"', '\" + bgColor2 + \"')\";\n\t\tsetTimeout(fnc, 700);\n\t\tfnc = \"resetFoundNetworkElement(\" + nodeNumber + \", '\" + bgc1 + \"', '\" + bgc2 + \"')\";\n\t\tsetTimeout(fnc, 800);\n\t}", "function mapCollision(x, y){\r\n\tif((x >= 490 && x <= 510) && ((y >= 490 && y <= 600) || (y >= 0 && y <= 110)))\r\n\t\treturn true;\r\n\telse if((x >= 110 && x <= 320) && ((y >= 140 && y <= 160) || (y >= 440 && y <= 460)))\r\n\t\treturn true;\r\n\telse if((x >= 680 && x <= 890) && ((y >= 440 && y <= 460) || (y >= 140 && y <= 160)))\r\n\t\treturn true;\r\n\telse if((y >= 290 && y <= 310) && ((x >= 590 && x <= 680) || (x >= 320 && x <= 410)))\r\n\t\treturn true;\r\n\telse if((y >= 290 && y <= 310) && ((x >= 0 && x <= 110) || (x >= 890 && x <= 1000)))\r\n\t\treturn true;\r\n\telse if((y >= 250 && y <= 350) && ((x >= 410 && x <= 430) || (x >= 570 && x <= 590)))\r\n\t\treturn true;\r\n\telse\r\n\t\treturn false;\r\n}", "function checkMapBounds(x, y, width, height) {\n\tvar safeX = x,\n\t\tsafeY = y;\n\n\tif (x < 0) {\n\t\tsafeX = 0;\n\t} else if ((x + width) > serverConfig.mapWidth) {\n\t\tsafeX = serverConfig.mapWidth - width;\n\t}\n\n\tif (y < 0) {\n\t\tsafeY = 0;\n\t} else if ((y + height) > serverConfig.mapHeight) {\n\t\tsafeY = serverConfig.mapHeight - height;\n\t}\n\n\treturn {\n\t\tx: safeX,\n\t\ty: safeY\n\t};\n}", "function center_map(map) {\n // vars\n var bounds = new google.maps.LatLngBounds(); // loop through all markers and create bounds\n\n $.each(map.markers, function (i, marker) {\n var latlng = new google.maps.LatLng(marker.position.lat(), marker.position.lng());\n bounds.extend(latlng);\n }); // only 1 marker?\n\n if (map.markers.length == 1) {\n // set center of map\n map.setCenter(bounds.getCenter());\n map.setZoom(16);\n } else {\n // fit to bounds\n map.fitBounds(bounds);\n }\n }", "function mapper_center_marker() {\t \n var center = map.getCenter();\n //mapper_set_marker(center);\n}", "function btnRecenter() {\n olData.getMap().then(function(map){\n //this coordinate is coordinate of Mesjid Raya Baiturrahman\n var latLon = [10610664.603506522,619192.4795668736];\n map.getView().setCenter(latLon);\n map.getView().setZoom(15);\n });\n }", "function startDisplacement(map, width) {\n\t\t\tvar topRight, topLeft, top, bottomRight, bottomLeft, bottom, \n\t\t\t\tright, left, center;\n\n\t\t\tmap[0][0] = Math.random();\n\t\t\ttopLeft = map[0][0];\n\n\t\t\tmap[0][width] = Math.random();\n\t\t\tbottomLeft = map[0][width];\n\n\t\t\tmap[width][0] = Math.random();\n\t\t\ttopRight = map[width][0];\n\n\t\t\tmap[width][width] = Math.random();\n\t\t\tbottomRight = map[width][width];\n\n\t\t\tmap[width / 2][width / 2] = topLeft + bottomLeft + topRight + bottomRight; \n\t\t\tmap[width / 2][width / 2] = normalize(map[width / 2][width / 2]);\n\t\t\tcenter = map[width / 2][width / 2];\n\t\t\t\n\n\t\t\tmap[width / 2][width] = bottomLeft + bottomRight + center / 4;\n\t\t\tmap[width / 2][0] = topLeft + topRight + center / 4;\n\t\t\tmap[width][width / 2] = topRight + bottomRight + center / 4;\n\t\t\tmap[0][width / 2] = topLeft + bottomLeft + center / 4;\n\n\n\t\t\t// if (wrapping === false) {\n\t\t\t// // non wrapping\n\t\t\t// \tmap[width / 2][width] = bottomLeft + bottomRight + center / 3;\n\t\t\t// \tmap[width / 2][0] = topLeft + topRight + center / 3;\n\t\t\t// \tmap[width][width / 2] = topRight + bottomRight + center / 3;\n\t\t\t// \tmap[0][width / 2] = topLeft + bottomLeft + center / 3;\n\t\t\t// }\n\n\t\t\t// else {\n\t\t\t// // wrapping\t\n\t\t\t// \tmap[width / 2][width] = bottomLeft + bottomRight + center + center / 4;\n\t\t\t// \tmap[width / 2][0] = topLeft + topRight + center + center / 4;\n\t\t\t// \tmap[width][width / 2] = topRight + bottomRight + center + center / 4;\n\t\t\t// \tmap[0][width / 2] = topLeft + bottomLeft + center + center / 4;\n\t\t\t// }\n\n\t\t\tcenterDisplacement(width);\n\t\t}", "function mapCenter(){\n\tvar latAvg = 0;\n\tvar lngAvg = 0;\n\tvar latlngCenter;\n\t\n\tfor (i = 0; i < parklist.length; i++){\n\t\tlatAvg = latAvg + parseFloat(parklist[i]['Latitude']);\n\t\tlngAvg = lngAvg + parseFloat(parklist[i]['Longitude']);\n\t}\t\n\tlatAvg = latAvg / parklist.length;\n\tlngAvg = lngAvg / parklist.length;\n\t\t\n\tlatlngCenter = [latAvg, lngAvg];\n\treturn latlngCenter;\n}", "function center_map( map ) {\n\t// vars\n\tvar bounds = new google.maps.LatLngBounds();\n\n\t// loop through all markers and create bounds\n\t$.each( map.markers, function( i, marker ){\n\n\t\tvar latlng = new google.maps.LatLng( marker.position.lat(), marker.position.lng() );\n\n\t\tbounds.extend( latlng );\n\n\t});\n\n\t// only 1 marker?\n\tif( map.markers.length == 1 )\n\t{\n\t\t// set center of map\n\t map.setCenter( bounds.getCenter() );\n\t map.setZoom( 11 );\n\t}\n\telse\n\t{\n\t\t// fit to bounds\n\t\t map.setCenter( bounds.getCenter() );\n\t \tmap.setZoom( 11 ); // Change the zoom value as required\n\t\t//map.fitBounds( bounds ); // This is the default setting which I have uncommented to stop the World Map being repeated\n\n\t}\n\n}", "function determineLocationFromMap()\n {\n if(_MapForApproximateLocationPlugin) {\n var centre = _MapForApproximateLocationPlugin.getCenter();\n if(centre) that.setMapCentreLocation(centre);\n }\n }", "function overlaps (xCord, yCord, size) {\n for (i = 0; i < size; i++) {\n for (j = 0; j < size; j++) {\n if (!currentMap[yCord + i][xCord + j] == 0) {\n return true\n }\n }\n }\n return false\n}", "function getVesselInCamArea() {\n var bounds = new google.maps.LatLngBounds(passat_sw, passat_ne);\n var vesselInBounds = 'undefined';\n\n $.each(markersArray, function (index, marker) {\n if (bounds.contains(marker.getPosition()) && marker.vessel.status == 'MOVING') {\n vesselInBounds = marker;\n // break for jquery each\n return false;\n }\n });\n\n if (vesselInBounds && vesselInBounds != 'undefined') {\n return vesselInBounds;\n } else {\n return null;\n }\n}", "function getCenter(latArr, lonArr, defaultArr) {\n const average = (arr) => arr.reduce((p, c) => p + c, 0) / arr.length;\n const lat = average(latArr);\n const lon = average(lonArr);\n\n if (isNaN(lat)) return defaultArr;\n return [lat, lon];\n}", "isPointerOverTrack(pointer) {\n // Stores bounds of different rectangles on the map that the track image covers\n let boundariesList = [\n { leftBound: 0, rightBound: 110, topBound: 240, bottomBound: 270},\n { leftBound: 80, rightBound: 110, topBound: 270, bottomBound: 360},\n { leftBound: 110, rightBound: 240, topBound: 330, bottomBound: 360},\n { leftBound: 210, rightBound: 240, topBound: 240, bottomBound: 330},\n { leftBound: 240, rightBound: 370, topBound: 240, bottomBound: 270},\n { leftBound: 340, rightBound: 370, topBound: 210, bottomBound: 360},\n { leftBound: 370, rightBound: 500, topBound: 330, bottomBound: 360},\n { leftBound: 470, rightBound: 500, topBound: 240, bottomBound: 330},\n { leftBound: 500, rightBound: 630, topBound: 240, bottomBound: 270},\n { leftBound: 600, rightBound: 630, topBound: 30, bottomBound: 240},\n { leftBound: 470, rightBound: 600, topBound: 30, bottomBound: 60},\n { leftBound: 470, rightBound: 500, topBound: 60, bottomBound: 150},\n { leftBound: 340, rightBound: 470, topBound: 120, bottomBound: 150},\n { leftBound: 340, rightBound: 370, topBound: 30, bottomBound: 120},\n { leftBound: 210, rightBound: 340, topBound: 30, bottomBound: 60},\n { leftBound: 210, rightBound: 240, topBound: 60, bottomBound: 150},\n { leftBound: 80, rightBound: 240, topBound: 120, bottomBound: 150},\n { leftBound: 80, rightBound: 110, topBound: 30, bottomBound: 120},\n { leftBound: 0, rightBound: 80, topBound: 30, bottomBound: 60},\n ] \n\n // Loop through boundaries to detect collisions with pointer\n for (let i = 0; i < boundariesList.length; i++) {\n const boundary = boundariesList[i];\n if (pointer.x >= boundary.leftBound && pointer.x <= boundary.rightBound\n && pointer.y >= boundary.topBound && pointer.y <= boundary.bottomBound) {\n return true;\n }\n }\n return false;\n }", "function showCoords() {\n // TODO: Set the map center to the latitude / longitude position of your own home\n\n\n // TODO: Zoom the map close enough\n\n}", "function markershow(latlngsent, latlngrcvd) {\n\n for (var i = 0; i < markers.length; i++) {\n if ((round(markers[i].getPosition().lat(), 6) == round(latlngrcvd.lat, 6) || round(markers[i].getPosition().lat(), 6) == round(latlngsent.lat, 6)) && (round(markers[i].getPosition().lng(), 6) == round(latlngrcvd.lng, 6) || round(markers[i].getPosition().lng(), 6) == round(latlngsent.lng, 6))) {\n markers[i].setMap(map);\n active_markers.push(markers[i]);\n }\n }\n}", "function setCenter(loclist) {\n var minlat = maxlat = minlon = maxlon = 0.0;\n var centerlat = centerlon = 0.0;\n \n if(loclist[0].transaction_id){ // we're dealing with alerts data\n minlat = maxlat = parseFloat(loclist[0].lat);\n minlon = maxlon = parseFloat(loclist[0].lon);\n for (var i = 1; i < loclist.length; i++) {\n adata = loclist[i];\n lat = parseFloat(adata.lat);\n lon = parseFloat(adata.lon);\n console.debug('lat:' + lat + '/lon:' + lon);\n if (lat < minlat) minlat = lat;\n if (lat > maxlat) maxlat = lat;\n if (lon < minlon) minlon = lon;\n if (lon > maxlon) maxlon = lon;\n } \n mapOptions.zoom = 8;\n } \n else { // we're dealing with heatmaps data\n minlat = maxlat = loclist[0].lat;\n minlon = maxlon = loclist[0].lng;\n for (var i = 1; i < loclist.length; i++) {\n adata = loclist[i];\n console.debug('lat:' + adata.lat + '/lon:' + adata.lng);\n if (adata.lat < minlat) minlat = adata.lat;\n if (adata.lat > maxlat) maxlat = adata.lat;\n if (adata.lng < minlon) minlon = adata.lng;\n if (adata.lng > maxlon) maxlon = adata.lng;\n }\n mapOptions.zoom = 5;\n }\n console.log('LAT min:' + minlat + ', max:' + maxlat + ' and LON min:' + minlon + ', max:' + maxlon);\n \n centerlat = (maxlat + minlat)/2;\n centerlon = (maxlon + minlon)/2;\n console.log('LAT center:' + centerlat + ' and LON center:' + centerlon);\n \n mapOptions.center = new google.maps.LatLng(centerlat, centerlon);\n}", "function getMapCenteredOnHilversum() {\n var map = L.map('map')\n\n var osmUrl='http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';\n var osmAttrib='Map data © OpenStreetMap contributors';\n var osm = new L.TileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});\n\n osm.addTo(map)\n map.setView(latLonHilversum, 12)\n\n return map\n}", "function calculateLatLngBounds(center, latOffset, lngOffset) {\n const southwest = new Map();\n southwest.lat = center.lat - latOffset;\n southwest.lng = center.lng - lngOffset;\n \n const northeast = new Map();\n northeast.lat = center.lat + latOffset;\n northeast.lng = center.lng + lngOffset;\n \n const latLngBounds = new Map();\n latLngBounds.southwest = southwest;\n latLngBounds.northeast = northeast;\n \n latLngBounds.center = center;\n \n return latLngBounds;\n }", "function getCenter(a, b) {\n return {\n x: (b.x + a.x) / 2,\n y: (b.y + a.y) / 2\n };\n}", "function geofield_gmap_center(mapid) {\n google.maps.event.trigger(geofield_gmap_data[mapid].map, 'resize');\n geofield_gmap_data[mapid].map.setCenter(geofield_gmap_data[mapid].marker.getPosition());\n}", "function legalmpos(x,y){\r\n\tif (x >= 0 && x <= 120 && y>=320) return false;\r\n var monsters = svgdoc.getElementById(\"monsters\");\r\n for (var i = 0; i < monsters.childNodes.length; i++) {\r\n\t\tpos1 = new Point(x,y);\r\n\t\tpos2 = new Point(monsters.childNodes[i].getAttribute(\"x\"), monsters.childNodes[i].getAttribute(\"y\"));\r\n\t\tif(intersect( pos1,OBJECT_DISTANCE,pos2,OBJECT_DISTANCE) )return false;\r\n\t}\r\n\treturn true;\r\n}", "function pixelDist() {\r\n\tvar min = bounds.getSouthWest();\r\n\tvar max = bounds.getNorthEast();\r\n\t\r\n\tvar x = Math.abs(max.lng() - min.lng())/dojo.contentBox(\"map_canvas\").w;\r\n\tvar y = Math.abs(max.lat() - min.lat())/dojo.contentBox(\"map_canvas\").h;\r\n\t\r\n\tvar r = Math.pow(10,7);\r\n\tpixels = {\"x\": Math.round(x*r)/r, \"y\": Math.round(y*r)/r};\r\n}", "function hideOppSearchedArea() {\n if (window.mapImg) {\n searchGrid.restoreImageData(0, mapImg, 0, 0);\n window.mapImg = null;\n }\n}", "function MapSetSize() {\n if (typeof(window.innerWidth) == 'number') {\n windowWidth = window.innerWidth;\n windowHeight = window.innerHeight;\n } else {\n if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {\n windowWidth = document.documentElement.clientWidth;\n windowHeight = document.documentElement.clientHeight;\n } else {\n if (document.body && (document.body.clientWidth || document.body.clientHeight)) {\n windowWidth = document.body.clientWidth;\n windowHeight = document.body.clientHeight;\n }\n }\n }\n document.getElementById('map').style.width = windowWidth - 20 + 'px';\n document.getElementById('map').style.height = windowHeight - 20 + 'px';\n // set max height to aside with nearest object\n $('.aside-nearest').css('max-height', windowHeight + 'px');\n}", "function reCenterMap() {\n // map.setCenter({ lat: yourLat, lng: yourLng })\n map.setCenter( origMapCenter );\n } // reCenterMap()", "function changeMapCenter() {\n deleteMarkers(); // clear markers out of both arrays since they will change.\n var geocoder = new google.maps.Geocoder(); // new geocoder instance\n var address = vm.userDefLocation(); // retreive address from te search bar\n // run geocode:\n geocoder.geocode({\n address: address\n }, function(results, status) {\n if (status == google.maps.GeocoderStatus.OK) {\n newCenter = results[0].geometry.location;\n map.setCenter(newCenter);\n map.setZoom(12);\n mapCenterMarker.setPosition(newCenter);\n } else {\n // if error thrown, alerts user\n window.alert(\"location could not be found, try another one!\");\n }\n });\n // Need to run updateShops() once the map has loaded and the new map center has been established\n // Needed to find when map load has finished, found solution online using the map 'idle' throw.\n // map idle solution found on stack overflow: (http://stackoverflow.com/questions/832692/how-can-i-check-whether-google-maps-is-fully-loaded)\n google.maps.event.addListenerOnce(map, 'idle', function() {\n updateShops();\n });\n}", "function centerMap() {\n var latlngbounds = new google.maps.LatLngBounds();\n vm.currentHike.path.forEach(function (waypoint) {\n latlngbounds.extend(waypoint)\n })\n vm.map.fitBounds(latlngbounds);\n }", "function centerMap(){\n\tvar point = map.getCenter();\n\n\t$('#aside__detail').hide();\n\teasingAnimator.easeProp({\n\t\tlat: point.lat(),\n\t\tlng: point.lng()\n\t}, center);\n\tmap.setZoom(NORMAL_ZOOM_DISTANCE);\n}", "function isAllBoundsEqual_withoutINC() {\n\tvar bounds = [];\n\tfor (var i=0; i<app.m; i++) {\n\t\tvar mapN = \"map\" + i;\n\t\tif (app[mapN].item.startsWith('INC')) continue;\n\t\tbounds.push(app[mapN].map.getBounds());\n\t}\n\tvar j = 0;\n\tvar isAllSameBounds = true;\n\tfor (var i=1; i<bounds.length; i++) {\n\t\tif (!boundsEqual(bounds[i], bounds[0])) {\n\t\t\tisAllSameBounds = false;\n\t\t\tj = i;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif (!isAllSameBounds) {\n\t\t//console.log('mapX bounds of all maps are not same. from: [map' + j + ']');\n\t}\n\treturn isAllSameBounds;\n}", "getOffset(player) {\n\n return (function(viewport, player, map) {\n\n const basePlayerOffsetY = player.baseOffsetY;\n\n const playerOffcenterLeft = Math.min(0, player.x - viewport.width/2),\n playerOffcenterRight = Math.max( 0, (player.x + viewport.width/2) - map.width),\n playerOffcenterX = playerOffcenterLeft + playerOffcenterRight;\n\n const playerOffcenterTop = Math.min(0 + basePlayerOffsetY, player.y - viewport.height/2 + basePlayerOffsetY),\n playerOffcenterBottom = Math.max(0, (player.y + viewport.height/2 - basePlayerOffsetY) - map.height),\n playerOffcenterY = playerOffcenterTop + playerOffcenterBottom //+ basePlayerOffsetY;\n\n // console.log(\n // playerOffcenterY / 70\n // );\n // //console.log(((player.y - viewport.height/2) - playerOffcenterY) / 70)\n // throw new Error();\n\n return {\n map: {\n x: (player.x - viewport.width/2) - playerOffcenterX,\n y: (player.y - viewport.height/2) - playerOffcenterY\n },\n player: {\n x: viewport.width/2 + playerOffcenterX,\n y: viewport.height/2 + playerOffcenterY\n }\n };\n\n })(\n {width: this.viewport.width.px, height: this.viewport.height.px},\n {x: player.position.x, y: player.position.y, baseOffsetY: this.basePlayerOffsetY},\n {width: this.width.px, height: this.height.px}\n );\n\n }", "function initMap() {\n // Create a new Map and its configuration\n map = new google.maps.Map(document.getElementById('map'), {\n center: initialLL,\n zoom: 16,\n mapTypeId: 'terrain',\n mapTypeControl: true,\n styles: snazzyStyle,\n });\n findCoordinatesByName();\n}", "function mapReset() {\n\tinfoWindow.map ? reposInfoWindow() : map.fitBounds(bounds);\n}", "getCenter() {\n let point = L.CRS.EPSG3857.latLngToPoint(this.map.getCenter(), this.map.getZoom());\n let rMap = document.getElementById(this.id);\n if (rMap.clientWidth > rMap.clientHeight) {\n point.x -= this.map.getSize().x * 0.15;\n } else {\n //point.y += this.map.getSize().y * 0.15;\n }\n let location = L.CRS.EPSG3857.pointToLatLng(point, this.map.getZoom());\n return location;\n }", "function getMapIndex(round) {\r\n return testMapIndex;\r\n}", "function initMap() {\n\n // Fallback if the php API fails (should not happen)\n var centerPoint = {lat: 37.090, lng: -95.712};\n if(phpZones.length > 0) {\n centerPoint = phpZones[0].center;\n }\n\n // Create the map.\n var map = new google.maps.Map(document.getElementById('map'), {\n zoom: 17,\n center: centerPoint,\n scrollwheel: false,\n disableDoubleClickZoom: true\n });\n\n // Add a marker at the searched location\n\n\n // Add all the zones to the map\n for (var zone in phpZones) {\n var cityCircle = new google.maps.Circle({\n strokeColor: '#FF0000',\n strokeOpacity: 0.8,\n strokeWeight: 2,\n fillColor: '#FF0000',\n fillOpacity: 0.35,\n map: map,\n center: phpZones[zone].center,\n radius: phpZones[zone].radius\n });\n }\n}" ]
[ "0.6463745", "0.64509517", "0.63682985", "0.6336122", "0.62718886", "0.62503517", "0.623549", "0.61337286", "0.6132496", "0.61113125", "0.60910153", "0.6034984", "0.6026063", "0.60081106", "0.5957826", "0.59485686", "0.59464943", "0.5945837", "0.59399664", "0.5930833", "0.59154993", "0.5899775", "0.58848536", "0.5869818", "0.58666617", "0.5865624", "0.58492494", "0.5822708", "0.5807386", "0.5795336", "0.57768977", "0.57754755", "0.57750565", "0.5756607", "0.57500446", "0.57496357", "0.57463056", "0.57371444", "0.57345104", "0.57317233", "0.5711545", "0.5711178", "0.57091916", "0.570475", "0.570475", "0.56872106", "0.56742597", "0.5674088", "0.5671144", "0.5670384", "0.5666431", "0.5659463", "0.56559706", "0.5655063", "0.5645347", "0.56242037", "0.56222343", "0.561169", "0.5610921", "0.5610051", "0.5610051", "0.5610051", "0.55998343", "0.5596042", "0.55942464", "0.5587785", "0.55868554", "0.5586327", "0.55813205", "0.55792624", "0.5578849", "0.5578689", "0.5572546", "0.55649227", "0.55615854", "0.55480313", "0.5544615", "0.55418885", "0.5538728", "0.5533485", "0.55331945", "0.5522001", "0.55217963", "0.5514786", "0.55120516", "0.5508849", "0.5508605", "0.550811", "0.55069387", "0.5505515", "0.5502039", "0.55010116", "0.54970586", "0.54967517", "0.5496093", "0.5480398", "0.548008", "0.5478821", "0.54772925", "0.54742455" ]
0.6207904
7
generic function to find the oddball in an array given a comparator function
function findOddball(array, comparator) { var cur = array[0]; var candidate = null; for (var i = 1; i < array.length; i++) { var same = comparator(cur, array[i]); if (candidate != null) { return same? candidate : cur; } if (!same) { candidate = cur; } cur = array[i]; } return candidate == null? null : cur; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function returnOdds(array) {\n}", "function oddComparator(home,away,flag){\n if(home >= away){\n if(flag == \"low\"){\n return [\"away\",away];\n }else{\n return [\"home\",home]\n }\n }else{\n if(flag == \"low\"){\n return [\"home\",home]\n }else{\n return [\"away\",away]\n }\n }\n}", "function findOdd(arr) {\n // Your code here\n}", "function search(x, a, cmp)\n {\n let lo = 0, hi = a.length - 1;\n while (lo <= hi) {\n let m = Math.floor((lo + hi)/2), r = cmp(x, a[m]);\n if (r < 0) hi = m - 1;\n else if (r > 0) lo = m + 1;\n else return m;\n }\n return -1;\n }", "function oddElement(ary, cmp) {\n var c\n function guess(a) {\n var odd = -1\n c = 0\n for (var i = a; i < ary.length; i ++) {\n if(!cmp(ary[a], ary[i])) {\n odd = i, c++\n }\n }\n return c > 1 ? -1 : odd\n }\n //assume that it is the first element.\n var g = guess(0)\n if(-1 != g) return g\n //0 was the odd one, then all the other elements are equal\n //else there more than one different element\n guess(1)\n return c == 0 ? 0 : -1\n}", "function filter(array, filterFct) {\n\nvar outputArray = [];\n//iterate thru the initial array\n//check if element is even or not\nfor (var element of arr) {\n // if (element % 2 === 0) {\n // outputArr.push(element);\n // }\n if (filterFct(element)) {\n outputArr.push(element);\n }\n}\nreturn outputArr;\n}", "function findOdd(arr) {\n return arr.find((item, index) => arr.filter(e => e === item).length % 2)\n}", "function findOdd(A) {\n var sortedArray = A.sort(function(a,b){return a-b});\n console.log(\"sortedArray = \" + sortedArray);\n var i = 0;\n while (i < sortedArray.length){\n var a = sortedArray.lastIndexOf(sortedArray[i]);\n if (a%2!=0){\n i++\n }\n else{\n console.log(\"sortedArray[i] = \" + sortedArray[i]);\n return sortedArray[i];\n }\n }\n }", "function findOutlier(arr){\n // if arr is mostly odds, oddCount should be 3 or 2\n const oddCount = Math.abs(arr[0] % 2) + Math.abs(arr[1] % 2) + Math.abs(arr[2] % 2);\n const remainder = oddCount >= 2 ? 1 : 0; // expected remainder of most elements of arr\n console.log(oddCount,remainder);\n for(let int of arr){\n if(Math.abs(int % 2) !== remainder) {return int;}\n }\n}", "function findOutlier(arr){\nlet obj = {\n evens: 0,\n odds: 0,\n };\n /*\n We need to know if arr is full of evens with 1 odd value, or vice versa.\n I should be able to tell that through our obj{} as soon as we have gone through\n\n */\n for(let i = 0; i<=3; i++) {\n if (arr[i] % 2 === 0) {\n obj.evens++;\n }\n }\n\n if (obj.evens >1) {\n arr = arr.filter(x => {\n return x % 2 !== 0;\n })\n return Number(arr[0])\n }\n else {\n arr = arr.filter(x=>{\n return x % 2 === 0;\n })\n return Number(arr[0]);\n }\n}", "function findOdd(array) {\n //happy coding!\n for (let i = 0; i < array.length; i++) {\n let counter = 0;\n\n for (let j = 0; j < array.length; j++) {\n if (array[i] === array[j]) {\n counter++;\n }\n }\n\n if (counter % 2 !== 0) {\n return array[i];\n }\n }\n}", "function findOddNumber(arr) {\n return arr.find(function (value) {\n return value % 2 !== 0\n })\n}", "function findOdd(arr) {\n let obj = arr.reduce((a, c) => { !a[c] ? a[c] = 1 : a[c]++; return a }, {});\n let keys = Object.keys(obj);\n for (let i = 0; i < keys.length; i++) {\n if (obj[keys[i]] % 2 !== 0) return Number(keys[i]);\n }\n}", "function oddOccurencesInArray(A) {\n\tA.sort(function(a, b) {\n\t\treturn a - b;\n\t});\n\n\tfor (var i=0; i<A.length; i+=2) {\n\t\tif (A[i] !== A[i+1] || i === A.length-1)\n\t\t\treturn A[i];\n\t}\n}", "function binarySearch(array, pred) {\r\n let lo = -1,\r\n hi = array.length;\r\n while (1 + lo < hi) {\r\n const mi = lo + ((hi - lo) >> 1);\r\n if (pred(array[mi])) {\r\n hi = mi;\r\n } else {\r\n lo = mi;\r\n }\r\n }\r\n return hi;\r\n}", "function findOdd(A) {\n let numbs = [];\n for (let i = 0; i < A.length; i++){\n if (!numbs.includes(A[i])){\n numbs.push(A[i])\n }\n }\n for(let z = 0; z < numbs.length; z++){\n let count = 0;\n for(let y = 0; y < A.length; y++){\n if (numbs[z] === A[y]){\n count += 1;\n }\n }\n if(count % 2 !== 0) return numbs[z]\n }\n \n}", "function findOdd(arr) {\n let result = 0\n for(let i = 0; i < arr.length; i++) {\n for(let j = 0; j < arr.length; j++) {\n\n if(arr[i] === arr[j]) {\n result++\n }\n }\n if(result % 2 === 1) {\n return arr[i]\n }\n } \n}", "function evenIndexOddLength (arr)\n{\n// debugger\n var c=-1;\n\n var output = arr.filter ( x => {\n c++; \n return ((x.length)%2===1 && c%2===0) } )\n\n return output\n}", "function binarySearch(array, pred) {\n var lo = -1,\n hi = array.length;\n while (1 + lo < hi) {\n var mi = lo + ((hi - lo) >> 1);\n if (pred(array[mi], array, mi)) {\n hi = mi;\n } else {\n lo = mi;\n }\n }\n return hi;\n}", "function findOutlier(integers){\r\n var oddArray = [];\r\n var evenArray = [];\r\n integers.forEach(function(elem){\r\n if (elem % 2 ==0) {\r\n return evenArray.push(elem);\r\n }\r\n return oddArray.push(elem);\r\n });\r\n if (oddArray.length === 1) {\r\n return oddArray[0];\r\n } else if (evenArray.length === 1) {\r\n return evenArray[0];\r\n} else {\r\n console.log(\"This is not the problem as I understand it\"):\r\n return false;\r\n}\r\n\r\n}", "function binarySearch(arr,x,y,v,propertyName){\n\n var L = lower_bound(arr,x,y,v,propertyName);\n var R = upper_bound(arr,x,y,v,propertyName);\n\n return [L,R];\n}", "function binarySearchCustom(orderedItems, comparator, field, field2) {\n var maxIterations = 10000;\n var iteration = 0;\n var low = 0;\n var high = orderedItems.length - 1;\n\n while (low <= high && iteration < maxIterations) {\n var middle = Math.floor((low + high) / 2);\n var item = orderedItems[middle];\n var value = field2 === undefined ? item[field] : item[field][field2];\n var searchResult = comparator(value);\n\n if (searchResult == 0) {\n // jihaa, found a visible item!\n return middle;\n } else if (searchResult == -1) {\n // it is too small --> increase low\n low = middle + 1;\n } else {\n // it is too big --> decrease high\n high = middle - 1;\n }\n\n iteration++;\n }\n\n return -1;\n}", "function binarySearchCustom(orderedItems, comparator, field, field2) {\n var maxIterations = 10000;\n var iteration = 0;\n var low = 0;\n var high = orderedItems.length - 1;\n\n while (low <= high && iteration < maxIterations) {\n var middle = Math.floor((low + high) / 2);\n var item = orderedItems[middle];\n var value = field2 === undefined ? item[field] : item[field][field2];\n var searchResult = comparator(value);\n\n if (searchResult == 0) {\n // jihaa, found a visible item!\n return middle;\n } else if (searchResult == -1) {\n // it is too small --> increase low\n low = middle + 1;\n } else {\n // it is too big --> decrease high\n high = middle - 1;\n }\n\n iteration++;\n }\n\n return -1;\n}", "function findOdd(A) {\n //happy coding!\n// store array and make a hash\n hashMap = {}\n// create a for loop for each element in array\n for (i=0;i<A.length;i++){\n if(hashMap[A[i]]){\n hashMap[A[i]]+=1\n }\n else{\n hashMap[A[i]] = 1\n }\n } \n return Object.keys(hashMap).find(key=> (key %2) !== 0)\n}", "function findOdd(array) {\n let result;\n\n array.forEach(number => {\n if (array.filter(curValue => curValue === number).length % 2 === 1) {\n result = number;\n };\n });\n return result;\n}", "function binarySearch(ar, el, compare_fn) {\n var m = 0;\n var n = ar.length - 1;\n while (m <= n) {\n var k = (n + m) >> 1;\n var cmp = compare_fn(el, ar[k]);\n if (cmp > 0) {\n m = k + 1;\n } else if(cmp < 0) {\n n = k - 1;\n } else {\n return k;\n }\n }\n return -m - 1;\n}", "function binarySearch(arr, value) {\n\n}", "function odd(arr) {\n return filter(arr, function(x) {\n return x % 2 !== 0;\n });\n}", "function collectOddValue(arr){\n let result = [];\n\n function helper(helperInput){\n if(helperInput.length === 0) return;\n\n if(helperInput[0] % 2 !== 0){\n result.push(helperInput[0]);\n }\n\n helper(helperInput.slice(1));\n \n\n }\n\n helper(arr);\n\n}", "function binarySearch(arr, target, comparator) {\n return binarySearch_(arr, target, comparator || defaultComparator);\n}", "function binarySearch(arr, target, comparator) {\n return binarySearch_(arr, target, comparator || defaultComparator);\n}", "find(element,comparator=this.compare){\r\n let result=[];\r\n this.heapContainer.forEach((x,i)=>{\r\n if(comparator.equal(x,element))\r\n result.push(i);\r\n });\r\n return result;\r\n }", "function findOdd(A) {\n let map = new Map();\n for (let i = 1; i <= A.length; i++) {\n if (A.length == 1) {\n return A[0];\n } else {\n map.set(A[i], A.filter(value => value == A[i]));\n }\n }\n for (let value of map) {\n if (value[1].length % 2 != 0) {\n return value[0];\n }\n }\n}", "function even(arr){\n\nnewArr = arr.filter((elem)=>{\n return elem % 2 === 0;\n })\n return newArr\n}", "function getOdds(array) {\n var returnOdds = [];\n\n for (var i = 0; i < array.length; i++) {\n if (array[i] % 2 == 1) {\n returnOdds.push(array[i]);\n }\n }\n return returnOdds;\n}", "function findOutlier(integers) {\n var arrEven = [];\n var arrOdd = [];\n for (var i = 0; i < integers.length; i++) {\n if (integers[i] % 2 != 0) {\n arrEven.push(integers[i])\n } else {\n arrOdd.push(integers[i])\n }\n }\n return arrEven.length == 1 ? arrEven[0] : arrOdd[0];\n}", "function findOdd(A) {\n var len = A.length;\n var A_sort = A.slice().sort();\n\n var count = {};\n\n A_sort.forEach(function(i) {\n count[i] = (count[i] || 0) + 1;\n });\n for (var key in count) {\n if (count.hasOwnProperty(key)) {\n\n if (count[key] % 2 !== 0) {\n return Number(key);\n }\n }\n }\n}", "function sortArray(array) {\n let odds = array\n .filter(x => x%2)\n .sort((a,b) => a - b);\n return array\n .map(x => x%2 ? odds.shift() : x)\n}", "function getOdds(array){\n var oddArray = [];\n array.forEach(function (element) {\n if (element % 2 != 0){\n oddArray.push(element);\n }\n });\n return oddArray;\n}", "function arrayOpCompare(array1, array2, compare_func, operation_func) {\n\tfor( var i=0 ; i<array1.length ; ++i ) \t{\n\t\tlet found_in_array2 = false;\n\n\t\tfor( var j=0 ; j<array2.length ; ++j ) {\n\t\t\tif( compare_func(array1[i], array2[j]) ) {\n\t\t\t\tfound_in_array2 = true;\n\t\t\t}\n\t\t}\n\n\t\tif( !found_in_array2 ) {\n\t\t\toperation_func(i, array1[i]);\n\t\t}\n\t}\n}", "function collectOddValues(arr) {\n let result = [];\n function helper(helperInput) {\n if(helperInput.length === 0) {\n return;\n } \n if(helperInput[0] % 2 !== 0) {\n result.push(helperInput[0])\n }\n helper(helperInput.slice(1));\n }\n helper(arr);\n return result;\n}", "function binarySearch(arr, val) {\n\n}", "function collectOddValues(arr){\n \n let result = []\n\n function helper(helperInput){\n if(helperInput.length === 0) {\n return;\n }\n \n if(helperInput[0] % 2 !== 0){\n result.push(helperInput[0])\n }\n \n helper(helperInput.slice(1))\n }\n \n helper(arr)\n\n return result;\n\n}", "function evenNumbers(arr) {\n const result = arr.filter(function(num) {\n if (num % 2 == 0) {\n return num;\n }});\n return result;\n}", "function evenOccurrence (arr) {\n // Write your code here, and\n // return your final answer.\n var c = 0\n \n for (var i = 0; i < arr.length; i++){\n c = 0\n //equal or not\n for(var j= 0; j< arr.length; j++){\n if (arr[j] === arr[i])\n c++\n }\n //even occ\n if (c%2 === 0){\n return arr[i]\n }\n }\n return null\n}", "function evens(arr) {\n let result = arr.filter(function (num, i, array) {\n return num % 2 === 0;\n });\n return result;\n}", "function collectOddValues(arr){\n \n let result = [];\n\n function helper(helperInput){\n if(helperInput.length === 0) {\n return;\n }\n \n if(helperInput[0] % 2 !== 0){\n result.push(helperInput[0])\n }\n \n helper(helperInput.slice(1))\n }\n \n helper(arr)\n\n return result;\n}", "function findOutlier(integers){\n //your code here\n var odd = [];\n var even = [];\n \n function remainder(num){\n return num%2;\n }\n \n var numbers = integers.map(remainder)\n \n for(var i = 0; i < numbers.length; i++){\n if (numbers[i] === 0){\n even.push(integers[i]);\n } else {\n odd.push(integers[i]);\n }\n };\n return even.length==1 ? even[0] : odd[0];\n}", "function bidirectionalSearchTest(array)\n{\n let counter = 0;\n let endArrayIndex = ARRAY_SIZE - 1;\n let currentIndex = 0;\n while (counter <= (ARRAY_SIZE / 2) - 1)\n {\n currentIndex = endArrayIndex - counter; \n if (array[currentIndex].result == true)\n return array[currentIndex].address;\n currentIndex = counter;\n if (array[currentIndex].result == true)\n return array[currentIndex].address;\n counter++;\n }\n return null;\n}", "function solve(arr) {\n const sorted = arr.slice().sort((item, nextItem) => item - nextItem);\n\n return arr.map((item, index) => (index % 2 === 0 ? sorted.pop() : sorted.shift()));\n}", "function findOdd(A) {\n //happy coding!\n A.filter()\n return 0;\n}", "function findOdd(A) {\n var counter = 0;\n for(var i = 0; i < A.length; i++) {\n for(var j = 0; j < A.length; j++) {\n if(A[i] == A[j]) {\n counter++;\n }\n }\n if (counter % 2 !== 0) {\n return A[i];\n }\n }\n}", "function collectOddValues(arr) {\n let result = [];\n\n function helper(helperInput) {\n if (helperInput.length === 0) {\n return;\n }\n\n if (helperInput[0] % 2 !== 0) {\n result.push(helperInput[0]);\n }\n // calling recursively with an array with every item but the one we just tested\n helper(helperInput.slice(1));\n }\n\n helper(arr);\n\n return result;\n}", "function find(theArray, fnc){ \n for (let i=0; i < theArray.length; i++){\n if (fnc(theArray[i])){\n return theArray[i];\n }\n }\n}", "function findOdd(a) { \n for (var i = 0; i <a.length; i++ ){\n var current = a[i]; \n var result = 0;\n for (var y =0; y<a.length; y++){\n result = (current === a[y] ? result+1 : result); \n }\n console.log(current + \" -- \" + result);\n if (result % 2 == 1 || result == 1){\n return current;\n }\n }\n}", "function evenOnly (arr)\n{\nvar even = arr.filter ( x => x%2===0 )\n\nreturn even;\n}", "function getEvens(array) {\n var returnOdds = [];\n\n for (var i = 0; i < array.length; i++) {\n if (array[i] % 2 == 0) {\n returnOdds.push(array[i]);\n }\n }\n return returnOdds;\n}", "function findOdd(A) {\n let count = 0;\n for (var i = 0; i < A.length; i++) {\n for (var j = 0; j < A.length; j++) {\n if (A[i] === A[j]) {\n count++;\n }\n }\n if (count % 2 != 0) {\n return A[i];\n }\n }\n}", "function detect (arr,num){ //la f(x) detect, recibe dos parametros, uno es el array y el otro es el numero que se buscara(num).\n for(i= 0;i<=arr.length; i++){ // mediante un for se iterara a lo largo del array para buscar el elemento en cuestion\n if (i===arr.indexOf(num)) { //para despues mediante un if definir si el indice del elemento coincide con el indice del numero de busqueda (num)\n return arr.indexOf(num) //si coincide, retornara el indice del elemento.\n }\n }\n}", "function find2(a, o) {\n\t\t\treturn a[0] == o ? 0 : a[1] == o ? 1 : 2;\n\t\t}", "function evenNumbersNoTern(arr) {\n return arr.filter(el => {\n if (el % 2 === 0) {\n return el\n }\n })\n}", "function rotatedArraySearch(array, element) {\n\n}", "function binSearch(groceryArr, groceryName) {\n const len = groceryArr.length;\n let start = 0;\n let end = len - 1;\n while (start <= end) {\n let mid = Math.floor((start + end) / 2);\n if (groceryArr[mid].name < groceryName) {\n start = mid + 1;\n } else if (groceryArr[mid].name > groceryName) {\n end = mid - 1;\n } else {\n return groceryArr[mid];\n }\n }\n return null;\n}", "function binarySearch2(arry, n) {\n start = 0;\n end = arry.length - 1;\n middle = Math.floor(start + end / 2);\n while (arry[middle] !== n && middle < end && middle > start) {\n if (n > arry[middle]) start = middle + 1;\n else end = middle - 1;\n\n middle = Math.floor((start + end) / 2);\n }\n return arry[middle] === n ? middle : -1;\n}", "function sortArray(arr) {\n let odds = arr.filter(n => n % 2).sort((a,b) => a - b);\n let evens = arr.filter(n => !(n % 2)).sort((a,b) => b - a);\n return arr.map(n => n % 2 ? odds.shift() : evens.shift());\n}", "function s_array_op(arr1, arr2, what_to_do, sort_function)\n{\n\t// http://stackoverflow.com/questions/10866756/fast-intersection-of-two-sorted-integer-arrays\n\t\n\tif (!isArray(arr1) || !isArray(arr2))\n\t\treturn [];\n\t// need at least one to be be longer than zero\n\tif (arr1.length == 0 && arr2.length == 0)\n\t\treturn [];\n\t\t\n\t// intersection check that both are longer than zero\n\tif (what_to_do == \"i\" && (arr1.length == 0 || arr2.length == 0))\n\t\treturn [];\n\t\t\n\t// counters\n\tvar i=0, j=0;\n\t// values\n\tvar a=0, b=0;\n\t\n\tvar out = [];\n\t\n\t// comparison function\n\tvar the_compare;\n\tif (typeof(sort_function) != \"function\")\n\t\tthe_compare = function(a1,b1) { return [a1,b1].sort()[0] == a1 ? -1 : 1; };\n\telse\n\t\tthe_compare = sort_function;\n\t// push functions\n\tvar eq_push;\n\tvar lt_push;\n\tvar gte_push;\n\t\n\tswitch(what_to_do)\n\t{\n\t\tcase \"i\":\n\t\t\teq_push = function(in1) { return out.push(in1); };\n\t\t\tlt_push = function() { return; };\n\t\t\tgte_push = function() { return; };\n\t\tbreak;\n\t\tcase \"u\":\n\t\t\teq_push = function(in1) { return out.push(in1); };\n\t\t\tlt_push = function(in1) { return out.push(in1); };\n\t\t\tgte_push = function(in1) { return out.push(in1); };\n\t\tbreak;\n\t\tcase \"x\":\n\t\t\teq_push = function() { return; };\n\t\t\tlt_push = function(in1) { return out.push(in1); };\n\t\t\tgte_push = function(in1) { return out.push(in1); };\n\t\tbreak;\n\t\tdefault:\n\t\t\treturn [];\n\t}\n\t\n\t// the continues should speed up execution ...\n\twhile (i < arr1.length && j < arr2.length)\n\t{\n\t\ta = arr1[i];\n\t\tb = arr2[j];\n\t\t\n\t\tif (a === b)\n\t\t{\n\t\t\teq_push(a);\n\t\t\ti++;\n\t\t\tj++;\n\t\t\tcontinue;\n\t\t}\n\t\t// a < b\n\t\telse if (the_compare(a,b) == -1)\n\t\t{\n\t\t\tlt_push(a);\n\t\t\ti++;\n\t\t\tcontinue;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tgte_push(b);\n\t\t\tj++;\n\t\t\tcontinue;\n\t\t}\n\t}\n\t\n\tif (what_to_do == \"u\" || what_to_do == \"x\")\n\t{\n\t\t// add any remainders\n\t\tfor (; i<arr1.length; i++)\n\t\t\tout.push(arr1[i]);\n\t\tfor (; j<arr2.length; j++)\n\t\t\tout.push(arr2[j]);\n\t}\n\t\n\treturn out;\n}", "function findOdd(A) {\r\n let temp = A.map(String);\r\n let inc =0;\r\n for(let i = 0; i < temp.length ; i++){\r\n for(let j=0 ; j < temp.length ; j++){\r\n if(temp[i] == temp[j]){\r\n inc++;\r\n }\r\n }\r\n if(inc % 2 !==0){\r\n return parseInt(temp[i]);\r\n }\r\n }\r\n }", "function findLeader(arr){\n\n\n if(arr.length === 1){\n return arr[0];\n }\n\n arr.sort((a,b) => a-b);\n const len = arr.length;\n\n // console.log(arr);\n\n const center = Math.ceil(len/2);\n possibleLeader = arr[center-1];\n\n // console.log(center, possibleLeader)\n\n let counter= 0;\n\n // const len = arr.length;\n for (let i=0 ; i<len ; i++) {\n if(arr[i] === possibleLeader){\n counter++;\n }\n } \n\n // console.log(counter);\n\n if(counter > len/2){\n return possibleLeader;\n }else{\n false;\n }\n\n\n return false;\n // for (let i=0 ; i<len ; i++) {\n \n // }\n\n}", "function PoRa(arr){\n console.log(arr[arr.length-2]);\n for(var i = 0; i < arr.length; i++){\n if(arr[i] % 2 === 1){\n return arr[i];\n }\n }\n}", "function findOdd(A) {\n const counts = A.reduce((tracker, e) => {\n tracker[e] = tracker[e] ? tracker[e] + 1 : 1;\n //console.log(tracker[e])\n\n return tracker;\n }, {});\n\n for (key in counts) {\n if (counts[key] % 2)\n return parseInt(key);\n }\n\n return null;\n}", "function findIndex(array, comparator) {\n if (!Array.isArray(array)) {\n return -1;\n }\n\n for (var i = 0; i < array.length; i++) {\n if (comparator(array[i])) {\n return i;\n }\n }\n\n return -1;\n}", "function collectOddValues(arr) {\n let result = [];\n\n function helper(helperArr) {\n if(helperArr.length === 0) return;\n if(helperArr[0] % 2 !== 0) {\n result.push(helperArr[0]);\n }\n helper(helperArr.slice(1));\n }\n helper(arr);\n return result;\n}", "function composeComparators(comparatorArray) {\n return function (a, b) {\n for (var i = 0; i < comparatorArray.length; ++i) {\n var compare = comparatorArray[i](a, b);\n\n if (compare !== 0) {\n return compare;\n }\n }\n\n return 0;\n };\n }", "function sortOddArray(array) {\n if(array.length <= 0 || array == null) return array;\n let sortedOdd = [];\n let oddArr = array.filter((num) => num%2 ).sort((a,b)=> a > b);\n\n sortedOdd = array.map((num,i) => {\n // Odd returns 1 which is true\n if(num%2) {\n return oddArr.shift();\n }\n return num;\n });\n\n return sortedOdd;\n}", "function getEvenNumbers(arr){\n return arr.filter(e => e % 2 === 0)\n}", "function sort(arr) {\n let evens = [];\n for (let i = 0; i < arr.length; i++) {\n if (arr[i] % 2 === 0) {\n evens.push(arr[i]);\n }\n }\n return evens.sort(sortArr);\n}", "function findOutlier(integers){\r\n \r\n var evenfilter = integers.filter(function(x){\r\n return x % 2==0;\r\n });\r\n \r\n var oddfilter = integers.filter(function(x){\r\n return x % 2!==0;\r\n });\r\n \r\n if(evenfilter.length === 0){\r\n return evenfilter[0];\r\n }\r\n else {\r\n return oddfilter[0];\r\n }\r\n }", "function differenceBy(compareArray, fn) {\n return difference(compareArray.map(v => fn(v)));\n}", "function evensIndex(array) {\n var arr = [];\n for(var i = 0; i < array.length; i++){\n if (array[i] % 2 === 0){\n arr.push(array[i]);\n }\n }\n return arr;\n}", "function findOdd(A) {\n var count = 0;\n for (let i = 0; i < A.length; i++) {\n for (let j = 0; j < A.length; j++) {\n if (A[i] === A[j]) {\n count++;\n }\n }\n if (count % 2 !== 0) {\n return A[i];\n }\n }\n return 0;\n }", "function findOdd(a) {\n a.sort((a,b)=> a-b)\n let count = a.lastIndexOf(a[0]) + 1\n return count %2 !== 0 ? a[0] : findOdd(a.splice(count))\n }", "function larrysArray(A) {\n let invertion = countInvertion(A);\n if (invertion % 2 == 0) {\n return \"YES\";\n }\n return \"NO\";\n}", "function evensOnly(arr)\n{\n const result = arr.filter(function(num){\n if (num % 2 == 0)\n return num;\n }\n )\n return result;\n}", "function isFilter(arr){\n for(let i=0;i<arr.length;i++)\n {\n let val = isEven(arr[i]);\n console.log(val);\n }\n \n}", "function evensOnly(arr)\n{\n\t// your code here\n\tconst result = arr.filter(function(num){\n\t\tif (num % 2 == 0){\n\t\t\treturn true;\n\t\t}\n\t});\n\treturn result;\n} // end function", "function odd(){\r\n\r\nvar oddArray = array.filter(ele=>ele%2===1);\r\nconsole.log(oddArray)\r\n}", "function func8(inputArray, y){\n var result=0;\n for(var i=0; i<inputArray.length; i++){\n if(inputArray[i]>y){\n result++;\n }\n }\n return result;\n}", "function findOdd(A) {\n var n=0;\n var ans;\n while(n<A.length)\n {\n var indexes = [], i;\n for(i = 0; i < A.length; i++)\n if (A[i] === A[n])\n indexes.push(i);\n \n if(indexes.length%2===1)\n {\n ans=A[n];\n break;\n }\n n++;\n }\n return ans;\n}", "function findOutlier(integers) {\n let evenNumbers = integers.filter(a => { return (a % 2) == 0 })\n let oddNumbers = integers.filter(a => { return (a % 2) != 0 })\n\n return (evenNumbers.length > 1) ? (oddNumbers[0]) : (evenNumbers[0])\n \n}", "function func(arr) {\n console.log(arr[arr.length - 2]);\n for (var i = 0; i < arr.length; i++) {\n if (arr[i] % 2 == 1) {\n return arr[i];\n }\n }\n}", "function findOdd(arr) {\n let n = 0;\n\n for (let i = 0; i < arr.length; i++) {\n let num = arr[i];\n n ^= num;\n }\n\n return n;\n}", "function evensOfOdds(arr) {\n var totalOdds = 0;\n var totalEvens = 0;\n for(i=0;i<arr.length;i++){\n if(arr[i]%2==0){\n totalEvens+=arr[i];\n }\n if(arr[i]%2==1){\n totalOdds+=arr[i];\n }\n } \n if(totalOdds>totalEvens){\n return \"odd are larger\"\n }\n if(totalOdds<totalEvens){\n return \"even are larger\"\n }\n // your code here\n}", "function binarySearchCmp(a, x, comparator) {\n var min = 0;\n var max = a.length - 1; // assert(a != null)\n // assert(comparator != null)\n // assert(min >= 0 && min < a.length)\n // assert(max < a.length)\n\n var l = min;\n var m;\n var h = max + 1;\n\n while (l < h) {\n m = l + (h - l >> 1);\n\n if (comparator(a[m], x) < 0) {\n l = m + 1;\n } else h = m;\n }\n\n if (l <= max && comparator(a[l], x) === 0) {\n return l;\n } else {\n return ~l;\n }\n}", "function onlyOdd(arr){\n //declare new var within function of empty array\n var newArray = []\n //create a loop for argument array\n for(let i=0;i<arr.length;i++){\n //if else to find odd numbers in array\n if(arr[i]%2!==0){\n newArray.push(arr[i])\n }\n }\n //returns NEW array w only odd numbers\n return newArray\n}", "function filterMethod(input) {\n var randomArr = [35, 87, 22, 96, 22, 66, 8, input];\n\n Array.prototype.userFilter = function (oddNumbers) {\n var newArray = [];\n // Empty array that numbers will be pushed into\n for (let i = 0; i <= this.length; i++) {\n if (oddNumbers(this[i])) {\n newArray.push(this[i]);\n }\n }\n return newArray;\n };\n\n // filteredArray takes array filters out all odd numbers\n var filteredArray = randomArr.userFilter(function (item) {\n return item % 2 === 1;\n });\n return filteredArray;\n}", "function comparer(otherArray){\r\n return function(current){\r\n return otherArray.filter(function(other){ \r\n return other.code === current.code \r\n }).length == 0;\r\n }\r\n }", "function findIndex(array, comp) {\n for (let i = 0; i < array.length; i += 1) {\n if (comp(array[i])) {\n return i;\n }\n }\n\n return -1;\n}", "function doStuff(arr){\n console.log(arr[arr.length-2]);\n var firstOdd = \"No odd numbers\"\n for(e in arr){\n if(Math.abs(arr[e] % 2) == 1){\n firstOdd = arr[e];\n return firstOdd;\n }\n }\n}", "function returnOdd() {\r\n let match;\r\n let rndN = Math.round(Math.random() * 3 - 1) + 1;\r\n return holderArr[rndN];\r\n }", "function filterEven(arr){\n return arr.filter(function(item){\n if(item % 2===0){\n return item;\n }\n })\n}" ]
[ "0.6244344", "0.62087166", "0.61113536", "0.6020386", "0.6016672", "0.5956524", "0.5872543", "0.5862129", "0.5854646", "0.58497524", "0.5821213", "0.5815745", "0.5771867", "0.57388544", "0.57379687", "0.5722937", "0.5706383", "0.5700951", "0.5698129", "0.5694465", "0.56922215", "0.5669282", "0.5669282", "0.56679654", "0.5654309", "0.56367326", "0.5626957", "0.55949533", "0.55943745", "0.5579218", "0.5579218", "0.55695754", "0.5560887", "0.5545396", "0.55436397", "0.5541426", "0.5536113", "0.5526475", "0.5518781", "0.5517252", "0.55125284", "0.5502606", "0.549805", "0.5497913", "0.5489029", "0.5487495", "0.54873735", "0.54866755", "0.5478647", "0.5468428", "0.54638475", "0.5461708", "0.54558533", "0.54494387", "0.544653", "0.54449236", "0.54403", "0.54385597", "0.5432956", "0.5428498", "0.5428365", "0.54271793", "0.54217905", "0.54105806", "0.54086715", "0.53918535", "0.53902304", "0.538892", "0.5381413", "0.53746295", "0.5373758", "0.53705835", "0.5368533", "0.53625023", "0.53591996", "0.5347491", "0.53426635", "0.53352535", "0.5334067", "0.53231025", "0.53219444", "0.5321645", "0.53206986", "0.53202415", "0.53197265", "0.5317722", "0.531622", "0.5315491", "0.53095067", "0.53015226", "0.5294776", "0.5290435", "0.5287791", "0.5286809", "0.5284873", "0.5281786", "0.52784705", "0.52715266", "0.5266706", "0.526627" ]
0.8121236
0
wrapper functions to unify common actions across the different map apis
function getLatLong(map) { if (map === GoogleMap) { var ll = GoogleMap.getCenter(); return [ll.lat(), ll.lng()]; } if (map === BingMap) { var ll = BingMap.getCenter(); return [ll.latitude, ll.longitude]; } if (map === NokiaMap) { var ll = NokiaMap.center; return [ll.latitude, ll.longitude]; } if (map == MapquestMap) { var ll = MapquestMap.getCenter(); return[ll.lat, ll.lng]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "handleMapLoad(map) {\n }", "function map() {\n\n}", "function excitM_func(){\n hidemapFunction();\n uncheckedmap();\n }", "switch(value, map) {\n let key;\n if (typeof value === 'function') {\n key = value(data)\n } else if (typeof value === 'object') {\n key = data\n map = value\n } else {\n key = value\n }\n if(map[key]) {\n return this.do(map[key])\n } else if (map['default']) {\n return this.do(map['default'])\n } else {\n return this\n }\n }", "function SeleneseMapper() {\n}", "function MAP() {\n\n}", "function embeddedInMaps() { }", "function positionMapTools(){\r\n\t//deprecated...\t\r\n}", "function MapDataUtils(){\n\t\t\n\t\t/**\n\t\t * Extracts path-coord. from polyline.\n\t\t * @param polyline : PolylineHolder\n\t\t * @return [google.maps.LatLng]\n\t\t */\n\t\tthis.extractPath = function(polyline){\t\t\t\n\t\t\tthrow new Error('This is abstract');\n\t\t};\n\t\t\n\t\t/**\n\t\t * Request for geocoding of the given address.\n\t\t * @param args : {address : string} or string\n\t\t * @param callback : function(err, {latitude: integer, longitude: integer, noResult: boolean})\n\t\t */\n\t\tthis.findCoordFromAddress = function(args, callback){\n\t\t\tthrow new Error('This is abstract');\n\t\t};\n\t}", "function mapTest() {\n return \"Hello\"\n}", "function addMapping(router, mapping) {\n for (let url in mapping) {\n\n if (url.startsWith('GET ')) {\n\n let path = url.substring(4);\n router.get(path, mapping[url]);\n\n } else if (url.startsWith('POST ')) {\n\n let path = url.substring(5);\n router.post(path, mapping[url]);\n\n } else if (url.startsWith('PUT ')) {\n\n let path = url.substring(4);\n router.put(path, mapping[url]);\n\n } else if (url.startsWith('DELETE ')) {\n\n let path = url.substring(7);\n router.delete(path, mapping[url]);\n\n } else {\n console.log(`invalid URL: ${url}`);\n }\n }\n}", "function Map() {}", "function ParamMap(){}", "function ParamMap() {}", "function ParamMap() {}", "static routes() {\n\n\t\tconst keys = ['all', 'delete', 'get', 'patch', 'post', 'put'];\n\n\t\treturn MapContainer.create(...keys);\n\t}", "function ParamMap() { }", "function ParamMap() { }", "function Maps( need_authentication , type )\r\n{\r\n try\r\n {\r\n if( need_authentication )\r\n {\r\n Ti.App.fireEvent( \"baea_mode:view_features_with_login\" , { auth_done: false } ) ;\r\n }\r\n\r\n if( Titanium.Network.networkType === Titanium.Network.NETWORK_NONE )\r\n {\r\n alert( L( 'generic_no_network_msg' ) ) ;\r\n }\r\n else\r\n {\r\n BeginAsyncBusyAction( $.activity_indicator , controls , function()\r\n {\r\n EndAsyncBusyAction( $.activity_indicator , controls , EndAsyncBusyAction_CallBack ) ;\r\n\r\n current_maps_type = type ;\r\n\r\n if( need_authentication )\r\n {\r\n Alloy.Globals.ProtectedAddEventListener( Ti.App , \"auth:done\" , ManageMaps ) ;\r\n Alloy.Globals.createAndOpenControllerExt( 'UserAuthenticationView' ) ;\r\n }\r\n else\r\n {\r\n ManageMaps() ;\r\n }\r\n\r\n } , EndAsyncBusyAction_CallBack ) ;\r\n }\r\n }\r\n catch( exception )\r\n {\r\n Alloy.Globals.AlertUserAndLogAsync( L( 'generic_exception_msg' ) + exception.message ) ;\r\n }\r\n}", "constructor(mapping){\n this.mapping = new ActionMap(mapping);\n }", "handleActions(action) {\n // it is check by a switch and will have a type that id it\n switch(action.type) {\n // call a function\n case 'GET_ALL': {\n this.getAll();\n }\n }\n }", "_MarkerTool() {\n // select the drawing tool\n let action = { type: \"Marker\", value: \"Marker\" }\n this.props.dispatch(action)\n\n // select the panel drawing tool\n let action2 = { type: \"MarkerPan\", value: \"MarkerPan\" }\n this.props.dispatch(action2)\n }", "async function windowActions() {\n // inits empty map \n const map = mapInit();\n // async function that takes the above init map and does stuff with it\n await dataHandler(map);\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 }", "showGoogleMapApiModal() {\n this.props.dispatch({type: LocationActions.ActionTypes.LOCATION.SHOW_GOOGLE_API_MAPS});\n }", "ShowMap(params) {\n source.cancel('Operation canceled by the user.');\n Actions.map(params);\n }", "function Map() {\n\t\n}", "function Map() {\n\t\n}", "generateFunctionMap() {\n return {\n 'emigateway.graphql.query.getACSSBusiness': {\n fn: business.getACSSBusiness$,\n obj: business\n },\n 'emigateway.graphql.query.getACSSBusinesses': {\n fn: business.getACSSBusinesses$,\n obj: business\n }, \n 'emigateway.graphql.query.getBusinessById': {\n fn: business.getBusinessById$,\n obj: business\n }, \n 'emigateway.graphql.query.getAllClearingsFromBusiness': {\n fn: clearing.getClearingsFromBusiness$,\n obj: clearing\n }, \n 'emigateway.graphql.query.getClearingById': {\n fn: clearing.getClearingById$,\n obj: clearing\n },\n 'emigateway.graphql.query.getAccumulatedTransactionsByIds': {\n fn: clearing.getAccumulatedTransactionsByIds$,\n obj: clearing\n },\n 'emigateway.graphql.query.getAccumulatedTransactionsByClearingId': {\n fn: clearing.getAccumulatedTransactionsByClearingId$,\n obj: clearing\n },\n 'emigateway.graphql.query.getTransactionsByIds': {\n fn: clearing.getTransactionsByIds$,\n obj: clearing\n },\n 'emigateway.graphql.query.getTransactionsByAccumulatedTransactionId': {\n fn: clearing.getTransactionsByAccumulatedTransactionId$,\n obj: clearing\n },\n 'emigateway.graphql.query.getSettlementsByClearingId': {\n fn: settlement.cqrs.getSettlementsByClearingId$,\n obj: settlement.cqrs\n },\n 'emigateway.graphql.query.getSettlementsCountByClearingId': {\n fn: settlement.cqrs.getSettlementsCountByClearingId$,\n obj: settlement.cqrs\n },\n 'emigateway.graphql.query.getSettlementsByBusinessId': {\n fn: settlement.cqrs.getSettlementsByBusinessId$,\n obj: settlement.cqrs\n },\n 'emigateway.graphql.query.getSettlementsCountByBusinessId': {\n fn: settlement.cqrs.getSettlementsCountByClearingId$,\n obj: settlement.cqrs\n },\n 'emigateway.graphql.query.getAccumulatedTransactionErrors': {\n fn: logError.cqrs.getAccumulatedTransactionErrors$,\n obj: logError.cqrs\n },\n 'emigateway.graphql.query.getAccumulatedTransactionErrorsCount': {\n fn: logError.cqrs.getAccumulatedTransactionErrorsCount$,\n obj: logError.cqrs\n },\n 'emigateway.graphql.query.getClearingErrors': {\n fn: logError.cqrs.getClearingErrors$,\n obj: logError.cqrs\n },\n 'emigateway.graphql.query.getClearingErrorsCount': {\n fn: logError.cqrs.getClearingErrorsCount$,\n obj: logError.cqrs\n },\n 'emigateway.graphql.query.getSettlementErrors': {\n fn: logError.cqrs.getSettlementErrors$,\n obj: logError.cqrs\n },\n 'emigateway.graphql.query.getSettlementErrorsCount': {\n fn: logError.cqrs.getSettlementErrorsCount$,\n obj: logError.cqrs\n },\n 'emigateway.graphql.mutation.changeSettlementState': {\n fn: settlement.cqrs.changeSettlementState$,\n obj: settlement.cqrs\n },\n };\n }", "function ObjectWithMap(){\r\n\t\r\n\tthis.map = (func) => {\r\n\t\t\r\n\t\tfor (let i in this){\r\n\t\t\tif(i != 'map') this[i] = func(this[i]);\r\n\t\t}\r\n\t\t\r\n\t}\r\n}", "function addMapping(router, mapping) {\n for (let url in mapping.default) {\n if (url.startsWith('GET ')) {\n var path = url.substring(4);\n router.get(path, mapping[url]);\n console.log(`register URL mapping: GET ${path}`);\n\n } else if (url.startsWith('POST ')) {\n var path = url.substring(5);\n router.post(path, mapping[url]);\n console.log(`register URL mapping: POST ${path}`);\n\n } else if (url.startsWith('PUT ')) {\n var path = url.substring(4);\n router.put(path, mapping[url]);\n console.log(`register URL mapping: PUT ${path}`);\n\n } else if (url.startsWith('DELETE ')) {\n var path = url.substring(7);\n router.del(path, mapping[url]);\n console.log(`register URL mapping: DELETE ${path}`);\n\n } else {\n console.log(`invalid URL: ${url}`);\n }\n }\n}", "function isMapLike(value) {\n return value && typeof value.get === 'function' && typeof value.set === 'function';\n }", "handleMap() {\r\n this.setState({displayMap: true});\r\n this.setState({displayedState: 'Map'});\r\n this.setState({displayedData: []});\r\n this.setState({output: []});\r\n this.setState({submitted: false});\r\n this.setState({allEntries: false});\r\n this.clearSearchFields();\r\n }", "function init(){\n basemap();\n}", "function _indicatorsMap (fn) {\n\t\t\tif (that.indicators) {\n\t\t\t\tfor ( var i = that.indicators.length; i--; ) {\n\t\t\t\t\tfn.call(that.indicators[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function _indicatorsMap (fn) {\n\t\t\tif (that.indicators) {\n\t\t\t\tfor ( var i = that.indicators.length; i--; ) {\n\t\t\t\t\tfn.call(that.indicators[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function _indicatorsMap (fn) {\n\t\t\tif (that.indicators) {\n\t\t\t\tfor ( var i = that.indicators.length; i--; ) {\n\t\t\t\t\tfn.call(that.indicators[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function addMapping(router, mapping) {\n for (var url in mapping) {\n if (url.startsWith('GET ')) {\n var path = url.substring(4);\n router.get(path, mapping[url]);\n console.log(`register URL mapping: GET ${path}`);\n } else if (url.startsWith('POST ')) {\n var path = url.substring(5);\n router.post(path, mapping[url]);\n console.log(`register URL mapping: POST ${path}`);\n } else if (url.startsWith('PUT ')) {\n var path = url.substring(4);\n router.put(path, mapping[url]);\n console.log(`register URL mapping: PUT ${path}`);\n } else if (url.startsWith('DELETE ')) {\n var path = url.substring(7);\n router.del(path, mapping[url]);\n console.log(`register URL mapping: DELETE ${path}`);\n } else {\n console.log(`invalid URL: ${url}`);\n }\n }\n}", "function initMap() {\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 }", "eachMapping(aCallback, aContext, aOrder) {\n throw new Error('Subclasses must implement eachMapping')\n }", "handleMapClick(event) {\n }", "function layersControl () {\r\n if (maptype == \"artmap\") { \r\n basemaps = {\r\n 'Mapquest Open <img src=\"./lib/images/external.png\" />' : mapquestopen\r\n };\r\n overlays = {\r\n 'WV Artikel <img src=\"./lib/images/wv-logo-12.png\" />' : wvarticles\r\n };\r\n }\r\n \r\n else if (maptype == \"geomap\") {\r\n basemaps = {\r\n 'Mapnik <img src=\"./lib/images/wmf-logo-12.png\" />': mapnik,\r\n 'Mapquest open <img src=\"./lib/images/external.png\" />': mapquestopen,\r\n 'Mapquest aerial <img src=\"./lib/images/external.png\" />': mapquest\r\n }; \r\n overlays = {\r\n 'Mapquest Beschriftungen <img src=\"./lib/images/external.png\" />': maplabels,\r\n 'Grenzen <img src=\"./lib/images/external.png\" />': boundaries,\r\n 'Radwege <img src=\"./lib/images/external.png\" />': cycling\r\n };\r\n }\r\n \r\n else if (maptype == \"gpxmap\") { \r\n basemaps = {\r\n 'Mapquest Open <img src=\"./lib/images/external.png\" />' : mapquestopen\r\n };\r\n overlays = {\r\n 'WV Artikel <img src=\"./lib/images/wv-logo-12.png\" />' : wvarticles\r\n };\r\n }\r\n \r\n else if (maptype == \"monmap\") {\r\n basemaps = {\r\n 'Mapquest Open <img src=\"./lib/images/external.png\" />' : mapquestopen,\r\n 'Mapnik <img src=\"./lib/images/wmf-logo-12.png\" />' : mapnik, \r\n 'Reliefkarte <img src=\"./lib/images/external.png\" />' : landscape\r\n };\r\n overlays = {\r\n 'Denkmäler <img src=\"./lib/images/wv-logo-12.png\" />' : monuments\r\n };\r\n }\r\n\r\n else if (maptype == \"poimap2\") {\r\n basemaps = {\r\n 'Mapnik <img src=\"./lib/images/wmf-logo-12.png\" />' : mapnik,\r\n 'Mapnik s/w <img src=\"./lib/images/wmf-logo-12.png\" />' : mapnikbw,\r\n 'Mapquest Open <img src=\"./lib/images/external.png\" />' : mapquestopen,\r\n 'Mapquest Aerial <img src=\"./lib/images/external.png\" />' : mapquest,\r\n 'Verkehrsliniennetz <img src=\"./lib/images/external.png\" />' : transport,\r\n 'Reliefkarte <img src=\"./lib/images/external.png\" />' : landscape\r\n };\r\n overlays = {\r\n 'Mapquest Beschriftungen <img src=\"./lib/images/external.png\" />' : maplabels,\r\n 'Grenzen <img src=\"./lib/images/external.png\" />' : boundaries,\r\n 'Schummerung <img src=\"./lib/images/wmf-logo-12.png\" />' : hill,\r\n 'Radwege <img src=\"./lib/images/external.png\" />' : cycling,\r\n 'Wanderwege <img src=\"./lib/images/external.png\" />' : hiking,\r\n 'Sehenswürdigkeiten <img src=\"./lib/images/wv-logo-12.png\" />' : markers,\r\n 'Reiseziele <img src=\"./lib/images/wv-logo-12.png\" />' : wvarticles,\r\n 'GPX Spuren / Kartenmaske <img src=\"./lib/images/wv-logo-12.png\" />' : tracks\r\n };\r\n }\r\n}", "map(id, source) {}", "function InvokeDefinitionMap() {\n this.map = [];\n this.lookup_table = {}; // Just for building dictionary\n}", "function setApiUrl(entity, action) {\n switch(entity) {\n case \"track\":\n switch(action){\n case \"getAll\":\n return \"../api/track/getAll.php\";\n case 'getById':\n return \"../api/track/getById.php\";\n case 'search':\n return \"../api/track/search.php\";\n }\n break;\n case \"album\":\n switch(action){\n case \"getAll\":\n return \"../api/album/getAll.php\";\n case 'getById':\n return \"../api/album/getById.php\";\n case 'search':\n return \"../api/album/search.php\";\n }\n break;\n case \"artist\":\n switch(action){\n case \"getAll\":\n return \"../api/artist/getAll.php\";\n case 'getById':\n return \"../api/artist/getById.php\";\n case 'search':\n return \"../api/artist/search.php\";\n }\n break;\n case \"profile\":\n switch(action){\n case \"getProfile\":\n return \"../api/profile/get-profile.php\";\n case \"editProfile\":\n return \"../api/profile/edit-profile.php\";\n case \"changePassword\":\n return \"../api/profile/edit-password.php\";\n }\n break;\n case \"purchase\":\n switch(action){\n case \"createInvoice\":\n return \"../api/purchase/create-invoice.php\";\n }\n break;\n case \"user\":\n switch(action){\n case \"create\":\n return \"../api/user/create.php\";\n case \"validate\":\n return \"../api/user/validate.php\";\n case \"sign-out\":\n return \"../api/user/sign-out.php\";\n }\n break;\n }\n}", "function _indicatorsMap (fn) {\n\t\t\tfor ( var i = that.indicators.length; i--; ) {\n\t\t\t\tfn.call(that.indicators[i]);\n\t\t\t}\n\t\t}", "function _indicatorsMap (fn) {\n\t\t\tfor ( var i = that.indicators.length; i--; ) {\n\t\t\t\tfn.call(that.indicators[i]);\n\t\t\t}\n\t\t}", "function _indicatorsMap (fn) {\n\t\t\tfor ( var i = that.indicators.length; i--; ) {\n\t\t\t\tfn.call(that.indicators[i]);\n\t\t\t}\n\t\t}", "function _indicatorsMap (fn) {\n\t\t\tfor ( var i = that.indicators.length; i--; ) {\n\t\t\t\tfn.call(that.indicators[i]);\n\t\t\t}\n\t\t}", "function _indicatorsMap (fn) {\n\t\t\tfor ( var i = that.indicators.length; i--; ) {\n\t\t\t\tfn.call(that.indicators[i]);\n\t\t\t}\n\t\t}", "function _indicatorsMap (fn) {\n\t\t\tfor ( var i = that.indicators.length; i--; ) {\n\t\t\t\tfn.call(that.indicators[i]);\n\t\t\t}\n\t\t}", "function _indicatorsMap (fn) {\n\t\t\tfor ( var i = that.indicators.length; i--; ) {\n\t\t\t\tfn.call(that.indicators[i]);\n\t\t\t}\n\t\t}", "function _indicatorsMap (fn) {\n\t\t\tfor ( var i = that.indicators.length; i--; ) {\n\t\t\t\tfn.call(that.indicators[i]);\n\t\t\t}\n\t\t}", "function map_callbacks() {\n //$('.shipment > h1').unbind('click').click(function() {\n // $(this).siblings('.dewar').slideToggle()\n // return false\n //})\n \n $('.container a').button({ icons: { primary: 'ui-icon-search' }, text: false })\n }", "function wrapMapToPropsFunc(mapToProps,methodName){return function initProxySelector(dispatch,_ref){var displayName=_ref.displayName;var proxy=function mapToPropsProxy(stateOrDispatch,ownProps){return proxy.dependsOnOwnProps?proxy.mapToProps(stateOrDispatch,ownProps):proxy.mapToProps(stateOrDispatch);};// allow detectFactoryAndVerify to get ownProps\nproxy.dependsOnOwnProps=true;proxy.mapToProps=function detectFactoryAndVerify(stateOrDispatch,ownProps){proxy.mapToProps=mapToProps;proxy.dependsOnOwnProps=getDependsOnOwnProps(mapToProps);var props=proxy(stateOrDispatch,ownProps);if(typeof props==='function'){proxy.mapToProps=props;proxy.dependsOnOwnProps=getDependsOnOwnProps(props);props=proxy(stateOrDispatch,ownProps);}if(true)Object(_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props,displayName,methodName);return props;};return proxy;};}", "function wrapOpenWeatherMap(opts) {\n this.config = opts;\n // use the default http function\n this.httpFunction = getHttpResponse;\n}", "function mapFunction () {\n\n\t//list of events that are relevant for the behaviour to be found\n\t//var eventArray = [\"mousewheel\"];//\"scroll\",mouseUpEvent,\"keydown\"];\n\n\t//we filter out the events we don't want to consider\n\t//if (eventArray.indexOf(this.event) > -1){\n\t\t/*\n\t\t * \"emit\" function takes two arguments: 1) the key on which to group the data, 2) data itself to group. Both of them can be objects ({this.id, this.userId},{this.time, this.value}) for example\n\t\t */\n\t\t//emit({sid:this.sid, sessionstartms:this.sessionstartms, url:this.url, urlSessionCounter:this.urlSessionCounter},\n\t\temit({sid:this.sid, url:this.url, urlSessionCounter:this.urlSessionCounter},\n\t\t\t\t{ \"episodeEvents\":\n\t\t\t\t\t[\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tevent:this.event,\n\t\t\t\t\t\t\ttimestamp:this.timestamp,\n\t\t\t\t\t\t\ttimestampms:this.timestampms,\n\t\t\t\t\t\t\tsid:this.sid,\n\t\t\t\t\t\t\tip:this.ip,\n\t\t\t\t\t\t\turl:this.url,\n\t\t\t\t\t\t\tsessionstartms:this.sessionstartms,\n\t\t\t\t\t\t\tsessionstartparsed:this.sessionstartparsed,\n\t\t\t\t\t\t\tvisitCounter:this.visitCounter,\n\t\t\t\t\t\t\tvisitDuration:this.visitDuration,\n\n\t\t\t\t\t\t\tsdSessionCounter:this.sdSessionCounter,\n\t\t\t\t\t\t\tsdTimeSinceLastSession:this.sdTimeSinceLastSession,\n\t\t\t\t\t\t\turlSessionCounter:this.urlSessionCounter,\n\t\t\t\t\t\t\turlSinceLastSession:this.urlSinceLastSession,\n\t\t\t\t\t\t\turlEpisodeLength:this.urlEpisodeLength,\n\n\t\t\t\t\t\t\tepisodeUrlActivity: this.episodeUrlActivity,\n\t\t\t\t\t\t\tepisodeSdActivity: this.episodeSdActivity,\n\n\n\t\t\t\t\t\t\thtmlSize : this.htmlSize,\n\t\t\t\t\t\t\tresolution : this.resolution,\n\t\t\t\t\t\t\tsize : this.size,\n\t\t\t\t\t\t\tusableSize : this.usableSize,\n\n\t\t\t\t\t\t\tidleTime:this.idleTime,\n\t\t\t\t\t\t\tcalculatedActiveTime:this.calculatedActiveTime,\n\t\t\t\t\t\t\tidleTimeSoFar:this.idleTimeSoFar,\n\t\t\t\t\t\t\tsdCalculatedActiveTime:this.sdCalculatedActiveTime,\n\n\t\t\t\t\t\t\tusertimezoneoffset:this.usertimezoneoffset,\n\t\t\t\t\t\t\tmouseCoordinates:this.mouseCoordinates,\n\t\t\t\t\t\t\tnodeInfo:this.nodeInfo,\n\t\t\t\t\t\t\tcount:1\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t);\n\t//}\n}", "function mapToOperator (map) {\n return function (cmd) {\n const op = map[cmd]\n if (typeof op === \"string\") return map[op]\n else return op\n }\n}", "function updateStateMaps() {\n // XXX\n }", "getControllerMap(map) {\n for (const serviceName of this.controllerMap.keys()) this.controllerMap.get(serviceName).getControllerMap(map);\n return map;\n }", "function mapper_initialize(\n map_markers_raw,\n mapper_countrycode,\n mapper_south,\n mapper_west,\n mapper_north,\n mapper_east,\n mapper_cover_all_points\n )\n{\n if(map_div) return;\n map_div = document.getElementById(\"map\");\n if(!map_div) return;\n\n if (!GBrowserIsCompatible()) return;\n\n if(map) return;\n map = new GMap2(document.getElementById(\"map\"));\n // map = new google.maps.Map2(document.getElementById(\"map\"));\n\n var mapControl = new GMapTypeControl();\n map.addControl(mapControl);\n map.addControl(new GSmallMapControl());\n // map.removeMapType(G_HYBRID_MAP);\n\n // setup custom icon support\n mapper_icons();\n\n // try to respect supplied map boundaries for the very first refresh before user does any actions\n map_countrycode = mapper_countrycode;\n map.south = mapper_south;\n map.west = mapper_west;\n map.north = mapper_north;\n map.east = mapper_east;\n\n // recenter now\n var map_please_recenter = true;\n if(map.north < 0.0 || map.north > 0.0 || map.south < 0.0 || map.south > 0.0) {\n map_please_recenter = false;\n var bounds = new GLatLngBounds( new GLatLng(map.south,map.west,false), new GLatLng(map.north,map.east,false) );\n var center = bounds.getCenter();\n var zoom = map.getBoundsZoomLevel(bounds);\n if(zoom < 2 ) zoom = 2;\n map.setCenter(center,zoom);\n }\n\n // capture map location whenever the map is moved and go ahead and ask for a view of that areas markers from our own server\n if(map_location_callback) {\n GEvent.addListener(map, \"moveend\", function() {\n mapper_save_location();\n // when the map is moved go ahead and fetch new markers [ but do not center on them ]\n mapper_page_paint_request(false);\n });\n // also capture map location once at least\n mapper_save_location();\n }\n\n // add features from a statically cached list if any [ this can help make first page display a bit faster ]\n mapper_inject(map_markers_raw);\n\n // center on any data we have already if any [ slight tension here with dynamic updates so can be disabled ]\n if( map_please_recenter && mapper_cover_all_points ) {\n \tmapper_center();\n }\n\n // ask to add features from a remote connection dynamically [ and will center on them ]\n mapper_page_paint_request(map_please_recenter);\n\n // call a user callback as a last step\n //if(self[mapper_usercallback] && typeof mapper_usercallback = 'function') {\n // mapper_usercallback();\n //}\n}", "function mapViaUrl() {\r\n\r\n // The order of the follwing ifs is from specific to less specific location given in uri\r\n // If search query contains room -> show it on map\r\n if ($location.search().room) {\r\n // $log.debug('Show map via url room', $location.search());\r\n $scope.mapViaRoom($location.search().room);\r\n\r\n // If search query contains level (aka mapUri) -> show it on map\r\n } else if ($location.search().level) {\r\n //$log.debug('Show map via url mapUri', $location.search().level);\r\n $scope.mapViaLevel($location.search().level);\r\n \r\n // If search query contains level (aka mapUri) -> show it on map\r\n } else if ($location.search().part) {\r\n //$log.debug('Show map via url part', $location.search().part);\r\n $scope.mapViaPart($location.search().part);\r\n \r\n // Else init with first building part\r\n } else {\r\n var thisBuildingPart = ctrl.buildingParts[Object.keys(ctrl.buildingParts)[0]];\r\n\r\n if (thisBuildingPart) {\r\n initMap(thisBuildingPart);\r\n } else {\r\n $analytics.eventTrack('Roomfinder Error!', { category: 'ERROR', label: \"Can't find building \" + thisBuildingPart});\r\n $location.path(\"/404\");\r\n }\r\n }\r\n }", "constructor(viewOf, mapFn) {\n super(viewOf);\n this.mapFn = mapFn;\n }", "function load_map (p_coordinates, p_zoom)\n{\n switch (action)\n {\n\t case 'marker':\n\t\t\tmap = new Map(p_coordinates, p_zoom, action);\n break;\n case 'list':\n case 'default':\n map = new Map(p_coordinates, p_zoom, action);\n map.get_vendors();\n break;\n\t}\n}", "function _indicatorsMap(fn) {\r\n\t\t\t\t\tfor (var i = that.indicators.length; i--;) {\r\n\t\t\t\t\t\tfn.call(that.indicators[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}", "function userinfo_dispatcher_routines() {\n\n\n}", "function mapFromLegacyCameraApi() {\n var params;\n if (typeof arguments[0] === \"function\") {\n params = (arguments.length > 2 && typeof arguments[2] === \"object\") ? arguments[2] : {};\n params.successCallback = arguments[0];\n if(arguments.length > 1 && typeof arguments[1] === \"function\") {\n params.errorCallback = arguments[1];\n }\n }else { // if (typeof arguments[0] === \"object\")\n params = arguments[0];\n }\n return params;\n }", "function mutiple_mark_trigger()\n{\n beepOnce();\n google.maps.event.trigger(map, 'resize');\n // document.getElementById('searchbytext').style.display=\"none\";\n document.getElementById('myicon1').className=\"\";\n $(\"#myicon1\").attr(\"href\", \"#donor_1\");\n $(\"#myicon1\").addClass('icon left');\n $(\"#myicon1\").attr(\"onClick\",\"dummy()\");\n document.getElementById('myicon2').className=\"\";\n $(\"#myicon2\").attr(\"href\", \"#main\");\n $(\"#myicon2\").addClass('icon home');\n $(\"#myicon2\").attr(\"onClick\",\"dummy()\");\n $('#map-canvas').data('type',2);\n document.getElementById('myicon3').className=\"\";\n $(\"#myicon3\").attr(\"href\", \"#bank\");\n $(\"#myicon3\").addClass('icon new');\n $(\"#myicon3\").attr(\"onClick\",\"dummy()\");\n //alert(\"function called for nothing\");\n showMarkers();\n google.maps.event.trigger(map, 'resize');\n map.setZoom(map.getZoom());\n}", "componentDidMount() {\n this.map = new ObliquePhotoMap(this.mapComponent)\n // order here matters (basemaps, then layers)\n this.toggleBasemaps(null, this.props.basemaps)\n this.toggleLayers(null, this.props.layers)\n }", "function _indicatorsMap(fn) {\n if (that.indicators) {\n for (var i = that.indicators.length; i--;) {\n fn.call(that.indicators[i]);\n }\n }\n }", "function _____SHARED_functions_____(){}", "function updateMap(callback) {\r\n\r\n colorMap();\r\n updateActivityClusters();\r\n updateHeadline();\r\n updateFiltSum();\r\n if (callback) callback();\r\n\r\n}", "function setMapOnAll(type, map) {\n\tif( type == 1 ) {\n\t\tfor (var i = 0; i < markers.length; i++)\n\t\t\tmarkers[i].setMap(map);\n\t}\n\telse if ( type == 2 ) {\n\t\tfor (var i = 0; i < blueMarkers.length; i++)\n\t\t\tblueMarkers[i].setMap(map);\n\t}\n}", "function _indicatorsMap (fn) {\r\n if (that.indicators) {\r\n for ( var i = that.indicators.length; i--; ) {\r\n fn.call(that.indicators[i]);\r\n }\r\n }\r\n }", "function _indicatorsMap(fn) {\n if (that.indicators) {\n for (var i = that.indicators.length; i--;) {\n fn.call(that.indicators[i]);\n }\n }\n }", "static mapDispatch(dispatch) {\n return {\n actions: {\n getListCategory: () => dispatch(CategoryAction.getListCategory())\n }\n }\n }", "function main_entry(){\n\tinit_map();\n\tinit_fsmap();\n\t\n\tregister_ui_events_dom(); // old style\n\t//register_ui_events_jquery(); // new style\n}", "static mapDispatch(dispatch) {\n return {\n actions: {\n searchProduct: (queryService, searchKey) =>\n dispatch(ProductAction.searchProduct(queryService, searchKey)),\n viewProduct: (product, isShowExternalStock, canBack) =>\n dispatch(ProductAction.viewProduct(product, isShowExternalStock, canBack)),\n addProduct: data => dispatch(QuoteAction.addProduct(data)),\n searchByBarcode: code => dispatch(ProductAction.searchByBarcode(code)),\n resetSyncActionUpdateProduct: () => dispatch(ProductAction.syncActionUpdateProductDataFinish()),\n resetSyncActionUpdateStock: () => dispatch(ProductAction.syncActionUpdateStockDataFinish()),\n resetSyncActionUpdateCatalogRulePrice: () =>\n dispatch(ProductAction.syncActionUpdateCatalogRulePriceDataFinish()),\n resetSyncActionDeletedCatalogRulePrice: () =>\n dispatch(ProductAction.syncActionDeletedCatalogRulePriceDataFinish()),\n }\n }\n }", "function loadMap() {\r\n hideall();\r\n $(\"#map\").show();\r\n $(\"#sidebar\").show();\r\n deactiveAll();\r\n $(\"#side-map\").addClass(\"active\");\r\n $(\"#navbar\").show();\r\n\r\n // Additonal calls \r\n loadMain();\r\n\r\n}", "function damages_map(){\n\n}", "function _indicatorsMap (fn) {\n if (that.indicators) {\n for ( var i = that.indicators.length; i--; ) {\n fn.call(that.indicators[i]);\n }\n }\n }", "function _indicatorsMap (fn) {\n if (that.indicators) {\n for ( var i = that.indicators.length; i--; ) {\n fn.call(that.indicators[i]);\n }\n }\n }", "function _indicatorsMap (fn) {\n if (that.indicators) {\n for ( var i = that.indicators.length; i--; ) {\n fn.call(that.indicators[i]);\n }\n }\n }", "function _indicatorsMap (fn) {\n if (that.indicators) {\n for ( var i = that.indicators.length; i--; ) {\n fn.call(that.indicators[i]);\n }\n }\n }", "_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 initMapClickHandlers() {\r\n\tvar listener = google.maps.event.addListener(map, 'tilesloaded', function() {\r\n\t\tgoogle.maps.event.addListener(map, 'click', mapLeftClicked);\r\n\t\tgoogle.maps.event.removeListener(listener);\r\n\t});\r\n}", "fromMap(map) {\n if (map && map.constructor == Object) {\n if (HEADERS in map) {\n this.headers = setLowerCase(map[HEADERS]);\n }\n if (COOKIES in map) {\n this.cookies = setLowerCase(map[COOKIES]);\n }\n if (SESSION in map) {\n this.session = setLowerCase(map[SESSION]);\n }\n if (METHOD in map) {\n this.method = String(map[METHOD]);\n }\n if (IP in map) {\n this.ip = String(map[IP]);\n }\n if (URL_LABEL in map) {\n this.url = String(map[URL_LABEL]);\n }\n if (TIMEOUT in map) {\n this.timeoutSeconds = parseInt(String(map[TIMEOUT]));\n }\n if (FILE_NAME in map) {\n this.filename = String(map[FILE_NAME]);\n }\n if (CONTENT_LENGTH in map) {\n this.contentLength = parseInt(String(map[CONTENT_LENGTH]));\n }\n if (STREAM in map) {\n this.streamRoute = String(map[STREAM]);\n }\n if (BODY in map) {\n this.body = map[BODY];\n }\n if (QUERY in map) {\n this.queryString = String(map[QUERY]);\n }\n if (HTTPS in map) {\n this.https = String(map[HTTPS]) == 'true';\n }\n if (TARGET_HOST in map) {\n this.targetHost = String(map[TARGET_HOST]);\n }\n if (TRUST_ALL_CERT in map) {\n this.trustAllCert = String(map[TRUST_ALL_CERT]) == 'true';\n }\n if (UPLOAD in map) {\n this.upload = String(map[UPLOAD]);\n }\n if (PARAMETERS in map) {\n const parameters = map[PARAMETERS];\n if (PATH in parameters) {\n this.pathParams = setLowerCase(parameters[PATH]);\n }\n if (QUERY in parameters) {\n this.queryParams = setLowerCase(parameters[QUERY]);\n }\n }\n }\n }", "function initMap() {\n\n map = mapController.makeMap()\n\n let mapData = model.fullParkData.getParkData()\n mapData = mapController.filterParks(mapData)\n mapData = mapController.filterAda(mapData)\n mapData = mapController.filterPest(mapData)\n\n for(key in mapData){\n\n const marker = mapController.makeMarker(mapData[key])\n const content = mapController.makeContent(mapData[key])\n const infoWindow = mapController.makeInfo(content)\n\n mapController.clickHandler(map, marker, infoWindow)\n }\n}", "function CreateBaseMap() {\n // init OpenLayer map with MapBox tiles\n const map = new Map({\n target: 'MapContainer',\n // interaction: interaction,\n view: new View({\n center: App4Sea.mapCenter,\n zoom: App4Sea.startZoom,\n minZoom: App4Sea.minZoom,\n maxZoom: App4Sea.maxZoom,\n }),\n });\n\n my.Map = map;\n\n my.Map.on('click', (evt) => {\n App4Sea.PopUps.SingleClick(evt);\n });\n\n my.Map.on('not_working', (evt) => {\n App4Sea.Weather.NotWorking(evt);\n });\n }", "function mapDispatchToProps(dispatcher){\n return bindActionCreators({ \n onMapImported,\n onMapDeleted,\n onNewLayerDialogStateChenged,\n onMapLayerAdded,\n onSelectedLayerChanged,\n onNewTopologyChanged,\n onMapTopologyLayerAdded,\n onMapLayersIntersect,\n onMapLayersDiff,\n onMapLayersSemiDiff,\n onMapLayersUnion,\n onMapLayerDeleted,\n onSelectedLayerChanged,\n onLayerStyleChanged,\n onFeaturesStyleChanged,\n onMapLayersAddTopology,\n onAttributeTableColumnAdded,\n onAttributeTableColumnModified,\n onAttributeTableColumnDeleted\n },dispatcher);\n}", "map(mapFn) {\n return map(mapFn, this);\n }", "map(mapFn) {\n return map(mapFn, this);\n }", "function viewMapInfo(mapId) {\r\n\tif (mapId != \"-1\"){\r\n\t\tmapDwrAction.getMap(mapId, \r\n \t\tfunction(sysMap){\r\n \t\t\tif (sysMap != null) {\r\n \t\t\t\t$(\"mapInfoImg\").src=\"../images/icons/info-02.gif\";\r\n \t\t\t\t$(\"mapInfoTable\").style.display=\"\";\r\n \t\t\t\t$(\"sysCatalogInfo\").style.display=\"none\";\r\n \t\t\t\t$(\"onMapDiv\").style.display=\"none\";\r\n\t \t\t\tvar mapTitle = $(\"mapTitleDiv\");\r\n\t \t\t\tvar mapSign = $(\"mapSignDiv\");\r\n\t \t\t\tvar mapDescn = $(\"mapDescnDiv\");\r\n\t \t\t\tmapTitle.innerHTML=\"<font color='red'>\" + sysMap.mapTitle + \"</font>\";\r\n\t \t\t\tmapSign.innerHTML=sysMap.mapSign;\r\n\t \t\t\tmapDescn.innerHTML=sysMap.mapDescn;\r\n \t\t\t} else {\r\n \t\t\t\tviewSimpleDlg(noMap);\r\n \t\t\t\tsetMapId_NodeId(\"\", \"\");\r\n \t\t\t\t$(\"mapInfoImg\").src=\"../images/icons/error.gif\";\r\n \t\t\t\t$(\"onMapDiv\").style.display=\"\";\r\n \t\t\t\t$(\"mapInfoTable\").style.display=\"none\";\r\n \t\t\t\t$(\"sysCatalogInfo\").style.display=\"none\";\r\n \t\t\t}\r\n\t\t\t}\t);\r\n\t} else {\r\n\t\t\t$(\"mapInfoImg\").src=\"../images/icons/info-02.gif\";\r\n\t\t\t$(\"sysCatalogInfo\").style.display=\"\";\r\n\t\t\t$(\"mapInfoTable\").style.display=\"none\";\r\n\t\t\t$(\"onMapDiv\").style.display=\"none\";\r\n\t\t\t\r\n\t}\r\n}", "_attachMapMoveHandlers() {\n this._maps.forEach((map, index) => {\n map.events.add('move', this._syncEvents[index]);\n });\n }", "function AddMapOverlays() { try { LoadPoliticalBoundaries(); LoadSoilsService(); } catch (e) { HiUser(e, \"AddMapOverlays\"); } }", "function setMapOnAll(map) {\n for (let i = 0; i < markers.length; i++) {\n markers[i].setMap(map);\n }\n for (let i = 0; i < choiceMarkers.length; i++) {\n choiceMarkers[i].setMap(map);\n } \n for (let i = 0; i < searchResMarkers.length; i++) {\n searchResMarkers[i].setMap(map);\n } \n}//setMapOnAll", "function mapDispatchToProps(dispatch) {\n return {\n moveSlide: function moveSlide(count) {\n dispatch(__WEBPACK_IMPORTED_MODULE_2__action__[\"b\" /* moveSlide */](count));\n },\n zoomTo: function zoomTo(coords, zoomLevel) {\n dispatch(__WEBPACK_IMPORTED_MODULE_3__boundlessgeo_sdk_actions_map__[\"setView\"](coords, zoomLevel));\n }\n };\n}", "function MyComponent() {\n const map = useMapEvents({\n click: () => {\n map.locate();\n console.log(map.locate());\n },\n locationfound: (location) => {\n setUserPosition(location.latlng);\n map.flyTo(location.latlng, map.getZoom())\n console.log(userPosition);\n console.log('location found:', location)\n },\n moveend: async () => {\n const bounds = map.getBounds();\n const wrapBounds = map.wrapLatLngBounds(bounds);\n // console.log(wrapBounds._southWest.lat, wrapBounds._southWest.lng, wrapBounds._northEast.lat, wrapBounds._northEast.lng);\n\n const res = await axios.get(`http://localhost:3001/api/area/${wrapBounds._southWest.lat}/${wrapBounds._southWest.lng}/${wrapBounds._northEast.lat}/${wrapBounds._northEast.lng}`);\n // const res = await axios.get(`http://localhost:3001/api/area/all`);\n console.log(res.data);\n setPlanes(res.data.states)\n \n },\n })\n return null\n }", "function heroMap(_latitude,_longitude, element, markerTarget, sidebarResultTarget, showMarkerLabels, mapDefaultZoom){\n if( document.getElementById(element) != null ){\n\n // Create google map first -------------------------------------------------------------------------------------\n\n if( !mapDefaultZoom ){\n mapDefaultZoom = 14;\n }\n\n if( !optimizedDatabaseLoading ){\n var optimizedDatabaseLoading = 0;\n }\n\n var mapZoomAttr = $('#map').attr('data-map-zoom');\n var mapScrollAttr = $('#map').attr('data-map-scroll');\n if (typeof mapZoomAttr !== typeof undefined && mapZoomAttr !== false) {\n var zoomLevel = parseInt(mapZoomAttr);\n } else {\n var zoomLevel = 5;\n }\n if (typeof mapScrollAttr !== typeof undefined && mapScrollAttr !== false) {\n var scrollEnabled = parseInt(mapScrollAttr);\n } else {\n var scrollEnabled = false;\n }\n\n map = new google.maps.Map(document.getElementById(element), {\n zoom: mapDefaultZoom,\n scrollwheel: scrollEnabled,\n center: new google.maps.LatLng(_latitude, _longitude),\n mapTypeId: google.maps.MapTypeId.ROADMAP,\n zoomControl: false,\n mapTypeControl: false,\n scaleControl: false,\n panControl: false,\n navigationControl: false,\n streetViewControl: false,\n styles: [{\n \"featureType\": \"poi\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [{\n \"color\": \"#747474\"\n }, {\n \"lightness\": \"23\"\n }]\n }, {\n \"featureType\": \"poi.attraction\",\n \"elementType\": \"geometry.fill\",\n \"stylers\": [{\n \"color\": \"#f38eb0\"\n }]\n }, {\n \"featureType\": \"poi.government\",\n \"elementType\": \"geometry.fill\",\n \"stylers\": [{\n \"color\": \"#ced7db\"\n }]\n }, {\n \"featureType\": \"poi.medical\",\n \"elementType\": \"geometry.fill\",\n \"stylers\": [{\n \"color\": \"#ffa5a8\"\n }]\n }, {\n \"featureType\": \"poi.park\",\n \"elementType\": \"geometry.fill\",\n \"stylers\": [{\n \"color\": \"#c7e5c8\"\n }]\n }, {\n \"featureType\": \"poi.place_of_worship\",\n \"elementType\": \"geometry.fill\",\n \"stylers\": [{\n \"color\": \"#d6cbc7\"\n }]\n }, {\n \"featureType\": \"poi.school\",\n \"elementType\": \"geometry.fill\",\n \"stylers\": [{\n \"color\": \"#c4c9e8\"\n }]\n }, {\n \"featureType\": \"poi.sports_complex\",\n \"elementType\": \"geometry.fill\",\n \"stylers\": [{\n \"color\": \"#b1eaf1\"\n }]\n }, {\n \"featureType\": \"road\",\n \"elementType\": \"geometry\",\n \"stylers\": [{\n \"lightness\": \"100\"\n }]\n }, {\n \"featureType\": \"road\",\n \"elementType\": \"labels\",\n \"stylers\": [{\n \"visibility\": \"off\"\n }, {\n \"lightness\": \"100\"\n }]\n }, {\n \"featureType\": \"road.highway\",\n \"elementType\": \"geometry.fill\",\n \"stylers\": [{\n \"color\": \"#ffd4a5\"\n }]\n }, {\n \"featureType\": \"road.arterial\",\n \"elementType\": \"geometry.fill\",\n \"stylers\": [{\n \"color\": \"#ffe9d2\"\n }]\n }, {\n \"featureType\": \"road.local\",\n \"elementType\": \"all\",\n \"stylers\": [{\n \"visibility\": \"simplified\"\n }]\n }, {\n \"featureType\": \"road.local\",\n \"elementType\": \"geometry.fill\",\n \"stylers\": [{\n \"weight\": \"3.00\"\n }]\n }, {\n \"featureType\": \"road.local\",\n \"elementType\": \"geometry.stroke\",\n \"stylers\": [{\n \"weight\": \"0.30\"\n }]\n }, {\n \"featureType\": \"road.local\",\n \"elementType\": \"labels.text\",\n \"stylers\": [{\n \"visibility\": \"on\"\n }]\n }, {\n \"featureType\": \"road.local\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [{\n \"color\": \"#747474\"\n }, {\n \"lightness\": \"36\"\n }]\n }, {\n \"featureType\": \"road.local\",\n \"elementType\": \"labels.text.stroke\",\n \"stylers\": [{\n \"color\": \"#e9e5dc\"\n }, {\n \"lightness\": \"30\"\n }]\n }, {\n \"featureType\": \"transit.line\",\n \"elementType\": \"geometry\",\n \"stylers\": [{\n \"visibility\": \"on\"\n }, {\n \"lightness\": \"100\"\n }]\n }, {\n \"featureType\": \"water\",\n \"elementType\": \"all\",\n \"stylers\": [{\n \"color\": \"#d2e7f7\"\n }]\n }]\n });\n\n // Load necessary data for markers using PHP (from database) after map is loaded and ready ---------------------\n\n var allMarkers;\n\n // Geo Location ------------------------------------------------------------------------------------------------\n function GetCurrentGpsLocation(callback){\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(function(position){\n var _latitude = position.coords.latitude;\n var _longitude = position.coords.longitude;\n $('#latitude').val(_latitude);\n $('#longitude').val(_longitude);\n mapCenter = new google.maps.LatLng(_latitude, _longitude);\n map.panTo(mapCenter);\n getcityStateOnDrag(_latitude, _longitude);\n $('#map').removeClass('fade-map');\n callback(\"success\");\n });\n\n } else {\n alert(\"Geolocation is not supported by this browser.\");\n }\n }\n\n // Geo Location on button click --------------------------------------------------------------------------------\n $(\".geo-location i\").on(\"click\", function() {\n $('#map').addClass('fade-map');\n $(this).addClass('fa-circle-o-notch fa-spin');\n $(this).removeClass('fa-crosshairs');\n GetCurrentGpsLocation(function (status) {\n $('.geo-location > i').fadeOut('slow');\n });\n });\n\n // Automatic Geo Location\n if( automaticGeoLocation == true ){\n $('#map').addClass('fade-map');\n GetCurrentGpsLocation(function (status) {\n $('.geo-location > i').fadeOut('slow');\n });\n }\n\n // When optimization is enabled, map will load the data in Map Bounds every time when it's moved. Otherwise will load data at once\n\n if( optimizedDatabaseLoading == 1 ){\n google.maps.event.addListener(map, 'idle', function(){\n if( searchClicked != 1 ){\n var ajaxData = {\n optimized_loading: 1,\n north_east_lat: map.getBounds().getNorthEast().lat(),\n north_east_lng: map.getBounds().getNorthEast().lng(),\n south_west_lat: map.getBounds().getSouthWest().lat(),\n south_west_lng: map.getBounds().getSouthWest().lng()\n };\n if( markerCluster != undefined ){\n markerCluster.clearMarkers();\n }\n loadData(ajaxurl+\"?action=getlocHomemap\");\n }\n });\n }\n else {\n google.maps.event.addListenerOnce(map, 'idle', function(){\n loadData(ajaxurl+\"?action=getlocHomemap\");\n });\n }\n\n if( showMarkerLabels == true ){\n $(\".hero-section .map\").addClass(\"show-marker-labels\");\n }\n\n\n var zoomControlDiv = document.createElement('div');\n var zoomControl = new ZoomControl(zoomControlDiv, map);\n\n function ZoomControl(controlDiv, map) {\n zoomControlDiv.index = 1;\n map.controls[google.maps.ControlPosition.RIGHT_CENTER].push(zoomControlDiv);\n controlDiv.style.padding = '5px';\n controlDiv.className = \"zoomControlWrapper\";\n var controlWrapper = document.createElement('div');\n controlDiv.appendChild(controlWrapper);\n var zoomInButton = document.createElement('div');\n zoomInButton.className = \"custom-zoom-in\";\n controlWrapper.appendChild(zoomInButton);\n var zoomOutButton = document.createElement('div');\n zoomOutButton.className = \"custom-zoom-out\";\n controlWrapper.appendChild(zoomOutButton);\n google.maps.event.addDomListener(zoomInButton, 'click', function() {\n map.setZoom(map.getZoom() + 1);\n });\n google.maps.event.addDomListener(zoomOutButton, 'click', function() {\n map.setZoom(map.getZoom() - 1);\n });\n }\n var scrollEnabling = $('#scrollEnabling');\n $(scrollEnabling).click(function(e) {\n e.preventDefault();\n $(this).toggleClass(\"enabled\");\n if ($(this).is(\".enabled\")) {\n map.setOptions({\n 'scrollwheel': true\n });\n } else {\n map.setOptions({\n 'scrollwheel': false\n });\n }\n })\n\n\n // Create and place markers function ---------------------------------------------------------------------------\n\n var i;\n var a;\n var newMarkers = [];\n var resultsArray = [];\n var visibleMarkersId = [];\n var visibleMarkersOnMap = [];\n var markerCluster;\n\n function placeMarkers(markers){\n\n newMarkers = [];\n\n for (i = 0; i < markers.length; i++) {\n\n var marker;\n var markerContent = document.createElement('div');\n var thumbnailImage;\n\n if (markers[i][\"marker_image\"] != undefined) {\n thumbnailImage = markers[i][\"marker_image\"];\n }\n else {\n thumbnailImage = path+\"assets/img/default.png\";\n }\n\n if (markers[i][\"featured\"] == 1) {\n markerContent.innerHTML =\n '<div class=\"marker\" data-id=\"' + markers[i][\"id\"] + '\">' +\n '<div class=\"title\">' + markers[i][\"title\"] + '</div>' +\n '<div class=\"marker-wrapper\">' +\n '<div class=\"pin\">' +\n '<div class=\"image\" style=\"background-image: url(' + thumbnailImage + ');\"></div>' +\n '</div>' +\n '</div>';\n }\n else {\n markerContent.innerHTML =\n '<div class=\"marker\" data-id=\"' + markers[i][\"id\"] + '\">' +\n '<div class=\"title\">' + markers[i][\"title\"] + '</div>' +\n '<div class=\"marker-wrapper\">' +\n '<div class=\"pin\">' +\n '<div class=\"image iconPosition\"><i class=\"' +markers[i][\"cat_icon\"]+'\"></i></div>' +\n '</div>' +\n '</div>' +\n '</div>';\n }\n\n // Latitude, Longitude and Address\n\n if ( markers[i][\"latitude\"] && markers[i][\"longitude\"] && markers[i][\"address\"] ){\n renderRichMarker(i,\"latitudeLongitude\");\n }\n\n // Only Address\n\n else if ( markers[i][\"address\"] && !markers[i][\"latitude\"] && !markers[i][\"longitude\"] ){\n renderRichMarker(i,\"address\");\n }\n\n // Only Latitude and Longitude\n\n else if ( markers[i][\"latitude\"] && markers[i][\"longitude\"] && !markers[i][\"address\"] ) {\n renderRichMarker(i,\"latitudeLongitude\");\n }\n\n // No coordinates\n\n else {\n console.log( \"No location coordinates\");\n }\n }\n\n // Create marker using RichMarker plugin -------------------------------------------------------------------\n\n function renderRichMarker(i,method){\n if( method == \"latitudeLongitude\" ){\n marker = new RichMarker({\n position: new google.maps.LatLng( markers[i][\"latitude\"], markers[i][\"longitude\"] ),\n map: map,\n draggable: false,\n content: markerContent,\n flat: true\n });\n google.maps.event.addListener(marker, 'click', (function(marker, i) {\n return function() {\n if( markerTarget == \"sidebar\"){\n openSidebarDetail( $(this.content.firstChild).attr(\"data-id\") );\n }\n else if( markerTarget == \"gmapAdBox\" ){\n opengmapAdBox( $(this.content.firstChild).attr(\"data-id\"), this, i );\n }\n else if( markerTarget == \"modal\" ){\n openModal($(this.content.firstChild).attr(\"data-id\"), \"modal_item.php\");\n }\n }\n })(marker, i));\n newMarkers.push(marker);\n }\n else if ( method == \"address\" ){\n a = i;\n var geocoder = new google.maps.Geocoder();\n var geoOptions = {\n address: markers[i][\"address\"]\n };\n geocoder.geocode(geoOptions, geocodeCallback(markerContent));\n\n }\n\n if ( mapAutoZoom == 1 ){\n var bounds = new google.maps.LatLngBounds();\n for (var i = 0; i < newMarkers.length; i++ ) {\n bounds.extend(newMarkers[i].getPosition());\n }\n map.fitBounds(bounds);\n }\n\n }\n\n // Ajax loading of gmapAdBox -------------------------------------------------------------------------------------\n\n var lastgmapAdBox;\n\n function opengmapAdBox(id, _this, i){\n $.ajax({\n url: ajaxurl+\"?action=openlocatoionPopup\",\n dataType: \"html\",\n data: { id: id },\n method: \"POST\",\n success: function(results){\n gmapAdBoxOptions = {\n content: results,\n disableAutoPan: false,\n pixelOffset: new google.maps.Size(-135, -50),\n zIndex: null,\n alignBottom: true,\n boxClass: \"gmapAdBox-wrapper\",\n enableEventPropagation: true,\n closeBoxMargin: \"0px 0px -8px 0px\",\n closeBoxURL: path + \"/assets/img/close-btn.png\",\n gmapAdBoxClearance: new google.maps.Size(1, 1)\n };\n\n if( lastgmapAdBox != undefined ){\n lastgmapAdBox.close();\n }\n //console.log(gmapAdBoxOptions);\n newMarkers[i].gmapAdBox = new gmapAdBox(gmapAdBoxOptions);\n newMarkers[i].gmapAdBox.open(map, _this);\n lastgmapAdBox = newMarkers[i].gmapAdBox;\n\n setTimeout(function(){\n //$(\"div#\"+ id +\".item.gmapAdBox\").parent().addClass(\"show\");\n $(\".item.gmapAdBox[data-id=\"+ id +\"]\").parent().addClass(\"show\");\n }, 10);\n\n google.maps.event.addListener(newMarkers[i].gmapAdBox,'closeclick',function(){\n $(lastClickedMarker).removeClass(\"active\");\n });\n },\n error : function () {\n console.log(\"error\");\n }\n });\n }\n\n // Geocoder callback ---------------------------------------------------------------------------------------\n\n function geocodeCallback(markerContent) {\n return function(results, status) {\n if (status == google.maps.GeocoderStatus.OK) {\n marker = new RichMarker({\n position: results[0].geometry.location,\n map: map,\n draggable: false,\n content: markerContent,\n flat: true\n });\n newMarkers.push(marker);\n renderResults();\n if ( mapAutoZoom == 1 ){\n var bounds = new google.maps.LatLngBounds();\n for (var i = 0; i < newMarkers.length; i++ ) {\n bounds.extend(newMarkers[i].getPosition());\n }\n map.fitBounds(bounds);\n }\n google.maps.event.addListener(marker, 'click', (function(marker, i) {\n return function() {\n if( markerTarget == \"sidebar\"){\n openSidebarDetail( $(this.content.firstChild).attr(\"data-id\") );\n }\n else if( markerTarget == \"gmapAdBox\" ){\n opengmapAdBox( $(this.content.firstChild).attr(\"data-id\"), this, 0 );\n }\n else if( markerTarget == \"modal\" ){\n openModal($(this.content.firstChild).attr(\"data-id\"), \"modal_item.php\");\n }\n\n }\n })(marker, i));\n } else {\n console.log(\"Geocode failed \" + status);\n }\n }\n }\n\n function openSidebarDetail(id){\n $.ajax({\n url: ajaxurl+\"?action=sidebar_detail\",\n data: { id: id },\n method: \"POST\",\n success: function(results){\n $(\".sidebar-wrapper\").html(results);\n $(\".results-wrapper\").removeClass(\"loading\");\n initializeOwl();\n ratingPassive(\".sidebar-wrapper .sidebar-content\");\n initializeFitVids();\n socialShare();\n initializeReadMore();\n $(\".sidebar-wrapper .back\").on(\"click\", function(){\n $(\".results-wrapper\").removeClass(\"show-detail\");\n $(lastClickedMarker).removeClass(\"active\");\n });\n $(document).keyup(function(e) {\n switch(e.which) {\n case 27: // ESC\n $(\".sidebar-wrapper .back\").trigger('click');\n break;\n }\n });\n $(\".results-wrapper\").addClass(\"show-detail\");\n },\n error : function (e) {\n console.log(\"error \" + e);\n }\n });\n }\n\n // Highlight result in sidebar on marker hover -------------------------------------------------------------\n\n $(\".marker\").live(\"mouseenter\", function(){\n var id = $(this).attr(\"data-id\");\n $(\".results-wrapper .results-content .result-item[data-id=\"+ id +\"] a\" ).addClass(\"hover-state\");\n }).live(\"mouseleave\", function(){\n var id = $(this).attr(\"data-id\");\n $(\".results-wrapper .results-content .result-item[data-id=\"+ id +\"] a\" ).removeClass(\"hover-state\");\n });\n\n $(\".marker\").live(\"click\", function(){\n var id = $(this).attr(\"data-id\");\n $(lastClickedMarker).removeClass(\"active\");\n $(this).addClass(\"active\");\n lastClickedMarker = $(this);\n });\n\n // Marker clusters -----------------------------------------------------------------------------------------\n\n var clusterStyles = [\n {\n url: path+'assets/img/cluster.png',\n height: 36,\n width: 36\n }\n ];\n\n markerCluster = new MarkerClusterer(map, newMarkers, { styles: clusterStyles, maxZoom: 16, ignoreHidden: true });\n\n // Show results in sidebar after map is moved --------------------------------------------------------------\n\n google.maps.event.addListener(map, 'idle', function() {\n renderResults();\n });\n\n renderResults();\n\n // Results in the sidebar ----------------------------------------------------------------------------------\n\n function renderResults(){\n resultsArray = [];\n visibleMarkersId = [];\n visibleMarkersOnMap = [];\n\n for (var i = 0; i < newMarkers.length; i++) {\n if ( map.getBounds().contains(newMarkers[i].getPosition()) ){\n visibleMarkersOnMap.push(newMarkers[i]);\n visibleMarkersId.push( $(newMarkers[i].content.firstChild).attr(\"data-id\") );\n newMarkers[i].setVisible(true);\n }\n else {\n newMarkers[i].setVisible(false);\n }\n }\n markerCluster.repaint();\n }\n }\n\n\n\n $(\"[data-ajax-response='map']\").on(\"click\", function(e){\n e.preventDefault();\n var dataFile = ajaxurl+\"?action=getlocHomemap\";\n searchClicked = 1;\n if( $(this).attr(\"data-ajax-auto-zoom\") == 1 ){\n mapAutoZoom = 5;\n }\n var form = $(this).closest(\"form\");\n var ajaxData = form.serialize();\n if( markerCluster != undefined ){\n markerCluster.clearMarkers();\n }\n loadData(dataFile, ajaxData);\n });\n\n function loadData(url, ajaxData){\n\n if (typeof ajaxData === \"undefined\") {\n var form = $('#hero-home-map');\n var ajaxData = form.serialize();\n }\n $.ajax({\n url: url,\n dataType: \"json\",\n method: \"GET\",\n data: ajaxData,\n cache: false,\n success: function(results){\n if(results!=0){\n for( var i=0; i <newMarkers.length; i++ ){\n newMarkers[i].setMap(null);\n }\n allMarkers = results;\n placeMarkers(results);\n }\n },\n error : function (e) {\n console.log(e);\n }\n });\n }\n\n // Autocomplete\n\n autoComplete(map);\n\n }\n else {\n //console.log(\"No map element\");\n }\n\n}", "function vdDemo_modifyMaps(){\n\tGLB.vehicle.modifyMap();\n}" ]
[ "0.6100964", "0.6006923", "0.60001475", "0.5823043", "0.56716067", "0.5618831", "0.55897784", "0.5569147", "0.55447567", "0.5544591", "0.5530329", "0.5486036", "0.54831845", "0.548281", "0.548281", "0.54489267", "0.54161245", "0.54161245", "0.541174", "0.5349169", "0.5329154", "0.53122956", "0.53034675", "0.5290376", "0.52860606", "0.52806205", "0.5274332", "0.5274332", "0.5260128", "0.52600765", "0.52559584", "0.5236163", "0.5234019", "0.5211572", "0.52091724", "0.52091724", "0.52091724", "0.51966184", "0.5195341", "0.5193631", "0.51930463", "0.5192972", "0.5173146", "0.5162759", "0.51537853", "0.5152434", "0.5143386", "0.5143386", "0.5143386", "0.5143386", "0.5143386", "0.5143386", "0.5143386", "0.5143386", "0.51413834", "0.513255", "0.51307374", "0.5128325", "0.5127719", "0.51078147", "0.51016605", "0.5095777", "0.5094896", "0.50901127", "0.508084", "0.50731975", "0.5071521", "0.50673777", "0.5052667", "0.50367355", "0.5034183", "0.50274724", "0.50159574", "0.5011448", "0.50066596", "0.50054914", "0.49947566", "0.49943477", "0.49940613", "0.49880677", "0.49865738", "0.49832407", "0.49832407", "0.49832407", "0.49832407", "0.49830335", "0.49768382", "0.49620774", "0.49561837", "0.4954639", "0.49539948", "0.4951629", "0.4951629", "0.4950205", "0.49459133", "0.49456427", "0.4935212", "0.4929204", "0.49261224", "0.4913156", "0.49106553" ]
0.0
-1
Find Match function that accepts a list of job characteristics and a list of individual skills/characteristics and provides a match score between 0 and 100
function findMatch() { let jobCharacteristics = jobs.characteristics[0]; let candidateSkills = candidates.skills[0]; // use substring method to compare strings let result = jobCharacteristics.localeCompare(candidateSkills); document.getElementById("result").innerHTML = result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function jobAwesomenessScore(jobAttrs) {\n /**\n * @param {Object} jobAttrs - Qualities of a job tested for awesomeness\n * @return {number} 0 score for offer without good qualities and +1 for every\n * met quality\n */\n const { paidVacation = 0, hammocksInOffice = false, freeLunch = false } = jobAttrs;\n const minPaidVacation = 30;\n\n let score = 0;\n\n // Calc the score here...\n\n return score;\n}", "function match(known_value, search_term) {\r\n\t// reset a few important variables to zero\r\n\traw_spedis_score = 0; spedis_score = 0; lev_score = 1;\r\n\tsxscore1 = \"\"; sxscore2 = \"\"; sxmatch = 0; matchscore = 0;\r\n\t// check if they exactly match, in which case skip the calculations!\r\n\tif (known_value == search_term) {\r\n\t\t matchscore = 100;\r\n\t} else {\r\n\t\traw_spedis_score = spedis(known_value, search_term);\r\n\t\tspedis_score = (-0.01*raw_spedis_score*raw_spedis_score)-(1.05*raw_spedis_score)+100\r\n\t\tlev_score = levenshtein2(known_value, search_term) * 100;\r\n\t\tsxscore1 = soundex(known_value);\r\n\t\tsxscore2 = soundex(search_term);\r\n\r\n\t\t// combine the raw soundex scores into a matching criteria\r\n\t\t// this system was developed by the author and applies an additive, non-exclusive percentage matching system\r\n\t\tif (sxscore1.charAt(0) == sxscore2.charAt(0)) { sxmatch = sxmatch + 40; };\r\n\t\tif (sxscore1.charAt(1) == sxscore2.charAt(1)) { sxmatch = sxmatch + 25; };\r\n\t\tif (sxscore1.charAt(2) == sxscore2.charAt(2)) { sxmatch = sxmatch + 10; };\r\n\t\tif (sxscore1.charAt(3) == sxscore2.charAt(3)) {\r\n\t\t\tif (sxscore1.length == 4 && sxscore2.length == 4) {\r\n\t\t\t\tif (sxmatch != 0) { sxmatch = sxmatch + 25; };\r\n\t\t\t} else {\r\n\t\t\t\tif (sxmatch != 0) { sxmatch = sxmatch + 10; };\r\n\t\t\t};\r\n\t\t};\r\n\t\tif (Math.min(sxscore1.length,sxscore2.length) > 4) {\r\n\t\t\tfor (n=4;n<=Math.min(sxscore1.length,sxscore2.length)-1;n++) {\r\n\t\t\t\tif (sxscore1.charAt(n) == sxscore2.charAt(n)) { sxmatch = sxmatch + (15/(Math.max(sxscore1.length,sxscore2.length)-4)); };\r\n\t\t\t};\r\n\t\t};\r\n\r\n\t\t// pull all the scores together\r\n\t\t// if they do not meet even a basic criteria, set the match to zero\r\n\t\tif (spedis_score < 20 || lev_score < 45) { matchscore = 0; } else {\r\n\t\t\tmatchscore = (((spedis_score + lev_score)/2) - 10) + (10 * (sxmatch/100));\r\n\t\t};\r\n\t};\r\n\treturn matchscore;\r\n}", "function calculateMatchResult(gameId){\n\n}", "function _calcSkills(ability)\n{\n var numskills = document.getElementById(\"skills\").rows.length - 3;\n for (var i = 1; i <= numskills; i++)\n {\n var num = FormatNumber(i);\n if (String(sheet()[\"Skill\" + num + \"Ab\"].value).toLowerCase() == ability)\n SkillLookUpKeyAb(sheet()[\"Skill\" + num + \"Ab\"]);\n }\n}", "function matchSearch (jiraResults,keyWordsList){\n\n var inSummaryWeight = 80;\n var inDescriptionWeight = 20;\n\n var jiraItemList = jiraResults.issues;\n var matchRateList = [];\n\n jiraItemList.forEach(function(jiraTicket, jiraTicketIndex){\n\n var matchRate = 0;\n var inSummary = 0;\n var inDescription = 0;\n\n keyWordsList.forEach(function(keyword,keyWordIndex){\n\n // Search key words in summary and description\n if(jiraTicket.fields.summary != null)\n inSummary = jiraTicket.fields.summary.split(keyword).length == 1 ? 0 : 1;\n\n if(jiraTicket.fields.description != null)\n inDescription = jiraTicket.fields.description.split(keyword).length == 1 ? 0 : 1;\n\n matchRate = matchRate + inSummary * 80 + inDescription * 20;\n\n });\n\n matchRateList[jiraTicketIndex] = [jiraTicketIndex, matchRate];\n\n });\n // Re-order the rate list according rate by decrease order.\n matchRateList = matchRateList.sort(function(x,y){\n return y[1] - x[1]; // Decrease order\n });\n\n var sortedJiraItemList = [];\n\n // Get top 10 match rate jira tickets\n var j = matchRateList.length > 10 ? 10 : matchRateList.length;\n for (var i =0; i < j; i++) {\n // Get jira iteam list indexes for top 10 match rate\n var jiraIteamListIndex = matchRateList[i][0];\n sortedJiraItemList[i] = jiraItemList[jiraIteamListIndex];\n }\n\n return sortedJiraItemList;\n}", "function valSkillMatch() {\n\tif(document.getElementById(\"Mentor\").checked && document.getElementById(\"Mentee\").checked){\n\t\tvar skillslength = document.getElementById(\"ms-mentorbox\").getElementsByClassName(\"ms-selection\")[0].getElementsByClassName(\"ms-list\")[0].childNodes.length;\n\t\tvar mentorskills = document.getElementById(\"ms-mentorbox\").getElementsByClassName(\"ms-selection\")[0].getElementsByClassName(\"ms-list\")[0].childNodes;\n\t\tvar menteeskills = document.getElementById(\"ms-menteebox\").getElementsByClassName(\"ms-selection\")[0].getElementsByClassName(\"ms-list\")[0].childNodes;\n\t\t\n\t\t//get the nodes of the selected skills in each box\n\t\tvar mentorselected = [], menteeselected = [];\n\t\tfor (var i = 0; i < skillslength; i++) {\n\t\t\tif (mentorskills[i].className == \"ms-elem-selection ms-selected\")\n\t\t\t\tmentorselected.push(i);\n\t\t\tif (menteeskills[i].className == \"ms-elem-selection ms-selected\")\n\t\t\t\tmenteeselected.push(i);\n\t\t}\n\t\tconsole.log(\"mentor\", mentorselected, \"mentee\", menteeselected);\n\t\t\t\t\n\t\t//loop through each and see if there is a match\n\t\tfor(var i = 0; i < mentorselected.length; i++){\n\t\t\tfor (var j = 0; j < menteeselected.length; j++){\n\t\t\t\tconsole.log(\"o, e\", mentorselected[i], menteeselected[j])\n\t\t\t\tif (mentorselected[i] === menteeselected[j]) {\n\t\t\t\t\tconsole.log(\"here\");\n\t\t\t\t\tdocument.getElementById(\"match_error\").style.display = \"block\";\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdocument.getElementById(\"match_error\").style.display = \"none\";\n\t\treturn 0;\n\t}\n\telse {\n\t\tdocument.getElementById(\"match_error\").style.display = \"none\";\n\t\treturn 0;\n\t}\n}", "function findMatch(slicedDNA, lookup) {\n for (let i=0; i<slicedDNA.length;i++) {\n for (let j=0;j<lookup.length;j++) {\n if (slicedDNA[i]==lookup[j].codons) {\n //console.log(lookup[j].abbr, lookup[j].codons);\n matched.push(lookup[j].abbr);\n }\n }\n }\n //console.log(matched);\n return matched;\n}", "function compMemberSkills(member1, member2) {\nfor (var i = 0; i < member1[\"skills\"].length; i++) {\nfor (var j=0; j < member2[\"skills\"].length; j++) {\nif (member1[\"skills\"][i] == member2[\"skills\"][j]) {\nreturn true;\n}\n}\n}\nreturn false;\n}", "function matchOpinions(){\n //Er word door de subjects en de partijen geloopd\n subjects.forEach(subject => {\n parties.forEach(function(party, partyIndex){\n //Daarna word er gekeen of de mening van de partijen overeenkomt met jou mening\n if(subject.myOpinion == subject.parties[partyIndex].position){\n var scoreParty = parties.find(party => party.name == subject.parties[partyIndex].name);\n //Er word gekeken of de vraag belangrijk is en daarna worden de punten opgeteld \n if(subject.weight == false){\n scoreParty.points += 1;\n }else{\n scoreParty.points += 2;\n }\n }\n })\n })\n showSelectPartiePage();\n}", "function jobFit(candidate, job){\n if (candidate.minSalary < (job.maxSalary) * 0.90){\n var candidateFit = document.getElementById('challenge-5');\n candidateFit.innerHTML += \"<h1>Is \" + candidate.name + \" a match? True!</h1>\";\n } else {\n var candidateFit = document.getElementById('challenge-5');\n candidateFit.innerHTML += \"<h1>Is \" + candidate.name + \" a match? False!</h1>\";\n }\n}", "function calculateScore(match) {\n let score = 0;\n // cross line\n if (match[\"Start\"][\"Cross Line\"] == \"1\") {\n score += 3;\n } else if (match[\"Start\"][\"Cross Line\"] == \"2\") {\n score += 6;\n }\n let climb_score = 0;\n // platform\n if (match[\"Endgame\"][\"Platform\"] == \"level 1\") {\n climb_score += 3;\n } else if (match[\"Endgame\"][\"Platform\"] == \"level 2\") {\n climb_score += 6;\n } else if (match[\"Endgame\"][\"Platform\"] == \"level 3\") {\n climb_score += 12;\n }\n if (match[\"Endgame\"][\"Assistance\"] == \"received\") {\n climb_score = 0;\n } else if (match[\"Endgame\"][\"Assistance\"] == \"gave 1\") {\n climb_score *= 2;\n } else if (match[\"Endgame\"][\"Assistance\"] == \"gave 2\") {\n climb_score *= 3;\n }\n score += climb_score;\n // hatch\n let hatch_vals = [\"Hatch Ship\", \"Hatch Low\", \"Hatch Mid\", \"Hatch High\"];\n for (let i in hatch_vals) {\n score += (parseInt(match[\"Teleop\"][hatch_vals[i]]) * 2);\n\n }\n // cargo\n let cargo_vals = [\"Cargo Ship\", \"Cargo Low\", \"Cargo Mid\", \"Cargo High\"];\n for (let i in cargo_vals) {\n score += (parseInt(match[\"Teleop\"][cargo_vals[i]]) * 3);\n }\n return score;\n}", "function findMatch() {\n\n var sums = [];\n var values = 0;\n var calcResult = calc(scores);\n\n function getSum(total, num) {\n return total + num;\n }\n\n for (var i = 0; i < calc(scores).length; i++) {\n\n values = (calcResult[i].reduce(getSum));\n sums.push(values);\n }\n\n return sums;\n }", "searchMatch() {\n const englishCounselor = this.counselorsQueue\n .getCollection()\n .findIndex((counselor) => counselor.language.indexOf(Language_1.Language.English));\n const englishPatient = this.patientsQueue\n .getCollection()\n .findIndex((patient) => patient.language.indexOf(Language_1.Language.English));\n /* Match found for english speakers */\n if (englishCounselor >= 0 && englishPatient >= 0) {\n const counselor = this.counselorsQueue.dequeue(englishCounselor);\n const patient = this.patientsQueue.dequeue(englishPatient);\n return [counselor, patient];\n }\n const counselorSpanish = this.counselorsQueue\n .getCollection()\n .findIndex((counselor) => counselor.language.indexOf(Language_1.Language.Spanish));\n const patientSpanish = this.patientsQueue\n .getCollection()\n .findIndex((patient) => patient.language.indexOf(Language_1.Language.Spanish));\n /* Match found for spanish speakers */\n if (counselorSpanish >= 0 && patientSpanish >= 0) {\n const counselor = this.counselorsQueue.dequeue(counselorSpanish);\n const patient = this.patientsQueue.dequeue(patientSpanish);\n return [counselor, patient];\n }\n return null;\n }", "async function getMatchedSkills(owner, repo, user, issueId ) {\n\tvar numMatchedSkills = 0\n\t\n\t// get user skills\n\tconst userSkills = await storage_lib.getUserSkills(user)\n\n\t// get skills required for issue\n\tissue = await lib.getIssue(owner, repo, issueId)\n\tif( issue.body && issue.body.toLowerCase().includes('skills:') ) {\n\t\tvar issueBody = issue.body.toLowerCase();\n\n\t\t// use the last occurence of 'skills:' for the skill list\n\t\tvar issueSkillsStr = issueBody.substring(issueBody.lastIndexOf('skills:'));\n\t\tissueSkillsStr = issueSkillsStr.split('skills:')[1];\n\t\tvar issueSkills = issueSkillsStr.split(\",\").map(item => item.trim());\n\n\t\t// do pairwise matching for issue and user skills\n\t\tfor ( userSkill in userSkills ) {\n\t\t\tfor ( issueSkill in issueSkills) {\n\t\t\t\tif ( issueSkills[issueSkill] === userSkills[userSkill] ) {\n\t\t\t\t\tnumMatchedSkills += 1\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn numMatchedSkills\n}", "function Match(win, length, champion, runes, items, kda, totalCreep, creepPerMin) {\n\t\tthis.win = win\n\t\tthis.length = length\n\t\tthis.champion = champion\n\t\tthis.runes = runes\n\t\tthis.itmes = items\n\t\tthis.kda = kda\n\t\tthis.totalCreep = totalCreep\n\t\tthis.creepPerMin = creepPerMin\n\t}", "foundationMatch(card) {\n let c = this.foundations.length;\n for (let i=0; i<c; i++) {\n if (this.fitsFoundation(card, i+1)) return i+1;\n }\n return 0;\n }", "function matchCompare(matchRequirement, ingredients, availableIngredients) {\n var matches;\n var matchPercent = 100 * (matches / ingredients.length());\n \n for (var i = 0; i < ingredients.length(); i++) {\n for (var j = 0; j < availableIngredients.length(); j++) {\n if (ingredients[i] == availableIngredients[j]) {\n matches++;\n }\n }\n }\n \n if (matchPercent < matchRequirement) {\n return false;\n }\n \n return true;\n}", "_compareWords(words, personToCompare){\n\n var peopleWithAffinity = []\n var peopleWithAffinityPercentages = []\n var personToCompareWords = 0\n\n words.map(w => {\n\n if(w.hasOwnProperty([personToCompare])){\n\n personToCompareWords++\n\n // remove unnecessary (for now) properties\n delete w.word \n delete w.total_count\n \n for (let [person, occurrences] of Object.entries(w)){\n\n if(person != personToCompare){\n\n // if the words occurrences from this person are closer to the word occurrences to the person \n // that it is comparing to than to zero it will add an \"affinity\" counter\n var personToCompareWordOcurrences = w[personToCompare]\n var differenceToCompared = Math.abs(occurrences - personToCompareWordOcurrences)\n\n if(differenceToCompared < occurrences){\n\n var personIndex = peopleWithAffinity.findIndex(item => item.person == person)\n\n if(personIndex == -1){\n peopleWithAffinity.push({person: person, occurrences: 1})\n } else {\n peopleWithAffinity[personIndex].occurrences++\n }\n\n }\n\n }\n\n }\n\n }\n\n })\n\n // calculate the affinity percentage based on the counters each person has\n peopleWithAffinity.map(p => {\n\n var affinity = p.occurrences * 100 / personToCompareWords\n\n peopleWithAffinityPercentages.push({person: p.person, affinity: affinity + '%'})\n\n })\n\n return peopleWithAffinityPercentages;\n\n }", "function match(a, b) {\n score = 0;\n // console.log(a.length, b.length);\n for (i = 0; i < 32; i++) {\n for (j = 0; j < 30; j++) {\n if (a[i][j] === b[i][j]) {\n score = score + 1;\n }\n }\n }\n return score;\n}", "function scoreSolution(solution) {\n\n}", "function matchItem(item, nutrition) {\n // first, compute similarity based on primary name\n let bestIndices = [];\n let bestScore = 0;\n for (let i = 0; i < nutrition.length; i++) {\n let name = nutrition[i]['name'];\n let primaryName = name;\n if (name.indexOf(',') >= 0) {\n primaryName = name.substring(0, name.indexOf(','));\n }\n let similarity = stringSimilarity.compareTwoStrings(item, primaryName);\n if (Math.abs(similarity - bestScore) < 0.001) {\n bestIndices.push(i);\n } else if (similarity > bestScore) {\n bestIndices = [i];\n bestScore = similarity;\n }\n }\n\n // next, resolve any ties (if any) using the rest of the name\n let actualBestIndex = bestIndices[0];\n let bestSecondaryScore = 0;\n if (bestIndices.length > 1) {\n for (let i of bestIndices) {\n let name = nutrition[i]['name'];\n let secondaryName = '';\n if (name.indexOf(',') >= 0) {\n secondaryName = name.substring(name.indexOf(',') + 1);\n }\n let similarity = stringSimilarity.compareTwoStrings(item, secondaryName);\n if (Math.abs(similarity - bestSecondaryScore) < 0.001) {\n // it's tied w/ the best; don't do anything\n } else if (similarity > bestSecondaryScore) {\n actualBestIndex = i;\n bestSecondaryScore = similarity;\n }\n }\n }\n if (bestScore < 0.45) {\n num_bad++;\n } else {\n num_good++;\n }\n return nutrition[actualBestIndex]['id'];\n}", "function checkForMatches(array, input1, input2, input3) {\n var searchResults = [];\n for (var i = 0; i < array.length; i++) {\n var gameItem = array[i];\n if (gameItem.minPlayers <= input1 && gameItem.maxPlayers >=\n input1) {\n if (gameItem.minAge <= input2) {\n if (gameItem.time === input3) {\n searchResults.push(gameItem);\n }\n }\n }\n }\n if (searchResults[0] != null) {\n containerGameSearchResults.textContent = '';\n } else {\n ohNo.play();\n containerGameSearchResults.textContent = '';\n containerGameSearchResults.innerHTML =\n '<p class=\"sad-mongo\">Your search has not returned any results.</p>';\n // buffers automatically when created\n // **will play a sound on no result found**\n }\n return searchResults;\n}", "function show_best_match(){\n var scores = [];\n MongoClient.connect(url, function(err, db) {\n\t var dbo = db.db(\"we-eat\");\n\t var cur_profile = dbo.collection(\"profiles\").find();\n\t cur_profile.each(function(err, item) {\n\t\tif(item == null) {\n\t\t\tdb.close();\n\t\t\treturn false;\n\t\t}\n\t\tvar dist = calc_distance(latitude, longitude, cur_profile.latitude, cur_profile.longitude);\n\t\tvar cur_profile_prefs = cur_profile.Prefs.split(',');\n\t\tvar matching = matching_strings(prefs,cur_profile_prefs);//number of matching prefs\n\t\t\n\t\tif(dist <= 1609.34*distance && dist <= 1609.34*cur_profile.distance) {\n\t\t\tscores.push([matching, exportJSON(cur_profile.Name)]);\n\t\t}\n\t\t\n\t\t/*var formatted_url = 'https://api.yelp.com/v3/businesses/search?latitude=' + String(latitude) + '&longitude=' + String(longitude) + '&radius=' + String(distance*1609) + '&categories=' + matching.toString();\n\t\tget_nearby_restaurants(formatted_url);*/\n\t });\n\t});\n scores.sort(sortFunction).reverse();\nfor(var k = 0; k < scores.length; k++){\n\tnewProfile(JSON.parse(scores[k][1]));\n\twhile(!clicked){}\n\tclicked = false;\n}\n}", "function score(sequence1, sequence2, scoringMatrix)\r\n{\r\n\tvar score = 0;\r\n\tvar nucleotideIndex1; //indeks w macierzy podobienstwa nukleotydu z pierwszej sekwencji\r\n\tvar nucleotideIndex2; //indeks w macierzy podobienstwa nukleotydu z drugiej sekwencji\r\n\tfor(i = 0; i < sequence1.length; i++)\r\n\t{\r\n\t\tnucleotideIndex1 = getNucletideIndex(sequence1[i]);\r\n\t\tnucleotideIndex2 = getNucletideIndex(sequence2[i]);\r\n\t\tscore = score + parseInt(scoringMatrix[nucleotideIndex1][nucleotideIndex2]);\r\n\t}\r\n\treturn score;\r\n}", "function buildSkillJsonSearchQuery(inputSkills) {\r\n let arr = [];\r\n let splittedSkills = [];\r\n splittedSkills = inputSkills.split(\",\");\r\n for (let j in splittedSkills) {\r\n let skillJson = {};\r\n let matchJson = {};\r\n skillJson['skillSet.skill'] = splittedSkills[j].trim();\r\n matchJson.match = skillJson;\r\n arr.push(matchJson);\r\n }\r\n return (arr);\r\n}", "function determineWinner(matches) {\n // loop through each map\n for (let i=0; i<matches.length; i++) {\n // find each player and return points\n let playerOneStrength= locateStrength(matches[i].playerOne)/totalGames;\n let playerTwoStrength= locateStrength(matches[i].playerTwo)/totalGames;\n let relativeStrengthDifferential = (playerOneStrength - playerTwoStrength)/2;\n let playerOneResult = (Math.random()*100);\n // give win to winner of game\n if (playerOneResult + relativeStrengthDifferential >= 50) {\n locateAndAdd(matches[i].playerOne) //\n } else \n locateAndAdd(matches[i].playerTwo)\n }\n}", "function matchApplicants(applicants){\n\t/*pseudo:\n\tfor loop:run through each applicant\n\t\tcompare dev rank to des rank,\n\t\tadd appropriate job attribute to applicant\n\t*/\n\tfor(var i = 0;i < applicants.length;i++){\n\t\tif(applicants[i].devRank > applicants[i].desRank){\n\t\t\tapplicants[i].teamName = \"Dev Team\";\n\t\t}\n\t\telse if(applicants[i].devRank <= applicants[i].desRank){\n\t\t\tapplicants[i].teamName = \"Creative Team\"\n\t\t}\n\t}\n}", "function MatchRequirements(prereq, result, callback){\n\tvar finalResult = [];\n\tvar indexMeetsSearch = true;\n\n\t//iterate through db results\n\tfor(var i = 0; i < result.length; i++){\n\t\t//just a note, this assumes that every entry has an array, even a blank one, for stat_req\n\n\t\tif(result[i].prereq != null && result[i].prereq.stat_req[0] != null){\n\t\t\tconsole.log(\"Prereq exists\");\n\t\t\tvar stat_req = result[i].prereq.stat_req;\n\t\t\tindexMeetsSearch = true;\n\t\t\tvar j = 0;\n\n\t\t\tconsole.log(`searching req: ${result[i].name}`);\n\n\t\t\twhile(indexMeetsSearch && j < stat_req.length) {\n\t\t\t\tvar stat_type = stat_req[j].stat_type.toUpperCase();\n\t\t\t\tvar stat_limit = Enumerate(stat_req[j].stat_limit);\n\t\t\t\tvar isMin = stat_req[j].is_limit_min;\n\n\t\t\t\t//only compare STR to STR, not STR to CHA\n\t\t\t\tif(prereq.type == stat_type){\n\t\t\t\t\t//check if the limit applies\n\t\t\t\t\tvar meetsThisReq = (isMin) ? (stat_limit <= (Enumerate(prereq.limit))) : (stat_limit >= (Enumerate(prereq.limit)));\n\t\t\t\t\tif(!meetsThisReq)\n\t\t\t\t\t\tindexMeetsSearch = false;\n\t\t\t\t\telse\n\t\t\t\t\t\tj++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tj++\n\t\t\t}// end while\n\n\t\t\tif(indexMeetsSearch){\n\t\t\t\tconsole.log(` > ${result[i].name} pushed to final`);\n\t\t\t\tfinalResult.push(result[i]);\n\t\t\t}\n\t\t\telse\n\t\t\t\tconsole.log(` > ${result[i].name} did not qualify.`);\n\t\t}//end if(result[i].stat_req exists)\n\n\n\t}//end for\n\t\n\tcallback(finalResult);\n\tconsole.log(\"sorted result from prereq given.\");\n\n}", "function bonusScore () {\n // Currently, we have two kinds of bonus: Match and Phrase\n var bonus = 0;\n\n // TODO: Yeah, I know we can fail faster here, but it's 3 in the morning\n var firstWord = formWord(state.words[0]);\n var secondWord = formWord(state.words[1]);\n\n // Check for a Match Bonus, where both words are the same\n if (firstWord.toUpperCase() === secondWord.toUpperCase()) {\n bonus += 2 * getWordValue(state.words[0].toUpperCase());\n }\n\n // Check for a Phrase Bonus\n var phrase = firstWord.toLowerCase() + \" \" + secondWord.toLowerCase();\n if (bonusPhrases[phrase]) {\n bonus += config.phraseBonus;\n }\n console.log(\"The phrase bonus result is: \" + bonus);\n return bonus;\n}", "function C007_LunchBreak_Natalie_TestMatch() {\r\n C007_LunchBreak_Natalie_CurrentStage = -1; // No mode\r\n if ((C007_LunchBreak_Natalie_MatchCount >= 2) && ActorHasInventory(\"Rope\")) C007_LunchBreak_Natalie_CurrentStage = 400; // Dom mode\r\n if ((C007_LunchBreak_Natalie_MatchCount >= 2) && !ActorHasInventory(\"Rope\")) C007_LunchBreak_Natalie_CurrentStage = 500; // Sub mode\r\n if ((C007_LunchBreak_Natalie_MatchCount <= 1) && ActorHasInventory(\"Rope\")) C007_LunchBreak_Natalie_CurrentStage = 300; // Dom mode\r\n if ((C007_LunchBreak_Natalie_MatchCount <= 1) && !ActorHasInventory(\"Rope\")) C007_LunchBreak_Natalie_CurrentStage = 320; // Sub mode\r\n else ActorChangeAttitude(-1, 0);\r\n}", "function manOptMatching(people) {\n let lists = getListsBySex(people);\n let prefs = prefMatrixBySex(lists);\n let scores = scoreMatrixBySex(prefs);\n return manOptMatchingAux(prefs.M, scores.W);\n}", "function search(para1, para2)\n{\n\tif((typeof para2) == \"string\")\n\t{\n\t\tfor(var i = 0;i < para1.length;i++)\n\t\t{\n\t\t\tif(para2 == para1[i].name)\n\t\t\t\treturn para1[i];\n\t\t}\n\t\treturn false;\n\t}\n\telse if((typeof para2) == \"number\")\n\t{\n\t\tvar result = new Array();\n\t\tvar id = 0;\n\t\tfor(var i = 0;i < para1.length;i++)\n\t\t{\n\t\t\tif(para1[i].age == para2)\n\t\t\t{\n\t\t\t\tresult[id] = para1[i];\n\t\t\t\tid++;\n\t\t\t}\n\t\t}\n\t\tif(id == 0)\n\t\t\treturn flase;\n\t\telse \n\t\t\treturn result;\n\t}\n\telse\n\t{\n\t\tvar result = new Array();\n\t\tif(para2.name != undefined)\n\t\t{\n\t\t\tvar id = 0;\n\t\t\tfor(var i = 0;i < para1.length;i++)\n\t\t\t{\n\t\t\t\tif(para1[i].name == para2.name)\n\t\t\t\t{\n\t\t\t\t\tif(para2.age != undefined)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(para1[i].age == para2.age)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(para2.hometown != undefined)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(para1[i].hometown == para2.hometown)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tresult[id] = para1[i];\n\t\t\t\t\t\t\t\t\tid++;\n\t\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\telse if(para2.hometown != undefined)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(para1[i].hometown == para2.hometown)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tresult[id] = para1[i];\n\t\t\t\t\t\t\tid++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tresult[id] = para1[i];\n\t\t\t\t\t\tid++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(id == 0)\n\t\t\t\treturn false;\n\t\t\telse\n\t\t\t\treturn result;\n\t\t}\n\t\telse if(para2.age != undefined)\n\t\t{\n\t\t\tvar id = 0;\n\t\t\tfor(var i = 0;i < para1.length;i++)\n\t\t\t{\n\t\t\t\tif(para1[i].age == para2.age)\n\t\t\t\t{\n\t\t\t\t\tif(para2.hometown != undefined)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(para1[i].hometown == para2.hometown)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tresult[id] = para1[i];\n\t\t\t\t\t\t\tid++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tresult[id] = para1[i];\n\t\t\t\t\t\tid++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(id == 0)\n\t\t\t\treturn false;\n\t\t\telse\n\t\t\t\treturn result;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvar id = 0;\n\t\t\tfor(var i = 0;i < para1.length;i++)\n\t\t\t{\n\t\t\t\tif(para1[i].hometown == para2.hometown)\n\t\t\t\t{\n\t\t\t\t\tresult[id] = para1[i];\n\t\t\t\t\tid++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(id == 0)\n\t\t\t\treturn false;\n\t\t\telse\n\t\t\t\treturn result;\n\t\t}\n\t}\n}", "function findMatch(candidate) {\n return new Promise(function(success, failure) {\n $.ajax({\n url: \"/api/friends\",\n method: 'GET',\n }).then(function(err, res) {\n console.log(res);\n var potList = res; //list of friends\n\n var differences = [];\n\n var evalFriends = function() {\n for (var i = 0; i < potList.length; i++) { // evaluate each friend in the list of friends\n var potScores = potList[i].score;\n\n var totalDifference = []; // the totalDifference for that friend\n\n var evalScores = function() {\n for (var x = 0, m = 0; x < potScores.length, m < candidate.score.length; x++, m++) {\n if (potScores[x] !== candidate.score[m]) {\n // if the answer to the question isn't the same\n totalDifference += Math.abs(potScores[x] - candidate.score[m])\n // push the absolutel value of the difference to the totalDifference variable\n } // if statement\n } // for look score.length\n }; // var evalScores\n\n evalScores(); //call the function\n $.when(evalScores).done(function() { // when evalScores is done, do this\n differences.push(totalDifference); // push the totalDifference to an array that stores all friends' differences\n })\n } //for loop potentials.length\n } // evalFriends function\n\n evalFriends();\n $.when(evalFriends).done(function() {\n var index = index(Math.min.apply(Math, differences)); // find the index of the minimum value in var differences\n // the index of the minimum value should correspond to the index of the closest matched friend in the friendlist\n var match = potList.eq(index);\n console.log(match);\n }); // when done of evalFriends function\n\n }); //ajax then function\n })\n }", "function searchByTraits(people){\n let chosenTraits = promptTraits(\"Please choose the traits for which you would like to search, leaving one space between each trait. For example: gender height weight eyecolor occupation\");//Prompt to choose which traits to search for\n let chosenTraitsArr = chosenTraits.split(\" \");//Turn resulting string to array\n let traitValuesArr = [];\n\n for (let i = 0; i < chosenTraitsArr.length; i++) { //Iterate though the array to determine which traits were chosen\n if (chosenTraitsArr[i].toLowerCase() === \"gender\") {\n traitValuesArr.push(promptGender(\"Gender Search:\" + \"\\n\" + \"Please enter either male or female.\").toLowerCase());\n // genderValue = prompt(\"Gender Search:\" + \"\\n\" + \"Please enter either male or female.\").toLowerCase();\n }\n else if (chosenTraitsArr[i] === \"height\") {\n traitValuesArr.push(parseInt(promptHeightWeight(\"Height Search:\" + \"\\n\" + \"Please enter an integer for height in inches without any punctuation.\")));\n // heightValue = prompt(\"Height Search:\" + \"\\n\" + \"Please enter an integer for height in inches without any punctuation.\");\n }\n else if (chosenTraitsArr[i] === \"weight\") {\n traitValuesArr.push(parseInt(promptHeightWeight(\"Weight Search:\" + \"\\n\" + \"Please enter an integer for weight in pounds without any punctuation.\")));\n // weightValue = prompt(\"Weight Search:\" + \"\\n\" + \"Please enter an integer for weight in pounds without any punctuation.\");\n }\n else if (chosenTraitsArr[i].toLowerCase() === \"eyecolor\") {\n traitValuesArr.push(promptFor(\"Eye Color Search:\" + \"\\n\" + \"Please enter a color.\").toLowerCase());\n // eyeColorValue = prompt(\"Eye Color Search:\" + \"\\n\" + \"Please enter a color.\").toLowerCase();\n }\n else if (chosenTraitsArr[i].toLowerCase() === \"occupation\") {\n traitValuesArr.push(promptFor(\"Occupation Search:\" + \"\\n\" + \"Please enter an occupation.\").toLowerCase());\n // occupationValue = prompt(\"Occupation Search:\" + \"\\n\" + \"Please enter an occupation.\").toLowerCase();\n }\n }\n\n let searchResults = [];\n let gender = [];\n for (let i = 0; i < chosenTraitsArr.length; i++){\n if (chosenTraitsArr[i] === \"gender\") {\n gender = people.filter(function(list) {\n if (list.gender === traitValuesArr[i]) {\n return true;\n }\n else {\n return false;\n }\n })\n }\n }\n let height = [];\n for (let i = 0; i < chosenTraitsArr.length; i++){\n if (chosenTraitsArr[i] === \"height\") {\n height = people.filter(function(list) {\n if (list.height === traitValuesArr[i]) {\n return true;\n }\n else {\n return false;\n }\n })\n }\n }\n let weight = [];\n for (let i = 0; i < chosenTraitsArr.length; i++){\n if (chosenTraitsArr[i] === \"weight\") {\n weight = people.filter(function(list) {\n if (list.weight === traitValuesArr[i]) {\n return true;\n }\n else {\n return false;\n }\n })\n }\n }\n let eyecolor = [];\n for (let i = 0; i < chosenTraitsArr.length; i++){\n if (chosenTraitsArr[i] === \"eyecolor\") {\n eyecolor = people.filter(function(list) {\n if (list.eyeColor === traitValuesArr[i]) {\n return true;\n }\n else {\n return false;\n }\n })\n }\n }\n let occupation = [];\n for (let i = 0; i < chosenTraitsArr.length; i++){\n if (chosenTraitsArr[i] === \"occupation\") {\n occupation = people.filter(function(list) {\n if (list.occupation === traitValuesArr[i]) {\n return true;\n }\n else {\n return false;\n }\n })\n }\n }\n\n if (gender.length > 0) {\n for (let i = 0; i < gender.length; i++)\n searchResults.push(gender[i].firstName + \" \" + gender[i].lastName )\n }\n if (height.length > 0) {\n for (let i = 0; i < height.length; i++)\n searchResults.push(height[i].firstName + \" \" + height[i].lastName )\n }\n if (weight.length > 0) {\n for (let i = 0; i < weight.length; i++)\n searchResults.push(weight[i].firstName + \" \" + weight[i].lastName )\n }\n if (eyecolor.length > 0) {\n for (let i = 0; i < eyecolor.length; i++)\n searchResults.push(eyecolor[i].firstName + \" \" + eyecolor[i].lastName )\n }\n if (occupation.length > 0) {\n for (let i = 0; i < occupation.length; i++)\n searchResults.push(occupation[i].firstName + \" \" + occupation[i].lastName )\n }\n\n function findRepeats(arra1) {\n var object = {};\n var result = [];\n\n arra1.forEach(function (item) {\n if(!object[item])\n object[item] = 0;\n object[item] += 1;\n })\n\n for (var prop in object) {\n if(object[prop] >= chosenTraitsArr.length) {\n result.push(prop);\n }\n }\n if (result.length >= 1) {\n let verticalList = \"\";\n if (result.length >= 1) { //Displays all the results in a vertical list with a new person for each row to make it easier for the user to read\n for (let i = 0; i < result.length; i++) {\n verticalList += result[i] + \"\\n\";\n }\n }\n else {\n verticalList = \"Sorry. No one was found that meets that criteria.\"\n }\n return verticalList;\n }\n }\n\n alert(\"The following people met your search criteria: \" + \"\\n\" + findRepeats(searchResults));\n return app(people);\n\n}", "async function matchCollector() {\n // retrieve all active challenges\n console.log('**** Match Collector ****');\n let challengeCount = await codbets_reader.challengeCount();\n challengeCount = ethers.BigNumber.from(challengeCount).toNumber();\n console.log(`Current challenge count is ${challengeCount}`);\n\n if (challengeCount == 0) return;\n // Loop through all existing challenge Ids\n for (let challengeId = 1; challengeId <= challengeCount; challengeId++) {\n // - retrieve the challenge struct\n challenge = await codbets_reader.challenges(challengeId);\n\n if (challenge.settled) continue;\n if (!challenge.accepted) continue;\n\n // - call matchFinder()\n const matchId = await matchFinder(challenge.gamertag1, challenge.gamertag2);\n // - with return matchId, call fetchWinner(matchId, gamertag1, gamertag2, challengeId)\n if (matchId) {\n console.log(`Match Id ${matchId} found for Challenge id ${challengeId}`);\n await codbets_writer.fetchWinner(\n matchId,\n challenge.gamertag1,\n challenge.gamertag2,\n challengeId\n );\n } else {\n console.log(`No matches found for Challenge id ${challengeId}`);\n }\n }\n //\n}", "function calculateMatch(newFriend) {\n var matches = [];\n for (i = 0; i < friendData.length; i++) {\n matches.push(\n {\n name: friendData[i].name,\n score: compareScores(newFriend.scores, friendData[i].scores),\n photo: friendData[i].photo,\n }\n );\n }\n\n // Look at score attribute and sort\n matches.sort(function (a, b) {\n return (a.score - b.score)\n });\n\n // Return the closest match\n return matches[0];\n}", "function fuzzyBookSearch(input, inputList = fakeBooks){\n\tconst outputList = [];\n\t//name search, similarity limit is .75\n\tfor(let index = 0; index<inputList.length; index++){\n\t\tif(stringCompByLevenshteinDistance(input,inputList[index].getBookTitle()) > 0.75){\n\t\t\toutputList.push(inputList[index])\n\t\t\tconsole.log('Book found by title, similarity is '+stringCompByLevenshteinDistance(input,inputList[index].getBookTitle()))\n\t\t}\n\t}\n\t//author search, similarity limit is .8\n\tfor(let index = 0; index<inputList.length; index++){\n\t\tif(stringCompByLevenshteinDistance(input,inputList[index].getAuthor()) > 0.8){\n\t\t\toutputList.push(inputList[index])\n\t\t\tconsole.log('Book found by author, similarity is '+stringCompByLevenshteinDistance(input,inputList[index].getAuthor()))\n\t\t}\n\t}\n\t\n\t//genre search, similarity limit is 1\n\tfor(let index = 0; index<inputList.length; index++){\n\t\tif(stringCompByLevenshteinDistance(input,inputList[index].getGenre()) == 1){\n\t\t\toutputList.push(inputList[index])\n\t\t\tconsole.log('Book found by genre, similarity is '+stringCompByLevenshteinDistance(input,inputList[index].getGenre()))\n\t\t}\n\t}\n\treturn outputList\n}", "function MatchUsersOfInterest(){\n //First loop checks length \n for (let i = 0; i < ArrayofUsers.length; i++) {\n //nest we assign the index of our usseraray of user \n const user = ArrayofUsers[i];\n //we iterate over users that comes after user\n for (let j = i+1; j < ArrayofUsers.length; j++) {\n const user1 = ArrayofUsers[j];\n //if both have same interests, they are a match\n if (user.interest == user1.interest) {\n //we return the firstname of the matches \n return `${user.firstName} is matched with ${user1.firstName}`;\n }\n }\n }\n }", "function best_matches() {\n var matched_counter = identicalCards(computerStack.cards);\n var num_sets = Object.keys(matched_counter).length;\n\n myarray = _.pairs(matched_counter);\n\n function Comparator(a, b) {\n if (a[1] < b[1]) return 1;\n if (a[1] > b[1]) return -1;\n return 0;\n }\n myarray = myarray.sort(Comparator);\n keys_array = new Array();\n values_array = new Array();\n for (i = 0; i < myarray.length; i++) {\n if (myarray[i][0] != '\"W\"') { // no wilds\n trimmed_string = myarray[i][0].replace(/\"/g, \"\");\n keys_array.push(trimmed_string);\n values_array.push(myarray[i][1]);\n }\n // now count the wilds\n else {\n var num_wilds = myarray[i][1];\n }\n }\n\n var best_nums = new Array();\n var num_with_largest_matches = keys_array[0];\n var num_with_next_largest_matches = keys_array[1];\n\n // Now we evaluate to see if we have a phase with just our cards! Two sets of 3.\n if (values_array[0] > 2 && values_array[1] > 2) {\n console.log(\"Computer has a phase!\");\n best_nums.push(\"True\");\n best_nums.push(num_with_largest_matches); // We know we can make a phase with this\n best_nums.push(num_with_next_largest_matches);\n }\n\n // Now we evaluate to see if we have a phase if we use our wilds.\n // This particular if statement checks to see if the highest match amount is 3 or more\n // And that there's 1 card that matches it, with another card that has 2 or more\n else if (num_wilds > 0) {\n\n if (values_array[0] + values_array[1] + num_wilds > 5) {\n console.log(\"We have a phase with a wild!\");\n best_nums.push(\"Wilds\");\n best_nums.push(\"W\");\n best_nums.push(num_with_largest_matches);\n best_nums.push(num_with_next_largest_matches);\n\n\n } else {\n console.log(\"There were wilds but no matches.\")\n best_nums.push(\"False\");\n best_nums.push(num_with_largest_matches);\n best_nums.push(num_with_next_largest_matches);\n }\n\n } else {\n console.log(\"No matches.\");\n best_nums.push(\"False\");\n best_nums.push(num_with_largest_matches);\n best_nums.push(num_with_next_largest_matches);\n }\n return best_nums;\n }", "function getJob (jobid) {\n var jobs;\n if (jobid < 4000) {\n jobs = [\"novice\", \"swordman\", \"magician\", \"archer\", \"acolyte\", \"merchant\", \"thief\", \"knight\", \"priest\", \"wizard\", \"blacksmith\", \"hunter\", \"assassin\", \"knight\"\n , \"crusader\", \"monk\", \"sage\", \"rogue\", \"alchemist\", \"bard\", \"dancer\", \"crusader\", \"wedding\", \"super novice\", \"gunslinger\", \"ninja\"];\n return jobs[jobid];\n } else {\n jobs = [\"novice high\", \"magician high\", \"archer high\", \"archer high\", \"acolyte high\", \"merchant high\", \"thief high\", \"lord knight\", \"high priest\", \"high wizard\", \"whitesmith\", \"sniper\", \"assassin cross\", \"lord knight\", \"paladin\", \"champion\", \"professor\", \"stalker\", \"creator\", \"clown\", \"gypsy\", \"paladin\", \"baby novice\", \"baby swordman\", \"baby magician\", \"baby archer\", \"baby acolyte\", \"baby merchant\", \"baby thief\", \"baby knight\", \"baby priest\", \"baby wizard\", \"baby blacksmith\", \"baby hunter\", \"baby assassin\", \"baby knight\", \"baby crusader\", \"baby monk\", \"baby sage\", \"baby rogue\", \"baby alchemist\", \"baby bard\", \"baby dancer\", \"baby crusader\", \"baby super novice\", \"taekwon\", \"star gladiator\", \"star gladiator(union)\", \"soul linker\", \"gangsi\", \"death knight\", \"dark collector\", \"rune knight\", \"warlock\", \"ranger\", \"arch bishop\", \"mechanic\", \"guillotine cross\", \"rune knight\", \"warlock\", \"ranger\", \"arch bishop\", \"mechanic\", \"guillotine cross\", \"royal guard\", \"sorcerer\", \"minstrel\", \"wanderer\", \"sura\", \"genetic\", \"shadow chaser\", \"royal guard\", \"sorcerer\", \"minstrel\", \"wanderer\", \"sura\", \"genetic\", \"shadow chaser\", \"rune knight\", \"rune knight\", \"rune knight\", \"rune knight\", \"ranger\", \"ranger\", \"mechanic\", \"mechanic\", \"baby rune knight\", \"baby warlock\", \"baby ranger\", \"baby arch bishop\", \"baby mechanic\", \"baby guillotine cross\", \"baby royal guard\", \"baby sorcerer\", \"baby minstrel\", \"baby wanderer\", \"baby sura\", \"baby genetic\", \"baby shadow chaser\", \"baby rune knight\", \"baby rune knight\", \"expanded super novice\", \"baby expanded super novice\", \"kagerou\", \"oboro\", \"rebellion\", \"summoner\", \"baby summoner\", \"baby ninja\", \"baby kagerou\", \"baby oboro\", \"baby taekwon\", \"baby star gladiator\", \"baby soul linker\", \"baby gunslinger\", \"baby rebellion\", \"baby star gladiator(union)\"]\n return jobs[(jobid - 4000)];\n }\n}", "function checkInterests(mentee, mentor){\n var mentee_int = mentee.interests;\n var mentor_int = mentor.interests;\n var similar = 0; \n for(var i = 0; i < mentee_int.length; i++){\n for(var j = 0; j < mentor_int.length; j++){\n if(mentee_int[i] === (mentor_int[j])){\n similar++; \n }\n } \n }\n if(similar === 0) return 1; \n else if(similar === 1) return 10; \n else if(similar === 2) return 20;\n else return 30; \n }", "function getResult (type, alternative_type){\n var personsPoints = 0,\n highestPoints = 0,\n personWithHighestPoints = 0,\n numberOfQuestionsOfType = 0,\n percentageOfAccordance,\n result = [];\n\n // Iterate through persons\n for(var h=0; h < 4; h++){\n // Iterate through answers\n for( var j=0; j < selections.length; j++){\n // If alternative type is set, count this also\n if(typeof alternative_type != undefined){\n // if type of answer and person matchtes, increment counter\n if (selections[j][1] === type || selections[j][1] === alternative_type){\n numberOfQuestionsOfType++;\n if(selections[j][0] == h){\n personsPoints++;\n }\n }\n else {\n // if type of answer and person matchtes, increment counter\n if (selections[j][1] === type){\n numberOfQuestionsOfType++;\n if(selections[j][0] == h){\n personsPoints++;\n }\n }\n }\n }\n // if type of answer and person matchtes, increment counter\n if (selections[j][1] === type){\n numberOfQuestionsOfType++;\n if(selections[j][0] == h){\n personsPoints++;\n }\n }\n }\n\n // Calculate percentage - based on number of questions\n percentageOfAccordance = Math.round((personsPoints / (numberOfQuestionsOfType / (h+1))) * 100)\n // [ person id , percentage ]\n result.push([h, percentageOfAccordance ])\n\n personsPoints = 0;\n }\n\n // Sort result descending percentage of candidate result\n result.sort(function (a, b) {\n if( a[1] > b[1] ){\n return -1;\n }\n else if ( a[1] === b[1] ){\n return 0;\n }\n else {\n return 1;\n }\n });\n\n return result;\n }", "function getDrinkByProfession(param){\nconst matchDrink = {\n \"Jabroni\": \"Patron Tequila\",\n \"School Counselor\": \"Anything with Alcohol\",\n \"Programmer\": \"Hipster Craft Beer\",\n \"Bike Gang Member\": \"Moonshine\",\n \"Politician\": \"Your tax dollars\",\n \"Rapper\": \"Cristal\",\n \"other\": \"Beer\" \n }\nparam = param.toLowerCase();\nparam = param[0].toUpperCase() + param.slice(1);\nparamList = param.split(' ');\n\nif (paramList.length>1) {\n param = '';\n for (let i=0; i<paramList.length; i++) {\n word = paramList[i];\n param += word[0].toUpperCase() + word.slice(1)+ ' ';\n }\n param = param.slice(0, -1);\n}\n\nif (!matchDrink[param]) {\n return console.log(matchDrink.other);\n} else\n\nreturn console.log(matchDrink[param]);\n\n}", "function calcBestMatch(){\n var arrDiffs = [];\n for (var i = 0; i < arrFriends.length; i++) {\n var friendDiff = 0;\n for (var j = 0; j < arrFriends[i].scores.length; j++) {\n var scoreDiff = arrFriends[i].scores[j]-newFriend.scores[j];\n friendDiff += Math.abs(scoreDiff);\n };\n //adds each absolute difference to an array\n arrDiffs.push(friendDiff);\n }; \n //finds position of friend with minimum difference\n var minIndex = arrDiffs.indexOf(Math.min(...arrDiffs));\n\n //adds new friend to friend array\n arrFriends.push(newFriend);\n\n //returns position of friend with minimum difference\n return res.json(arrFriends[minIndex]);\n }", "function getScore(str1,str2,v1,v2,v3){\n\t\t\t\t\t\t\tvar r = 0;\n\t\t\t\t\t\t\tstr1 = str1.toUpperCase();\n\t\t\t\t\t\t\tstr2 = str2.toUpperCase();\n\t\t\t\t\t\t\tif(str1.indexOf(str2)==0) r += (v1||3);\n\t\t\t\t\t\t\tif(str1.indexOf(str2)>0) r += (v2||1);\n\t\t\t\t\t\t\tif(str1==str2) r += (v3||4);\n\t\t\t\t\t\t\treturn r;\n\t\t\t\t\t\t}", "scoreCalculation(cardsonHands) {\n let totalScore = 0;\n let totalScoreAce = 0;\n let trueScore = 0;\n if (cardsonHands.includes(\"A\")) {\n for (let i = 0; i < cardsonHands.length; i++) {\n totalScoreAce += this.engtoNum(cardsonHands[i])\n }\n totalScoreAce += 10\n }\n for (let i = 0; i < cardsonHands.length; i++) {\n totalScore += this.engtoNum(cardsonHands[i])\n }\n if (totalScoreAce < 22 && totalScoreAce > totalScore) {\n trueScore = totalScoreAce\n } else {\n trueScore = totalScore\n }\n return trueScore;\n }", "function bestMatch(ALAHLYGoals, zamalekGoals) {\n let lowest;\n let lowestMatch;\n let zamalekPoints;\n const scoreDiff = ALAHLYGoals.map((el,i) => el -= zamalekGoals[i])\n scoreDiff.forEach((el,i) =>{\n if(!lowest){\n lowest = el\n lowestMatch = i\n zamalekPoints = zamalekGoals[i]\n }\n if (el < lowest){\n lowest = el\n lowestMatch = i\n zamalekPoints = zamalekGoals[i]\n }\n if(el === lowest){\n if(zamalekGoals[i] > zamalekPoints){\n lowestMatch = i\n zamalekPoints = zamalekGoals[i]\n }\n } \n })\n return lowestMatch\n}", "function solve(a, b) {\n \nlet scoreAlice = 0;\nlet scoreBob = 0;\n\nfor( let i = 0; i < a.length; i++){\n ( a[i] > b[i] ) ? scoreAlice += 1 : ((a[i] < b[i]) ? scoreBob += 1 : 0) ;\n}\n \n return scoreAlice > scoreBob ? \n `${scoreAlice}, ${scoreBob}: Alice made \"Kurt\" proud!` : \n (scoreAlice < scoreBob ? `${scoreAlice}, ${scoreBob}: Bob made \"Jeff\" proud!` : `${scoreAlice}, ${scoreBob}: that looks like a \"draw\"! Rock on!`);\n\n}", "function match(ment) {\n var mentee = ment; \n //filter by type of interaction they are looking for\n mentee.mentors = checkInteraction(mentor_list, mentee.interaction, mentee); \n for(var i = 0; i < mentee.mentors.length; i++){\n if(!checkAge(mentee.mentors[i], mentee.age_range)){\n mentee.mentors.splice(i,i+1); \n }\n }\n for( var j = 0; j < mentee.mentors.length; j++){\n var curr_mentor = mentee.mentors[j]\n curr_mentor.score += checkInterests(mentee, curr_mentor);\n } \n return mentee.mentors; \n }", "compareDNA(specimen) {\n let matches = 0\n this.dna.forEach((element, currentIndex) => {\n if (element === specimen.dna[currentIndex]) {\n matches++\n console.log(`${this.dna[currentIndex]} matches ${specimen.dna[currentIndex]} at ${currentIndex}`)\n }\n })\n if (matches > 0) {\n console.log (`Specimens have ${Math.floor((matches / this.dna.length) * 100)}% DNA in common.`)\n } else {\n console.log(\"No matches were found.\")\n console.log (\"Specimens don't have DNA in common.\")\n }\n }", "function getHighestRecoScore(result) {\n\n var bestMatchScore = 0;\n var bestRecoItemNumber = -1;\n\n for (var i = 0; i < result.voiceClip.recos.length; i++) {\n var score = result.voiceClip.recos[i].matchScore\n if (score > bestMatchScore) {\n bestRecoItemNumber = i;\n bestMatchScore = score;\n }\n }\n\n return bestMatchScore;\n}", "function SkillLookUp(node)\n{\n if (disable_autocalc())\n return;\n\n // Parse the info from the node.\n var skill = GetText(node);\n\n if (typeof skillKeys[skill] == \"undefined\")\n {\n debug.trace(\"No info found for \" + skill + \".\");\n return;\n }\n\n debug.trace(\"Found key ability for \" + skill + \".\");\n sheet()[node.name + \"Ab\"].value = abilityKeys[skillKeys[skill]];\n\n // Determine if the skill is a class skill or not.\n // if (classSkills[node.value])\n // node.parentNode.parentNode.cells[2].firstChild.checked = _getClassBitSet() & classSkills[node.value] ? \"\" : \"checked\";\n SkillLookUpKeyAb(sheet()[node.name + \"Ab\"]);\n}", "function getSearchResults(page, jobs){\n var results = page // html\n .childNodes[3] // body\n .childNodes[24] //resultsBody\n .childNodes[0] //TR\n .childNodes[0] //TD\n .childNodes[5] //pageContent\n .childNodes[1] //TR\n .childNodes[3] //resultsCol\n .childNodes;\n let jobCount = results[5].childNodes[0].text.split(' ');\n jobCount = jobCount[jobCount.length - 1].replace(/,/g, \"\"); // Get string number and remove commas\n jobCount = parseInt(jobCount);\n\n let jobResult = [];\n\n results.forEach((res)=>{\n let elemClass = res.classNames? res.classNames[1] : null;\n if(elemClass && elemClass === 'row'){\n let title = res.childNodes[1].text.replace(/\\r?\\n|\\r/g, \"\").trim();\n let company = res.childNodes[3].childNodes[1].text.replace(/\\r?\\n|\\r/g, \"\").trim();\n // Location\n let location = res.childNodes[5].childNodes[0].classNames\n ? res.childNodes[5].childNodes[0].text // No rating\n : res.childNodes[7].childNodes[0].text; // Has rating\n // Rating\n let rating = 'Not rated';\n // If it's been rated\n if(res.childNodes[5].childNodes[1]) {\n rating = res.childNodes[5].childNodes[1].childNodes[0].rawAttributes.style;\n rating = rating.split('width: ');\n rating = Number(rating[1].replace(/[^0-9\\.]+/g,\"\")); // Extract number from width\n rating = (rating / MAX_RATING_INDEED).toFixed(2); // Get rating percentage from indeed\n rating = (MAX_RATING_TOPIA * rating).toFixed(1); // Get rating in MyTopia scale\n }\n\n let description = res.childNodes[9];\n if(description && description.childNodes && description.childNodes[1] &&\n description.childNodes[1].childNodes && description.childNodes[1].childNodes[1].childNodes\n && description.childNodes[1].childNodes[1].childNodes[1]\n && description.childNodes[1].childNodes[1].childNodes[1].childNodes\n && description.childNodes[1].childNodes[1].childNodes[1].childNodes[1])\n description = description.childNodes[1].childNodes[1].childNodes[1].childNodes[1].text;\n else\n description = \"No description available.\";\n\n description = description.replace(new RegExp('\\n', 'g'), '');\n\n jobResult.push({\n title: title,\n company: company,\n location: location,\n rating: rating,\n description: description\n });\n }\n });\n jobs.count = jobs.count + jobCount;\n return jobResult;\n}", "function searchByTrait(people) { // need only 2 but can search up to 5\n let filteredPeople = people;\n\n let heightYesNo = promptFor(\"Do you know the person's height? Yes or No.\", yesNo);\n let weightYesNo = promptFor(\"Do you know the person's weight? Yes or No.\", yesNo);\n let eyeColorsYesNo = promptFor(\"Do you know the person's eye color? Yes or No.\", yesNo);\n let occupationYesNo = promptFor(\"Do you know the person's occupation? Yes or No.\", yesNo)\n let ageYesNo = promptFor(\"Do you know the person's age? Yes or No.\", yesNo);\n\n\n if (eyeColorsYesNo == 'yes') {\n let eyeColor = promptFor(\"What is the person's eye color?\", nonInteger);\n filteredPeople = filteredPeople.filter(function (person) {\n if (person.eyeColor.toLowerCase() == eyeColor.toLowerCase()) {\n return true;\n } else {\n return false;\n }\n });\n }\n\n if (heightYesNo == 'yes') {\n let height = promptFor(\"What is the person's height in inches?\", integer);\n\n filteredPeople = filteredPeople.filter(function (person) {\n if (person.height == height) {\n return true;\n } else {\n return false;\n }\n });\n }\n\n if (weightYesNo == 'yes') {\n let weight = promptFor(\"What is the person's weight in pounds?\", integer);\n\n filteredPeople = filteredPeople.filter(function (person) {\n if (person.weight == weight) {\n return true;\n } else {\n return false;\n }\n });\n }\n\n if (occupationYesNo == 'yes') {\n let occupation = promptFor(\"What is the person's occupation?\", nonInteger);\n\n filteredPeople = filteredPeople.filter(function (person) {\n if (person.occupation.toLowerCase() == occupation.toLowerCase()) {\n return true;\n } else {\n return false;\n }\n });\n }\n\n if (ageYesNo == 'yes') {\n let age = promptFor(\"What is the person's age?\", integer);\n\n filteredPeople = filteredPeople.filter(function (person) {\n if (person.age == age) {\n return true;\n } else {\n return false;\n }\n });\n }\n return filteredPeople;\n}", "async function getClosestPerson(compareTo) {\n // Because chaincode is a total pain to work with, it's 1000x times easier\n // to nest these, even thought it'd be better for them to be flat in an\n // ideal world\n\n // Returns a proximity value, between two contacts\n // Bounded [0, 1] at the time of this comment, but upper max is mostly\n function getProximity(original, check) {\n function precisionDst(one, two, precisionLevel) {\n // Two empty strings should give 0 score, despite cmpString returning 1\n // (they're exactly equal, but nothing is there to equal)\n if (one && two) {\n return Math.pow(cmpString(one, two), precisionLevel);\n }\n else {\n return 0;\n }\n }\n\n let length = original.name + original.address + original.email + original.phone;\n // If we have less than ~15 characters of data, we can't really compare\n if (length.length < 15) {\n return 0;\n }\n\n // These have reason, but are essentially arbitrary\n let weights = {\n // Names have a lot of variation in reasonable use (nicknames, etc)\n \"name\": 1,\n \"email\": 6,\n \"address\": 3,\n \"phone\": 3,\n // If they're referred, we should highly suggest that they are person, but\n // if everything else matches someone better, it should be overridable\n // Total of others = 13 rn, so 10 makes sense\n \"referral\": 10,\n };\n let proximity = 0;\n // cmpString returns [0, 1] (Dice's Coefficient)\n // Names have a lot of variation in reasonable use\n proximity += weights.name * precisionDst(original.name, check.name, 1);\n // Addresses can be written very different ways\n proximity += weights.address * precisionDst(original.address, check.address, 1);\n // Email addresses should match exactly, essentially\n proximity += weights.email * precisionDst(original.email, check.email, 5);\n // Phone numbers often lack digits, have extra (-)s, etc\n // Plus, a relevant area code may increase score\n proximity += weights.phone * precisionDst(original.phone, check.phone, 0.5);\n if (check.key && original.key) {\n proximity += weights.referral * precisionDst(original.key, check.key, 10);\n }\n\n let max = 0;\n for (let key in weights) {\n max += weights[key];\n }\n // Normalize to those weights so we can make reasoned statements like\n // if (proximity > 0.9) and se it like a confidence\n proximity = proximity / max;\n\n return proximity;\n }\n\n // TODO: This is an extremely naiive / slow way to do this\n // Should probably use indexing and search for exact matches on keys first, etc\n // And only *then* use this exhaustive fuzzy search\n // threshold was selected by tinkering around until it felt right\n let threshold = 0.1;\n let cards = JSON.parse(await fabric.query('queryRange', ['a', 'z']));\n let bestProx = -1;\n let bestKey = '';\n let bestEntry = '';\n for (let key in cards) {\n let card = cards[key].Record.contacts;\n for (let entry in card) {\n let person = card[entry];\n let prox = getProximity(compareTo, person);\n if (prox > bestProx && prox > threshold) {\n bestProx = prox;\n bestKey = key;\n bestEntry = entry;\n }\n }\n }\n if (bestProx == -1) {\n return JSON.stringify({\"error\": \"no relevant users found\"});\n }\n return JSON.stringify(cards[bestKey].Record.contacts[bestEntry]);\n\n}", "function woofMatch(game, stats, woofedOwner, woofedPet) {\n //if match, update confirmed match stat, and add to round history\n stats.confirmed.match[woofedOwner] = woofedPet;\n stats.round[game.round].woof.match = [woofedOwner, woofedPet];\n\n //variables for spans, inputs, and labels\n //instances of no Match selections\n const noMatchInputs = document.querySelectorAll(`\n .pet-inputs[name=\"${woofedOwner}\"]:not([value=\"${woofedPet}\"]),\n .pet-inputs[value=\"${woofedPet}\"]:not([name=\"${woofedOwner}\"])\n `);\n const noMatchSpans = document.querySelectorAll(`\n .pet-label-spans.${woofedPet}:not([id^=\"${woofedOwner}-\"]),\n .pet-label-spans[id^=\"${woofedOwner}\"]:not(.${woofedPet})\n `);\n const noMatchLabels = document.querySelectorAll(`\n .pet-labels.${woofedPet}:not([id^=\"${woofedOwner}-\"]),\n .pet-labels[id^=\"${woofedOwner}\"]:not(.${woofedPet})\n `);\n //for the match itself\n const matchedInput = document.querySelector(`#${woofedOwner}-${woofedPet}-input`);;\n const matchedSpan = document.querySelector(`#${woofedOwner}-${woofedPet}-selection`);\n\n //mark submit button as match\n classChange(document.querySelector('#submit-woof'), ['match'], []);\n\n //for match\n //check and disable match input\n if (!matchedInput.checked) {\n matchedInput.checked = true;\n };\n matchedInput.disabled = true;\n //mark match span as pawfect-match\n classChange(matchedSpan, ['match'], []);\n //mark selection header\n markHeader(matchedSpan, ['match'], []);\n //expand selection if collapsed on incorrect match, then collapse selection with the correct one\n classChange(matchedSpan.parentElement, [], ['hidden']);\n const ownerName = matchedSpan.parentElement.previousElementSibling.name;\n const petName = matchedSpan.parentElement.previousElementSibling.value;\n collapseSelections(ownerName, petName, false);\n\n //for no-matches\n //uncheck and disable each noMatch input\n noMatchInputs.forEach(input => {\n input.disabled = true;\n if (input.checked) {\n input.checked = false;\n };\n });\n //mark spans as no-match\n noMatchSpans.forEach(span => {\n classChange(span, ['no'], []);\n });\n //dim labels\n dimLabels('match', noMatchLabels);\n\n //remove listings if applicable\n woofList(game, stats, woofedOwner, woofedPet, matchedSpan);\n //go through each instance of no match owner and pet selections\n noMatchSpans.forEach(span => {\n const noMatchOwner = span.parentElement.previousElementSibling.name;\n const noMatchPet = span.parentElement.previousElementSibling.value;\n woofList(game, stats, noMatchOwner, noMatchPet, span);\n });\n\n //for stats chart, if applicable\n if (stats.chart) {\n markStats(woofedOwner, woofedPet, 'match');\n //mark no matches for owner\n for (let i = 1; i < game.round; i++) {\n if (stats.round[i].selections[woofedOwner] !== woofedPet) {\n markStats(woofedOwner, stats.round[i].selections[woofedOwner], 'no');\n };\n };\n //v1.1 mark no matches for pet in other owners\n game.owners.forEach(owner => {\n //select each stat chart entry for woofed pet that is not for the original owner\n if (owner !== woofedOwner && document.querySelector(`.pet-stats[id$=-${owner}-${woofedPet}-selection]`)) {\n markStats(owner, woofedPet, 'no');\n };\n });\n };\n\n //remove pair from validWoofs object\n validWoofs.owners.splice(validWoofs.owners.indexOf(woofedOwner), 1);\n validWoofs.pets.splice(validWoofs.pets.indexOf(woofedPet), 1);\n\n //update message and button text\n classChange(currentMessage.parentElement, ['message-match'], ['message-danger', 'message-blackout', 'message-nomatch']);\n currentMessage.innerHTML = `Congrats! ${names.cased.lower[woofedOwner]} and ${names.cased.lower[woofedPet]} are a Pawfect Match!`;\n //v1.1 shake message container\n shake(currentMessage.parentElement);\n document.querySelector('#submit-woof').innerHTML = 'Pawfect Match';\n}", "function checkSkill(preference, amount){\n for (let i = 0; i < skill_list.length; i++) {\n if (preference == skill_list[i][0]) {\n selectedPreferenceID = i;\n let current_num = skill_list[i][1];\n skill_list[i][1] = current_num + amount;\n // ict skill\n if(i<5){\n let current_value = total_list[0][1];\n total_list[0][1] = current_value + amount;\n }\n // social skill\n else if(i<10){\n let current_value = total_list[1][1];\n total_list[1][1] = current_value + amount;\n }\n // complementary skill\n else if(i<15){\n let current_value = total_list[2][1];\n total_list[2][1] = current_value + amount;\n }\n // work skill\n else{\n let current_value = total_list[3][1];\n total_list[3][1] = current_value + amount;\n }\n }\n }\n}", "bestGuess() {\n const bestChromosome = this._bestChromosome();\n return [bestChromosome.calcCostAgainst(this.goal), bestChromosome.code];\n }", "findSelfJoinSalary() {\n const result = [];\n\n this.sampleJobs.forEach((job1) => {\n this.sampleJobs.forEach((job2) => {\n if (job1.payload()['minSalary'] === job2.payload()['maxSalary']) {\n result.push([job1, job2]);\n }\n });\n });\n\n // Sorting results to be in deterministic order such that they can be\n // useful for assertions.\n result.sort((jobPair1, jobPair2) => {\n const jp1id0 = jobPair1[0].payload()['id'];\n const jp2id0 = jobPair2[0].payload()['id'];\n if (jp1id0 < jp2id0) {\n return -1;\n } else if (jp1id0 > jp2id0) {\n return 1;\n } else {\n const jp1id1 = jobPair1[1].payload()['id'];\n const jp2id1 = jobPair2[1].payload()['id'];\n if (jp1id1 < jp2id1) {\n return -1;\n } else if (jp1id1 > jp2id1) {\n return 1;\n }\n return 0;\n }\n });\n\n return result;\n }", "function getBestCandidate(candidates) {\n var bestCount = 0;\n var bestCandidate = null;\n var sumCount = 0;\n \n console.log(\"Candidates %j\", candidates);\n for (var i in candidates) {\n var count = parseInt(candidates[i]);\n sumCount += count;\n if (count > bestCount) {\n bestCount = count;\n bestCandidate = i;\n }\n }\n \n return { \"bestCandidate\": bestCandidate, score: (bestCount / sumCount) };\n}", "function findCombinationScore(cards = []) {\n const sortedValues = extractSortedCardValues(cards);\n const cardSuits = extractCardSuits(cards);\n\n const valueFrequencies = extractFrequencies(sortedValues);\n const highestCard = sortedValues[4];\n\n // TEST FOR STRAIGHTFLUSH\n const isFlush = testForFlush(cardSuits);\n const isStraight = testForStraight(sortedValues);\n if (isFlush && isStraight)\n return combinationScores.straightFlush + cardScores[highestCard];\n\n // TEST FOR FOUR OF A KIND\n const FOAKCard = getFOAKCard(valueFrequencies);\n if (FOAKCard) return getFOAKScore(FOAKCard);\n\n // TEST FOR FULL HOUSE\n const TOAKcard = getTOAKCard(valueFrequencies);\n const pairsArray = getPairsCards(valueFrequencies);\n if (pairsArray.length === 1 && TOAKcard) return getFullHouseScore(TOAKcard);\n\n // TEST FOR FLUSH\n if (isFlush) return getFlushScore(sortedValues);\n\n // TEST FOR STRAIGHT\n if (isStraight) return getStraightScore(sortedValues);\n\n // TEST FOR THREE OF A KIND\n if (TOAKcard) return getThreeOfKindScore(TOAKcard);\n\n // TEST FOR TWO PAIR\n if (pairsArray.length > 0) return getPairScore(pairsArray);\n\n return cardScores[highestCard];\n}", "function getScore(str1,str2,v1,v2,v3){\n\t\tvar r = 0;\n\t\tstr1 = str1.toUpperCase();\n\t\tstr2 = str2.toUpperCase();\n\t\tif(str1.indexOf(str2)==0) r += (v1||3);\n\t\tif(str1.indexOf(str2)>0) r += (v2||1);\n\t\tif(str1==str2) r += (v3||4);\n\t\treturn r;\n\t}", "function getSkillLevel(skillPoints) {\n\tconst beginnerThreshold = 0; // 0 - 200\n\tconst intermediateThreshold = 150; // 150 - 600\n\tconst expertThreshold = 600; // 600 - 1,000\n\tconst masterThreshold = 1000; // 1,000 - 2,000\n\tconst legendaryThreshold = 2000; // 2,000 - 10,000\n\tconst insaneThreshold = 10000; // 10,000 - MAX_VALUE\n\tconst perfectThreshold = calculateSkillPoints(\"WIN\", {game_speed: 10, num_rows: 50, num_cols: 50, available_fruit: 1, fruit_effect: 1}); //MAX_VALUE\n\tlet level, threshold, range;\n\t\n\t//Sub-function to check if the user's skill points are within a provided range.\n\t//If so, set some values that will be needed for calculating the user's skill level.\n\tfunction doSetSkillRange(skillLevelName, thresholdLowerBound, thresholdUpperBound) {\n\t\tif (skillPoints >= thresholdLowerBound) {\n\t\t\tlevel = skillLevelName;\n\t\t\tthreshold = thresholdLowerBound;\n\t\t\trange = thresholdUpperBound - thresholdLowerBound;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\t\n\t//See which category the given 'skillPoints' value is in.\n\t//Honestly, this is very weird code here. I've never seen anyone do this kind of thing, but it works well to control the flow of execution with these ranges.\n\tif (doSetSkillRange(\"Perfect\", perfectThreshold, perfectThreshold+1)) { return level; }\n\telse if (doSetSkillRange(\"Insane\", insaneThreshold, perfectThreshold)) {}\n\telse if (doSetSkillRange(\"Legendary\", legendaryThreshold, insaneThreshold)) {}\n\telse if (doSetSkillRange(\"Master\", masterThreshold, legendaryThreshold)) {}\n\telse if (doSetSkillRange(\"Expert\", expertThreshold, masterThreshold)) {}\n\telse if (doSetSkillRange(\"Intermediate\", intermediateThreshold, expertThreshold)) {}\n\telse { doSetSkillRange(\"Beginner\", beginnerThreshold, intermediateThreshold); }\n\t\n\treturn `${level} ${Math.round(((skillPoints-threshold)/range)*100)}%`;\n}", "find(terms) {\n //@TODO\n var c = 0;\n var o = new Object();\n let map4 = new Map();\n let object_array = new Array();\n\n terms.forEach(function(value){\n\n map4 = map2.get(value);\n\n if(map4 != undefined){\n map4.forEach(function(value1, key1){\n let filename = key1;\n let offset_count = value1;\n let content1 = map3.get(key1);\n\n var offset_prev= offset_count[0];\n while(content1.charAt(offset_prev)!= '\\n' && offset_prev != 0){\n offset_prev--;\n\n }\n if(offset_prev!=0){\n offset_prev++;\n }\n var offset_next = offset_count[0];\n while(content1.charAt(offset_next)!= '\\n'){\n offset_next++;\n\n }\n\n let line = content1.substring(offset_prev,offset_next);\n\n object_array.forEach(function(value){\n if(value.name == filename){\n value.score += offset_count[1];\n c = 1;\n }\n });\n\n\n if(c == 0){\n\n o = { name: filename,\n score: offset_count[1],\n lines: line + \"\\n\"\n };\n\n object_array.push(o);\n\n }\n c = 0;\n\n\n });\n }\n});\n\n object_array.sort(compareResults);\n\n\nreturn object_array;\n}", "function rateUser(userData, matchData, callback) {\n const userRoles = userData.roles || [];\n const userSkills = userData.skills || [];\n const matchRoles = matchData.roles || [];\n const matchSkills = matchData.skills || [];\n\n var rating = 0;\n // find matched roles\n async.forEachOf(userRoles, (role, index, next) => {\n // increase rating if match\n if (matchRoles.includes(role)) rating++;\n\n next();\n }, err => {\n if(err) return callback(null);\n\n // find matched skills\n async.forEachOf(userSkills, (skill, index, next) => {\n // increase rating if match\n if (matchSkills.includes(skill)) rating++;\n\n next();\n }, err => {\n if(err) return callback(null);\n else return callback(rating);\n });\n });\n}", "function MatchData() {}", "function outputResults(score) {\n\n\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 checkSkillThresholds(old_skill_exp, new_skill_exp){\n let new99s = [];\n let new120s = [];\n let isNewMax = false;\n const LVL_99_INV_EXP = 36073511;\n const LVL_120_INV_EXP = 80618654;\n const LVL_99_EXP = 13034431;\n const LVL_120_EXP = 104273167;\n let isDif = false;\n let level99threshold = LVL_99_EXP;\n let level120threshold = LVL_120_EXP;\n let numNew99s = 0;\n let numOld99s = 0;\n \n let result = {};\n // loop over each skill and compare their old and new exp\n for(let skill in new_skill_exp) {\n // set exp threshold if invention or not.\n if (skill.toLowerCase() == \"invention\") {\n level99threshold = LVL_99_INV_EXP;\n level120threshold = LVL_120_INV_EXP;\n } else {\n level99threshold = LVL_99_EXP;\n level120threshold = LVL_120_EXP;\n }\n // new_exp has data after the decimal so round that off\n old_exp = old_skill_exp[skill.toLowerCase()];\n new_exp = Math.round(new_skill_exp[skill])\n // check if they're equal. If they break the 99 or 120 threshold\n // log them.\n if(old_exp != new_exp){\n isDif = true;\n if(old_exp < level99threshold && new_exp >= level99threshold)\n {\n new99s.push(skill);\n }\n if(old_exp < level120threshold && new_exp >= level120threshold)\n {\n new120s.push(skill);\n }\n }\n if(new_exp > level99threshold)\n {\n numNew99s++;\n }\n if(old_exp > level99threshold)\n {\n numOld99s++;\n }\n }\n // update for archaeology!\n if (numOld99s < 27 && (numNew99s) == 27)\n {\n isNewMax = true;\n } else\n {\n isNewMax = false;\n }\n if (isDif)\n return {\"99s\": new99s, \"120s\": new120s, \"isNewMax\": isNewMax};\n else\n return null;\n}", "score(args) {\n\n }", "function getInfo(matches, d, round)\r\n{\r\n\t//Get the teams' names\r\n\tvar team1 = \"\" + matches[d].team1.name;\r\n\tvar team2 = \"\" + matches[d].team2.name;\r\n\r\n\t//Get the teams' codes\r\n\tvar team1code = \"\" + matches[d].team1.code;\r\n\tvar team2code = \"\" + matches[d].team2.code;\r\n\r\n\t//Get the teams' flags\r\n\tvar team1flag;\r\n\tvar team2flag;\r\n\r\n\tfor(let j = 0; j < flags.countries.length ; j++) //Loop through every country participating in the World Cup\r\n\t{\r\n\t\t//If it is one of the contries playing in the match\r\n\t\tif(flags.countries[j].name == team1)\r\n\t\t{\r\n\t\t\tteam1flag = flags.countries[j].emoji; //Get its emoji flag\r\n\t\t}\r\n\t\telse if(flags.countries[j].name == team2)\r\n\t\t{\r\n\t\t\tteam2flag = flags.countries[j].emoji;\r\n\t\t}\r\n\t}\r\n\r\n\t//Return the prediction ready to add to the tweet\r\n\treturn team1flag + guessScore(team1, team2, round) + team2flag + \" #\" + team1code + team2code + \"\\n\";\r\n}", "function makesTeam(studentsResults, survey, groupsize,course_id){\r\n \r\n var added = {};\r\n var maxScore = 0;\r\n var objcompare = {};\r\n for(let i = 0; i < studentsResults.length; i++){\r\n //now go through all the students comparing them to each other.\r\n \r\n var firstStudent = studentsResults[i];\r\n objcompare[firstStudent._id] = [];\r\n //console.log(firstStudent);\r\n for(let j = 0; j < studentsResults.length; j++){\r\n var secondStudent = studentsResults[j];\r\n if(firstStudent._id == secondStudent._id){\r\n continue;\r\n }\r\n //now go through all the answers for each student\r\n var score = 0;\r\n for(let k = 0; k < survey.questions.length; k++){\r\n if(Array.isArray(firstStudent.results[k])){\r\n let arrayScore = 0;\r\n for(let m = 0; m < firstStudent.results[k].length; m++){\r\n for(let n = 0; n < secondStudent.results[k].length; n++){\r\n if(firstStudent.results[k][m] === secondStudent.results[k][n]){\r\n arrayScore++;\r\n }\r\n }\r\n }\r\n //making the weight \r\n score+= arrayScore * (survey.questions[k].weight/5 );\r\n \r\n }\r\n else if(firstStudent.results[k] == secondStudent.results[k]){\r\n //adding another similarity\r\n score+= 1 * (survey.questions[k].weight/5); \r\n }\r\n }\r\n //adds one way\r\n\r\n objInner = {};\r\n objInner[secondStudent._id]=false;\r\n objInner.score = score;\r\n \r\n let h = j;\r\n let location = 0;\r\n //checks to see if objcompare[firstStudent._id]'s array is empty\r\n //checks to see where to place the the objInner. this is so that the highest score will be at objcompare[firstStudent._id][0]\r\n if(objcompare[firstStudent._id] != undefined && !objcompare[firstStudent._id].includes(objInner)){\r\n while(objcompare[firstStudent._id][location]!= undefined && objInner.score < objcompare[firstStudent._id][location].score){\r\n location++;\r\n }\r\n //assigning into location where objInner score needs to be.\r\n objcompare[firstStudent._id].splice(location,0,objInner);\r\n }\r\n else{\r\n objcompare[firstStudent._id] = [];\r\n }\r\n \r\n if(!objcompare[firstStudent._id].includes(objInner)){\r\n added[firstStudent._id]= true;\r\n objcompare[firstStudent._id].push(objInner)\r\n }\r\n \r\n }\r\n if(i == studentsResults.length -1){\r\n //console.log(objcompare)\r\n makeBestTeams(objcompare,groupsize,studentsResults.length,course_id)\r\n }\r\n }\r\n\r\n}", "function calculateScore(groupedHeroes, comics) {\n const correctOrder = HEROES.filter((hero) => hero.comics === comics).sort(\n (a, b) =>\n a.rank < b.rank ? -1 : 1\n\n )\n\n\n return groupedHeroes ? groupedHeroes.reduce((score, { name, rank }, index) => {\n const maxPoint = getMaxPoints()\n const heroIndex = correctOrder.findIndex((hero) => hero.rank === rank && hero.name === name)\n const penalty = heroIndex >= 0 ? Math.abs(index - heroIndex) : maxPoint\n return score + (maxPoint - penalty)\n }, 0) : null\n}", "function iterate(products) {\n\n var inCommon = [];\n var inCommonSorted;\n\n for (prop in products) { \n // save the like tags \n var tagsComparison = _.intersection(tags, products[prop].tags);\n\n var productsFirebase = products[prop];\n \n // save the products based on like tags (with a count of like tags) \n inCommon.push({\n numTags: tagsComparison.length, \n product: productsFirebase \n }) \n\n // sort the products based on the highest count of like tags\n inCommonSorted = _.sortBy(inCommon, 'numTags').reverse(); \n // console.log(inCommonSorted);\n \n // if there are a small number of like tags, display error state (because the quality of the output would not be high enough)\n if (inCommonSorted[0].numTags < 7 || inCommonSorted[0] === 'undefined' || inCommonSorted[0] === 'null') {\n $('.flex-container').removeClass('hidden');\n $('.uploaded-flex-item').removeClass('hidden');\n $('#product-match-card').fadeIn();\n $('#product-match-card').html(\"Yikes! We could not find a match.\");\n $('#dropdown').removeClass('hidden'); \n inCommon = [];\n inCommonSorted = [];\n }\n\n // displays the best match (product with the highest number of like tags)\n else {\n $('.flex-container').removeClass('hidden');\n $('.uploaded-flex-item').removeClass('hidden');\n $('#product-match-card').fadeIn(); \n $('#product-match-card').html('<h2>' + \"Try this: \" + '</h2>' + '<img src=\"' + inCommonSorted[0].product.itemImage + '\" alt=\"\" class=\"image-thumbnail\"/>' + inCommonSorted[0].product.itemName + \"<br>\" + '<a href=\"' + inCommonSorted[0].product.url + '\"class=\"popUpAction\" target=\"_blank\">' + \"View Details\" + '</a>'); \n }\n } \n\n\n // enables the user to choose a helper to improve the product match result\n $(document).on('change', '#dropdown', function(e) {\n \n var x = userSelectedHelperTag;\n\n // saves the users selection from the helper drop down\n var userSelectedHelperTag = this.options[e.target.selectedIndex].text;\n console.log(userSelectedHelperTag);\n\n for (prop in products) {\n\n var productsHelperFirebase = [];\n var helperInCommon = [];\n\n if (userSelectedHelperTag === products[prop].helperTag) {\n \n // add products matching the user's helper to a new array\n productsHelperFirebase.push(products[prop]);\n console.log(products[prop]);\n\n // compares the tags of the user's upload against the tags of products matching the user's selected helper\n for (var i = 0; i < productsHelperFirebase.length; i++) {\n var tagsHelperComparison = _.intersection(tags, productsHelperFirebase[i].tags);\n // console.log(tagsHelperComparison.length)\n\n helperInCommon.push({\n numTags: tagsHelperComparison.length, \n product: productsHelperFirebase[i] \n }) \n } \n\n\n // sort the products based on the highest count of like tags considering only products that match the user's selected helper\n var helperInCommonSorted = _.sortBy(helperInCommon, 'numTags').reverse();\n console.log(helperInCommonSorted) \n\n\n // if there are a small number of like tags considering only products that match the user's selected helper, display error state (because the quality of the output would not be high enough)\n if (helperInCommonSorted[0].numTags < 7 || helperInCommonSorted[0] === 'undefined' || helperInCommonSorted[0] === 'null') {\n $('.flex-container').removeClass('hidden');\n $('.uploaded-flex-item').removeClass('hidden');\n $('#product-match-card').fadeIn();\n $('#product-match-card').html(\"Yikes! We could not find a match.\");\n $('#dropdown').removeClass('hidden'); \n }\n\n // displays the best match (product with the highest number of like tags considering only products that match the user's selected helper)\n else {\n $('.flex-container').removeClass('hidden');\n $('.uploaded-flex-item').removeClass('hidden');\n $('#product-match-card').fadeIn(); \n $('#product-match-card').html('<h2>' + \"Try this: \" + '</h2>' + '<img src=\"' + helperInCommonSorted[0].product.itemImage + '\" alt=\"\" class=\"image-thumbnail\"/>' + helperInCommonSorted[0].product.itemName + \"<br>\" + '<a href=\"' + helperInCommonSorted[0].product.url + '\"class=\"popUpAction\" target=\"_blank\">' + \"View Details\" + '</a>'); \n }\n }\n } \n })\n }", "function findBestMatch() {\n bestMatch = songMatches[0];\n for (let i = 1; i < songMatches.length; ++i) {\n if ( songMatches[i].popularity > bestMatch.popularity ) {\n bestMatch = songMatches[i];\n }\n }\n}", "function getSkillsValues() {\n\tskillsIndex = myCharacter.skills;\n\n\teffectiveAcademicsDice = skillsIndex.academics + nanEqualsZero(myRelicBonusDice.academics) + nanEqualsZero(myFatebonds.academics) + nanEqualsZero(myTempDice.academics);\n\teffectiveAnimalkenDice = skillsIndex.animalken + nanEqualsZero(myRelicBonusDice.animalken) + nanEqualsZero(myFatebonds.animalken) + nanEqualsZero(myTempDice.animalken);\n\teffectiveArtDice = skillsIndex.art + nanEqualsZero(myRelicBonusDice.art) + nanEqualsZero(myFatebonds.art) + nanEqualsZero(myTempDice.art);\n\teffectiveAthleticsDice = skillsIndex.athletics + nanEqualsZero(myRelicBonusDice.athletics) + nanEqualsZero(myFatebonds.athletics) + nanEqualsZero(myTempDice.athletics);\n\teffectiveAwarenessDice = skillsIndex.awareness + nanEqualsZero(myRelicBonusDice.awareness) + nanEqualsZero(myFatebonds.awareness) + nanEqualsZero(myTempDice.awareness);\n\teffectiveBrawlDice = skillsIndex.brawl + nanEqualsZero(myRelicBonusDice.brawl) + nanEqualsZero(myFatebonds.brawl) + nanEqualsZero(myTempDice.brawl);\n\teffectiveCommandDice = skillsIndex.command + nanEqualsZero(myRelicBonusDice.command) + nanEqualsZero(myFatebonds.command) + nanEqualsZero(myTempDice.command);\n\teffectiveControlDice = skillsIndex.control + nanEqualsZero(myRelicBonusDice.control) + nanEqualsZero(myFatebonds.control) + nanEqualsZero(myTempDice.control);\n\teffectiveCraftDice = skillsIndex.craft + nanEqualsZero(myRelicBonusDice.craft) + nanEqualsZero(myFatebonds.craft) + nanEqualsZero(myTempDice.craft);\n\teffectiveEmpathyDice = skillsIndex.empathy + nanEqualsZero(myRelicBonusDice.empathy) + nanEqualsZero(myFatebonds.empathy) + nanEqualsZero(myTempDice.empathy);\n\teffectiveFortitudeDice = skillsIndex.fortitude + nanEqualsZero(myRelicBonusDice.fortitude) + nanEqualsZero(myFatebonds.fortitude) + nanEqualsZero(myTempDice.fortitude);\n\teffectiveIntegrityDice = skillsIndex.integrity + nanEqualsZero(myRelicBonusDice.integrity) + nanEqualsZero(myFatebonds.integrity) + nanEqualsZero(myTempDice.integrity);\n\teffectiveInvestigationDice = skillsIndex.investigation + nanEqualsZero(myRelicBonusDice.investigation) + nanEqualsZero(myFatebonds.investigation) + nanEqualsZero(myTempDice.investigation);\n\teffectiveLarcenyDice = skillsIndex.larceny + nanEqualsZero(myRelicBonusDice.larceny) + nanEqualsZero(myFatebonds.larceny) + nanEqualsZero(myTempDice.larceny);\n\teffectiveMarksmanshipDice = skillsIndex.marksmanship + nanEqualsZero(myRelicBonusDice.marksmanship) + nanEqualsZero(myFatebonds.marksmanship) + nanEqualsZero(myTempDice.marksmanship);\n\teffectiveMedicineDice = skillsIndex.medicine + nanEqualsZero(myRelicBonusDice.medicine) + nanEqualsZero(myFatebonds.medicine) + nanEqualsZero(myTempDice.medicine);\n\teffectiveMeleeDice = skillsIndex.melee + nanEqualsZero(myRelicBonusDice.melee) + nanEqualsZero(myFatebonds.melee) + nanEqualsZero(myTempDice.melee);\n\teffectiveOccultDice = skillsIndex.occult + nanEqualsZero(myRelicBonusDice.occult) + nanEqualsZero(myFatebonds.occult) + nanEqualsZero(myTempDice.occult);\n\teffectivePoliticsDice = skillsIndex.politics + nanEqualsZero(myRelicBonusDice.politics) + nanEqualsZero(myFatebonds.politics) + nanEqualsZero(myTempDice.politics);\n\teffectivePresenceDice = skillsIndex.presence + nanEqualsZero(myRelicBonusDice.presence) + nanEqualsZero(myFatebonds.presence) + nanEqualsZero(myTempDice.presence);\n\teffectiveScienceDice = skillsIndex.science + nanEqualsZero(myRelicBonusDice.science) + nanEqualsZero(myFatebonds.science) + nanEqualsZero(myTempDice.science);\n\teffectiveStealthDice = skillsIndex.stealth + nanEqualsZero(myRelicBonusDice.stealth) + nanEqualsZero(myFatebonds.stealth) + nanEqualsZero(myTempDice.stealth);\n\teffectiveSurvivalDice = skillsIndex.survival + nanEqualsZero(myRelicBonusDice.survival) + nanEqualsZero(myFatebonds.survival) + nanEqualsZero(myTempDice.survival);\n\teffectiveThrownDice = skillsIndex.thrown + nanEqualsZero(myRelicBonusDice.thrown) + nanEqualsZero(myFatebonds.thrown) + nanEqualsZero(myTempDice.thrown);\n\tif(myCharacter['boons']['mystery']['unnaturalInsight'] == true && myValidChannelsList['mystery'] == true) {\n\t\teffectiveAwarenessDice += parseInt(effectiveNumberMystery);\n\t}\n\tfor(var areteCharacter in genExceptionsMasterList['arete']) {\n\t\tif(myCharacter['selfName'] == areteCharacter) {\n\t\t\tif('academics' in genExceptionsMasterList['arete'][areteCharacter]) {effectiveAcademicsDice += convertToEpic(nanEqualsZero(genExceptionsMasterList['arete'][areteCharacter]['academics']['level']));}\n\t\t\tif('animalken' in genExceptionsMasterList['arete'][areteCharacter]) {effectiveAnimalkenDice += convertToEpic(nanEqualsZero(genExceptionsMasterList['arete'][areteCharacter]['animalken']['level']));}\n\t\t\tif('art' in genExceptionsMasterList['arete'][areteCharacter]) {effectiveArtDice += convertToEpic(nanEqualsZero(genExceptionsMasterList['arete'][areteCharacter]['art']['level']));}\n\t\t\tif('athletics' in genExceptionsMasterList['arete'][areteCharacter]) {effectiveAthleticsDice += convertToEpic(nanEqualsZero(genExceptionsMasterList['arete'][areteCharacter]['athletics']['level']));}\n\t\t\tif('awareness' in genExceptionsMasterList['arete'][areteCharacter]) {effectiveAwarenessDice += convertToEpic(nanEqualsZero(genExceptionsMasterList['arete'][areteCharacter]['awareness']['level']));}\n\t\t\tif('brawl' in genExceptionsMasterList['arete'][areteCharacter]) {effectiveBrawlDice += convertToEpic(nanEqualsZero(genExceptionsMasterList['arete'][areteCharacter]['brawl']['level']));}\n\t\t\tif('command' in genExceptionsMasterList['arete'][areteCharacter]) {effectiveCommandDice += convertToEpic(nanEqualsZero(genExceptionsMasterList['arete'][areteCharacter]['command']['level']));}\n\t\t\tif('control' in genExceptionsMasterList['arete'][areteCharacter]) {effectiveControlDice += convertToEpic(nanEqualsZero(genExceptionsMasterList['arete'][areteCharacter]['control']['level']));}\n\t\t\tif('craft' in genExceptionsMasterList['arete'][areteCharacter]) {effectiveCraftDice += convertToEpic(nanEqualsZero(genExceptionsMasterList['arete'][areteCharacter]['craft']['level']));}\n\t\t\tif('empathy' in genExceptionsMasterList['arete'][areteCharacter]) {effectiveEmpathyDice += convertToEpic(nanEqualsZero(genExceptionsMasterList['arete'][areteCharacter]['empathy']['level']));}\n\t\t\tif('fortitude' in genExceptionsMasterList['arete'][areteCharacter]) {effectiveFortitudeDice += convertToEpic(nanEqualsZero(genExceptionsMasterList['arete'][areteCharacter]['fortitude']['level']));}\n\t\t\tif('integrity' in genExceptionsMasterList['arete'][areteCharacter]) {effectiveIntegrityDice += convertToEpic(nanEqualsZero(genExceptionsMasterList['arete'][areteCharacter]['integrity']['level']));}\n\t\t\tif('investigation' in genExceptionsMasterList['arete'][areteCharacter]) {effectiveInvestigationDice += convertToEpic(nanEqualsZero(genExceptionsMasterList['arete'][areteCharacter]['investigation']['level']));}\n\t\t\tif('larceny' in genExceptionsMasterList['arete'][areteCharacter]) {effectiveLarcenyDice += convertToEpic(nanEqualsZero(genExceptionsMasterList['arete'][areteCharacter]['larceny']['level']));}\n\t\t\tif('marksmanship' in genExceptionsMasterList['arete'][areteCharacter]) {effectiveMarksmanshipDice += convertToEpic(nanEqualsZero(genExceptionsMasterList['arete'][areteCharacter]['marksmanship']['level']));}\n\t\t\tif('medicine' in genExceptionsMasterList['arete'][areteCharacter]) {effectiveMedicineDice += convertToEpic(nanEqualsZero(genExceptionsMasterList['arete'][areteCharacter]['medicine']['level']));}\n\t\t\tif('melee' in genExceptionsMasterList['arete'][areteCharacter]) {effectiveMeleeDice += convertToEpic(nanEqualsZero(genExceptionsMasterList['arete'][areteCharacter]['melee']['level']));}\n\t\t\tif('occult' in genExceptionsMasterList['arete'][areteCharacter]) {effectiveOccultDice += convertToEpic(nanEqualsZero(genExceptionsMasterList['arete'][areteCharacter]['occult']['level']));}\n\t\t\tif('politics' in genExceptionsMasterList['arete'][areteCharacter]) {effectivePoliticsDice += convertToEpic(nanEqualsZero(genExceptionsMasterList['arete'][areteCharacter]['politics']['level']));}\n\t\t\tif('presence' in genExceptionsMasterList['arete'][areteCharacter]) {effectivePresenceDice += convertToEpic(nanEqualsZero(genExceptionsMasterList['arete'][areteCharacter]['presence']['level']));}\n\t\t\tif('science' in genExceptionsMasterList['arete'][areteCharacter]) {effectiveScienceDice += convertToEpic(nanEqualsZero(genExceptionsMasterList['arete'][areteCharacter]['science']['level']));}\n\t\t\tif('stealth' in genExceptionsMasterList['arete'][areteCharacter]) {effectiveStealthDice += convertToEpic(nanEqualsZero(genExceptionsMasterList['arete'][areteCharacter]['stealth']['level']));}\n\t\t\tif('survival' in genExceptionsMasterList['arete'][areteCharacter]) {effectiveSurvivalDice += convertToEpic(nanEqualsZero(genExceptionsMasterList['arete'][areteCharacter]['survival']['level']));}\n\t\t\tif('thrown' in genExceptionsMasterList['arete'][areteCharacter]) {effectiveThrownDice += convertToEpic(nanEqualsZero(genExceptionsMasterList['arete'][areteCharacter]['thrown']['level']));}\n\t\t}\n\t}\n\n\tlargerThanLifeDice = 0;\n\tif(myCharacter['characterPantheon'] == \"Aesir\" && myCharacter['boons']['psp']['pspLevel4'] == true) {\n\t\tlargerThanLifeDice += 2;\n\t}\n\tif(myCharacter['characterPantheon'] == \"Aesir\" && myCharacter['boons']['psp']['pspLevel5'] == true) {\n\t\tlargerThanLifeDice += 2;\n\t}\n\tif(myCharacter['characterPantheon'] == \"Aesir\" && myCharacter['boons']['psp']['pspLevel6'] == true) {\n\t\tlargerThanLifeDice += 1;\n\t}\n\tif(myCharacter['characterPantheon'] == \"Aesir\" && myCharacter['boons']['psp']['pspLevel9'] == true) {\n\t\tlargerThanLifeDice += 4;\n\t}\n\n\tif(genExceptionsMasterList['largerThanLife'][myCharacter['selfName']]) {\n\t\tlargerThanLife = genExceptionsMasterList['largerThanLife'][myCharacter['selfName']]['value1'];\n\t\tswitch (largerThanLife) {\n\t\t\tcase \"academics\":\n\t\t\teffectiveAcademicsDice += largerThanLifeDice;\n\t\t\tbreak;\n\t\t\tcase \"animalken\":\n\t\t\teffectiveAnimalkenDice += largerThanLifeDice;\n\t\t\tbreak;\n\t\t\tcase \"art\":\n\t\t\teffectiveArtDice += largerThanLifeDice;\n\t\t\tbreak;\n\t\t\tcase \"athletics\":\n\t\t\teffectiveAthleticsDice += largerThanLifeDice;\n\t\t\tbreak;\n\t\t\tcase \"awareness\":\n\t\t\teffectiveAwarenessDice += largerThanLifeDice;\n\t\t\tbreak;\n\t\t\tcase \"brawl\":\n\t\t\teffectiveBrawlDice += largerThanLifeDice;\n\t\t\tbreak;\n\t\t\tcase \"command\":\n\t\t\teffectiveCommandDice += largerThanLifeDice;\n\t\t\tbreak;\n\t\t\tcase \"control\":\n\t\t\teffectiveControlDice += largerThanLifeDice;\n\t\t\tbreak;\n\t\t\tcase \"craft\":\n\t\t\teffectiveCraftDice += largerThanLifeDice;\n\t\t\tbreak;\n\t\t\tcase \"empathy\":\n\t\t\teffectiveEmpathyDice += largerThanLifeDice;\n\t\t\tbreak;\n\t\t\tcase \"fortitude\":\n\t\t\teffectiveFortitudeDice += largerThanLifeDice;\n\t\t\tbreak;\n\t\t\tcase \"integrity\":\n\t\t\teffectiveIntegrityDice += largerThanLifeDice;\n\t\t\tbreak;\n\t\t\tcase \"investigation\":\n\t\t\teffectiveInvestigationDice += largerThanLifeDice;\n\t\t\tbreak;\n\t\t\tcase \"larceny\":\n\t\t\teffectiveLarcenyDice += largerThanLifeDice;\n\t\t\tbreak;\n\t\t\tcase \"marksmanship\":\n\t\t\teffectiveMarksmanshipDice += largerThanLifeDice;\n\t\t\tbreak;\n\t\t\tcase \"medicine\":\n\t\t\teffectiveMedicineDice += largerThanLifeDice;\n\t\t\tbreak;\n\t\t\tcase \"melee\":\n\t\t\teffectiveMeleeDice += largerThanLifeDice;\n\t\t\tbreak;\n\t\t\tcase \"occult\":\n\t\t\teffectiveOccultDice += largerThanLifeDice;\n\t\t\tbreak;\n\t\t\tcase \"politics\":\n\t\t\teffectivePoliticsDice += largerThanLifeDice;\n\t\t\tbreak;\n\t\t\tcase \"presence\":\n\t\t\teffectivePresenceDice += largerThanLifeDice;\n\t\t\tbreak;\n\t\t\tcase \"science\":\n\t\t\teffectiveScienceDice += largerThanLifeDice;\n\t\t\tbreak;\n\t\t\tcase \"stealth\":\n\t\t\teffectiveStealthDice += largerThanLifeDice;\n\t\t\tbreak;\n\t\t\tcase \"survival\":\n\t\t\teffectiveSurvivalDice += largerThanLifeDice;\n\t\t\tbreak;\n\t\t\tcase \"thrown\":\n\t\t\teffectiveThrownDice += largerThanLifeDice;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif(myCharacter['characterPantheon'] == \"Annuna\" && myCharacter['boons']['psp']['pspLevel2'] == true) {\n\t\tif(myCharacter['relics']['Me']) {\n\t\t\tfor(var channel in myCharacter['relics']['Me']['channels']) {\n\t\t\t\tswitch(channel) {\n\t\t\t\t\tcase \"animal\":\n\t\t\t\t\t\teffectiveAnimalkenDice += effectiveNumberAnimal;\n\t\t\t\t\t\teffectiveSurvivalDice += effectiveNumberAnimal;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"chaos\":\n\t\t\t\t\t\teffectiveEmpathyDice += effectiveNumberChaos;\n\t\t\t\t\t\teffectivePresenceDice += effectiveNumberChaos;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"creation\":\n\t\t\t\t\t\teffectiveArtDice += effectiveNumberCreation;\n\t\t\t\t\t\teffectiveCraftDice += effectiveNumberCreation;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"darkness\":\n\t\t\t\t\t\teffectiveLarcenyDice += effectiveNumberDarkness;\n\t\t\t\t\t\teffectiveStealthDice += effectiveNumberDarkness;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"death\":\n\t\t\t\t\t\teffectiveCommandDice += effectiveNumberDeath;\n\t\t\t\t\t\teffectiveOccultDice += effectiveNumberDeath;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"earth\":\n\t\t\t\t\t\teffectiveFortitudeDice += effectiveNumberEarth;\n\t\t\t\t\t\teffectiveSurvivalDice += effectiveNumberEarth;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"fertility\":\n\t\t\t\t\t\teffectiveMedicineDice += effectiveNumberFertility;\n\t\t\t\t\t\teffectiveSurvivalDice += effectiveNumberFertility;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"fire\":\n\t\t\t\t\t\teffectiveArtDice += effectiveNumberFire;\n\t\t\t\t\t\teffectiveEmpathyDice += effectiveNumberFire;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"frost\":\n\t\t\t\t\t\teffectiveCommandDice += effectiveNumberFrost;\n\t\t\t\t\t\teffectiveFortitudeDice += effectiveNumberFrost;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"guardian\":\n\t\t\t\t\t\teffectiveAwarenessDice += effectiveNumberGuardian;\n\t\t\t\t\t\teffectiveIntegrityDice += effectiveNumberGuardian;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"health\":\n\t\t\t\t\t\teffectiveFortitudeDice += effectiveNumberHealth;\n\t\t\t\t\t\teffectiveMedicineDice += effectiveNumberHealth;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"illusion\":\n\t\t\t\t\t\teffectiveLarcenyDice += effectiveNumberIllusion;\n\t\t\t\t\t\teffectivePoliticsDice += effectiveNumberIllusion;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"justice\":\n\t\t\t\t\t\teffectiveIntegrityDice += effectiveNumberJustice;\n\t\t\t\t\t\teffectiveInvestigationDice += effectiveNumberJustice;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"moon\":\n\t\t\t\t\t\teffectiveAwarenessDice += effectiveNumberMoon;\n\t\t\t\t\t\teffectiveOccultDice += effectiveNumberMoon;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"psychopomp\":\n\t\t\t\t\t\teffectiveAthleticsDice += effectiveNumberPsychopomp;\n\t\t\t\t\t\teffectiveControlDice += effectiveNumberPsychopomp;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"sky\":\n\t\t\t\t\t\teffectiveMarksmanshipDice += effectiveNumberSky;\n\t\t\t\t\t\teffectiveThrownDice += effectiveNumberSky;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"star\":\n\t\t\t\t\t\teffectiveAcademicsDice += effectiveNumberStar;\n\t\t\t\t\t\teffectiveSurvivalDice += effectiveNumberStar;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"sun\":\n\t\t\t\t\t\teffectiveCommandDice += effectiveNumberSun;\n\t\t\t\t\t\teffectivePresenceDice += effectiveNumberSun;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"thunder\":\n\t\t\t\t\t\teffectiveSurvivalDice += effectiveNumberThunder;\n\t\t\t\t\t\teffectiveThrownDice += effectiveNumberThunder;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"war\":\n\t\t\t\t\t\teffectiveMarksmanshipDice += effectiveNumberWar;\n\t\t\t\t\t\teffectiveMeleeDice += effectiveNumberWar;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"water\":\n\t\t\t\t\t\teffectiveAthleticsDice += effectiveNumberWater;\n\t\t\t\t\t\teffectiveFortitudeDice += effectiveNumberWater;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\teffectiveAcademicsSucc = nanEqualsZero(myTempSucc.academics);\n\teffectiveAnimalkenSucc = nanEqualsZero(myTempSucc.animalken);\n\teffectiveArtSucc = nanEqualsZero(myTempSucc.art);\n\teffectiveAthleticsSucc = nanEqualsZero(myTempSucc.athletics);\n\teffectiveAwarenessSucc = nanEqualsZero(myTempSucc.awareness);\n\teffectiveBrawlSucc = nanEqualsZero(myTempSucc.brawl);\n\teffectiveCommandSucc = nanEqualsZero(myTempSucc.command);\n\teffectiveControlSucc = nanEqualsZero(myTempSucc.control);\n\teffectiveCraftSucc = nanEqualsZero(myTempSucc.craft);\n\teffectiveEmpathySucc = nanEqualsZero(myTempSucc.empathy);\n\teffectiveFortitudeSucc = nanEqualsZero(myTempSucc.fortitude);\n\teffectiveIntegritySucc = nanEqualsZero(myTempSucc.integrity);\n\teffectiveInvestigationSucc = nanEqualsZero(myTempSucc.investigation);\n\teffectiveLarcenySucc = nanEqualsZero(myTempSucc.larceny);\n\teffectiveMarksmanshipSucc = nanEqualsZero(myTempSucc.marksmanship);\n\teffectiveMedicineSucc = nanEqualsZero(myTempSucc.medicine);\n\teffectiveMeleeSucc = nanEqualsZero(myTempSucc.melee);\n\teffectiveOccultSucc = nanEqualsZero(myTempSucc.occult);\n\teffectivePoliticsSucc = nanEqualsZero(myTempSucc.politics);\n\teffectivePresenceSucc = nanEqualsZero(myTempSucc.presence);\n\teffectiveScienceSucc = nanEqualsZero(myTempSucc.science);\n\teffectiveStealthSucc = nanEqualsZero(myTempSucc.stealth);\n\teffectiveSurvivalSucc = nanEqualsZero(myTempSucc.survival);\n\teffectiveThrownSucc = nanEqualsZero(myTempSucc.thrown);\n}", "function outcomes_employability_keywords(skill, parsed) {\n\tvar i, keywords;\n\tvar skills = [];\n\tfor (i = 0; i < skill.length; i++) {\n\t\tkeywords = outcomes_keyword_match(skill[i].list, parsed);\n\t\tif (keywords.length > 0) {\n\t\t\tskills.push(skill[i].name);\n\t\t}\n\t}\n\treturn skills;\n}", "evaluate() {\n let highest = 0.0;\n let index = 0;\n for (let i = 0; i < this.population.length; i++) {\n if (this.population[i].fitness > highest) {\n index = i;\n highest = this.population[i].fitness;\n }\n }\n\n this.best = this.population[index].getPhrase();\n if (highest === this.perfectScore) {\n this.finished = true;\n }\n }", "function showMatch() {\n for (var i = 0; i < doneScoreArr.length; i++) {\n if (doneScoreArr[i] < lowestScore) {\n lowestScore = doneScoreArr[i];\n }\n }\n\n console.log(\"Lowest Score \" + lowestScore);\n\n for (var i = 0; i < doneScoreArr.length; i++) {\n if (lowestScore === doneScoreArr[i]) {\n // console.log(surveyData[i])\n bestMatch = surveyData[i];\n }\n }\n}", "function MATCH()\n{\n if(arguments.length==0)\n {\n alert(\"please enter parameter into function \");\n return \"=MATCH()\";\n }\n \n for(var i=1;i<arguments.length-1;i++)\n {\n \n if(arguments[0]==arguments[i])\n\n {\n return i;\n }\n \n \n }\n\n \n\n return \"#NAME?\";\n\n}", "function findMatches(arr, compareStr, target) {\n let results = [];\n for(let obj of arr) {\n let added = false;\n let current = obj[compareStr].toLowerCase().trim();\n if(current.startsWith(target)) {\n results.push(obj);\n added = true;\n }\n // if not already added, check for match within any word in name\n if(!added) {\n // spitting up name by words allows for search within any word in name\n let words = current.split(' ');\n let targets = target.split(' ');\n // if any words start with any targets, match\n for(let i=0; i<targets.length && !added; i++) {\n for(let j=0; j<words.length && !added; j++) {\n if(words[j].startsWith(targets[i])) {\n results.push(obj);\n added = true;\n }\n }\n }\n }\n }\n return results;\n}", "function solve(a0, a1, a2, b0, b1, b2){\n let result = [0, 0];\n\n let alice = [a0, a1, a2];\n let bob = [b0, b1, b2];\n\n alice.forEach((aRating, index) => {\n let bRating = bob[index];\n aRating > bRating && result[0]++;\n bRating > aRating && result[1]++;\n })\n\n return result;\n\n}", "function findMatch() {\r\n // take search input and make all lower case (so that we can check case-insensitively)\r\n // also split the word up into space separated bits to check for partial searches\r\n let searchName = document.getElementById(\"search\").value.toString().toUpperCase().trim();\r\n\r\n // build our output of people that match the search\r\n let result = \"\";\r\n\r\n // loop through our JSON object to see if we have name matches from our search\r\n\r\n for(let i = 0; i < people.length; i++) {\r\n if(people[i].name.toString().toUpperCase().startsWith(searchName)) {\r\n result += \"Name: \" + people[i].name + \"<br>\" +\r\n \"Address: \" + people[i].address + \"<br>\" +\r\n \"Age: \" + people[i].age + \"<br>\" +\r\n \"Interests: \" + people[i].interest + \"<br>\" +\r\n \"picture: \" + '<img src=\"'+people[i].img+'\" alt=\"pictures\">' + \"<br>\";\r\n }\r\n }\r\n // display result in the HTML\r\n if(result === \"\") {\r\n document.getElementById(\"result\").innerHTML = \"No match found.\";\r\n } else {\r\n document.getElementById(\"result\").innerHTML = result;\r\n }\r\n}", "function bestOf (query, candidates) {\n return candidates.map(function (candidate) {\n return getLevenshteinDistance(query, candidate);\n }).sort(function (p, q) {\n if (p < q) { return -1; }\n if (p > q) { return 1; }\n return 0;\n }).filter(function (item, idx) {\n return idx === 0;\n });\n }", "function findMatches(filmographs)\n{\n //Array of matched films\n var matchFilms = [];\n var filmography = [];\n\n //Fill an array of selected actors' filmographies\n for(var actor in selected)\n {\n filmography.push(actor.data.filmography);\n }\n\n //Find films that are contained in each actor's filmographies\n for(var film in filmography[0])\n {\n for(var j = 1; j < filmography.length; j++)\n {\n var allHave = false;\n\n for(var compFilm in filmography[j])\n {\n if(film.title === compFilm.title)//Match?\n {\n allHave = true;\n break;\n }\n }\n //Check if the reference film was found in current actor's filmography\n if(allHave)\n {\n //Found reference film in current filmography, continue to next actor\n continue;\n }\n else\n {\n //Break search loop because at least one actor was not in the reference film\n break;\n }\n }\n if(allHave)\n {\n //Add to match array\n matchFilms.push(film.title);\n }\n }\n return matchFilms;\n}", "evaluate() {\n let worldrecord = -1;\n let index = 0;\n for (let i = 0; i < this.population.length; i++) {\n if (this.population[i].fitness > worldrecord) {\n index = i;\n worldrecord = this.population[i].fitness;\n }\n }\n \n this.best = this.population[index].getPhrase();\n }", "function calculateSkillPoints(score, manualArgs = null) {\n\t//Use the current game settings by default.\n\tlet game_speed = GAME_SPEED;\n\tlet num_rows = NUM_ROWS;\n\tlet num_cols = NUM_COLS;\n\tlet available_fruit = AVAILABLE_FRUIT;\n\tlet fruit_effect = FRUIT_EFFECT;\n\t\n\t//But use arbitrary game settings if given.\n\tif (manualArgs !== null) {\n\t\tgame_speed = manualArgs.game_speed;\n\t\tnum_rows = manualArgs.num_rows;\n\t\tnum_cols = manualArgs.num_cols;\n\t\tavailable_fruit = manualArgs.available_fruit;\n\t\tfruit_effect = manualArgs.fruit_effect;\n\t}\n\t\n\tif (score == \"WIN\") { score = (num_rows * num_cols)-3; }\n\t//My forumla for calculating skill points:\n\tlet skillPoints = Math.pow(1.625, game_speed) * (score/((num_rows*num_cols)-3)) * score * (1/available_fruit) * (1/fruit_effect);\n\tskillPoints = skillPoints.toFixed(2);\n\treturn parseFloat(skillPoints);\n}", "function compare(userChoice){\r\n let robotChoice = roboChoice();\r\n let score;\r\n\r\n if(userChoice == robotChoice){\r\n score = 2;\r\n }\r\n else if(userChoice == \"rock\" && robotChoice == \"scissors\"){\r\n score = 1;\r\n }\r\n else if(userChoice == \"scissors\" && robotChoice == \"rock\"){\r\n score = 0;\r\n }\r\n else if(userChoice == \"paper\" && robotChoice == \"rock\"){\r\n score = 1;\r\n }\r\n else if(userChoice == \"rock\" && robotChoice == \"paper\"){\r\n score = 0;\r\n }\r\n else if(userChoice == \"paper\" && robotChoice == \"scissors\"){\r\n score = 0;\r\n }\r\n else if(userChoice == \"scissors\" && robotChoice == \"paper\"){\r\n score = 1;\r\n }\r\n else{\r\n score = 2;\r\n } \r\n\r\n return score;\r\n\r\n}", "function compatibilityTest(scores) {\n\tvar match = {};\n\tvar matchIndex = 0;\n\tvar sum = 0;\n\tfor (var i=0; i<friends.length; i++) {\n\t\tvar tempSum = 0;\n\n\t\t// Get the diff between each score for a given friend and the new friend\n\t\t// Add them up together\n\t\tfor (var j=0; j<friends[i].answers.length; j++) {\n\t\t\tvar friendScore = parseInt(scores[j]);\n\t\t\tvar matchScore = parseInt(friends[i].answers[j]);\n\t\t\tif (matchScore > friendScore) {\n\t\t\t\ttempSum += (matchScore - friendScore);\n\t\t\t} else {\n\t\t\t\ttempSum += (friendScore - matchScore);\n\t\t\t}\n\t\t}\n\n\t\tif (tempSum == 0) {\n\t\t\t//Exact Match\n\t\t\tmatchIndex = i;\n\t\t\tbreak;\n\t\t}\n\n\t\tif (sum == 0 || sum > tempSum) {\n\t\t\t//Best match so far\n\t\t\tsum = tempSum;\n\t\t\tmatchIndex = i;\n\t\t}\n\t}\n\n\t// Let us send the name and photo of the friend that best matched\n\tmatch.name = friends[matchIndex].name;\n\tmatch.photo = friends[matchIndex].photo;\n\treturn match;\n}", "function findMatch() {\n for (i = 0; i < convertedArray.length; i++) {\n var difference = convertedArray[i] - friendScore[i]\n // console.log(\"difference\" + difference);\n absoluteDiff = Math.abs(difference);\n differenceArray.push(absoluteDiff);\n doneScore = differenceArray.reduce(reducer);\n };\n doneScoreArr.push(doneScore);\n console.log(\"doneScoreArray\" + doneScoreArr);\n}", "function calculateScores(team) {\n let team_matches = stand_data[team];\n let overall_scores = []; // an array of each score for each match\n let num_hatches = []; // num of hatch for a match\n let num_cargo = []; // num of cargo for a match\n for (let match_index in team_matches) {\n let match = team_matches[match_index];\n overall_scores.push(calculateScore(match));\n num_hatches.push(calculateNumGamePieces(match, \"Hatch\"));\n num_cargo.push(calculateNumGamePieces(match, \"Cargo\"));\n }\n return [overall_scores, num_hatches, num_cargo];\n}", "analizeTeam(filtered, teamName, options = { mode: 'winlose', sub: 'ow', limit: 0, arg: 0 }) {\n console.log('analizeOptions', options)\n const games = [...filtered.matchesInfo].reverse()\n\n const wlHelpDict = { 'w': 'НП', 'l': 'НВ', 'd': 'ВП', 'wl': 'Н', 'wd': 'П', 'ld': 'В' }\n\n let wlSeq, goalsReps, hitgateReps\n\n if (options.mode == 'winlose') {\n wlSeq = games.map(x => x.result).join('')\n\n if (options.sub[0] == 'o') {\n const removeChars = wlHelpDict[options.sub[1]]\n wlSeq = wlSeq.replace(new RegExp(removeChars.split('').join('|'), 'g'), '.').split('.').map(x => x.length)\n\n } else {\n wlSeq = wlSeq.split(wlHelpDict[options.sub]).map(x => x.length)\n }\n } else if (options.mode == 'goals') {\n const nameCompare = (matchObj) => matchObj.name.split('(')[0].trim().toLowerCase() === teamName.toLowerCase()\n const operationCompare = (a, b, op = '=') => ({ '=': a === b, '<': a < b, '>': a > b, '<=': a <= b, '>=': a >= b }[op])\n\n if (options.sub == 'sumtotal') {\n goalsReps = games.map(x => +x.first.filteredGoals + +x.second.filteredGoals).map(x => operationCompare(x, options.arg, options.operation) ? 1 : '-').join('').split('-').map(x => x.length)\n } else if (options.sub == 'total') {\n goalsReps = games.map(x => nameCompare(x.first) ? x.first.filteredGoals : x.second.filteredGoals).map(x => operationCompare(+x, options.arg, options.operation) ? 1 : '-').join('').split('-').map(x => x.length)\n } else if (options.sub == 'missed') {\n goalsReps = games.map(x => nameCompare(x.first) ? x.second.filteredGoals : x.first.filteredGoals).map(x => operationCompare(+x, options.arg, options.operation) ? 1 : '-').join('').split('-').map(x => x.length)\n } else {\n goalsReps = games.map(x => nameCompare(x.first) ? x.first.filteredGoals - x.second.filteredGoals : x.second.filteredGoals - x.first.filteredGoals).map(x => +x > -options.arg ? 1 : '-').join('').split('-').map(x => x.length)\n }\n } else if (options.mode == 'hitgate') {\n if (options.sub == 'both') {\n hitgateReps = games.map(x => +(x.first.goals > 0 && x.second.goals > 0)).join('').replace(/0/g, '.').split('.').map(x => x.length)\n } else if (options.sub == 'onenot') {\n hitgateReps = games.map(x => +(x.first.goals == 0 || x.second.goals == 0)).join('').replace(/0/g, '.').split('.').map(x => x.length)\n } else { // onezero\n hitgateReps = games.map(x => +!!(x.first.goals > 0 ^ x.second.goals > 0)).join('').replace(/0/g, '.').split('.').map(x => x.length)\n }\n }\n\n const reps = wlSeq || goalsReps || hitgateReps\n const saveIndexes = []\n const fullIndexes = []\n const series = []\n\n const red = reps.reduce((a, b) => {\n if (b >= options.limit) {\n saveIndexes.push(a + Math.min(b, options.limit))\n fullIndexes.push(a + b)\n series.push(b)\n }\n return a + b + 1\n }, 0)\n\n return { saveIndexes, fullIndexes, gamesAfterLimit: saveIndexes.map(x => games[x]), reps, series }\n }", "function matchgreet(words){\n for (var k = 0; k<words.length; k++){\n for (var j = 0; j<greet_key.length; j++){\n if(words[k]==greet_key[j]){\n return greet_resp[j]\n }}\n }}", "function tournamentWinner(competitions, results){\n let compObj = {}\n // This creates a hashmap like \"Python\": 6, \"HTML\": 3 which is a point basis\n for (let i = 0; i < competitions.length; i++){\n if (results[i] == 0){ // This denotes that away team won\n let awayWinner = competitions[i][1] // 1 index points to away team.\n if (compObj[awayWinner] === undefined){\n compObj[awayWinner] = 3\n } else {\n compObj[awayWinner]++\n }\n } else {\n let homeWinner = competitions[i][0] // 0 index points to home team\n if (compObj[homeWinner] == undefined){\n compObj[homeWinner] = 3\n } else {\n compObj[homeWinner]++\n }\n }\n }\n\n let max = 0;\n let winner;\n for (const[key, value] of Object.entries(compObj)){\n if (value > max){\n max = value;\n winner = key;\n }\n }\n return winner;\n}", "function findClosestMatch(){\n // console.log(\"Adding both first scores\", parseInt(mario) + parseInt(me));\n\n console.log('findClosestMatch called')\n var postedData = req.body[\"scores[]\"]\n // console.log(\" posted data is \" + postedData);\n var match = friends[0]\n var smallestDiffrence = Infinity;\n for (i = 0; i < friends.length; i++ ){\n console.log('inside outer loop')\n var currentFriendScores = friends[i].scores;\n var totalDifference = 0;\n for (j = 0; j < currentFriendScores.length; j++){\n console.log('inside inner loop')\n var diff = parseInt(postedData[j]) - parseInt(currentFriendScores[j]);\n diff = Math.abs(diff);\n totalDifference += diff;\n }\n if(totalDifference < smallestDiffrence){\n smallestDiffrence = totalDifference;\n match = friends[i];\n }\n\n }\n console.log('in findClosestMatch')\n return match;\n }", "function evaluateSearchMatches(matchedInputArray) {\n removeElements($('.exit-div')[0],\n $('.no-match')[0],\n $('.under-eleven')[0],\n $('.over-ten')[0]);\n const $exitDiv = createExitDiv();\n $($pageDiv).append($exitDiv);\n if(matchedInputArray.length === 0) {\n const $p = createSearchMessage('no-match', 'Sorry, no students found based on the search term \"' + $inputValue + '\".');\n $($p).insertBefore($exitDiv);\n } else if(matchedInputArray.length < 11) {\n const $p = createSearchMessage('under-eleven',\n 'The search term \"' + $inputValue + '\" produced ' + matchedInputArray.length + ' result(s).');\n $($p).insertBefore($studentUl);\n showPage(1, matchedInputArray);\n } else {\n pageNumber = '1';\n const $p = createSearchMessage('over-ten',\n 'The search term \"' + $inputValue + '\" produced ' + matchedInputArray.length + ' result(s).');\n $($p).insertBefore($studentUl);\n appendPageLinks(matchedInputArray);\n showPage(1, matchedInputArray);\n }\n}", "function computeScore([low, mid]) {\n console.log(low, mid)\n}", "cardMatch(card1, card2) {\n matchedCards.push(card1); \n matchedCards.push(card2);\n card1.classList.add(\"matched\");\n card2.classList.add(\"matched\");\n this.audioController.match();\n if (matchedCards.length === cardCount[difficulty]) {\n this.victory();\n }\n }", "function similarityIndexes(userFrom, userTo, criteria){\n\tif(criteria.criteria == 'Movie'){\n\t//music\n\t\tLM1 = userFrom.movies.liked;\n\t\tLM2 = userTo.movies.liked;\n\t\tDM1 = userFrom.movies.disliked;\n\t\tDM2 = userTo.movies.disliked;\n\n\t\tmoviesIndex = modifiedJaccard(LM1, LM2, DM1, DM2);\n\t\treturn moviesIndex;\n\t}else if (criteria.criteria == 'Show'){\n\n\t//shows\n\t\tLS1 = userFrom.shows.liked;\n\t\tLS2 = userTo.shows.liked;\n\t\tDS1 = userFrom.shows.disliked;\n\t\tDS2 = userTo.shows.disliked;\n\n\t\tshowsIndex = modifiedJaccard(LS1, LS2, DS1, DS2);\n\t\treturn showsIndex;\n\t}else if(criteria.criteria == 'Track'){\n\t//tracks\n\t\tLT1 = userFrom.tracks.liked;\n\t\tLT2 = userTo.tracks.disliked;\n\t\tDT1 = userFrom.tracks.disliked;\n\t\tDT2 = userTo.tracks.disliked;\n\n\t\ttracksIndex = modifiedJaccard(LT1, LT2, DT1, DT2);\n\t\treturn tracksIndex;\n\t}else if(criteria.criteria == 'Place'){\n\t\t//places\n\t\tLP1 = userFrom.places.liked;\n\t\tLP2 = userTo.places.liked;\n\t\tDP1 = userFrom.places.disliked;\n\t\tDP2 = userTo.places.disliked;\n\n\t\tplaceIndex = modifiedJaccard(LP1, LP2, DP1, DP2);\n\t\treturn placeIndex;\n\t}else if(criteria.criteria == 'Book'){\n\t//books\n\t\tLB1 = userFrom.books.liked;\n\t\tLB2 = userTo.books.liked;\n\t\tDB1 = userFrom.books.disliked;\n\t\tDB2 = userTo.books.disliked;\n\n\t\tbookIndex = modifiedJaccard(LB1, LB2, DB1, DB2);\n\t\treturn bookIndex;\n\t}\n}", "function findFriend(userData){\n var matchedFriendScore = 100000;\n var matchedFriend = null;\n \n //converting user data scores to integers\n for(var i=0;i<userData.scores.length;i++){\n userData.scores[i]=parseInt(userData.scores[i]);\n }\n\n // Compare the difference between current user's scores against those from other users, question by question. Add up the differences to calculate the `totalDifference`.\n // * Example: \n // * User 1: `[5, 1, 4, 4, 5, 1, 2, 5, 4, 1]`\n // * User 2: `[3, 2, 6, 4, 5, 1, 2, 5, 4, 1]`\n // * Total Difference: **2 + 1 + 2 =** **_5_**\n\n //compare user data to other friends in friend array\n for (var i=0;i<friendData.length;i++){\n\n //reset friendScore for each friend in the array\n var friendScore = 0;\n \n //calculate friend score by comparing all user and friend scores.\n for (var j=0;j<friendData[i].scores.length;j++){\n friendScore += Math.abs(userData.scores[j]-friendData[i].scores[j]);\n }\n \n //if the friend has the current lowest score, set them to the matched friend\n if(friendScore < matchedFriendScore){\n matchedFriendScore = friendScore;\n matchedFriend = friendData[i];\n }\n }\n //add user to the friendData array so they are available for new searches\n //future implementation of this should store data in database.\n friendData.push(userData);\n\n //return object of matched friend.\n return(matchedFriend); \n }" ]
[ "0.59509116", "0.5862599", "0.5837954", "0.57781386", "0.5654197", "0.5591687", "0.5563011", "0.55531454", "0.5536104", "0.5518001", "0.5508716", "0.55009043", "0.54773307", "0.5431363", "0.54272795", "0.5406172", "0.54042715", "0.5384472", "0.5379751", "0.536157", "0.53484875", "0.5327695", "0.5321244", "0.527784", "0.5272378", "0.52723455", "0.5266814", "0.526034", "0.5241093", "0.52401716", "0.52390707", "0.52091265", "0.51987416", "0.51810455", "0.5141981", "0.51397383", "0.5134694", "0.5133415", "0.51276964", "0.5121478", "0.5106608", "0.5072317", "0.505587", "0.50462776", "0.50381756", "0.5032929", "0.5023318", "0.5019515", "0.5014917", "0.5006585", "0.5006566", "0.5006078", "0.50007266", "0.50001186", "0.4991521", "0.4990484", "0.4983338", "0.4983119", "0.49823728", "0.49741873", "0.49711594", "0.4968452", "0.49676633", "0.49653137", "0.49517432", "0.49487498", "0.4944223", "0.49357373", "0.49313617", "0.492881", "0.4914949", "0.49120712", "0.4911268", "0.49100244", "0.4901988", "0.4896691", "0.4893154", "0.48914066", "0.48815247", "0.48804706", "0.4876419", "0.4873989", "0.4871938", "0.48689985", "0.48686892", "0.48671594", "0.48573822", "0.4857374", "0.48478368", "0.4843429", "0.4843251", "0.48419255", "0.4838064", "0.48335734", "0.48311657", "0.48295933", "0.4828146", "0.48278463", "0.48276404", "0.48243368" ]
0.68565404
0
Action functions that the hero can use to attack and heal
function attack(attacker, defender) { return defender - attacker; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function damageStep(actionOne, actionTwo) {\n disableTwo();\n if (actionOne === \"attack\" && actionTwo === \"attack\") {\n doubleAttack(playerOne, playerTwo, \"#healthTwo\", \"#healthOne\");\n showAnimation(\"#animateAttackOne\", 900);\n showAnimation(\"#animateAttackTwo\", 900);\n enableOne();\n } else if (actionOne === \"attack\" && actionTwo === \"strongAttack\") {\n attackPlayer(playerOne, playerTwo, \"#healthTwo\");\n showAnimation(\"#animateAttackTwo\", 900);\n strAttack(playerTwo, playerOne, \"#healthOne\");\n showAnimation(\"#animateStrongOne\", 1400);\n enableOne();\n } else if (actionOne === \"attack\" && actionTwo === \"defense\") {\n defendSelf(playerOne, playerTwo, \"#health2\");\n showAnimation(\"#animateAttackTwo\", 900);\n showAnimation(\"#animateDefendTwo\", 1400);\n enableOne();\n } else if (actionOne === \"attack\" && actionTwo === \"counter\") {\n counter(playerOne, playerTwo, \"#healthOne\", \"#healthTwo\");\n showAnimation(\"#animateAttackTwo\", 900);\n showAnimation(\"#animateCounterOne\", 450);\n enableOne();\n } else if (actionOne === \"defense\" && actionTwo === \"attack\") {\n defendSelf(playerTwo, playerOne, \"#healthOne\");\n showAnimation(\"#animateDefendOne\", 1400);\n showAnimation(\"#animateAttackOne\", 900);\n enableOne();\n } else if (actionOne === \"defense\" && actionTwo === \"strongAttack\") {\n defendSelfStr(playerTwo, playerOne, \"#healthOne\");\n showAnimation(\"#animateDefendOne\", 1400);\n showAnimation(\"#animateStrongOne\", 1400);\n\n enableOne();\n } else if (actionOne === \"defense\" && actionTwo === \"defense\") {\n doubleDefense(playerOne, playerTwo);\n showAnimation(\"#animateDefendOne\", 1400);\n showAnimation(\"#animateDefendTwo\", 1400);\n enableOne();\n } else if (actionOne === \"defense\" && actionTwo === \"counter\") {\n defendCounter(playerOne, playerTwo);\n showAnimation(\"#animateDefendOne\", 1400);\n\n enableOne();\n } else if (actionOne === \"strongAttack\" && actionTwo === \"attack\") {\n attackPlayer(playerTwo, playerOne, \"#healthOne\");\n showAnimation(\"#animateStrongTwo\", 1400);\n showAnimation(\"#animateAttackOne\", 900);\n strAttack(playerOne, playerTwo, \"#healthTwo\");\n enableOne();\n } else if (actionOne === \"strongAttack\" && actionTwo === \"defense\") {\n defendSelfStr(playerOne, playerTwo, \"#healthTwo\");\n showAnimation(\"#animateStrongTwo\", 1400);\n showAnimation(\"#animateDefendTwo\", 1400);\n\n enableOne();\n } else if (actionOne === \"strongAttack\" && actionTwo === \"strongAttack\") {\n strAttack(playerOne, playerTwo, \"#healthTwo\");\n strAttack(playerTwo, playerOne, \"#healthOne\");\n showAnimation(\"#animateStrongTwo\", 1400);\n showAnimation(\"#animateStrongOne\", 1400);\n enableOne();\n } else if (actionOne === \"strongAttack\" && actionTwo === \"counter\") {\n strCounter(playerOne, playerTwo, \"#healthOne\", \"#healthTwo\");\n showAnimation(\"#animateStrongTwo\", 1400);\n showAnimation(\"#animateStrongCounterOne\", 1000);\n\n enableOne();\n } else if (actionOne === \"counter\" && actionTwo === \"attack\") {\n counter(playerTwo, playerOne, \"#healthTwo\", \"#healthOne\");\n showAnimation(\"#animateAttackOne\", 900);\n showAnimation(\"#animateCounterTwo\", 450);\n enableOne();\n } else if (actionOne === \"counter\" && actionTwo === \"strongAttack\") {\n strCounter(playerTwo, playerOne, \"#healthTwo\", \"#healthOne\");\n showAnimation(\"#animateStrongCounterTwo\", 1000);\n showAnimation(\"#animateStrongOne\", 1400);\n enableOne();\n } else if (actionOne === \"counter\" && actionTwo === \"defense\") {\n defendCounter(playerTwo, playerOne);\n showAnimation(\"#animateDefendTwo\", 1500);\n\n enableOne();\n } else if (actionOne === \"counter\" && actionTwo === \"counter\") {\n doubleCounter(playerOne, playerTwo);\n enableOne();\n }\n}", "async attack (action_) { _attack (action_); }", "function heal() {\n // Do something...\n}", "attack(youHero) {\n if (this.name === ennemies[0].name) {\n if (Math.floor(Math.random() * Math.floor(9)) / 10 <= this.accuracy) {\n \n console.log(\n youHero.name +\n \" got hit with an alien Z * mizzle, their health is down to\"\n );\n console.log((youHero.hull += -7)); /// had it set to this . mizzle but somehting was not working with it or the random number so I hard coded it... sorry\n defeat(youHero); /// like above -_- but did you die?\n } else {\n console.log(this.name + \" can not hit the side of a barn\"); /// so you know who next target is when they appear but miss\n console.log(\n \"Ha! those aliens shoot like stormtroopers \" +\n youHero.name +\n \"took no damage. Hull power = \" +\n youHero.hull\n ); /// you know they missed\n defeat(youHero); /// no damage awesome but return to your move with this\n }\n } else {\n console.log(\"dead aliens can't shoot\"); // not sure how they would but just in case if simulating in console log with pre typed functions...\n //return to your move\n defeat(youHero);\n }\n }", "action(type, damage) {\n const totalDamage = damage + this.player1.magicStatus();\n console.log(totalDamage + ', ' + this.player1.magicStatus());\n\n if (type === 'Attack') {\n if (this.dojoBoss.returnBossArmour() >= totalDamage) {\n this.dojoBoss.decreaseArmour(totalDamage);\n } else {\n const take = totalDamage - this.dojoBoss.returnBossArmour();\n this.dojoBoss.decreaseArmour(totalDamage);\n this.dojoBoss.decreaseHealth(take);\n }\n this.player1.clearMagic();\n } else if (type === 'Magic') {\n this.player1.changeMagicStatus(damage);\n // is this a c or s lmao\n } else if (type === 'Defence') {\n this.player1.addDefence(totalDamage);\n this.player1.clearMagic();\n }\n }", "function attack() {\n // Do something...\n}", "function attackMonsterHandler () {\n attackMonster(modeAttack);\n}", "attack(attackName) {\n _target.health -= _target.attacks[attackName]\n if (_target.health < 0) {\n _target.health = 0\n }\n }", "hitEnemy(attackType){\n console.log('in hit enemy:', attackType, this.hero.dashing);\n if (this.knockUp) console.log('hit in th eair');\n if(!this.knockEnemy && !this.checkDelaySum(this.hitDelay))\n {\n this.hitDelay = this.setDelay(this.hitDelaySet);\n this.health--;\n switch(attackType){\n case \"tapAttack\":\n this.knockResistance > 0 ? this.knockHit() : this.knockEnemyBack(this.knockNormal);\n break;\n case \"tapAttack\":\n this.knockResistance > 0 ? this.knockHit() : this.knockEnemyBack(this.knockNormal);\n break;\n case \"duckAttack\":\n this.knockEnemyUp();\n break;\n case \"dashAttack\":\n this.knockEnemyBack(this.knockStrong);\n break;\n case \"collision_\":\n this.knockEnemyBack(this.knockNormal);\n default:\n // console.log('heyo');\n }\n }\n }", "function randomAttack() {\n let enemyAction = Math.floor(Math.random() * 3);\n showEnemyAction(enemyAction);\n if (enemyAction === 0 && myAction === 1) {\n\n attackVsFeint();\n } else if (enemyAction === 2 && myAction === 2 || enemyAction === 1 && myAction === 1 || enemyAction === 0 && myAction === 0) {\n tie();\n } else if (enemyAction === 0 && myAction === 2) {\n feintVsAttack();\n } else if (enemyAction === 1 && myAction === 0) {\n feintVsAttack();\n } else if (enemyAction === 1 && myAction === 2) {\n heroBlockSound.play();\n attackVsFeint();\n } else if (enemyAction === 2 && myAction === 0) {\n\n attackVsFeint();\n } else if (enemyAction === 2 && myAction === 1) {\n heroBlockSound.play();\n feintVsAttack()\n }\n\n console.log(enemyAction + ' enemy action');\n\n}", "function strongAttackHandler() {\n attackMonster(modeStrongAttack);\n\n}", "attack (enemy) {\n\n this.moraleBuff ();\n\n var atkRoll = this.atk * Math.random();\n var defRoll = enemy.def * Math.random();\n var dmg = (atkRoll - defRoll);\n\n if (dmg > 0) {\n var rndDmg = Math.floor(dmg);\n window.socket.emit('attack', rndDmg);\n this.armyMorale(3);\n enemy.takeDmg(rndDmg);\n return 1;\n\n } else {\n window.socket.emit('attackMiss');\n console.log('Swing and a miss, morale bar will not change');\n return 0;\n }\n // enemy.troops -= 100;\n\n }", "onAction() {\n\n // Update all the monsters\n if(this.monsters instanceof Array) {\n this.monsters.forEach((monster) => {\n if(!monster.isDead) {\n if(monster.onAction instanceof Function) {\n monster.onAction()\n }\n }\n })\n }\n\n // Update the wave.\n if(!!this.waves) {\n if(!!this.waves[this.adventurer.wave]) {\n this.waves[this.adventurer.wave].onAction()\n }\n }\n\n }", "function attack(){\n\tif(canAttack){\n\n\t\t//Weapon Sound\n\t\tvar randWeapon = Math.floor(Math.random()*AUDIO_WEAPON.length);\n\t\tchangeAudio(AUDIO_WEAPON[randWeapon]);\n\n\t\t//Player stats\n\t\t//var playerHP = parseInt($(\"#avatar_HP_0\").html());\n\t\tvar playerName = $(\"#avatar_NAME_0\").html();\n\t\tvar playerNum = $(\"#avatarContainer_0\").attr('value');\n\t\tvar playerAttack = AVATAR_STATS[playerNum][\"ATTACK\"];\n\t\tvar totalPlayerAttack = playerAttack+playerPower;\n\n\t\t//CPU stats\n\t\tvar cpuName = $(\"#currentEnemy_NAME\").html();\n\t\t//var cpuHP = parseInt($(\"#currentEnemy_HP\").html());\n\t\tvar cpuNum = $(\"#currentEnemyContainer\").attr('value');\n\t\tvar cpuAttack = AVATAR_STATS[cpuNum][\"DEFENSE\"];\n\n\t\t//Game logic/math\n\t\tcurrentEnemyHP -= totalPlayerAttack;\n\t\tcurrentPlayerHP -= cpuAttack;\n\t\t$(\"#currentEnemy_HP\").html(\"HP: \"+currentEnemyHP);\n\t\t$(\"#avatar_HP_0\").html(\"HP: \"+currentPlayerHP);\n\t\tplayerPower+=playerAttack;\n\n\t\t//Message box results\n\t\t$(\"#playerText\").html(\"You hit \"+cpuName+\" for \"+totalPlayerAttack+\" damage!\");\n\t\t$(\"#cpuText\").html(cpuName+\" hit you for \"+cpuAttack+\" damage!\");\n\n\t\tif(!gameOver){\n\n\t\t\t//Tie condition\n\t\t\tif (currentPlayerHP<= 0 && currentEnemyHP <=0 && enemyNum.length<1){\n\t\t\t\t//$(\"#currentEnemyContainer\").css({\"display\":\"none\"});\n\t\t\t\t$(\"#avatar_IMG_0\").addClass(\"dead\");\n\t\t\t\t$(\"#avatar_HP_0\").html(\"DEFEATED\");\n\t\t\t\t$(\"#currentEnemy_IMG\").addClass(\"dead\");\n\t\t\t\t$(\"#currentEnemy_HP\").html(\"DEFEATED\");\n\n\t\t\t\tcanAttack=false;\n\t\t\t\tgameOver=true;\n\t\t\t\t$(\"#playerText\").html(\"There was a tie! You and \"+cpuName+\" have both been defeated\");\n\t\t\t\t$(\"#cpuText\").html(\"Press Start a new game to play again!\");\n\t\t\t}\n\n\t\t\t//Lose condition\n\t\t\telse if(currentPlayerHP <= 0){\n\t\t\t\t//$(\"#currentEnemyContainer\").css({\"display\":\"none\"});\n\t\t\t\t$(\"#avatar_IMG_0\").addClass(\"dead\");\n\t\t\t\t$(\"#avatar_HP_0\").html(\"DEFEATED\");\n\t\t\t\tif(currentPlayerHP <= 0 && currentEnemyHP <= 0){\n\t\t\t\t\t$(\"#currentEnemy_IMG\").addClass(\"dead\");\n\t\t\t\t\t$(\"#currentEnemy_HP\").html(\"DEFEATED\");\n\t\t\t\t}\n\t\t\t\tcanAttack=false;\n\t\t\t\tgameOver=true;\n\t\t\t\tnewEnemy=false;\n\t\t\t\t$(\"#playerText\").html(\"You have been defeated by \"+cpuName+\" !!\");\n\t\t\t\t$(\"#cpuText\").html(\"Press Start a new game to play again!\");\n\t\t\t\tlosses+=1;\n\t\t\t\t$(\"#losses\").html(losses);\n\t\t\t}\n\n\t\t\t//Win condition\n\t\t\telse if(currentEnemyHP <= 0 && enemyNum.length<1 && currentPlayerHP >0 ){\n\t\t\t\t//$(\"#currentEnemyContainer\").css({\"display\":\"none\"});\n\t\t\t\t$(\"#currentEnemy_IMG\").addClass(\"dead\");\n\t\t\t\t$(\"#currentEnemy_HP\").html(\"DEFEATED\");\n\t\t\t\tcanAttack=false;\n\t\t\t\tgameOver=true;\n\t\t\t\t$(\"#playerText\").html(\"You have defeated all enemies. Congratulations!!\");\n\t\t\t\t$(\"#cpuText\").html(\"Press Start a new game to play again!\");\n\t\t\t\twins+=1;\n\t\t\t\t$(\"#wins\").html(wins);\n\n\t\t\t}\n\n\t\t\t//Enemy defeated, select another enemy\n\t\t\telse if(currentEnemyHP <= 0 && enemyNum.length>0){\n\t\t\t\tcanAttack=false;\n\t\t\t\t$(\"#currentEnemyContainer\").css({\"display\":\"none\"});\n\t\t\t\t$(\"#playerText\").html(\"You have defeated \"+cpuName+\"!!\");\n\t\t\t\t$(\"#cpuText\").html(\"Select another enemy to defeat..\");\n\n\t\t\t\tnewEnemy=true;\n\t\t\t\t\n\n\t\t\t}\n\t\t}\n\t}\n}", "attack(player) {\r\n player.applyDamage(this.strength);\r\n }", "function BossActions(){\r\n\t//move\r\n\tif(!collisionWall(canniLeader, backWall) && theEnd === true){\r\n\t\tsoundEfx[\"CannibalWalk\"].play();\r\n\t\tcanniLeader.animation = \"left\"; \r\n\t\tcanniLeader.frameRate = canniLeader.moveRate;\r\n\t\tcanniLeader.x -= 5;\r\n\t}\r\n\telse if(!collisionWall(canniLeader, endWall) && theEnd === false){\r\n\t\tcanniLeader.x += 5;\r\n\t\tsoundEfx[\"CannibalWalk\"].play();\r\n\t\tcanniLeader.animation = \"right\";\r\n\t\tcanniLeader.frameRate = -canniLeader.moveRate;\r\n\t}\r\n\telse soundEfx[\"CannibalWalk\"].pause();\r\n\t//boss defeated\r\n\tif(collisionBoss() && hiding !== true){\r\n\t\thealthHunger[\"Health\"].width = 0;\r\n\t}\r\n\t//hit the wall\r\n\tif(collisionWall(canniLeader, backWall)){\r\n\t\t\ttheEnd = false;\r\n\t}\r\n\telse if(collisionWall(canniLeader, endWall)){\r\n\t\t\ttheEnd = true;\r\n\t}\r\n}", "performAttack() {\n return this.attack + this.levelDmgModifier;\n }", "function act(){\n\t\tif(!lunging){\n\t\t\tturnToHero(.8);\n\t\t\tif(distanceToHero() < 4){\n\t\t\t\tmoveFromHero(1.5);\n\t\t\t\tif(angleToHero() < 2 || angleToHero() > 358) lunge(.5, .3, .8, 6, .5, .3);\n\t\t\t}else{\n\t\t\t\tmove(2);\n\t\t\t}\n\t\t}\n\t}", "function attack(){\n\t//generate sound effect\n\tvar context = new (window.AudioContext || window.webkitAudioContext)();\n\tvar os = context.createOscillator(); \n\tos.type = 'sine';\n\tos.frequency.value = 100;\n\tos.connect(context.destination);\n\tos.start(); \n\tos.stop(context.currentTime + 0.5);\n\t\n\t//screen shacking effect\n\tdocument.getElementById(\"arena\").style.marginLeft = \"20%\";\n\tsetTimeout(() => { document.getElementById(\"arena\").style.marginLeft = \"0\"; }, 500);\n\n\t//Next Robot\n\tif(monster < 3){\n\t\tsetTimeout(() => { monster += 1; }, 500);\n\t}\n\telse{\n\t\t//Ends a Victorious Game\n\t\tdocument.getElementById('subtitle').innerText=\"All enemies in the area were defeated Mission 1 Completed\"\n \t \tdocument.getElementById('story').innerText=\" Receiving update from headquaters - READY FOR NEXT MISSION \"\t\n\t\tmonster = 0;\n\t\tbegin = false;\n\t}\t\n}", "function betray(name){\n attackXY(); \n swingAxe();\n}", "attackTarget(attack) {\n _gameService.attackTarget(attack)\n draw()\n }", "attack(target) {\n target.healthPoints -= this.attackPower;\n this.attackPower += this.startAttackPower;\n }", "function RunAI(enemy) {\n\t//attack AI\n\tif (enemy.attackAI == 'calm') {\n\t\tif (enemy.weapon.type == 'charger' && menu == false) {\n\t\t\tif (enemy.charge < enemy.weapon.max_charge) {\n\t\t\t\tenemy.charge += 0.5;\n\t\t\t}\n\n\t\t\tenemy.cooldown -= 1;\n\t\t\t//console.log(enemy.cooldown);\n\n\t\t\tif ((enemy.direction == 'DOWN' && (X == enemy.pos.x || X == enemy.pos.x - 1) && Y >= enemy.pos.y) || (enemy.direction == 'LEFT' && (Y == enemy.pos.y || Y == enemy.pos.y - 1) && X <= enemy.pos.x) || (enemy.direction == 'UP' && (X == enemy.pos.x || enemy.pos.x + 1) && Y <= enemy.pos.y) || (enemy.direction == 'RIGHT' && (Y == enemy.pos.y || Y == enemy.pos.y + 1) && X >= enemy.pos.x)) {\n\t\t\t\tif (menu == false && textBox == undefined && enemy.weapon != undefined && enemy.cooldown <= 0) {\n\t\t\t\t\tlet xx = enemy.pos.x;\n\t\t\t\t\tlet yy = enemy.pos.y;\n\n\t\t\t\t\tlet x;\n\t\t\t\t\tlet y;\n\t\t\t\t\tif (enemy.direction == 'UP') {\n\t\t\t\t\t\tx = xx;\n\t\t\t\t\t\ty = yy - 2;\n\t\t\t\t\t} else if (enemy.direction == 'DOWN') {\n\t\t\t\t\t\tx = xx - 1;\n\t\t\t\t\t\ty = yy;\n\t\t\t\t\t} else if (enemy.direction == 'RIGHT') {\n\t\t\t\t\t\tx = xx + 1;\n\t\t\t\t\t\ty = yy;\n\t\t\t\t\t} else if (enemy.direction == 'LEFT') {\n\t\t\t\t\t\tx = xx - 2;\n\t\t\t\t\t\ty = yy - 1;\n\t\t\t\t\t}\n\n\t\t\t\t\tlet data = {\n\t\t\t\t\t\tdmg: enemy.charge + enemy.weapon.dmg,\n\t\t\t\t\t\tid: enemy.id,\n\t\t\t\t\t\tdirection: enemy.direction,\n\t\t\t\t\t\tpos: {\n\t\t\t\t\t\t\tx: x,\n\t\t\t\t\t\t\ty: y,\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttype: 'bullet',\n\t\t\t\t\t}\n\n\t\t\t\t\tentities.push(data);\n\t\t\t\t\t//socket.emit('attack', data);\n\t\t\t\t\tcharge = 0;\n\t\t\t\t\tenemy.cooldown = 100;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t//movement AI\n\tif (enemy.moveAI == 'stationary') {\n\t\tif (enemy.timer <= 0) {\n\t\t\tlet num = Random(4);\n\t\t\tif ((num == 0 && enemy.preset == undefined) || enemy.preset == 'LEFT') {\n\t\t\t\tenemy.direction = 'LEFT';\n\t\t\t\tenemy.timer = 100;\n\t\t\t\tif ((Y == enemy.pos.y || Y == enemy.pos.y - 1 || Y == enemy.pos.y + 1) && X <= enemy.pos.x) {\n\t\t\t\t\tenemy.preset = 'LEFT';\n\t\t\t\t} else {\n\t\t\t\t\tenemy.preset = undefined;\n\t\t\t\t}\n\n\t\t\t} else if ((num == 1 && enemy.preset == undefined) || enemy.preset == 'DOWN') {\n\t\t\t\tenemy.direction = 'DOWN';\n\t\t\t\tenemy.timer = 100;\n\t\t\t\tif ((X == enemy.pos.x || X == enemy.pos.x - 1 || X == enemy.pos.x + 1) && Y >= enemy.pos.y) {\n\t\t\t\t\tenemy.preset = 'DOWN';\n\t\t\t\t} else {\n\t\t\t\t\tenemy.preset = undefined;\n\t\t\t\t}\n\n\t\t\t} else if ((num == 2 && enemy.preset == undefined) || enemy.preset == 'RIGHT') {\n\t\t\t\tenemy.direction = 'RIGHT';\n\t\t\t\tenemy.timer = 100;\n\t\t\t\tif ((Y == enemy.pos.y || Y == enemy.pos.y - 1 || Y == enemy.pos.y + 1) && X >= enemy.pos.x) {\n\t\t\t\t\tenemy.preset = 'RIGHT';\n\t\t\t\t} else {\n\t\t\t\t\tenemy.preset = undefined;\n\t\t\t\t}\n\n\t\t\t} else if ((num == 3 && enemy.preset == undefined) || enemy.preset == 'UP') {\n\t\t\t\tenemy.direction = 'UP';\n\t\t\t\tenemy.timer = 100;\n\t\t\t\tif ((X == enemy.pos.x || X == enemy.pos.x - 1 || X == enemy.pos.x + 1) && Y <= enemy.pos.y) {\n\t\t\t\t\tenemy.preset = 'UP';\n\t\t\t\t} else {\n\t\t\t\t\tenemy.preset = undefined;\n\t\t\t\t}\n\n\t\t\t} else if (enemy.preset != undefined) {\n\t\t\t\tswitch (enemy.preset) {\n\t\t\t\t\tcase 'UP':\n\t\t\t\t\t\tenemy.direction = 'UP';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'DOWN':\n\t\t\t\t\t\tenemy.direction = 'DOWN';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'LEFT':\n\t\t\t\t\t\tenemy.direction = 'LEFT';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'RIGHT':\n\t\t\t\t\t\tenemy.direction = 'RIGHT';\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tenemy.preset = undefined;\n\t\t\t}\n\t\t\t//console.log(num);\n\t\t}\n\t\tenemy.timer -= 1;\n\t}\n\n\tif (enemy.moveAI == 'basic') {\n\t\tx = enemy.pos.x + 2;\n\t\ty = enemy.pos.y + 2;\n\n\t\tlet z = X;\n\t\tlet w = Y;\n\t\tconsole.log(`you: ${z}, ${w}`);\n\t\tconsole.log(`them: ${x}, ${y}`);\n\n\t\tif(x < z){\n\t\t\tif(y < w){\n\t\t\t\tif(y + 8 > x){\n\t\t\t\t\tenemy.direction = 'RIGHT';\n\t\t\t\t}else if(y < x){\n\t\t\t\t\tenemy.direction = 'DOWN';\n\t\t\t\t}\n\t\t\t}else if(y > w){\n\t\t\t\tif(y - 8 < x){\n\t\t\t\t\tenemy.direction = 'RIGHT';\n\t\t\t\t}else if(y > x){\n\t\t\t\t\tenemy.direction = 'UP';\n\t\t\t\t}\n\t\t\t}\n\t\t}else if(x > z){\n\t\t\tif(y < w){\n\t\t\t\tif(y > x){\n\t\t\t\t\tenemy.direction = 'LEFT';\n\t\t\t\t}else if(y < x){\n\t\t\t\t\tenemy.direction = 'DOWN';\n\t\t\t\t}\n\t\t\t}else if(y > w){\n\t\t\t\tif(y < x){\n\t\t\t\t\tenemy.direction = 'LEFT';\n\t\t\t\t}else if(y > x){\n\t\t\t\t\tenemy.direction = 'UP';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "attack(animal,attackee,damage,type,last){}", "function characterAttack(id){\n //Enemy 1\n //console.log(i);\n if(id == \"c1\"){\n //e1\n enemies[0].e1.health -= charachters[0].c1.attackP;\n charHealth = enemies[0].e1.health;\n eHealth1.textContent = \"Health:\" + charHealth;\n //e2\n enemies[0].e2.health -= charachters[0].c1.attackP;;\n charHealth = enemies[0].e2.health;\n eHealth2.textContent = \"Health:\" + charHealth;\n //e3\n enemies[0].e3.health -= charachters[0].c1.attackP;;\n charHealth = enemies[0].e3.health;\n eHealth3.textContent = \"Health:\" + charHealth;\n //e4\n enemies[0].e4.health -= charachters[0].c1.attackP;;\n charHealth = enemies[0].e4.health;\n eHealth4.textContent = \"Health:\" + charHealth;\n\n //Shows counter attack message\n $(\"#counterAttackMessage\").show();\n //opponent loses 10 health\n charachters[0].c1.health -= 10;\n charHealth = charachters[0].c1.health;\n health1.textContent = \"Health:\" + charHealth;\n\n //characters attack power doubles\n charachters[0].c1.attackP += charachters[0].c1.attackP;\n }\n if(id == \"c2\"){\n //e1\n enemies[0].e1.health -= charachters[0].c2.attackP;\n charHealth = enemies[0].e1.health;\n eHealth1.textContent = \"Health:\" + charHealth;\n //e2\n enemies[0].e2.health -= charachters[0].c2.attackP;;\n charHealth = enemies[0].e2.health;\n eHealth2.textContent = \"Health:\" + charHealth;\n //e3\n enemies[0].e3.health -= charachters[0].c2.attackP;;\n charHealth = enemies[0].e3.health;\n eHealth3.textContent = \"Health:\" + charHealth;\n //e4\n enemies[0].e4.health -= charachters[0].c2.attackP;;\n charHealth = enemies[0].e4.health;\n eHealth4.textContent = \"Health:\" + charHealth;\n\n //Shows counter attack message\n $(\"#counterAttackMessage\").show();\n //opponent loses 10 health\n charachters[0].c2.health -= 10;\n charHealth = charachters[0].c2.health;\n health2.textContent = \"Health:\" + charHealth;\n\n //characters attack power doubles\n charachters[0].c2.attackP += charachters[0].c2.attackP;\n }\n if(id == \"c3\"){\n //e3\n enemies[0].e1.health -= charachters[0].c3.attackP;\n charHealth = enemies[0].e1.health;\n eHealth1.textContent = \"Health:\" + charHealth;\n //e2\n enemies[0].e2.health -= charachters[0].c3.attackP;;\n charHealth = enemies[0].e2.health;\n eHealth2.textContent = \"Health:\" + charHealth;\n //e3\n enemies[0].e3.health -= charachters[0].c3.attackP;;\n charHealth = enemies[0].e3.health;\n eHealth3.textContent = \"Health:\" + charHealth;\n //e4\n enemies[0].e4.health -= charachters[0].c3.attackP;;\n charHealth = enemies[0].e4.health;\n eHealth4.textContent = \"Health:\" + charHealth;\n\n //Shows counter attack message\n $(\"#counterAttackMessage\").show();\n //opponent loses 10 health\n charachters[0].c3.health -= 10;\n charHealth = charachters[0].c3.health;\n health3.textContent = \"Health:\" + charHealth;\n\n //characters attack power doubles\n charachters[0].c3.attackP += charachters[0].c3.attackP;\n }\n if(id == \"c4\"){\n //e1\n enemies[0].e1.health -= charachters[0].c4.attackP;\n charHealth = enemies[0].e1.health;\n eHealth1.textContent = \"Health:\" + charHealth;\n //e2\n enemies[0].e2.health -= charachters[0].c4.attackP;;\n charHealth = enemies[0].e2.health;\n eHealth2.textContent = \"Health:\" + charHealth;\n //e3\n enemies[0].e3.health -= charachters[0].c4.attackP;;\n charHealth = enemies[0].e3.health;\n eHealth3.textContent = \"Health:\" + charHealth;\n //e4\n enemies[0].e4.health -= charachters[0].c4.attackP;;\n charHealth = enemies[0].e4.health;\n eHealth4.textContent = \"Health:\" + charHealth;\n\n //Shows counter attack message\n $(\"#counterAttackMessage\").show();\n //opponent loses 10 health\n charachters[0].c4.health -= 10;\n charHealth = charachters[0].c4.health;\n health4.textContent = \"Health:\" + charHealth;\n\n //characters attack power doubles\n charachters[0].c4.attackP += charachters[0].c4.attackP;\n }\n \n }", "attackBasic(cursor, angle, tempSprite) {\n\n //Call the hero's attackBasic first\n //tempSprite.anims.play(\"shield\",true);\n tempSprite.anims = this.anims;\n //console.log(this.anims);\n\n //this.hero.attackBasic(cursor, angle, tempSprite);\n\n //Rotation of sprite and box\n if (angle > -Math.PI / 4 && angle <= Math.PI / 4) {\n console.log(\"atacked\");\n switch (this.playerType) {\n case HEROES.SHIELD_HERO:\n this.sprite.anims.play(\"rightBasicAttackShield\");\n break;\n case HEROES.SWORD_HERO:\n this.sprite.anims.play(\"rightBasicAttackSword\");\n break;\n //case HEROES.MAGE_HERO: this.sprite.anims.play(\"rightBasicAttackMage\"); break;\n }\n } else if (angle > -3 * Math.PI / 4 && angle <= -Math.PI / 4) {\n switch (this.playerType) {\n case HEROES.SHIELD_HERO:\n this.sprite.anims.play(\"upBasicAttackShield\");\n break;\n case HEROES.SWORD_HERO:\n this.sprite.anims.play(\"upBasicAttackSword\");\n break;\n //case HEROES.MAGE_HERO: this.sprite.anims.play(\"upBasicAttackMage\"); break;\n }\n } else if ((angle > 3 * Math.PI / 4 && angle <= Math.PI) || (angle <= -3 * Math.PI / 4 && angle >= -Math.PI)) {\n switch (this.playerType) {\n case HEROES.SHIELD_HERO:\n this.sprite.anims.play(\"leftBasicAttackShield\");\n break;\n case HEROES.SWORD_HERO:\n this.sprite.anims.play(\"leftBasicAttackSword\");\n break;\n //case HEROES.MAGE_HERO: this.sprite.anims.play(\"leftBasicAttackMage\"); break;\n }\n } else if (angle <= 3 * Math.PI / 4 && angle > Math.PI / 4) {\n switch (this.playerType) {\n case HEROES.SHIELD_HERO:\n this.sprite.anims.play(\"downBasicAttackShield\");\n break;\n case HEROES.SWORD_HERO:\n this.sprite.anims.play(\"downBasicAttackSword\");\n break;\n //case HEROES.MAGE_HERO: this.sprite.anims.play(\"downBasicAttackMage\"); break;\n }\n }\n }", "function action(hu,th,st)\n\t\t\t{\n\t\t\t\tif (hu == 1)\n\t\t\t\t{\n\t\t\t\t\thunger = (hunger * 10 - 1) / 10;\n\t\t\t\t\tif (hunger < 0)\n\t\t\t\t\t{\n\t\t\t\t\t\thealth = ((health * 10) + (hunger * 10)) / 10;\n\t\t\t\t\t\thunger = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (st == 1)\n\t\t\t\t{\n\t\t\t\t\tstamina = (stamina * 10 - 5) / 10;\n\t\t\t\t\tif (stamina < 0)\n\t\t\t\t\t{\n\t\t\t\t\t\thealth = ((health * 10) + (stamina * 10)) / 10;\n\t\t\t\t\t\tstamina = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (th == 1)\n\t\t\t\t{\n\t\t\t\t\tthirst = (thirst * 10 -5) / 10;\n\t\t\t\t\tif (thirst < 0)\n\t\t\t\t\t{\n\t\t\t\t\t\thealth = ((health * 10) + (thirst * 10)) / 10;\n\t\t\t\t\t\tthirst = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( health <= 0)\n\t\t\t\t{\n\t\t\t\t\thealth = 0;\n\t\t\t\t}\n\t\t\t}", "damage() {}", "receivePlayerSelection(action, target) {\n if (action === 'attack') {\n this.units[this.index].attack(this.enemies[target]);\n const enemy = this.enemies[target];\n enemy.healthBar.decrease(100 * (enemy.hp / enemy.maxHp));\n }\n this.time.addEvent({\n delay: 3000,\n callback: this.nextTurn,\n callbackScope: this,\n });\n }", "function Miagi () {\n this.hp = 18;\n\n this.primaryAttack = function(target) {\n target.hp = target.hp - 3;\n }\n\n this.specialAttack = function(target) {\n target.hp = target.hp - 5;\n }\n}", "function strongAttackHandler(){\n attackMonster('STRONG_ATTACK');\n\n /*const damage = dealMonsterDamage(STRONG_ATTACK_VALUE);\n currentMonsterHealth -= damage;\n const playerDamage = dealPlayerDamage(MONSTER_ATTACK_VALUE);\n currentPlayerHealth -= playerDamage;\n\n //11\n if(currentMonsterHealth <=0 && currentPlayerHealth > 0){\n alert('You won!');\n\n }else if (currentPlayerHealth <=0 && currentMonsterHealth > 0){\n alert('You have Lost'); //Player loses if Monster Health is above 0.\n }\n else if (currentPlayerHealth <=0 && currentMonsterHealth <= 0 ){\n alert('You have a draw');\n }*/\n\n\n }", "performAttack() {\n return this.attack + Math.floor(this.attackModifier * Math.random());\n }", "function basicAttack() {\n var attackPoints;\n attackPoints = 0;\n var diceName;\n var statName;\n var statNumber;\n\n //determines what weapon the user chose\n if (player.weaponName === 'Longbow') { diceName = 'd6'; }\n else if (player.weaponName === 'Long Sword') { diceName = 'd10'; }\n\n //displays basic attack instructions\n if (basicAttackTutorialRun) {\n var tutorial = `To perform this basic attack with your ${player.weaponName}, you need to roll a ${diceName} and click the 'BASIC ATTACK' again to apply the damage.`;\n basicAttackTutorialRun = false;\n attackPoints = 0;\n\n //runs the attack\n } else {\n if (player.weaponName === 'Longbow') {\n statName = 'DEX';\n statNumber = player.modArray[1];\n attackPoints = calcRoll(1, recentRoll);\n }\n else if (player.weaponName === 'Long Sword') {\n statName = 'STR';\n statNumber = player.modArray[0];\n attackPoints = calcRoll(0, recentRoll);\n }\n\n //sets damage to zero if the modifier would take the damage roll to a negative number\n if (attackPoints < 0) {\n attackPoints = 0;\n }\n\n // creates the explanation string with applicable values\n var tutorial = `Blap! Couldn't think of another verb. You used your ${player.weaponName} on the ${dragon.name}! You rolled a ${recentRoll} and added your ${statNumber} ${statName} modifier. Aiming wildly and without any accuracy at all, you managed ${attackPoints} damage to the ${dragon.name}!`;\n dragonAttack();\n }\n\n //displays string and decrements dragon health\n document.getElementById('dynamic-dialogue').innerHTML = tutorial;\n dragon.hitPoints -= attackPoints;\n\n checkEndGame();\n\n}", "function triggerEnemyAttack () {\n // a new function is called setTimeout is declared in order to create a pause\n // after the user clicks their chosen attack method. \n // an if statement is used with a native js math code that spits out a random number.\n // I am not sure at all how this function works but it basically reads... If the random\n // number * 10 > 6 then it will run the enemy predefined special Attack and will apply\n // the damages to the human player.\n // IF the special attack is run then the computer will show \"enemy special attack\" because\n // jQuery is using .html to print the text in it's given parameter to the the status div. \n setTimeout(function(){\n if (Math.floor(Math.random() * 10 ) > 6){\n enemy.specialAttack(player); \n $('.status').html('Enemy special attack!')\n // if the random answer to the problem above is actually less than 6 than the computer will\n // run the else statement which will use the primary attack instead and use the same \n // .html trigger thingy to print its content to its related div, status. \n } else {\n enemy.primaryAttack(player); \n $('.status').html('Enemy attack!')\n }\n // after the above code is run, the player info will render. This was defined up above and is just\n // being used over and over. \n // the ,2000 = 2seconds and is native js code. It is placed almost outside verything else in this function\n // but before the last curly brace so that the timing delay applies to the whole enemy attack.\n renderPlayerInfo(player);\n renderEnemyInfo(enemy);\n }, 2000)\n}", "function attack(move, attacker, defender) {\n if (currentOppPokemon.fainted == true) {\n return;\n }\n if (move.pp <= 0) {\n rollText(\"battle_text\", \"Not enough PP!\", 25);\n return;\n }\n move.pp -= 1;\n document.getElementById('buttonsBattle').style['display'] = 'none';\n damage = Math.round(((move.damage * ((Math.random() * 15) + 85) / 100)) * stab(attacker, move));\n\n let multiplier = typeChart[getKeyByValue(ElementalTypes, move.type)][defender.type];\n damage *= multiplier;\n\n switch (multiplier) {\n case 0:\n rollText(\"battle_text\", `${attacker.name} used ${move.name}! It had no effect.`, 25);\n break;\n case 0.5:\n rollText(\"battle_text\", `${attacker.name} used ${move.name}! It's not very effective.`, 25);\n notEffectiveSound.play();\n break;\n case 2:\n rollText(\"battle_text\", `${attacker.name} used ${move.name}! It's super effective!`, 25);\n superEffectiveSound.play();\n break;\n default:\n rollText(\"battle_text\", `${attacker.name} used ${move.name}!`, 25);\n damageSound.play();\n break;\n }\n\n defender.hp -= Math.ceil(damage);\n updateHealth(defender);\n}", "function attack() {\n clash.play();\n if(enemySelect){\n player.HP = player.HP - enemy.AP;\n enemy.HP = enemy.HP - player.AP;\n player.AP = player.AP + player.baseAP;\n $(\".player\").children(\".hp\").text(\"HP: \" + player.HP);\n $(\".enemy\").children(\".hp\").text(\"HP: \" + enemy.HP);\n deathCheck();\n }\n}", "function checkAndAttack(target) {\n // The 'target' parameter is just a variable!\n // It contains the argument when the function was called.\n if(target) {\n hero.attack(target);\n }\n hero.moveXY(43, 34);\n}", "function battleEnemy() {\n\n $(\"#attackBtn\").on('click',function(){\n\n\n // text to show how much damage was taken, and manipulate hp\n\n \n\n currentEnemy.hp -= currentChar.attack;\n $(\"#battle-text\").text(\"You dealt \" + currentEnemy.name + \" \" + currentChar.attack + \" damage\");\n \n if(currentEnemy.hp > 0){\n currentChar.hp -= currentEnemy.counter;\n $(\"#counter-text\").text(\"You took \" + currentEnemy.counter + \" damage\");\n currentChar.attack += initialAtk;\n }\n\n else{\n\n $(\"#counter-text\").text(\"You beat \" +currentEnemy.name);\n }\n\n // to change hp under current char \n\n if (isCurrentCharMario === true){\n $(\"#mario-hp\").text(currentChar.hp);\n if (currentChar.hp === 0) {\n $(\"#battle-text\").text(\"YOU LOSE\");\n }\n }\n\n else if (isCurrentCharLuigi === true){\n $(\"#luigi-hp\").text(currentChar.hp);\n if (currentChar.hp === 0) {\n $(\"#battle-text\").text(\"YOU LOSE\");\n }\n }\n\n else if (isCurrentCharWario === true){\n $(\"#wario-hp\").text(currentChar.hp);\n if (currentChar.hp === 0) {\n $(\"#battle-text\").text(\"YOU LOSE\");\n }\n }\n\n else if (isCurrentCharBowser === true){\n $(\"#bowser-hp\").text(currentChar.hp);\n if (currentChar.hp === 0) {\n $(\"#battle-text\").text(\"YOU LOSE\");\n }\n }\n \n // display current hp of enemy and show when enemy hp is 0\n \n if (isCurrentEnemyMario === true){\n if (currentEnemy.hp <= 0){\n $(\"#mario-hp\").text(\"0\");\n }\n else {\n $(\"#mario-hp\").text(currentEnemy.hp);\n }\n }\n\n else if (isCurrentEnemyLuigi === true){\n if (currentEnemy.hp <= 0){\n $(\"#luigi-hp\").text(\"0\");\n }\n else {\n $(\"#luigi-hp\").text(currentEnemy.hp);\n }\n }\n\n else if (isCurrentEnemyWario === true){\n if (currentEnemy.hp <= 0){\n $(\"#wario-hp\").text(\"0\");\n }\n else {\n $(\"#wario-hp\").text(currentEnemy.hp);\n }\n }\n\n else if (isCurrentEnemyBowser === true){\n if (currentEnemy.hp <= 0){\n $(\"#bowser-hp\").text(\"0\");\n }\n else {\n $(\"#bowser-hp\").text(currentEnemy.hp);\n }\n }\n \n \n });\n \n}", "function enemyAttack() {\n //depending on baddie type, deal different damage\n if (baddie.type === \"Ancient Dragon\") {\n var dmg = (Math.floor((Math.random() * 20)) + 30);\n } else if (baddie.type === \"Prowler\") {\n var dmg = (Math.floor((Math.random() * 20)) + 15);\n } else {\n var dmg = (Math.floor((Math.random() * 20)) + 5);\n }\n //subtract dmg from inventory.Health\n inventory.Health -= dmg;\n console.log(\"The \" + baddie.type + \" hits you for \" + dmg + \"! You now have \" + inventory.Health + \" health left!\")\n //player death logic\n if (inventory.Health > 0) {\n //if player is still alive, they can run or fight\n fightOrFlight();\n } else {\n die();\n }\n}", "function Mario () {\n // \"this\" refers to Mario and we randomly chose \"hp\" to\n // be \"hit point\" and gave the function Mario a total \"hp\" of 15\n this.hp = 15;\n // basically reads \"Marios.primaryAttack\" is also going to be function\n // but we are giving the attack function a parameter of \"target\"\n // I am guessing that \"target\" refers to the enemy\n this.primaryAttack = function(target) {\n // Mario starts with a total hp of 15. We defined that above\n // but this function takes 2hp away from the enemy.\n // I believe it reads like this... \n // \"Computer get total hitpoints of the enemy/target.\n // When I run primary attack then subtract 2 hitpoints from\n // the enemy/target's total hitpoints.\"\n target.hp = target.hp - 2;\n }\n // This is the second attack function we are giving Mario.\n // We use this so we dont have to say Mario again and so that\n // specialAttack has a parent. We give this function a parameter\n // of \"target\" because we want to tell the function what to mutate.\n this.specialAttack = function(target) {\n // We give the function \"specialAttack\" a condition because its special and we are interesting\n // the condition states that if the enemy is spikey then our special attack is useless and only renders 0hp\n // else if the target/enemy is NOT spikey then the function argument states the impact of the function\n // then renders the target/enemy - 20 which affects their hitpoints\n // ?? not sure what element \"this\" is referring to here and cant tell you what target.spikey is (object or function or???)\n if (target.spikey == true) {\n this.hp = 0;\n } else {\n target.hp = target.hp - 20;\n }\n }\n}", "function ironMansBattle() {\n\n\tif (gameState.enemyCharacters === captainAmerica) {\n\n\t\t// function for attack button. Make button look cooler. Which is done in HTML...\n\t\t$(\".attack\").on(\"click\", function() {\n\n\t\t\tif (ironMan.healthPoints > 0) {\n\t\t\t\tcaptainAmerica.healthPoints -= ironMan.attackDamage;\n\t\t\t\tironMan.healthPoints -= captainAmerica.attackDamage;\n\t\t\t\tironMan.attackDamage += 8;\n\t\t\t\t$(\".results\").html(\"<p>You attacked for \" + ironMan.attackDamage + \"</p>\" + \"<p>The defender attacked you for \" + captainAmerica.attackDamage + \"</p>\");\n\t\t\t} else if (captainAmerica.healthPoints <= 0) {\n\t\t\t\tbattleWinner();\n\t\t\t} else if (ironMan.healthPoints <= 0) {\n\t\t\t\tgameOver();\n\t\t\t\t$(\".LegoIronMan\").hide();\n\t\t\t}\n\t\t});\n\t}\n\n\telse if (gameState.enemyCharacters === thors) {\n\n\t\t$(\".attack\").on(\"click\", function() {\n\n\t\t\tif (ironMan.healthPoints > 0) {\n\t\t\t\tthors.healthPoints -= ironMan.attackDamage;\n\t\t\t\tironMan.healthPoints -= thors.attackDamage;\n\t\t\t\tironMan.attackDamage += 8;\n\t\t\t\t$(\".results\").html(\"<p>You attacked for \" + ironMan.attackDamage + \"</p>\" + \"<p>The defender attacked you for \" + thors.attackDamage + \"</p>\");\n\t\t\t} else if (thors.healthPoints <= 0) {\n\t\t\t\tbattleWinner();\n\t\t\t} else if (ironMan.healthPoints <= 0) {\n\t\t\t\tgameOver();\n\t\t\t\t$(\".LegoIronMan\").hide();\n\t\t\t}\t\t\t\t\t\n\t\t});\n\t}\n\n\telse if (gameState.enemyCharacters === hulkSmash) {\n\n\t\t$(\".attack\").on(\"click\", function() {\n\n\t\t\tif (ironMan.healthPoints > 0) {\n\t\t\t\thulkSmash.healthPoints -= ironMan.attackDamage;\n\t\t\t\tironMan.healthPoints -= hulkSmash.attackDamage;\n\t\t\t\tironMan.attackDamage += 8;\n\t\t\t\t$(\".results\").html(\"<p>You attacked for \" + ironMan.attackDamage + \"</p>\" + \"<p>The defender attacked you for \" + hulkSmash.attackDamage + \"</p>\");\n\t\t\t} else if (hulkSmash.healthPoints <= 0) {\n\t\t\t\tbattleWinner();\n\t\t\t} else if (ironMan.healthPoints <= 0) {\n\t\t\t\tgameOver();\n\t\t\t\t$(\".LegoIronMan\").hide();\n\t\t\t}\n\t\t});\n\t};\n\t\n}", "attacked(animal,attacker,damage,type,last){}", "update() {\n //Apply changes\n super.update()\n //Execute action\n if (this.action in this) {\n this[this.action]()\n this.output.idle = 0\n }\n\n //Update animation speed\n if (this.alive) {\n this.sprite.animationSpeed = Entity.ANIMATION_SPEED * this.adaptability\n }\n //Sudden death\n if ((this.sudden_death)||(this.hp <= 0)) {\n this.die()\n }\n }", "function setAttack() {\n $(\"#fight-outcome\").empty();\n\n arenaObj.enemy.health -= arenaObj.ally.attack;\n arenaObj.enemy.stats();\n\n killCharacter();\n\n $(\"#fight-outcome\").empty();\n\n arenaObj.ally.health -= arenaObj.enemy.counter;\n arenaObj.ally.stats();\n\n killCharacter();\n\n console.log(\"Your enemy HP is \" + arenaObj.enemy.health \n + \" and your HP is \" + arenaObj.ally.health);\n}", "function toAttack(){\n\tthis.is_attacking = true;\n\tthis.attack.hitEnemy = true;\n\tthis.start_time_attack = game.time.time;\n//\tthis.speed = this.SPEED_ATTACKING;\n\tthis.sound_sword_fail.play();\n}", "function fight() {\n var rand = Math.random();\n //depending on item type, do different amounts of damage\n if (inventory.Items === \"Used Dagger\") {\n var dmg = (Math.floor(rand * 10) + 1);\n } else if (inventory.Items === \"Cool Mace\") {\n var dmg = (Math.floor(rand * 50) + 25);\n } else if (inventory.Items === \"AWESOME MAGIC SWORD OF SLAYING\") {\n var dmg = (Math.floor(rand * 50) + 75);\n }\n //subtract damage done from baddie\n baddie.hitPoints -= dmg;\n console.log(\"You attack the \" + baddie.type + \" with your \" + inventory.Items + \". You do \" + dmg + \" damage to the creature! It has \" + baddie.hitPoints + \" health left.\");\n //baddie death logic\n\n if (baddie.hitPoints > 0) {\n //if baddie is still alive, it attacks\n enemyAttack();\n } else {\n enemyDie();\n }\n}", "function performAttack() {\n\tconsole.log('done');\n\tvar soundSource = document.getElementById('sound-source1');\n\tvar energy1 = document.getElementById('energy1');\n\tvar force2 = document.getElementById('force2');\n\tvar breath = document.getElementById('breath1');\n\tif (energy1.value == 100) {\n\t\tstate1 = 'f';\n\t\tchangeMainButton(\"charging\");\n\t\tsoundSource.innerHTML = '<audio src=\"fire-sound.mp3\" type=\"audio/mpeg\" autoplay></audio>';\t\t\n\t\tif (breath.value < 33) {\n\t\t\tvar level = 1;\n\t\t}\n\t\tif (breath.value >= 33 && breath.value < 66) {\n\t\t\tvar level = 2;\n\t\t}\n\t\tif (breath.value >= 66 && breath.value < 99) {\n\t\t\tvar level = 3;\n\t\t}\n\t\tif (breath.value >= 99) {\n\t\t\tvar level = 4;\n\t\t}\n\t\tforce2.value -= 3 * level;\n\t\tenergy1.value -= 30 * level;\n\t\tbreath.value = 0;\n\t}\n\tif (force2.value == 0) {\n\t\tvar messageBox = document.getElementById('message-box');\n\t\tmessageBox.innerHTML = '<p><b>YOU WON!<br/>DO YOU WANT TO PLAY AGAIN?</b></p>';\n\t\tvictories++;\n\t\tstate1 = 'n';\n\t\tstate2 = 'n';\n\t\tupdateScore();\n\t\tclearIntervals();\n\t\tchangeMainButton('restart');\n\t}\n}", "act() {\n this.cooldown();\n loopOver(this.particles);\n }", "function attack() {\n $('#attackButton').on(\"click\", function(){\n \n if (yourFighter == 'luke' && yourEnemy == 'obi-wan'){\n \n lukePower=(lukePower-enemyPower);\n obiPower=(obiPower-attackPower);\n $('#lukePower').html(lukePower);\n $('#obiPower').html(obiPower);\n $('#attackLine1').html('<p>You suffered '+enemyPower+' damage points</p>');\n $('#attackLine2').html('<p>You inflicted '+attackPower+' on Obi-Wan Kenobi');\n if (lukePower <= 0 || obiPower <= 0) {\n \n $('#enemyFighter').replaceWith('');\n \n \n if (lukePower <=0 && obiPower <= 0){\n\n $('#attackLine1').html('<p>You both died valiantly in Battle!</p>');\n $('#attackLine2').html('<p>Press the Reset Button to play again!</p>');\n yourEnemy=\"\";\n $('#endGame').html('<button id=\"resetButton\">Reset</button>');\n }\n \n if (lukePower <=0) {\n $('#attackLine1').html('<p>You died valiantly in Battle!</p>');\n $('#attackLine2').html('<p>Press the Reset Button to play again!</p>');\n yourEnemy=\"\";\n $('#endGame').html('<button id=\"resetButton\">Reset</button>');\n }\n \n if (obiPower <=0) {\n if (obiPower<=0 && darthPower<=0 && kyloPower<=0) {\n $('#attackLine1').html('<p>Congratulations! You have Won!</p>');\n $('#attackLine2').html('<p>Click on Reset to battle again!</p>');\n $('#endGame').html('<button id=\"resetButton\">Reset</button>');\n yourEnemy=\"\";\n }\n else {\n $('#attackLine1').html('<p>You have defeated your opponenet!</p>');\n $('#attackLine2').html('<p>Click on another enemy to battle them!</p>');\n yourEnemy=\"\";\n }\n }\n } /* end if (lukePower<=0 || obiPower<=0) */\n attackPower=attackPower+8;\n \n } /* end if (yourFighter=='luke') && (yourEnemy=='obi-wan') */\n\n else if (yourFighter=='luke' && yourEnemy=='darth'){\n lukePower=(lukePower-enemyPower);\n darthPower=(darthPower-attackPower);\n $('#lukePower').html(lukePower);\n $('#darthPower').html(darthPower);\n $('#attackLine1').html('<p>You suffered '+enemyPower+' damage points</p>');\n $('#attackLine2').html('<p>You inflicted '+attackPower+' on Darth Vader');\n if (lukePower <= 0 || darthPower <= 0) {\n \n $('#enemyFighter').replaceWith('');\n \n \n if (lukePower <=0 && darthPower <= 0){\n\n $('#attackLine1').html('<p>You both died valiantly in Battle!</p>');\n $('#attackLine2').html('<p>Press the Reset Button to play again!</p>');\n yourEnemy=\"\";\n $('#endGame').html('<button id=\"resetButton\">Reset</button>');\n }\n \n if (lukePower <=0) {\n $('#attackLine1').html('<p>You died valiantly in Battle!</p>');\n $('#attackLine2').html('<p>Press the Reset Button to play again!</p>');\n yourEnemy=\"\";\n $('#endGame').html('<button id=\"resetButton\">Reset</button>');\n }\n \n if (darthPower <=0) {\n if (obiPower<=0 && darthPower<=0 && kyloPower<=0) {\n $('#attackLine1').html('<p>Congratulations! You have Won!</p>');\n $('#attackLine2').html('<p>Click on Reset to battle again!</p>');\n yourEnemy=\"\";\n $('#endGame').html('<button id=\"resetButton\">Reset</button>');\n\n }\n else {\n $('#attackLine1').html('<p>You have defeated your opponenet!</p>');\n $('#attackLine2').html('<p>Click on another enemy to battle them!</p>');\n yourEnemy=\"\";\n }\n }\n } /* end if (lukePower<=0 || darthPower<=0) */\n attackPower=attackPower+8;\n } /* end if if (yourFighter=='luke') && (yourEnemy=='darth') */\n \n else if (yourFighter=='luke' && yourEnemy=='kylo'){\n\n lukePower=(lukePower-enemyPower);\n kyloPower=(kyloPower-attackPower);\n $('#lukePower').html(lukePower);\n $('#kyloPower').html(kyloPower);\n $('#attackLine1').html('<p>You suffered '+enemyPower+' damage points</p>');\n $('#attackLine2').html('<p>You inflicted '+attackPower+' on Kylo Ren');\n if (lukePower <= 0 || kyloPower <= 0) {\n \n $('#enemyFighter').replaceWith('');\n \n \n if (lukePower <=0 && kyloPower <= 0){\n\n $('#attackLine1').html('<p>You both died valiantly in Battle!</p>');\n $('#attackLine2').html('<p>Press the Reset Button to play again!</p>');\n yourEnemy=\"\";\n $('#endGame').html('<button id=\"resetButton\">Reset</button>');\n }\n \n if (lukePower <=0) {\n $('#attackLine1').html('<p>You died valiantly in Battle!</p>');\n $('#attackLine2').html('<p>Press the Reset Button to play again!</p>');\n yourEnemy=\"\";\n $('#endGame').html('<button id=\"resetButton\">Reset</button>');\n }\n \n if (obiPower <=0) {\n if (obiPower<=0 && darthPower<=0 && kyloPower<=0) {\n $('#attackLine1').html('<p>Congratulations! You have Won!</p>');\n $('#attackLine2').html('<p>Click on Reset to battle again!</p>');\n yourEnemy=\"\";\n $('#endGame').html('<button id=\"resetButton\">Reset</button>');\n\n }\n else {\n $('#attackLine1').html('<p>You have defeated your opponenet!</p>');\n $('#attackLine2').html('<p>Click on another enemy to battle them!</p>');\n yourEnemy=\"\";\n }\n }\n } /* end if (lukePower<=0 || obiPower<=0) */\n attackPower=attackPower+8;\n\n } /* end if (yourFighter=='luke') && (yourEnemy=='kylo') */\n\n \n else if (yourFighter=='obi-wan' && yourEnemy=='luke'){\n\n obiPower=(obiPower-enemyPower);\n lukePower=(lukePower-attackPower);\n $('#obiPower').html(obiPower);\n $('#lukePower').html(lukePower);\n $('#attackLine1').html('<p>You suffered '+enemyPower+' damage points</p>');\n $('#attackLine2').html('<p>You inflicted '+attackPower+' on Luke Skywalker');\n if (obiPower <= 0 || lukePower <= 0) {\n \n $('#enemyFighter').replaceWith('');\n \n \n if (obiPower <=0 && lukePower <= 0){\n\n $('#attackLine1').html('<p>You both died valiantly in Battle!</p>');\n $('#attackLine2').html('<p>Press the Reset Button to play again!</p>');\n $('#endGame').html('<button id=\"resetButton\">Reset</button>');\n yourEnemy=\"\";\n }\n \n if (obiPower <=0) {\n $('#attackLine1').html('<p>You died valiantly in Battle!</p>');\n $('#attackLine2').html('<p>Press the Reset Button to play again!</p>');\n $('#endGame').html('<button id=\"resetButton\">Reset</button>');\n yourEnemy=\"\";\n }\n \n if (lukePower <=0) {\n if (lukePower<=0 && darthPower<=0 && kyloPower<=0) {\n $('#attackLine1').html('<p>Congratulations! You have Won!</p>');\n $('#attackLine2').html('<p>Click on Reset to battle again!</p>');\n $('#endGame').html('<button id=\"resetButton\">Reset</button>');\n yourEnemy=\"\";\n\n }\n else {\n $('#attackLine1').html('<p>You have defeated your opponenet!</p>');\n $('#attackLine2').html('<p>Click on another enemy to battle them!</p>');\n yourEnemy=\"\";\n }\n }\n } /* end if (obiPower<=0 || lukePower<=0) */\n \n attackPower=attackPower+12;\n\n }/* end if (yourFighter=='obi-wan') && (yourEnemy=='luke') */ \n\n else if (yourFighter=='obi-wan' && yourEnemy=='darth'){\n\n obiPower=(obiPower-enemyPower);\n darthPower=(darthPower-attackPower);\n $('#obiPower').html(obiPower);\n $('#darthPower').html(darthPower);\n $('#attackLine1').html('<p>You suffered '+enemyPower+' damage points</p>');\n $('#attackLine2').html('<p>You inflicted '+attackPower+' on Darth Vader');\n if (obiPower <= 0 || darthPower <= 0) {\n \n $('#enemyFighter').replaceWith('');\n \n \n if (obiPower <=0 && darthPower <= 0){\n\n $('#attackLine1').html('<p>You both died valiantly in Battle!</p>');\n $('#attackLine2').html('<p>Press the Reset Button to play again!</p>');\n yourEnemy=\"\";\n $('#endGame').html('<button id=\"resetButton\">Reset</button>');\n }\n \n if (obiPower <=0) {\n $('#attackLine1').html('<p>You died valiantly in Battle!</p>');\n $('#attackLine2').html('<p>Press the Reset Button to play again!</p>');\n yourEnemy=\"\";\n $('#endGame').html('<button id=\"resetButton\">Reset</button>');\n }\n \n if (darthPower <=0) {\n if (lukePower<=0 && darthPower<=0 && kyloPower<=0) {\n $('#attackLine1').html('<p>Congratulations! You have Won!</p>');\n $('#attackLine2').html('<p>Click on Reset to battle again!</p>');\n yourEnemy=\"\";\n $('#endGame').html('<button id=\"resetButton\">Reset</button>');\n\n }\n else {\n $('#attackLine1').html('<p>You have defeated your opponenet!</p>');\n $('#attackLine2').html('<p>Click on another enemy to battle them!</p>');\n yourEnemy=\"\";\n }\n }\n } /* end if (lukePower<=0 || obiPower<=0) */\n \n attackPower=attackPower+12;\n\n }/* end if (yourFighter=='obi-wan') && (yourEnemy=='darth') */ \n\n else if (yourFighter=='obi-wan' && yourEnemy=='kylo'){\n\n obiPower=(obiPower-enemyPower);\n kyloPower=(kyloPower-attackPower);\n $('#obiPower').html(obiPower);\n $('#kyloPower').html(kyloPower);\n $('#attackLine1').html('<p>You suffered '+enemyPower+' damage points</p>');\n $('#attackLine2').html('<p>You inflicted '+attackPower+' on Kylo Ren');\n if (obiPower <= 0 || kyloPower <= 0) {\n \n $('#enemyFighter').replaceWith('');\n \n \n if (obiPower <=0 && kyloPower <= 0){\n\n $('#attackLine1').html('<p>You both died valiantly in Battle!</p>');\n $('#attackLine2').html('<p>Press the Reset Button to play again!</p>');\n yourEnemy=\"\";\n $('#endGame').html('<button id=\"resetButton\">Reset</button>');\n }\n \n if (obiPower <=0) {\n $('#attackLine1').html('<p>You died valiantly in Battle!</p>');\n $('#attackLine2').html('<p>Press the Reset Button to play again!</p>');\n yourEnemy=\"\";\n $('#endGame').html('<button id=\"resetButton\">Reset</button>');\n }\n \n if (kyloPower <=0) {\n if (lukePower<=0 && darthPower<=0 && kyloPower<=0) {\n $('#attackLine1').html('<p>Congratulations! You have Won!</p>');\n $('#attackLine2').html('<p>Click on Reset to battle again!</p>');\n yourEnemy=\"\";\n $('#endGame').html('<button id=\"resetButton\">Reset</button>');\n\n }\n else {\n $('#attackLine1').html('<p>You have defeated your opponenet!</p>');\n $('#attackLine2').html('<p>Click on another enemy to battle them!</p>');\n yourEnemy=\"\";\n }\n }\n } /* end if (obiPower<=0 || kyloPower<=0) */\n \n attackPower=attackPower+12;\n\n }/* end if (yourFighter=='obi-wan') && (yourEnemy=='kylo') */ \n\n else if (yourFighter=='darth' && yourEnemy=='luke'){\n darthPower=(darthPower-enemyPower);\n lukePower=(lukePower-attackPower);\n $('#darthPower').html(darthPower);\n $('#lukePower').html(lukePower);\n $('#attackLine1').html('<p>You suffered '+enemyPower+' damage points</p>');\n $('#attackLine2').html('<p>You inflicted '+attackPower+' on Luke Skywalker');\n if (darthPower <= 0 || lukePower <= 0) {\n \n $('#enemyFighter').replaceWith('');\n \n \n if (darthPower <=0 && lukePower <= 0){\n\n $('#attackLine1').html('<p>You both died valiantly in Battle!</p>');\n $('#attackLine2').html('<p>Press the Reset Button to play again!</p>');\n yourEnemy=\"\";\n $('#endGame').html('<button id=\"resetButton\">Reset</button>');\n }\n \n if (darthPower <=0) {\n $('#attackLine1').html('<p>You died valiantly in Battle!</p>');\n $('#attackLine2').html('<p>Press the Reset Button to play again!</p>');\n yourEnemy=\"\";\n $('#endGame').html('<button id=\"resetButton\">Reset</button>');\n }\n \n if (lukePower <=0) {\n if (obiPower<=0 && lukePower<=0 && kyloPower<=0) {\n $('#attackLine1').html('<p>Congratulations! You have Won!</p>');\n $('#attackLine2').html('<p>Click on Reset to battle again!</p>');\n yourEnemy=\"\";\n $('#endGame').html('<button id=\"resetButton\">Reset</button>');\n\n }\n else {\n $('#attackLine1').html('<p>You have defeated your opponenet!</p>');\n $('#attackLine2').html('<p>Click on another enemy to battle them!</p>');\n yourEnemy=\"\";\n }\n }\n } /* end if (darthPower<=0 || lukePower<=0) */\n \n attackPower=attackPower+25;\n\n }/* end if (yourFighter=='darth') && (yourEnemy=='luke') */ \n\n else if (yourFighter=='darth' && yourEnemy=='obi-wan'){\n darthPower=(darthPower-enemyPower);\n obiPower=(obiPower-attackPower);\n $('#darthPower').html(darthPower);\n $('#obiPower').html(obiPower);\n $('#attackLine1').html('<p>You suffered '+enemyPower+' damage points</p>');\n $('#attackLine2').html('<p>You inflicted '+attackPower+' on Obi-Wan Kenobi');\n if (darthPower <= 0 || obiPower <= 0) {\n \n $('#enemyFighter').replaceWith('');\n \n \n if (darthPower <=0 && obiPower <= 0){\n\n $('#attackLine1').html('<p>You both died valiantly in Battle!</p>');\n $('#attackLine2').html('<p>Press the Reset Button to play again!</p>');\n yourEnemy=\"\";\n $('#endGame').html('<button id=\"resetButton\">Reset</button>');\n }\n \n if (darthPower <=0) {\n $('#attackLine1').html('<p>You died valiantly in Battle!</p>');\n $('#attackLine2').html('<p>Press the Reset Button to play again!</p>');\n yourEnemy=\"\";\n $('#endGame').html('<button id=\"resetButton\">Reset</button>');\n }\n \n if (obiPower <=0) {\n if (obiPower<=0 && lukePower<=0 && kyloPower<=0) {\n $('#attackLine1').html('<p>Congratulations! You have Won!</p>');\n $('#attackLine2').html('<p>Click on Reset to battle again!</p>');\n yourEnemy=\"\";\n $('#endGame').html('<button id=\"resetButton\">Reset</button>');\n\n }\n else {\n $('#attackLine1').html('<p>You have defeated your opponenet!</p>');\n $('#attackLine2').html('<p>Click on another enemy to battle them!</p>');\n yourEnemy=\"\";\n }\n }\n } /* end if (darthPower<=0 || obiPower<=0) */\n \n attackPower=attackPower+25;\n\n }/* end if (yourFighter=='darth') && (yourEnemy=='obi-wan') */ \n\n else if (yourFighter=='darth' && yourEnemy=='kylo'){\n\n darthPower=(darthPower-enemyPower);\n kyloPower=(kyloPower-attackPower);\n $('#darthPower').html(darthPower);\n $('#kyloPower').html(kyloPower);\n $('#attackLine1').html('<p>You suffered '+enemyPower+' damage points</p>');\n $('#attackLine2').html('<p>You inflicted '+attackPower+' on Kylo Ren');\n if (darthPower <= 0 || kyloPower <= 0) {\n \n $('#enemyFighter').replaceWith('');\n \n \n if (darthPower <=0 && kyloPower <= 0){\n\n $('#attackLine1').html('<p>You both died valiantly in Battle!</p>');\n $('#attackLine2').html('<p>Press the Reset Button to play again!</p>');\n yourEnemy=\"\";\n $('#endGame').html('<button id=\"resetButton\">Reset</button>');\n }\n \n if (darthPower <=0) {\n $('#attackLine1').html('<p>You died valiantly in Battle!</p>');\n $('#attackLine2').html('<p>Press the Reset Button to play again!</p>');\n yourEnemy=\"\";\n $('#endGame').html('<button id=\"resetButton\">Reset</button>');\n }\n \n if (kyloPower <=0) {\n if (obiPower<=0 && lukePower<=0 && kyloPower<=0) {\n $('#attackLine1').html('<p>Congratulations! You have Won!</p>');\n $('#attackLine2').html('<p>Click on Reset to battle again!</p>');\n yourEnemy=\"\";\n $('#endGame').html('<button id=\"resetButton\">Reset</button>');\n\n }\n else {\n $('#attackLine1').html('<p>You have defeated your opponenet!</p>');\n $('#attackLine2').html('<p>Click on another enemy to battle them!</p>');\n yourEnemy=\"\";\n }\n }\n } /* end if (darthPower<=0 || kyloPower<=0) */\n \n attackPower=attackPower+25;\n\n }/* end if (yourFighter=='darth') && (yourEnemy=='kylo') */ \n\n else if (yourFighter=='kylo' && yourEnemy=='luke'){\n\n kyloPower=(kyloPower-enemyPower);\n lukePower=(lukePower-attackPower);\n $('#kyloPower').html(kyloPower);\n $('#lukePower').html(lukePower);\n $('#attackLine1').html('<p>You suffered '+enemyPower+' damage points</p>');\n $('#attackLine2').html('<p>You inflicted '+attackPower+' on Luke Skywalker');\n if (kyloPower <= 0 || lukePower <= 0) {\n \n $('#enemyFighter').replaceWith('');\n \n \n if (kyloPower <=0 && lukePower <= 0){\n\n $('#attackLine1').html('<p>You both died valiantly in Battle!</p>');\n $('#attackLine2').html('<p>Press the Reset Button to play again!</p>');\n yourEnemy=\"\";\n $('#endGame').html('<button id=\"resetButton\">Reset</button>');\n }\n \n if (kyloPower <=0) {\n $('#attackLine1').html('<p>You died valiantly in Battle!</p>');\n $('#attackLine2').html('<p>Press the Reset Button to play again!</p>');\n yourEnemy=\"\";\n $('#endGame').html('<button id=\"resetButton\">Reset</button>');\n }\n \n if (lukePower <=0) {\n if (obiPower<=0 && darthPower<=0 && lukePower<=0) {\n $('#attackLine1').html('<p>Congratulations! You have Won!</p>');\n $('#attackLine2').html('<p>Click on Reset to battle again!</p>');\n yourEnemy=\"\";\n $('#endGame').html('<button id=\"resetButton\">Reset</button>');\n\n }\n else {\n $('#attackLine1').html('<p>You have defeated your opponenet!</p>');\n $('#attackLine2').html('<p>Click on another enemy to battle them!</p>');\n yourEnemy=\"\";\n }\n }\n } /* end if (kyloPower<=0 || lukePower<=0) */\n \n attackPower=attackPower+20;\n\n }/* end if (yourFighter=='kylo') && (yourEnemy=='luke') */ \n \n else if (yourFighter=='kylo' && yourEnemy=='obi-wan'){\n\n kyloPower=(kyloPower-enemyPower);\n obiPower=(obiPower-attackPower);\n $('#kyloPower').html(kyloPower);\n $('#obiPower').html(obiPower);\n $('#attackLine1').html('<p>You suffered '+enemyPower+' damage points</p>');\n $('#attackLine2').html('<p>You inflicted '+attackPower+' on Obi-Wan Kenobi');\n if (kyloPower <= 0 || obiPower <= 0) {\n \n $('#enemyFighter').replaceWith('');\n \n \n if (kyloPower <=0 && obiPower <= 0){\n\n $('#attackLine1').html('<p>You both died valiantly in Battle!</p>');\n $('#attackLine2').html('<p>Press the Reset Button to play again!</p>');\n yourEnemy=\"\";\n $('#endGame').html('<button id=\"resetButton\">Reset</button>');\n }\n \n if (kyloPower <=0) {\n $('#attackLine1').html('<p>You died valiantly in Battle!</p>');\n $('#attackLine2').html('<p>Press the Reset Button to play again!</p>');\n yourEnemy=\"\";\n $('#endGame').html('<button id=\"resetButton\">Reset</button>');\n }\n \n if (obiPower <=0) {\n \n if (obiPower<=0 && darthPower<=0 && lukePower<=0) {\n $('#attackLine1').html('<p>Congratulations! You have Won!</p>');\n $('#attackLine2').html('<p>Click on Reset to battle again!</p>');\n yourEnemy=\"\";\n $('#endGame').html('<button id=\"resetButton\">Reset</button>');\n\n }\n else {\n $('#attackLine1').html('<p>You have defeated your opponenet!</p>');\n $('#attackLine2').html('<p>Click on another enemy to battle them!</p>');\n yourEnemy=\"\";\n }\n }\n } /* end if (kyloPower<=0 || obiPower<=0) */\n \n attackPower=attackPower+20;\n\n }/* end if (yourFighter=='kylo') && (yourEnemy=='obi-wan') */ \n\n else if (yourFighter=='kylo' && yourEnemy=='darth'){\n\n kyloPower=(kyloPower-enemyPower);\n darthPower=(darthPower-attackPower);\n $('#kyloPower').html(kyloPower);\n $('#darthPower').html(darthPower);\n $('#attackLine1').html('<p>You suffered '+enemyPower+' damage points</p>');\n $('#attackLine2').html('<p>You inflicted '+attackPower+' on Darth Vader');\n if (kyloPower <= 0 || darthPower <= 0) {\n \n $('#enemyFighter').replaceWith('');\n \n \n if (kyloPower <=0 && darthPower <= 0){\n\n $('#attackLine1').html('<p>You both died valiantly in Battle!</p>');\n $('#attackLine2').html('<p>Press the Reset Button to play again!</p>');\n yourEnemy=\"\";\n $('#endGame').html('<button id=\"resetButton\">Reset</button>');\n }\n \n if (kyloPower <=0) {\n $('#attackLine1').html('<p>You died valiantly in Battle!</p>');\n $('#attackLine2').html('<p>Press the Reset Button to play again!</p>');\n yourEnemy=\"\";\n $('#endGame').html('<button id=\"resetButton\">Reset</button>');\n }\n \n if (darthPower <=0) {\n if (obiPower<=0 && darthPower<=0 && lukePower<=0) {\n $('#attackLine1').html('<p>Congratulations! You have Won!</p>');\n $('#attackLine2').html('<p>Click on Reset to battle again!</p>');\n yourEnemy=\"\";\n $('#endGame').html('<button id=\"resetButton\">Reset</button>');\n }\n else {\n $('#attackLine1').html('<p>You have defeated your opponenet!</p>');\n $('#attackLine2').html('<p>Click on another enemy to battle them!</p>');\n yourEnemy=\"\";\n }\n } /* darth<=0 */\n } /* end if (kyloPower<=0 || darthPower<=0) */\n \n attackPower=attackPower+20;\n\n }/* end if (yourFighter=='kylo') && (yourEnemy=='darth') */ \n\n /* reset button */\n\n $(\"#resetButton\").on(\"click\", function(){\n location.reload();\n \n \n }) /* end reset button click */\n\n }) /* end click attackButton */ \n \n \n\n\n\n}", "function Combat(enemy)\n{\n var victory;\n //inform the on what enemy they are fighting\n alert(\"You encounter a \" + enemy.name + \"!\");\n while(enemy.health > 0 && playerStatus.health > 0)\n {\n //create hit random variable to simiulate random phenomena during combat\n var hit = Math.random() * 100;\n //prompt the user to do something\n var fight = prompt(\"what are you going to do? \\n attack with something \\n run away \\n defend\").toLowerCase();\n //create a switch statement to help determine what the player does in battle\n switch(fight)\n {\n // the uesr wishes to attack, but does not specify how\n case 'attack':\n var attack = prompt(\"What are you attacking with?\").toLowerCase();\n switch(attack)\n {\n case'sword':\n case'attack sword':\n case'attack with sword':\n if(hit >= 20 || enemy.stun == true)\n {\n alert(\"You easily stab your sword through the \" + enemy.name + \"!\");\n enemy.health -=2;\n }\n else\n {\n alert(\"The \" + enemy.name + \" is faster than you thought, he manges to dodge your sword swipe!\");\n }\n break;\n case'dagger':\n case'attack dagger':\n case'attack with dagger':\n if(hit >= 30 && inventory.sword == true)\n {\n alert(\"You manage to slash the \" + enemy.name + \" with your dagger.\");\n enemy.health --;\n }\n else if(inventory.sword == false)\n {\n alert(\"You don't have a sword!\"); \n }\n else\n {\n alert(\"The \" + enemy.name + \" jumps away before you can hit it!\");\n }\n break;\n case'bow':\n case'attack bow':\n case'attack with bow':\n if(hit <= 30 && inventory.bow == true)\n {\n alert(\"Nice Shot!, your arrow goes straight through the \" + enemy.name + \"'s heart\");\n enemy.health == 0;\n }\n else if(hit >= 50 && inventory.bow == true)\n {\n alert(\"You manage to hit the \" + enemy.name + \" in the leg!\");\n enemy.health --;\n enemy.stun = true;\n }\n else if(inventory.bow == false)\n {\n alert(\"You don't have a Bow!\");\n }\n else\n {\n alert(\"Almost instantly, the \" + enemy.name + \" manages to dodge your arrow!\");\n }\n break;\n case'fist':\n case'attack with fist':\n case'attack fist':\n case'nothing':\n case'attack with nothing':\n if(hit >= 50)\n {\n alert(\"You somehow manage to punch the \" + enemy.name +\"!\")\n }\n else\n {\n alert(\"You're careless unarmed attack is easily countered by \" + enemy.name + \"!\");\n playerStatus.health--;\n }\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t\t\n \n }\n break;\n case'sword':\n case'attack sword':\n case'attack with sword':\n if(hit >= 20 || enemy.stun == true)\n {\n alert(\"You easily stab your sword through the \" + enemy.name + \"!\");\n enemy.health -=2;\n }\n else\n {\n alert(\"The \" + enemy.name + \" is faster than you thought, he manges to dodge your sword swipe!\");\n }\n break;\n case'dagger':\n case'attack dagger':\n case'attack with dagger':\n if(hit >= 30 && inventory.sword == true)\n {\n alert(\"You manage to slash the \" + enemy.name + \" with your dagger.\");\n enemy.health --;\n }\n else if(inventory.sword == false)\n {\n alert(\"You don't have a sword!\"); \n }\n else\n {\n alert(\"The \" + enemy.name + \" jumps away before you can hit it!\");\n }\n break;\n case'bow':\n case'attack bow':\n case'attack with bow':\n if(hit <= 30 && inventory.bow == true)\n {\n alert(\"Nice Shot!, your arrow goes straight through the \" + enemy.name + \"'s heart\");\n enemy.health == 0;\n }\n else if(hit >= 50 && inventory.bow == true)\n {\n alert(\"You manage to hit the \" + enemy.name + \" in the leg!\");\n enemy.health --;\n enemy.stun = true;\n }\n else if(inventory.bow == false)\n {\n alert(\"You don't have a Bow!\");\n }\n else\n {\n alert(\"Almost instantly, the \" + enemy.name + \" manages to dodge your arrow!\");\n }\n break;\n case'run':\n case'run away':\n if(hit <= 50)\n {\n alert(\"You manage to run away, all the way back to the Town Square!\");\n playerStatus.energy --;\n TownSquare();\n }\n else\n {\n alert(\"You try your best to get away, but you can't lose the \" + enemy.name + \". You can see the town but decide it is better to not lead the enemy into town.\");\n }\n break;\n case'defend':\n case'block':\n if(inventory.shield == 'none')\n {\n if(hit >= 60)\n {\n alert(\"Even without a shield, you still manage to fend off the \" + enemy.name + \"'s attack\");\n enemy.stun == true;\n \n }\n else\n {\n alert(\"Without a shield, you can't do anything to stop the \" + enemy.name + \"'s attack. He manages to scratch your arm\");\n playerStatus.health --;\n enemy.stun == true;\n }\n }\n else\n {\n alert(\"You easily defend against the attack with a shield, and easily stun the \" + enemy.name);\n enemy.stun == true;\n }\n break;\n case'fist':\n case'attack with fist':\n case'attack fist':\n case'nothing':\n case'attack with nothing':\n if(hit >= 50)\n {\n alert(\"You somehow manage to punch the \" + enemy.name + \"!\")\n }\n default:\n alert(\"I don't understand\" + enemyFight );\n }\n if(enemy.stun == false && enemy.health >0)\n {\n enemy.attack();\n }\n else\n {\n alert(\"The enemy is stunned and can't attack!\");\n }\n }\n if(playerStatus.health <= 0)\n {\n alert(\"You suddenly feel really sleepy, You decide to take a permanent nap.\");\n GameOver();\n }\n else\n {\n alert(\"You have defeated the \" + enemy.name);\n victory = true;\n return victory;\n }\n}", "function Game(){\nif(shaman.hp==0) finishGame();\n\nshaman.mp+=shaman.mp_reg;\nif (shaman.mp>shaman.max_mp) shaman.mp = shaman.max_mp;\n\tgenWave();\n\tfor(var k=0; k<shaman.debuffs.length; k++){\n\t\tshaman.debuffs[k].action(k);\n\t}\n\tfor(var j = 0; j<Spells.length; j++){\n\t\tSpells[j].action();\n\t}\n\tfor(var i = 0; i<Enemies.length; i++){\n\t\tEnemies[i].action();\n\t}\n\tdrawGame();\n}", "function invokeEnemyAttack() {\n\tvar level = Math.floor((Math.random() * 6));\n\tvar soundSource = document.getElementById('sound-source2');\n\tvar energy2 = document.getElementById('energy2');\n\tvar force1 = document.getElementById('force1');\n\tif (energy2.value == 100 && level < 5) {\n\t\tforce1.value -= 3*level;\n\t\tenergy2.value -= 30*level;\n\t\tstate2 = 'f';\n\t\tsoundSource.innerHTML = '<audio src=\"fire-sound.mp3\" type=\"audio/mpeg\" autoplay></audio>';\n\t}\n\tif (force1.value == 0) {\n\t\tvar messageBox = document.getElementById('message-box');\n\t\tmessageBox.innerHTML = '<p><b>YOU LOSE...<br/>DO YOU WANT TO RETRY?</b></p>';\n\t\tsoundSource.innerHTML = '';\n\t\tdefeats++;\n\t\tstate1 = 'n';\n\t\tstate2 = 'n';\n\t\tupdateScore();\n\t\tclearIntervals();\n\t\tchangeMainButton('restart');\n\t}\n}", "function generateAttack(player, damage){\n\treturn {\n\t\ttext: function () {return player.stats.defaultAttack},\n\t\timg: function () {return player.stats.weaponImg},\n\t\taction: function() {\n\t\t\tswitch(player.getRole()) {\n\t\t\t case \"mage\":\n\t\t\t player.setHp(\n\t\t\t\t\t\tplayer.getHp() - damage, player\n\t\t\t\t\t);\n\t\t\t break;\n\t\t\t case \"warrior\":\n\t\t\t player.setHp(\n\t\t\t\t\t\tplayer.getHp() - damage, player\n\t\t\t\t\t);\n\t\t\t break;\n\t\t\t case \"rogue\":\t\t \n\t\t\t if(Math.random() < 0.45){\n\t\t\t\t\t\tplayer.setHp(\n\t\t\t\t\t\t\tplayer.getHp() - damage * 2, player\n\t\t\t\t\t\t);\n\t\t\t\t\t\tfeedbackMessage(\"Vous avez raté votre cible\")\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tfeedbackMessage(\"Touché!\")\n\t\t\t\t\t}\n\t\t\t break;\n\t\t\t default:\n \t\t\tconsole.log(\"NO Role STATS\")\n \t\t}\n\t\t},\n\t}\n}", "function attackCalc(attacker) {\n\n var physDiff = titan.def - attacker.str;\n\n var atkDiff = attacker.atk - physDiff;\n\n var multiplier = function (min,max){\n return Math.floor(Math.random(1)*(max-min+1)+min);\n };\n\n var defenderHpDown = titan.hp - (atkDiff * multiplier(3,4) + multiplier(25, 90));\n\n var damageDone = titan.hp - defenderHpDown;\n\n titan.hp = defenderHpDown;\n\n var hit = new Audio();\n hit.src = \"./sounds/effects/hit.wav\";\n hit.play();\n\n $('#damageAnnouncer').html(attacker.name + \" did \" + damageDone + \" damage to the \" + titan.name + \".\");\n\n $('#foeBar').html(\"-\" + damageDone);\n\n setTimeout(function(){\n $('#foeBar').html(\" \");\n }, 2000);\n\n if (titan.hp < 1) {\n $('#damageAnnouncer').html(attacker.name + \" has defeated the \" + titan.name + \"!\");\n titan.KO = true;\n };\n\n healthCheck();\n\n healthBarsUpdate();\n\n if(!gameOver()) {\n readNextToken();\n }\n\n}", "function dealDamage(attackingCombatant, targetCombatant) {\n\n}", "attackHero(){\n this.attackingDelay = this.setDelay(this.attackingDelaySet);\n this.isAttacking = true;\n //attackingDirection = true is left to right; false is right to left\n this.position.x > this.hero.position.x ? this.attackingDirection = true : this.attackingDirection = false;\n this.attackingDirection ? this.isAttackingFrom = -this.attackSpeed : this.isAttackingFrom = this.attackSpeed;\n this.body.velocity.y = -400;\n this.isAttackingFor = this.setDelay(this.isAttackingSet);\n }", "heal(otherHero) {\n // otherHero.health += this.power;\n otherHero.receiveHealth(this.power);\n console.log(`other hero has ${otherHero.health}`);\n }", "function playerAttackEnemy(isCounter = false) {\n var dodge = false;\n var counterAttack = false;\n var enemyLost = false;\n if ((!player.isAttacking && playerCanGo && !enemy.isAttacking) || isCounter) {\n var enemyDodge = getRandom(100);\n if (enemyDodge <= enemy.dodgeProbability) {\n // the enemy dodged!\n dodge = true;\n };\n if (!isCounter) {\n var enemyCounter = getRandom(100);\n if (enemyCounter <= enemy.counterAttackProbability) {\n counterAttack = true;\n }\n }\n var attackPower = getRandom(player.attackPoints) + 1;\n // We hit the enemy!\n // If the last attack was more than the amount of hitpoints the player has left, pin it to the amount of hitpoints.\n // This will prevent negative hitpoints from occuring.\n attackPower = (attackPower > enemy.hitPoints) ? enemy.hitPoints : attackPower;\n\n playSound(attackStartSound);\n // Load players attackingImage\n swapImage(player, player.attackingImage);\n // Flag the player is attacking\n player.isAttacking = true;\n // Run css animations\n // Callback embeds another animation, runs the attack sound, and decrements the enemies health\n player.imageElement.animate({\n left: \"250px\"\n }, 300, function () {\n if (!dodge) {\n // Displays the attack power\n displayText(enemy, \"-\" + attackPower);\n // Log in the console\n gameConsoleLog(player.name + \" hit \" + enemy.name + \" for \" + attackPower + \"hps!\");\n // Plays the smack sound\n playSound(smackSound);\n // Runs the enemy hit\n characterHitAnimation(enemy, \"right\");\n // Removes the hitpoints\n enemy.hitPoints -= attackPower;\n } else {\n // Enemy dodged\n gameConsoleLog(enemy.name + \" dodged \" + player.name + \"'s attack!\");\n // Run the dodge animation\n dodgeAttack(enemy);\n }\n // Update stats on the screen\n updateStats();\n // Check if the enemy died\n if (enemy.hitPoints <= 0) {\n // Log the enemy has died\n gameConsoleLog(enemy.name + \" has fallen!\");\n // Run the death animation\n killCharacter(enemy);\n enemyLost = true;\n }\n player.imageElement.animate({\n left: \"-180px\"\n }, 300, function () {\n swapImage(player, player.standingImage);\n player.isAttacking = false;\n if (counterAttack === true && !enemyLost) {\n gameConsoleLog(enemy.name + \" has counter-attacked!\");\n enemyAttackPlayer(true);\n }\n if (!isCounter) {\n startPlayerTimer();\n }\n });\n });\n return true;\n }\n}", "function Enemy (level) {\n // this is a function so it HAS to have an argument\n // that argument is level * 10\n // This.hp is declaring our enemy's health * the level\n // Our levels are declared later by the variable enemyLevel\n this.hp = level * 10;\n // Since primaryAttack is nested under the function Enemy\n // this.primaryAttack then refers to the parent Enemy\n // primaryAttack is also a function with a target parameter\n // ?????? how can Enemy and our charachters all have target? I DUNNO!!!\nthis.primaryAttack = function(target) {\n // we then define our paramater target and say that\n // that when this primaryAttack function is used the enemy will have a hp power\n // that strengthens as the level is upped\n // i dont know how the level is upped though ???????\n target.hp = target.hp - (10 + level/4);\n}\n // another function here for the enemy special attack\n // this one is different though\n // I know what it does but dont know why?\n // SO it basically takes 10 from the good guy and absorbs 10 for the bac guy\n // How are target.hp and this.hp being distinguished ?????????\n this.specialAttack = function(target) {\n target.hp = target.hp - 10;\n this.hp = this.hp + 10;\n }\n}", "function fighting() {\n enemies.forEach((enemy, index_enemy) => {\n allies.forEach((ally, index_ally) => {\n if (enemies[index_enemy].combat && allies[index_ally].combat == true) {\n enemies[index_enemy].hp = enemies[index_enemy].hp - allies[index_ally].damage / 60;\n allies[index_ally].hp = allies[index_ally].hp - enemies[index_enemy].damage / 60;\n hit_sound.volume = 0.5;\n hit_sound.play();\n //console.log(\"Enemy HP: \" + enemies[index_enemy].hp);\n //console.log(\"Ally HP: \" + allies[index_ally].hp);\n document.querySelector(\"img.wizard[data-id='\" + enemy.id + \"']\").src = \"zombie_action2.png\";\n document.querySelector(\"img.ally[data-id='\" + ally.id + \"']\").src = \"adventurer_action2.png\";\n }\n if (enemies[index_enemy].hp < 0) {\n enemies.splice(index_enemy, 1);\n death_sound.volume = 0.2;\n death_sound.play();\n points = points + 30;\n updatePoints();\n document.querySelector(\"img.wizard[data-id='\" + enemy.id + \"']\").remove();\n }\n if (allies[index_ally].hp < 0) {\n allies.splice(index_ally, 1);\n death_sound.volume = 0.2;\n death_sound.play();\n document.querySelector(\"img.ally[data-id='\" + ally.id + \"']\").remove();\n }\n\n });\n });\n // Laat ze doorlopen als combat voorbij is\n allies.forEach((ally, index_ally) => {\n allies[index_ally].combat = false;\n });\n enemies.forEach((enemy, index_enemy) => {\n enemies[index_enemy].combat = false;\n });\n\n}", "function punch() {\n health -= 2 + target.modifier\n health.hit++\n drawhealth()\n console.log(\"punchworks\")\n}", "attack(warrior){\n if(warrior instanceof Elf){\n let dodge = Math.random();\n if(dodge > warrior.dodgingChance){\n warrior.hp -= this.strength;\n }\n }else{\n warrior.hp -= this.strength;\n }\n }", "function attackPlayer(health) {\n return health - randomDamage();\n}", "function enemyAttackPlayer(isCounter = false) {\n // Assumes dodge and counterAttack are false \n var dodge = false;\n var counterAttack = false;\n var playerLost = false;\n // We either check if it's a genuine allowable attack, or if it's a counter\n if ((!enemy.isAttacking && enemyCanGo && !player.isAttacking) || isCounter) {\n // Check odds of a dodge\n var playerDodge = getRandom(100);\n if (playerDodge <= player.dodgeProbability) {\n dodge = true;\n }\n // If it's not a counter ....\n if (!isCounter) {\n // Check the odds of a counter\n var counter = getRandom(100);\n if (counter <= player.counterAttackProbability) {\n counterAttack = true;\n }\n }\n\n // Prevent 0 attack power.\n var attackPower = getRandom(enemy.attackPoints) + 1;\n\n // If the last attack was more than the amount of hitpoints the player has left, pin it to the amount of hitpoints.\n // This will prevent negative hitpoints from occuring.\n attackPower = (attackPower > player.hitPoints) ? player.hitPoints : attackPower;\n\n // We hit the enemy!\n playSound(attackStartSound);\n\n // Load enemy's attackingImage\n swapImage(enemy, enemy.attackingImage);\n // Flag the enemy is attacking\n enemy.isAttacking = true;\n\n // Run css animations\n // The callback will check for a dodge and animate the enemy back into position\n enemy.imageElement.animate({\n right: \"240px\"\n }, 300, function () {\n // Right before the enemy hits, we allow a dodge\n quickDodgeAllowed = true;\n\n enemy.imageElement.animate({\n right: \"250px\"\n }, 150, function () {\n quickDodgeAllowed = false;\n // If the player didn't dodge...\n if (!dodge && !quickDodgeExecuted) {\n // Display to the battle screen\n displayText(player, \"-\" + attackPower);\n // Add the event to the console log\n gameConsoleLog(enemy.name + \" hit \" + player.name + \" for \" + attackPower + \"hps!\");\n // Play the hit sound\n playSound(smackSound);\n // Animate the player being hit\n characterHitAnimation(player, \"left\");\n // Take away the player's health\n player.hitPoints -= attackPower;\n // If the player DID dodge\n } else {\n if (quickDodgeExecuted) {\n // if it was a quick dodge rather than a random dodge, flag it to false now since we are running the dodge\n quickDodgeExecuted = false;\n }\n // Log the dodge\n gameConsoleLog(player.name + \" dodged \" + enemy.name + \"'s attack!\");\n dodgeAttack(player);\n }\n // Update the display\n updateStats();\n // Check if the player is out of hitPoints\n if (player.hitPoints <= 0) {\n gameConsoleLog(player.name + \" has fallen!\");\n killCharacter(player);\n playerLost = true;\n }\n // Now that the actual hit is done, animate player back to their original position.\n enemy.imageElement.animate({\n right: \"-180px\"\n }, 300, function () {\n // Go back to the standing image\n swapImage(enemy, enemy.standingImage);\n // Flag the attack is over\n enemy.isAttacking = false;\n\n // Do we get a counter attack?\n // We also check to see if the player is still alive to prevent a \"ghost\" counter-attack from happening.\n if (counterAttack === true && !playerLost) {\n gameConsoleLog(player.name + \" has counter-attacked!\");\n playerAttackEnemy(true);\n }\n // If this wasn't an enemy counter-attack, we have to restart the enemy's attack timer.\n if (!isCounter) {\n startEnemyTimer();\n }\n });\n });\n });\n return true;\n }\n}", "attack(forwardSteps,rightSteps,damage,type = null,statuses = null){\r\n let attackX = this.x;\r\n let attackY = this.y;\r\n switch (this.direction) {\r\n case 0: attackY -= forwardSteps;\r\n attackX += rightSteps;\r\n break;\r\n case 90: attackX += forwardSteps;\r\n attackY += rightSteps;\r\n break;\r\n case 180: attackY += forwardSteps;\r\n attackX -= rightSteps;\r\n break;\r\n case 270: attackX -= forwardSteps;\r\n attackY -= rightSteps;\r\n break;\r\n }\r\n let attackedTile = this.field.getTile(attackX, attackY);\r\n if(attackedTile) attackedTile.attacked(damage,type,statuses);\r\n }", "update()\r\n {\r\n var pointer = this.input.activePointer;\r\n this.player.setVelocity(0,0);\r\n\t\t\r\n\t\t//Attack scripts\r\n if((this.keyA.isDown || pointer.leftButtonDown()) && lmb == false && !stunned && !gameIsOver)//Left\r\n {\r\n //Execute left attack\r\n lmb = true;\r\n this.player.play(\"AttackLeft\"); \r\n this.player.once(\"animationcomplete\", function () {self.player.play(\"IdleLeft\");});\r\n \r\n if(leftEnemyQueue[0] != null && ((this.player.x - leftEnemyQueue[0].x) <= weaponRange || leftEnemyQueue[0].inRange == true) )\r\n {\r\n distanceMoved = 0;\r\n distanceToMove = this.player.x - leftEnemyQueue[0].x;\r\n this.MoveWorld();\r\n var enem = leftEnemyQueue[0];\r\n this.EnemyHurt(enem);\r\n \r\n if(!firstLeft)\r\n {\r\n firstLeft = true;\r\n this.firstLeftHint.setScale(0);\r\n this.scoreHint.setScale(0);\r\n this.healthHint.setScale(0);\r\n }\r\n }else //if you clicked and there is nothing there, aka, MISS\r\n {\r\n this.StunPlayer();\r\n distanceMoved = 0;\r\n distanceToMove = weaponRange;\r\n this.MoveWorld();\r\n this.sfx.miss.play();\r\n }\r\n \r\n }\r\n else if(this.keyA.isUp && pointer.leftButtonReleased())\r\n {\r\n lmb = false;\r\n }\r\n \r\n if((this.keyD.isDown || pointer.rightButtonDown()) && rmb == false && !stunned && !gameIsOver)//right\r\n {\r\n //Execute Right attack\r\n rmb = true;\r\n this.player.play(\"AttackRight\");\r\n this.player.once(\"animationcomplete\", function () {self.player.play(\"IdleRight\");});\r\n if(rightEnemyQueue[0] != null && ((rightEnemyQueue[0].x - this.player.x) <= weaponRange || rightEnemyQueue[0].inRange == true))\r\n {\r\n distanceMoved = 0;\r\n distanceToMove = this.player.x - rightEnemyQueue[0].x;\r\n this.MoveWorld();\r\n var enem = rightEnemyQueue[0];\r\n this.EnemyHurt(enem);\r\n \r\n if(!firstRight)\r\n {\r\n firstRight = true;\r\n this.firstRightHint.setScale(0);\r\n this.scoreHint.setScale(0);\r\n this.healthHint.setScale(0);\r\n }\r\n }else //if you clicked and there is nothing there, aka, MISS\r\n {\r\n this.StunPlayer();\r\n distanceMoved = 0;\r\n distanceToMove = -weaponRange;\r\n this.MoveWorld();\r\n this.sfx.miss.play();\r\n }\r\n }\r\n else if(this.keyD.isUp && pointer.rightButtonReleased())\r\n {\r\n rmb = false;\r\n }\r\n \r\n //Right range bar\r\n if(rightEnemyQueue[0] != null && ((rightEnemyQueue[0].x - this.player.x) <= weaponRange || rightEnemyQueue[0].inRange == true) )\r\n {\r\n this.player.rightWeaponRangeBar.fillColor = 0x5fcde4;\r\n this.player.rightWeaponRangeBar.setStrokeStyle(2, 0xffffff);\r\n if(!firstRight)\r\n {\r\n this.firstRightHint.setScale(1);\r\n this.firstRightHint.setText(\"Zombie in Range! Right Click to Attack!\");\r\n }\r\n }else\r\n {\r\n this.player.rightWeaponRangeBar.fillColor = 0x5b6ee1;\r\n this.player.rightWeaponRangeBar.setStrokeStyle(0, 0xffffff);\r\n }\r\n \r\n //Left range bar\r\n if(leftEnemyQueue[0] != null && ((this.player.x - leftEnemyQueue[0].x) <= weaponRange || leftEnemyQueue[0].inRange == true))\r\n {\r\n this.player.leftWeaponRangeBar.fillColor = 0xf21d04;\r\n this.player.leftWeaponRangeBar.setStrokeStyle(2, 0xffffff);\r\n if(!firstLeft)\r\n {\r\n this.firstLeftHint.setScale(1);\r\n this.firstLeftHint.setText(\"Zombie in Range! Left Click to Attack!\");\r\n }\r\n }else\r\n {\r\n this.player.leftWeaponRangeBar.fillColor = 0xac3232;\r\n this.player.leftWeaponRangeBar.setStrokeStyle(0, 0xffffff);\r\n }\r\n \r\n for(var i = 0; i < rightEnemyQueue.length; i++)\r\n {\r\n if(i > 0 && rightEnemyQueue[i-1].x + 32 > rightEnemyQueue[i].x)\r\n {\r\n rightEnemyQueue[i].setVelocityX(100 * gameSpeed);\r\n }else if (rightEnemyQueue[i].x > this.player.x + 32)\r\n {\r\n rightEnemyQueue[i].setVelocityX(-100*gameSpeed);\r\n }else\r\n {\r\n rightEnemyQueue[i].setVelocityX(0);\r\n //trigger left facing attack once\r\n if(!rightEnemyQueue[i].isAttacking && i == 0)\r\n {\r\n rightEnemyQueue[i].isAttacking = true;\r\n var index = i;\r\n //trigger attack function\r\n var attackDelay = this.time.delayedCall(250, function(){\r\n \r\n if(rightEnemyQueue[index] != null && rightEnemyQueue[index].x <= self.player.x + 32)\r\n {\r\n this.EnemyAttack(rightEnemyQueue[index], 1);\r\n }\r\n \r\n }, null, self);\r\n }\r\n }\r\n for(var h = 0; h < rightEnemyQueue[i].health.length; h++)\r\n {\r\n if(rightEnemyQueue[i].healthBars[h] != null && !rightEnemyQueue[i].isDead && !gameIsOver){\r\n rightEnemyQueue[i].healthBars[h].x = rightEnemyQueue[i].x;}else if(gameIsOver)\r\n {\r\n rightEnemyQueue[i].healthBars[h].setScale(0);\r\n }\r\n }\r\n }\r\n for(var i = 0; i < leftEnemyQueue.length; i++)\r\n {\r\n if(i > 0 && leftEnemyQueue[i-1].x - 32 < leftEnemyQueue[i].x)\r\n {\r\n leftEnemyQueue[i].setVelocityX(-100 * gameSpeed);\r\n }else if (leftEnemyQueue[i].x < this.player.x - 32)\r\n {\r\n leftEnemyQueue[i].setVelocityX(100*gameSpeed);\r\n }else\r\n {\r\n leftEnemyQueue[i].setVelocityX(0);\r\n //Trigger right facing attack once\r\n if(!leftEnemyQueue[i].isAttacking && i == 0)\r\n {\r\n leftEnemyQueue[i].isAttacking = true;\r\n var index = i;\r\n //trigger attack function\r\n var attackDelay = this.time.delayedCall(250, function(){\r\n \r\n if(leftEnemyQueue[index] != null && leftEnemyQueue[index].x >= self.player.x - 32)\r\n {\r\n this.EnemyAttack(leftEnemyQueue[index], 0);\r\n }\r\n \r\n }, null, self);\r\n }\r\n }\r\n for(var h = 0; h < leftEnemyQueue[i].health.length; h++)\r\n {\r\n if(leftEnemyQueue[i].healthBars[h] != null && !leftEnemyQueue[i].isDead && !gameIsOver){\r\n leftEnemyQueue[i].healthBars[h].x = leftEnemyQueue[i].x;}else if(gameIsOver)\r\n {\r\n leftEnemyQueue[i].healthBars[h].setScale(0);\r\n }\r\n }\r\n }\r\n \r\n \r\n }", "function surpriseAttack(attack) { //reusable function to change jons health\n jonSnowHealth -= attack\n console.log(`Jon's health is now ${jonSnowHealth}`)\n isJonAlive() //calls the reusable function isJonAlive() each time surpriseAttack() is called\n}", "function onEnemyClick(sprite, pointer){\n sprite.damage(player.clickDmg) //damage based on click value\n}", "function weaponExec(type, level)\n{\n switch(type)\n {\n case \"missili\":\n {\n switch(level)\n {\n case \"1\":\n {\n return fireMissile(1); \n }\n case \"2\":\n {\n var shoot = [];\n for (var i = 0; i < 3; i++){\n shoot[i] = fireMissile(2);\n };\n\n return (shoot[0] || shoot[1] || shoot[2]); \n }\n case \"3\":\n {\n var shoot = [];\n for (var i = 0; i < 7; i++){\n shoot[i] = fireMissile(3);\n };\n\n return (shoot[0] || shoot[1] || shoot[2] || shoot[3] || shoot[4] || shoot[5] || shoot[6]); \n }\n }\n }\n break;\n\n case \"scudo\":\n {\n raiseShield(level);\n return true;\n }\n break;\n\n\n case \"bomba\":\n {\n if(bombExplosion(level))\n {\n weaponCooldown = level*level*100;\n fireCooldown = level*level*50;\n \n return true;\n }\n else\n return false;\n }\n break;\n\n default:\n console.log(\"Arma non riconosciuta!\");\n return false;\n }\n}", "attack(enemy) {\n let d = dist(this.x, this.y, enemy.x, enemy.y);\n // if within range, no target acquired, not dead, and the enemy is alive\n // TARGET THE ENEMY\n if (d < 300 && this.targetId < 0 && !this.dead && !enemy.dead) {\n this.targetId = enemy.uniqueId;\n this.obtainedTarget = true;\n }\n let dx = enemy.x - this.x;\n let dy = enemy.y - this.y;\n let angle = atan2(dy, dx);\n\n if (this.targetId === enemy.uniqueId) {\n // get closer to the enemy\n if (d >= 150) {\n this.x += this.speed * cos(angle);\n this.y += this.speed * sin(angle);\n // also keep a distance from the enemy\n } else {\n this.x -= this.speed * cos(angle);\n this.y -= this.speed * sin(angle);\n }\n // if within range, FIRE\n if (d < 200 && !this.bulletFired && !this.dead) {\n this.bullet = new Bullet(this.x, this.y, enemy.x, enemy.y, this.playerId, this.uniqueId);\n this.bulletFired = true;\n this.attacking = true;\n Fire.play();\n } else {\n this.attacking = false;\n }\n if (this.bulletFired && !this.dead) {\n this.attacking = true;\n // if the enemy is not attacking, it will fight back\n if (!enemy.attacking) {\n enemy.targetId = this.uniqueId;\n }\n this.bullet.moveTo(enemy);\n if (this.bullet.dead) {\n this.bulletFired = false;\n this.bullet = null;\n }\n }\n if (enemy.dead) {\n // if the targeted enemy is tank / square XL\n // if the tank gets destroyed and this unit is close to it\n // the explosion kills this unit\n if (enemy.uniqueId === 100 && enemy.uniqueId === this.targetId && d < 100){\n this.health -= enemy.damage;\n }\n this.targetId = -1;\n this.obtainedTarget = false;\n this.attacking = false;\n }\n }\n // variation to the movement\n // Set velocity via noise()\n this.vx = map(noise(this.tx), 0, 1, -0.05, 0.05);\n this.vy = map(noise(this.ty), 0, 1, -0.05, 0.05);\n // Update position\n this.x += this.vx;\n this.y += this.vy;\n // Update time properties\n this.tx += 0.0001;\n this.ty += 0.0001;\n\n this.handleWrapping();\n }", "function doAttack(number){\n\tlastAttack = characterAttacks[selectedPlayer.element];\n\tif (turnCounter == 0) {\n\t\tlastAttack.fn(p2Grid, selectedPlayer.square.xIndex, selectedPlayer.square.yIndex);\n\t} else if (turnCounter == 1) {\n\t\tlastAttack.fn(p1Grid, selectedPlayer.square.xIndex, selectedPlayer.square.yIndex);\n\t}\n}", "function attack(damage, target) {\n\t// Generates and stores a random number from 1 to 10.\n $(\"#room-hider\").hide();\n $(\"#searcher-images\").hide();\n // hide room description on attack in case it bugs out and is showing\n\tvar hitChance = Math.floor(Math.random() * 10) + 1;\n var defense = target.defense;\n\n if(hitChance <= defense) {\n $(\"#combat-display\").append(\"<p>\" + target.name + \" defended, no damage.</p>\");\n } else if(hitChance >= 1 && hitChance <= 10) {\n \ttarget.takeDamage(damage);\n // Doesn't need to be an else if, but made it one to illustrate \tthe concept.\n }\n}", "function AttackSelected() {\n Orion.Attack(\"lasttarget\");\n}", "setupCardAbilities(ability) {\n this.fight({\n effect: 'stun and exhaust {1}',\n effectArgs: (context) => [context.event.card],\n gameAction: [\n ability.actions.stun((context) => ({ target: context.event.card })),\n ability.actions.exhaust((context) => ({ target: context.event.card }))\n ]\n });\n }", "function farm() {\n var lowest_health = lowest_health_partymember();\n\n //If we have a target to heal, heal them. Otherwise attack a target.\n if (lowest_health != null && lowest_health.health_ratio < 0.8) {\n if (distance_to_point(lowest_health.real_x, lowest_health.real_y) < character.range) {\n heal(lowest_health);\n } else {\n move_to_target(lowest_health);\n }\n } else {\n let player = get_player(\"Sozaw\");\n if (player != null) {\n var target = get_target_of(player);\n }\n if (target != null && is_monster(target)) {\n if (player != null && target != null && target.s.cursed == undefined && in_attack_range(target)) {\n if (target.hp > 6000) {\n curse(target)\n }\n }\n if (distance_to_point(target.real_x, target.real_y) < character.range) {\n if (can_attack(target)) {\n attack(target);\n }\n }\n } else {\n let player = get_player(\"Sozaw\");\n if (player != null && distance_to_point(player.real_x, player.real_y) > 300) {\n ask_location(\"Sozaw\")\n }\n if (player != null && distance_to_point(player.real_x, player.real_y) < 300) {\n stop(move)\n move(\n character.x + ((player.x - character.x) - 20),\n character.y + ((player.y - character.y) - 20));\n }\n else {\n if (player == null && !smart.moving) {\n ask_location(\"Sozaw\")\n }\n }\n }\n }\n}", "playerAttack(attack, opponent) {\r\n // 0: return false if attack misses\r\n // 1: otherwise update opponents health and return true\r\n let accuracy = 10;\r\n \r\n if(attack.type == 'electric' && opponent.type == 'water') {\r\n attack.power += this.damageAtack();\r\n }\r\n\r\n if((this.willAttackMiss(100 - attack.accuracy))) {\r\n this.evolution();\r\n let newHP = opponent.playerHp - attack.power;\r\n opponent.updatePlayerHp(newHP)\r\n return 1;\r\n }\r\n return 0;\r\n }", "function kick() {\n health -= 3 + target.modifier\n hit++\n drawhealth()\n console.log(\"kickworks\")\n}", "@action act() {\n this.clearHit()\n this.handleEffects()\n }", "function combatManager(){\n if (!pause)\n {\n if (enemyEnter)\n {\n animationTimer -= 1;\n AIShip.ShipContainer.x += 6;\n if (animationTimer <= 0)\n {\n enemyEnter = false;\n }\n }\n else if (enemySink)\n {\n animationTimer -= 1;\n AIShip.ShipContainer.y += 2;\n if (animationTimer <= 0)\n {\n enemySink = false;\n inCombat = false;\n enemyHealth = 1;\n }\n }\n else if (animFlee)\n {\n animationTimer -= 1;\n AIShip.ShipContainer.x -= 6;\n if (animationTimer <= 0)\n {\n animFlee = false;\n inCombat = false;\n }\n }\n else {\n if (enemyTurn)\n {\n if (AITimer > 0)\n {\n AITimer -= 1;\n }\n else {\n if (Math.random() < 0.25 && enemyHealth > 30)\n {\n AIFlank();\n }\n else {\n AIFire();\n }\n swapTurns();\n }\n }\n }\n if (enemyHealth <= 0 && !enemySink)\n {\n moneyPlus = Math.floor(Math.random() * 60) + 10\n SOUNDMANAGER.toggleCombat();\n createMessage(\"You have sunk the enemy ship!\", \"You gain \" + moneyPlus + \" gold\");\n Gold += moneyPlus;\n enemySink = true;\n animationTimer = 60 * 4;\n }\n }\n}", "function primaryAttack(toonPickedId, oppPickedId)\n {\n // Hides the Attack Spinner once the attack and counter attack have been performed\n $(\".spinner-grow\").hide();\n $(\"#pl-dmg-taken\").empty(); \n\n // Increases the attack power of the player's toon after a successful primary attack (as defined in the functional specification/instructions)\n boostedAp = boostedAp + getToonAp(toonPickedId);\n \n // Calculates the opponent toon's health after receiving primary attack damage\n oppHealth = oppHealth - boostedAp;\n console.log(\"Attack Power: \" + boostedAp);\n console.log(\"Opponent Health: \" + oppHealth);\n \n // Updates the DOM with the opponent toon's health after receiving primary attack damage from the player's toon\n $(\"#picked-opponent\").find(\".hp\").empty();\n $(\"#picked-opponent\").find(\".hp\").append(oppHealth);\n\n // Calculates the player toon's health after receiving counter attack damage\n // (Only if player toon did not knock out oppoonent first)\n if (oppHealth > 0)\n {\n playerHealth = playerHealth - getToonCap(oppPickedId);\n console.log(\"Counter Attack Power: \" + getToonCap(oppPickedId));\n console.log(\"Player Health: \" + playerHealth);\n }\n\n // Updates the DOM with the player toon's health after receiving counter attack damage\n $(\"#your-character\").find(\".hp\").empty();\n $(\"#your-character\").find(\".hp\").append(playerHealth);\n\n // Updates the DOM with the attack damage read out to the opponent's toon\n $(\"#pl-dmg-dealt\").append(\"You attack \" + getToonName(oppPickedId) + \" with \" + getToonName(toonPickedId) + \"'s \" + getToonAttackMove(toonPickedId) + \" dealing \" + boostedAp + \" damage.\");\n\n // Updates the DOM with the counter attack damage read out to the player's toon\n $(\"#pl-dmg-taken\").append(getToonName(oppPickedId) + \" counter attacks you with \" + getToonAttackMove(oppPickedId) + \" dealing \" + getToonCap(oppPickedId) + \" damage.\");\n }", "attack(target) {\n return (target.res -= this.power);\n }", "takeHit(weapon, player) {\n this.scene.sound.play(`${this.getData('type')}-hit`);\n this.stunned();\n this.flash();\n this.knockback(weapon.getData('knockback'), player);\n this.data.values.health -= weapon.getData('damage');\n }", "static clickAttack() {\n if (!this.enemyPokemon().isAlive()) {\n return;\n }\n OakItemRunner.use(GameConstants.OakItem.Poison_Barb);\n GameHelper.incrementObservable(player.statistics.clicks);\n this.enemyPokemon().damage(player.calculateClickAttack());\n if (!this.enemyPokemon().isAlive()) {\n this.defeatPokemon();\n }\n }", "function setdmg1(maxhit) //Prevents additional action if hp2 is 0\n{\n //document.getElementById(\"test\").innerHTML=\"\";\n if (hp1 != 0)\n {\n elem=document.getElementById(\"player1\");\n var rand = Math.floor(Math.random()*(maxhit+1));\n var chance = Math.floor(Math.random()*(monsterAccuracyLevel-1));\n if (chance == 0) rand = 0;\n if (monsterAbbreviation == \"nope\" && protectedpray) rand = 0; \n else if (monsterAbbreviation == \"nope\" && attackcount == 6 && phase == 3) { //Araxxor phase 3 swipe\n\trand = 25 + Math.floor(Math.random()*21);\n\tattackcount = 0;\n }\n else if (monsterAbbreviation == \"nope\" && attackcount >= 6 && attackcount < 9 && phase == 1) { //Araxxor phase 1 web\n\tif (reflected == 0) {\n\t\thp2+=15;\n\t\tif (hp2 > 1000) hp2 = 1000;\n\t\t$(\"#greenhp2\").css({\"width\": (hp2*monsterHPbarDRAINAGE)});\n\t}\n\trand = reflected;\n\tif (attackcount == 8) {\n\t\tmonsterDefenceRank = 2.5;\n\t}\n }\n else if (monsterAbbreviation == \"nope\" && attackcount >= 13 && phase == 1) { //Araxxor phase 1 cacoon\n\tif (prayer == \"mage\" && attackcount == 13) protectcacoon = true; //I wouldn't reach this else if condition if I use protectedpray bool\n\t//if (protectcacoon == false) rand = 20; //Old implementation\n\t//else rand = 10;\n\trand = 20;\n\tif (attackcount == 15) {\n\t\tprotectcacoon = false;\n\t\tnotfrozen = true;\n\t\tplayer1frozen.src=\"gifs/invisible.gif\"; \n\t\tattackcount = 0;\n\t}\n }\n else if (mageatk && monsterAbbreviation == \"ogre\") {\n\t rand = 5;\n\t mageatk = false;\n\t monsterDefenceRank = 3;\n\t if (stopcount == 0) {\n\t\t $(\"#msg\").css({\"opacity\": defaultopacity});\n\t\t document.getElementById(\"msg\").innerHTML=\"Your accuracy has been weakened by the ice.\"; \n\t\t gamemsg = setInterval(function () {\n\t\t\t defaultopacity -= 0.002;\n\t\t\t if (defaultopacity < -100) defaultopacity = 0; //To prevent non-stop decrementation\n\t\t\t $(\"#msg\").css({\"opacity\": defaultopacity});\n\t\t }, 10);\t\n\t stopcount++;\n\t }\n }\n else if (monsterAbbreviation == \"jad\") { \n\t if (protectedpray && jadhardmode != \"Normal\") rand = Math.round(rand/2);\n\t else if (protectedpray) rand = 0;\n\t if (!protectedpray && jadhardmode == \"Hard\") rand = 50 + Math.round(rand*0.48);\n\t if (!protectedpray && jadhardmode == \"Impossible\") rand = 97;\n\t if (protectedpray && jadhardmode == \"Impossible\" && rand < 20) rand += 30;\n }\n else if (monsterAbbreviation == \"brid\") { \n\t if (protectedpray) rand = 0;\n }\n else if (monsterAbbreviation == \"ele\") {\n\t monsterDefenceRank -= 0.01;\n\t monsterAccuracyLevel += 0.01;\n }\n if (rand >= hp1) //Sets what rand is based on hp1\n {\n rand = hp1;\n if (hp1 == 0)//Prevents additional 0s that randomly appear\n {\n rand = null;\n }\n }\n hp1 = hp1 - rand; //This line is the reason why \"if (hp1==0)\" appears twice\n\t\tif (monsterAbbreviation == \"drag\") {\n\t\t\tchance2 = Math.floor(Math.random()*100);\n\t\t\tif (chance2 % 2 == 0) {attackGIFname = \"atk\";}\n\t\t\telse {attackGIFname = \"atk2\";}\n\t\t}\n\t\tif (monsterAbbreviation == \"brid\") {\n\t\t\tif (attackcount <= 5) {\n\t\t\t\tif (attackGIFname == \"atk2\") {attackGIFname = \"atk\"; magerangeatk = \"range\";}\n\t\t\t\telse if (attackGIFname == \"atk\") {attackGIFname = \"atk2\"; magerangeatk = \"mage\";}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tchance2 = Math.floor(Math.random()*100);\n\t\t\t\tif (chance2 % 2 == 0) {attackGIFname = \"atk\"; magerangeatk = \"range\";} \n\t\t\t\telse {attackGIFname = \"atk2\"; magerangeatk = \"mage\";}\n\t\t\t}\n\t\t\tattackcount++;\n\t\t\tif (attackcount == 10) attackcount = 0;\n\t\t}\n\t\telse if (monsterAbbreviation == \"jad\") {\n\t\t\tchance2 = Math.floor(Math.random()*100);\n\t\t\tif (chance2 % 2 == 0) {attackGIFname = \"atk\"; magerangeatk = \"mage\";}\n\t\t\telse {attackGIFname = \"atk2\"; magerangeatk = \"range\"; }\n\t\t}\n\t\telse if (monsterAbbreviation == \"nope\") {\n\t\t\tchance2 = Math.floor(Math.random()*100);\n\t\t\tif (attackcount == 5 && phase == 3) { //Araxxor mechanic checks for protectedpray so magerangeatk is needed\n\t\t\t\tattackGIFname = \"swipe\"; magerangeatk = \"melee\";\n\t\t\t}\n\t\t\telse if (attackcount == 5 && phase == 1) { \n\t\t\t\tattackGIFname = \"web1\"; magerangeatk = \"reflect\";\n\t\t\t\treflected = 0;\n\t\t\t\tmonsterDefenceRank = 10;\n\t\t\t}\n\t\t\telse if (attackcount == 6 && phase == 1) { \n\t\t\t\tattackGIFname = \"web2\"; \n\t\t\t}\n\t\t\telse if (attackcount == 7 && phase == 1) { \n\t\t\t\tattackGIFname = \"web3\"; \n\t\t\t}\n\t\t\telse if (attackcount == 12 && phase == 1) { \n\t\t\t\tstopatk1();\n\t\t\t\tstopdmg1();\n\t\t\t\tnotfrozen = false;\n\t\t\t\tmagerangeatk = \"bleed\";\n\t\t\t\tattackGIFname = \"cacoon1\";\t\t\n\t\t\t\tplayer1frozen=document.getElementById(\"player1frozen\");\n\t\t\t\tsetTimeout(function () \n\t\t\t\t{ \n\t\t\t\t\tplayer1frozen.src=\"gifs/cacoon.png\"\n\t\t\t\t}, 1000);\n\t\t\t}\n\t\t\telse if (attackcount == 13 && phase == 1) { \n\t\t\t\tattackGIFname = \"cacoon2\"; \n\t\t\t\tif (protectcacoon == true) attackcount++; //New implementation makes cacoon hit 2x instead of 3x if protected\n\t\t\t}\n\t\t\telse if (attackcount == 14 && phase == 1) { \n\t\t\t\tattackGIFname = \"cacoon3\"; \n\t\t\t}\n\t\t\telse if (phase >= 2) {\n\t\t\t\tif (chance2 % 2 == 0) {attackGIFname = \"atk3\"; magerangeatk = \"melee\";}\n\t\t\t\telse {attackGIFname = \"atk4\"; magerangeatk = \"range\"; }\t\n\t\t\t}\n\t\t\telse if (chance2 % 2 == 0) {attackGIFname = \"atk\"; magerangeatk = \"melee\";}\n\t\t\telse {attackGIFname = \"atk2\"; magerangeatk = \"range\"; }\n\t\t\tif (phase == 3 || phase == 1) attackcount++;\n\t\t}\n\t\telse if (monsterAbbreviation == \"ogre\") {\n\t\t\tchance2 = Math.floor(Math.random()*100);\n\t\t\tif (chance2 % 2 == 0) {\n\t\t\t\tif (prayer != \"mage\") { //Using protectedpray code mechanic works too, but no need (too much work for this monster)\n\t\t\t\t\tstopatk1();\n\t\t\t\t\tstopdmg1();\n\t\t\t\t\tnotfrozen = false;\n\t\t\t\t\tmageatk = true;\n\t\t\t\t\tattackGIFname = \"atk2\"; //Same as stand animation, but stand is used in other code so using it here will cause disruptions\n\t\t\t\t\tif (typeof(freezeanimation) != 'undefined') clearInterval(freezeanimation);\n\t\t\t\t\ticeopacity = 0;\n\t\t\t\t\topacityone = false;\n\t\t\t\t\tfreezeanimation = setInterval(function () {\n\t\t\t\t\t\tplayer1frozen=document.getElementById(\"player1frozen\");\n\t\t\t\t\t\tplayer1frozen.src=\"gifs/barrage.png\"\n\t\t\t\t\t\tif (opacityone) iceopacity -= 0.005;\n\t\t\t\t\t\telse iceopacity += 0.005;\n\t\t\t\t\t\tif (iceopacity > 1) opacityone = true;\n\t\t\t\t\t\tif (iceopacity < -100) iceopacity = 0; //To prevent non-stop decrementation \n\t\t\t\t\t\t$(\"#player1frozen\").css({\"opacity\": iceopacity});\n\t\t\t\t\t}, 10);\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tnotfrozen = true;\n\t\t\t\t\tattackGIFname = \"atk\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tnotfrozen = true;\n\t\t\t\tattackGIFname = \"atk\";\n\t\t\t}\n\t\t}\n\t\telse attackGIFname = \"atk\";\t \t\n\t\telem3=document.getElementById(\"player2\");\n\t\telem3.src=\"gifs/\" + monsterAbbreviation + attackGIFname +\".gif\";\n if (hp1 == 0) //Prevents eating when dead\n {\n\twon = false;\n if (monsterAbbreviation == \"me\") player1killpoints = 0;\n\tdocument.getElementById(\"killsPVM\").innerHTML=player1killpoints;\n player2kills += 1;\n\tdocument.getElementById(\"deathsPVM\").innerHTML=player2kills; \n stopatk1();\n\tstopatk2();\n\tsetTimeout(function () \n\t{\n\tstopdmg1(); \n\tstopdmg2();\t\n\t}, 1);\n\t$(\".item1\").css({\"display\": \"none\"}); \t\t\t\t\t\t\t \n document.getElementById(\"player2\").removeAttribute(\"onclick\");\t\t\n\tallowattack = false;\n setTimeout(function () \n { \n\t $(\"#hphp1\").css({\"display\": \"none\"});\n elem.src=\"gifs/rangedeath.gif\";\t\n }, 3000);\n\t setTimeout(function () \n { \n\t player1frozen=document.getElementById(\"player1frozen\"); \n\t player1frozen.src=\"gifs/invisible.gif\";\n\t elem.src=\"gifs/youlose.gif\"; \n\t $(\"#restart\").css({\"visibility\": \"visible\"});\n }, 5000);\n }\n document.getElementById(\"hpcount1\").innerHTML=hp1;//Note: Always make sure that the logic is correct before outputting\n $(\"#redhp1\").css({\"height\": 50 - hp1/2}); \n $(\"#hitsplat1\").css({\"visibility\": \"visible\"});\n if (rand == 0) \n {\n $(\"#hitsplat1\").css({\"background-image\": \"url('images/dmg0.gif')\"});\n $(\".singledigitdmg1\").css({\"display\": \"none\"});\n $(\".leftsplathalf1\").css({\"display\": \"none\"});\n $(\".rightsplathalf1\").css({\"display\": \"none\"});\n } \n else {$(\"#hitsplat1\").css({\"background-image\": \"url('images/dmg.gif')\"});}//The else must be there for damages to not stay blue\n if (rand < 10 && rand > 0) //Single digit damage number\n { //dmg#-width,0-6,1-4,2-6,3-5,4-5,5-5,6-6,7-5,8-6,9-6,\n $(\".leftsplathalf1\").css({\"display\": \"none\"});\n $(\".rightsplathalf1\").css({\"display\": \"none\"}); \n if (rand == 0 || rand == 2 || rand == 6 || rand == 8 || rand == 9)\n {\n $(\".singledigitdmg1\").attr(\"width\", \"6\"); //Adjusting the gif width of the single digit number\n $(\".singledigitdmg1\").css({\"margin-left\": \"9px\"}); //Adjusting the position of the single digit number\n }\n else if (rand == 3 || rand == 4 || rand == 5 || rand == 7)\n {\n $(\".singledigitdmg1\").attr(\"width\", \"5\");\n $(\".singledigitdmg1\").css({\"margin-left\": \"9.5px\"});\n }\n else \n {\n $(\".singledigitdmg1\").attr(\"width\", \"4\");\n $(\".singledigitdmg1\").css({\"margin-left\": \"10px\"});\n }\n $(\".singledigitdmg1\").css({\"display\": \"\"});\n $(\".singledigitdmg1\").attr(\"src\", \"images/\" + rand + \".gif\");\n }\n else if (rand >= 10)\n {//dmg#-width,0-6,1-4,2-6,3-5,4-5,5-5,6-6,7-5,8-6,9-6,\n leftdigit = Math.floor(rand / 10); //Split 2 digit damages to a left number and right number\n rightdigit = rand % 10;\n $(\".singledigitdmg1\").css({\"display\": \"none\"});\n if (leftdigit == 0 || leftdigit == 2 || leftdigit == 6 || leftdigit == 8 || leftdigit == 9) //Adjusting the gif width of the number\n {$(\".leftsplathalf1\").attr(\"width\", \"6\");}\n else if (leftdigit == 3 || leftdigit == 4 || leftdigit == 5 || leftdigit == 7)\n {$(\".leftsplathalf1\").attr(\"width\", \"5\");}\n else {$(\".leftsplathalf1\").attr(\"width\", \"4\");}\n if (rightdigit == 0 || rightdigit == 2 || rightdigit == 6 || rightdigit == 8 || rightdigit == 9)\n {$(\".rightsplathalf1\").attr(\"width\", \"6\");}\n else if (rightdigit == 3 || rightdigit == 4 || rightdigit == 5 || rightdigit == 7)\n {$(\".rightsplathalf1\").attr(\"width\", \"5\");}\n else {$(\".rightsplathalf1\").attr(\"width\", \"4\");}\n $(\".leftsplathalf1\").css({\"display\": \"\"});\n $(\".leftsplathalf1\").attr(\"src\", \"images/\" + leftdigit + \".gif\");\n $(\".rightsplathalf1\").css({\"display\": \"\"}); \n $(\".rightsplathalf1\").attr(\"src\", \"images/\" + rightdigit + \".gif\");\n }\n $(\"#greenhp1\").css({\"width\": (hp1*10/33)});\n if (monsterTime > 2000) \n {\n\t setTimeout(function () //Commented out because hits are too fast\n\t { \n\t\t\t$(\".singledigitdmg1\").css({\"display\": \"none\"});\n\t\t\t$(\".leftsplathalf1\").css({\"display\": \"none\"});\n\t\t\t$(\".rightsplathalf1\").css({\"display\": \"none\"});\n\t\t\t$(\"#hitsplat1\").css({\"visibility\": \"hidden\"});\n\t }, 2000);\n }\n }\n}", "function Enemy(health, stun, name)\n{\n //create variables for the enemy's stats\n\tthis.health = health;\n //create variable for the enemy's stun status\n this.stun = stun;\n //create variable for the enemy's name\n this.name = name;\n this.attack = function()\n {\n var enemyHit = Math.random() * 100;\n if(enemyHit >= 40 && enemyHit != 100)\n if(playerStatus.health > 0)\n {\n alert(\"The \" + this.name + \" manages to scratch your Arm!\");\n playerStatus.health --;\n }\n else \n {\n alert(\"The \" + this.name +\" Slashes your throat!\");\n if(inventory.armorType == 'none')\n {\n playerStatus.health = 0;\n }\n else if(invenory.armorType == 'Heavy')\n {\n alert(\"Fortunately, the armor managed to negate all of the damage! \");\n }\n else\n {\n alert(\"Fortunately, you're armor managed to lessen the blow!\");\n playerStatus.health --;\n \n }\n }\n else if(enemyHit == 100)\n {\n alert(\"The \" + this.name + \" manages to take a pretty big chunk out of your leg\");\n playerStatus.health -=2;\n }\n else\n {\n alert(\"The \" + this.name + \" stares you down, poised to attack\");\n }\n }\n \n}", "function fight (){\n\t//object variable to refence the current defenders stats\n\tvar defend = characters[defender];\n\n\t//object variable to refence the players characters stats\n\tvar player = characters[player_char];\n\n\t//change player's hp by the current defenders counter attack stat\n\tplayer[\"hp\"] -= defend[\"cnter_atk\"];\n\n\t//change the current defender hp based on the players attack stat\n\tdefend[\"hp\"] -= player[\"atk\"];\n\n\t//change the players attack stat by adding the players base attack to the grand total\n\tplayer[\"atk\"] += player[\"base_atk\"];\n\n\t//if the player hp is less then or equal to zero\n\tif (player[\"hp\"] <= 0){\n\t\t// remove the players icon image and replace it with a game over message\n\t\t$( \"div\" ).remove( \"#\"+ player_char);\n\t\t$(\"#your_char\")\n\t\t\t.html(\"<div id=\\\"defeat\\\"><p>You are Dead!</p></div>\");\n\t//else if the defender hp is less than or equal to zero\n\t}else if(defend[\"hp\"] <= 0){\n\t\t//increment number of victories\n\t\tnum_victories++;\n\t\t//if number of victories equal 3 than\n\t\tif (num_victories == 3){\n\t\t\t//remove the defender icon and display a victory message\n\t\t\t$( \"div\" ).remove( \"#\"+defender);\n\t\t\t$(\"#defender\")\n\t\t\t.html(\"<div id=\\\"victory\\\"><p>You Win!</p></div>\");\n\t\t//else remove the defender icon from the page\n\t\t}else{\n\t\t\t$( \"div\" ).remove( \"#\"+defender);\n\t\t}\n\t\t//set defender name to \"\" to allow the player to select the next defender\n\t\tdefender = \"\";\n\t}\n}", "function attackVsFeint() {\n heroAtakSound.play();\n hero.classList.add('slashRun');\n monsta.classList.add('monstaRun');\n disallowAttackClick(); //odpinam funkcje\n console.log('disallow click');\n setTimeout(function() {\n hero.classList.remove('slashRun');\n monsta.classList.remove('monstaRun');\n healthCountLeft = healthCountLeft - 25;\n healthLeft.style.width = healthCountLeft + '%';\n // podpięcie ponowne animacji ataku\n setTimeout(function() {\n allowAttackClick();\n }, 1300);\n console.log(healthCountLeft);\n fatality(); //checking if health zero, fatality initiated\n\n }, 1400); // this time is a delay for health bar animation\n checkWinner();\n}", "postAttacked(animal,attacker,damage,type,last){}", "attack(input){\n print(\"astral cage!\")\n let w = Vars.world.tiles.width*8\n let h = Vars.world.tiles.height*8\n sfx.barrierflash.at(input.x,input.y)\n effects.astralBarrier.at(input.x,input.y)\n Time.run(30, () => {\n Geometry.iterateLine(0,0,0,0,h,40,(x, y) => {\n effects.astralMarker.at(x, y, 0, {x: w, y:y})\n Time.run(30, () => {\n effects.astralCage.at(x, y, 0, {x: w, y:y})\n Sounds.laserblast.at(Vars.player.x,Vars.player.y)\n });\n })\n Geometry.iterateLine(0,0,0,w,0,40,(x, y) => {\n effects.astralMarker.at(x, y, 0, {x: x, y:h})\n Time.run(90, () => {\n effects.astralCage.at(x, y, 0, {x: x, y:h})\n Sounds.laserblast.at(Vars.player.x,Vars.player.y)\n });\n })\n });\n }", "async battle_phase_combat() {\n if (!this.turns_actions.length) {\n this.battle_phase = battle_phases.ROUND_END;\n this.check_phases();\n return;\n }\n const action = this.turns_actions.pop();\n if (action.caster.has_permanent_status(permanent_status.DOWNED)) { //check whether this char is downed\n this.check_phases();\n return;\n }\n if (action.caster.is_paralyzed()) { //check whether this char is paralyzed\n if (action.caster.temporary_status.has(temporary_status.SLEEP)) {\n await this.battle_log.add(`${action.caster.name} is asleep!`);\n } else if (action.caster.temporary_status.has(temporary_status.STUN)) {\n await this.battle_log.add(`${action.caster.name} is paralyzed and cannot move!`);\n }\n await this.wait_for_key();\n this.check_phases();\n return;\n }\n if (action.caster.fighter_type === fighter_types.ENEMY && !abilities_list[action.key_name].priority_move) { //reroll enemy ability\n Object.assign(action, EnemyAI.roll_action(action.caster, party_data.members, this.enemies_info.map(info => info.instance)));\n }\n let ability = abilities_list[action.key_name];\n let item_name = \"\";\n if (action.caster.fighter_type === fighter_types.ALLY && ability !== undefined && ability.can_switch_to_unleash) { //change the current ability to unleash ability from weapon\n if (action.caster.equip_slots.weapon && items_list[action.caster.equip_slots.weapon.key_name].unleash_ability) {\n const weapon = items_list[action.caster.equip_slots.weapon.key_name];\n if (Math.random() < weapon.unleash_rate) {\n item_name = weapon.name;\n action.key_name = weapon.unleash_ability;\n ability = abilities_list[weapon.unleash_ability];\n }\n }\n }\n if (ability === undefined) {\n await this.battle_log.add(`${action.key_name} ability key not registered.`);\n await this.wait_for_key();\n this.check_phases();\n return;\n }\n if (action.caster.has_temporary_status(temporary_status.SEAL) && ability.ability_category === ability_categories.PSYNERGY) { //check if is possible to cast ability due to seal\n await this.battle_log.add(`But the Psynergy was blocked!`);\n await this.wait_for_key();\n this.check_phases();\n return;\n }\n if (ability.pp_cost > action.caster.current_pp) { //check if char has enough pp to cast ability\n await this.battle_log.add(`... But doesn't have enough PP!`);\n await this.wait_for_key();\n this.check_phases();\n return;\n } else {\n action.caster.current_pp -= ability.pp_cost;\n }\n let djinn_name = action.djinn_key_name ? djinni_list[action.djinn_key_name].name : undefined;\n await this.battle_log.add_ability(action.caster, ability, item_name, djinn_name);\n if (ability.ability_category === ability_categories.DJINN) {\n if (ability.effects.some(effect => effect.type === effect_types.SET_DJINN)) {\n djinni_list[action.djinn_key_name].set_status(djinn_status.SET, action.caster);\n } else {\n djinni_list[action.key_name].set_status(djinn_status.STANDBY, action.caster);\n }\n } else if (ability.ability_category === ability_categories.SUMMON) { //some summon checks\n const requirements = _.find(this.data.summons_db, {key_name: ability.key_name}).requirements;\n const standby_djinni = Djinn.get_standby_djinni(MainChar.get_active_players(MAX_CHARS_IN_BATTLE));\n const has_available_djinni = _.every(requirements, (requirement, element) => {\n return standby_djinni[element] >= requirement;\n });\n if (!has_available_djinni) { //check if is possible to cast a summon\n await this.battle_log.add(`${action.caster.name} summons ${ability.name} but`);\n await this.battle_log.add(`doesn't have enough standby Djinn!`);\n await this.wait_for_key();\n this.check_phases();\n return;\n } else { //set djinni used in this summon to recovery mode\n Djinn.set_to_recovery(MainChar.get_active_players(MAX_CHARS_IN_BATTLE), requirements);\n }\n }\n this.battle_menu.chars_status_window.update_chars_info();\n if (ability.type === ability_types.UTILITY) {\n await this.wait_for_key();\n }\n if (this.animation_manager.animation_available(ability.key_name)) {\n const caster_sprite = action.caster.fighter_type === fighter_types.ALLY ? this.allies_map_sprite[action.caster.key_name] : this.enemies_map_sprite[action.caster.key_name];\n const target_sprites = action.targets.map(info => info.target.sprite);\n const group_caster = action.caster.fighter_type === fighter_types.ALLY ? this.battle_stage.group_allies : this.battle_stage.group_enemies;\n const group_taker = action.caster.fighter_type === fighter_types.ALLY ? this.battle_stage.group_enemies : this.battle_stage.group_allies;\n await this.animation_manager.play(ability.key_name, caster_sprite, target_sprites, group_caster, group_taker, this.battle_stage);\n this.battle_stage.prevent_camera_angle_overflow();\n this.battle_stage.set_stage_default_position();\n } else {\n await this.battle_log.add(`Animation for ${ability.key_name} not available...`);\n await this.wait_for_key();\n }\n //apply ability damage\n if (![ability_types.UTILITY, ability_types.EFFECT_ONLY].includes(ability.type)) {\n await this.apply_damage(action, ability);\n }\n //apply ability effects\n for (let i = 0; i < ability.effects.length; ++i) {\n const effect = ability.effects[i];\n if (!effect_usages.ON_USE) continue;\n const end_turn = await this.apply_effects(action, ability, effect);\n if (end_turn) {\n this.battle_phase = battle_phases.ROUND_END;\n this.check_phases();\n return;\n }\n }\n //summon after cast power buff\n if (ability.ability_category === ability_categories.SUMMON) {\n const requirements = _.find(this.data.summons_db, {key_name: ability.key_name}).requirements;\n for (let i = 0; i < ordered_elements.length; ++i) {\n const element = ordered_elements[i];\n const power = BattleFormulas.summon_power(requirements[element]);\n if (power > 0) {\n action.caster.add_effect({\n type: \"power\",\n quantity: power,\n operator: \"plus\",\n attribute: element\n }, ability, true);\n await this.battle_log.add(`${action.caster.name}'s ${element_names[element]} Power rises by ${power.toString()}!`);\n await this.wait_for_key();\n }\n }\n }\n //check for poison damage\n const poison_status = action.caster.is_poisoned();\n if (poison_status) {\n let damage = BattleFormulas.battle_poison_damage(action.caster, poison_status);\n if (damage > action.caster.current_hp) {\n damage = action.caster.current_hp;\n }\n action.caster.current_hp = _.clamp(action.caster.current_hp - damage, 0, action.caster.max_hp);\n const poison_name = poison_status === permanent_status.POISON ? \"poison\" : \"venom\";\n await this.battle_log.add(`The ${poison_name} does ${damage.toString()} damage to ${action.caster.name}!`);\n this.battle_menu.chars_status_window.update_chars_info();\n await this.wait_for_key();\n await this.check_downed(action.caster);\n }\n if (action.caster.has_temporary_status(temporary_status.DEATH_CURSE)) {\n const this_effect = _.find(action.caster.effects, {\n status_key_name: temporary_status.DEATH_CURSE\n });\n if (action.caster.get_effect_turns_count(this_effect) === 1) {\n action.caster.current_hp = 0;\n action.caster.add_permanent_status(permanent_status.DOWNED);\n await this.battle_log.add(`The Grim Reaper calls out to ${action.caster.name}`);\n await this.wait_for_key();\n }\n }\n this.check_phases();\n }", "function EnemyMech(x, y) {\n //default value for the sprite key\n this.spriteName = 'enemyMech';\n //storage for the sprite\n this.sprite = null;\n //score 'bounty'\n this.score = 100;\n //grid x position\n this.x = x;\n //grid y position\n this.y = y;\n //pixel x location\n this.truex = hexGrid.hexTiles[x][y].truex;\n //pixel y location\n this.truey = hexGrid.hexTiles[x][y].truey;\n //team it belongs to\n this.team = teams.enemy;\n //range of weapons\n this.range = 3;\n //health of enemy\n this.health = 2;\n //array to store health tiles\n this.healthSprites = [];\n //bool if action is taken\n this.exhausted = false;\n //called each enemy turn\n this.routine = function () {\n //move randomly to a valid adjacent tile\n EnemyMove(this);\n //shoot a player in range\n EnemyShoot(this);\n }\n this.clickEvent = function() {\n \n }\n //called when sprite is first drawn\n this.draw = function() {\n this.sprite = game.add.sprite(this.truex, this.truey, this.spriteName);\n this.sprite.anchor.setTo(0.5);\n this.sprite.scale.setTo(MECHSCALE);\n this.drawHealth();\n }\n //draws the health tiles\n this.drawHealth = function() {\n for (i=0; i < this.healthSprites.length; i++) {\n this.healthSprites[i].destroy();\n }\n this.healthSprites = [];\n for (i=0; i < this.health; i++) {\n var spriteWidth = 8;\n var healthSprite = game.add.sprite(this.truex + (spriteWidth * i) - (this.health * (spriteWidth / 2)) + spriteWidth / 2, this.truey - 30, 'health');\n healthSprite.anchor.setTo(0.5);\n healthSprite.scale.setTo(HEALTHSCALE);\n this.healthSprites.push(healthSprite);\n }\n }\n //function to move the unit to a position\n this.changePosition = function(x, y) {\n var oldx = this.x;\n var oldy = this.y;\n this.x = x;\n this.y = y;\n this.truex = hexGrid.hexTiles[x][y].truex;\n this.truey = hexGrid.hexTiles[x][y].truey;\n this.sprite.x = this.truex;\n this.sprite.y = this.truey;\n hexGrid.hexTiles[x][y].mech = this;\n hexGrid.hexTiles[oldx][oldy].mech = null;\n this.drawHealth();\n }\n ///called when mech is destroyed\n this.destroy = function() {\n score.addScore(this.score);\n this.sprite.destroy();\n for (i=0; i < this.healthSprites.length; i++) {\n this.healthSprites[i].destroy();\n }\n hexGrid.hexTiles[this.x][this.y].mech = null;\n remove(enemies, this);\n }\n //assigns itself to the mech field of the tile it is on\n hexGrid.hexTiles[x][y].mech = this;\n //adds itself to the active enemy array\n enemies.push(this);\n}", "function healCheck() {\n if (combatant[\"healing\"] === true && combatant[\"hitPoints\"] < 75 && combatant[\"healCounter\"] > 0 && combatant[\"hitPoints\"] > 0) {\n combatant[\"hitPoints\"] = combatant[\"hitPoints\"] + combatant[\"healPoints\"];\n document.getElementById(\"combatHitPoints\").innerHTML = `HP: ${combatant[\"hitPoints\"]}`;\n document.getElementById(\"combatText2\").textContent = `${combatant[\"name\"]} used their super heaing and healed ${combatant[\"healPoints\"]} hit points!`;\n combatant[\"healCounter\"]--;\n counterAttack();\n } else counterAttack();\n}", "function Attacklastattack() {\n Orion.Attack(\"lastattack\");\n}", "function eatFungus()\n\t\t\t{\n\t\t\t\tfungusBank -= 1;\n\t\t\t\tstamina = (stamina * 10 + 5) / 10;\n\t\t\t\tif (stamina > 10)\n\t\t\t\t{\n\t\t\t\t\tstamina = 10;\n\t\t\t\t}\n\t\t\t\thunger = (hunger * 10 + 10) / 10;\n\t\t\t\tif (hunger > 10)\n\t\t\t\t{\n\t\t\t\t\thunger = 10;\n\t\t\t\t}\n\t\t\t\thealth = (health * 10 - 5) / 10;\n\t\t\t\tif (health < 0)\n\t\t\t\t{\n\t\t\t\t\thealth = 0;\n\t\t\t\t}\n\t\t\t\taction(0,1,0);\n\t\t\t\tadvanceTime();\n\t\t\t\tupdateDisp();\n\t\t\t}", "function attackMonster(mode) {\n var maxDamage;\n var logEvent;\n if (mode === MODE_ATTACK) {\n maxDamage = ATTACK_VALUE;\n logEvent = LOG_EVENT_PLAYER_ATTACK;\n } else if (mode === MODE_STRONG_ATTACK) {\n maxDamage = STRONG_ATTACK_VALUE;\n logEvent = LOG_EVENT_PLAYER_STRONG_ATTACK;\n }\n //launch the attack to the monster//\n //by storing the monster damage in the local const; I can use the data to adjust the monster's health.//\n const damage = dealMonsterDamage(maxDamage);\n currentMonsterHealth -= damage;\n writeToLog(logEvent, damage, currentMonsterHealth, currentPlayerHealth);\n //this means the currentmonsterhealth is set equal to currentmonsterhealth minus damage\"\n endRound();\n}", "function attackIt() {\n while (true) {\n var flag = hero.findFlag();\n if (flag) {\n if (flag.color == \"green\") {\n break;\n }\n hero.jumpTo(flag.pos);\n hero.pickUpFlag(flag);\n }\n \n if (hero.canCast(\"summon-burl\")) hero.cast(\"summon-burl\");\n if (hero.canCast(\"summon-undead\")) hero.cast(\"summon-undead\");\n if (hero.canCast(\"raise-dead\")) hero.cast(\"raise-dead\");\n \n var enemy = hero.findNearestEnemy();\n if (enemy && enemy.type != \"sand-yak\") {\n var distance = hero.distanceTo(enemy);\n if (distance < 25 && hero.canCast(\"fear\"))\n hero.cast(\"fear\", enemy);\n else if (distance < 30 && hero.canCast(\"chain-lightning\")) hero.cast(\"chain-lightning\", enemy);\n else if (distance < 30 && hero.canCast(\"poison-cloud\")) hero.cast(\"poison-cloud\", enemy);\n else if (distance < 15 && hero.canCast(\"drain-life\"))\n hero.cast(\"drain-life\", enemy);\n else hero.attack(enemy);\n }\n \n if (hero.health < hero.maxHealth / 2) {\n var friend = hero.findNearest(hero.findFriends());\n if (friend && friend.type != \"burl\" && hero.canCast(\"drain-life\") && hero.distanceTo(friend) <= 15)\n hero.cast(\"drain-life\", friend);\n }\n }\n}", "function johnHelpsHimself(action) {\r\n\tswitch (action) {\r\n\t\tcase 'explore':\r\n\t\t\ttextDialogue(narrator, \"Narocube: Who knows sarcasim better than you \" + player.name + \" Lets take a peak\", 1000);\r\n\t\t\texploreship(gameobj.explore);\r\n\t\t\tgameobj.explore++;\r\n\t\tbreak;\r\n\r\n\t\tcase 'sit tight':\r\n\t\t\ttextDialogue(narrator, \"Narocube: Good choice, Nothing passive aggression like more passive aggression!\", 1000);\r\n\t\t\tgameobj.sittight++;\r\n\t\tbreak;\r\n\t}\r\n}", "function combat(player, enemy, playerAction, enemyAction) {\n playerTurn(player, enemy, playerAction);\n if (enemy.attributes.hp <= 0) {\n return;\n }\n enemyTurn(player, enemy, enemyAction);\n if (player.attributes.hp <= 0) {\n return;\n }\n setScrollPosition();\n displayPlayerInfo(player);\n displayEnemyInfo(enemy);\n\n sessionStorage.setItem(\"player\", JSON.stringify(player));\n sessionStorage.setItem(\"enemy\", JSON.stringify(enemy));\n sessionStorage.setItem(\"enemyAction\", determineEnemyAction(enemy));\n setScrollPosition();\n}", "attack(player, minion) {\r\n console.log(player, minion);\r\n while (player.isAlive() && minion.isAlive()) {\r\n /*1. Calculate the actual damage by multiplying the strength \r\n * of the player times the damage value of the weapon.*/\r\n const playerDmg = player.strength * this.damage;\r\n /*2. Call the applyDamage function of the \r\n * minion object and pass it the actual damage value you just calculated.*/\r\n minion.applyDamage(playerDmg);\r\n /*Call the isAlive function of the minion object. If the minion is dead, exit. \r\n * If the minion is not dead, call the attack function of the minion and pass it the player object.*/\r\n if (minion.isAlive()) {\r\n minion.attack(player);\r\n } else {\r\n break;\r\n }\r\n }\r\n return player.isAlive();\r\n }", "postAttack(animal,attackee,damage,type,last){}", "gameOverAction() {\n\n }" ]
[ "0.74064153", "0.7200529", "0.70779645", "0.70751286", "0.6983173", "0.69171274", "0.6914797", "0.69110733", "0.690933", "0.68821394", "0.6825817", "0.6813672", "0.67973083", "0.6788586", "0.6775967", "0.67603105", "0.6740354", "0.6727519", "0.67202854", "0.67132866", "0.66905326", "0.6659994", "0.6654718", "0.6650412", "0.6625192", "0.66228336", "0.66198456", "0.6602958", "0.66007054", "0.6593919", "0.658717", "0.6586135", "0.6570455", "0.65697217", "0.65589905", "0.6550655", "0.65487486", "0.6546248", "0.65462124", "0.65409887", "0.65218055", "0.6508914", "0.6488648", "0.6482483", "0.64723116", "0.64556545", "0.64375246", "0.642107", "0.64082724", "0.64079696", "0.63792944", "0.6378417", "0.63698846", "0.6365835", "0.6363807", "0.6361036", "0.63376874", "0.63342303", "0.6324532", "0.6301549", "0.6297452", "0.629527", "0.6284306", "0.6275238", "0.62703943", "0.6268748", "0.62604725", "0.6245918", "0.624573", "0.6244292", "0.6244195", "0.62339693", "0.62253714", "0.62230575", "0.62132514", "0.6208469", "0.62080234", "0.62079823", "0.6205488", "0.62051666", "0.6201094", "0.61989254", "0.61988676", "0.61922884", "0.6186785", "0.6183751", "0.616632", "0.6166315", "0.6162869", "0.6148451", "0.6139832", "0.61392015", "0.6135783", "0.613165", "0.6130168", "0.61250925", "0.6125074", "0.6124575", "0.6120429", "0.61190385", "0.61111176" ]
0.0
-1
TODO function for rolling saveObj.Value + d20
render() { const {Title = ''} = this.props const {ArrOfObj} = this.props const ArrOfObjMap = ArrOfObj.map( obj => { return ( <div key={obj.Name} onClick={() => this.props.d20Roll(obj.Modifier)}> <p>{obj.Name}:+ <span className='rollableUnderline'> {obj.Modifier}</span><span> </span> </p> </div> ) }) return ( <div className="listing" ><strong>{Title}</strong> {ArrOfObjMap}</div> ) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function save_vals(d)\n{\n this._current = d;\n}", "autoSaveInterval() {\n return 0;\n }", "function SaveObject() {\n var oDuplicated = JSON.parse(JSON.stringify(o));\n DeleteBlocTemplateFromAssembly();\n AllUndefinedNullToNothing();\n if (ConfiguratorMode == 'CBC') {\n o.BlocAssembly[\"@LastModifiedFromConf\"] = \"true\";\n }\n window.GetCurrentStampAppVersion()\n .then(function (version) {\n o.BlocAssembly[\"@StampAppVersion\"] = version;\n xmlDoc = json2xml(o);\n return SaveToXml((ConfiguratorMode == 'assembly') ? url.pathToXML : url.pathToXMLCBC)\n }).then(function () {\n alertify.success(translations.GENERAL_SAVING);\n window.setTimeout(RechargeAfterSaving, 3000);\n document.getElementById('disablingDiv').style.display = 'block';\n aux = \"\";\n aux += \"<div class='w3-progress-container'>\";\n aux += \" <div id='myBar' class='w3-progressbar w3-green' style='width:1%'></div>\";\n aux += \"</div>\";\n document.getElementById('disablingDiv').innerHTML = aux;\n MoveProgressBar();\n o = oDuplicated;\n });\n}", "function saver(o) {\n return rec = o;\n}", "function updateValues() {\n \n document.getElementById(\"autosave\").innerHTML = \"Auto-Saving in \" + timer + \" Last Save: \" + lastSave;\n }", "function saveHistory(obj) {\n var latest = db.collection('latest');\n latest.insert(obj);\n findObj();\n }", "changeBaseSave(i,event){\n this.savingThrowsModifier[1].saves[i].value = Number(event.target.value)\n }", "function updateSavings() {\r\n var newSaved = income * saveRateInput //get this year's amount saved\r\n var temp_bal_increase = savingsBal + newSaved; //get last year's bal + new money saved\r\n savingsBal = temp_bal_increase + (temp_bal_increase * adjInterestRate); //add this year's interest to balance\r\n \r\n return savingsBal;\r\n }", "function saveRecord() {\n\n var finalP = finalPrice.toString();\n var op = parseFloat(enteredPrice);\n \n setRecord((record) => [...record, enteredPrice]);\n setRecord((record) => [...record, discount]);\n setRecord((record) => [...record, finalP]);\n setIndex(index + 1);\n //setDisplay();\n }", "function Save() {\n cadrs[currentCadrN] = isCubeClicked.slice();\n timesForCadrs[currentCadrN] = timeForCadrVal / 1;\n}", "function savePosition()\r\n{\r\n\tvar pos = getPosition();\r\n\tMZ_setValue(numTroll+\".position.X\",pos[0]);\r\n\tMZ_setValue(numTroll+\".position.Y\",pos[1]);\r\n\tMZ_setValue(numTroll+\".position.N\",pos[2]);\r\n}", "function saveMeter()\r\n{\r\n\taddEntpMeter(arrEntp[gArrayIndex]);\r\n}", "function compute_savings(x){\n\tvar sum = 0;\n\tfor (var i = 0 ; i < x.length; i++) {\n \tsum += x[i];\n \t}\n\tvar saving = ((2400.0 - sum)/2400.0 )* 100;\n\treturn saving.toFixed(2) ;\t\n}", "function autosave(){\r\n\tfor(var d = 0; d < cal_days_in_month[workingDate.getMonth()]; d++){\r\n\t\t\t\t\r\n\t\ttry{\r\n\t\t\tvar value = document.getElementById(\"t\" + (d+1)).value;\r\n\t\t\tvar y = workingDate.getFullYear();\r\n\t\t\tvar m = workingDate.getMonth();\r\n\t\t\t\r\n\t\t\tconsole.log(value.length);\r\n\t\t\t\r\n\t\t\t//only save boxes with more than nothing\r\n\t\t\tif(value.length != 0){\r\n\t\t\t\tif(calendar.year[y]){\r\n\t\t\t\t\tif(calendar.year[y].month[m]){\r\n\t\t\t\t\t\tif(calendar.year[y].month[m].day[d]){\r\n\t\t\t\t\t\t\tcalendar.year[y].month[m].day[d].memo = value;\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tcalendar.year[y].month[m].addDay(d, value);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tcalendar.year[y].addMonth(m);\r\n\t\t\t\t\t\tcalendar.year[y].month[m].addDay(d, value);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcalendar.addYear(y);\r\n\t\t\t\t\tcalendar.year[y].addMonth(m);\r\n\t\t\t\t\tcalendar.year[y].month[m].addDay(d, value);\r\n\t\t\t\t}\r\n\t\t\t\tdocument.getElementById(\"f\" + (d+1)).innerHTML = format(nl2br(value));\r\n\t\t\t}else{\t\t\r\n\t\t\t\tconsole.log(\"WORKING\");\r\n\t\t\t\tcalendar.year[y].month[m].removeDay(d);\r\n\t\t\t\tdocument.getElementById(\"f\" + (d+1)).innerHTML = \"\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}catch(err){\r\n\t\t\t\r\n\t\t}\r\n\t}\r\n\t//also update the exporter\r\n\tdocument.getElementById('exporter').value = objectToPT(calendar);\r\n}", "dateObjToStorageDate(dateObj) {\n\t\tif (typeof dateObj !== \"object\") return;\n\n\t\tconst day = (\"0\" + dateObj.getDate()).slice(-2);\n\t\tconst month = (\"0\" + (dateObj.getMonth() + 1)).slice(-2);\n\t\tconst year = dateObj.getFullYear();\n\t\treturn day + \"/\" + month + \"/\" + year;\n\t}", "function handleSaveThrow() {\n\n saveThrowValue = recentRoll + player.modArray[1];\n dragonAttack();\n}", "function justSave() {\n interpolateAndSave(false);\n }", "function countSave(count) {\n saveAll += count;\n countAllSavings();\n }", "function automaticSave() {\n setTimeout(() => {\n let newValue = simplemde.value()\n // skip this method if value not changed\n if (oldValue != newValue) {\n repo.save(newValue)\n reloadGitLog()\n }\n return automaticSave()\n }, AUTO_SAVE_TIME);\n}", "function writeStock(x){\n if(x<=0){\n x=0;\n }else{\n x=x-1;\n }}", "function save(){\r\n\tutil.log(\"Data: Saving All...\");\r\n\t//Save Each\r\n\tutil.log(\"Data: Saving Done...\");\r\n}", "asignDataValues_spine (dataObj) {\n this.computeValue(dataValues.p);\n this.computeValue.call(this.Sprites.d, dataValues.d);\n // can set false, if need keep temp old values for HTML dataEditor\n if(storeValues){ this.dataValues = dataValues };\n }", "saveObjctSize() {\nthis._scope.getRecords().forEach((record) => {\nif (record instanceof Objct) {\nthis._objctSize[record.getName()] = record.getTotalSize();\n}\n});\nreturn this;\n}", "save_() {\n const objectToSave = {};\n objectToSave[TaskHistory.STORAGE_KEY_LAST_EXECUTED_TIME] =\n this.lastExecutedTime_;\n storage.local.set(objectToSave);\n }", "close(monowave) {\n\t\tthis.dateEnd\t= monowave.timeEnd;\n\t\tthis.valueEnd\t= monowave.valueEnd;\n\t\tvar deltaPrice \t= this.valueEnd - this.valueStart;\n\t\tvar deltaTime \t= this.dateEnd - this.dateStart;\n\t\tthis.ratio\t\t= deltaPrice / deltaTime;\n\t}", "formatLastObjectiveValue ( mode = 0 ) {}", "function save() {\r\n Utilities.saveObject('bejeweled_high_score', BEST_SCORE);\r\n }", "function save_and_export() {\r\n\r\n}", "function saveSpeed() {\n chrome.storage.sync.set({ settings: speedObj }, () => {\n console.log('Saved: ', speedObj);\n });\n }", "saveOriginalState() {\n\n\t\tconst binding = this.binding;\n\n\t\tconst buffer = this.buffer,\n\t\t\tstride = this.valueSize,\n\n\t\t\toriginalValueOffset = stride * this._origIndex;\n\n\t\tbinding.getValue( buffer, originalValueOffset );\n\n\t\t// accu[0..1] := orig -- initially detect changes against the original\n\t\tfor ( let i = stride, e = originalValueOffset; i !== e; ++ i ) {\n\n\t\t\tbuffer[ i ] = buffer[ originalValueOffset + ( i % stride ) ];\n\n\t\t}\n\n\t\t// Add to identity for additive\n\t\tthis._setIdentity();\n\n\t\tthis.cumulativeWeight = 0;\n\t\tthis.cumulativeWeightAdditive = 0;\n\n\t}", "function ageOneYear (obj) {\n obj.age += 1\n return obj\n}", "function save() {\n let timeEntered = timeStamp()\n let countStr = count + ' - '\n saveEl.innerHTML += `<p>${countStr} ${timeEntered}</p>`\n total()\n}", "save(saveVal) {\n var that = this\n\n this.dataCache = saveVal\n\n if(this.defaultValues[this.saveKey].type === 'int') {\n saveVal = parseInt(saveVal)\n } else if(this.defaultValues[this.saveKey].type === 'array') {\n saveVal = JSON.stringify(saveVal)\n }\n\n return new Promise(function(resolve, reject) {\n if(cc.sys.isNative) {\n var path = jsb.fileUtils.getWritablePath()\n jsb.fileUtils.writeToFile({data: saveVal}, path + that.saveKey)\n } else {\n cc.sys.localStorage.setItem(that.saveKey, saveVal)\n }\n return resolve()\n })\n }", "function saveValues() {\n\tstorage.hiscore2 = hiscore;\n\tstorage.longest2 = longest;\n\tstorage.speed2 = speed;\n}", "function save(key) {\r\n return function (value) {\r\n s[key] = value;\r\n storage.write(SETTINGS_FILE, s);\r\n //WIDGETS[\"activepedom\"].draw();\r\n };\r\n }", "function valueCounter() {\r\n let storage = db.transaction(\"data\", \"readwrite\").objectStore(\"data\");\r\n storage.get(\"save-data\").addEventListener(\"success\", function(e) {\r\n cookieValue += cookiesPerSecond;\r\n this.result.cookieValue = cookieValue;\r\n storage.put(this.result, \"save-data\");\r\n })\r\n }", "save(obj) {\n obj.id = uniqid();\n this.warehouse[obj.id] = obj;\n return obj;\n }", "rollforward(deltas = this._deltas) {\n var self = this._self;\n console.log('rollforward', self, deltas);\n Object.entries(deltas).forEach(function([name, values]) {\n // console.log('rollforward', name, values);\n var value = values[0];\n self[name] = value;\n });\n // console.log('rollforward.end', this);\n this._deltas = {};\n return (deltas);\n }", "function Save() \n{\n /* var savearr = [holdname, playerlvl, health, mana, gold, savecoord];\n var savedata = JSON.stringify(savearr);*/\n savedatasw = 1;\n playerinfo.playername=playername;\n playerinfo.playerlvl=playerlvl;\n playerinfo.health=health;\n playerinfo.mana=mana;\n playerinfo.gold=gold;\n playerinfo.savecoord=savecoord;\n playerinfo.savedatasw=savedatasw;\n \n fs.writeFileSync(\"save.json\", JSON.stringify(playerinfo));\n \n return;\n}", "function saveToStorage(){\n\tvar length = keyLog[fullTimeStamp].length;\n\tif(length != 0 && saving != true && enabled == true){\n\t\tsaving = true;\n\t\t//console.log(\"data was saved\");\n\t\tchrome.storage.local.get(fullTimeStamp, function(storage){\n\t\t//console.log(\"Saved Log\" );\n\t\t//console.log(storage);\n\t\tif(storage[fullTimeStamp] != undefined){\n\t\t\tstorage[fullTimeStamp] += keyLog[fullTimeStamp];\n\t\t\tchrome.storage.local.set(storage, function(){\n\t\t\t\tsaving = false;\n\t\t\t});\n\t\t}else{\n\t\t\tchrome.storage.local.set(keyLog, function(){\n\t\t\t\tsaving = false;\n\t\t\t});\n\t\t}\n\t\tgetTimeStamp();\n\t\t});\n\t}\n}", "async save(object){\r\n let objetos = []\r\n try{\r\n objetos = await this.getAll();\r\n let max = 0;\r\n objetos.forEach(producto => {\r\n if (producto.id > max) {\r\n max = producto.id;\r\n }\r\n });\r\n object.id = max+1; \r\n } catch{\r\n object.id = 1;\r\n }\r\n objetos.push(object);\r\n const objetoEnJson = JSON.stringify(objetos);\r\n await fs.promises.writeFile(this.nombreArchivo, objetoEnJson)\r\n }", "function saveReadSpeed() {\n\tif (debug) {\n\t\talert('Saving read speed with count ' + count);\n\t}\n\n\tif (timeSpent != 0 && count != -1) {\n\t\tcount = parseInt(count);\n\t\ttimeSpent = parseInt(timeSpent);\n var gmtOffset = 19800000;\n\n\t\tif (!isNaN(count) && !isNaN(timeSpent)) {\n\t\t\treadSpeed = Math.round(count * 1000 * 60 / timeSpent);\n\t\t\tchrome.storage.sync.get(\"readTimerWPM\", function(result) {\n\t\t\t\tif (debug) {\n\t\t\t\t\talert('Computed readspeed as ' + readSpeed);\n\t\t\t\t}\n\t\t\t\tif (!isAnomaly(readSpeed)) {\n\t\t\t\t\tif (!result || !result.readTimerWPM) {\n\t\t\t\t\t\tif (debug){\n\t\t\t\t\t\t\talert(\"Setter: none found\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tchrome.storage.sync.set({\"readTimerWPM\": [[Date.now() + gmtOffset, readSpeed]]});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresult.readTimerWPM.push([Date.now() + gmtOffset, readSpeed]);\n\t\t\t\t\t\tif (debug){\n\t\t\t\t\t\t\talert(\"Setter: setting \" + JSON.stringify(result.readTimerWPM));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tchrome.storage.sync.set({\"readTimerWPM\": result.readTimerWPM});\n\t\t\t\t\t}\n\t\t\t\t }\n\t\t else if (debug) {\n\t\t alert('Anomaly. Speed discarded.');\n\t\t }\n\t\t\t});\n\t\t} else {\n\t\t\treturn;\n\t\t}\n\t} else if (debug) {\n\t\talert('Error. Count not received.');\n\t}\n}", "function autosave() {\r\n\tif(!changes){\r\n\t\tsetTimeout(save,30000);\r\n\t\tchanges=true;\r\n\t}\r\n}", "function createSave()\n{\n if(typeof(Storage) !== \"undefined\")\n {\n\n var dataSet = new RGBConstructor(rgb);\n\n //alert(\"dataSet = \" + JSON.stringify(dataSet));\n\n if(localStorage.saveCount == undefined)\n {\n localStorage.setItem('saveCount', 0)\n }\n var saveSize = parseInt(localStorage.saveCount) + 1;\n\n //Calls the commitToStorage function to save the object\n commitToStorage(saveSize, dataSet);\n }\n else\n {\n alert(\"Sorry, your browser does not support web storage...\");\n }\n}", "function fnSave(data){\n var key = Date.now();\n window.localStorage.setItem(key, data);\n }", "function saveKeyValues(view, docIdsToChangesAndEmits, seq) {\n var seqDocId = '_local/lastSeq';\n return view.db.get(seqDocId)[\n \"catch\"](defaultsTo({_id: seqDocId, seq: 0}))\n .then(function (lastSeqDoc) {\n var docIds = mapToKeysArray(docIdsToChangesAndEmits);\n return Promise.all(docIds.map(function (docId) {\n return getDocsToPersist(docId, view, docIdsToChangesAndEmits);\n })).then(function (listOfDocsToPersist) {\n var docsToPersist = flatten(listOfDocsToPersist);\n lastSeqDoc.seq = seq;\n docsToPersist.push(lastSeqDoc);\n // write all docs in a single operation, update the seq once\n return view.db.bulkDocs({docs : docsToPersist});\n });\n });\n }", "function saveSensors(writer){\n var timeNow = new Date();\n var data = [{\n time: timeNow.getUTCHours()+\":\"+timeNow.getUTCMinutes()+\":\"+timeNow.getUTCSeconds(),\n temperature: matrix.humidity.read().temperature,\n pressure: matrix.pressure.read().pressure,\n altitude: matrix.pressure.read().altitude,\n humidity: matrix.humidity.read().humidity,\n magX: matrix.imu.read().mag_x,\n magY: matrix.imu.read().mag_y,\n magZ: matrix.imu.read().mag_z\n }];\nwriter.writeRecords(data).then(() => {console.log(\"saved recent sensors\");/*console.log(data);*/});\n}", "writeDbObject(obj) {\n this.writeUB4(obj.toid.length);\n this.writeBytesWithLength(obj.toid);\n if (obj.oid) {\n this.writeUB4(obj.oid.length);\n this.writeBytesWithLength(obj.oid);\n } else {\n this.writeUB4(0);\n }\n this.writeUB4(0); // snapshot\n this.writeUB4(0); // version\n const packedData = obj._getPackedData();\n this.writeUB4(packedData.length);\n this.writeUB4(obj.flags);\n this.writeBytesWithLength(packedData);\n }", "function save() {\n // clear the redo stack\n redo = [];\n $('#redo').prop('disabled', true);\n // initial call won't have a state\n if (state) {\n undo.push(state);\n $('#undo').prop('disabled', false);\n }\n state = JSON.stringify(canvas);\n }", "function saveCashierTill() {\n retrieveValues();\n saveToServer();\n}", "moveTo(obj)\n {\n\n for(let index of obj)\n {\n if(this.sumOfMovables()<=index.calculateSpace())\n {\n this.setMovMonth(index.getTime());\n let temp = index.getExp();\n for(let value of this.getValues())\n {\n temp.push(value);\n }\n\n index.setExp(temp);\n break;\n\n\n }\n else\n {\n continue;\n }\n }\n\n if(this.getMovMonth()==undefined)\n {\n this.setMovMonth(\"Values cannot be moved!\")\n }\n\n }", "save(jot, newObj) {\n let newJot;\n realm.write(() => {\n jot.dateModified = new Date();\n\n if (newObj) {\n for (let attr of Object.keys(newObj)) {\n jot[attr] = newObj[attr];\n }\n }\n\n newJot = realm.create('Jot', jot, true);\n });\n\n return newJot;\n }", "function saveKeyValues(view, docIdsToChangesAndEmits, seq) {\n\t var seqDocId = '_local/lastSeq';\n\t return view.db.get(seqDocId)\n\t .catch(defaultsTo({_id: seqDocId, seq: 0}))\n\t .then(function (lastSeqDoc) {\n\t var docIds = mapToKeysArray(docIdsToChangesAndEmits);\n\t return PouchPromise.all(docIds.map(function (docId) {\n\t return getDocsToPersist(docId, view, docIdsToChangesAndEmits);\n\t })).then(function (listOfDocsToPersist) {\n\t var docsToPersist = flatten(listOfDocsToPersist);\n\t lastSeqDoc.seq = seq;\n\t docsToPersist.push(lastSeqDoc);\n\t // write all docs in a single operation, update the seq once\n\t return view.db.bulkDocs({docs : docsToPersist});\n\t });\n\t });\n\t }", "function save(key, obj) {\n localStorage.setItem(key, JSON.stringify(obj));\n}", "function saveKeyValues(view, docIdsToChangesAndEmits, seq) {\n\t var seqDocId = '_local/lastSeq';\n\t return view.db.get(seqDocId)\n\t .catch(defaultsTo({_id: seqDocId, seq: 0}))\n\t .then(function (lastSeqDoc) {\n\t var docIds = mapToKeysArray$1(docIdsToChangesAndEmits);\n\t return PouchPromise$1.all(docIds.map(function (docId) {\n\t return getDocsToPersist(docId, view, docIdsToChangesAndEmits);\n\t })).then(function (listOfDocsToPersist) {\n\t var docsToPersist = flatten$1(listOfDocsToPersist);\n\t lastSeqDoc.seq = seq;\n\t docsToPersist.push(lastSeqDoc);\n\t // write all docs in a single operation, update the seq once\n\t return view.db.bulkDocs({docs : docsToPersist});\n\t });\n\t });\n\t }", "function saveData(data)\n{\n\tobjectData = data;\n}", "save(fileobject) {\n\n // if in the browser (as opposed to electron)\n // fileobject is null and must be set to a default value first\n fileobject=bisgenericio.getFixedSaveFileName(fileobject,\"bmi.json\");\n \n\tlet values=this.getValues();\n\tlet out=JSON.stringify(values);\n \tbisgenericio.write(fileobject,out);\n }", "function saveKeyValues(view, docIdsToChangesAndEmits, seq) {\n\t var seqDocId = '_local/lastSeq';\n\t return view.db.get(seqDocId)\n\t .catch(defaultsTo({_id: seqDocId, seq: 0}))\n\t .then(function (lastSeqDoc) {\n\t var docIds = Object.keys(docIdsToChangesAndEmits);\n\t return PouchPromise.all(docIds.map(function (docId) {\n\t return getDocsToPersist(docId, view, docIdsToChangesAndEmits);\n\t })).then(function (listOfDocsToPersist) {\n\t var docsToPersist = flatten(listOfDocsToPersist);\n\t lastSeqDoc.seq = seq;\n\t docsToPersist.push(lastSeqDoc);\n\t // write all docs in a single operation, update the seq once\n\t return view.db.bulkDocs({docs : docsToPersist});\n\t });\n\t });\n\t}", "function fakeProgress(obj,mainValue){\n var val = 0;\n var pInterval = setInterval(function(){\n obj.setValue(val++); \n if (val >= parseInt(mainValue)){\n \tobj.setValue(mainValue);\n \tclearInterval(pInterval); \n } \n }, 30);\n}", "function saveKeyValues(view, docIdsToChangesAndEmits, seq) {\n var seqDocId = '_local/lastSeq';\n return view.db.get(seqDocId)\n .catch(defaultsTo({_id: seqDocId, seq: 0}))\n .then(function (lastSeqDoc) {\n var docIds = mapToKeysArray(docIdsToChangesAndEmits);\n return Promise.all(docIds.map(function (docId) {\n return getDocsToPersist(docId, view, docIdsToChangesAndEmits);\n })).then(function (listOfDocsToPersist) {\n var docsToPersist = flatten(listOfDocsToPersist);\n lastSeqDoc.seq = seq;\n docsToPersist.push(lastSeqDoc);\n // write all docs in a single operation, update the seq once\n return view.db.bulkDocs({docs : docsToPersist});\n });\n });\n }", "function saveKeyValues(view, docIdsToChangesAndEmits, seq) {\n var seqDocId = '_local/lastSeq';\n return view.db.get(seqDocId)\n .catch(defaultsTo({_id: seqDocId, seq: 0}))\n .then(function (lastSeqDoc) {\n var docIds = mapToKeysArray(docIdsToChangesAndEmits);\n return Promise.all(docIds.map(function (docId) {\n return getDocsToPersist(docId, view, docIdsToChangesAndEmits);\n })).then(function (listOfDocsToPersist) {\n var docsToPersist = flatten(listOfDocsToPersist);\n lastSeqDoc.seq = seq;\n docsToPersist.push(lastSeqDoc);\n // write all docs in a single operation, update the seq once\n return view.db.bulkDocs({docs : docsToPersist});\n });\n });\n }", "function saveKeyValues(view, docIdsToChangesAndEmits, seq) {\n var seqDocId = '_local/lastSeq';\n return view.db.get(seqDocId)[\n \"catch\"](defaultsTo({_id: seqDocId, seq: 0}))\n .then(function (lastSeqDoc) {\n var docIds = mapToKeysArray(docIdsToChangesAndEmits);\n return Promise.all(docIds.map(function (docId) {\n return getDocsToPersist(docId, view, docIdsToChangesAndEmits);\n })).then(function (listOfDocsToPersist) {\n var docsToPersist = flatten(listOfDocsToPersist);\n lastSeqDoc.seq = seq;\n docsToPersist.push(lastSeqDoc);\n // write all docs in a single operation, update the seq once\n return view.db.bulkDocs({docs : docsToPersist});\n });\n });\n }", "function save() {\n // clear the redo stack\n redo = [];\n if (!reDo.classList.contains('disabled')) {\n reDo.classList.add('disabled');\n }\n // initial call won't have a state\n if (state) {\n undo.push(state);\n unDo.classList.remove(\"disabled\");\n }\n state = JSON.stringify(canvas);\n}", "function saveScroll() {\n\n\t\tvar left, top;\n\t\tif (window.pageXOffset !== undefined) {\n\t\t\tleft = window.pageXOffset;\n\t\t\ttop = window.pageYOffset;\n\t\t} else if (document.documentElement\n\t\t\t\t&& document.documentElement.scrollLeft !== undefined) {\n\t\t\tleft = document.documentElement.scrollLeft;\n\t\t\ttop = document.documentElement.scrollTop;\n\t\t} else {\n\t\t\tleft = document.body.scrollLeft;\n\t\t\ttop = document.body.scrollTop;\n\t\t}\n\n\t\tif (left || top) {\n\t\t\tvar expireDate = new Date();\n\t\t\texpireDate.setTime(expireDate.getTime() + (1000 * 60));\n\t\t\t$.cookie(\"scrollPosition\", left + ',' + top, {\n\t\t\t\tpath : '/',\n\t\t\t\texpires : expireDate\n\t\t\t});\n\t\t}\n\t}", "function save(key,obj) {\n\tconsole.log('Saving to localStorage and globals[\"' + key + '\"]');\n\tlocalStorage.setItem(key,JSON.stringify(obj));\n\tglobals[key] = obj;\n}", "save() {\r\n return Backendless.Data.of(DiningTiming).save(this);\r\n }", "function saveKeyValues(view, docIdsToChangesAndEmits, seq) {\n var seqDocId = '_local/lastSeq';\n return view.db.get(seqDocId)\n .catch(defaultsTo({_id: seqDocId, seq: 0}))\n .then(function (lastSeqDoc) {\n var docIds = mapToKeysArray(docIdsToChangesAndEmits);\n return PouchPromise.all(docIds.map(function (docId) {\n return getDocsToPersist(docId, view, docIdsToChangesAndEmits);\n })).then(function (listOfDocsToPersist) {\n var docsToPersist = flatten(listOfDocsToPersist);\n lastSeqDoc.seq = seq;\n docsToPersist.push(lastSeqDoc);\n // write all docs in a single operation, update the seq once\n return view.db.bulkDocs({docs : docsToPersist});\n });\n });\n }", "static object(obj) {\r\n return (writer) => {\r\n const keyNames = Object.keys(obj);\r\n writer.write(\"{\");\r\n if (keyNames.length > 0) {\r\n writer.indentBlock(() => {\r\n writeObject();\r\n });\r\n }\r\n writer.write(\"}\");\r\n function writeObject() {\r\n for (let i = 0; i < keyNames.length; i++) {\r\n if (i > 0)\r\n writer.write(\",\").newLine();\r\n const keyName = keyNames[i];\r\n const value = obj[keyName];\r\n writer.write(keyName);\r\n if (value != null) {\r\n writer.write(\": \");\r\n writeValue(writer, value);\r\n }\r\n }\r\n writer.newLine();\r\n }\r\n };\r\n }", "function startCount(obj) {\n valueIncrease();\n valueDecrease();\n \n}", "rollValue() {\n return this.die1 + this.die2;\n }", "function saveKeyValues(view, docIdsToChangesAndEmits, seq) {\n var seqDocId = '_local/lastSeq';\n return view.db.get(seqDocId)[\n \"catch\"](defaultsTo({_id: seqDocId, seq: 0}))\n .then(function (lastSeqDoc) {\n var docIds = mapToKeysArray(docIdsToChangesAndEmits);\n return PouchPromise$1.all(docIds.map(function (docId) {\n return getDocsToPersist(docId, view, docIdsToChangesAndEmits);\n })).then(function (listOfDocsToPersist) {\n var docsToPersist = flatten(listOfDocsToPersist);\n lastSeqDoc.seq = seq;\n docsToPersist.push(lastSeqDoc);\n // write all docs in a single operation, update the seq once\n return view.db.bulkDocs({docs : docsToPersist});\n });\n });\n }", "function excelSave(invOrg) {\n setTimeout(function () {\n // Initialize Focus\n robot.moveMouse(rightScreen.x, rightScreen.y);\n robot.mouseClick();\n\n // Navigate to Save As -> Browse\n robot.keyTap(\"alt\")\n robot.keyTap(\"f\")\n robot.keyTap(\"a\")\n robot.keyTap(\"c\")\n robot.keyTap(\"b\")\n\n // Title of the Save File\n robot.typeString(formattedToday + \"_\" + invOrg)\n\n // Save As File Type\n robot.keyTap(\"tab\")\n\n robot.keyToggle(\"alt\", \"down\");\n robot.keyTap(\"down\");\n robot.keyToggle(\"alt\", \"up\");\n\n robot.moveMouse(saveAsType.x, saveAsType.y);\n robot.mouseClick();\n\n // Navigate to the Save File Directory Address\n robot.keyToggle(\"alt\", \"down\");\n robot.keyTap(\"d\");\n robot.keyToggle(\"alt\", \"up\");\n\n robot.typeString(\"Y:\\\\Logistik\\\\Zoll (neu)\\\\Swiss\\\\Swiss HA\\\\Download Test\")\n robot.keyTap(\"enter\");\n\n // Save and Exit File\n robot.keyToggle(\"alt\", \"down\");\n robot.keyTap(\"s\");\n robot.keyToggle(\"alt\", \"up\");\n\n robot.keyToggle(\"alt\", \"down\");\n robot.keyTap(\"f4\");\n robot.keyToggle(\"alt\", \"up\");\n }, 30000)\n}", "function saveFSPoint(){\n\t// reset point \n\tcurrent_fs_bd = [];\n\tcurrent_fs_bd.push(point_fs.lon);\n\tcurrent_fs_bd.push(point_fs.lat);\n\t\n\toutputSaveProgress();\n}", "function exportExcel(alreadyHere=undefined, summarySheet=undefined){\n\n var newsPaper_data = [];\n let ws_data = [];\n let totalNb = 0;\n let totalMoney = 0;\n let totalCmd = 0;\n let percentageId = -1; // To decrease complexity\n\n if(summarySheet != undefined){\n newsPaper_data = summarySheet;\n }\n else{\n newsPaper_data.push([\"Jour\", \"Nombre\", \"Prix\"]);\n }\n \n if(alreadyHere != undefined){\n ws_data = alreadyHere;\n\n // HARD CODED for the '6' and the rest\n totalCmd = Number(ws_data[1][6]);\n ws_data[1] = ws_data[1].slice(0, 4);\n\n for(let i=0; i<ws_data.length; i++){\n if(ws_data[i][0] == \"TOTAL\"){\n totalNb = Number(ws_data[i][1]);\n totalMoney = Number(ws_data[i][3]);\n ws_data.length = i-1;\n break;\n }\n }\n\n ws_data.shift(); // Removes title row\n }\n \n // loop through commands\n for(let item in getData()){\n if(item[0] == 'C'){\n let obj = JSON.parse(getData(item));\n\n // Check that the time of the command is superior to the last save time\n if(obj[\"time\"] === undefined || getData(\"lastSave\") > Date.parse(obj[\"time\"])){\n continue;\n }\n\n if(obj[\"modified\"] !== undefined){\n console.log(\"MODIFIED\");\n if(isEmpty(obj[\"modified\"])){\n continue;\n }\n else{\n let newObj = JSON.parse(JSON.stringify(obj));\n delete newObj[\"modified\"];\n obj = obj[\"modified\"];\n saveData(item, JSON.stringify(newObj));\n console.log(obj);\n }\n }\n\n totalCmd++;\n let remise = 0;\n let normalSum = 0;\n let percentagedSum = 0;\n\n for(let key in obj){\n try{\n let thisName = \"\";\n let thisCost = 0;\n let isPercentaged = false;\n\n if(isNaN(key)){\n // Check whether it is a payment mode or not\n if(key[0] != key[0].toUpperCase()){\n continue;\n }\n\n console.log(\"real shit\", key);\n let meal;\n\n if(key.includes('M')){\n meal = key.match(/(M)\\d+/)[0].substring(1);\n\n isPercentaged = true;\n thisName = \"Menu \" + products[meal][3][2];\n thisCost = products[meal][3][1] * obj[key];\n if(key.includes('B')){\n thisName += \" + Boisson\";\n thisCost += (products[ key.match(/(B)\\d+/)[0].substring(1) ][1] - 0.5) * obj[key];\n }\n }\n else if(key.includes('F')){\n meal = key.match(/(F)\\d+/)[0].substring(1);\n \n isPercentaged = true;\n thisName = \"Formule \" + products[meal][3][2];\n thisCost = products[meal][3][0] * obj[key];\n }\n else{\n console.log(\"HU HO !!!\");\n }\n }\n else{\n // If it is a remise in %\n if(products[key][1] < 0 && products[key][3] === 'P'){\n remise = obj[key];\n }\n else{\n // If it is a: meal || dessert || starter || drink\n if((products[key].length === 4 && products[key][1] > 0 && products[key][3] != 'M') || products[key][2] === 1){\n isPercentaged = true;\n }\n\n thisCost = products[key][1] * obj[key];\n thisName = products[key][0];\n\n // If it is a newsPaper\n if(products[key].length === 4 && products[key][3] == 'M'){\n newsPaper_data[1][1] += obj[key];\n newsPaper_data[2][1] += thisCost;\n }\n }\n }\n\n if(!(products[key] !== undefined && products[key].length>3 && products[key][3] == 'P')){ // To check if it's a percentaged\n let id = isItHere(thisName);\n\n if(id != -1){\n ws_data[id][1] = Number(ws_data[id][1])+Number(obj[key]);\n ws_data[id][3] = Number(ws_data[id][3])+Number(thisCost);\n }\n else{\n ws_data.push([thisName, obj[key], thisCost/obj[key], thisCost]);\n }\n\n if(isPercentaged){\n percentagedSum += thisCost;\n }\n else{\n normalSum += thisCost;\n }\n\n if(thisCost > 0){\n totalNb++;\n }\n }\n }\n catch(err){\n console.log(err);\n }\n }\n\n if(remise > 0){\n let reduc = percentagedSum/100*Math.abs(remise);\n\n if(percentageId != -1){\n ws_data[percentageId][1] += 1;\n ws_data[percentageId][3] -= reduc;\n }\n else{\n percentageId = ws_data.push([products[0][0], 1, -1, -reduc])-1;\n }\n\n totalMoney += normalSum + percentagedSum - reduc;\n }\n else{\n totalMoney += normalSum + percentagedSum;\n }\n }\n }\n\n ws_data.sort(sortCommand);\n ws_data.unshift(['Plats par popularités' , 'Nombre de produits', 'Coût seul', 'Coût total', '', 'Ticket moyen', 'Nombre de repas']);\n ws_data.push([], ['TOTAL', totalNb, \"\", totalMoney]);\n if(ws_data[1] != undefined){\n ws_data[1].push(\"\", coolRound(totalMoney/totalCmd), totalCmd);\n }\n \n function isItHere(thisName){\n let id = -1;\n for(let i=0; i<ws_data.length; i++){\n if(ws_data[i][0] == thisName){\n id = i;\n break;\n }\n }\n return id;\n }\n function sortCommand(a, b) {\n if(a[2] < 0){\n return 1;\n }\n else if(b[2] < 0){\n return -1;\n }\n if (a[1] === b[1]) {\n if(a[2] === b[2]){\n return 0;\n }\n else{\n return (a[2] < b[2]) ? 1 : -1;\n }\n }\n else {\n return (a[1] < b[1]) ? 1 : -1;\n }\n }\n\n saveData(\"lastSave\", Date.now());\n console.log(\"Finish\", ws_data);\n return [ws_data, newsPaper_data];\n}", "function save_last_position(pos) {\n localStorage[\"App.Controllers.last.pos\"] = JSON.stringify(pos);\n }", "function saveKeyValues(view, docIdsToChangesAndEmits, seq) {\n var seqDocId = '_local/lastSeq';\n return view.db.get(seqDocId)\n .catch(defaultsTo({_id: seqDocId, seq: 0}))\n .then(function (lastSeqDoc) {\n var docIds = mapToKeysArray(docIdsToChangesAndEmits);\n return PouchPromise$1.all(docIds.map(function (docId) {\n return getDocsToPersist(docId, view, docIdsToChangesAndEmits);\n })).then(function (listOfDocsToPersist) {\n var docsToPersist = flatten(listOfDocsToPersist);\n lastSeqDoc.seq = seq;\n docsToPersist.push(lastSeqDoc);\n // write all docs in a single operation, update the seq once\n return view.db.bulkDocs({docs : docsToPersist});\n });\n });\n }", "function saveKeyValues(view, docIdsToChangesAndEmits, seq) {\n var seqDocId = '_local/lastSeq';\n return view.db.get(seqDocId)\n .catch(defaultsTo({_id: seqDocId, seq: 0}))\n .then(function (lastSeqDoc) {\n var docIds = mapToKeysArray(docIdsToChangesAndEmits);\n return PouchPromise$1.all(docIds.map(function (docId) {\n return getDocsToPersist(docId, view, docIdsToChangesAndEmits);\n })).then(function (listOfDocsToPersist) {\n var docsToPersist = flatten(listOfDocsToPersist);\n lastSeqDoc.seq = seq;\n docsToPersist.push(lastSeqDoc);\n // write all docs in a single operation, update the seq once\n return view.db.bulkDocs({docs : docsToPersist});\n });\n });\n }", "function writeStock(x){\n if(x<=0){\nx=0;\n }else{\n x = x-1;\n }\n database.ref('/').update({\n\n })\n}", "function saveKeyValues(view, docIdsToChangesAndEmits, seq) {\n var seqDocId = '_local/lastSeq';\n return view.db.get(seqDocId)\n .catch(defaultsTo({_id: seqDocId, seq: 0}))\n .then(function (lastSeqDoc) {\n var docIds = Object(__WEBPACK_IMPORTED_MODULE_6_pouchdb_mapreduce_utils__[\"f\" /* mapToKeysArray */])(docIdsToChangesAndEmits);\n return __WEBPACK_IMPORTED_MODULE_0_pouchdb_promise__[\"a\" /* default */].all(docIds.map(function (docId) {\n return getDocsToPersist(docId, view, docIdsToChangesAndEmits);\n })).then(function (listOfDocsToPersist) {\n var docsToPersist = Object(__WEBPACK_IMPORTED_MODULE_2_pouchdb_utils__[\"c\" /* flatten */])(listOfDocsToPersist);\n lastSeqDoc.seq = seq;\n docsToPersist.push(lastSeqDoc);\n // write all docs in a single operation, update the seq once\n return view.db.bulkDocs({docs : docsToPersist});\n });\n });\n }", "function incrementSnapshot({ value, merged }, amount) {\n return { value, merged: merged + amount };\n}", "function saveState(operation){\n savedValue = value;\n savedOperation = operation;\n value = 0;\n draw();\n}", "function calcExcelSerial1904()\n {\n setJulian((new Number(document.excelserial1904.day.value)) + J1904);\n }", "function saveDataToFilled(data_array, result_array) {\n\n setDateInfo(data_array, scope.myOptions.firstWeekDay, scope.myOptions.language);\n\n // Group per day and save mean of 'focusField'\n var days = groupBy(data_array, function(item) {\n return [item.date_info.date_lime];\n });\n\n //console.log('DAYS: ', days, days.length);\n\n for (var i in days) {\n var current = days[i];\n var count_values = current.length\n\n var focusFieldSum = 0;\n for (var x in current) {\n var inner = current[x];\n if (inner[scope.myOptions.focusField]) {\n focusFieldSum = focusFieldSum + parseFloat(inner[scope.myOptions.focusField]);\n current.date = inner.date_info.date_lime;\n } else {\n count_values = count_values - 1;\n }\n }\n current.value = focusFieldSum / count_values;\n //console.log('current', current.value);\n\n\n // Generate fields.\n for (var y in result_array) {\n var currentResult = result_array[y];\n currentResult.date = currentResult.date_info.date_lime;\n //currentResult.value = null;\n //currentResult.focusField = null;\n\n\n // Save 'value'\n if (currentResult.date === current.date) {\n currentResult.value = current.value;\n currentResult.focusField = current.value;\n //console.log('==========================>', current.date, currentResult.date, currentResult.value);\n };\n };\n\n };\n\n return result_array;\n }", "buildRootedValue() {\n this.forEach((note, fret, string) => {\n note.interval.shift = note.interval.value - this.root + 1\n if (note.interval.shift < 1) {\n note.interval.shift += this.scaleLength\n }\n })\n }", "function saveKeyValues(view, docIdsToChangesAndEmits, seq) {\n var seqDocId = '_local/lastSeq';\n return view.db.get(seqDocId)[\n \"catch\"](defaultsTo({_id: seqDocId, seq: 0}))\n .then(function (lastSeqDoc) {\n var docIds = Object.keys(docIdsToChangesAndEmits);\n return PouchPromise.all(docIds.map(function (docId) {\n return getDocsToPersist(docId, view, docIdsToChangesAndEmits);\n })).then(function (listOfDocsToPersist) {\n var docsToPersist = flatten(listOfDocsToPersist);\n lastSeqDoc.seq = seq;\n docsToPersist.push(lastSeqDoc);\n // write all docs in a single operation, update the seq once\n return view.db.bulkDocs({docs : docsToPersist});\n });\n });\n}", "deleteLastRound() {\n this.store.getItem(this.DATASET_KEY).then((dataset)=> {\n let trainingData = [];\n dataset.forEach((line)=> {\n if(line.recordingRound < this.recordingRound - 1)\n {\n trainingData.push({input:line.input, output:line.output});\n }\n });\n \tthis.recordingRound--;\n \tthis.store.setItem(this.REC_KEY, this.recordingRound);\n this.store.setItem(this.DATASET_KEY, trainingData).then(()=> {\n this.updateRows();\n });\n });\n }", "function saveKeyValues(view, docIdsToChangesAndEmits, seq) {\n var seqDocId = '_local/lastSeq';\n return view.db.get(seqDocId)\n .catch(defaultsTo({_id: seqDocId, seq: 0}))\n .then(function (lastSeqDoc) {\n var docIds = Object.keys(docIdsToChangesAndEmits);\n return PouchPromise.all(docIds.map(function (docId) {\n return getDocsToPersist(docId, view, docIdsToChangesAndEmits);\n })).then(function (listOfDocsToPersist) {\n var docsToPersist = flatten(listOfDocsToPersist);\n lastSeqDoc.seq = seq;\n docsToPersist.push(lastSeqDoc);\n // write all docs in a single operation, update the seq once\n return view.db.bulkDocs({docs : docsToPersist});\n });\n });\n}", "function saveKeyValues(view, docIdsToChangesAndEmits, seq) {\n var seqDocId = '_local/lastSeq';\n return view.db.get(seqDocId)\n .catch(defaultsTo({_id: seqDocId, seq: 0}))\n .then(function (lastSeqDoc) {\n var docIds = Object.keys(docIdsToChangesAndEmits);\n return PouchPromise.all(docIds.map(function (docId) {\n return getDocsToPersist(docId, view, docIdsToChangesAndEmits);\n })).then(function (listOfDocsToPersist) {\n var docsToPersist = flatten(listOfDocsToPersist);\n lastSeqDoc.seq = seq;\n docsToPersist.push(lastSeqDoc);\n // write all docs in a single operation, update the seq once\n return view.db.bulkDocs({docs : docsToPersist});\n });\n });\n}", "function saveKeyValues(view, docIdsToChangesAndEmits, seq) {\n var seqDocId = '_local/lastSeq';\n return view.db.get(seqDocId)[\n \"catch\"](defaultsTo({_id: seqDocId, seq: 0}))\n .then(function (lastSeqDoc) {\n var docIds = Object.keys(docIdsToChangesAndEmits);\n return Promise.all(docIds.map(function (docId) {\n return getDocsToPersist(docId, view, docIdsToChangesAndEmits);\n })).then(function (listOfDocsToPersist) {\n var docsToPersist = utils.flatten(listOfDocsToPersist);\n lastSeqDoc.seq = seq;\n docsToPersist.push(lastSeqDoc);\n // write all docs in a single operation, update the seq once\n return view.db.bulkDocs({docs : docsToPersist});\n });\n });\n}", "function saveKeyValues(view, docIdsToChangesAndEmits, seq) {\n var seqDocId = '_local/lastSeq';\n return view.db.get(seqDocId)\n .catch(defaultsTo({_id: seqDocId, seq: 0}))\n .then(function (lastSeqDoc) {\n var docIds = mapToKeysArray(docIdsToChangesAndEmits);\n return Promise.all(docIds.map(function (docId) {\n return getDocsToPersist(docId, view, docIdsToChangesAndEmits);\n })).then(function (listOfDocsToPersist) {\n var docsToPersist = flatten(listOfDocsToPersist);\n lastSeqDoc.seq = seq;\n docsToPersist.push(lastSeqDoc);\n // write all docs in a single operation, update the seq once\n return view.db.bulkDocs({docs : docsToPersist});\n })\n // TODO: this should be placed somewhere else, probably? we're querying both docs twice\n // (first time when getting the actual purges).\n .then(() => updatePurgeSeq(view));\n });\n }", "function rememberFold() {\n // Don't want to write file too often so wait a minute before saving\n // and a second for local/fast save\n \n if (!rememberFold.fastWriteTimer)\n\t rememberFold.fastWriteTimer =\n\t setTimeout(() => {\n\t saveBT(true); // passing in saveLocal=true to just remember fold locally\n\t rememberFold.fastWriteTimer = null\n\t }, 1000);\n \n if (!rememberFold.writeTimer)\n\t rememberFold.writeTimer =\n\t setTimeout(() => {\n\t saveBT();\n\t rememberFold.writeTimer = null\n\t }, 1*60*1000);\n}", "writeValue(value) {\n this.date = new Date(value).toISOString();\n this.show_tooltip = false;\n }", "function saveKeyValues(view, docIdsToChangesAndEmits, seq) {\n var seqDocId = '_local/lastSeq';\n return view.db.get(seqDocId)\n .catch(defaultsTo({_id: seqDocId, seq: 0}))\n .then(function (lastSeqDoc) {\n var docIds = Object.keys(docIdsToChangesAndEmits);\n return Promise.all(docIds.map(function (docId) {\n return getDocsToPersist(docId, view, docIdsToChangesAndEmits);\n })).then(function (listOfDocsToPersist) {\n var docsToPersist = utils.flatten(listOfDocsToPersist);\n lastSeqDoc.seq = seq;\n docsToPersist.push(lastSeqDoc);\n // write all docs in a single operation, update the seq once\n return view.db.bulkDocs({docs : docsToPersist});\n });\n });\n}", "function snapshot(obj) {\n return primFreeze(copy(obj));\n }", "function saveXYValues () {\r\n demo = true;\r\n savedOldPositionY = oldPositionY;\r\n savedOldPositionX = oldPositionX;\r\n savedNewPositionY = newPositionY;\r\n savedNewPositionX = newPositionX;\r\n }", "saveCopy(){\n\t\tthis.savableCopy = FileManager.jsonWriter(this.state.toShowText);\n\t}", "function saveLog(){\n\n\tlet collectedData = null;\n\tcollectCurrentData()\n\t.then((result)=>{\n\t\tcollectedData = result; //collect the data\n\t\treturn localforage.getItem('logs'); //get the log in memory\n\t})\n\t.then((logs)=>{\n\t\tif(!logs) //if there are no logs instantiate an obj\n\t\t\tlogs = {}\n\t\tlet key = 'log'+logNumber;\n\t\tlogs[key] = collectedData; //write the collected results to the obj\n\t\tcurrKey=key;\n\t\t//console.log(logs[key]);\n\t\treturn localforage.setItem('logs',logs); //save back into memory\n\t})\n\t.then(()=>{\n\t\tif(logNumber>maxLogNumber){ //if the logNumber is larger than the maxLogNumber - update the max log number\n\n\t\tmaxLogNumber = logNumber;\n\t\treturn localforage.setItem('maxLogNumber',maxLogNumber); //write max log number back into memory\n\t\t}\n\t})\n\t.catch((err)=>{\n\t\tconsole.log(err);\n\t\tconsole.error(\"!!LOG FAILED TO SAVE\");\n\t});\n}", "periodicSave(that){\n\t\tif(FileManager.canSave()){\t\n\t\t\tFileManager.SaveGame(that, false);\n\t\t}\n\t\t\n\t\tsetTimeout(() => {that.periodicSave(that)}, 480000);\n\t}", "function save() {\n var dfd = $.Deferred();\n model.proxy.write(data).done(function (value) {\n $.extend(true, data, value, readOnlyData);\n dfd.resolve(data);\n }).fail(function (e) {\n dfd.reject();\n });\n return dfd.promise();\n }", "recordMoveOutCoins(coin, actualValue, cancelled=false, crypto = \"XBT\") {\r\n // save in class the faceValue that will be used\r\n // to record transaction when recordMoveInCoins called. \r\n if (!this.faceValueMoveCoins) {\r\n this.faceValueMoveCoins = {};\r\n }\r\n this.faceValueMoveCoins[crypto] = this.getSumCoins(coin).toFixed(8);\r\n let history = {\r\n walletInfo: {\r\n faceValue: this.faceValueMoveCoins[crypto],\r\n actualValue: parseFloat(actualValue).toFixed(8),\r\n newValue: parseFloat(cancelled ? actualValue : -actualValue).toFixed(8),\r\n fee: 0,\r\n },\r\n headerInfo:{\r\n fn: cancelled ? \"cancel move storage location\" : \"move storage location\",\r\n domain: \"localhost\",\r\n },\r\n other: {\r\n receive: cancelled,\r\n cancelled,\r\n },\r\n coin,\r\n currency: crypto,\r\n };\r\n return this.recordTransaction(history);\r\n }", "function incrementer_niveau_fils(obj,niv){\n\n for(key in obj){\n obj[key].niveau=(niv+1);\n incrementer_niveau_fils(obj[key].fils);\n }\n \n}" ]
[ "0.57454187", "0.52772325", "0.5209462", "0.5208864", "0.5089226", "0.50510496", "0.50181735", "0.5005604", "0.4998471", "0.49515292", "0.494541", "0.4919279", "0.49120328", "0.4908172", "0.48728994", "0.48652047", "0.4865071", "0.48645088", "0.4863521", "0.48503473", "0.48495162", "0.4830678", "0.48206753", "0.47778556", "0.4771812", "0.47706458", "0.47446853", "0.4734115", "0.4732573", "0.47226614", "0.4721581", "0.47115725", "0.468993", "0.46867403", "0.46692717", "0.46565568", "0.46514714", "0.46490943", "0.46384215", "0.4635052", "0.4631172", "0.46275237", "0.4620941", "0.46160033", "0.46156365", "0.460142", "0.45984352", "0.45964396", "0.45959184", "0.45867085", "0.4586572", "0.45858157", "0.457691", "0.4576504", "0.45696512", "0.45686108", "0.45677015", "0.4556844", "0.45488718", "0.4534049", "0.4534049", "0.45326528", "0.4528653", "0.452783", "0.45223945", "0.45217428", "0.4521723", "0.45187408", "0.4518638", "0.45169467", "0.4516145", "0.45157614", "0.45157", "0.45155165", "0.4515369", "0.45150578", "0.45150578", "0.45146838", "0.4513262", "0.45109317", "0.45090434", "0.45061123", "0.4495947", "0.44950873", "0.44907495", "0.44842368", "0.44830686", "0.44830686", "0.44766566", "0.447437", "0.44705468", "0.44684184", "0.44673303", "0.44667467", "0.446628", "0.44619054", "0.4461088", "0.4459546", "0.44592345", "0.4458933", "0.44562328" ]
0.0
-1
Anything returned from this function will end up as props on the MonsterList container
function mapDispatchToProps(dispatch) { // Whenever selectCombatant is called, the result should be passed to all // of our reducers return { d20Roll: payload => dispatch(actions.d20Roll(payload)), }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "render(){\n \n return (\n <ul>\n {this.props.list} \n </ul>\n );\n }", "renderItems(){\n\t\tconst props = _.omit(this.props,'todos');\n\t\treturn _.map(this.props.todos,\n\t\t\t\t\t(todo,index) => <TodosListItems key={index} {...todo} {...props}/> \n\t\t); \n\t}", "render(){\n return (\n <ol className=\"venue-list\" role=\"ListBox\">\n {this.props.venues && this.props.venues.map((venue) => <VenueItem key={venue.id} {...venue} itemOnClick={this.props.itemOnClick}/>)}\n </ol>\n )\n }", "render() {\n // console.log('🎃',this.props)\n // let list = this.props.map((film, i)=>{\n\n\n // })\n return (\n <div className=\"film-details\">\n <h1 className=\"section-title\">FILMS</h1>\n </div>\n );\n }", "function ItemList(props){\n return(\n <div className=\"row\">\n {fooditems.map(item =>\n <div className=\"col-md-6\">\n <FoodItem item={item} updatelist = {props.update}/>\n </div>\n )}\n\n </div>\n )\n}", "createListItems() {\n // map the property(Allposts array)\n return this.props.AllPosts.map((post) => {\n return (\n <li key={post.id}>Title: {post.title} <br></br> Body:{post.body}</li>\n )\n })\n }", "render() {\n\t\tlet classes = {\n\t\t\thover: this.props.hover\n\t\t};\n\t\tclasses[this.props.customClasses.listItem] = !!this.props.customClasses.listItem;\n\t\tlet classList = classSet(classes);\n\n\t\treturn (\n\t\t\t<li className={classList} onClick={this._onClick.bind(this)}>\n\t\t\t\t<a\n\t\t\t\t\thref=\"#\"\n\t\t\t\t\tclassName={this._getClasses()}\n\t\t\t\t\tref={anchor => this.anchor = anchor}\n\t\t\t\t>\n\t\t\t\t\t{this.props.children}\n\t\t\t\t</a>\n\t\t\t</li>\n\t );\n\t}", "render(){\n\t\treturn(\n\n \n <ul className='list-group col-sm-4'>\n {this.renderList()}\n </ul>\n )\n\t }", "renderBatmanListings() {\n const { batmanListings } = this.props;\n const listingsArr = [];\n each(batmanListings, (listing) => {\n listingsArr.push(<Listing {...listing} />); \n })\n return listingsArr;\n }", "renderList() {\r\n // Return new array of JSX elements\r\n return this.props.songs.map(song => {\r\n // Return JSX\r\n return (\r\n <div className=\"item\" key={song.title}>\r\n <div className=\"right floated content\">\r\n <button\r\n className=\"ui button primary\"\r\n onClick={() => this.props.selectSong(song)}\r\n >\r\n Select\r\n </button>\r\n </div>\r\n <div className=\"content\">{song.title}</div>\r\n </div>\r\n );\r\n });\r\n }", "render() {\n return (\n <ul className=\"list-group col-sm-4\">\n {this.renderList()}\n </ul>\n )\n }", "render(){\n\n let display = this.props.pokemonList.map(p=>{ return (\n <PokemonItem key={p.id} pokemon={p} btnType={this.props.btnType} btnFcn={this.props.btnFcn}/>\n )})\n\n return (\n <div className='pokemon-list'>\n {display}\n </div>\n )\n }", "renderList() {\n return (\n <div className=\"list\">\n {this.props.items.map((item, index) => (\n <ListItem key={index} item={item} selectItem={this.props.selectItem} />\n ))}\n </div>\n );\n }", "render(){\n\t\t/* Creates variables to hold properties */\n\t\tconst todoEntries = this.props.entries\n\t\tconst listItems = todoEntries.map(this.createItems)\n\n\t\treturn(\n\t\t\t/* Creates an unordered list that holds the information entered by user */\n\t\t\t<ul id = \"theList\">{listItems}</ul>\n\n\t\t)\n\t}", "renderList() {\n return this.props.songs.map(\n song => {\n return (\n <div className=\"item\" key={song.title}>\n <div className=\"right floated content\">\n <button\n className=\"ui button primary\"\n onClick={() => this.props.selectSong(song)}\n >\n Select\n </button>\n </div>\n <div className=\"content\">{song.title}</div>\n </div>\n );\n });\n }", "function List(props){\n // the return is JSX that renders content\n // map takes an iterated item (object) from an array and corresponding index position\n console.log(props.itemList);\n\n return (\n <div>\n <hr/>\n {Object.keys(props.itemList).map((itemId) => {\n let item = props.itemList[itemId];\n return <ListItem\n names={item.names}\n location={item.location}\n issue={item.issue}\n formattedWaitTime={item.formattedWaitTime}\n currentRouterPath={props.currentRouterPath}\n onItemSelection={props.onItemSelection}\n itemId={itemId}\n key={itemId}\n />;\n })}\n </div>\n );\n}", "renderList() {\n const {CombatantList = []} = this.props\n return CombatantList.map((combatant, index) => {\n return (\n <div key={index}>\n <li className=\"list-group-item col-sm-4\">\n <CombatantMode combatant={combatant} index={index}/>\n </li>\n </div>\n )\n });\n }", "renderList() {\n if (this.props.items.length === 0) {\n return <li key=\"default\">No people match your search.</li>\n }\n\n const items = this.props.items.map(item => {\n return <li key={item.name}>\n <div className=\"card-list\">\n <Card className=\"card-wics\" style={{ width: '18rem' }}>\n <Card.Img variant=\"top\" src={imgs[item.imgIndex]} />\n <Card.Body>\n <Card.Title className=\"card-wics-title\">{item.name}</Card.Title>\n <Card.Text>{item.year}-{item.death}</Card.Text>\n <div>\n <Badge className=\"card-wics-badge\" id=\"badge-left\">\n {item.field}\n </Badge>\n <Badge className=\"card-wics-badge\">{item.country}</Badge>\n </div>\n </Card.Body>\n </Card>\n </div>\n </li>\n });\n\n return items;\n }", "render() {\n console.log('--Rendering First List--');\n const name = 'First list';\n const listItems = render(ListItem, this.props.listClass, name);\n return (\n <div className=\"list\">\n <h2>{name}</h2>\n { listItems }\n </div>\n );\n }", "render() {\n\t//map is a build-in for-each loop for an array\n\t//but lets you selectively add/edit/remove\n\t//on the fly while building a new array\n const listItems = this.props.names.map((friend) => {\n return <li> {friend} </li>;\n });\n\t//pass in our new <li> listItems array to our JSX\n return (\n <div>\n <h3> Friends </h3>\n <ul>\n {listItems}\n </ul>\n </div>\n );\n }", "render() {\n const {\n classes: { root, list },\n participants,\n open,\n toggle\n } = this.props;\n\n const participantList = (\n <div className={root}>\n <List\n subheader={\n <ListSubheader color=\"primary\">Active Users</ListSubheader>\n }\n >\n {participants.map((participant, index) => {\n return (\n <ListItem className={list} key={participant + index.toString()}>\n {participant}\n </ListItem>\n );\n })}\n </List>\n </div>\n );\n\n return (\n <div>\n <Drawer open={open} onClick={toggle}>\n <div>{participantList}</div>\n </Drawer>\n </div>\n );\n }", "render() {\n return this.props.movies.map ( (movie)=>{\n return <MovieItem movie={movie} ReloadData={this.props.ReloadData}></MovieItem>\n }); /*Code up above outputs in the background and runs code necessary to put the information about movies in movieItem.js on to the screen without issue and allow it to reload the data */\n }", "renderList() {\n return this.props.posts.map((post) => { // return a JSX full result\n return( // returns one piece of JSX for each iteration\n <div className=\"item\" key={post.id}>\n <i className=\"large middle aligned icon user\"></i>\n <div className=\"content\">\n <div className=\"description\">\n <h2>{post.title}</h2>\n <p>{post.body}</p>\n </div>\n </div>\n </div>\n );\n });\n }", "renderLists() {\n\t\treturn _.map(this.props.lists, (list,listKey) => { \n\t\t\treturn (\n\t <div className={`todo-list ${list.type}`} key={listKey}>\n\t \t<div className=\"todo-list-header\">\n\t \t\t<button \n\t \t\t\tclassName=\"btn btn-graphic\" \n\t \t\t\ttitle=\"Delete List\" \n\t \t\t\tonClick={() => this.props.removeList(this.props.user.uid,listKey)}>\n\t \t\t\t<p>X</p>\n\t \t\t</button>\n\t\t \t<button \n\t\t\t \tclassName=\"btn btn-graphic\" \n\t\t\t \ttitle=\"Edit\" \n\t\t\t \tonClick={() => this.edit(listKey)}>\n\t\t\t \t{<p>&#x270E;</p>}\n\t\t \t</button>\n\t\t \t<h2>{list.title}</h2>\n\t \t</div>\n\n\t \t<ul className=\"list-group list-group-flush\">\n\t \t{(list.items).map((item,index) => (\n\t\t\t\t\t<ListItem\n\t\t\t\t\t\tkey={index}\n\t\t\t\t\t\titem={item[0]}\n\t\t\t\t\t\tcomplete={item[1]}\n\t\t\t\t\t\tindex={index}\n\t\t\t\t\t\tlistName={listKey}\n\t\t\t\t/>))}\n\t \t</ul>\n\t </div>\n\t );\n \t});\n\t}", "renderLists() {\n return (\n <div className=\"board-lists\">\n { /* render the lists */ }\n </div>\n );\n }", "renderItems2() {\n return this.state.data .map((item) => (\n <NewsList key={item.url} item={item} />\n ));\n }", "render() {\n // Filter by items that pass filtering\n let activeItems = this.props.items\n .filter( this.props.filterFunction.bind( this ) )\n\n // create items from ListItem template\n let items = activeItems.map( ( item, index ) => {\n // Pass all object properties to the template component\n return <this.props.ItemTemplate key={ 'item' + index } {...item} />\n })\n\n // Call the callback to let listeners know a filter event has taken place\n this.props.onFilter( activeItems )\n\n return (\n <ul className=\"DLR-List-container\">\n { items }\n </ul>\n )\n }", "render(){\n return this.props.movies.map( (movie)=>{\n return <MovieItem movie={movie} ReloadData={this.props.ReloadData}></MovieItem>\n })\n }", "renderSupermanListings() {\n const { supermanListings } = this.props;\n const listingsArr = [];\n each(supermanListings, (listing) => {\n listingsArr.push(<Listing {...listing} />); \n });\n return listingsArr;\n }", "renderActualList( ) {\n let listItemElements = [ ];\n\n for(let listItemsId in this.state.listItems) {\n let list = this.state.listItems[listItemsId]\n\n // adding structure to ui\n listItemElements.push(\n <div className=\"item\" key={listItemsId}>\n <div className=\"item\" onClick={ ( ) => this.selectList(listItemsId) }>\n <div class=\"pull-left\"> All the things\n <div class=\"item\">\n <div class=\"itemtext\">\n I am grateful for...\n\n <h4>{list.title}</h4>\n </div>\n <button\n className=\"item\"\n onClick={ () => { this.removeListItem(listItemsId) } }\n >\n <span aria-hidden=\"true\">&times;</span>\n </button>\n </div>\n </div>\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"item\">\n <div className=\"item\">\n <div className=\"item\">\n <div className=\"item\">\n\n { listItemElements }\n\n </div>\n </div>\n </div>\n </div>\n );\n }", "render() {\n return (\n <ul className=\"placeholder-container flex\">\n <li className=\"playlist\">\n <div className=\"pl-title-container\">\n <h2>SoundCloud Weekly</h2>\n <p>All of SoundCloud. Just for you.</p>\n </div>\n <div className=\"pl-content-container flex gradient\">\n <PlaylistImg albumart={this.state.albumart} />\n <PlaylistTracks playlist={this.state.playlist} />\n </div>\n <PlaylistActions />\n </li>\n </ul>\n );\n }", "renderNewsList() {\n const { newsListItems } = this.state;\n\n const itemsNew = newsListItems.map(\n item => (\n <NewsListItem\n key={item.objectID}\n item={item}\n upvoteHandler={this.upvoteHandler}\n hideNewHandler={this.hideNewHandler}\n />\n ),\n );\n\n return itemsNew;\n }", "renderItems() {\n\t\tconst requiredPlayers = this.getRequiredPlayers();\n\t\tconst items = [];\n\t\tfor(let i = 0; i < requiredPlayers; i++) {\n\t\t\titems.push(\n\t\t\t\t<li className=\"list-group-item\" key={i} style={this.itemStyle}>\n\t\t\t\t\tWaiting on player...\n\t\t\t\t</li>\n\t\t\t);\n\t\t}\n\t\treturn items;\n\t}", "render() {\n return (\n <div>\n <ul className=\"todoList\">{\n this.props.todos.map((todo) => {\n return <TodoItem key={todo.id} todo={todo} actions={this.props.actions}/>\n })\n }</ul>\n </div>\n );\n }", "render() {\n return (\n <div>\n <List key=\"100\" ourLocations={this.state.ourLocations} openInfoWindow={this.openInfoWindow}\n closeInfoWindow={this.closeInfoWindow}/>\n <div id=\"map\"></div>\n </div>\n );\n }", "render() {\n let listItems;\n if(this.props.projects){\n listItems = this.props.projects.map(project => {\n return(\n <ListItem onDelete={this.deleteProject.bind(this)} key={project.title} project={project} />\n );\n });\n }\n\n return (\n <div className=\"ListData\">\n <h3>List Data</h3>\n {listItems} {/* Listing the values */}\n </div>\n );\n }", "render(){\n return this.props.movies.map((movie)=>{\n return <MovieItem movie={movie}ReloadData={this.props.ReloadData}></MovieItem>\n })\n \n }", "render() {\n const ListItemComponent = this.props.ListItemComponent;\n return (\n <Dialog onClose={() => this.props.onClose(null)} open={this.props.open}>\n <DialogTitle>{this.props.title}:</DialogTitle>\n { !this.state.data && <>Loading...</> }\n { this.state.data && (\n <List style={{minWidth:'220px'}}>\n {this.state.data.map((data,idx) => <ListItemComponent data={data} key={idx} onClose={this.props.onClose}/>)}\n </List>\n ) }\n </Dialog>\n )\n }", "render() {\n console.log(\"this is the userlist component, are we getting the users:\", this.props.users);\n return (\n <ListItems users={this.props.users} onUserSelect={this.props.onUserSelect} />\n )\n }", "render() {\n var locationlist = this.state.locations.map((listItem, index) => {\n return (\n <ListItem \n key = { index } \n openInfoWindow = { this.props.openInfoWindow.bind(this)}\n data = { listItem } \n />\n );\n }, this);\n /* Return the filtered locations to the query */\n return (\n <div id=\"sidebar\">\n <Search query = { this.query } filterLocations = { this.filterLocations } />\n <menu id=\"menu\">{ locationlist }</menu>\n </div>\n );\n }", "render() {\n let props = this.props,\n listItems = [];\n \n this.props.recipes.each((recipe, node) => {\n listItems.push(\n <RecipeListItem\n key={recipe.id}\n id={recipe.id}\n name={recipe.name}\n selected={props.selected === recipe.id}\n />\n );\n });\n \n return (\n <ol className=\"recipe-list\">\n {listItems}\n </ol>\n );\n }", "createListItem() {\n return this.props.cats.map(cat => (\n <div className=\"data-tile\" key={cat.name}>\n <div>{cat.name}</div>\n <div>{cat.owner}</div>\n <div className=\"cat-photo\" style={{ backgroundImage: `url(${cat.image})` }} />\n </div>\n ));\n }", "render() {\n return (\n <div id=\"MoviePage\">\n <Box className=\"ListBorder\" id=\"left\">\n </Box>\n <Box id=\"MovieList\">\n { this.props.movies.map( movie => \n <MovieItem key={ movie.id } movie={ movie } history={ this.props.history }/>\n )}\n </Box>\n <Box className =\"ListBorder\" id=\"right\">\n </Box>\n </div>\n );\n }", "render(){\n return this.props.matches.map((match)=>{\n return <MatchItem match={match}></MatchItem>\n })\n \n \n }", "render() {\n this.$listBody = this.getBody();\n\n this._renderItems();\n this.trigger('rendered');\n\n return this;\n }", "renderChannelMessages() {\n console.log('props are', this.props);\n let messages = this.props.channelMessages.map(message => {\n return (\n <ListGroup.Item className='color'>{message.username}: {message.content}</ListGroup.Item>\n )\n });\n return messages;\n }", "render() { \n return (\n <div className=\"shopping-list\">\n <h1>Shopping List for {this.props.name}</h1>\n <ul>\n <li>Instagram</li>\n <li>WhatsApp</li>\n <li>Oculus</li>\n </ul>\n </div>\n );\n }", "render() {\n\n const { beersList } = this.state\n\n return (\n <div>{ beersList.map(beer => {\n return (\n <ul>\n <li>{beer.name}</li>\n <li>{beer.description}</li>\n <li>{beer.ibu}</li>\n </ul>\n )\n })}</div>\n )\n }", "function PackageList(props) {\n\n const {packages} = props\n\n return (\n <div className=\"package-list-container\">\n <div className=\"fade-away-top\"/>\n <div className=\"package-list\">\n <ul>\n {/* Making sure packages are found, cant do .map to undefined */}\n {packages ? ( \n packages.map(listPackage => \n <li>\n <Link to={`/${listPackage.name}`}>{listPackage.name}</Link>\n </li>\n ) \n ) : null\n }\n </ul>\n </div>\n <div className=\"fade-away-bot\"/>\n </div>\n );\n}", "render() {\n const sandwichUl = document.querySelector('.sandwich-list');\n\n // Empty the sandwichUl before adding any content to it.\n sandwichUl.innerHTML = '';\n\n this.items.forEach((sandwich) => {\n const sandwichDiv = this.createSandwichCard(sandwich);\n sandwichUl.append(sandwichDiv)\n })\n }", "getProps() {\n let result = super.getProps();\n result.items = result.items ? result.items: [];\n result.multiple = result.multiple ? result.multiple : false;\n result.onClose = result.onClose ? result.onClose: () => {}\n return result;\n }", "renderList() {\n return this.props.comments.map(comment => {\n return (\n <div className=\"item\" key={comment.id}>\n <i className=\"large middle aligned icon user\" />\n <div className=\"content\">\n <div className=\"description\">\n <h2>{comment.name}</h2>\n <p>{comment.body}</p>\n </div>\n </div>\n </div>\n );\n })\n }", "function App(prop) {\n\n const listItems = prop.store.lists.map(function(item) {\n let cards = item.cardIds.map(function(id) {\n return prop.store.allCards[id];\n });\n console.log(cards)\n return <List key={item.id} header={item.header} cards={cards}/>\n })\n\n return (\n <main className='App'>\n <header>\n <h1>\n Trelloyes!\n </h1>\n </header>\n <div className=\"App-list\">\n {listItems}\n </div>\n \n </main>\n );\n}", "getListing() {\n\t\treturn (\n\t\t\t<Row>\n\t\t\t\t<div className=\"listingItem\">\n\t\t\t\t <Col className='listingItemNoPadding' style={{paddingLeft: \"0px\"}}xs={10} sm={10} md={10} lg={10}>\n\t\t\t\t\t\t{this.getContent()}\n\t\t\t\t\t</Col>\n\t\t\t\t</div>\n\t\t\t</Row>\n\t\t);\n\t}", "render() {\n\t\treturn (\n\t\t\t<div className=\"lista-comments\" id={s.list}>\n\t\t\t\t{this.props.comments.map((comment, i) => {\n\t\t\t\t\treturn(\n\t\t\t\t\t\t<CommentsItemList {...this.props} key={()=> Math.floor(Math.random()*i*100) } i={i} comment={comment} /> \n\t\t\t\t\t); }\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t}", "componentWillMount() {\n //ListView (scalable component for rendering scrolling list)\n //if item goes beyond screen, its component reused for next item in list\n const ds = new ListView.DataSource({\n rowHasChanged: (r1, r2) => r1 !== r2\n });\n\n //set libraries prop (via mapStateToProps) of component as listView data source\n this.dataSource = ds.cloneWithRows(this.props.libraries);\n }", "render() {\n this.list.innerHTML = '';\n\n startingData.forEach(item => {\n this.createDomElements(item.id);\n this.li.insertAdjacentHTML('afterbegin', item.authorLast+\", \"+item.authorFirst+\". \"+\"<i>\"+item.title+\". \"+\"</i>\"+item.publisher+\": \"+item.year+\".\");\n this.list.appendChild(this.li);\n });\n }", "render() {\n var todoEntries = this.props.entries;\n var listItems = todoEntries.map(this.createTasks);\n\n return(\n <ul className=\"theList\">\n <FlipMove duration={250} easing=\"ease-out\">\n {listItems}\n </FlipMove>\n </ul>\n );\n }", "allPlaylistsList(){\n return this.state.playlists.map(current => {\n return (<Playlist playlist={current} key={current._id}/>)\n })\n }", "render() {\n const {CombatantList = []} = this.props\n if (!CombatantList) {\n return <div>Select a CombatantList to get started</div>;\n }\n // if there are combatants in Combatant list then render the list\n return <ul className=\"list-group\">{this.renderList()}</ul>;\n }", "getList() {\n return (\n <ul>\n {\n this.state.members.map( (member, index) => (\n <li key={index} > {member} </li>\n ))\n }\n </ul>\n )\n }", "render() {\n return (\n <div>\n {this.props.list.map((d, i) => {\n return <Todo key = {i} status={d.status} priority={d.priority} description={d.description} />\n })\n }\n </div>\n )\n }", "render() {\n return (\n <div>\n {this.props.list.map(piece =>\n <div key={piece.name} className=\"image_div\">\n <img src={piece.src} alt=\"blah\" className=\"image\" />\n <div className=\"image_desc\">\n <div>\n <div className=\"title_and_medium\">\n <h3 className=\"name\">{piece.name}</h3>\n <h3 className=\"medium\"> - {piece.medium}</h3>\n </div>\n <h6 className=\"date\">{piece.date}</h6>\n </div>\n <h5>{piece.awards}</h5>\n <div className=\"time\">\n <h6>Total Time: {piece.time} hours</h6>\n <TimeAdder addTime={this.props.addTime} time={piece.time} img={piece.src} />\n </div>\n </div>\n </div>)\n\n }\n </div>\n )\n }", "function List(props) {\n var animated = props.animated,\n bulleted = props.bulleted,\n celled = props.celled,\n children = props.children,\n className = props.className,\n divided = props.divided,\n floated = props.floated,\n horizontal = props.horizontal,\n inverted = props.inverted,\n items = props.items,\n link = props.link,\n ordered = props.ordered,\n relaxed = props.relaxed,\n selection = props.selection,\n size = props.size,\n verticalAlign = props.verticalAlign;\n\n\n var classes = __WEBPACK_IMPORTED_MODULE_3_classnames___default()('ui', size, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"a\" /* useKeyOnly */])(animated, 'animated'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"a\" /* useKeyOnly */])(bulleted, 'bulleted'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"a\" /* useKeyOnly */])(celled, 'celled'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"a\" /* useKeyOnly */])(divided, 'divided'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"a\" /* useKeyOnly */])(horizontal, 'horizontal'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"a\" /* useKeyOnly */])(inverted, 'inverted'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"a\" /* useKeyOnly */])(link, 'link'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"a\" /* useKeyOnly */])(ordered, 'ordered'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"a\" /* useKeyOnly */])(selection, 'selection'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"j\" /* useKeyOrValueAndKey */])(relaxed, 'relaxed'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"h\" /* useValueAndKey */])(floated, 'floated'), __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"k\" /* useVerticalAlignProp */])(verticalAlign), 'list', className);\n var rest = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"b\" /* getUnhandledProps */])(List, props);\n var ElementType = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__lib__[\"c\" /* getElementType */])(List, props);\n\n if (!__WEBPACK_IMPORTED_MODULE_2_lodash_isNil___default()(children)) {\n return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { role: 'list', className: classes }),\n children\n );\n }\n\n return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(\n ElementType,\n __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rest, { role: 'list', className: classes }),\n __WEBPACK_IMPORTED_MODULE_1_lodash_map___default()(items, function (item) {\n return __WEBPACK_IMPORTED_MODULE_10__ListItem__[\"a\" /* default */].create(item);\n })\n );\n}", "render() {\n return (\n <>\n <Container>\n <Row xs={1} sm={2} md={3} lg={4}>\n {this.props.beasts.map(beast => \n <Hornedbeasts updateBeast={this.props.updateBeast} beast={beast} />\n )}\n </Row>\n </Container>\n </>\n )\n }", "render() {\n return (\n <div className=\"board\">\n { /* render the lists */ }\n { /* render the list creation form */ }\n </div>\n );\n }", "function renderMonster(monsters){\n console.log('entered renderMonster')\n for (const monster of monsters){\n let name= monster.name\n let age= monster.age\n let description= monster.description\n let specificMonster = document.createElement('div')\n specificMonster.insertAdjacentHTML('beforeend', \n `<ul>\n <li class='name'> \"${name}\" </li>\n <li class='age'>\"${age}\"</li>\n <li class='description'>\"${description}\"</li>\n </ul>`)\n monsterList.append(specificMonster)\n console.log('end of renderMonsters')\n }\n } // end of renderMonster", "buildList() {\n return this.props.books.map((book) => {\n return (\n <li className=\"list-group-item\" key={book.id} onClick={() => this.props.selectBook(book)}>\n {book.title}\n </li>\n );\n });\n }", "render (h) {\n return h(ItemList, { props: {title}})\n }", "render() {\n\t\tlet compositions = this.props.compositions.map(\n\t\t\t(composition, index) => <Composition\n\t\t\t\tkey={`composition-${index}`}\n\t\t\t\tuser={this.props.user}\n\t\t\t\tcomposition={composition}\n\t\t\t\tdeleteComposition={this.props.deleteComposition}\n\t\t\t\tindex={index} />\n\t\t);\n\n\t\treturn (\n\t\t\t<div className=\"feed w3-main\">\n\n\t\t\t\t<h2>These are your compositions</h2>\n\n\t\t\t\t{/* This is the list of user's compositions */}\n\t\t\t\t<div className = 'row'>{compositions}</div>\n\n\t\t\t</div>\n\t\t);\n\t}", "render() {\r\n dxp.log.debug(this.element.tagName, 'render()', `in dxp-content-list render() : ${process.env.MODE}`);\r\n return (h(\"div\", { class: this.base.componentClass(), dir: this.dir, \"data-theme\": this.theme },\r\n h(\"div\", { class: \"header-tag\" }, this.titleText && (this.href ? h(\"h4\", { class: this.headerSize },\r\n h(\"a\", { href: this.href }, this.titleText)) :\r\n h(\"h4\", { class: this.headerSize }, this.titleText))),\r\n h(\"div\", { class: `dxp-content-list-items sc-dxp-content-list ${this.orientation ? this.orientation : 'vertical'}`, ref: el => this.linksContainer = el },\r\n h(\"slot\", null))));\r\n }", "render(){\n let {songs} = this.props;\n\n let songList = songs.map(item=>{\n return <li>Title: {item.title} <br />\n Album: {item.album} <br />\n Preview: <img src={`${item.preview_link}`} /> <br />\n ArtWork: <img src={`${item.artwork}`} /> <br />\n </li>\n })\n\n return (\n <html>\n <body>\n <div>\n <ol>\n <h3>Songs List:</h3>\n {songList}\n </ol>\n </div>\n </body>\n </html>\n )\n }", "Movies() {\n\t\tconsole.log(this.props.data);\n\t\tconst { classes } = this.props;\n\t\treturn this.props.data.newMovies.map(movie => {\n\t\t\treturn (\n\t\t\t\t// <MovieContainer>\n\t\t\t\t// \t<Card className={classes.card} key={movie.id}>\n\t\t\t\t// \t\t<CardActionArea>\n\t\t\t\t// \t\t\t<Link to={`/info/${movie.id}`}>\n\t\t\t\t// \t\t\t\t<CardMedia\n\t\t\t\t// \t\t\t\t\tclassName={classes.media}\n\t\t\t\t// \t\t\t\t\timage={movie.poster_path}\n\t\t\t\t// \t\t\t\t/>\n\t\t\t\t// \t\t\t</Link>\n\t\t\t\t// \t\t</CardActionArea>\n\t\t\t\t// \t</Card>\n\t\t\t\t// </MovieContainer>\n\t\t\t\t// <Wrapper key={movie.id}>\n\t\t\t\t// {/* <article key={movie.id} className=\"movie_list\"> */}\n\t\t\t\t<Row>\n\t\t\t\t\t<Link to={'/info/' + movie.id}>\n\t\t\t\t\t\t<img className=\"poster_img\" src={movie.poster_path} alt=\"poster\" />\n\t\t\t\t\t</Link>\n\t\t\t\t</Row>\n\t\t\t\t// {/* </article> */}\n\t\t\t\t// </Wrapper>\n\t\t\t);\n\t\t});\n\t}", "render() {\n const listings = this.state.listings.map(docId =>\n <ListItem>\n <ListingItem docId={docId} query={this.state.query} style={{margin: 50}}/>\n </ListItem>\n );\n\n return (\n <MuiThemeProvider>\n <div style={{ height: \"20%\", width: \"100%\", display: \"flex\", justifyContent: 'center', alignItems: \"center\", flexDirection: \"column\"}}>\n <SearchBar\n onChange={(query) => {\n this.setState({\n query: query,\n listings: []\n });\n }}\n onRequestSearch={() => this.search(this.state.query)}\n style={{ width: \"80%\", marginTop: 50 }}\n />\n <List>\n {listings}\n </List>\n </div>\n </MuiThemeProvider>\n );\n }", "renderDraftList() {\n const { isUserInLeague } = this.state;\n if (isUserInLeague) {\n const { userDraftList } = this.state;\n let renderListItems = userDraftList.map(obj => {\n return (\n <ListItem key={obj.cardKey}\n justify='between'\n separator='horizontal'>\n <div>\n { obj.Position } • { obj.Name } • ${ obj.Salary }\n </div>\n </ListItem>\n );\n });\n\n return (\n <List selectable={false}>\n { renderListItems }\n </List>\n );\n } else {\n const { top, mid, jungle, adc, support } = this.state;\n return (\n <List selectable={false}>\n {/* Top */}\n {(top === null)\n ? <ListItem justify='between'\n separator='horizontal'>\n <span>\n Top\n </span>\n <span className='secondary'>\n No active player\n </span>\n </ListItem>\n : <ListItem justify='between'\n separator='horizontal'>\n <div>\n Top • { top.Name } • ${ top.Salary }\n </div>\n <Anchor className='secondary'\n onClick={this._removePlayer.bind(this, top)}>\n Remove\n </Anchor>\n </ListItem>\n }\n {/* Mid */}\n {(mid === null)\n ? <ListItem justify='between'\n separator='horizontal'>\n <span>\n Mid\n </span>\n <span className='secondary'>\n No active player\n </span>\n </ListItem>\n : <ListItem justify='between'\n separator='horizontal'>\n <span>\n Mid • { mid.Name } • ${ mid.Salary }\n </span>\n <Anchor className='secondary'\n onClick={this._removePlayer.bind(this, mid)}>\n Remove\n </Anchor>\n </ListItem>\n }\n {/* Jungle */}\n {(jungle === null)\n ? <ListItem justify='between'\n separator='horizontal'>\n <span>\n Jungle\n </span>\n <span className='secondary'>\n No active player\n </span>\n </ListItem>\n : <ListItem justify='between'\n separator='horizontal'>\n <span>\n Jungle • { jungle.Name } • ${ jungle.Salary }\n </span>\n <Anchor className='secondary'\n onClick={this._removePlayer.bind(this, jungle)}>\n Remove\n </Anchor>\n </ListItem>\n }\n {/* ADC */}\n {(adc === null)\n ? <ListItem justify='between'\n separator='horizontal'>\n <span>\n ADC\n </span>\n <span className='secondary'>\n No active player\n </span>\n </ListItem>\n : <ListItem justify='between'\n separator='horizontal'>\n <span>\n ADC • { adc.Name } • ${ adc.Salary }\n </span>\n <Anchor className='secondary'\n onClick={this._removePlayer.bind(this, adc)}>\n Remove\n </Anchor>\n </ListItem>\n }\n {/* Support */}\n {(support === null)\n ? <ListItem justify='between'\n separator='horizontal'>\n <span>\n Support\n </span>\n <span className='secondary'>\n No active player\n </span>\n </ListItem>\n : <ListItem justify='between'\n separator='horizontal'>\n <span>\n Support • { support.Name } • ${support.Salary}\n </span>\n <Anchor className='secondary'\n onClick={this._removePlayer.bind(this, support)}>\n Remove\n </Anchor>\n </ListItem>\n }\n </List>\n );\n }\n }", "render() {\n const listSettings = {\n data: this.props.items,\n extraData: this.state.activeRow,\n keyExtractor: (item) => item.taskId,\n renderItem: ({ item, index }) => this._renderListItem(item, index)\n };\n return (\n <View style={[styles.container, this.props.style]}>\n <FlatList {...listSettings} />\n </View>\n );\n }", "function SearchResults(props) {\n let searchMovieItemList = props.movieList;\n // TODO: make SearchMovieItem for each element in movieList\n return (\n <div className=\"SearchResults\">\n <SearchMovieItem movie={searchMovieItemList[0]}/>\n </div>\n );\n}", "renderNewList() {}", "onRender() {\n super.onRender();\n this.clearList();\n this.renderList();\n }", "function ProjectList(props) {\n // inside the function code to do all sorts of logical steps\n\n // return output for the component \n return <div className=\"holder\">\n <h1>{props.message1}</h1>\n <h2>{props.message2}</h2>\n <ol>\n {\n // use map() method to loop array of data\n props.list.map(\n (item,index) => (\n <li key={index}>\n <strong>{item.title}</strong><br /> <em>{item.description}</em>\n <br />\n <img src={item.imagepath} alt={item.title} width=\"480\" height=\"300\" /><br /><br />\n </li>\n )\n )\n }\n </ol>\n </div>;\n}", "getMovieList() {\n \n let html = '';\n let i = 0;\n if (this.props.giveMovieList.length !== 0 || this.props.giveMovieList !== '') {\n html = this.props.giveMovieList.map(e => {\n // run +=e.runtime\n i++;\n return <li className=\"movieListItem\" key={i}> \n <div>\n {e.title} ({e.runtime} minutes)\n </div>\n <button className=\"movieListItemBtn\" onClick={() => this.props.deleteFromList(e)}>X</button>\n </li>\n })\n }\n return html;\n }", "function AlphaListSection(props) {\n\n return (\n <div className=\"AlphaListSection\">\n <h3>{props.letter}</h3>\n <ul>\n {props.stations.map(station => (\n <CityList\n key={station}\n station={station}\n weatherValues={props.weatherValues}\n isActive={props.isActive}\n />\n ))}\n </ul>\n </div>\n );\n}", "render() {\n return (\n <Wrapper>\n <Title>Friends List</Title>\n {this.state.players.map(player => (\n <PlayerCard\n removePlayer={this.removePlayer}\n id={player.id}\n key={player.id}\n name={player.name}\n image={player.image}\n position={player.position}\n team={player.team}\n years={player.years}\n class={player.class}\n \n />\n ))}\n </Wrapper>\n );\n }", "render(){\n return (\n <div className=\"ui grid container\">\n <VideoDetail video={this.props.selectedVideo} />\n <VideoList videos={this.props.videos} handleClick={this.props.selectVideo} />\n </div>\n )\n }", "render() {\n let authorList = this.props.propAuthors.map(author => (\n <AuthorCard authorCardProp={author} />\n ));\n return (\n <div className=\"authors\">\n <div className=\"row\">{authorList}</div>\n </div>\n );\n }", "function Womens () {\n return (\n <div className='container'>\n <Header\n title='Womens'\n />\n <ShoeList shoes={womens} />\n </div>\n );\n}", "viewList() {\n\n // If the clicked list does not exist, we create one instead.\n if(!this.props.cUser.lists[this.state.cID].isCreated) {\n return this.createList();\n }\n\n var allRestaurants = this.props.cUser.lists[this.state.cID].restaurants.map( (restaurant, index) => {\n return <div key={index}>{restaurant}</div>;\n });\n\n if(allRestaurants.length === 0) {\n allRestaurants = \"This collection is empty.\";\n }\n return allRestaurants;\n }", "render() {\n return _react.default.createElement(NotificationStyle, null, _react.default.createElement(_List.default, null, _react.default.createElement(_ListItem.default, {\n component: _react.default.createElement(_UserAvatar.default, {\n src: \"/temp/img/user.jpg\",\n size: \"md\"\n }),\n title: \"Completed Task\",\n subTitle: \"Ian, 2 Hours ago\"\n }), _react.default.createElement(_ListItem.default, {\n component: _react.default.createElement(_UserAvatar.default, {\n src: \"/temp/img/user.jpg\",\n size: \"md\"\n }),\n title: \"Started a conversation\",\n subTitle: \"Glen, 2 Hours ago\"\n }), _react.default.createElement(_ListItem.default, {\n component: _react.default.createElement(_UserAvatar.default, {\n src: \"/temp/img/user.jpg\",\n size: \"md\"\n }),\n title: \"Added you to a task\",\n subTitle: \"Katie, 2 Hours ago\"\n }), _react.default.createElement(_ListItem.default, {\n component: _react.default.createElement(_UserAvatar.default, {\n src: \"/temp/img/user.jpg\",\n size: \"md\"\n }),\n title: \"Mentioned you\",\n subTitle: \"2 Hours ago\"\n }), _react.default.createElement(_ListItem.default, {\n component: _react.default.createElement(_UserAvatar.default, {\n src: \"/temp/img/user.jpg\",\n size: \"md\"\n }),\n title: \"Did something\",\n subTitle: \"2 Hours ago\"\n }), _react.default.createElement(_ListItem.default, {\n component: _react.default.createElement(_UserAvatar.default, {\n src: \"/temp/img/user.jpg\",\n size: \"md\"\n }),\n title: \"Did something else\",\n subTitle: \"2 Hours ago\"\n })));\n }", "render(){\n\n\t\treturn (\n <div className=\"bookshelf\">\n <h2 className=\"bookshelf-title\">{this.props.shelf.label}</h2>\n <div className=\"bookshelf-books\">\n <ol className=\"books-grid\">\n {this.props.shelf.books.map((book)=>(\n <li key={book.id}><Book book={book} updateBooks={this.props.updateBooks} options={this.props.shelf.shelfOptions}/></li>\n ))}\n </ol>\n </div>\n </div>\n\n\n );\n\t}", "createListItems() {\n //This is used to give active class to the selected category\n jQuery('.active_cat').removeClass('active_cat');\n jQuery(\"#category_\" + this.props.category.cat_id).addClass(\"active_cat\");\n\n //Store the selected meal under sub category(sub menu) to get access in order page\n if (this.props.meal)\n sessionStorage.setItem(\"selected_meal\", JSON.stringify(this.props.meal));\n\n //creates the sub category(sub menu) cards layout, selectMeal is the action triggered when meal card is clicked\n return this.props.category.sub_cat.map((meal, index) => {\n return (\n <div key={index} className=\"col-md-4 col-lg-3 col-sm-6 col-xs-12 cards\" onClick={() => this.props.selectMeal(meal)}>\n <img src={meal.subcat_thumbnail} alt=\"meal pic\" />\n <div style={{ padding: '5px' }}>\n <label>{meal.subcat_name}</label>\n <p>{meal.subcat_desc}</p>\n <label style={{ right: '0', position: 'absolute', bottom: '0', marginRight: '20px', color: 'red' }}>{meal.subcat_price}</label>\n </div>\n </div>\n );\n });\n }", "function MemeList({ memes }) {\n\n return (\n <div className=\"MemeList\">\n {\n memes.map(m => (\n <Meme\n key={m.id} \n id={m.id}\n top={m.top}\n bottom={m.bottom}\n image={m.image}\n />\n ))\n }\n </div>\n )\n}", "giveMovieList() {\n this.props.giveMovieList(this.state.movieList)\n }", "render() {\n console.log(this.props.items);\n return (\n <div className=\"shopping-list\">\n \n <h3>{ this.props.name }</h3>\n <h4>Item | Qty</h4>\n \n { this.props.items.map( (i) =>// this tells the component to find items component and render it here\n <ItemContainer key={i.get('id')}\n id={i.get('id')}\n item={i.get('item')}\n quantity={i.get('quantity')}\n purchased={i.get('purchased')}\n />\n )}\n \n </div>\n );\n }", "render() {\n return(\n <div className=\"PlaylistComponent\" style={{...defaultStyle, padding: '40px 10px', width: '25%'}}>\n <h3 style={{marginBottom: '0px'}}> Playlists Listed </h3>\n <h3 style={{marginTop: '5px', color: 'lightBlue'}}> {this.props.playlists.length} </h3>\n </div>\n )\n }", "render() {\n const botsList = this.props.army.map(b => <BotCard key={b.id} deleteBot={this.props.deleteBot} listBot={this.props.unenlistBot} bot={b} />)\n\n return (\n <div className=\"ui segment inverted olive bot-army\">\n <div className=\"ui five column grid\">\n <div className=\"row bot-army-row\">\n {/*...and here...*/}\n Your Bot Army\n {botsList}\n </div>\n </div>\n </div>\n );\n }", "renderList2() {\n return this.state.data.map(function(d){\n return <li>{d.title}</li>\n })\n \n }", "render(){\n return (\n <div className=\"bookshelf\">\n <h2 className=\"bookshelf-title\">{this.props.title}</h2>\n <div className=\"bookshelf-books\">\n <ol className=\"books-grid\">\n {this.props.books.map((bookItem) => (\n <Book key={bookItem.id} book={bookItem} currentShelf={this.props.shelfValue} changeShelf={this.props.changeShelf}/>\n ))}\n </ol>\n </div>\n </div>\n )\n }", "renderList(friends){\n \n return (\n <View rounded style={styles.content} >\n {friends.map((item, index) =>\n <ListItem ref={ref=>this.listItems[index]=ref} last={index===friends.length-1} \n key={item.Id} avatar noBorder style={styles.listItemContainer}>\n <Left>\n <Thumbnail square style={styles.thumb} source={{uri:API_BASE+item.Avatar}}/>\n </Left>\n <Body style={{marginLeft:10}}>\n <Text small>{item.DisplayName}</Text> \n </Body>\n <Right style={styles.rightContainer}> \n <Button onPress={e=>this.showPopover(index, item)} iconRight noPadder transparent>\n <Icon style={styles.iconGrayLarge} name=\"edit\" /> \n </Button>\n </Right>\n </ListItem> \n )} \n </View>\n )\n }", "render() {\n\t\treturn (\n\t\t\t<section className=\"main\">\n\t\t\t\t<ul className=\"todo-list\">\n\t\t\t\t\t{this.props.todos.map( (todo, i) => <ToDoItem key={todo.id} id={todo.id} isCompleted={todo.completed} text={todo.title} destroyOne={this.props.destroyOne(i)} toggleTodo={this.props.toggleTodo(i)}/> )}\n\t\t\t\t</ul>\n\t\t\t</section>\n\n\t)}", "function List(props) {\n const items = props.items;\n const listItems = items.map(item => {\n return <div className=\"list\" key={item.key} >\n <p>\n {item.text}\n <span> <button id=\"delete\" onClick={() => props.deleteItem(item.key)}>-</button>\n </span></p>\n </div>\n })\n return (\n <div>{listItems}</div>\n )\n}", "function ListItem() {}" ]
[ "0.7117978", "0.6485039", "0.6475667", "0.64648813", "0.6461909", "0.64353174", "0.6430416", "0.6425077", "0.64219165", "0.64199656", "0.6418656", "0.6402311", "0.63976157", "0.6394177", "0.6392487", "0.6387277", "0.6383899", "0.6368485", "0.63668275", "0.63510805", "0.63503456", "0.6336628", "0.63360304", "0.6330524", "0.63089037", "0.62917084", "0.6285052", "0.62826633", "0.62814695", "0.6280428", "0.62655014", "0.62363917", "0.6235894", "0.6232936", "0.62161803", "0.6206336", "0.61963594", "0.61946905", "0.6194389", "0.61806405", "0.61734354", "0.6170721", "0.6158591", "0.6157376", "0.61516625", "0.61482054", "0.6139454", "0.6132288", "0.61204875", "0.6106153", "0.608593", "0.60846215", "0.60682124", "0.606531", "0.60645014", "0.6050492", "0.60493976", "0.6048422", "0.60459447", "0.6038017", "0.6025506", "0.6021791", "0.6015419", "0.60143834", "0.59985614", "0.59974533", "0.59922665", "0.59893066", "0.5986657", "0.59786206", "0.59767646", "0.59761035", "0.5975321", "0.5972596", "0.5958495", "0.59580564", "0.5955327", "0.5948776", "0.59460694", "0.59380615", "0.5937196", "0.59336317", "0.5932258", "0.5932193", "0.5929085", "0.59275174", "0.5922808", "0.59226793", "0.5920694", "0.59121", "0.5910029", "0.590837", "0.59051335", "0.5904435", "0.59030324", "0.59016895", "0.5900621", "0.58975595", "0.5890486", "0.5887392", "0.5886272" ]
0.0
-1
Main loop function for P5
function draw() { // Update global 'now' time gNow = Date.now(); gEntities.forEach(it => it.update()); // Clear scene by drawing background image(gBackgroundImage, 0, 0); gEntities.forEach(it => it.draw()); // Handle entity lifetimes, clean up dead entities, persist live entities let toLive = []; gEntities.forEach(it => { if (it.age < 1.0) { toLive.push(it); } }); gEntities = toLive; // Keep track of time taken to update frame let frameTime = Date.now() - gNow; gRecentFrameTimes.push(frameTime); //console.log("Frame Time: %d", gRecentFrameTimes.get(gRecentFrameTimes.size - 1)); //console.log("Recent Avg Time: %d", gRecentFrameTimes.calcAvg()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async function main() {\n new p5((p_) => {\n p = p_;\n p.setup = setup;\n p.draw = draw;\n }, elements.container);\n\n if (ENABLE_STATS) {\n stats.showPanel(0);\n elements.stats.appendChild(stats.dom);\n }\n}", "async function main() {\n new p5((p_) => {\n p = p_;\n p.setup = setup;\n p.draw = draw;\n }, elements.container);\n\n // Settings\n const lineSettings = gui.addFolder('Line');\n lineSettings.add(settings, 'radius', 10, 800).step(1).onChange(redraw);\n lineSettings\n .add(settings, 'lineControlPoint', 5, 25)\n .step(1)\n .onChange(redraw);\n lineSettings.add(settings, 'lineWidth', 1, 10).step(1).onChange(redraw);\n lineSettings.add(settings, 'yStep', 1, 100).step(1).onChange(redraw);\n\n const noiseSettings = gui.addFolder('Noise');\n noiseSettings.add(settings, 'noiseSpeed', 0.1, 1).step(0.1).onChange(redraw);\n noiseSettings.add(settings, 'noiseXStep', 0.1, 10).step(0.1).onChange(redraw);\n noiseSettings\n .add(settings, 'noiseYFactor', 0.01, 1)\n .step(0.01)\n .onChange(redraw);\n\n const viewSettings = gui.addFolder('View');\n viewSettings.addColor(settings, 'bgColor').listen().onChange(redraw);\n viewSettings.addColor(settings, 'lineColorUp').listen().onChange(redraw);\n viewSettings.addColor(settings, 'lineColorDown').listen().onChange(redraw);\n viewSettings.add(settings, 'randomizeColors');\n\n gui.add(settings, 'redraw');\n gui.add(settings, 'saveImage');\n gui.close();\n\n if (ENABLE_STATS) {\n stats.showPanel(0);\n elements.stats.appendChild(stats.dom);\n }\n}", "async function main() {\n new p5((p_) => {\n p = p_;\n p.setup = setup;\n // p.draw = draw;\n }, elements.container);\n\n gui\n .add(settings, 'targetClass', ['all'].concat(_.values(IMAGENET_CLASSES)))\n .onChange(restart);\n gui.add(settings, 'gridSize', 3, 100).step(1).onChange(restart);\n gui.add(settings, 'minStrokeWidth', 1, 10).step(1).onChange(restart);\n gui.add(settings, 'maxStrokeWidth', 10, 500).step(1).onChange(restart);\n gui.add(settings, 'lineCount', 1, 25).step(1).onChange(restart);\n gui.add(settings, 'lineAlpha', 0.1, 1).step(0.01).onChange(restart);\n gui.add(settings, 'linePointCurvePoint', 1, 50).step(1).onChange(restart);\n gui.add(settings, 'randomColorCount', 1, 50).step(1).onChange(restart);\n gui.add(settings, 'populationCount', 100, 1000).step(1);\n gui.add(settings, 'mutationRate', 0.1, 0.99).step(0.01);\n gui.add(settings, 'maxGeneration', 1, 100).step(1);\n gui.add(settings, 'matchThreshold', 0.1, 0.99).step(0.01);\n gui.add(settings, 'saveImage');\n gui.add(settings, 'restart');\n gui.add(settings, 'stop');\n gui.close();\n\n if (ENABLE_STATS) {\n stats.showPanel(0);\n elements.stats.appendChild(stats.dom);\n }\n}", "async function main() {\n image = await loadImage('./Apollo11HP-128539876.jpg');\n imageData = await readImageData(image);\n\n new p5((p_) => {\n p = p_;\n p.setup = setup;\n }, elements.container);\n\n // Settings\n gui.add(settings, 'omega', 0, 1).step(0.01).onFinishChange(drawThrottled);\n gui.add(settings, 'phase', 0, 1).step(0.01).onFinishChange(drawThrottled);\n gui.add(settings, 'quantVal', 1, 30).step(0.1).onFinishChange(drawThrottled);\n gui.add(settings, 'saveImage');\n gui.close();\n\n if (ENABLE_STATS) {\n stats.showPanel(0);\n elements.stats.appendChild(stats.dom);\n }\n}", "function main() {\r\n mainLoop()\r\n}", "function main()\n{\n init();\n loop();\n}", "function mainLoop () {\n // Hard coded insturction count that each loop runs.\n let insCount = 5\n c8.DELAY = Math.max(0, c8.DELAY - 1)\n while (insCount > 0) {\n const { MEM, PC } = c8\n // Move instruction offset.\n const ins = getIns(MEM[PC] << 8 | MEM[PC + 1])\n try {\n // Perform operation according to instruction.\n ops[ins[0]](ins, c8, view)\n } catch (err) { warning(err, ins, c8) }\n insCount--\n }\n window.requestAnimationFrame(mainLoop)\n }", "function setup() {\n var iterations = 1000;\n var die1 = -1;\n var die2 = -1;\n var loopNum = 0; //use to count number of loops\n var snakeEyesCount = 0; //use to count 2's\n var percentage = -5\n// simulate dice until iterations is reached\n// (use ! instead of \"until\" loop)\n while(!(loopNum > iterations)){ \n loopNum++;\n die1 = getRandomInt(1, 6);\n die2 = getRandomInt(1, 6);\n // count number of times the dice are a snake eye\n if (die1+die2 == 2) {\n snakeEyesCount++;\n }\n }\n \n// print to console\n console.log (\"Iterations: \"+iterations);\n console.log (\"Snake Eyes: \"+snakeEyesCount);\n percentage = (snakeEyesCount/iterations)*100;\n console.log (\"Percentage: \"+percentage+\"%\");\n \n// there is no function in p5's library for random integers\n// I found this function in stackoverflow\n// the floor and ceil functions are in p5\n function getRandomInt(min, max) {\n min = ceil(min);\n max = floor(max);\n return floor(random() * (max - min + 1)) + min;\n }\n}", "function setup() {\n\t// object containing P5 colors that are commonly reused\n\tcolors = {\n\t\tbg: color(40, 50, 60),\n\t\tbg_quad: color(220, 160, 80),\n\t\tbg_dark: color(20, 30, 40),\n\t\tr: color(200, 50, 50),\n\t\tbr: color(80, 50, 50),\n\t\tblk: color(0, 0, 0),\n\t\tpine: color(20, 50, 30),\n\t\tlt_bl: color(50, 100, 120),\n\t\tbl: color(80, 100, 120),\n\t\tg: color(45, 80, 50),\n\t\tpale_pink: color(180, 120, 120, 150),\n\t\tw: color(230, 230, 240)\n\t};\n\t// create canvas and assign to global variable cnv\n\t// canvas has width equal to half the window and height based on set aspect ratio\n\tcnv = createCanvas(window.innerWidth / 2, \n\t\twindow.innerWidth / 2 / 475 * 600);\n\t// position canvas so it occupies right half of screen\n\tcnv.position(window.innerWidth / 2, 0, \"absolute\");\n\t// initialize Shape obejcts to be drawn later\n\tinit_shapes();\n}", "function setup() {\n\t// createCanvas(windowWidth, windowHeight);\n\t// background(0);\n\t/*\n\tvar r1 = 0;\n\tvar r2 = 0;\n\tvar r3 = 0;\n\tvar r4 = 0;\n\tfor(i = 0; i < 200; i++){\n\t\tt = String(1000+Math.floor(Math.random() * 4) + 1);\n\t\tswitch(t){\n\t\t\tcase(\"1001\"):\n\t\t\t\tr1++;\n\t\t\t\tbreak;\n\t\t\tcase(\"1002\"):\n\t\t\t\tr2++;\n\t\t\t\tbreak;\n\t\t\tcase(\"1003\"):\n\t\t\t\tr3++;\n\t\t\t\tbreak;\n\t\t\tcase(\"1004\"):\n\t\t\t\tr4++;\n\t\t\t\tbreak;\n\t\t}\n\n\t}\n\t\n\tconsole.log(\"r is \" + r1);\n\tconsole.log(\"r is \" + r2);\n\tconsole.log(\"r is \" + r3);\n\tconsole.log(\"r is \" + r4);\n\t*/\n\tdocument.getElementById(\"button\").disabled = false;\n\tstarted = false;\n\n\t//Connect attempts for continuing to query the wws server\n\tconnectAttempts = 0;\n\t//allows one to set banID by url, mostly unused\n\tvar newID = getQueryVariable(\"ban\")\n\tif(newID!=false){\n\t\tif(localDebug){\n\t\t\tconsole.log(\"new ban is \" + newID)\n\t\t}\n\t\tif(debugMode){\n\t\t\tsendMessage(sendban, uniqueName + \" new ban is \" + newID);\n\t\t}\n\t\tBAN_ID = newID;\n\t}\n\t//Get start time\n\tvar d = new Date();\n\tstartTime = d.getSeconds();\n\n\t//Sets samples loaded to 0\n\tloaded = 0;\n\t//Default value of 0\n\tcurSamp = \"0\";\n\t \n\n\troom = getUrlVars()[\"room\"];\n\t//Check whether a variable has been passed via reload function\n\tif(room>1000){\n\t\ttag_no = room;\n\t\t//login();\n\t}\n\n\tosc = new p5.Oscillator('sine');\n\n\t//REMOVE THIS for tag login\n\t//document.getElementById(\"attempted_login\").value = \"\";\n\n}", "function setup() {\n\tconsole.info(\"main p5js sketch:\\n\", \"access to other p5js sketches\\n\", myP51, \"\\n\", myP52)\n\n\t//myRec.onResult = parseResult; // now in the constructor\n\tmyRec.start(); // start engine\n}", "function setup() {\n var cnv = createCanvas(800, 800);\n cnv.position((windowWidth-width)/2, 30);\n background(235);\n loadSquares(1);\n // Create a function that loads the squares into an\n // array of square objects and call the function\n loadSquares(); // traverse array and run each square\n for(var i = 0; i < square.length; i++){\n square[1].run();\n square[2].run();\n square[3].run();\n square[4].run();\n square[5].run();\n square[6].run();\n square[7].run();\n square[8].run();\n }\n}", "function setup() {\n\tframeRate(60);\n\n\ttable = new p5.Table();\n\ttable.addColumn('Generation');\n table.addColumn('Best Fitness');\n table.addColumn('average Fitness');\n\n\n\tcreateCanvas(w, h); //create the background\n\ttextSize(30);\n\tfor(var i=0; i<pop_size; i++){ //create population\n\t\tpopulation.push(new Individual());\n\t}\n\tobst = new Obstacles; //create obstacles\n\tobst.obsGen();\n\timg = loadImage(\"skull.ico\");\n\timg2 = loadImage(\"Simoes.png\")\n save(population[0].pos, \"test\");\n}", "function setup() {\n createCanvas(windowWidth, windowHeight);\n //start with a random star simulation of N stars and M planets\n generateButtons(windowWidth);\n generateRandomStars();\n generateRandomPlanets();\n}", "loop() {}", "loop() {}", "function setup(){\n createCanvas(windowWidth,windowHeight);\n \n getAudioContext().suspend();\n mic = new p5.AudioIn();\n mic.start();\n \n x = random(width);\n y = random(height);\n \n b = random(0,width);\n c = random(0,width);\n d = random(0,width);\n e = random(0,height);\n f = random(0,height);\n g = random(0,height);\n\n k = 0;\n}", "function setup() {\n // Create a p5.js canvas 800px wide and 600px high, and assign it to the global variable \"cnv\".\n g.cnv = createCanvas(800, 600);\n // Set the parent element to \"graphics-wrapper\"\n g.cnv.parent(\"graphics-wrapper\");\n // The \"main\" element is unnecessary. Don't worry about this too much\n document.getElementsByTagName(\"main\")[0].remove();\n}", "function setup() {\n // Get window size \n let windowWidth = window.innerWidth - 270;\n let windowHeight = window.innerHeight - 180;\n\n // Container for everything\n let container = createDiv().class(\"container\");\n\n // Create controls and canvas\n let controls = makeControls();\n controls.parent(container);\n let canvasContainer = createDiv();\n canvas = createCanvas(windowWidth, windowHeight).class(\"p5_canvas\");\n canvasContainer.parent(container);\n canvas.parent(canvasContainer);\n\n // Set color mode to RGB percentages \n colorMode(RGB, 100);\n\n // Create set of particles\n getSize();\n // createEmptyParticles();\n}", "function loop() {\r\n}", "function setup() {\n // Create a p5.js canvas 800px wide and 600px high, and assign it to the global variable \"cnv\".\n g.cnv = createCanvas(800, 600);\n\n // Set the parent element to \"graphics-wrapper\"\n g.cnv.parent(\"graphics-wrapper\");\n\n // The \"main\" element is unnecessary. Don't worry about this too much\n document.getElementsByTagName(\"main\")[0].remove();\n}", "function setup() // P5 Setup Fcn\n{\n let sz = g_canvas.cell_size;\n let width = sz * g_canvas.wid; // Our 'canvas' uses cells of given size, not 1x1 pixels.\n let height = sz * g_canvas.hgt;\n createCanvas(width, height); // Make a P5 canvas.\n draw_grid(20, 320, 'white', 'yellow');\n\n draw_headers(); // draw the headers for each algorithm\n}", "function setup() {\n\n // General Settings\n createCanvas(windowWidth, windowHeight);\n textFont(`Courier`);\n textAlign(CENTER, CENTER);\n textSize(20);\n rectMode(CENTER);\n imageMode(CENTER);\n noStroke();\n userStartAudio();\n\n\n // Vegetation\n for(let i = 0; i < NUM_PLANTS; i++){\n let x = random(width/2 - canvaWidth/2, width/2 + canvaWidth/2);\n let y = random(height/2 - canvaHeight/2, height/2 + canvaHeight/2);\n let change = random(0, 1);\n if (change < 0.5){\n y = random(height/2 - 2*canvaHeight/5, height/2 - canvaHeight/2);\n }\n else{\n y = random(height/2 + canvaHeight/5, height/2 + canvaHeight/2);\n }\n let plantImage = random(plantImages);\n let plant = new Vegetation (x, y, plantImage, change);\n plants.push(plant);\n }\n\n // Jeep\n let x = width/2;\n let y = height/2;\n jeep = new Jeep(x, y, jeepImage);\n\n // Obstacles\n for(let i = 0; i < NUM_OBSTACLES; i++){\n let x = random(width/2 + canvaWidth/3, width/2 + canvaWidth/2);\n let y = random(height/2 - canvaHeight/2, height/2 + canvaHeight/3);\n let obstacleImage = random(obstacleImages);\n let obstacle = new Obstacle(x, y, obstacleImage);\n obstacles.push(obstacle);\n }\n\n // Mic Input\n mic = new p5.AudioIn();\n mic.start();\n\n // Capture User's Webcam\n capture = createCapture(VIDEO);\n capture.hide();\n\n // Create Credits String\n x = width/2;\n y = 3*height/2;\n credits = new Credits(x, y);\n\n}", "function setup() // P5 Setup Function\n{\n let sz = g_canvas.cell_size;\n let width = sz * g_canvas.wid; // Our 'canvas' uses cells of given size, not 1x1 pixels.\n let height = sz * g_canvas.hgt;\n createCanvas( width, height ); // Make a P5 canvas.\n draw_grid( 20, 0, 'white', 'red' );\n}", "function setup() {\n // put setup code here\n cnv = createCanvas(innerWidth, innerHeight);\n cnv.parent('p5Sketch');\n // connect the socket to our server\n socket = io.connect('http://localhost:5000'); \n}", "function setup() {\n createCanvas(600, 600);\n imageMode(CENTER);\n rectMode(CENTER);\n userStartAudio();\n mic = new p5.AudioIn();\n mic.start();\n\n // Set the current State to :\n currentState = new TitlePage(); // Can be TitlePage, InstructionPage, Lvl1, Lvl2, ..., Lvl4.\n let x = 50;\n\n // //Set life array :\n for (let i = 0; i < numLives; i++) {\n let y = (height / 15) * 14;\n let life = new Life(x, y);\n x += 70;\n lives.push(life);\n }\n}", "function setup() {\n createCanvas(windowWidth, windowHeight); // predefined P5 variables\n noFill(); // sinewaves are made with stroke only as they're bezier curves\n addColors();\n background(255);\n noLoop(); // useful to keep the draw function running when in development\n}", "function setup() {\n createCanvas(500, 400);\n\n var div0 = createDiv(\"G5\")\n div0.position(16, 250);\n var div1 = createDiv(\"G#5\")\n div1.position(66, 250);\n var div2 = createDiv(\"A#5\")\n div2.position(123, 250);\n var div3 = createDiv(\"C6\")\n div3.position(183, 250);\n var div4 = createDiv(\"C#6\")\n div4.position(234, 250);\n var div5 = createDiv(\"D#6\")\n div5.position(290, 250);\n var div6 = createDiv(\"F6\")\n div6.position(350, 250);\n var div7 = createDiv(\"G6\")\n div7.position(405, 250);\n var div8 = createDiv(\"A#6\")\n div8.position(456, 250);\n\n // Square oscillator\n osc = new p5.Oscillator('square');\n\n // Start the piano silently\n osc.start();\n osc.amp(0);\n\n // Createing drop down menu for differnt sound effects\n sel = createSelect();\n sel.position(5, 115);\n sel.option('square');\n sel.option('triangle');\n sel.option('sine');\n sel.selected('square');\n sel.changed(mySelectEvent);\n\n //Fuction to play selected drop down menu option\n function mySelectEvent() {\n let val = sel.value();\n if (val == 'square') {\n bgCol = new p5.Oscillator('square');\n } else if (val == 'triangle') {\n bgCol = new p5.Oscillator('triangle');\n } else if (val == 'sine') {\n bgCol = new p5.Oscillator('sine');\n }\n }\n}", "function setup() {\n var cnv = createCanvas(800, 800);\n cnv.position((windowWidth-width)/2, 30);\n background(235);\n // Create a function that loads the squares into an\n // array of square objects and call the function\nvar sqr = [];\nloadSquares();\nfor(i = 0; i < squares.length; i++){\n squares[i].render();\n}\n // traverse array and run each square\n\n}", "function setup() {\n createCanvas(windowWidth, windowHeight);\n\n// *This is a random, 5 Circle placer*\n//while (i < 5) {\n //fill(random(255), random(255), random(255))\n //ellipse(random(width), random(height), 100, 100);\n //i++;\n //}\n\n\n}", "function setup() {\n createCanvas(windowWidth, windowHeight, WEBGL);\n // Create object\n\n for(var i=0; i < 30; i++){ //loop 5 times\n //put an object in the array for each loop\n // var d=random(100,200);\n // pulse[i] = new Pulser(width/2, height/2, d,d); \n // spirits = new ghost();\n spirits[i] = new ghost();\n }\n\n colorMode(HSB, 360, 100, 100);\n}", "function main() {\n verb(\"BetaBoards!\")\n\n var s = style()\n\n if (isTopic()) {\n iid = getPage()\n cid = iid\n\n initEvents()\n remNextButton()\n postNums()\n floatQR()\n hideUserlists()\n\n quotePyramid(s)\n\n ignore()\n\n beepAudio()\n\n addIgnoredIds(document.querySelectorAll(\".ignored\"))\n\n var f = function(){\n pageUpdate()\n\n loop = setTimeout(f, time)\n }\n\n var bp = readify('beta-init-load', 2)\n , lp = isLastPage([0, 2, 5, 10, NaN][bp])\n\n verb(\"bp \" + bp + \", lp: \" + lp)\n\n if (lp || bp === 4) loop = setTimeout(f, time)\n\n } else if (isPage(\"post\")) {\n addPostEvent()\n\n } else if (isPage(\"msg\")) {\n try {\n addPostEvent()\n } catch(e) {\n addQuickMsgEvent()\n }\n\n } else if (isForum()) {\n hideUserlists()\n\n var f = function(){\n forumUpdate()\n\n loop = setTimeout(f, time)\n }\n\n loop = setTimeout(f, time)\n\n } else if (isHome()) {\n optionsUI()\n ignoreUI()\n\n // Hint events\n addHintEvents()\n\n }\n}", "function setup() {\n //p5Canvas = createCanvas(1300, 300);\n p5Canvas = createCanvas(500, 300);\n //frameRate(1);\\\n frameRate(40);\n //p5Canvas = createCanvas(300, 300,WEBGL);\n //normalMaterial();\n textSize(64);\n //textAlign(CENTER, CENTER);\n}", "function setup() {\n var canvas = createCanvas(640, 360);\n canvas.parent(\"p5container\");\n stroke(255);\n frameRate(30);\n}", "function setup() { // setup p5\n step = TWO_PI/numberOfButtons; // in radians the equivalent of 360/6\n scale = pentatonic; // sets the default scale on load\n let cnv = createCanvas(400, 400); // create canvas\n cnv.parent('p5parent'); //put the canvas in a div with this id if needed\n\n // *** add vanilla JS event listeners for touch which i want to use in place of the p5 ones as I believe that they are significantly faster\n var el = document.getElementById(\"p5parent\");\n el.addEventListener(\"touchstart\", handleStart, false);\n el.addEventListener(\"touchend\", handleEnd, false);\n el.addEventListener(\"touchcancel\", handleCancel, false);\n el.addEventListener(\"touchmove\", handleMove, false);\n offset = el.getBoundingClientRect(); // move touch readings to allow for the menu\n\n colorMode(HSB, numberOfButtons + 1); // specify HSB colormode and set the range to be between 0 and numberOfButtons\n noStroke(); // no stroke on the drawings\n\n welcomeScreen(); // initial screen for project - also allows an elegant place to put in the Tone.start() command.\n // I don't think that this technique will work if animating as the draw() function will instantly overide it\n createButtonPositions(); // generate the default array info depending on number of buttons\n}", "function setup() {\n createCanvas(windowWidth, windowHeight);\n\n for (i = 1; i <= 5; i++) {\n pt = new Point(i*200, i*100);\n node = new Node(pt, \"amy node \" + i);\n nodes.push(node);\n }\n}", "function main(){\n\t//Initialice with first episode\n\tvar sel_episodes = [1]\n\t//collage(); //Create a collage with all the images as initial page of the app\n\tpaintCharacters();\n\tpaintEpisodes();\n\tpaintLocations(sel_episodes);\n}", "function setup()\n{\n frameRate(60);\n createCanvas(windowWidth, windowHeight);\n buttonSizeW = windowWidth/6.71; //Setting default button size\n buttonSizeH = windowWidth/15.24; //Setting default button size\n scaledHeight = windowWidth/1.77777; //Scaling windowHeight to 16:9\n scaledP5playElement = windowWidth/1920;\n\n\n ////////////////SETUP ANIMATION////////////////\n //bannerComingDown = 0-windowWidth/5; //Setting title banner animation\n bannerComingDown = windowWidth/5.7;\n //meatComingDown = 0-windowWidth/5; //Setting title banner animation\n meatComingDown = windowWidth/6;\n loadingComingDown = 0-scaledHeight; //Setting loading screen animation\n\n saltComingDown = 0;\n fryComingDown = 0;\n eatComingDown = 0;\n\n meatRotation = 0; //Setting title banner animation\n sparkleFade1 = 255;\n sparkleFade2 = 125;\n sparkleFade3 = 50;\n sparkleFade4 = 175;\n\n ///////////////////SETUP Clock and Completion Status///////////////////\n completeStatus = windowWidth/3;\n clickCountStatus = 0;\n clockCountdown = 0;\n\n\n\n\n ////////////////SETUP BOOLEAN//////////////////\n inTitleScreen = true; //Goes to Main Title Screen **camera position x at 0\n inChatRoom = false; //Goes to Chatting Screen **camera position x at windowWidth*2+windowWidth/2\n bearConvo = false; //Sub Menu of Chatting Screen - Bear\n twinkConvo = false; //Sub Menu of Chatting Screen - Twink\n jockConvo = false; //Sub Menu of Chatting Screen - Jock\n bearConvoYes = false;\n bearConvoNo = false;\n twinkConvoYes = false;\n twinkConvoNo = false;\n jockConvoYes = false;\n jockConvoNo = false;\n\n saltItScreen = false; //Goes to Salt It Screen **camera position x at windowWidth*3+windowWidth/2\n fryItScreen = false; //Goes to Fry It Screen **camera position x at windowWidth*4+windowWidth/2\n eatItScreen = false; //Goes to Eat It Screen **camera position x at windowWidth*5+windowWidth/2\n stripItScreen = false; //Goes to Strip It Screen\n\n saltItFailed = false; //Shows up Score Board if failed\n fryItFailed = false; //Shows up Score Board if failed\n eatItFailed = false; //Shows up Score Board if failed\n nothingFailed = false; //Shows up Score Board if everything success!\n\n timeIsUp = false;\n fireIsOn = false;\n\n ////////////////SETUP BACKGROUND MUSIC//////////////////\n // Mimics the Autoplay Policy\n getAudioContext().suspend();\n // Play Audio\n bgm01.loop();\n\n\n\n\n\n ///Setup Video//////\n stripVideo = createVideo(['data/stripped.mp4']);\n stripVideo.hide();\n\n\n} //End of Setup", "function setup() {\n frameRate(100); //number of times the function is called in a sec\n createCanvas(800, 500);\n values = new Array(width);\n for(let i=0; i<values.length; i++){\n values[i] = random(height);\n }\n}", "function setup() {\n createCanvas(800, 800);\n userStartAudio();\n\n song = new p5.PolySynth();\n\n //Note B5\n let noteB5 = new NoteB5(400, 100);\n musicBlocks.push(noteB5);\n\n //Note A5\n let noteA5 = new NoteA5(200, 700);\n musicBlocks.push(noteA5);\n\n //Note F5\n let noteF5 = new NoteF5(700, 400);\n musicBlocks.push(noteF5);\n\n //Note E5\n let noteE5 = new NoteE5(600, 700);\n musicBlocks.push(noteE5);\n\n //Note D5\n let noteD5 = new NoteD5(100, 400);\n musicBlocks.push(noteD5);\n}", "function main() {\n latestSimulationPrediction(),\n simulationPrediction()\n // latestAnalyticalPrediction(),\n // analyticalPrediction()\n // simulationPredictionKPIs(),\n analyticalPredictionKPIs()\n // startEvaluation(),\n // evaluationStatus(),\n // cancelEvaluation(),\n // simulatedEvaluation(),\n // simulatedEvaluationKPIs(),\n // setNowTime(),\n // getNowTime(),\n // ping()\n}", "function setup() {\n var cnv = createCanvas(800, 800);\n cnv.position((windowWidth-width)/2, 30);\n background(22);\n squareSize = width/numberofSquares;\n\n // Create a function that loads the squares into an\n // array of square objects and call the function\n\n loadSquares(8);\n // traverse array and run each square \\\n\n for(var i = 0; i < squares.length; i++){\n squares[i].render();\n }\n\n}", "function setup() {\n createCanvas(500, 500);\n synth = new p5.PolySynth();\n\n userStartAudio();\n}", "function setup() {\n createCanvas(500, 500);\n for (var i = 0; i < bnum; i++) {\n bees[i] = new bee();\n }\n \n stage = 1;\n}", "function setup() {\n createCanvas(640, 480);\n\n //Access user's webcam\n video = createCapture(VIDEO);\n video.hide();\n\n //Loads handpose model\n handpose = ml5.handpose(video, { flipHorizontal: true }, function () {\n console.log(\"Model loaded\");\n });\n\n handpose.on(\"predict\", function (results) {\n console.log(results);\n predictions = results;\n });\n\n //All the bubbles, have different sizes and speeds, could've been in classes,\n //for the sake of this exercise, I'll leave it like this\n bubble = {\n x: random(width),\n y: height,\n size: 100,\n vx: 0,\n vy: -2,\n };\n\n poisonBubble = {\n x: random(width),\n y: height,\n size: 75,\n vx: 0,\n vy: -1,\n };\n\n healingBubble = {\n x: random(width),\n y: height,\n size: 40,\n vx: 0,\n vy: -10,\n };\n}", "function main() {\n doCbaam()\n doEcb()\n updateGraphFile()\n}", "function setup() {\r\n createCanvas(400,400);\r\n background(0,255,0);\r\n // The number of cycles a generation is allowed to live\r\n lifetime = 300;\r\n\r\n // Initialize variables\r\n lifecycle = 0;\r\n recordtime = lifetime;\r\n\r\n target = new TargetClass(width / 2 - 12, 24, 24, 24);\r\n\r\n // Create a population with a mutation rate, and population max\r\n let mutationRate = 0.01;\r\n population = new Population(mutationRate, 50);\r\n\r\n // Create the obstacle course\r\n obstacles = [];\r\n obstacles.push(new Obstacle(width / 2 - 100, height / 2, 200, 10));\r\n}", "function setup() {\n createCanvas(1000, windowHeight);\n\n\n user = new User(width/2, height/2);\n for (let i = 0; i <= numofTargets; i++){\n let rSpeed = random(5, 8);\n let rY = random(150, 850);\n let rR = random(100, 230);\n let rG = random(100, 230);\n let rB = random(100, 230);\n let target = new Target(-150, rY, rSpeed, rR, rG, rB);\n targets.push(target);\n }\n let rX = random(150, 850);\n let rY = random(150, 850);\n bow = new Bow(rX, rY, imgBowL, imgBowR, imgBowU, imgBowD, imgArrowL, imgArrowR, imgArrowU, imgArrowD);\n\n arrowOsc = new p5.Oscillator();\n let d = dist(user.x, user.y, bow.arrowX, bow.arrowY);\n let maxDist = dist(0, 0, width, height);\n let newFreq = map(d, 0, maxDist, nearFreq, farFreq);\n //let newAmp = map(d, 0, maxDist, nearAmp, farAmp);\n arrowOsc.freq(440);\n arrowOsc.amp(0.02);\n userStartAudio();\n}", "async function mainLoop() {\n\n\tdrawBoard(currentlyDisplayedCards);\n\twhile (!gameEnded) {\n\t\tlet eventSet = await getEvent(pastEvents);\n\t\tawait handleEvent(eventSet); // handle the event that was just added\n\t}\n}", "function setup() {\n if (windowWidth / gX < windowHeight / gY) {\n s = (windowWidth - 5) / gX;\n } else {\n s = (windowHeight - 5) / gY;\n }\n createCanvas(s * gX, s * gY);\n\n ruleset = ECA;\n createGrid();\n\n fpsSlider = createSlider(1, 30, 5, 1);\n\n ruleSelect = createSelect();\n ruleSelect.option(\"Elementary Celular Automata (input to change rule)\");\n ruleSelect.option(\"Game Of Life\");\n ruleSelect.option(\"Brian's Brain\");\n ruleSelect.changed(changeRuleset);\n\n ruleInput = createInput('');\n ruleInput.input(changeRuleNum);\n\n randomCheckbox = createCheckbox('random start', false);\n randomCheckbox.changed(changeRandom);\n}", "function mainLoop()\n {\n\t\tmainLoopCounter++;\n if (Graph.instance.nodes.get(state.sourceId).b == 0) {\n state.current_step = STEP_FINISHED; //so that we display finished, not mainloop when done\n that.stopFastForward();\n \n logger.log(\"Finished with a min cost of \"+ minCost);\n\n }\n else\n {\n logger.log(\"Not finished, starting search for augmentation cycle \");\n state.show_residual_graph = true;\n state.current_step = STEP_FINDSHORTESTPATH; \n\t\t\n }\n }", "function setup() {\n var cnv = createCanvas(800, 800);\n cnv.position((windowWidth-width)/2, 30);\n background(235);\n // Create a function that loads the squares into an\n // array of square objects and call the function\n loadSquares();\n // traverse array and run each square\n for(var i = 0; i < squares.length; i++){\n squares[i].render();\n }\n}", "function setup() {\n createCanvas(400, 300);\n\n serial = new p5.SerialPort(); //a new instance of serial port library\n\n //set up events for serial communication\n serial.on('connected', serverConnected);\n serial.on('open', portOpen);\n serial.on('data', serialEvent);\n serial.on('error', serialError);\n serial.on('close', portClose);\n\n //open our serial port\n serial.open(portName);\n\n //let's figure out what port we're on - useful for determining your port\n // serial.on('list', printList); //set a callback function for the serialport list event\n // serial.list(); //list the serial ports\n}", "_setupLoop () {\n this._time = 0\n this._loop()\n }", "function setup() {\r\n \r\n //set up communication port\r\n serial = new p5.SerialPort(); // make a new instance of the serialport library\r\n serial.on('list', printList); // set a callback function for the serialport list event\r\n serial.on('connected', serverConnected); // callback for connecting to the server\r\n serial.on('open', portOpen); // callback for the port opening\r\n serial.on('data', serialEvent); // callback for when new data arrives\r\n serial.on('error', serialError); // callback for errors\r\n serial.on('close', portClose); // callback for the port closing\r\n \r\n serial.list(); // list the serial ports\r\n serial.open(portName); // open a serial port\r\n }", "function setup() {\n createCanvas(400, 400);\n \n serial = new p5.SerialPort(); // make a new instance of the serialport library\n serial.on('list', printList); // set a callback function for the serialport list event\n serial.on('connected', serverConnected); // callback for connecting to the server\n serial.on('open', portOpen); // callback for the port opening\n serial.on('data', serialEvent); // callback for when new data arrives\n serial.on('error', serialError); // callback for errors\n serial.on('close', portClose); // callback for the port closing\n \n serial.list(); // list the serial ports\n serial.open(portName); // open a serial port\n}", "function setup()\n{\n\tcolorMode(RGB, 1)\n\tcreateCanvas(600, 400)\n\n\tfor (let i = 0; i < bubble_num; i++)\n\t{\n\t\tbubbles[i] = new Bubble(Math.random(-4, 4))\n\t}\n\n\n\n\n\t//print(bubble.x, bubble.y)\n\n\n}", "function setup() {\n createCanvas(windowWidth, windowHeight);\n noLoop();\n}", "function setup() {\n canvas = createCanvas(windowWidth, windowHeight);\n pineTrail.setVolume(1.0);\n pineTrail.playMode('untilDone');\n threeZero.setVolume(1.0);\n threeZero.playMode('untilDone');\n threeOne.setVolume(1.0);\n threeOne.playMode('untilDone');\n threeThree.setVolume(1.0);\n threeThree.playMode('untilDone');\n threeFive.setVolume(1.0);\n threeFive.playMode('untilDone');\n threeEight.setVolume(1.0);\n threeEight.playMode('untilDone');\n threeNine.setVolume(1.0);\n threeNine.playMode('untilDone');\n content_home3 = [\"3.0 three\", \"3.1 Deciduous trees, vines and undergrowth \\n cascade down the hill behind\", \"3.2 fourteen meshed windows \\n that fall out of unpainted clapboard: \\n two rooms on bottom and two on top. \\n Rain drips louder than distant trucks passing\", \"3.3 who slice the landscape perpendicular\", \"3.4 to water systems’ homely stasis: (up, down).\", \"3.5 Bowed wooden exterior \\n shrugs damply into earth.\", \"3.6 Mutely, it suggests \\n a dozen daughters or sons, sleeves rolled, \\n braiding hair and, in summer shade, \\n shoveling (this was when\", \"3.7 wealth came from below.)\\n It took one hundred passes \\n for me to see the home. \\n Walking here my head is usually down, \\n searching for shiny stones.\", \"3.8 Quartz rock is abundant here: \\n left behind by waters that bore it, left,\", \"3.9 upstream, northeast.\"];\n\n text_area = document.getElementById(\"compass_content\");\n timeinseconds = 0;\n i = .001;\n // filterFreq = 100;\n // filter = new p5.BandPass();\n pineTrail.disconnect();\n // pineTrail.connect(filter);\n // filter.amp(1.0, 20, 0)\n\n timer = 0;\n // textFont(\"courier\", 25);\n\n// //recording setup\n// state = 0;\n// mic = new p5.AudioIn();\n// mic.start();\n// recorder = new p5.SoundRecorder();\n// recorder.setInput(mic);\n// soundFile = new p5.SoundFile();\n \n window.addEventListener('deviceorientation', function(e) {\n var alpha = e.alpha;\n if(e.webkitCompassHeading){\n compassHeading = e.webkitCompassHeading;\n } else compassHeading = 360 - alpha;\n });\n }", "function setup() {\n createCanvas(windowWidth, windowHeight - 100);\n fill(255, 55);\n stroke(255, 85);\n //create i bubbles\n for (var i = 0; i < 50; i++) {\n bubbles.push(new Bubble(5, 75));\n }\n}", "function main() {\n const inputs = [\n ['1 2 N', 'LMLMLMLMM'],\n ['3 3 E', 'MMRMMLMRRM'],\n ['4 1 S', 'MLMLMRMRM'],\n ];\n const grid = new Grid(5, 5);\n\n inputs.forEach(line => {\n const coordinate = line[0].split(' ');\n const x = parseInt(coordinate[0]);\n const y = parseInt(coordinate[1]);\n const direction = coordinate[2];\n const rover = new Rover(x, y, direction, grid);\n rover.move(line[1]);\n rover.print();\n });\n}", "function setup() {\n // createCanvas(windowWidth, windowHeight);\n createCanvas(600, 600);\n\n // background(0);\n nR = random(1000);\n nG = random(1000);\n nB = random(1000);\n}", "function setup() {\n var cnv = createCanvas(800, 800);\n cnv.position((windowWidth-width)/2, 30);\n background(5, 5, 5);\n loadBalls(0);\n loadRects(0);\n loadShips(20);\n\n\n}", "function main() {\n \n setupWebGL(); // set up the webGL environment\n loadGrid(); // load in the models from tri file\n ultimateDone = false;\n loadPeicesA();\n loadPeicesB();\n loadPeicesC();\n loadPeicesD();\n loadPeicesE();\n setActive();\n setTaken();\n loadNextA(0);\n setupShaders(); // setup the webGL shaders\n renderModels(); // draw the triangles using webGL\n \n} // end main", "function setup() {\n\t// createCanvas must be the first statement\n createCanvas(width, height); \n stroke(255); // Set line drawing color to white\n frameRate(60);\n p_s = [];\n p_s2 = [];\n var sum = 0;\n for (var i = 0; i < 26; i++) {\n p_s[i] = random();\n sum += p_s[i];\n\n var sum2 = 0;\n p_s2[i] = [];\n for (var j = 0; j < 26; j++) {\n p_s2[i][j] = random();\n sum2 += p_s2[i][j];\n }\n\n for (var j = 0; j < 26; j++) {\n p_s2[i][j] /= sum2;\n }\n }\n\n for (var i = 0; i < 26; i++) {\n p_s[i] /= sum;\n }\n}", "function setup() {\n createCanvas(windowWidth, windowHeight);\n scaleMaximums(); // Adapt the max amount of bubbles to the size of the window\n\n // Load the pictures. The animation begins before finishing loading, displaying only colored circles.\n for (let i = 0; i <= lastPic; i++) {\n pics[i] = loadImage(\"pictures/picture\" + i + \".png\", () => {\n picsLoaded++;\n // When all pictures are loaded, assign random pictures to the bubbles already created\n if (picsLoaded >= lastPic + 1) {\n bubbles.forEach(b => b.pic = random(pics));\n }\n });\n }\n}", "function setup() {\n newLetter();\n printWin();\n printGuesses();\n printLetters();\n printLoss();\n}", "function setup() {\n // put start code here\n var cnv = createCanvas(800, 800);\n cnv.position((windowWidth-width)/2, 30);\n background(20,20,20);// back ground color\n paddle = new Paddle(width/2, height - 100, 100, 10);\n mainBall = new Ball(width/2, 20, random(-3, 3), random(-3, 3), -1);\n loadBalls(33);\n}", "function setup() {\n // put start code here\n var cnv = createCanvas(800, 800);\n cnv.position((windowWidth-width)/2, 30);\n background(20,20,20);// back ground color\n paddle = new Paddle(width/2, height - 100, 100, 10);\n mainBall = new Ball(width/2, 20, random(-3, 3), random(-3, 3), -1);\n loadBalls(33);\n}", "function setup()\r\n{\r\ncreateCanvas(windowWidth, windowHeight);\r\n\r\n\r\n\r\n\tfor (var i = 0; i < 1000; i++) \r\n\t{\r\n\t\tal[i] = new alien();\r\n\t}\r\n}", "function setup(){\n /*oscilator = new p5.Oscillator();\n envel = new p5.Env();\n envel.setADSR(0, 0.2, 0.2, 0.3);\n envel.setRange(1, 0);\n oscilator.amp(envel);*/\n}", "function run() { \n\n moveToNewspaper();\n pickBeeper();\n returnHome();\n\n}", "function mainLoop() {\n // check if the user is drawing and emit xy coords to be pushed into line history on the back end\n if (mouse.click && mouse.move && mouse.pos_prev) {\n // send line to to the server\n client.emit('draw_line', { line: [mouse.pos, mouse.pos_prev] });\n mouse.move = false;\n }\n if (erase) { //user1 erases -> server gets message -> updates client state for all users\n client.emit('erase_board', { message: 'Client to server: User x erased the board' });\n erase = false;\n }\n //if not drawing, assign values to pos_prev to begin the drawing process\n mouse.pos_prev = { x: mouse.pos.x, y: mouse.pos.y };\n setTimeout(mainLoop, 25); //recursive loop every 25ms\n }", "function runProgram() {\r\n for (let x = 0; x < 3; x++) {\r\n let i = initialPrompt()\r\n switch (i) {\r\n case i:\r\n console.log(\"\\nUsing Algorithm: \", scoringAlgorithms[i].name);\r\n while (true) {\r\n var inputScore = secondPrompt();\r\n if (inputScore != \"stop\") {\r\n console.log(`Score for '${inputScore}' :`, scoringAlgorithms[i].scoreFunction(inputScore));\r\n }\r\n else {\r\n console.clear();\r\n input.question(\"Press any key to continue...\");\r\n console.clear();\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n}", "function setup()\n{\n // osc = new p5.Oscillator();\n // osc.setType('sine');\n // osc.start();\n // osc.freq(0);\n // osc.amp(.5);\n\n textBox1 = new AnimatedTextBox(-400, -120, 800, 300, 20, \"LEFT\", color(255, 255, 255, 255), \"NiMPTi is an intergalactic garbage collector whose mission is to rid the virtual file space universe of bad programmers. He survives by freeing memory that hasn't been released by host programs...\");\n textBox1.startTime = 4;\n\n textBox2 = new AnimatedTextBox(-400, -40, 800, 300, 20, \"LEFT\", color(255, 255, 255, 255), \"Not only does the acquired memory keep his ship in orbit, it also powers his on-board radio....\");\n textBox2.startTime = 25;\n\n textBox3 = new AnimatedTextBox(-400, 10, 800, 300, 20, \"LEFT\", color(255, 255, 255, 255), \"NiMPTi can survive in the most hostile environments in the virtual uni-world, but he can't survive without his choons!\");\n textBox3.startTime = 35;\n\n centreX = windowWidth / 2;\n centreY = windowHeight / 2;\n var cans = createCanvas(windowWidth, windowHeight);\n createScene();\n cans.style('display', 'block');\n textAlign(CENTER);\n background(0);\n button = createButton('Skip Intro - Play');\n button.position(windowWidth*.46, windowHeight*.65);\n button.mousePressed(playGame);\n}", "function setup() {\n createCanvas(windowWidth, windowHeight);\n\n dimension = Math.min(width,height);\n\n launchpad = new Launchpad();\n\n for(let n = 0; n < 12; n++) {\n let a = 0;\n switch(n) {\n case 0:\n case 1:\n case 2:\n case 3: a = -1; break;\n case 11: a = 1; break;\n }\n let newNote = new Note((8+4*n)%7+1,n*7);\n newNote.alter(a);\n notes.push(newNote);\n let otherNote;\n for(let d = 2; d <= 7; d++) {\n otherNote = new Note((d+n*4)%7+1,n*7+d-1);\n if(fundamental != 84 && n == floor(fundamental/7)) {\n otherNote.button.color = degToColor(deg(7-fundamental%7+d));\n }\n otherNote.alter(alt(degToNdt(otherNote.d-newNote.d+1)-ndt(otherNote.n-newNote.n)));\n notes.push(otherNote);\n }\n }\n\n\n //midiHandler = new MidiHandler();\n enableMidi();\n\n /*mic = new p5.AudioIn()\n mic.start();\n fft = new p5.FFT();\n fft.setInput(mic);*/\n\n userStartAudio().then(function() {\n console.log('Audio ready');\n });\n}", "function setup() {\n createCanvas(640, 480);\n\n // here you pass how many images of a specific class you have\n //create_imageList(173);\n\n input = createFileInput(handleFile); \n input.position(640, 240); \n\n poseNet = ml5.poseNet(onloaded);\n poseNet.on(\"pose\", getposes);\n\n // let options = {\n // inputs: 34,\n // outputs: 5,\n // task: 'classification',\n // debug: true\n // }\n\n // brain = ml5.neuralNetwork(options);\n\n // call for the first image here\n //openImage(image_list[img_num]);\n}", "function main() {\r\n putBeeper();\r\n moveAndDropBeeper();\r\n moveAndDropBeeper();\r\n moveAndDropBeeper();\r\n moveAndDropBeeper();\r\n}", "function setup() {\n createCanvas(windowWidth, windowHeight);\n\n paddle = new Paddle(300, 20);\n\n for (let i = 0; i < numBalls; i++) {\n let x = random(0, width);\n let y = random(-400, -100);\n let ball = new Ball(x, y);\n balls.push(ball);\n }\n\n for (let i = 0; i < numSquares; i++) {\n let x = random(0, width);\n let y = random(80, (height / 5) * 3);\n let square = new Square(x, y);\n squares.push(square);\n }\n}", "function main() {\n\t\thtmlModule = new htmlUtil(); // View creation / HTML logic\n\t\tarrModule = new arrMethods(); // Array Method shortcuts\n\t\tmsg = htmlModule.msg; // Logging\n\t\tmsg.set(\"Starting Module\");\n\t\thtmlModule.outputToContentDiv(\"Primes by Sieve of Erathosthenes.\");\n\t\t// Setup Form.\n\t\tvar numArray = sieveModule(1000);\n\t\tfor (var i = 0; i < numArray.length; i++) {\n\t\t\tif (numArray[i] == 1) {\n\t\t\t\thtmlModule.outputToContentDiv(\"Prime: \" + i);\n\t\t\t}\n\t\t}\n\n\t}", "function main(){\r\n\tcur_t = 0\r\n\tkill_step = poisson(kill_step);\r\n\tcount_step = 0;\r\n\t//do {\r\n\tvar times = setInterval(function(){\r\n\t\tif (cur_t == steps) clearInterval(times);\r\n\r\n\t\tvar temp = couple_logistic_possison(pop, params, steps);\r\n\t\tif (count_step == kill_step){\r\n\t\t\tcata(kill_percentage, pop);\r\n\t\t\tkill_step = poisson(kill_step);\r\n\t\t\tcount_step = 0;\r\n\t\t}\r\n\r\n\t\tshow_graphics(temp);\r\n\r\n\t\tcur_t += 1;\r\n\t\tcount_step += 1;\r\n\t\treturn temp;\r\n\t\t}, 35);\r\n\t//} while (cur_t < steps)\t\r\n}", "function setup() {\r\n\r\n for (var i = 0; i < bar; i++) {\r\n matrix.push([]);\r\n for (var j = 0; j < erk; j++) {\r\n matrix[i][j] = 0;\r\n }\r\n }\r\n\r\n\r\n var c = 0;\r\n while (c < xotCount) {\r\n var x = Math.floor(random(0, erk));\r\n var y = Math.floor(random(0, bar));\r\n if (matrix[y][x] == 0) {\r\n matrix[y][x] = 1;\r\n c++;\r\n }\r\n }\r\n var q = 0;\r\n while (q < eatCount) {\r\n var x = Math.floor(random(0, erk));\r\n var y = Math.floor(random(0, bar));\r\n if (matrix[y][x] == 0) {\r\n matrix[y][x] = 2;\r\n q++;\r\n }\r\n }\r\n var w = 0;\r\n while (w < gishCount) {\r\n var x = Math.floor(random(0, erk));\r\n var y = Math.floor(random(0, bar));\r\n if (matrix[y][x] == 0) {\r\n matrix[y][x] = 3;\r\n w++;\r\n }\r\n }\r\n var r = 0;\r\n while (r < patCount) {\r\n var x = Math.floor(random(0, erk));\r\n var y = Math.floor(random(0, bar));\r\n if (matrix[y][x] == 0) {\r\n matrix[y][x] = 4;\r\n r++;\r\n }\r\n }\r\n var t = 0;\r\n while (t < mardCount) {\r\n var x = Math.floor(random(0, erk));\r\n var y = Math.floor(random(0, bar));\r\n if (matrix[y][x] == 0) {\r\n matrix[y][x] = 5;\r\n t++;\r\n }\r\n }\r\n\r\n\r\n noStroke()\r\n frameRate(60);\r\n createCanvas(matrix[0].length * side, matrix.length * side);\r\n background('#acacac');\r\n\r\n\r\n\r\n for (var i = 0; i < matrix.length; i++) {\r\n for (var j = 0; j < matrix[i].length; j++) {\r\n if (matrix[i][j] == 2) {\r\n var eatgrass = new Eatgrass(j, i, 2);\r\n eatArr.push(eatgrass);\r\n } else if (matrix[i][j] == 1) {\r\n var grass = new Grass(j, i, 1);\r\n xotArr.push(grass);\r\n } else if (matrix[i][j] == 3) {\r\n var gishatich = new Gishatich(j, i, 3);\r\n gishatichArr.push(gishatich);\r\n } else if (matrix[i][j] == 4) {\r\n var pat = new Pat(j, i, 4);\r\n patArr.push(pat);\r\n } else if (matrix[i][j] == 5) {\r\n var mard = new Mard(j, i, 5);\r\n mardArr.push(mard);\r\n }\r\n }\r\n\r\n }\r\n}", "function loop() {\n global.ID = Game.getObjectById\n global.ERR = getErrorName\n\n for (const libraryLoop of libraryModules)\n libraryLoop()\n\n spawnManager.loop()\n\n /* TODO move to creep manager\n for (const creepName in Game.creeps) {\n const creep = Game.creeps[creepName]\n const script = require(`role.${creep.memory.role}`)\n\n script.run(creep)\n }\n */\n\n test()\n}", "function mainLoop() {\n drawAllCells(cells);\n logging();\n \n}", "function setup() {\n createCanvas(windowWidth, 625);\n\n//Allowing sketches to be called\n nose = new Nose();\n for (var i = 0; i < 10; i++) {\n obstacles.push(new Obstacle());\n}\n}", "function __main__()\n{\n\tloop_ctr++;\n\tconsole.log('Update() ...'+loop_ctr);\n\t// Get Data from Analog Ports\n\tb.analogRead('P9_39', function(x){if(x.err == undefined) {D[0][0]= b2c.RND(x.value,3); D[0][1]='';\t} else { D[0][1]=x.err; }});\n\tb.analogRead('P9_40', function(x){if(x.err == undefined) {D[1][0]= b2c.RND(x.value,3); D[1][1]='';\t} else { D[1][1]=x.err; }});\n\tb.analogRead('P9_37', function(x){if(x.err == undefined) {D[2][0]= b2c.RND(x.value,3); D[2][1]='';\t} else { D[2][1]=x.err; }}); \n\tb.analogRead('P9_38', function(x){if(x.err == undefined) {D[3][0]= b2c.RND(x.value,3); D[3][1]='';\t} else { D[3][1]=x.err; }}); \n\tb.analogRead('P9_33', function(x){if(x.err == undefined) {D[4][0]= b2c.RND(x.value,3); D[4][1]='';\t} else { D[4][1]=x.err; }});\n\tb.analogRead('P9_36', function(x){if(x.err == undefined) {D[5][0]= b2c.RND(x.value,3); D[5][1]='';\t} else { D[5][1]=x.err; }});\n\tb.analogRead('P9_35', function(x){if(x.err == undefined) {D[6][0]= b2c.RND(x.value,3); D[6][1]='';\t} else { D[6][1]=x.err; }});\n\tconsole.log('D = '+D);\n\t\n\t// update the channels\n\tgat.SetChannel('an','analog0',D[0][0],b2c.RND((new Date()).valueOf()/1000,0),'');\n\tgat.SetChannel('an','analog1',D[1][0],b2c.RND((new Date()).valueOf()/1000,0),'');\n\tgat.SetChannel('an','analog2',D[2][0],b2c.RND((new Date()).valueOf()/1000,0),'');\n\tgat.SetChannel('an','analog3',D[3][0],b2c.RND((new Date()).valueOf()/1000,0),'');\n\tgat.SetChannel('an','analog4',D[4][0],b2c.RND((new Date()).valueOf()/1000,0),'');\n\tgat.SetChannel('an','analog5',D[5][0],b2c.RND((new Date()).valueOf()/1000,0),'');\n\tgat.SetChannel('an','analog6',D[6][0],b2c.RND((new Date()).valueOf()/1000,0),'');\n\t\n\t// push data to the cloud\n\tgat.publish()\n}", "function mainLoop(){\n\t\tvar sections = splitIntoSections();\n\n\n\n\t}", "function running() {\n // Use these lines to see the video feed\n // const flippedVideo = ml5.flipImage(video);\n // image(flippedVideo, 0, 0, width, height);\n\n // Use this line to just see a black background. More theatrical!\n background(0);\n\n // Check if there currently predictions to display\n if (predictions.length > 0) {\n // If yes, then get the positions of the tip and base of the index finger\n updatePin(predictions[0]);\n\n // Check if the tip of the \"pin\" is touching the bubble\n let d = dist(pin.tip.x, pin.tip.y, bubble.x, bubble.y);\n if (d < bubble.size / 2) {\n // Pop!\n resetBubble();\n }\n // Display the current position of the pin\n displayPin();\n }\n\n // Handle the bubble's movement and display (independent of hand detection\n // so it doesn't need to be inside the predictions check)\n moveBubble();\n checkOutOfBounds();\n displayBubble();\n}", "function setup(){\n createCanvas(550,550);\n side=40;\n row=int(height/side)-1;\n col=int(width/side)-1;\n \n for(i=0;i<row;i++){\n b[i]=[];\n for(j=0;j<col;j++){\n b[i][j]=new boxes(i,j);\n }\n }\n end=endOrginal=b[row-1][col-1];\n last_sec=second();star=60;\n\n curr=b[0][0];\n end.dFromEnd=0;\n start=b[0][0];//starting while going from 1 oint to another\n\n}", "function setup() {\r\n for (var y = 0; y < n; y++) {\r\n matrix[y] = [];\r\n for (var x = 0; x < n; x++) {\r\n var k = random([ 0,0, 0, 3, 2, 2, 2, 0, 0, 0,0,0, 1, 1, 1, 1, 1, 3, 2, 2,1,1,1,1,1,1,1\r\n ]);\r\n matrix[y][x] = k;\r\n }\r\n }\r\n for(var i = 0; i< 20; i++){\r\n var y = Math.floor(random(n));\r\n var x = Math.floor(random(n));\r\n matrix[y][x]=4;\r\n }\r\n \r\n for(var i = 0; i< 5; i++){\r\n var y = Math.floor(random(n));\r\n var x = Math.floor(random(n));\r\n matrix[y][x]=5;\r\n }\r\n\r\n\r\n\r\n\r\n frameRate(10);\r\n createCanvas(matrix[0].length * side, matrix.length * side);\r\n background('#acacac');\r\n //xot\r\n for (var y = 0; y < matrix.length; y++) {\r\n for (var x = 0; x < matrix[y].length; x++) {\r\n if (matrix[y][x] == 1) {\r\n grrasArr.push(new Grass(x, y));\r\n\r\n }\r\n }\r\n\r\n }\r\n\r\n //xotaker\r\n for (var y = 0; y < matrix.length; y++) {\r\n for (var x = 0; x < matrix[y].length; x++) {\r\n if (matrix[y][x] == 2) {\r\n grasseat.push(new Grasseater(x, y));\r\n\r\n }\r\n }\r\n\r\n }\r\n\r\n\r\n for (var y = 0; y < matrix.length; y++) {\r\n for (var x = 0; x < matrix[y].length; x++) {\r\n if (matrix[y][x] == 3) {\r\n meateater.push(new Meateater(x, y));\r\n\r\n }\r\n }\r\n\r\n }\r\n\r\n for (var y = 0; y < matrix.length; y++) {\r\n for (var x = 0; x < matrix[y].length; x++) {\r\n if (matrix[y][x] == 4) {\r\n hunter.push(new Hunter(x, y));\r\n\r\n }\r\n }\r\n\r\n }\r\n for (var y = 0; y < matrix.length; y++) {\r\n for (var x = 0; x < matrix[y].length; x++) {\r\n if (matrix[y][x] == 5) {\r\n mine.push(new Mine(x, y));\r\n\r\n }\r\n }\r\n\r\n }\r\n // for (var y = 0; y < matrix.length; y++) {\r\n // for (var x = 0; x < matrix[y].length; x++) {\r\n // if (matrix[y][x] == 6) {\r\n // mak.push(new Mak(x, y));\r\n\r\n // }\r\n // }\r\n\r\n // }\r\n\r\n\r\n}", "function setup() {\n createCanvas(400, 300);\n\n serial = new p5.SerialPort(); //a new instance of serial port library\n\n //set up events for serial communication\n serial.on('connected', serverConnected);\n serial.on('open', portOpen);\n serial.on('data', serialEvent);\n serial.on('error', serialError);\n\n //open our serial port\n serial.open(portName);\n}", "function setup() {\n serial = new p5.SerialPort(); // new instance of the serial port library\n serial.open(portName); // open a serial port\n serial.on('data', getStatus); // check for uArm Status\n\n uArm();\n}", "function TaskLoop() {\n\t\n}", "function run(){\n initPara();\n\n colors = [0,0,0];\n while(colors.length<21*3){\n colors.push( Math.round( (Math.random()*255 + colors[colors.length-3]) / 2 ) );\n }\n\n let index = modelLoaded.indexOf(modelName);\n if(index === -1) { \n showModel.innerHTML = 'Model loading...';\n createFileFromUrl(modelName, modelName, compute, modelState);\n modelLoaded.push(modelName);\n } else{\n modelLoaded.innerHTML = `${modelName} has been loaded before.`;\n compute();\n };\n}", "function setup() {\n createCanvas(windowWidth, 625);\n\n//Allowing sketches to be called\n nose = new Nose();\n //for (var i = 0; i < 1; i++) {\n obstacles.push(new Obstacle());\n//}\n}", "function setup(){\n\n\tlet canvas = createCanvas(600,600)\n\tcanvas.parent('p5container')\n\n}", "function setup() {\n createCanvas(innerWidth, innerHeight)\n background(30)\n ScaleLoopingSlider = createSlider(5*1, 30*10, 25);\n ScaleLoopingSlider.position(innerWidth/2 - 70, innerHeight/2 + 340);\n}", "function setup() {\n createCanvas(window.innerWidth, window.innerHeight);\n for (let i = 0; i < width / 8; i++) {\n values.push(random(height));\n }\n}", "function setup() {\n\n createCanvas(windowWidth, windowHeight);\n videoGrabber = createCapture(VIDEO);\n videoGrabber.hide();\n\n poseNet = ml5.poseNet(videoGrabber, modelLoaded);\n poseNet.on('pose', gotPoses);\n\n //configuration options for neural network.\n //inputs are the x,y of the 17 body parts, outputs are the 2 possible poses\n //see more here: https://learn.ml5js.org/docs/#/reference/neural-network\n let config = {\n inputs: 34,\n outputs: 2,\n task: \"classification\",\n debug: true\n };\n\n neuralNetwork = ml5.neuralNetwork(config);\n\n let modelFiles = {\n model: 'model/model.json',\n metadata: 'model/model_meta.json',\n weights: 'model/model.weights.bin'\n };\n\n //loads myo own trained data from assets folder\n neuralNetwork.load(modelFiles, posesModelLoaded);\n\n //timer every 1 second for gameplay\n setInterval(decreaseTimer, 1000);\n soundtrack.loop();\n\n}", "update() {\n console.log(\"Abstract loop.\");\n }", "function setup() {\n createCanvas(600, 480);\n //Access user's webcam.\n video = createCapture(VIDEO);\n video.hide();\n\n //load handpose model\n handpose = ml5.handpose(video, { flipHorizontal: true }, function() {\n console.log(`model loaded`);\n });\n\n //Listen for predictions\n handpose.on(`predict`, function(results) {\n console.log(results);\n predictions = results;\n });\n\n //Bubble propreties\n bubble = {\n x: random(width),\n y: height,\n size: 100,\n vx: 0,\n vy: -2\n };\n loadData();\n}" ]
[ "0.73906696", "0.7029275", "0.69783676", "0.6934992", "0.6733713", "0.6447369", "0.6421549", "0.64155376", "0.63992256", "0.637662", "0.63630915", "0.63070947", "0.62747186", "0.6274321", "0.62596905", "0.62596905", "0.6204799", "0.6144313", "0.61204153", "0.6114658", "0.6096101", "0.60920954", "0.6075712", "0.6072955", "0.60586554", "0.6055634", "0.60453176", "0.6044771", "0.6014557", "0.6007939", "0.60021776", "0.5960483", "0.5954945", "0.59429395", "0.5927333", "0.59271556", "0.5926966", "0.5922439", "0.59154665", "0.590786", "0.5907022", "0.59057987", "0.58845633", "0.5880873", "0.5878979", "0.58614343", "0.58577234", "0.58562726", "0.5853267", "0.5850469", "0.58423305", "0.5840423", "0.5835475", "0.5829093", "0.5826283", "0.58252233", "0.58213013", "0.58178085", "0.5803252", "0.5802886", "0.5802682", "0.5802565", "0.57965446", "0.5794926", "0.5788795", "0.57885593", "0.5782423", "0.5777755", "0.5777755", "0.5776889", "0.5771408", "0.5763909", "0.57632077", "0.57609415", "0.5756919", "0.57562786", "0.5755918", "0.57532483", "0.5747827", "0.5747318", "0.5746335", "0.57432574", "0.5736906", "0.5735269", "0.5728627", "0.5721456", "0.57184243", "0.5710594", "0.57099915", "0.5708286", "0.57041615", "0.57038015", "0.57010424", "0.56977594", "0.5691584", "0.5685911", "0.5680602", "0.56640583", "0.5663333", "0.5652059", "0.56469965" ]
0.0
-1
number of concurrent tests running now executes a single test thread
async function _TestThread(test, threadRun) { try { ++ThreadsRunning; console.log(`Starting ${threadRun}. Concurrency level: ${ThreadsRunning}`); await test.run(threadRun); } finally { --ThreadsRunning; console.log(`Finished ${threadRun}. Concurrency level: ${ThreadsRunning}`); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "testMasterToWorkersStress(count) {\n let name = \"testMasterToWorkersStress\";\n let descr = \"master -> workers\";\n let timeout = this.timeout(1000, name);\n\n this.printTest(name, descr);\n\n t(name);\n\n let done = 0;\n for(let i = 0; i < count; i++)\n {\n ((i) => {\n setTimeout(() => {\n this.bridge.to('*').emit(name, null, () => {\n if (++done === count )\n {\n clearTimeout(timeout);\n !timeout._called && this.printResult(name, t(name));\n }\n });\n }, i)\n })(i);\n }\n }", "async function runTests () {\n\tawait countSimpleFamilies()\n\tawait simpleExample()\n\tawait countSimpleFamilies()\n}", "async function test() {\n await testStartup();\n let i = 0;\n while(true) {\n console.log('Start batch number', i);\n // await testBlockAPI();\n await testAbi();\n // await testClassic();\n console.log('Finish batch number', i);\n i++;\n }\n}", "function applyTheTest(server,numOfTest){\r\n console.log(\"Starting the test:\");\r\n console.log(\"-------------------------------\");\r\n\r\n var TIME_PER_TEST = Math.floor(Math.random()*444);\r\n\r\n var runTest = function(counter) {\r\n if (counter >= numOfTest) {\r\n setTimeout(server.stop(function () {\r\n console.log(\"Server was closed successfully\");\r\n console.log(\"-------------------------------\");\r\n if (success === numOfTest) {\r\n console.log(\"Finished running the test. Success: \" + success + \" out\" +\r\n \" of: \" + numOfTest + \" tests\");\r\n }\r\n else {\r\n console.log(\"Finished running the test. Success: \" + success + \" out\" +\r\n \" of: \" + numOfTest + \" tests\");\r\n }\r\n }),2000);\r\n return;\r\n }\r\n oneTestServer(counter);\r\n setTimeout(function() {runTest(counter + 1);},TIME_PER_TEST);\r\n }\r\n runTest(0);\r\n}", "function test() {\n runTests0();\n runTests1(); \n return true;\n}", "function runNext() {\n var test = tests[at++];\n if (test) {\n setTimeout( function() {\n compare(test.func,\n window[test.func],\n window[test.func + \"_backported\"],\n test.driver);\n runNext();\n }, 20);\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}", "run_test() { start_tests(); }", "function getTestsCount (){ return this.testsCount }", "function next_test() {\n if (current_test < test.length) {\n kid = cp.fork(test[current_test++], [], { stdio: \"inherit\" });\n\n kid.on(\"exit\", next_test);\n } else {\n\n ass.report(\"html\", function (err, report) {\n require(\"fs\").writeFileSync(\"./coverage.html\", report);\n });\n }\n}", "function addTests() {\n function getNaClTimeMs() {\n return parseFloat(document.getElementById('NaCl').textContent);\n }\n\n function getRoundTimeMs() {\n return parseFloat(document.getElementById('Round').textContent);\n }\n\n function getTotalTimeMs() {\n return parseFloat(document.getElementById('Total').textContent);\n }\n\n function delayTest(test, delayMs) {\n test.log('Setting delay to ' + delayMs + 'ms');\n document.getElementById('delay').value = delayMs;\n\n test.log('Clicking start.');\n var startEl = document.getElementById('start');\n startEl.dispatchEvent(new CustomEvent('click'));\n\n test.log('Waiting 1 second for test to finish.');\n var intervalId = window.setInterval(function() {\n if (itrCount !== itrMax) {\n test.log('Not finished, waiting another second.');\n return;\n }\n\n window.clearInterval(intervalId);\n test.log('NaCl time: ' + getNaClTimeMs().toFixed(2) + 'ms');\n test.log('Roundtrip time: ' + getRoundTimeMs().toFixed(2) + 'ms');\n test.log('Total time: ' + getTotalTimeMs().toFixed(2) + 'ms');\n test.log('Finished.');\n test.pass();\n }, 1000);\n }\n\n common.tester.addAsyncTest('delay_0', function(test) {\n var delayMs = 0;\n delayTest(test, delayMs);\n });\n\n common.tester.addAsyncTest('delay_3', function(test) {\n var delayMs = 3;\n delayTest(test, delayMs);\n });\n}", "static get concurrency() {\n return 1\n }", "static get concurrency() {\n return 1\n }", "runTests() {\n return __awaiter(this, void 0, void 0, function* () {\n let done = plugins.smartq.defer();\n // print some info\n plugins.beautylog.log(`---------------------------------------------\\n`\n + `-------------------- tapbuffer ----------------------\\n`\n + `-----------------------------------------------------`);\n plugins.beautylog.info(`received ${this.testableFiles.length} modulefile(s) for testing`);\n plugins.beautylog.info(`received ${this.testFiles.length} test files`);\n plugins.beautylog.info(`Coverage will be provided by istanbul`);\n // handle testableFiles\n let testableFilesMessage = {};\n for (let file of this.testableFiles) {\n testableFilesMessage[file.path] = file.contents.toString();\n }\n // handle testFiles\n let testFilesMessage = {};\n for (let file of this.testFiles) {\n testFilesMessage[file.path] = file.contents.toString();\n }\n // prepare injection handoff\n let testableFilesJson = JSON.stringify(testableFilesMessage);\n let testFilesJson = JSON.stringify(testFilesMessage);\n let parentEnv = JSON.stringify(process.env);\n let parentShellPath = (yield plugins.smartshell.execSilent(`echo $PATH`)).stdout;\n parentShellPath = parentShellPath.replace(/\\r?\\n|\\r/g, ''); // remove end of line\n plugins.smartipc.startSpawnWrap(plugins.path.join(__dirname, 'spawnhead.js'), [], {\n 'TESTABLEFILES_JSON': testableFilesJson,\n 'TESTFILES_JSON': testFilesJson,\n 'PARENT_ENV': parentEnv\n });\n let testPromiseArray = [];\n let testCounter = 0;\n for (let testFile of this.testFiles) {\n testCounter++;\n let testThread = new plugins.smartipc.ThreadSimple(testFile.path, [], { silent: true, env: { TESTNUMBER: `${testCounter.toString()}` } });\n let parsedPath = plugins.path.parse(testFile.path);\n console.log('=======');\n plugins.beautylog.log(`-------------- ${parsedPath.name} --------------`);\n console.log('=======');\n let testPromise = testThread.run().then((childProcess) => {\n let done = plugins.smartq.defer();\n childProcess.stdout.pipe(tapMochaReporter('list'));\n childProcess.on('exit', function () {\n done.resolve();\n });\n return done.promise;\n });\n // wait for tests to complete if not running parallel\n if (!this.testConfig.parallel) {\n yield testPromise;\n }\n testPromiseArray.push(testPromise);\n }\n Promise.all(testPromiseArray).then(() => __awaiter(this, void 0, void 0, function* () {\n let Collector = new plugins.istanbul.Collector();\n let Reporter = new plugins.istanbul.Reporter();\n let fileArray = yield plugins.smartfile.fs.fileTreeToObject(process.cwd(), 'coverage/**/coverage-final.json');\n if (this.testConfig.coverage) {\n // remap the output\n let remapArray = [];\n for (let smartfile of fileArray) {\n remapArray.push(smartfile.path);\n }\n let remapCoverage = plugins.remapIstanbul_load(remapArray);\n let remappedCollector = plugins.remapIstanbul_remap(remapCoverage, {\n readFile: (filePath) => {\n let localSmartfile = this.testableFiles.find(itemArg => {\n if (itemArg.path === filePath) {\n return true;\n }\n });\n return localSmartfile.contents.toString();\n }\n });\n let remappedJsonPath = plugins.path.resolve('coverage-final.json');\n yield plugins.remapIstanbul_write(remappedCollector, 'json', remappedJsonPath);\n Collector.add(plugins.smartfile.fs.toObjectSync(remappedJsonPath));\n yield plugins.smartfile.fs.remove(remappedJsonPath);\n Reporter.addAll(['text', 'lcovonly']);\n Reporter.write(Collector, true, () => {\n let lcovInfo = plugins.smartfile.fs.toStringSync(plugins.path.join(process.cwd(), 'coverage/lcov.info'));\n plugins.smartfile.fs.removeSync(plugins.path.join(process.cwd(), 'coverage'));\n done.resolve(lcovInfo);\n });\n }\n })).catch(err => {\n console.log(err);\n });\n return yield done.promise;\n });\n }", "function performAllUnitTests()\n{\n utCount = 0;\n for(var i = 1; i <= 2000; i++)\n {\n var id = \"unit-test-anchor-\" + i;\n var elem = document.getElementById(id);\n if(elem && elem.href)\n {\n utCount += 1;\n setTimeout(elem.href, (utCount * 1000));\n }\n }\n}", "function startBenchmark() {\n while(numberOfRunningInstances != 0){\n workOnTasks();\n setRunningProcessInstances();\n }\n}", "async S50_coreTestRunLoop() {\n\n\t\t// Get the initial start time / timeout time\n\t\t// Note this is resetted in event of system errors\n\t\tlet startTimeMS = Date.now();\n\t\tlet startTimeoutTimeMS = startTimeMS + this.startTimeout*this.startTimeout_ms;\n\n\t\t// save the start time\n\t\tthis._startTimeMS = startTimeMS;\n\n\t\t// The final test result status\n\t\tlet finalTestStatus = null;\n\n\t\t// The actual testID\n\t\tlet testID = null;\n\n\t\t// Max startRetries - this is acrossed ALL test starts\n\t\t// including system_error resets.\n\t\t//\n\t\t// This is approximately 2 hours \n\t\t// excluding any test run time\n\t\tlet maxTestStarts = 130;\n\n\t\t// Successful test start\n\t\tlet successfulTestStarts = 0;\n\n\t\t// Prepare testScript ZIP (if being used)\n\t\tif( this.testCodeDir ) {\n\t\t\tOutputHandler.standardGreen(`> Preparing test script files for upload ... `);\n\t\t\tawait this.validateScriptPath();\n\t\t\tthis.testCodeDir_zipFile = await this.testCodeDir_zipPromise;\n\t\t\tOutputHandler.standardGreen(`> Preparing test script files for upload ... Ready `);\n\t\t\tOutputHandler.standardGreen(`> `);\n\t\t}\n\n\t\t// ------------------------------\n\t\t// Lets start the core loop !!!\n\t\t// ------------------------------\n\t\tfor(let t=0; t<maxTestStarts; ++t) {\n\t\t\t\n\t\t\t// Check for test start timeout\n\t\t\t// if reached - performs a hard exit\n\t\t\tif( t > 0 && Date.now() >= startTimeoutTimeMS ) {\n\t\t\t\tOutputHandler.fatalError(`Failed to start test - Exceeded Start Timeout : ${startTimeout} minutes`, null, 18);\n\t\t\t\tprocess.exit(18);\n\t\t\t}\n\n\t\t\t// Check for too many test starts\n\t\t\t// abort accordingly\n\t\t\tif( successfulTestStarts > 5 ) {\n\t\t\t\tOutputHandler.fatalError(`Aborting - ${successfulTestStarts} tests were executed with system errors, please contact uilicious support`, null, 18);\n\t\t\t\tprocess.exit(18);\n\t\t\t}\n\n\t\t\t// Lets try to start, and get the test ID\n\t\t\ttestID = await this.attemptTestRunStart();\n\n\t\t\t// Great test started? - lets process it\n\t\t\t//---------------------------------------------------------------\n\t\t\tif( testID != null ) {\n\t\t\t\t// Increment the valid starts\n\t\t\t\t++successfulTestStarts;\n\n\t\t\t\t// Assume the test start time, and handle its loop timeout\n\t\t\t\tlet testRunStartTimeMS = Date.now()\n\t\t\t\tlet testRunTimeoutMS = testRunStartTimeMS + (60+5) * 60 * 1000;\n\n\t\t\t\t// Ouput the testRunID header (if needed)\n\t\t\t\tOutputHandler.standardGreen([\n\t\t\t\t\t`> Test Run ID: ${testID}`,\n\t\t\t\t].join(\"\\n\"))\n\t\t\t\tOutputHandler.standardGreen(\"----------------------------------------\")\n\n\t\t\t\t// lets poll for its result\n\t\t\t\twhile( Date.now() < testRunTimeoutMS ) {\n\t\t\t\t\t// Get the status (if possible)\n\t\t\t\t\tfinalTestStatus = await this.fetchAndOutputTestRunStatus();\n\t\n\t\t\t\t\t// If status is system error - break and retry\n\t\t\t\t\tif( finalTestStatus == \"system_error\" ) {\n\n\t\t\t\t\t\t// Check if SYSTEM_ERROR retries are disabled\n\t\t\t\t\t\t// if so performs a hard abort\n\t\t\t\t\t\tif( this.disableSystemErrorRetry ) {\n\t\t\t\t\t\t\tOutputHandler.fatalError(`Aborting - ${successfulTestStarts} tests were executed with system errors, with --disableSystemErrorRetry`, null, 18);\n\t\t\t\t\t\t\tprocess.exit(18);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Handle the SYSTEM_ERROR, and restarts\n\t\t\t\t\t\tOutputHandler.standard(\"> ----------------------------------------------------------------\")\n\t\t\t\t\t\tOutputHandler.standard(`> !!! Test faced a SYSTEM_ERROR`)\n\t\t\t\t\t\tOutputHandler.standard(`> CLI will restart and retry the test automatically`)\n\t\t\t\t\t\tOutputHandler.standard(\"> ----------------------------------------------------------------\")\n\t\t\t\t\t\tthis.startTimeoutLoggedFlag = false;\n\n\t\t\t\t\t\t// Break the result fetch polling\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\t// If status is anything else - lets end the test accordingly\n\t\t\t\t\t// Break on valid status\n\t\t\t\t\tif( finalTestStatus != null ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Was there a finalTestStatus - lets return it\n\t\t\t//---------------------------------------------------------------\n\t\t\tif( finalTestStatus != null ) {\n\t\t\t\tthis.finalTestStatus = finalTestStatus;\n\t\t\t\treturn finalTestStatus;\n\t\t\t}\n\n\t\t\t// Aww snap - either test failed to start, or a system error occured\n\t\t\t// we need to loop with a slight delay\n\t\t\t//---------------------------------------------------------------\n\n\t\t\t// Does a minimum of 10 seconds wait\n\t\t\t// To a maximum of 60 seconds + 100 ms jitter wait\n\t\t\tawait sleep(\n\t\t\t\t(Math.min(t, 6))*10*1000 + Math.random()*100\n\t\t\t)\n\t\t}\n\t}", "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}", "static get concurrency () {\n return 1\n }", "static get concurrency () {\n return 1\n }", "static get concurrency () {\r\n return 1\r\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() {\n waitForExplicitFinish();\n\n getParentProcessActors(testTarget);\n}", "async localTaskLoop() {\n while ( true ) { // eslint-disable-line no-constant-condition\n try {\n if ( this.snapshots.length === 0 ) {\n await sleep( 1000 );\n continue;\n }\n\n // Pick from one of the first two snapshots\n let availableTests = this.snapshots[ 0 ].getAvailableLocalTests();\n if ( this.snapshots.length > 1 ) {\n availableTests = availableTests.concat( this.snapshots[ 1 ].getAvailableLocalTests() );\n }\n\n if ( !availableTests.length ) {\n await sleep( 1000 );\n continue;\n }\n\n const test = this.weightedSampleTest( availableTests );\n const snapshot = test.snapshot;\n const startTimestamp = Date.now();\n\n if ( test.type === 'lint' ) {\n test.complete = true;\n try {\n const output = await execute( gruntCommand, [ 'lint' ], `${snapshot.directory}/${test.repo}` );\n\n ContinuousServer.testPass( test, Date.now() - startTimestamp, output );\n }\n catch( e ) {\n ContinuousServer.testFail( test, Date.now() - startTimestamp, `Lint failed with status code ${e.code}:\\n${e.stdout}\\n${e.stderr}`.trim() );\n }\n }\n else if ( test.type === 'lint-everything' ) {\n test.complete = true;\n try {\n const output = await execute( gruntCommand, [ 'lint-everything', '--hide-progress-bar' ], `${snapshot.directory}/perennial` );\n\n ContinuousServer.testPass( test, Date.now() - startTimestamp, output );\n }\n catch( e ) {\n ContinuousServer.testFail( test, Date.now() - startTimestamp, `Lint-everything failed with status code ${e.code}:\\n${e.stdout}\\n${e.stderr}`.trim() );\n }\n }\n else if ( test.type === 'build' ) {\n test.complete = true;\n try {\n const output = await execute( gruntCommand, [ `--brands=${test.brands.join( ',' )}`, '--lint=false' ], `${snapshot.directory}/${test.repo}` );\n\n ContinuousServer.testPass( test, Date.now() - startTimestamp, output );\n test.success = true;\n }\n catch( e ) {\n ContinuousServer.testFail( test, Date.now() - startTimestamp, `Build failed with status code ${e.code}:\\n${e.stdout}\\n${e.stderr}`.trim() );\n }\n }\n else {\n // uhhh, don't know what happened? Don't loop here without sleeping\n await sleep( 1000 );\n }\n }\n catch( e ) {\n this.setError( `local error: ${e}` );\n }\n }\n }", "function runTest(){\n var test = testCollection.shift();\n currentTest = test;\n if(!test){\n testResults.isPassed = true;\n endTest();\n return;\n }\n //reset tmpTimeout for every run.\n tmpTimeout = 0;\n testUtil.done = function(){\n test.end = new Date();\n if(timeoutHandle !== null){\n clearTimeout(timeoutHandle);\n }\n if(test.tearDown) test.tearDown();\n console.log(util.format(\"Test %s finished - run time: %d\\n\", test.name, test.end-test.start));\n runTest();\n };\n try{\n testResults.runTests++;\n timeoutHandle = setTimeout(timeoutError, testTimeout);\n test.start = new Date();\n console.log(util.format(\"\\nTest %s started\", test.name));\n if(test.setUp) test.setUp();\n log.debug(\"before calling test handler\");\n test.handler(testUtil);\n log.debug(\"after calling test handler\");\n }\n catch(e){\n //handle skip test;\n handleError(e);\n }\n}", "async run() {\n if (this.startDelay) {\n await this.pause(this.startDelay);\n }\n \n const start = new Date();\n console.log(`Cavy test suite started at ${start}.`);\n\n for (let i = 0; i < this.testCases.length; i++) {\n let {description, f} = this.testCases[i];\n try {\n await f.call(this);\n console.log(`${description} ✅`);\n } catch (e) {\n console.warn(`${description} ❌\\n ${e.message}`);\n }\n await this.component.clearAsync();\n this.component.reRender();\n }\n\n const stop = new Date();\n const duration = (stop - start) / 1000;\n console.log(`Cavy test suite stopped at ${stop}, duration: ${duration} seconds.`);\n }", "async function _TestAttempt(Test, attemptId) {\n\n const attemptRun = new TestRun(TestsStarted);\n attemptRun.setAttempt(attemptId, Config.Retries);\n\n const test = new Test();\n await test.startup();\n\n try {\n let threads = [];\n\n if (Config.ConcurrencyLevel > 1)\n console.log(`Starting ${Config.ConcurrencyLevel} test threads`);\n\n for (let threadId = 1; threadId <= Config.ConcurrencyLevel; ++threadId) {\n const threadRun = attemptRun.clone();\n threadRun.setThread(threadId, Config.ConcurrencyLevel);\n threads.push(_TestThread(test, threadRun));\n }\n\n if (Config.ConcurrencyLevel > 1)\n console.log(`Started all ${Config.ConcurrencyLevel} test threads.`);\n\n await Promise.all(threads);\n\n if (Config.ConcurrencyLevel > 1)\n console.log(`Finished all ${Config.ConcurrencyLevel} test threads.`);\n } finally {\n console.log(`Shutting down DUT`);\n await test.shutdown();\n }\n}", "sendActiveThreadCountRes() {\n \n }", "testMasterToWorkers() {\n let name = \"testMasterToWorkers\";\n let descr = \"master -> workers\";\n let timeout = this.timeout(1000, name);\n\n this.printTest(name, descr);\n\n t(name);\n this.bridge.to('*').emit(name, null, () => {\n clearTimeout(timeout);\n !timeout._called && this.printResult(name, t(name));\n });\n }", "function test6() {\n\tcpuThing();\n\tcpuThing();\n\tcpuThing();\n}", "async function runTests() {\n numTestsPassed = 0;\n for (let i = 0; i < testFunctions.length; i++) {\n let message = \"\";\n try {\n const testResult = await testFunctions[i]();\n if (testResult) {\n numTestsPassed++;\n message = `Test ${i+1} passed`;\n } else {\n message = `Test ${i+1} failed`;\n }\n } catch(error) {\n message = `Test ${i+1} failed with exception:\\n${error}`;\n }\n console.log(message);\n }\n const fractionOfTestsPassed = `${numTestsPassed}/${testFunctions.length} tests passed`;\n const equals = '='.repeat(fractionOfTestsPassed.length);\n console.log('\\n' + equals + '\\n' + fractionOfTestsPassed + '\\n' + equals + '\\n');\n\n return numTestsPassed == testFunctions.length\n}", "runWorkers () {\n }", "initThreads() {\n let initThreads = [];\n initThreads.push(this.createThread(\"run\", \"init\"));\n return initThreads;\n }", "static getDefaultConcurrency() {\n return 2;\n }", "function startClients() {\n for (var i = 0; i < options.concurrency; i++) {\n\n makeRequest();\n\n }\n }", "function testFunctions()\n{\n let _count = 100;\n const _getFn = () =>\n {\n const _n = _count++;\n return (cb) => setTimeout(\n () => cb(null, _n),\n Math.random() * 50\n );\n };\n jfSync(\n [\n _getFn(),\n _getFn(),\n _getFn(),\n _getFn(),\n _getFn()\n ],\n (error, data) => checkData([100, 101, 102, 103, 104])\n );\n}", "afterCount(result, params) {\n console.log(\"Hereeeeeeeeeee 10\");\n }", "async runTest() {}", "function StartMultiGameTest(){\n\tdescribe(\"Multi-Game Test\", function(){\n\t\tvar timesSpun = 0;\n\t\t\n\t\t// Spin until we run out of spins\n\t\tit (\"Should be able to run a full game without errors\", function(done)\n\t\t{\n\t\t\t// Timeout after 0.5 seconds\n\t\t\tthis.timeout(20000000000);\n\t\t\t\n\t\t\t//For outputting to a file\n\t\t\tvar writableStream;\n\t\t\tsetupWriteableStream();\n\t\t\t\n\t\t\tOutputSingleGameDataHeaders();\n\t\t\t\n\t\t\t//Game Variables\n\t\t\tvar games = 0;\n\t\t\tvar gameStartTime = 0;\n\t\t\tvar gameLength = 0;\n\t\t\t\n\t\t\t//Bonus game variables\n\t\t\tvar bonusGamesHitPerGame = 0;\n\t\t\tvar isBonusGameOn = false;\n\t\t\tvar bonusGameWins = [];\n\t\t\t\n\t\t\t//Payline win variables\n\t\t\tvar paylineWins = [];\n\t\t\tvar totalPaylines = 0;\n\t\t\tvar totalWildPaylines = 0;\n\t\t\tvar bigWins = 0;\n\t\t\tvar megaWins = 0;\n\t\t\tvar epicWins = 0;\n\t\t\t\n\t\t\t//Total Spin Variables\n\t\t\tvar totalBaseSpins = 0;\n\t\t\tvar totalFreeSpins = 0;\n\t\t\tvar totalBonusSpins = 0;\n\t\t\tvar totalScatterSpins = 0;\n\t\t\t\n\t\t\twhile(games < process.env.npm_config_spins)\n\t\t\t{\n\t\t\t\tvar spinData = null;\n\t\t\t\tvar spinState = game.createState(totalSpins, totalSeconds);\n\t\t\t\tbonusGamesHitPerGame = 0;\n\t\t\t\tgameStartTime = new Date().getTime();\n\t\t\t\tbonusGameWins = [];\n\t\t\t\t\n\t\t\t\twhile (spinState.spinsLeft > 0)\n\t\t\t\t{\n\t\t\t\t\tspinData = game.spin(spinState);\n\t\t\t\t\tspinState = spinData.state;\n\t\t\t\t\t\n\t\t\t\t\t//if(spinState.fsTrigger)\n\t\t\t\t\t\t//console.log(\"Free Triggered: \" + JSON.stringify(spinData) + \"\\n\");\n\t\t\t\t\t//else if(spinState.fsOn)\n\t\t\t\t\t\t//console.log(\"Free Spin: \" + JSON.stringify(spinState) + \"\\n\");\n\t\t\t\t\t//if(spinState.bonusInfo)\n\t\t\t\t\t\t//console.log(\"Bonus Info: \" + JSON.stringify(spinState) + \"\\n\");\n\t\t\t\t\t//if(spinState.scatterBonus)\n\t\t\t\t\t//{\n\t\t\t\t\t\t//console.log(\"\\nBonus Info: \" + JSON.stringify(spinState.scatterBonus));\n\t\t\t\t\t\t//if(spinState.scatterBonus[0].type == \"Wilds\")\n\t\t\t\t\t\t\t//console.log(\"\\Scatter Info: \" + JSON.stringify(spinState.scatterBonus));\n\t\t\t\t\t\t//console.log(\"Scatter Count: \" + JSON.stringify(spinState.scatterBonus.length));\n\t\t\t\t\t\t//console.log(\"Spin Window: \" + JSON.stringify(spinData.spin.window) + \"\\n\");\n\t\t\t\t\t//}\n\t\t\t\t\t//if(spinState.pickBonus)\n\t\t\t\t\t\t//console.log(\"Bonus Info: \" + JSON.stringify(spinState.pickBonus) + \"\\n\");\n\t\t\t\t\t//if(spinState.freeMoney)\n\t\t\t\t\t\t//if(spinState.freeMoney.win > 3000000)\n\t\t\t\t\t\t\t//console.log(\"Free Money: \" + JSON.stringify(spinState) + \"\\n\");\n\t\t\t\t\t//if(spinState.wheelBonus)\n\t\t\t\t\t\t//if(spinState.wheelBonus.win > 3000000)\n\t\t\t\t\t\t//console.log(\"WheelBonus: \" + JSON.stringify(spinState) + \"\\n\");\n\t\t\t\t\t//if(spinState.firehouseBonus != null)\n\t\t\t\t\t\t//console.log(\"Fire House Bonus: \" + JSON.stringify(spinState.firehouseBonus));\n\t\t\t\t\t\n\t\t\t\t\tif(isBothFreeSpinAndOtherBonus)\n\t\t\t\t\t{\n\t\t\t\t\t\tCountBothFreeSpinAndOtherBonusGames(spinData);\n\t\t\t\t\t}\n\t\t\t\t\telse if(isFreeSpinGame)\n\t\t\t\t\t\tCountFreeSpinsFunction(spinState);\n\t\t\t\t\telse\n\t\t\t\t\t\tCountBonusGames(spinData);\n\t\t\t\t\t\n\t\t\t\t\tCountPayLineWins(spinData.spin);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//console.log(\"Spin State: \" + JSON.stringify(spinState) + \"\\n\");\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tloadGameData();\n\t\t\t\t\tvar newState = game.createState(spinData.state.spinsTotal, spinData.state.secsTotal);\n\t\t\t\t\tspinState.secsLeft = spinState.secsLeft;\n\t\t\t\t\tspinState.spinsLeft = spinState.spinsLeft;\n\t\t\t\t\tspinState.winTotal = spinState.winTotal\n\t\t\t\t\t\n\t\t\t\t\t//Free Spin Vars\n\t\t\t\t\tspinState.fsOn = spinState.fsOn;\n\t\t\t\t\tspinState.fsSpinsLeft = parseInt(spinState.fsSpinsLeft);\n\t\t\t\t\tspinState.fsWinTotal = parseInt(spinState.fsWinTotal);\n\t\t\t\t\tspinState.fsMxTotal = parseInt(spinState.fsMxTotal);\n\t\t\t\t\tspinState.fsWinTotal = parseInt(spinState.fsWinTotal);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tOutputSingleGameData(spinData);\n\t\t\t\t//console.log(\"\\n\");\n\t\t\t\t//console.log(otherGameOutput);\n\t\t\t\tgames++;\n\t\t\t}\n\t\t\t\n\t\t\tOutputAllGameData();\n\t\t\t\n\t\t\twritableStream.end();\n\t\t\t\n\t\t\tdone();\n\t\t\t\n\t\t\tsetTimeout(function(){ process.exit(0); }, 1000);\n\t\t\t//Functions used for analysis\n\t\t\t\n\t\t\tfunction loadGameData()\n\t\t\t{\n\t\t\t\tif(gameName == \"fatcat7\")\n\t\t\t\t{\n\t\t\t\t\tgame = new FatCat7Game();\n\t\t\t\t\tisFreeSpinGame = true;\n\t\t\t\t}\n\t\t\t\telse if(gameName == \"bounty\")\n\t\t\t\t{\n\t\t\t\t\tgame = new BountyGame();\n\t\t\t\t\tisFreeSpinGame = true;\n\t\t\t\t}\n\t\t\t\telse if(gameName == \"gummibar\")\n\t\t\t\t{\n\t\t\t\t\tgame = new GummiBarGame();\n\t\t\t\t\tisFreeSpinGame = false;\n\t\t\t\t}\n\t\t\t\telse if(gameName == \"aprilmadness\")\n\t\t\t\t{\n\t\t\t\t\tgame = new AprilMadnessGame();\n\t\t\t\t\tisFreeSpinGame = true;\n\t\t\t\t}\n\t\t\t\telse if(gameName == \"moneybooth\")\n\t\t\t\t{\n\t\t\t\t\tgame = new MoneyBoothGame();\n\t\t\t\t\tisFreeSpinGame = false;\n\t\t\t\t}\n\t\t\t\telse if(gameName == \"astrologyanswers\")\n\t\t\t\t{\n\t\t\t\t\tgame = new AstrologyAnswersGame();\n\t\t\t\t\tisFreeSpinGame = false;\n\t\t\t\t\tisBothFreeSpinAndOtherBonus = true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tgame.importGame(xmlData);\n\t\t\t}\n\t\t\t\n\t\t\tfunction OutputSingleGameDataHeaders()\n\t\t\t{\n\t\t\t\tvar maxBonusSpins = parseInt(xmlData.maxBonusGamesHits[0]);\n\t\t\t\t\n\t\t\t\tvar csvHeader = \"Game,Bonus Game Hits,Win Total,Game Length\";\n\t\t\t\t\n\t\t\t\tfor(var i = 0; i < maxBonusSpins; i++)\n\t\t\t\t{\n\t\t\t\t\tcsvHeader += \", Bonus Game Score\" + (i+1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tconsole.log(csvHeader);\n\t\t\t\twritableStream.write(csvHeader + \" \\n\");\n\t\t\t}\n\t\t\t\n\t\t\tfunction OutputSingleGameData(spinData)\n\t\t\t{\n\t\t\t\tvar maxBonusSpins = parseInt(xmlData.maxBonusGamesHits[0]);\n\t\t\t\t\n\t\t\t\tgameLength = new Date().getTime() - gameStartTime;\n\t\t\t\tvar gameOutput = games + \",\" + bonusGamesHitPerGame + \",\" + spinData.state.winTotal + \",\" + gameLength;\n\t\t\t\tvar otherGameOutput = \"Game \" + games + \": Bonus Games Hit: \" + bonusGamesHitPerGame + \" Win Total: \" + spinData.state.winTotal + \" Game Length: \" + gameLength;\n\t\t\t\tfor(var i = 0; i < maxBonusSpins; i++)\n\t\t\t\t{\n\t\t\t\t\tif(bonusGameWins[i] != undefined)\n\t\t\t\t\t{\n\t\t\t\t\t\tgameOutput += \",\" + bonusGameWins[i];\n\t\t\t\t\t\totherGameOutput += \" Bonus Game \" + (i+1) + \": \" + bonusGameWins[i];\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tgameOutput += \",\" + \"0\";\n\t\t\t\t\t\totherGameOutput += \" Bonus Game \" + (i+1) + \": 0\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tconsole.log(gameOutput);\n\t\t\t\twritableStream.write(gameOutput + \"\\n\");\n\t\t\t}\n\t\t\t\n\t\t\tfunction CountFreeSpinsFunction (spinState)//This checks for a free spin trigger. This counter will only work for free spin games\n\t\t\t{\n\t\t\t\tif(spinState.fsOn == true)\n\t\t\t\t{\n\t\t\t\t\tif(spinState.fsTrigger != null)//Detecting the hit of a bonus\n\t\t\t\t\t{\n\t\t\t\t\t\tbonusGamesHitPerGame++;\n\t\t\t\t\t\ttotalBonusSpins++;\n\t\t\t\t\t\ttotalBaseSpins++;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ttotalFreeSpins++;\n\n\t\t\t\t\tif(spinState.fsSpinsLeft == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t//console.log(\"Spin Free: \" + JSON.stringify(spinState));\n\t\t\t\t\t\tbonusGameWins[bonusGamesHitPerGame-1] = spinState.fsWinTotal;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\ttotalBaseSpins++;\n\t\t\t};\n\t\t\t\n\t\t\tfunction CountBothFreeSpinAndOtherBonusGames(spinData)\n\t\t\t{\n\t\t\t\tspinsState = spinData.state;\n\t\t\t\tCountFreeSpinsFunction(spinsState);\n\t\t\t\t\n\t\t\t\tif(spinState.wheelBonus != null)//Astrology Answers\n\t\t\t\t{\n\t\t\t\t\tbonusGamesHitPerGame++;\n\t\t\t\t\ttotalBonusSpins++;\n\t\t\t\t\t//console.log(\"Wheel Bonus: \" + JSON.stringify(spinState.wheelBonus));\n\t\t\t\t\tbonusGameWins[bonusGamesHitPerGame-1] = spinState.wheelBonus.win;\n\t\t\t\t}\n\t\t\t\telse if(spinState.freeMoney != null)//Astrology Answers\n\t\t\t\t{\n\t\t\t\t\tbonusGamesHitPerGame++;\n\t\t\t\t\ttotalBonusSpins++;\n\t\t\t\t\t//console.log(\"Free Money Bonus: \" + JSON.stringify(spinState.freeMoney));\n\t\t\t\t\tbonusGameWins[bonusGamesHitPerGame-1] = spinState.freeMoney.win;\n\t\t\t\t}\n\t\t\t};\n\t\t\t\n\t\t\tfunction CountPayLineWins(spin)\n\t\t\t{\n\t\t\t\tif(spin.wins.results)\n\t\t\t\t{\n\t\t\t\t\ttotalPaylines += spin.wins.results.length;\n\t\t\t\t\t\n\t\t\t\t\tfor(var i = 0; i < spin.wins.results.length; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(paylineWins[spin.wins.results[i].symbol] == null || \n\t\t\t\t\t\t\tpaylineWins[spin.wins.results[i].symbol] == undefined)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpaylineWins[spin.wins.results[i].symbol] = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tpaylineWins[spin.wins.results[i].symbol]++;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(spin.wins.results[i].wilds > 0)\n\t\t\t\t\t\t\ttotalWildPaylines++;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(spin.wins.results[i].symbol == \"S\" || spin.wins.results[i].symbol == \"S2\" || spin.wins.results[i].symbol == \"S3\" || spin.wins.results[i].symbol == \"S4\")\n\t\t\t\t\t\t\ttotalScatterSpins++;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(spin.wins.pay >= 1500000)//Epic win\n\t\t\t\t\t\tepicWins++;\n\t\t\t\t\telse if(spin.wins.pay >= 1000000)\n\t\t\t\t\t\tmegaWins++;\n\t\t\t\t\telse if(spin.wins.pay >= 500000)\n\t\t\t\t\t\tbigWins++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfunction OutputAllGameData()\n\t\t\t{\n//\t\t\t\tvar symbols = [\"P1\",\"P2\",\"P3\",\"P4\",\"P5\",\"P6\",\"P7\",\"P8\",\"P9\",\"P10\",\"B\",\"BB\",\"S\",\"S2\",\"S3\",\"S4\",\"S5\"];\n//\t\t\t\tvar sym = \"\";\n//\t\t\t\t\n//\t\t\t\tfor(var ghj = 0; ghj < symbols.length; ghj++)\n//\t\t\t\t{\n//\t\t\t\t\tsym = symbols[ghj];\n//\t\t\t\t\tif(paylineWins[sym] == null || paylineWins[sym] == undefined)\n//\t\t\t\t\t\tconsole.log(sym + \": 0 (0%)\");\n//\t\t\t\t\telse\n//\t\t\t\t\t\tconsole.log(sym + \": \" + paylineWins[sym] + \"(\" + calcPerc(paylineWins[sym], totalPaylines) + \"%)\");\n//\t\t\t\t}\n\t\t\t\t\n\t\t\t\tconsole.log(\"Total Base Spins,\" + totalBaseSpins);\n\t\t\t\tconsole.log(\"Total Free Spins,\" + totalFreeSpins);\n\t\t\t\tconsole.log(\"Total Bonus Spins,\" + totalBonusSpins);\n\t\t\t\tconsole.log(\"Total Scatter Spins,\" + totalScatterSpins);\n\t\t\t\t\n\t\t\t\tconsole.log(\"Total Paylines,\" + totalPaylines);\n\t\t\t\tconsole.log(\"Total Wild Paylines,\" + totalWildPaylines);\n\t\t\t\t\n\t\t\t\tconsole.log(\"Epic wins,\" + epicWins);\n\t\t\t\tconsole.log(\"Mega wins,\" + megaWins);\n\t\t\t\tconsole.log(\"Big wins,\" + bigWins);\n\t\t\t\tconsole.log(\"DONE!\");\n\t\t\t\t\n\t\t\t\twritableStream.write(\"Total Base Spins,\" + totalBaseSpins + \"\\n\");\n\t\t\t\twritableStream.write(\"Total Free Spins,\" + totalFreeSpins + \"\\n\");\n\t\t\t\twritableStream.write(\"Total Bonus Spins,\" + totalBonusSpins + \"\\n\");\n\t\t\t\twritableStream.write(\"Total Scatter Spins,\" + totalScatterSpins + \"\\n\");\n\t\t\t\twritableStream.write(\"Total Paylines,\" + totalPaylines + \"\\n\");\n\t\t\t\twritableStream.write(\"Total Wild Paylines,\" + totalWildPaylines + \"\\n\");\n\t\t\t\twritableStream.write(\"Epic wins,\" + epicWins + \"\\n\");\n\t\t\t\twritableStream.write(\"Mega wins,\" + megaWins + \"\\n\");\n\t\t\t\twritableStream.write(\"Big wins,\" + bigWins + \"\\n\");\n\t\t\t\twritableStream.write(\"DONE!\");\n\t\t\t}\n\t\t\t\n\t\t\tfunction calcPerc(got, total)\n\t\t\t{\n\t\t\t\tvar percent = (got / total) * 100;\n\t\t\t\tpercent = percent.toFixed(2);\n\t\t\t\treturn percent;\n\t\t\t}\n\t\t\t\n\t\t\tfunction setupWriteableStream()\n\t\t\t{\n\t\t\t\twritableStream = fs.createWriteStream(\"./testOutputFile.txt\");\n\t\t\t\twritableStream.on(\"error\", function(err) {\n\t\t\t\tconsole.log(\"ERROR\");\n\t\t\t\t//done(err);\n\t\t\t\t});\n\t\t\t\twritableStream.on(\"close\", function(ex) {\n\t\t\t\t\tconsole.log(\"CLOSED\");\n\t\t\t\t\t//done();\n\t\t\t\t});\n\t\t\t\twritableStream.on(\"finish\", function(ex) {\n\t\t\t\t\tconsole.log(\"ENDED\");\n\t\t\t\t\t//done();\n\t\t\t\t});\n\t\t\t\twritableStream.on(\"open\", function(fd) {\n\t\t\t\t\tconsole.log(\"OPENED:\"+fd);\n\t\t\t\t});\n\t\t\t}\n\t\t\t\n\t\t\t//Functions for gummibar\n\t\t\tfunction CountBonusGames(spinData)\n\t\t\t{\n\t\t\t\tspinsState = spinData.state;\n\t\t\t\t//console.log(\"Main Bonus Info: \" + JSON.stringify(spinState));\n\t\t\t\tif(spinState.MainBonusInfo)//Gummibar\n\t\t\t\t{\n\t\t\t\t\t//console.log(\"SPinState: \" + JSON.stringify(spinState));\n\t\t\t\t\tbonusGamesHitPerGame++;\n\t\t\t\t\ttotalBonusSpins++;\n\t\t\t\t\t\n\t\t\t\t\tbonusGameWins[bonusGamesHitPerGame-1] = spinState.MainBonusInfo.win;\n\t\t\t\t}\n\t\t\t\telse if(spinState.bonusInfo)//MoneyBooth\n\t\t\t\t{\n\t\t\t\t\tbonusGamesHitPerGame++;\n\t\t\t\t\ttotalBonusSpins++;\n\n\t\t\t\t\tbonusGameWins[bonusGamesHitPerGame-1] = spinState.bonusInfo.total;\n\t\t\t\t}\n\t\t\t\telse if(spinState.pickBonus)//Bankroll bandits / Monkey Madness\n\t\t\t\t{\n\t\t\t\t\tbonusGamesHitPerGame++;\n\t\t\t\t\ttotalBonusSpins++;\n\n\t\t\t\t\tbonusGameWins[bonusGamesHitPerGame-1] = spinState.pickBonus.total;\n\t\t\t\t}\n\t\t\t\ttotalBaseSpins++;\n\t\t\t};\n\t\t});\n\t});\n}", "function startIncrementRunIdThread() {\n const latch = new CountDownLatch(1);\n let thread = new Thread(function(connStr, dbName, latch) {\n jsTest.log(\"Sending update\");\n\n const client = new Mongo(connStr);\n const db = client.getDB(dbName);\n latch.countDown();\n assert.commandWorked(db.runCommand({\n update: \"c\",\n updates: [{q: {_id: 'block_test'}, u: {$inc: {run_id: 1}}}],\n }));\n\n jsTest.log(\"Successfully applied update\");\n }, conn.name, kDbName, latch);\n thread.start();\n latch.await();\n return thread;\n}", "forkWorkers() {\n for (var i = 0; i < this.numWorkers; i++) {\n this.requestNewWorker()\n }\n }", "run() {\n if (this.currentRun) {\n throw new Error(\"Can't start a test run if one is already in progress!\");\n }\n const startTime = Date.now();\n this.currentRun = this.runNextTestQueue().then(() => {\n const results = this.runResults;\n results.elapsedTimeMs = Date.now() - startTime;\n this.currentRun = null;\n this.resetRunResults();\n return results;\n }).catch((e) => {\n this.currentRun = null;\n throw e;\n });\n return this.currentRun;\n }", "function multiThread () {\n console.log('!!!! start test worker !!!!')\n // var worker = new Worker('/worker.js') // eslint-disable-line no-undef\n setTimeout(() => {\n sendQueryToWorker('querymsg').then((resp) => {\n console.log('bg main receive')\n console.log(resp)\n })\n }, 20000)\n}", "function runTestRAF() {\n // How long in ms we want each trial to take\n // Must be much greater than 16 (16ms is the v-sync rate)\n const GOAL_TIME = 200;\n\n function runTrial(numRuns) {\n if (currentTest.preRun) currentTest.preRun();\n let startTime = PerfTestRunner.now();\n for (var i = 0; i < numRuns; i++) {\n currentTest.doRun();\n }\n requestAnimationFrame(() => {\n let elapsedTime = PerfTestRunner.now() - startTime;\n let runsPerSecond = numRuns * 1000 / elapsedTime;\n PerfTestRunner.measureValueAsync(runsPerSecond);\n if (!isTestDone) runTrial(numRuns, startTime);\n });\n if (currentTest.ensureComplete) currentTest.ensureComplete();\n if (currentTest.postRun) currentTest.postRun();\n }\n\n // Figure out how many times currentTest.doRun() + RAF will be required\n // to last GOAL_TIME\n function calculateNumberOfRuns(resolve, numRuns) {\n numRuns = numRuns || 1;\n if (currentTest.preRun) currentTest.preRun();\n const startTime = PerfTestRunner.now();\n\n for (var i = 0; i < numRuns; i++) {\n currentTest.doRun();\n }\n\n requestAnimationFrame(() => {\n let elapsedTime = PerfTestRunner.now() - startTime;\n if (elapsedTime >= GOAL_TIME) {\n const timePerRun = elapsedTime / numRuns;\n const numRunsFinal = Math.round(GOAL_TIME / timePerRun);\n if (currentTest.ensureComplete) currentTest.ensureComplete();\n if (currentTest.postRun) currentTest.postRun();\n resolve(numRunsFinal);\n } else {\n calculateNumberOfRuns(resolve, numRuns * 2);\n }\n });\n }\n\n try {\n new Promise(function(resolve, reject) {\n calculateNumberOfRuns(resolve);\n }).then(function(numberOfRuns) {\n runTrial(numberOfRuns);\n });\n } catch(err) {\n CanvasRunner.logFatalError(\"test fails due to GPU issue. \" + err);\n throw err;\n }\n }", "async function _TestCurrentConfig(Test) {\n ++TestsStarted;\n let attemptsMade = 0;\n let attemptsFailed = 0;\n const attemptsAllowed = 1 + Config.Retries;\n for (let attemptId = 1; attemptsMade < attemptsAllowed; ++attemptId) {\n try {\n ++TotalAttemptsMade;\n ++attemptsMade;\n await _TestAttempt(Test, attemptId);\n break; // stop on success\n }\n catch (error) {\n ++attemptsFailed;\n if (attemptsMade < attemptsAllowed) {\n const progress = attemptsFailed + \"/\" + attemptsAllowed;\n console.log(`Test attempt failure (${progress}):`, error);\n // keep going\n } else {\n console.log(`Test failure`);\n throw error;\n }\n }\n }\n\n // success\n if (attemptsMade > 1)\n console.log(\"Probability of a test failure:\", attemptsFailed, \"/\", attemptsMade, \"=\", Gadgets.PrettyPercent(attemptsFailed, attemptsMade));\n}", "function checkForNextTest() {\n\n //if cookie, reset to null\n var nextTest = uiUtils.getVal('nextTest');\n\n // debugger;\n if ( nextTest) {\n window.testInProgress = true;\n //debugger;\n uiUtils.setVal('nextTest', null); //clear cookie\n if ( tH.params.runTest=='true' ){\n console.log('have next test, but runTest is true')\n return;\n }\n function runTestX(testName, testDelay) {\n var testDelay = parseInt(testDelay)\n testDelay= sh.dv(testDelay, 0);\n // debugger;\n if ( testName ){\n console.info(\n 'Running test', testName, ''\n )\n\n setTimeout(function runTest_WhenUserTestsLoaded() {\n if ( window.testsLoaded != true ) {\n console.warn('tests not loaded yet')\n setTimeout(runTest, 200+testDelay)\n return;\n }\n debugger; //debug this 12-17-2016-is it correct?\n tH.runTest(testName)\n }, 200+testDelay)\n } else{\n runTest();\n }\n }\n\n runTestX(nextTest.testName)\n }\n }", "_getTestsCountToSplit() {\n return Math.floor(this._remainingTestsCount / 2);\n }", "async function test() {\n const worker = new Worker(`\n require('worker_threads').parentPort.on('message', ({ port }) => {\n port.postMessage('firstMessage');\n port.postMessage('lastMessage');\n port.close();\n });\n `, { eval: true });\n\n for (let i = 0; i < 10000; i++) {\n const { port1, port2 } = new MessageChannel();\n worker.postMessage({ port: port2 }, [ port2 ]);\n assert.deepStrictEqual(await once(port1, 'message'), ['firstMessage']);\n assert.deepStrictEqual(await once(port1, 'message'), ['lastMessage']);\n }\n\n await worker.terminate();\n}", "function duplicateScriptnameTest(nrOfCalls) {\n\n\treturn function () {\n\t\tvar callbackCounter = 0;\n\t\tvar testCounterStart = 0;\n\t\tif (typeof counter2 == 'number') {\n\t\t\ttestCounterStart = counter2;\n\t\t}\n\n\t\tvar allCompleted = function() {\n\t\t\tcallbackCounter++;\n\t\t\tif (callbackCounter == nrOfCalls) {\n\t\t\t\tstart();\n\t\t\t\tok(true, 'Callback function should be executed ' + nrOfCalls + ' times?'); // Currently doesn't work in ff\n\t\t\t}\n\t\t};\n\n\t\tstop();\n\t\tfor (var i = 0; i < nrOfCalls; i++) {\n\t\t\thead.js(\"helpers/counter2.js?makeUrlUnique=\" + nrOfCalls, allCompleted);\n\t\t}\n\t\tsetTimeout(function () {\n\t\t\tif (callbackCounter != nrOfCalls) {\n\t\t\t\tstart();\n\t\t\t\tequals(callbackCounter, nrOfCalls, 'Callback function issn\\'t called ' + nrOfCalls + ' times?');\n\t\t\t}\n\t\t\tequals(counter2 - testCounterStart, 1, 'Should the script be executed only once?');\n\t\t}, 250); // assume counter2.js is loaded & executed within 250 miliseconds\n\t};\n}", "function calculateNumberOfRuns(resolve, numRuns) {\n numRuns = numRuns || 1;\n if (currentTest.preRun) currentTest.preRun();\n const startTime = PerfTestRunner.now();\n\n for (var i = 0; i < numRuns; i++) {\n currentTest.doRun();\n }\n\n requestAnimationFrame(() => {\n let elapsedTime = PerfTestRunner.now() - startTime;\n if (elapsedTime >= GOAL_TIME) {\n const timePerRun = elapsedTime / numRuns;\n const numRunsFinal = Math.round(GOAL_TIME / timePerRun);\n if (currentTest.ensureComplete) currentTest.ensureComplete();\n if (currentTest.postRun) currentTest.postRun();\n resolve(numRunsFinal);\n } else {\n calculateNumberOfRuns(resolve, numRuns * 2);\n }\n });\n }", "function next() {\n\t\t\tif (aTests.length) {\n\t\t\t\trunTest(aTests.shift());\n\t\t\t} else if (!iRunningTests) {\n\t\t\t\toTotal.element.classList.remove(\"hidden\");\n\t\t\t\toTotal.element.firstChild.classList.add(\"running\");\n\t\t\t\tsummary(Date.now() - iStart);\n\t\t\t\tsaveLastRun(mLastRun);\n\t\t\t\tif (oFirstFailedTest) {\n\t\t\t\t\tselect(oFirstFailedTest);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "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 countTestCases()/* : Number*/\n {\n return 1;\n }", "run() {\n this.forkWorkers()\n }", "function testRun()\r\n{\r\n}", "mainloop() {\n this.repetitions++;\n let now = new Date().getTime();\n let relativeOriginal = now - this.realstartts;\n let relative = relativeOriginal * this.config.timeFactor;\n for (let node of this.nodes) {\n node.check(relative);\n };\n if (this.repetitions % 1000 === 0) {\n console.log(\"Repetition:\", this.repetitions, \"Relative time:\", relative);\n };\n }", "function main() {\n getLogger().clear();\n\n for (var i = 0; i < threads.length; i++) {\n if (i > 0) {\n getLogger().log(\"---\");\n }\n\n getLogger().log(\"Processing thread number \" + i);\n\n if (anyMessageMatchesAnyRuleInThread(threads[i])) {\n runActionsOnThread(threads[i]);\n } else {\n getLogger().log(\"No action taken because none of your rules were matching this thread.\");\n }\n }\n}", "function runAllUnitTests() {\n 'use strict';\n\n var _testCounter = 0,\n _testNextPage = function () {\n var level = $('#level'),\n count = $('#level option').length,\n current = +level.val();\n\n current += 1;\n console.log(current);\n\n if (current <= count) {\n level.val(current).change();\n return true;\n }\n return false;\n },\n _testPage = function () {\n _testCounter += 1;\n console.log(_testCounter);\n if (_testCounter < 25) {\n $('#level').change();\n return true;\n }\n return false;\n },\n _testAllDivisionPages = function () {\n if (_testNextPage()) {\n setTimeout(_testAllDivisionPages, 100);\n } else {\n console.log('testing Complete');\n }\n },\n _testManyDivisionPages = function () {\n if (_testPage()) {\n setTimeout(_testManyDivisionPages, 100);\n } else {\n console.log('testing All Division Pages');\n setTimeout(_testAllDivisionPages, 100);\n }\n },\n _testAllMultiplicationPages = function () {\n if (_testNextPage()) {\n setTimeout(_testAllMultiplicationPages, 100);\n } else {\n _testCounter = 0;\n $('#skill').val('division').change();\n console.log('testing Many Division Pages');\n setTimeout(_testManyDivisionPages, 100);\n }\n },\n _testManyMultiplicationPages = function () {\n if (_testPage()) {\n setTimeout(_testManyMultiplicationPages, 100);\n } else {\n console.log('testing All Multiplication Pages');\n setTimeout(_testAllMultiplicationPages, 100);\n }\n },\n _testAllSubtractionPages = function () {\n if (_testNextPage()) {\n setTimeout(_testAllSubtractionPages, 100);\n } else {\n _testCounter = 0;\n $('#skill').val('multiplication').change();\n console.log('testing Many Multiplication Pages');\n setTimeout(_testManyMultiplicationPages, 100);\n }\n },\n _testManySubtractionPages = function () {\n if (_testPage()) {\n setTimeout(_testManySubtractionPages, 100);\n } else {\n console.log('testing All Subtraction Pages');\n setTimeout(_testAllSubtractionPages, 100);\n }\n },\n _testAllAdditionPages = function () {\n if (_testNextPage()) {\n setTimeout(_testAllAdditionPages, 100);\n } else {\n _testCounter = 0;\n $('#skill').val('subtraction').change();\n console.log('testing Many Subtraction Pages');\n setTimeout(_testManySubtractionPages, 100);\n }\n },\n _testManyAdditionPages = function () {\n if (_testPage()) {\n setTimeout(_testManyAdditionPages, 100);\n } else {\n console.log('testing All Addition Pages');\n setTimeout(_testAllAdditionPages, 100);\n }\n };\n\n $('#skill').val('addition').change();\n console.log('testing Many Addition Pages');\n setTimeout(_testManyAdditionPages, 100);\n}", "function dedicatedWorkerTest(script)\n{\n var worker = new Worker(script);\n supportTestRunnerMessagesOnPort(worker);\n\n fetch_tests_from_worker(worker);\n}", "function countTestPost(i) { var k = 0; while (i--) { k++; } return k; }", "function oneTestServer(counter){\r\n\r\n /*options to the http*/\r\n var option = {\r\n port: PORT,\r\n path: FILE_TO_CHECK,\r\n headers : {connection: 'keep-alive'}\r\n }\r\n var fullSrc = ROOT_FOLDER + FILE_TO_CHECK;\r\n fullSrc.replace(/\\//g, '\\\\');\r\n\r\n http.get(option, function(res){\r\n\r\n var str = '';\r\n\r\n res.on('data', function(chunk){\r\n str += chunk;\r\n });\r\n\r\n res.on('end', function(){\r\n fs.readFile(fullSrc, function(err,data){\r\n if (err) {\r\n console.log(\"Failed loading the tests\");\r\n }\r\n else{\r\n if (data.toString('utf8') === str) {\r\n\r\n console.log(\"Test number: \" + counter + \", Status:\" +\r\n \" SUCCESS, on file:\" +\r\n \" \" + FILE_TO_CHECK);\r\n success++;\r\n\r\n }\r\n else {\r\n console.log(\"Test number: \" + counter + \", Status :\" +\r\n \" ERROR, on file:\" + FILE_TO_CHECK);\r\n }\r\n }\r\n });\r\n });\r\n res.on('error', function(err){\r\n console.log(err.message);\r\n });\r\n });\r\n}", "function numWorkers() { return workerIds().length }", "async function runAllTests() {\n const files = [];\n const x = new Assert();\n x.blessEnabled = process.argv.findIndex(arg => arg === '--bless') !== -1;\n\n x.startTestSuite('all', false);\n print('> Starting all tests...');\n print('');\n\n fs.readdirSync(__dirname).forEach(function(file) {\n const fullPath = path.join(__dirname, file);\n if (file.endsWith('.js') && fs.lstatSync(fullPath).isFile()) {\n files.push(fullPath);\n }\n });\n files.sort();\n let tmp;\n for (let i = 0; i < files.length; ++i) {\n try {\n tmp = require(files[i]);\n if (tmp['check'] === undefined) {\n continue;\n }\n } catch (err) {\n print(`failed to load \\`${files[i]}\\`, ignoring it...`);\n }\n\n try {\n await tmp['check'](x);\n } catch (err) {\n x._incrError();\n print(`<== \\`${files[i]}\\` failed: ${err}\\n${err.stack}`);\n }\n print('');\n }\n\n print('');\n print(`< Ending ${x.getTotalRanTests()} ${plural('test', x.getTotalRanTests())} with ` +\n `${x.getTotalErrors()} ${plural('error', x.getTotalErrors())}`);\n\n const errors = x.getTotalErrors();\n x.endTestSuite(false);\n return errors;\n}", "async function startTests() {\n console.log(\"🎸 Built Source Code\");\n const time = new Date().getTime();\n const nodeTest = spawn(`${process.execPath}`, [`build/_tests/tests/test.js`]);\n\n nodeTest.stdout.on(\"data\", (data) => {\n console.log(`[TEST]: ${data}`);\n });\n\n nodeTest.stderr.on(\"data\", (data) => {\n console.error(`[TEST ERROR]: ${data}`);\n });\n\n nodeTest.on(\"close\", () => {\n console.log(`🎸 Test run finished in ${new Date().getTime() - time}ms`);\n if (!cliopts.watch) {\n process.exit();\n }\n });\n}", "async function main() {\n const g_tests = async (flag) => {\n let test_base;\n let prefix = '';\n switch (flag) {\n case 'm':\n test_base = test_base_general;\n prefix = 'test_';\n break;\n case 'a':\n test_base = test_base_audio;\n prefix = 'test_';\n break;\n case 's':\n case 'c':\n test_base = test_base_toc;\n break;\n }\n ;\n const retval = await get_tests(`${test_base}/index.json`, prefix);\n return retval;\n };\n const preamble_run_test = async (name) => {\n if (name[0] === 'm' || name[0] === 'a' || name[0] === 's' || name[0] === 'c') {\n const tests = await g_tests(name[0]);\n run_test(tests[name].url);\n }\n else {\n throw new Error('Abnormal test id...');\n }\n };\n try {\n if (process.argv && process.argv.length > 2) {\n if (process.argv[2] === '-sm' || process.argv[2] === '-sa') {\n const label = process.argv[2][2];\n const tests = await g_tests(label);\n const scores = generate_scores(tests);\n console.log(JSON.stringify(scores, null, 4));\n }\n else if (process.argv[2] === '-l') {\n // run a local test that is not registered in the official test suite\n run_test(process.argv[3]);\n }\n else {\n preamble_run_test(process.argv[2]);\n }\n }\n else {\n preamble_run_test('m4.01');\n }\n }\n catch (e) {\n console.log(`Something went very wrong: ${e.message}`);\n process.exit(1);\n }\n}", "function run_simulation_steps(nCollabs){\n if(nCollabs==1){\n console.log(\"Tasks: 25; Collaborators: 1 =========================>\");\n var c0 = new WorkflowCollaborator(0, 0);\n c0.simulate();\n }\n if(nCollabs==2){\n console.log(\"Tasks: 25; Collaborators: 2 =========================>\");\n var c0 = new WorkflowCollaborator(0, 0);\n var c1 = new WorkflowCollaborator(1, 0);\n c0.simulate();\n c1.simulate();\n }\n if(nCollabs==3){\n console.log(\"Tasks: 25; Collaborators: 3 =========================>\");\n var c0 = new WorkflowCollaborator(0, 0);\n var c1 = new WorkflowCollaborator(1, 0);\n var c2 = new WorkflowCollaborator(2, 0);\n c0.simulate();\n c1.simulate();\n c2.simulate();\n }\n if(nCollabs==4){\n console.log(\"Tasks: 25; Collaborators: 4 =========================>\");\n var c0 = new WorkflowCollaborator(0, 0);\n var c1 = new WorkflowCollaborator(1, 0);\n var c2 = new WorkflowCollaborator(2, 0);\n var c3 = new WorkflowCollaborator(3, 0);\n c0.simulate();\n c1.simulate();\n c2.simulate();\n c3.simulate();\n }\n if(nCollabs==5){\n console.log(\"Tasks: 25; Collaborators: 5 =========================>\");\n var c0 = new WorkflowCollaborator(0, 0);\n var c1 = new WorkflowCollaborator(1, 0);\n var c2 = new WorkflowCollaborator(2, 0);\n var c3 = new WorkflowCollaborator(3, 0);\n var c4 = new WorkflowCollaborator(4, 0);\n c0.simulate();\n c1.simulate();\n c2.simulate();\n c3.simulate();\n c4.simulate();\n }\n if(nCollabs==6){\n console.log(\"Tasks: 25; Collaborators: 6 =========================>\");\n var c0 = new WorkflowCollaborator(0, 0);\n var c1 = new WorkflowCollaborator(1, 0);\n var c2 = new WorkflowCollaborator(2, 0);\n var c3 = new WorkflowCollaborator(3, 0);\n var c4 = new WorkflowCollaborator(4, 0);\n var c5 = new WorkflowCollaborator(5, 0);\n c0.simulate();\n c1.simulate();\n c2.simulate();\n c3.simulate();\n c4.simulate();\n c5.simulate();\n }\n if(nCollabs==7){\n console.log(\"Tasks: 25; Collaborators: 7 =========================>\");\n var c0 = new WorkflowCollaborator(0, 0);\n var c1 = new WorkflowCollaborator(1, 0);\n var c2 = new WorkflowCollaborator(2, 0);\n var c3 = new WorkflowCollaborator(3, 0);\n var c4 = new WorkflowCollaborator(4, 0);\n var c5 = new WorkflowCollaborator(5, 0);\n var c6 = new WorkflowCollaborator(6, 0);\n c0.simulate();\n c1.simulate();\n c2.simulate();\n c3.simulate();\n c4.simulate();\n c5.simulate();\n c6.simulate();\n }\n if(nCollabs==8){\n console.log(\"Tasks: 25; Collaborators: 8 =========================>\");\n var c0 = new WorkflowCollaborator(0, 0);\n var c1 = new WorkflowCollaborator(1, 0);\n var c2 = new WorkflowCollaborator(2, 0);\n var c3 = new WorkflowCollaborator(3, 0);\n var c4 = new WorkflowCollaborator(4, 0);\n var c5 = new WorkflowCollaborator(5, 0);\n var c6 = new WorkflowCollaborator(6, 0);\n var c7 = new WorkflowCollaborator(7, 0);\n c0.simulate();\n c1.simulate();\n c2.simulate();\n c3.simulate();\n c4.simulate();\n c5.simulate();\n c6.simulate();\n c7.simulate();\n }\n if(nCollabs==9){\n console.log(\"Tasks: 25; Collaborators: 9 =========================>\");\n var c0 = new WorkflowCollaborator(0, 0);\n var c1 = new WorkflowCollaborator(1, 0);\n var c2 = new WorkflowCollaborator(2, 0);\n var c3 = new WorkflowCollaborator(3, 0);\n var c4 = new WorkflowCollaborator(4, 0);\n var c5 = new WorkflowCollaborator(5, 0);\n var c6 = new WorkflowCollaborator(6, 0);\n var c7 = new WorkflowCollaborator(7, 0);\n var c8 = new WorkflowCollaborator(8, 0);\n c0.simulate();\n c1.simulate();\n c2.simulate();\n c3.simulate();\n c4.simulate();\n c5.simulate();\n c6.simulate();\n c7.simulate();\n c8.simulate();\n }\n if(nCollabs==10){\n console.log(\"Tasks: 25; Collaborators: 10 =========================>\");\n var c0 = new WorkflowCollaborator(0, 0);\n var c1 = new WorkflowCollaborator(1, 0);\n var c2 = new WorkflowCollaborator(2, 0);\n var c3 = new WorkflowCollaborator(3, 0);\n var c4 = new WorkflowCollaborator(4, 0);\n var c5 = new WorkflowCollaborator(5, 0);\n var c6 = new WorkflowCollaborator(6, 0);\n var c7 = new WorkflowCollaborator(7, 0);\n var c8 = new WorkflowCollaborator(8, 0);\n var c9 = new WorkflowCollaborator(9, 0);\n c0.simulate();\n c1.simulate();\n c2.simulate();\n c3.simulate();\n c4.simulate();\n c5.simulate();\n c6.simulate();\n c7.simulate();\n c8.simulate();\n c9.simulate();\n }\n if(nCollabs==11){\n console.log(\"Tasks: 25; Collaborators: 11 =========================>\");\n var c0 = new WorkflowCollaborator(0, 0);\n var c1 = new WorkflowCollaborator(1, 0);\n var c2 = new WorkflowCollaborator(2, 0);\n var c3 = new WorkflowCollaborator(3, 0);\n var c4 = new WorkflowCollaborator(4, 0);\n var c5 = new WorkflowCollaborator(5, 0);\n var c6 = new WorkflowCollaborator(6, 0);\n var c7 = new WorkflowCollaborator(7, 0);\n var c8 = new WorkflowCollaborator(8, 0);\n var c9 = new WorkflowCollaborator(9, 0);\n var c10 = new WorkflowCollaborator(10, 0);\n c0.simulate();\n c1.simulate();\n c2.simulate();\n c3.simulate();\n c4.simulate();\n c5.simulate();\n c6.simulate();\n c7.simulate();\n c8.simulate();\n c9.simulate();\n c10.simulate();\n }\n if(nCollabs==12){\n console.log(\"Tasks: 25; Collaborators: 12 =========================>\");\n var c0 = new WorkflowCollaborator(0, 0);\n var c1 = new WorkflowCollaborator(1, 0);\n var c2 = new WorkflowCollaborator(2, 0);\n var c3 = new WorkflowCollaborator(3, 0);\n var c4 = new WorkflowCollaborator(4, 0);\n var c5 = new WorkflowCollaborator(5, 0);\n var c6 = new WorkflowCollaborator(6, 0);\n var c7 = new WorkflowCollaborator(7, 0);\n var c8 = new WorkflowCollaborator(8, 0);\n var c9 = new WorkflowCollaborator(9, 0);\n var c10 = new WorkflowCollaborator(10, 0);\n var c11 = new WorkflowCollaborator(11, 0);\n c0.simulate();\n c1.simulate();\n c2.simulate();\n c3.simulate();\n c4.simulate();\n c5.simulate();\n c6.simulate();\n c7.simulate();\n c8.simulate();\n c9.simulate();\n c10.simulate();\n c11.simulate();\n }\n if(nCollabs==13){\n console.log(\"Tasks: 25; Collaborators: 13 =========================>\");\n var c0 = new WorkflowCollaborator(0, 0);\n var c1 = new WorkflowCollaborator(1, 0);\n var c2 = new WorkflowCollaborator(2, 0);\n var c3 = new WorkflowCollaborator(3, 0);\n var c4 = new WorkflowCollaborator(4, 0);\n var c5 = new WorkflowCollaborator(5, 0);\n var c6 = new WorkflowCollaborator(6, 0);\n var c7 = new WorkflowCollaborator(7, 0);\n var c8 = new WorkflowCollaborator(8, 0);\n var c9 = new WorkflowCollaborator(9, 0);\n var c10 = new WorkflowCollaborator(10, 0);\n var c11 = new WorkflowCollaborator(11, 0);\n var c12 = new WorkflowCollaborator(12, 0);\n c0.simulate();\n c1.simulate();\n c2.simulate();\n c3.simulate();\n c4.simulate();\n c5.simulate();\n c6.simulate();\n c7.simulate();\n c8.simulate();\n c9.simulate();\n c10.simulate();\n c11.simulate();\n c12.simulate();\n }\n if(nCollabs==14){\n console.log(\"Tasks: 25; Collaborators: 14 =========================>\");\n var c0 = new WorkflowCollaborator(0, 0);\n var c1 = new WorkflowCollaborator(1, 0);\n var c2 = new WorkflowCollaborator(2, 0);\n var c3 = new WorkflowCollaborator(3, 0);\n var c4 = new WorkflowCollaborator(4, 0);\n var c5 = new WorkflowCollaborator(5, 0);\n var c6 = new WorkflowCollaborator(6, 0);\n var c7 = new WorkflowCollaborator(7, 0);\n var c8 = new WorkflowCollaborator(8, 0);\n var c9 = new WorkflowCollaborator(9, 0);\n var c10 = new WorkflowCollaborator(10, 0);\n var c11 = new WorkflowCollaborator(11, 0);\n var c12 = new WorkflowCollaborator(12, 0);\n var c13 = new WorkflowCollaborator(13, 0);\n c0.simulate();\n c1.simulate();\n c2.simulate();\n c3.simulate();\n c4.simulate();\n c5.simulate();\n c6.simulate();\n c7.simulate();\n c8.simulate();\n c9.simulate();\n c10.simulate();\n c11.simulate();\n c12.simulate();\n c13.simulate();\n }\n if(nCollabs==15){\n console.log(\"Tasks: 25; Collaborators: 15 =========================>\");\n var c0 = new WorkflowCollaborator(0, 0);\n var c1 = new WorkflowCollaborator(1, 0);\n var c2 = new WorkflowCollaborator(2, 0);\n var c3 = new WorkflowCollaborator(3, 0);\n var c4 = new WorkflowCollaborator(4, 0);\n var c5 = new WorkflowCollaborator(5, 0);\n var c6 = new WorkflowCollaborator(6, 0);\n var c7 = new WorkflowCollaborator(7, 0);\n var c8 = new WorkflowCollaborator(8, 0);\n var c9 = new WorkflowCollaborator(9, 0);\n var c10 = new WorkflowCollaborator(10, 0);\n var c11 = new WorkflowCollaborator(11, 0);\n var c12 = new WorkflowCollaborator(12, 0);\n var c13 = new WorkflowCollaborator(13, 0);\n var c14 = new WorkflowCollaborator(14, 0);\n c0.simulate();\n c1.simulate();\n c2.simulate();\n c3.simulate();\n c4.simulate();\n c5.simulate();\n c6.simulate();\n c7.simulate();\n c8.simulate();\n c9.simulate();\n c10.simulate();\n c11.simulate();\n c12.simulate();\n c13.simulate();\n c14.simulate();\n }\n if(nCollabs==16){\n console.log(\"Tasks: 25; Collaborators: 16 =========================>\");\n var c0 = new WorkflowCollaborator(0, 0);\n var c1 = new WorkflowCollaborator(1, 0);\n var c2 = new WorkflowCollaborator(2, 0);\n var c3 = new WorkflowCollaborator(3, 0);\n var c4 = new WorkflowCollaborator(4, 0);\n var c5 = new WorkflowCollaborator(5, 0);\n var c6 = new WorkflowCollaborator(6, 0);\n var c7 = new WorkflowCollaborator(7, 0);\n var c8 = new WorkflowCollaborator(8, 0);\n var c9 = new WorkflowCollaborator(9, 0);\n var c10 = new WorkflowCollaborator(10, 0);\n var c11 = new WorkflowCollaborator(11, 0);\n var c12 = new WorkflowCollaborator(12, 0);\n var c13 = new WorkflowCollaborator(13, 0);\n var c14 = new WorkflowCollaborator(14, 0);\n var c15 = new WorkflowCollaborator(15, 0);\n c0.simulate();\n c1.simulate();\n c2.simulate();\n c3.simulate();\n c4.simulate();\n c5.simulate();\n c6.simulate();\n c7.simulate();\n c8.simulate();\n c9.simulate();\n c10.simulate();\n c11.simulate();\n c12.simulate();\n c13.simulate();\n c14.simulate();\n c15.simulate();\n }\n if(nCollabs==17){\n console.log(\"Tasks: 25; Collaborators: 17 =========================>\");\n var c0 = new WorkflowCollaborator(0, 0);\n var c1 = new WorkflowCollaborator(1, 0);\n var c2 = new WorkflowCollaborator(2, 0);\n var c3 = new WorkflowCollaborator(3, 0);\n var c4 = new WorkflowCollaborator(4, 0);\n var c5 = new WorkflowCollaborator(5, 0);\n var c6 = new WorkflowCollaborator(6, 0);\n var c7 = new WorkflowCollaborator(7, 0);\n var c8 = new WorkflowCollaborator(8, 0);\n var c9 = new WorkflowCollaborator(9, 0);\n var c10 = new WorkflowCollaborator(10, 0);\n var c11 = new WorkflowCollaborator(11, 0);\n var c12 = new WorkflowCollaborator(12, 0);\n var c13 = new WorkflowCollaborator(13, 0);\n var c14 = new WorkflowCollaborator(14, 0);\n var c15 = new WorkflowCollaborator(15, 0);\n var c16 = new WorkflowCollaborator(16, 0);\n c0.simulate();\n c1.simulate();\n c2.simulate();\n c3.simulate();\n c4.simulate();\n c5.simulate();\n c6.simulate();\n c7.simulate();\n c8.simulate();\n c9.simulate();\n c10.simulate();\n c11.simulate();\n c12.simulate();\n c13.simulate();\n c14.simulate();\n c15.simulate();\n c16.simulate();\n }\n if(nCollabs==18){\n console.log(\"Tasks: 25; Collaborators: 18 =========================>\");\n var c0 = new WorkflowCollaborator(0, 0);\n var c1 = new WorkflowCollaborator(1, 0);\n var c2 = new WorkflowCollaborator(2, 0);\n var c3 = new WorkflowCollaborator(3, 0);\n var c4 = new WorkflowCollaborator(4, 0);\n var c5 = new WorkflowCollaborator(5, 0);\n var c6 = new WorkflowCollaborator(6, 0);\n var c7 = new WorkflowCollaborator(7, 0);\n var c8 = new WorkflowCollaborator(8, 0);\n var c9 = new WorkflowCollaborator(9, 0);\n var c10 = new WorkflowCollaborator(10, 0);\n var c11 = new WorkflowCollaborator(11, 0);\n var c12 = new WorkflowCollaborator(12, 0);\n var c13 = new WorkflowCollaborator(13, 0);\n var c14 = new WorkflowCollaborator(14, 0);\n var c15 = new WorkflowCollaborator(15, 0);\n var c16 = new WorkflowCollaborator(16, 0);\n var c17 = new WorkflowCollaborator(17, 0);\n c0.simulate();\n c1.simulate();\n c2.simulate();\n c3.simulate();\n c4.simulate();\n c5.simulate();\n c6.simulate();\n c7.simulate();\n c8.simulate();\n c9.simulate();\n c10.simulate();\n c11.simulate();\n c12.simulate();\n c13.simulate();\n c14.simulate();\n c15.simulate();\n c16.simulate();\n c17.simulate();\n }\n if(nCollabs==19){\n console.log(\"Tasks: 25; Collaborators: 19 =========================>\");\n var c0 = new WorkflowCollaborator(0, 0);\n var c1 = new WorkflowCollaborator(1, 0);\n var c2 = new WorkflowCollaborator(2, 0);\n var c3 = new WorkflowCollaborator(3, 0);\n var c4 = new WorkflowCollaborator(4, 0);\n var c5 = new WorkflowCollaborator(5, 0);\n var c6 = new WorkflowCollaborator(6, 0);\n var c7 = new WorkflowCollaborator(7, 0);\n var c8 = new WorkflowCollaborator(8, 0);\n var c9 = new WorkflowCollaborator(9, 0);\n var c10 = new WorkflowCollaborator(10, 0);\n var c11 = new WorkflowCollaborator(11, 0);\n var c12 = new WorkflowCollaborator(12, 0);\n var c13 = new WorkflowCollaborator(13, 0);\n var c14 = new WorkflowCollaborator(14, 0);\n var c15 = new WorkflowCollaborator(15, 0);\n var c16 = new WorkflowCollaborator(16, 0);\n var c17 = new WorkflowCollaborator(17, 0);\n var c18 = new WorkflowCollaborator(18, 0);\n c0.simulate();\n c1.simulate();\n c2.simulate();\n c3.simulate();\n c4.simulate();\n c5.simulate();\n c6.simulate();\n c7.simulate();\n c8.simulate();\n c9.simulate();\n c10.simulate();\n c11.simulate();\n c12.simulate();\n c13.simulate();\n c14.simulate();\n c15.simulate();\n c16.simulate();\n c17.simulate();\n c18.simulate();\n }\n if(nCollabs==20){\n console.log(\"Tasks: 25; Collaborators: 20 =========================>\");\n var c0 = new WorkflowCollaborator(0, 0);\n var c1 = new WorkflowCollaborator(1, 0);\n var c2 = new WorkflowCollaborator(2, 0);\n var c3 = new WorkflowCollaborator(3, 0);\n var c4 = new WorkflowCollaborator(4, 0);\n var c5 = new WorkflowCollaborator(5, 0);\n var c6 = new WorkflowCollaborator(6, 0);\n var c7 = new WorkflowCollaborator(7, 0);\n var c8 = new WorkflowCollaborator(8, 0);\n var c9 = new WorkflowCollaborator(9, 0);\n var c10 = new WorkflowCollaborator(10, 0);\n var c11 = new WorkflowCollaborator(11, 0);\n var c12 = new WorkflowCollaborator(12, 0);\n var c13 = new WorkflowCollaborator(13, 0);\n var c14 = new WorkflowCollaborator(14, 0);\n var c15 = new WorkflowCollaborator(15, 0);\n var c16 = new WorkflowCollaborator(16, 0);\n var c17 = new WorkflowCollaborator(17, 0);\n var c18 = new WorkflowCollaborator(18, 0);\n var c19 = new WorkflowCollaborator(19, 0);\n c0.simulate();\n c1.simulate();\n c2.simulate();\n c3.simulate();\n c4.simulate();\n c5.simulate();\n c6.simulate();\n c7.simulate();\n c8.simulate();\n c9.simulate();\n c10.simulate();\n c11.simulate();\n c12.simulate();\n c13.simulate();\n c14.simulate();\n c15.simulate();\n c16.simulate();\n c17.simulate();\n c18.simulate();\n c19.simulate();\n }\n if(nCollabs==21){\n console.log(\"Tasks: 25; Collaborators: 21 =========================>\");\n var c0 = new WorkflowCollaborator(0, 0);\n var c1 = new WorkflowCollaborator(1, 0);\n var c2 = new WorkflowCollaborator(2, 0);\n var c3 = new WorkflowCollaborator(3, 0);\n var c4 = new WorkflowCollaborator(4, 0);\n var c5 = new WorkflowCollaborator(5, 0);\n var c6 = new WorkflowCollaborator(6, 0);\n var c7 = new WorkflowCollaborator(7, 0);\n var c8 = new WorkflowCollaborator(8, 0);\n var c9 = new WorkflowCollaborator(9, 0);\n var c10 = new WorkflowCollaborator(10, 0);\n var c11 = new WorkflowCollaborator(11, 0);\n var c12 = new WorkflowCollaborator(12, 0);\n var c13 = new WorkflowCollaborator(13, 0);\n var c14 = new WorkflowCollaborator(14, 0);\n var c15 = new WorkflowCollaborator(15, 0);\n var c16 = new WorkflowCollaborator(16, 0);\n var c17 = new WorkflowCollaborator(17, 0);\n var c18 = new WorkflowCollaborator(18, 0);\n var c19 = new WorkflowCollaborator(19, 0);\n var c20 = new WorkflowCollaborator(20, 0);\n c0.simulate();\n c1.simulate();\n c2.simulate();\n c3.simulate();\n c4.simulate();\n c5.simulate();\n c6.simulate();\n c7.simulate();\n c8.simulate();\n c9.simulate();\n c10.simulate();\n c11.simulate();\n c12.simulate();\n c13.simulate();\n c14.simulate();\n c15.simulate();\n c16.simulate();\n c17.simulate();\n c18.simulate();\n c19.simulate();\n c20.simulate();\n }\n if(nCollabs==22){\n console.log(\"Tasks: 25; Collaborators: 22 =========================>\");\n var c0 = new WorkflowCollaborator(0, 0);\n var c1 = new WorkflowCollaborator(1, 0);\n var c2 = new WorkflowCollaborator(2, 0);\n var c3 = new WorkflowCollaborator(3, 0);\n var c4 = new WorkflowCollaborator(4, 0);\n var c5 = new WorkflowCollaborator(5, 0);\n var c6 = new WorkflowCollaborator(6, 0);\n var c7 = new WorkflowCollaborator(7, 0);\n var c8 = new WorkflowCollaborator(8, 0);\n var c9 = new WorkflowCollaborator(9, 0);\n var c10 = new WorkflowCollaborator(10, 0);\n var c11 = new WorkflowCollaborator(11, 0);\n var c12 = new WorkflowCollaborator(12, 0);\n var c13 = new WorkflowCollaborator(13, 0);\n var c14 = new WorkflowCollaborator(14, 0);\n var c15 = new WorkflowCollaborator(15, 0);\n var c16 = new WorkflowCollaborator(16, 0);\n var c17 = new WorkflowCollaborator(17, 0);\n var c18 = new WorkflowCollaborator(18, 0);\n var c19 = new WorkflowCollaborator(19, 0);\n var c20 = new WorkflowCollaborator(20, 0);\n var c21 = new WorkflowCollaborator(21, 0);\n c0.simulate();\n c1.simulate();\n c2.simulate();\n c3.simulate();\n c4.simulate();\n c5.simulate();\n c6.simulate();\n c7.simulate();\n c8.simulate();\n c9.simulate();\n c10.simulate();\n c11.simulate();\n c12.simulate();\n c13.simulate();\n c14.simulate();\n c15.simulate();\n c16.simulate();\n c17.simulate();\n c18.simulate();\n c19.simulate();\n c20.simulate();\n c21.simulate();\n }\n if(nCollabs==23){\n console.log(\"Tasks: 25; Collaborators: 23 =========================>\");\n var c0 = new WorkflowCollaborator(0, 0);\n var c1 = new WorkflowCollaborator(1, 0);\n var c2 = new WorkflowCollaborator(2, 0);\n var c3 = new WorkflowCollaborator(3, 0);\n var c4 = new WorkflowCollaborator(4, 0);\n var c5 = new WorkflowCollaborator(5, 0);\n var c6 = new WorkflowCollaborator(6, 0);\n var c7 = new WorkflowCollaborator(7, 0);\n var c8 = new WorkflowCollaborator(8, 0);\n var c9 = new WorkflowCollaborator(9, 0);\n var c10 = new WorkflowCollaborator(10, 0);\n var c11 = new WorkflowCollaborator(11, 0);\n var c12 = new WorkflowCollaborator(12, 0);\n var c13 = new WorkflowCollaborator(13, 0);\n var c14 = new WorkflowCollaborator(14, 0);\n var c15 = new WorkflowCollaborator(15, 0);\n var c16 = new WorkflowCollaborator(16, 0);\n var c17 = new WorkflowCollaborator(17, 0);\n var c18 = new WorkflowCollaborator(18, 0);\n var c19 = new WorkflowCollaborator(19, 0);\n var c20 = new WorkflowCollaborator(20, 0);\n var c21 = new WorkflowCollaborator(21, 0);\n var c22 = new WorkflowCollaborator(22, 0);\n c0.simulate();\n c1.simulate();\n c2.simulate();\n c3.simulate();\n c4.simulate();\n c5.simulate();\n c6.simulate();\n c7.simulate();\n c8.simulate();\n c9.simulate();\n c10.simulate();\n c11.simulate();\n c12.simulate();\n c13.simulate();\n c14.simulate();\n c15.simulate();\n c16.simulate();\n c17.simulate();\n c18.simulate();\n c19.simulate();\n c20.simulate();\n c21.simulate();\n c22.simulate();\n }\n if(nCollabs==24){\n console.log(\"Tasks: 25; Collaborators: 24 =========================>\");\n var c0 = new WorkflowCollaborator(0, 0);\n var c1 = new WorkflowCollaborator(1, 0);\n var c2 = new WorkflowCollaborator(2, 0);\n var c3 = new WorkflowCollaborator(3, 0);\n var c4 = new WorkflowCollaborator(4, 0);\n var c5 = new WorkflowCollaborator(5, 0);\n var c6 = new WorkflowCollaborator(6, 0);\n var c7 = new WorkflowCollaborator(7, 0);\n var c8 = new WorkflowCollaborator(8, 0);\n var c9 = new WorkflowCollaborator(9, 0);\n var c10 = new WorkflowCollaborator(10, 0);\n var c11 = new WorkflowCollaborator(11, 0);\n var c12 = new WorkflowCollaborator(12, 0);\n var c13 = new WorkflowCollaborator(13, 0);\n var c14 = new WorkflowCollaborator(14, 0);\n var c15 = new WorkflowCollaborator(15, 0);\n var c16 = new WorkflowCollaborator(16, 0);\n var c17 = new WorkflowCollaborator(17, 0);\n var c18 = new WorkflowCollaborator(18, 0);\n var c19 = new WorkflowCollaborator(19, 0);\n var c20 = new WorkflowCollaborator(20, 0);\n var c21 = new WorkflowCollaborator(21, 0);\n var c22 = new WorkflowCollaborator(22, 0);\n var c23 = new WorkflowCollaborator(23, 0);\n c0.simulate();\n c1.simulate();\n c2.simulate();\n c3.simulate();\n c4.simulate();\n c5.simulate();\n c6.simulate();\n c7.simulate();\n c8.simulate();\n c9.simulate();\n c10.simulate();\n c11.simulate();\n c12.simulate();\n c13.simulate();\n c14.simulate();\n c15.simulate();\n c16.simulate();\n c17.simulate();\n c18.simulate();\n c19.simulate();\n c20.simulate();\n c21.simulate();\n c22.simulate();\n c23.simulate();\n }\n if(nCollabs==25){\n console.log(\"Tasks: 25; Collaborators: 25 =========================>\");\n var c0 = new WorkflowCollaborator(0, 0);\n var c1 = new WorkflowCollaborator(1, 0);\n var c2 = new WorkflowCollaborator(2, 0);\n var c3 = new WorkflowCollaborator(3, 0);\n var c4 = new WorkflowCollaborator(4, 0);\n var c5 = new WorkflowCollaborator(5, 0);\n var c6 = new WorkflowCollaborator(6, 0);\n var c7 = new WorkflowCollaborator(7, 0);\n var c8 = new WorkflowCollaborator(8, 0);\n var c9 = new WorkflowCollaborator(9, 0);\n var c10 = new WorkflowCollaborator(10, 0);\n var c11 = new WorkflowCollaborator(11, 0);\n var c12 = new WorkflowCollaborator(12, 0);\n var c13 = new WorkflowCollaborator(13, 0);\n var c14 = new WorkflowCollaborator(14, 0);\n var c15 = new WorkflowCollaborator(15, 0);\n var c16 = new WorkflowCollaborator(16, 0);\n var c17 = new WorkflowCollaborator(17, 0);\n var c18 = new WorkflowCollaborator(18, 0);\n var c19 = new WorkflowCollaborator(19, 0);\n var c20 = new WorkflowCollaborator(20, 0);\n var c21 = new WorkflowCollaborator(21, 0);\n var c22 = new WorkflowCollaborator(22, 0);\n var c23 = new WorkflowCollaborator(23, 0);\n var c24 = new WorkflowCollaborator(24, 0);\n c0.simulate();\n c1.simulate();\n c2.simulate();\n c3.simulate();\n c4.simulate();\n c5.simulate();\n c6.simulate();\n c7.simulate();\n c8.simulate();\n c9.simulate();\n c10.simulate();\n c11.simulate();\n c12.simulate();\n c13.simulate();\n c14.simulate();\n c15.simulate();\n c16.simulate();\n c17.simulate();\n c18.simulate();\n c19.simulate();\n c20.simulate();\n c21.simulate();\n c22.simulate();\n c23.simulate();\n c24.simulate();\n }\n if(nCollabs==26){\n console.log(\"Tasks: 25; Collaborators: 26 =========================>\");\n var c0 = new WorkflowCollaborator(0, 0);\n var c1 = new WorkflowCollaborator(1, 0);\n var c2 = new WorkflowCollaborator(2, 0);\n var c3 = new WorkflowCollaborator(3, 0);\n var c4 = new WorkflowCollaborator(4, 0);\n var c5 = new WorkflowCollaborator(5, 0);\n var c6 = new WorkflowCollaborator(6, 0);\n var c7 = new WorkflowCollaborator(7, 0);\n var c8 = new WorkflowCollaborator(8, 0);\n var c9 = new WorkflowCollaborator(9, 0);\n var c10 = new WorkflowCollaborator(10, 0);\n var c11 = new WorkflowCollaborator(11, 0);\n var c12 = new WorkflowCollaborator(12, 0);\n var c13 = new WorkflowCollaborator(13, 0);\n var c14 = new WorkflowCollaborator(14, 0);\n var c15 = new WorkflowCollaborator(15, 0);\n var c16 = new WorkflowCollaborator(16, 0);\n var c17 = new WorkflowCollaborator(17, 0);\n var c18 = new WorkflowCollaborator(18, 0);\n var c19 = new WorkflowCollaborator(19, 0);\n var c20 = new WorkflowCollaborator(20, 0);\n var c21 = new WorkflowCollaborator(21, 0);\n var c22 = new WorkflowCollaborator(22, 0);\n var c23 = new WorkflowCollaborator(23, 0);\n var c24 = new WorkflowCollaborator(24, 0);\n var c25 = new WorkflowCollaborator(25, 0);\n c0.simulate();\n c1.simulate();\n c2.simulate();\n c3.simulate();\n c4.simulate();\n c5.simulate();\n c6.simulate();\n c7.simulate();\n c8.simulate();\n c9.simulate();\n c10.simulate();\n c11.simulate();\n c12.simulate();\n c13.simulate();\n c14.simulate();\n c15.simulate();\n c16.simulate();\n c17.simulate();\n c18.simulate();\n c19.simulate();\n c20.simulate();\n c21.simulate();\n c22.simulate();\n c23.simulate();\n c24.simulate();\n c25.simulate();\n }\n if(nCollabs==27){\n console.log(\"Tasks: 25; Collaborators: 27 =========================>\");\n var c0 = new WorkflowCollaborator(0, 0);\n var c1 = new WorkflowCollaborator(1, 0);\n var c2 = new WorkflowCollaborator(2, 0);\n var c3 = new WorkflowCollaborator(3, 0);\n var c4 = new WorkflowCollaborator(4, 0);\n var c5 = new WorkflowCollaborator(5, 0);\n var c6 = new WorkflowCollaborator(6, 0);\n var c7 = new WorkflowCollaborator(7, 0);\n var c8 = new WorkflowCollaborator(8, 0);\n var c9 = new WorkflowCollaborator(9, 0);\n var c10 = new WorkflowCollaborator(10, 0);\n var c11 = new WorkflowCollaborator(11, 0);\n var c12 = new WorkflowCollaborator(12, 0);\n var c13 = new WorkflowCollaborator(13, 0);\n var c14 = new WorkflowCollaborator(14, 0);\n var c15 = new WorkflowCollaborator(15, 0);\n var c16 = new WorkflowCollaborator(16, 0);\n var c17 = new WorkflowCollaborator(17, 0);\n var c18 = new WorkflowCollaborator(18, 0);\n var c19 = new WorkflowCollaborator(19, 0);\n var c20 = new WorkflowCollaborator(20, 0);\n var c21 = new WorkflowCollaborator(21, 0);\n var c22 = new WorkflowCollaborator(22, 0);\n var c23 = new WorkflowCollaborator(23, 0);\n var c24 = new WorkflowCollaborator(24, 0);\n var c25 = new WorkflowCollaborator(25, 0);\n var c26 = new WorkflowCollaborator(26, 0);\n c0.simulate();\n c1.simulate();\n c2.simulate();\n c3.simulate();\n c4.simulate();\n c5.simulate();\n c6.simulate();\n c7.simulate();\n c8.simulate();\n c9.simulate();\n c10.simulate();\n c11.simulate();\n c12.simulate();\n c13.simulate();\n c14.simulate();\n c15.simulate();\n c16.simulate();\n c17.simulate();\n c18.simulate();\n c19.simulate();\n c20.simulate();\n c21.simulate();\n c22.simulate();\n c23.simulate();\n c24.simulate();\n c25.simulate();\n c26.simulate();\n }\n if(nCollabs==28){\n console.log(\"Tasks: 25; Collaborators: 28 =========================>\");\n var c0 = new WorkflowCollaborator(0, 0);\n var c1 = new WorkflowCollaborator(1, 0);\n var c2 = new WorkflowCollaborator(2, 0);\n var c3 = new WorkflowCollaborator(3, 0);\n var c4 = new WorkflowCollaborator(4, 0);\n var c5 = new WorkflowCollaborator(5, 0);\n var c6 = new WorkflowCollaborator(6, 0);\n var c7 = new WorkflowCollaborator(7, 0);\n var c8 = new WorkflowCollaborator(8, 0);\n var c9 = new WorkflowCollaborator(9, 0);\n var c10 = new WorkflowCollaborator(10, 0);\n var c11 = new WorkflowCollaborator(11, 0);\n var c12 = new WorkflowCollaborator(12, 0);\n var c13 = new WorkflowCollaborator(13, 0);\n var c14 = new WorkflowCollaborator(14, 0);\n var c15 = new WorkflowCollaborator(15, 0);\n var c16 = new WorkflowCollaborator(16, 0);\n var c17 = new WorkflowCollaborator(17, 0);\n var c18 = new WorkflowCollaborator(18, 0);\n var c19 = new WorkflowCollaborator(19, 0);\n var c20 = new WorkflowCollaborator(20, 0);\n var c21 = new WorkflowCollaborator(21, 0);\n var c22 = new WorkflowCollaborator(22, 0);\n var c23 = new WorkflowCollaborator(23, 0);\n var c24 = new WorkflowCollaborator(24, 0);\n var c25 = new WorkflowCollaborator(25, 0);\n var c26 = new WorkflowCollaborator(26, 0);\n var c27 = new WorkflowCollaborator(27, 0);\n c0.simulate();\n c1.simulate();\n c2.simulate();\n c3.simulate();\n c4.simulate();\n c5.simulate();\n c6.simulate();\n c7.simulate();\n c8.simulate();\n c9.simulate();\n c10.simulate();\n c11.simulate();\n c12.simulate();\n c13.simulate();\n c14.simulate();\n c15.simulate();\n c16.simulate();\n c17.simulate();\n c18.simulate();\n c19.simulate();\n c20.simulate();\n c21.simulate();\n c22.simulate();\n c23.simulate();\n c24.simulate();\n c25.simulate();\n c26.simulate();\n c27.simulate();\n }\n if(nCollabs==29){\n console.log(\"Tasks: 25; Collaborators: 29 =========================>\");\n var c0 = new WorkflowCollaborator(0, 0);\n var c1 = new WorkflowCollaborator(1, 0);\n var c2 = new WorkflowCollaborator(2, 0);\n var c3 = new WorkflowCollaborator(3, 0);\n var c4 = new WorkflowCollaborator(4, 0);\n var c5 = new WorkflowCollaborator(5, 0);\n var c6 = new WorkflowCollaborator(6, 0);\n var c7 = new WorkflowCollaborator(7, 0);\n var c8 = new WorkflowCollaborator(8, 0);\n var c9 = new WorkflowCollaborator(9, 0);\n var c10 = new WorkflowCollaborator(10, 0);\n var c11 = new WorkflowCollaborator(11, 0);\n var c12 = new WorkflowCollaborator(12, 0);\n var c13 = new WorkflowCollaborator(13, 0);\n var c14 = new WorkflowCollaborator(14, 0);\n var c15 = new WorkflowCollaborator(15, 0);\n var c16 = new WorkflowCollaborator(16, 0);\n var c17 = new WorkflowCollaborator(17, 0);\n var c18 = new WorkflowCollaborator(18, 0);\n var c19 = new WorkflowCollaborator(19, 0);\n var c20 = new WorkflowCollaborator(20, 0);\n var c21 = new WorkflowCollaborator(21, 0);\n var c22 = new WorkflowCollaborator(22, 0);\n var c23 = new WorkflowCollaborator(23, 0);\n var c24 = new WorkflowCollaborator(24, 0);\n var c25 = new WorkflowCollaborator(25, 0);\n var c26 = new WorkflowCollaborator(26, 0);\n var c27 = new WorkflowCollaborator(27, 0);\n var c28 = new WorkflowCollaborator(28, 0);\n c0.simulate();\n c1.simulate();\n c2.simulate();\n c3.simulate();\n c4.simulate();\n c5.simulate();\n c6.simulate();\n c7.simulate();\n c8.simulate();\n c9.simulate();\n c10.simulate();\n c11.simulate();\n c12.simulate();\n c13.simulate();\n c14.simulate();\n c15.simulate();\n c16.simulate();\n c17.simulate();\n c18.simulate();\n c19.simulate();\n c20.simulate();\n c21.simulate();\n c22.simulate();\n c23.simulate();\n c24.simulate();\n c25.simulate();\n c26.simulate();\n c27.simulate();\n c28.simulate();\n }\n if(nCollabs==30){\n console.log(\"Tasks: 25; Collaborators: 30 =========================>\");\n var c0 = new WorkflowCollaborator(0, 0);\n var c1 = new WorkflowCollaborator(1, 0);\n var c2 = new WorkflowCollaborator(2, 0);\n var c3 = new WorkflowCollaborator(3, 0);\n var c4 = new WorkflowCollaborator(4, 0);\n var c5 = new WorkflowCollaborator(5, 0);\n var c6 = new WorkflowCollaborator(6, 0);\n var c7 = new WorkflowCollaborator(7, 0);\n var c8 = new WorkflowCollaborator(8, 0);\n var c9 = new WorkflowCollaborator(9, 0);\n var c10 = new WorkflowCollaborator(10, 0);\n var c11 = new WorkflowCollaborator(11, 0);\n var c12 = new WorkflowCollaborator(12, 0);\n var c13 = new WorkflowCollaborator(13, 0);\n var c14 = new WorkflowCollaborator(14, 0);\n var c15 = new WorkflowCollaborator(15, 0);\n var c16 = new WorkflowCollaborator(16, 0);\n var c17 = new WorkflowCollaborator(17, 0);\n var c18 = new WorkflowCollaborator(18, 0);\n var c19 = new WorkflowCollaborator(19, 0);\n var c20 = new WorkflowCollaborator(20, 0);\n var c21 = new WorkflowCollaborator(21, 0);\n var c22 = new WorkflowCollaborator(22, 0);\n var c23 = new WorkflowCollaborator(23, 0);\n var c24 = new WorkflowCollaborator(24, 0);\n var c25 = new WorkflowCollaborator(25, 0);\n var c26 = new WorkflowCollaborator(26, 0);\n var c27 = new WorkflowCollaborator(27, 0);\n var c28 = new WorkflowCollaborator(28, 0);\n var c29 = new WorkflowCollaborator(29, 0);\n c0.simulate();\n c1.simulate();\n c2.simulate();\n c3.simulate();\n c4.simulate();\n c5.simulate();\n c6.simulate();\n c7.simulate();\n c8.simulate();\n c9.simulate();\n c10.simulate();\n c11.simulate();\n c12.simulate();\n c13.simulate();\n c14.simulate();\n c15.simulate();\n c16.simulate();\n c17.simulate();\n c18.simulate();\n c19.simulate();\n c20.simulate();\n c21.simulate();\n c22.simulate();\n c23.simulate();\n c24.simulate();\n c25.simulate();\n c26.simulate();\n c27.simulate();\n c28.simulate();\n c29.simulate();\n }\n\n}", "incTestsByBrowserByState(state, browser, suite) {\n state = this.standardTestState(state);\n setdefault(this._testsCountPerBrowserPerState, browser, {});\n setdefault(this._testsCountPerBrowserPerState[browser], state, 0);\n setdefault(this._testsCountPerSuitePerState, suite, {});\n setdefault(this._testsCountPerSuitePerState[suite], state, 0);\n switch (state) {\n case \"Passed\":\n this._numberOfPassedTests += 1;\n this._numberOfTests += 1;\n this._testsCountPerBrowserPerState[browser][state] += 1;\n this._testsCountPerSuitePerState[suite][state] += 1;\n break;\n case \"Failed\":\n this._numberOfFailedTests += 1;\n this._numberOfTests += 1;\n this._testsCountPerBrowserPerState[browser][state] += 1;\n this._testsCountPerSuitePerState[suite][state] += 1;\n break;\n case \"Skipped\":\n this._numberOfSkippedTests += 1;\n this._numberOfTests += 1;\n this._testsCountPerBrowserPerState[browser][state] += 1;\n this._testsCountPerSuitePerState[suite][state] += 1;\n break;\n default:\n this._numberOfSkippedTests += 1;\n this._numberOfTests += 1;\n this._testsCountPerBrowserPerState[browser]['Skipped'] += 1;\n this._testsCountPerSuitePerState[suite]['Skipped'] += 1;\n };\n }", "function executeTests() {\n\n\tconsole.log('Executing tests...');\n\n\tsetupOutput();\n\n\tfor (var testFile of tests) {\n\t\tconsole.log('Running test %s', testFile);\n\n\t\trequire(testFile);\n\t}\n}", "function next() {\n\t\t\tif (aTests.length) {\n\t\t\t\treturn runTest(aTests.shift());\n\t\t\t} else if (!iRunningTests) {\n\t\t\t\toTotal.element.classList.remove(\"hidden\");\n\t\t\t\toTotal.element.firstChild.classList.add(\"running\");\n\t\t\t\tsummary(Date.now() - iStart);\n\t\t\t\tif (oFirstFailedTest) {\n\t\t\t\t\tselect(oFirstFailedTest);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function testSwitcher(count) {\r\n if (count < selectedTestList.length) {\r\n try {\r\n eval(selectedTestList[count] + \"()\");\r\n } catch(err) {\r\n console.log(\"Error while eval function \" + selectedTestList[count], err);\r\n }\r\n } else {\r\n done();\r\n }\r\n}", "function runTests() {\n\ttestBeepBoop();\n\ttestGetDigits();\n}", "async run() {\n await Promise.all(this[QUEUE].map(this[TEST_PAGE]));\n }", "function main(numberOfJobs = 5000) {\n const startTime = Date.now();\n\n [...Array(numberOfJobs).keys()].forEach(function startJob(_, index) {\n if (index == 0 || index == numberOfJobs - 1) {\n return setTimeout(() => job({ startTime: startTime, logging: true }), 0);\n }\n return setTimeout(() => job(), 0);\n // return setTimeout(() => job({ logging: true }), 0);\n });\n}", "registerTestListeners () {\n\t\tthis.disposables.add(this.testRunner.onWillBeginBatchTest(({project, queue}) => {\n\t\t\tthis.runningQueue = queue\n\t\t\tthis.runningBatch = true\n\n\t\t\treturn this.update({\n\t\t\t\tstate: 'test-begin',\n\t\t\t\tactiveProject: project.getRoot(),\n\t\t\t})\n\t\t}))\n\n\t\tthis.disposables.add(this.testRunner.onDidCompleteBatchTest(({project}) => {\n\t\t\treturn this.update({\n\t\t\t\tstate: 'test-end',\n\t\t\t\tactiveProject: project.getRoot(),\n\t\t\t}).then(() => {\n\t\t\t\tthis.runningQueue = null\n\t\t\t\tthis.runningBatch = false\n\t\t\t})\n\t\t}))\n\n\t\tthis.disposables.add(this.testRunner.onDidBeginTest(({project, queue}) => {\n\t\t\tthis.runningQueue = queue\n\n\t\t\treturn this.update({\n\t\t\t\tstate: this.runningBatch ? 'test-progress' : 'test-begin',\n\t\t\t\tactiveProject: project.getRoot(),\n\t\t\t\ttestReport: null,\n\t\t\t\tcoverageReport: null,\n\t\t\t})\n\t\t}))\n\n\t\tthis.disposables.add(this.testRunner.onDidCompleteTest(({project}) => {\n\t\t\tconst coverage = this.isCodeCoverageEnabled()\n\t\t\tconst testReport = project.getTestReport()\n\t\t\tlet coverageReport\n\n\t\t\tif (coverage) {\n\t\t\t\tcoverageReport = project.getCoverageReport()\n\t\t\t}\n\n\t\t\treturn this.update({\n\t\t\t\tstate: this.runningBatch ? 'test-progress' : 'test-end',\n\t\t\t\tactiveProject: project.getRoot(),\n\t\t\t\ttestReport,\n\t\t\t\tcoverageReport,\n\t\t\t}).then(() => {\n\t\t\t\tif (!this.runningBatch) {\n\t\t\t\t\tthis.runningQueue = null\n\t\t\t\t}\n\t\t\t})\n\t\t}))\n\n\t\tthis.disposables.add(this.testRunner.onDidCancelTest(({project}) => {\n\t\t\treturn this.update({\n\t\t\t\tstate: 'test-end',\n\t\t\t\tactiveProject: project.getRoot(),\n\t\t\t\ttestReport: null,\n\t\t\t\tcoverageReport: null\n\t\t\t}).then(() => {\n\t\t\t\tthis.runningQueue = null\n\t\t\t\tthis.runningBatch = false\n\t\t\t})\n\t\t}))\n\n\t\tthis.disposables.add(this.testRunner.onTestCommandLine(({project, data}) => {\n\t\t\tif (!this.terminalReport) {\n\t\t\t\tif (this.refs.terminal) {\n\t\t\t\t\tthis.refs.terminal.clear();\n\t\t\t\t\tthis.refs.terminal.writeln(data + '\\n')\n\t\t\t\t}\n\n\t\t\t\treturn this.update({\n\t\t\t\t\tstate: 'test-progress',\n\t\t\t\t\tactiveProject: project.getRoot()\n\t\t\t\t})\n\t\t\t}\n\t\t}))\n\n\t\tthis.disposables.add(this.testRunner.onTestOutputData(({project, data}) => {\n\t\t\tif (!this.terminalReport) {\n\t\t\t\tif (this.refs.terminal) {\n\t\t\t\t\tthis.refs.terminal.write(data)\n\t\t\t\t}\n\n\t\t\t\treturn this.update({\n\t\t\t\t\tstate: 'test-progress',\n\t\t\t\t\tactiveProject: project.getRoot()\n\t\t\t\t})\n\t\t\t}\n\t\t}))\n\n\t\tthis.disposables.add(this.testRunner.onTestErrorData(({project, data}) => {\n\t\t\tif (!this.terminalReport) {\n\t\t\t\tif (this.refs.terminal) {\n\t\t\t\t\tthis.refs.terminal.write(data)\n\t\t\t\t}\n\n\t\t\t\treturn this.update({\n\t\t\t\t\tstate: 'test-progress',\n\t\t\t\t\tactiveProject: project.getRoot()\n\t\t\t\t})\n\t\t\t}\n\t\t}))\n\n\t\tthis.disposables.add(this.testRunner.onClearAll(() => {\n\t\t\treturn this.clear()\n\t\t}))\n\t}", "function main() {\n new Thread(function() {\n while (1) {\n Thread.sleep(1);\n console.log('sharedGlobal = ' + sharedGlobal);\n }\n }).start();\n new Thread(function() {\n while (1) {\n Thread.sleep(1);\n sharedGlobal++;\n }\n }).start();\n}", "async runTests({tests} = {}) {\n const vizTargetRoot = document.getElementById('vizTargetRoot');\n\n for (const {screenshotOutputPath, testName, suiteName} of tests) {\n // This is to call out tests that may be 'hung', which is helpful for debugging\n const hungConsoleWarningTimeout = setTimeout(\n () => {\n console.log(`${suiteName}/${testName} being slow.`);\n },\n 5 * 1000\n );\n\n const target = vizTargetRoot.appendChild(document.createElement('div'));\n const {testRunner} = this.registeredTests.find((test) => test.testName === testName && test.suiteName === suiteName);\n const testInitializer = this.registeredTestInitializers[suiteName] || noop;\n const testFinalizer = this.registeredTestFinalizers[suiteName] || noop;\n\n // Run the test to render something to the viewport\n let screenshotTarget;\n\n try {\n await testInitializer();\n screenshotTarget = await testRunner(target);\n } catch (e) {\n console.error(`Error running test ${suiteName}/${testName}`, e);\n }\n\n if (!screenshotTarget) {\n throw new Error(`No screenshot target returned from test ${suiteName}/${testName}. Did you forget to 'return'?`);\n }\n\n let targetRect = screenshotTarget.getBoundingClientRect();\n\n // If the screenshot target has a parent, add the parent's padding to the clipping rectangle.\n if (screenshotTarget.parentElement && screenshotTarget.parentElement !== target) {\n const {\n paddingTop,\n paddingRight,\n paddingBottom,\n paddingLeft,\n } = window.getComputedStyle(screenshotTarget.parentElement);\n\n const paddingTopPx = parseInt(paddingTop.replace('px', '')) || 0;\n const paddingRightPx = parseInt(paddingRight.replace('px', '') || 0);\n const paddingBottomPx = parseInt(paddingBottom.replace('px', '') || 0);\n const paddingLeftPx = parseInt(paddingLeft.replace('px', '') || 0);\n\n targetRect = {\n x: targetRect.x - paddingLeftPx,\n y: targetRect.y - paddingTopPx,\n width: targetRect.width + paddingLeftPx + paddingRightPx,\n height: targetRect.height + paddingTopPx + paddingBottomPx,\n };\n }\n\n await window.takeScreenshot({\n targetRect,\n screenshotOutputPath,\n });\n\n try {\n await testFinalizer(target);\n } catch (e) {\n console.error(`Error calling afterEach for test ${suiteName}/${testName}`, e);\n }\n\n vizTargetRoot.removeChild(target);\n\n await window.resetMouse();\n\n clearTimeout(hungConsoleWarningTimeout);\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 }", "benchmarkRuns(ctx, number = 10, repeat = 4) {\n return __awaiter(this, void 0, void 0, function* () {\n // Skip first run as it can involve GPU warmup and module loading time.\n const perf = compact.getPeformance();\n const results = [];\n this.run();\n yield ctx.sync();\n for (let k = 0; k < repeat; ++k) {\n const tstart = perf.now();\n for (let i = 0; i < number; ++i) {\n this.run();\n }\n yield ctx.sync();\n const tend = perf.now();\n results.push((tend - tstart) / number);\n }\n return results;\n });\n }", "function startLightTests(finish){\n\t(new cronJob(\"*/5 * * * *\", lightTests)).start();\n\tlightTests(finish);\n}", "getNumberOfProcesses() {\n\t return tslib_es6.__awaiter(this, void 0, void 0, function* () {\n\t const result = yield this.rawQuery({\n\t sqlQuery: 'select count(distinct(upid)) from thread;',\n\t });\n\t return +result.columns[0].longValues[0];\n\t });\n\t }", "function testComplete() {\n process.nextTick(function() {\n if (testQueue.length > 0) {\n testQueue.shift()();\n }\n else {\n t.equal(async, expectAsync, \"captured all expected async callbacks\");\n t.equal(testQueue.length, 0, \"all tests have been processed\");\n }\n });\n }", "function runGCTests(tests, i, title) {\n if (!i) {\n i = 0;\n }\n\n if (tests[i]) {\n if (typeof tests[i] === 'string') {\n title = tests[i];\n runGCTests(tests, i + 1, title);\n } else {\n try {\n tests[i]();\n } catch (e) {\n console.error('Test failed: ' + title);\n throw e;\n }\n setImmediate(() => {\n global.gc();\n runGCTests(tests, i + 1, title);\n });\n }\n }\n}", "async waitForNewItemsCount(originalCount) {\n for (let i = 0; i < 5; i++) {\n I.wait(1);\n const count = this.getCountOfItems();\n\n if (count !== originalCount) {\n return count;\n }\n }\n\n return false;\n }", "function startHeavyTests(finish){\n\t(new cronJob(\"0 * * * *\", heavyTests)).start();\n\theavyTests(finish);\n}", "function setTestsCount( newTestsCount )\n{\n\tassert( newTestsCount >= 0, \"Can't set testsCount to a negative number: \" + newTestsCount )\n\n\tthis.testsCount = newTestsCount\n}", "[kRun]() {\n if (this.pending === this.concurrency) return;\n\n if (this.jobs.length) {\n const job = this.jobs.shift();\n\n this.pending++;\n job(this[kDone]);\n }\n }", "[kRun]() {\n if (this.pending === this.concurrency) return;\n\n if (this.jobs.length) {\n const job = this.jobs.shift();\n\n this.pending++;\n job(this[kDone]);\n }\n }", "[kRun]() {\n if (this.pending === this.concurrency) return;\n\n if (this.jobs.length) {\n const job = this.jobs.shift();\n\n this.pending++;\n job(this[kDone]);\n }\n }", "function Run5times(){\r\n for(let i=0 ; i < 5; i++){\r\n // do these things 5 times\r\n collectItem();\r\n }\r\n}", "function cryptoContextStressor(ctx, store, count, callback) {\n var r = new Random();\n for (var i = 0; i < count; ++i) {\n var tokenIndex = r.nextInt(count);\n MslTestUtils.getMasterToken(ctx, tokenIndex, 1, {\n result: function(masterToken) {\n var option = r.nextInt(4);\n switch (option) {\n case 0:\n store.setCryptoContext(masterToken, null);\n break;\n case 1:\n var cryptoContext = new SessionCryptoContext(ctx, masterToken);\n store.setCryptoContext(masterToken, cryptoContext);\n break;\n case 2:\n store.getCryptoContext(masterToken);\n break;\n case 3:\n store.removeCryptoContext(masterToken);\n break;\n }\n callback.add(1);\n },\n error: function(err) { callback.error(new MslInternalException(\"Unexpected master token stress test exception.\", err)); }\n });\n }\n }", "function runTests() {\n console.log(\"min: \" + minN);\n console.log(\"max: \" + maxN);\n console.log(\"num: \" + numEachN);\n \n // initialise an array of arrays to hold the results:\n // each member array represents a row, the first row contains the headings\n let rows = [[\"Test\", \"n\", \"p(n)\", \"Runtime (ms)\"]];\n \n // generate an array containing the different test sizes (values of n)\n let testSizes = [];\n // increment the test sizes by 1\n for (let i = parseInt(minN, 10); i <= maxN; i++) {\n testSizes.push(i);\n }\n console.log(\"values of n: \" + testSizes);\n let totalNumTests = testSizes.length * numEachN;\n console.log(\"total num tests: \" + totalNumTests);\n \n document.getElementById(\"runTests\").innerHTML = \"Running tests\";\n alert(totalNumTests + \" tests are about to be run for values of n up to \" + maxN\n + \".\\n\\nThis may take some time, so please check the console for progress updates.\");\n \n let currentTest = 1;\n \n // for each value of n, run function p(n) numEachN times\n for (let i = 0; i < testSizes.length; i++) {\n let n = testSizes[i];\n\n for (let j = 0; j < numEachN; j++) {\n\n let ts = performance.now();\n let ans = p(n);\n let te = performance.now();\n let t = round(te - ts); // runtime of p(n), rounded to 4 d.p.\n \n console.log(\"p(\" + n + \") calculated to be \" + ans + \" in \" + t + \"ms\");\n\n // add the test number, test size, value of p(n) and runtime to the results array\n rows.push([currentTest, n, ans, t]);\n \n let message = \"Completed \" + currentTest + \" of \" + totalNumTests + \" tests\";\n console.log(message);\n\n currentTest++;\n }\n }\n \n // change the behaviour of the \"run tests\" button to reset the page\n document.getElementById(\"runTests\").innerHTML = \"Reset\";\n document.getElementById(\"runTests\").setAttribute(\"onclick\", \"resetAll()\");\n\n // if averages only has been set to true, then aggregate the results and draw charts\n if (avgsOnly) {\n // create a new results array of arrays with new headings\n let avgRows = [[\"n\", \"Number of tests\", \"p(n)\", \"Avg runtime (ms)\"]];\n // for each test size, find the portion of the results array relating to it\n for (let i = 0; i < testSizes.length; i++) {\n let subArr = rows.slice(1).slice(numEachN * i, numEachN * (i + 1));\n // aggregate the arrays into a single array containing the totals\n let totalsArr = subArr.reduce((x, y) => [testSizes[i], numEachN, x[2], x[3] + y[3]]);\n// console.log(totalsArr);\n // convert the totals into averages\n let avgsArr = totalsArr.map((x, i) => i < 3 ? x : round(x / numEachN));\n// console.log(avgsArr);\n // add the new row array to the results array\n avgRows.push(avgsArr);\n }\n // replace the original results array (of arrays) with this new array (of arrays)\n rows = avgRows.slice();\n \n // draw a chart with two line graphs: one of the runtimes, and the other a comparison formula\n\n // map each row in the results array to an (x, y) data point object,\n // where x is the test size (n) and y is the average runtime\n let dataPointsArr = avgRows.slice(1).map(function getData(row) {\n return {\n x: row[0],\n y: row[3]\n };\n });\n let name = \"p(n) average runtime\";\n let color = \"hsl(240, 50%, 50%)\"; // line and tooltip colour\n let dataObject = createChartDataObject(name, color, dataPointsArr); // chart data object\n // calculate an appropriate scaling factor to use for the comparison graph\n let divisorsArr = dataPointsArr.filter(obj => obj.x >= maxN - 5).map(obj => Math.pow(3, obj.x / 2) / obj.y);\n let divisor = Math.round(divisorsArr.reduce((x, y) => x + y) / divisorsArr.length); // scaling factor\n // \"comp\" stands for comparison\n let compName = \"1/\" + divisor + \" * 3^(n/2)\";\n let compColor = color.replace(\"50%)\", \"85%)\"); // lighter version of the line colour\n // map test sizes to a comparison data points array\n let compDataPointsArr = testSizes.map(function (n) {\n return {\n x: n,\n y: round(Math.pow(3, n / 2) / divisor)\n };\n });\n let compDataObject = createChartDataObject(compName, compColor, compDataPointsArr); // chart data object\n // create chart object\n let chart = createChart(\"chart\", \"p(n) Algorithm Runtimes\", [dataObject, compDataObject]);\n charts[0] = chart; // add it to the global collection\n drawChart(\"chart\", chart); // render it to the UI\n\n // hide the test case section and display the original input boxes in two rows\n document.getElementById(\"testCase\").setAttribute(\"class\", \"hidden\");\n document.getElementById(\"top\").setAttribute(\"class\", \"flexRow\");\n document.getElementById(\"bottom\").setAttribute(\"class\", \"flexRow\");\n }\n\n // create a CSV of the results\n let csvContent = \"data:text/csv;charset=utf-8,\";\n for(let i = 0; i < rows.length; i++) {\n let row = rows[i].join(\",\"); // for each row array, create a string of comma-separated values\n csvContent += row + \"\\r\\n\"; // ensure each row string is on a new line\n }\n \n // create a link to download the CSV file\n let encodedUri = encodeURI(csvContent);\n let link = document.getElementById(\"csvLink\"); // hidden HTML hyperlink element\n link.setAttribute(\"href\", encodedUri);\n link.setAttribute(\"download\", \"test_data.csv\"); // set the hyperlink to download the CSV\n link.setAttribute(\"class\", \"button\"); // unhide the HTML element and style it as a button\n link.innerHTML = \"Download results as CSV\";\n}", "function runNext(previousResult) {\n hello(true);\n clearTimeout(shutdownTimeout);\n var sendResults = false;\n if (typeof previousResult === 'undefined') {\n if (firstLaunch === true) {\n firstLaunch = false;\n consoleLog('[INFO] tests started at ' + new Date());\n } else if (waiting === true) {\n consoleLog('[INFO] tests resumed at ' + new Date());\n }\n } else {\n stopMonitoring();\n try {\n fs.unlinkSync(path.join(config.reportsBasePath, 'current.json'));\n } catch (e) {\n // Doesn't matter\n }\n runLog.push({\n name: previousResult.testName,\n start: previousResult.start,\n end: previousResult.end,\n duration: previousResult.duration,\n status: previousResult.status,\n dir: previousResult.resultDir\n });\n if (typeof config.dashboard !== \"undefined\" && typeof config.dashboard.address !== \"undefined\" && typeof config.dashboard.connect !== \"undefined\" && typeof config.dashboard.id !== \"undefined\" && config.dashboard.connect === true) {\n try {\n var report = JSON.parse(fs.readFileSync(path.join(previousResult.resultDir, 'report.json')).toString());\n } catch (e) {\n var report = {\n name: previousResult.testName,\n changelist: config.CHANGELIST,\n start: previousResult.start,\n duration: previousResult.duration,\n abstract: {\n passed: 0,\n total: 0,\n failures: 0,\n skipped: 0\n },\n status: previousResult.status\n };\n }\n sendResults = true;\n }\n state.done.push(previousResult.testName);\n doNotOverwriteState = false;\n try {\n fs.writeFileSync(path.join(config.reportsBasePath, 'state.json'), JSON.stringify(state));\n\n } catch (e) {\n consoleLog('[WARN] cannot write current state (1)', e);\n }\n try {\n fs.writeFileSync(path.join(previousResult.resultDir, 'runlog.json'), JSON.stringify(previousResult));\n } catch (e) {\n consoleLog('[WARN] cannot write job runlog (1)', e);\n }\n if (typeof previousResult.pom !== 'undefined' && previousResult.pom) {\n try {\n fs.writeFileSync(path.join(previousResult.resultDir, 'pom.json'), JSON.stringify(previousResult.pom));\n } catch (e) {\n consoleLog('[WARN] cannot write job pom (1)', e);\n }\n }\n try {\n fs.unlinkSync(path.join(previousResult.resultDir, '.manual'));\n } catch (e) {\n // Doesn't matter\n }\n try {\n fs.writeFileSync(path.join(previousResult.resultDir, '.auto'), 'true');\n } catch (e) {\n consoleLog('[WARN] cannot write job .auto flag (1)', e);\n }\n var status = 'UNKNOWN'.grey;\n if (previousResult.status === null) {\n status = 'FAILURE'.red;\n } else if (previousResult.status === false) {\n status = 'UNSTABLE'.yellow;\n } else if (previousResult.status === true) {\n status = 'SUCCESS'.green;\n }\n consoleLog('[INFO] ' + previousResult.testName.white.bold + ' --> '.grey + status.bold);\n var cleanup = temp.cleanup();\n if (typeof previousResult.tmpDir !== 'undefined') {\n try {\n rmdir(previousResult.tmpDir);\n } catch (e) {\n // Doesn't matter\n }\n }\n state.currentJob++;\n }\n if (shutDown === false) {\n waiting = false;\n killMainProcesses();\n exterminate(function() {\n if (shutDown === false) {\n if (typeof previousResult !== 'undefined') {\n getCrashlocationContentAfter();\n }\n getProcessListDiffAfter(function(diff) {\n if (typeof previousResult !== 'undefined' && diff !== null && (diff.less.length > 0 || diff.more.length > 0)) {\n var diffLog = '';\n if (diff.less.length > 0) {\n diffLog += '-- Lost Processes (killed during the test):\\n';\n diff.less.forEach(function(proc) {\n diffLog += '\\t' + proc.pid + '\\t' + proc.cmd + '\\n';\n });\n diffLog += ' \\n\\n';\n }\n if (diff.more.length > 0) {\n diffLog += '++ Additional Processes (spawned during the test):\\n';\n diff.more.forEach(function(proc) {\n diffLog += '\\t' + proc.pid + '\\t' + proc.cmd + '\\n';\n });\n diffLog += ' \\n\\n';\n }\n try {\n fs.writeFileSync(path.join(previousResult.resultDir, 'procdiff.txt'), diffLog);\n } catch (e) {\n consoleLog('[WARN] cannot archive process diff (1)', e);\n }\n }\n if (typeof previousResult !== 'undefined' && crashes.length > 0) {\n consoleLog('[WARN] test ' + previousResult.testName + ' produced ' + crashes.length + ' crash(es)');\n for (var i = 0; i < crashes.length; i++) {\n if (/server/i.test(crashes[i])) {\n var crashName = 'server_crash_' + (i + 1) + path.extname(crashes[i]);\n } else if (/studio/i.test(crashes[i])) {\n var crashName = 'studio_crash_' + (i + 1) + path.extname(crashes[i]);\n } else if (/4d/i.test(crashes[i])) {\n var crashName = '4d_crash_' + (i + 1) + path.extname(crashes[i]);\n } else {\n var crashName = 'other_crash_' + (i + 1) + path.extname(crashes[i]);\n }\n try {\n copyFileSync(crashes[i], path.join(previousResult.resultDir, crashName));\n } catch (e) {\n consoleLog('[WARN] cannot archive crash log', e);\n }\n }\n }\n if (typeof previousResult !== 'undefined' && sendResults === true) {\n if (typeof config.dashboard !== \"undefined\" && typeof config.dashboard.connect !== \"undefined\" && typeof config.dashboard.id !== \"undefined\" && config.dashboard.connect === true) {\n try {\n var results = JSON.parse(fs.readFileSync(path.join(previousResult.resultDir, 'report.json')).toString());\n } catch (e) {\n var results = {\n name: previousResult.testName,\n start: previousResult.start,\n end: previousResult.end,\n duration: previousResult.duration,\n abstract: {\n passed: 0,\n total: 0,\n failures: 0,\n skipped: 0\n },\n status: previousResult.status\n };\n }\n var msg = {\n id: config.dashboard.id,\n changelist: config.CHANGELIST,\n productBranch: config.WAKANDA_BRANCH,\n results: {\n name: results.name,\n start: results.start,\n end: results.end,\n duration: results.duration,\n abstract: {\n passed: results.abstract.passed,\n total: results.abstract.total,\n failures: results.abstract.failures,\n skipped: results.abstract.skipped\n },\n status: results.status,\n crashes: crashes.length\n }\n };\n var pom = getPomForTest(results.name);\n if (isMac()) {\n msg.os = 'mac';\n } else if (isLinux()) {\n msg.os = 'linux';\n } else if (isWindows()) {\n msg.os = 'windows';\n }\n if (pom && typeof pom.tester !== 'undefined' && pom.tester && pom.tester != '') {\n msg.results.tester = pom.tester;\n }\n if (pom && typeof pom.developer !== 'undefined' && pom.developer && pom.developer != '') {\n msg.results.developer = pom.developer;\n }\n if (pom && typeof pom.uuid !== 'undefined') {\n msg.results.uuid = pom.uuid;\n }\n if (pom && typeof pom.bench !== 'undefined' && (pom.bench === true || pom.bench === 'true')) {\n msg.results.isbench = true;\n var CSVFilePath = path.join(previousResult.resultDir, 'result.csv');\n try {\n var CSVStat = fs.statSync(CSVFilePath);\n } catch (e) {\n var CSVStat = false;\n }\n if (CSVStat && CSVStat.isFile()) {\n msg.results.benchdata = fs.readFileSync(CSVFilePath).toString();\n } else {\n msg.results.benchdata = null;\n }\n }\n if (typeof config.subversion === 'string') {\n msg.subVersion = config.subversion.toLowerCase();\n } else {\n msg.subVersion = '';\n }\n try {\n socket.emit('results', JSON.stringify(msg));\n consoleLog('[INFO] just sent \"results\" to the Hub (1)...');\n } catch (e) {\n consoleLog('[ERROR] could not send \"results\" to the Hub (1): ' + e);\n }\n }\n }\n if (state.currentJob > -1 && state.queue.length > 0 && state.currentJob < state.queue.length) {\n clearTimeout(shutdownTimeout);\n consoleLog('[INFO] next (' + (state.currentJob + 1) + '/' + state.queue.length + ')');\n setTimeout(function() {\n runTest(state.queue[state.currentJob], runNext, true);\n }, 125);\n } else if (downloadingNewWakandaBuildDone === false && downloadingNewWakandaInstallerDone === true) {\n clearTimeout(shutdownTimeout);\n consoleLog('[INFO] tests related to the new Wakanda Installers completed at ' + new Date() + ', now waiting 6 hours max. for the new Wakanda Builds (>' + previousChangelist + ')...');\n waiting = true;\n shutdownTimeout = setTimeout(function() {\n shutdown(true);\n }, 6 * 60 * 60 * 1000); // 6h\n } else if (downloadingNewWakandaInstallerDone === false && downloadingNewWakandaBuildDone === true) {\n clearTimeout(shutdownTimeout);\n consoleLog('[WARN] tests related to the new Wakanda Builds completed at ' + new Date() + ', but the new Wakanda Installers are not available (>' + previousChangelist + '): waiting 3 hours max. then shutting down!');\n waiting = true;\n shutdownTimeout = setTimeout(function() {\n shutdown(true);\n }, 4 * 60 * 60 * 1000); // 4h\n } else if (isLinux() === false && downloadingNew4DBuildDone === false && downloadingNewWakandaBuildDone === true) {\n clearTimeout(shutdownTimeout);\n consoleLog('[WARN] tests related to the new Wakanda Builds completed at ' + new Date() + ', but the new 4D Server is not available: will use an old one!');\n if (isMac()) {\n var wakApps = findFiles(config.BUILD_TEST_DIR, /^4d.*server$/i);\n wakApps.forEach(function(wakApp) {\n current4DServerPath = wakApp;\n });\n } else if (isWindows()) {\n var wakApps = findFiles(config.BUILD_TEST_DIR, /^4d.*\\.exe$/i);\n wakApps.forEach(function(wakApp) {\n current4DServerPath = wakApp;\n });\n }\n consoleLog('[INFO] old 4D build (' + current4DServerPath + ') will be used');\n downloadingNew4DBuild = true;\n downloadingNew4DBuildDone = true;\n downloadingNew4DBuildExpect = 0;\n state.queue = state.queue.concat(getAvailableJobs(function(item) {\n if (/(4d(?!p))/i.test(item)) {\n return true;\n } else {\n return false;\n }\n }));\n shutdownTimeout = setTimeout(function() {\n runNext();\n }, 125);\n } else {\n consoleLog('[INFO] finishing tests, please wait...');\n clearTimeout(shutdownTimeout);\n if (runFromWeb === true || (process.argv.length > 2 && (process.argv[2] === 'run' || process.argv[2] === 'resume'))) {\n shutdown(true);\n } else {\n waiting = true;\n shutdownTimeout = setTimeout(function() {\n shutdown(true);\n }, 125);\n }\n }\n });\n }\n });\n }\n}", "function runAllTestCasesRecursive() {\n $log.info('Attempting to run all tests');\n var testQueue = [];\n if (vm.testNamesToRun.length == 0) {\n testQueue = angular.copy(vm.testCases);\n } else {\n for (var i = 0; i < vm.testCases.length; i++) {\n for (var j = 0; j < vm.testNamesToRun.length; j++) {\n if (vm.testCases[i].testName === vm.testNamesToRun[j]) {\n testQueue.push(vm.testCases[i]);\n }\n }\n }\n }\n runTestCasesRecursionBody(testQueue);\n vm.tableParams.reload();\n }", "function main(numberOfJobs = 5000) {\n const startTime = Date.now();\n\n [...Array(numberOfJobs).keys()].forEach(function startJob(_, index) {\n if (index == 0 || index == numberOfJobs - 1) {\n return job({ startTime: startTime, logging: true });\n }\n return job();\n // return job({ logging: true });\n });\n}", "runTearDownTasks() {\n while (this.tearDownTasks.length) {\n this.tearDownTasks.shift()()\n }\n }", "initiate(url){\n console.log(`\\nKicking off with base url ${url} \\n`);\n \n //create workers\n for(let i=0; i<maxConcurrent; i++){\n let worker = new Worker();\n this.workers.set(worker, IDLE);\n }\n\n //start distributing\n this.pushToTaskQueue([url]);\n this.distribute();\n }", "async function run1BrowserNiterations({\n headless,\n iterations,\n hostname,\n port,\n verbose,\n}) {\n const scores = await getOctane1BrowserNIterations({\n headless,\n iterations,\n hostname,\n port,\n verbose,\n });\n displayResult({\n description: `Open ${\n headless ? \"headless\" : \"\"\n } browser, repeat ${iterations} times: open a tab and calculate Octane`,\n scores,\n });\n}", "function testEverything() {\n function next() {\n var waiting =\n chrome.extension.inIncognitoContext ? \"waiting_incognito\" : \"waiting\";\n chrome.test.sendMessage(waiting, function(messageJson) {\n // We will get empty messages, which are considered a noop.\n var message = { action: 'noop', isFinalAction: false, namespace: 'sync' };\n if (messageJson.length != 0) {\n message = JSON.parse(messageJson);\n }\n var action = testActions[message.action];\n if (!action) {\n chrome.test.fail(\"Unknown action: \" + message.action);\n return;\n }\n action.bind(chrome.storage[message.namespace])(\n message.isFinalAction ? chrome.test.succeed : next);\n });\n }\n next();\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 Test_All() {\n return __awaiter(this, void 0, void 0, function () {\n var new_listener_port, farm_members, _i, _a, farm_member, enum_connection, _b, _c, connecton, hub_log_settings, enum_ca, _d, _e, ca, enum_link, _f, _g, link, enum_session, _h, _j, session, enum_mac, _k, _l, mac, enum_ip, _m, _o, ip, enum_crl, _p, _q, crl, got_crl, _r, _s, crl, enum_log_file, _t, _u, log, enum_etherip_id, _v, _w, etherip_id;\n return __generator(this, function (_x) {\n switch (_x.label) {\n case 0:\n hub_name = \"TEST\";\n return [4 /*yield*/, Test_Test()];\n case 1:\n _x.sent();\n return [4 /*yield*/, Test_GetServerInfo()];\n case 2:\n _x.sent();\n return [4 /*yield*/, Test_GetServerStatus()];\n case 3:\n _x.sent();\n return [4 /*yield*/, Test_CreateListener()];\n case 4:\n new_listener_port = _x.sent();\n return [4 /*yield*/, Test_EnableListener(new_listener_port, false)];\n case 5:\n _x.sent();\n return [4 /*yield*/, Test_EnumListener()];\n case 6:\n _x.sent();\n return [4 /*yield*/, Test_EnableListener(new_listener_port, true)];\n case 7:\n _x.sent();\n return [4 /*yield*/, Test_EnumListener()];\n case 8:\n _x.sent();\n return [4 /*yield*/, Test_DeleteListener(new_listener_port)];\n case 9:\n _x.sent();\n return [4 /*yield*/, Test_SetServerPassword()];\n case 10:\n _x.sent();\n return [4 /*yield*/, Test_GetFarmSetting()];\n case 11:\n _x.sent();\n if (!false) return [3 /*break*/, 19];\n return [4 /*yield*/, Test_SetFarmSetting()];\n case 12:\n _x.sent();\n return [4 /*yield*/, Test_EnumFarmMember()];\n case 13:\n farm_members = _x.sent();\n _i = 0, _a = farm_members.FarmMemberList;\n _x.label = 14;\n case 14:\n if (!(_i < _a.length)) return [3 /*break*/, 17];\n farm_member = _a[_i];\n return [4 /*yield*/, Test_GetFarmInfo(farm_member.Id_u32)];\n case 15:\n _x.sent();\n _x.label = 16;\n case 16:\n _i++;\n return [3 /*break*/, 14];\n case 17: return [4 /*yield*/, Test_GetFarmConnectionStatus()];\n case 18:\n _x.sent();\n return [3 /*break*/, 20];\n case 19:\n if (false) {\n console.log(\"abc\");\n }\n else {\n console.log(\"def\");\n }\n _x.label = 20;\n case 20: return [4 /*yield*/, Test_GetServerCert()];\n case 21:\n _x.sent();\n return [4 /*yield*/, Test_SetServerCert()];\n case 22:\n _x.sent();\n return [4 /*yield*/, Test_GetServerCipher()];\n case 23:\n _x.sent();\n return [4 /*yield*/, Test_SetServerCipher()];\n case 24:\n _x.sent();\n return [4 /*yield*/, Test_EnumConnection()];\n case 25:\n enum_connection = _x.sent();\n _b = 0, _c = enum_connection.ConnectionList;\n _x.label = 26;\n case 26:\n if (!(_b < _c.length)) return [3 /*break*/, 29];\n connecton = _c[_b];\n return [4 /*yield*/, Test_GetConnectionInfo(connecton.Name_str)];\n case 27:\n _x.sent();\n _x.label = 28;\n case 28:\n _b++;\n return [3 /*break*/, 26];\n case 29: return [4 /*yield*/, Test_CreateHub()];\n case 30:\n hub_name = _x.sent();\n return [4 /*yield*/, Test_SetHub()];\n case 31:\n _x.sent();\n return [4 /*yield*/, Test_GetHub()];\n case 32:\n _x.sent();\n return [4 /*yield*/, Test_EnumHub()];\n case 33:\n _x.sent();\n return [4 /*yield*/, Test_SetHubRadius()];\n case 34:\n _x.sent();\n return [4 /*yield*/, Test_GetHubRadius()];\n case 35:\n _x.sent();\n return [4 /*yield*/, Test_SetHubOnline()];\n case 36:\n _x.sent();\n return [4 /*yield*/, Test_GetHubStatus()];\n case 37:\n _x.sent();\n return [4 /*yield*/, Test_GetHubLog()];\n case 38:\n hub_log_settings = _x.sent();\n return [4 /*yield*/, Test_SetHubLog(hub_log_settings)];\n case 39:\n _x.sent();\n return [4 /*yield*/, Test_AddCa()];\n case 40:\n _x.sent();\n return [4 /*yield*/, Test_EnumCa()];\n case 41:\n enum_ca = _x.sent();\n _d = 0, _e = enum_ca.CAList;\n _x.label = 42;\n case 42:\n if (!(_d < _e.length)) return [3 /*break*/, 46];\n ca = _e[_d];\n return [4 /*yield*/, Test_GetCa(ca.Key_u32)];\n case 43:\n _x.sent();\n return [4 /*yield*/, Test_DeleteCa(ca.Key_u32)];\n case 44:\n _x.sent();\n _x.label = 45;\n case 45:\n _d++;\n return [3 /*break*/, 42];\n case 46: return [4 /*yield*/, Test_CreateLink()];\n case 47:\n _x.sent();\n return [4 /*yield*/, Test_GetLink()];\n case 48:\n _x.sent();\n return [4 /*yield*/, Test_SetLink()];\n case 49:\n _x.sent();\n return [4 /*yield*/, Test_SetLinkOffline()];\n case 50:\n _x.sent();\n return [4 /*yield*/, Test_SetLinkOnline()];\n case 51:\n _x.sent();\n return [4 /*yield*/, Test_EnumLink()];\n case 52:\n enum_link = _x.sent();\n _f = 0, _g = enum_link.LinkList;\n _x.label = 53;\n case 53:\n if (!(_f < _g.length)) return [3 /*break*/, 56];\n link = _g[_f];\n return [4 /*yield*/, Test_GetLinkStatus(link.AccountName_utf)];\n case 54:\n _x.sent();\n _x.label = 55;\n case 55:\n _f++;\n return [3 /*break*/, 53];\n case 56: return [4 /*yield*/, new Promise(function (r) { return setTimeout(r, 3000); })];\n case 57:\n _x.sent();\n return [4 /*yield*/, Test_RenameLink()];\n case 58:\n _x.sent();\n return [4 /*yield*/, Test_DeleteLink()];\n case 59:\n _x.sent();\n return [4 /*yield*/, Test_AddAccess()];\n case 60:\n _x.sent();\n return [4 /*yield*/, Test_EnumAccess()];\n case 61:\n _x.sent();\n return [4 /*yield*/, Test_DeleteAccess()];\n case 62:\n _x.sent();\n return [4 /*yield*/, Test_SetAccessList()];\n case 63:\n _x.sent();\n return [4 /*yield*/, Test_CreateGroup()];\n case 64:\n _x.sent();\n return [4 /*yield*/, Test_SetGroup()];\n case 65:\n _x.sent();\n return [4 /*yield*/, Test_GetGroup()];\n case 66:\n _x.sent();\n return [4 /*yield*/, Test_CreateUser()];\n case 67:\n _x.sent();\n return [4 /*yield*/, Test_SetUser()];\n case 68:\n _x.sent();\n return [4 /*yield*/, Test_GetUser()];\n case 69:\n _x.sent();\n return [4 /*yield*/, Test_EnumUser()];\n case 70:\n _x.sent();\n return [4 /*yield*/, Test_EnumGroup()];\n case 71:\n _x.sent();\n return [4 /*yield*/, Test_DeleteUser()];\n case 72:\n _x.sent();\n return [4 /*yield*/, Test_DeleteGroup()];\n case 73:\n _x.sent();\n return [4 /*yield*/, Test_EnumSession()];\n case 74:\n enum_session = _x.sent();\n _h = 0, _j = enum_session.SessionList;\n _x.label = 75;\n case 75:\n if (!(_h < _j.length)) return [3 /*break*/, 79];\n session = _j[_h];\n return [4 /*yield*/, Test_GetSessionStatus(session.Name_str)];\n case 76:\n _x.sent();\n return [4 /*yield*/, Test_DeleteSession(session.Name_str)];\n case 77:\n _x.sent();\n _x.label = 78;\n case 78:\n _h++;\n return [3 /*break*/, 75];\n case 79: return [4 /*yield*/, Test_EnumMacTable()];\n case 80:\n enum_mac = _x.sent();\n _k = 0, _l = enum_mac.MacTable;\n _x.label = 81;\n case 81:\n if (!(_k < _l.length)) return [3 /*break*/, 84];\n mac = _l[_k];\n return [4 /*yield*/, Test_DeleteMacTable(mac.Key_u32)];\n case 82:\n _x.sent();\n _x.label = 83;\n case 83:\n _k++;\n return [3 /*break*/, 81];\n case 84: return [4 /*yield*/, Test_EnumIpTable()];\n case 85:\n enum_ip = _x.sent();\n _m = 0, _o = enum_ip.IpTable;\n _x.label = 86;\n case 86:\n if (!(_m < _o.length)) return [3 /*break*/, 89];\n ip = _o[_m];\n return [4 /*yield*/, Test_DeleteIpTable(ip.Key_u32)];\n case 87:\n _x.sent();\n _x.label = 88;\n case 88:\n _m++;\n return [3 /*break*/, 86];\n case 89: return [4 /*yield*/, Test_SetKeep()];\n case 90:\n _x.sent();\n return [4 /*yield*/, Test_GetKeep()];\n case 91:\n _x.sent();\n return [4 /*yield*/, Test_EnableSecureNAT()];\n case 92:\n _x.sent();\n return [4 /*yield*/, Test_GetSecureNATOption()];\n case 93:\n _x.sent();\n return [4 /*yield*/, Test_SetSecureNATOption()];\n case 94:\n _x.sent();\n return [4 /*yield*/, Test_EnumNAT()];\n case 95:\n _x.sent();\n return [4 /*yield*/, Test_EnumDHCP()];\n case 96:\n _x.sent();\n return [4 /*yield*/, Test_GetSecureNATStatus()];\n case 97:\n _x.sent();\n return [4 /*yield*/, Test_DisableSecureNAT()];\n case 98:\n _x.sent();\n return [4 /*yield*/, Test_EnumEthernet()];\n case 99:\n _x.sent();\n return [4 /*yield*/, Test_EnumLocalBridge()];\n case 100:\n _x.sent();\n return [4 /*yield*/, Test_GetBridgeSupport()];\n case 101:\n _x.sent();\n return [4 /*yield*/, Test_GetCaps()];\n case 102:\n _x.sent();\n return [4 /*yield*/, Test_GetConfig()];\n case 103:\n _x.sent();\n return [4 /*yield*/, Test_GetDefaultHubAdminOptions()];\n case 104:\n _x.sent();\n return [4 /*yield*/, Test_GetHubAdminOptions()];\n case 105:\n _x.sent();\n return [4 /*yield*/, Test_SetHubAdminOptions()];\n case 106:\n _x.sent();\n return [4 /*yield*/, Test_GetHubExtOptions()];\n case 107:\n _x.sent();\n return [4 /*yield*/, Test_SetHubExtOptions()];\n case 108:\n _x.sent();\n return [4 /*yield*/, Test_AddL3Switch()];\n case 109:\n _x.sent();\n return [4 /*yield*/, Test_AddL3If()];\n case 110:\n _x.sent();\n return [4 /*yield*/, Test_EnumL3Switch()];\n case 111:\n _x.sent();\n return [4 /*yield*/, Test_EnumL3If()];\n case 112:\n _x.sent();\n return [4 /*yield*/, Test_AddL3Table()];\n case 113:\n _x.sent();\n return [4 /*yield*/, Test_EnumL3Table()];\n case 114:\n _x.sent();\n return [4 /*yield*/, Test_DelL3Table()];\n case 115:\n _x.sent();\n return [4 /*yield*/, Test_StartL3Switch()];\n case 116:\n _x.sent();\n return [4 /*yield*/, Test_StopL3Switch()];\n case 117:\n _x.sent();\n return [4 /*yield*/, Test_DelL3If()];\n case 118:\n _x.sent();\n return [4 /*yield*/, Test_DelL3Switch()];\n case 119:\n _x.sent();\n return [4 /*yield*/, Test_AddCrl()];\n case 120:\n _x.sent();\n return [4 /*yield*/, Test_EnumCrl()];\n case 121:\n enum_crl = _x.sent();\n _p = 0, _q = enum_crl.CRLList;\n _x.label = 122;\n case 122:\n if (!(_p < _q.length)) return [3 /*break*/, 126];\n crl = _q[_p];\n return [4 /*yield*/, Test_GetCrl(crl.Key_u32)];\n case 123:\n got_crl = _x.sent();\n got_crl.CommonName_utf = got_crl.CommonName_utf + \"_a\";\n return [4 /*yield*/, Test_SetCrl(got_crl)];\n case 124:\n _x.sent();\n _x.label = 125;\n case 125:\n _p++;\n return [3 /*break*/, 122];\n case 126: return [4 /*yield*/, Test_EnumCrl()];\n case 127:\n enum_crl = _x.sent();\n _r = 0, _s = enum_crl.CRLList;\n _x.label = 128;\n case 128:\n if (!(_r < _s.length)) return [3 /*break*/, 131];\n crl = _s[_r];\n return [4 /*yield*/, Test_DelCrl(crl.Key_u32)];\n case 129:\n _x.sent();\n _x.label = 130;\n case 130:\n _r++;\n return [3 /*break*/, 128];\n case 131: return [4 /*yield*/, Test_SetAcList()];\n case 132:\n _x.sent();\n return [4 /*yield*/, Test_GetAcList()];\n case 133:\n _x.sent();\n return [4 /*yield*/, Test_EnumLogFile()];\n case 134:\n enum_log_file = _x.sent();\n _t = 0, _u = enum_log_file.LogFiles;\n _x.label = 135;\n case 135:\n if (!(_t < _u.length)) return [3 /*break*/, 138];\n log = _u[_t];\n return [4 /*yield*/, Test_ReadLogFile(log.FilePath_str)];\n case 136:\n _x.sent();\n return [3 /*break*/, 138];\n case 137:\n _t++;\n return [3 /*break*/, 135];\n case 138: return [4 /*yield*/, Test_SetSysLog(true)];\n case 139:\n _x.sent();\n return [4 /*yield*/, Test_GetSysLog()];\n case 140:\n _x.sent();\n return [4 /*yield*/, Test_SetSysLog(false)];\n case 141:\n _x.sent();\n return [4 /*yield*/, Test_SetHubMsg()];\n case 142:\n _x.sent();\n return [4 /*yield*/, Test_GetHubMsg()];\n case 143:\n _x.sent();\n return [4 /*yield*/, Test_GetAdminMsg()];\n case 144:\n _x.sent();\n return [4 /*yield*/, Test_Flush()];\n case 145:\n _x.sent();\n return [4 /*yield*/, Test_SetIPsecServices()];\n case 146:\n _x.sent();\n return [4 /*yield*/, Test_GetIPsecServices()];\n case 147:\n _x.sent();\n return [4 /*yield*/, Test_AddEtherIpId()];\n case 148:\n _x.sent();\n return [4 /*yield*/, Test_EnumEtherIpId()];\n case 149:\n enum_etherip_id = _x.sent();\n _v = 0, _w = enum_etherip_id.Settings;\n _x.label = 150;\n case 150:\n if (!(_v < _w.length)) return [3 /*break*/, 154];\n etherip_id = _w[_v];\n return [4 /*yield*/, Test_GetEtherIpId(etherip_id.Id_str)];\n case 151:\n _x.sent();\n return [4 /*yield*/, Test_DeleteEtherIpId(etherip_id.Id_str)];\n case 152:\n _x.sent();\n _x.label = 153;\n case 153:\n _v++;\n return [3 /*break*/, 150];\n case 154: return [4 /*yield*/, Test_SetOpenVpnSstpConfig()];\n case 155:\n _x.sent();\n return [4 /*yield*/, Test_GetOpenVpnSstpConfig()];\n case 156:\n _x.sent();\n return [4 /*yield*/, Test_GetDDnsClientStatus()];\n case 157:\n _x.sent();\n return [4 /*yield*/, Test_SetDDnsInternetSettng()];\n case 158:\n _x.sent();\n return [4 /*yield*/, Test_GetDDnsInternetSettng()];\n case 159:\n _x.sent();\n return [4 /*yield*/, Test_ChangeDDnsClientHostname()];\n case 160:\n _x.sent();\n return [4 /*yield*/, Test_RegenerateServerCert()];\n case 161:\n _x.sent();\n return [4 /*yield*/, Test_MakeOpenVpnConfigFile()];\n case 162:\n _x.sent();\n return [4 /*yield*/, Test_SetSpecialListener()];\n case 163:\n _x.sent();\n return [4 /*yield*/, Test_GetSpecialListener()];\n case 164:\n _x.sent();\n return [4 /*yield*/, Test_GetAzureStatus()];\n case 165:\n _x.sent();\n return [4 /*yield*/, Test_SetAzureStatus()];\n case 166:\n _x.sent();\n return [4 /*yield*/, Test_SetVgsConfig()];\n case 167:\n _x.sent();\n return [4 /*yield*/, Test_GetVgsConfig()];\n case 168:\n _x.sent();\n return [4 /*yield*/, Test_DeleteHub()];\n case 169:\n _x.sent();\n return [2 /*return*/];\n }\n });\n });\n}" ]
[ "0.6993691", "0.6454532", "0.64185894", "0.63561773", "0.629008", "0.6249886", "0.6171251", "0.61491233", "0.61013246", "0.6087901", "0.60600585", "0.60472065", "0.60472065", "0.6046934", "0.60169166", "0.5974415", "0.5932966", "0.59263813", "0.5926331", "0.5926331", "0.59197944", "0.591433", "0.5894946", "0.5878452", "0.5871484", "0.58381164", "0.5832862", "0.5823852", "0.57996434", "0.5798375", "0.57907695", "0.57886237", "0.57774496", "0.5744785", "0.5739619", "0.57238877", "0.571877", "0.5718649", "0.57098776", "0.569333", "0.56862307", "0.5683492", "0.56509286", "0.56505466", "0.5645244", "0.56445384", "0.5630816", "0.56260127", "0.56076777", "0.5596915", "0.55598915", "0.55487835", "0.5542879", "0.55389094", "0.55196965", "0.5514902", "0.54977715", "0.5494661", "0.54927456", "0.54920536", "0.54730976", "0.54691046", "0.5467901", "0.5466338", "0.5455174", "0.545311", "0.5438957", "0.5434551", "0.5434442", "0.5431256", "0.5426916", "0.5425138", "0.54189175", "0.5417304", "0.54172474", "0.54145867", "0.5404299", "0.5381246", "0.53771406", "0.5367099", "0.53548867", "0.5354276", "0.5349426", "0.53476006", "0.53444684", "0.53398407", "0.53398407", "0.53398407", "0.5334325", "0.5323859", "0.5320226", "0.53168154", "0.53157705", "0.53153646", "0.53059006", "0.5303028", "0.53015155", "0.5293788", "0.52914816", "0.52849835" ]
0.6556837
1
executes a single test attempt
async function _TestAttempt(Test, attemptId) { const attemptRun = new TestRun(TestsStarted); attemptRun.setAttempt(attemptId, Config.Retries); const test = new Test(); await test.startup(); try { let threads = []; if (Config.ConcurrencyLevel > 1) console.log(`Starting ${Config.ConcurrencyLevel} test threads`); for (let threadId = 1; threadId <= Config.ConcurrencyLevel; ++threadId) { const threadRun = attemptRun.clone(); threadRun.setThread(threadId, Config.ConcurrencyLevel); threads.push(_TestThread(test, threadRun)); } if (Config.ConcurrencyLevel > 1) console.log(`Started all ${Config.ConcurrencyLevel} test threads.`); await Promise.all(threads); if (Config.ConcurrencyLevel > 1) console.log(`Finished all ${Config.ConcurrencyLevel} test threads.`); } finally { console.log(`Shutting down DUT`); await test.shutdown(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 testRun()\r\n{\r\n}", "attempt() {}", "async runTest() {}", "function runWithResult( result/* : TestResult*/ )/* : void*/\n {\n result.run( this );\n }", "function single_test(index, jiff_instance, mpc_operator, open_operator) {\n var numbers = tests[index];\n var party_index = jiff_instance.id - 1;\n var shares = jiff_instance.share(numbers[party_index]);\n\n // Apply operation on shares\n var res = operations[mpc_operator](shares[1], numbers[1]);\n\n var deferred = $.Deferred();\n res.open().then(function (result) {\n test_output(index, result, open_operator);\n deferred.resolve();\n }, error);\n return deferred.promise();\n}", "execute() {}", "execute() {}", "function testSinglePlan_Insert() {\n asyncTestCase.waitForAsync('testSinglePlan_Insert');\n assertEquals(0, cache.getCount());\n\n var queryTask = new lf.proc.UserQueryTask(\n hr.db.getGlobal(), [getSampleQuery()]);\n queryTask.exec().then(function() {\n return lf.testing.util.selectAll(global, j);\n }).then(function(results) {\n assertEquals(ROW_COUNT, results.length);\n assertEquals(ROW_COUNT, cache.getCount());\n for (var i = 0; i < ROW_COUNT; ++i) {\n assertEquals(rows[i].id(), results[i].id());\n assertObjectEquals(rows[i].payload(), results[i].payload());\n }\n asyncTestCase.continueTesting();\n }, fail);\n}", "function runAct(token) {\n try {\n var start = performance.now()\n , done = runActDone.bind(null, token, start);\n\n token.testObj.act.exec([done]);\n\n //if the act function has zero parameters then we can execute done\n if (token.testObj.act.params.length === 0) {\n done(0, true);\n }\n }\n catch (ex) {\n handlerError(token, ex);\n }\n }", "function runNext() {\n var test = tests[at++];\n if (test) {\n setTimeout( function() {\n compare(test.func,\n window[test.func],\n window[test.func + \"_backported\"],\n test.driver);\n runNext();\n }, 20);\n }\n }", "function next() {\n\t\t\tif (aTests.length) {\n\t\t\t\treturn runTest(aTests.shift());\n\t\t\t} else if (!iRunningTests) {\n\t\t\t\toTotal.element.classList.remove(\"hidden\");\n\t\t\t\toTotal.element.firstChild.classList.add(\"running\");\n\t\t\t\tsummary(Date.now() - iStart);\n\t\t\t\tif (oFirstFailedTest) {\n\t\t\t\t\tselect(oFirstFailedTest);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "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}", "function runTest(){\n var test = testCollection.shift();\n currentTest = test;\n if(!test){\n testResults.isPassed = true;\n endTest();\n return;\n }\n //reset tmpTimeout for every run.\n tmpTimeout = 0;\n testUtil.done = function(){\n test.end = new Date();\n if(timeoutHandle !== null){\n clearTimeout(timeoutHandle);\n }\n if(test.tearDown) test.tearDown();\n console.log(util.format(\"Test %s finished - run time: %d\\n\", test.name, test.end-test.start));\n runTest();\n };\n try{\n testResults.runTests++;\n timeoutHandle = setTimeout(timeoutError, testTimeout);\n test.start = new Date();\n console.log(util.format(\"\\nTest %s started\", test.name));\n if(test.setUp) test.setUp();\n log.debug(\"before calling test handler\");\n test.handler(testUtil);\n log.debug(\"after calling test handler\");\n }\n catch(e){\n //handle skip test;\n handleError(e);\n }\n}", "function test() {\n runTests0();\n runTests1(); \n return true;\n}", "function doTest() {\n\n // 1. Run the script action when the script is loaded - For scenario 1\n lookupNextMeeting();\n\n // 2. Check for result after waiting for an enough LONG time\n host.setTimeout(function () { checkForCases(); }, 15000);\n}", "function run(__index) {\n __index++;\n\n var obj = tests[__index];\n // All data in the query gets the strings replaced which are placed into the config.json in the root directory.\n obj.data.data = jsonTools.parseConfigIntoJSONObject(config, obj.data.data);\n // Same for the REST API Link\n var parsed_request_url = jsonTools.parseConfigIntoTemplateString(config, obj.data.path);\n\n // Logging the Method and URL after Parse here\n console.log(obj.data.method + ' ' + parsed_request_url);\n\n fetch(parsed_request_url, {\n method: obj.data.method,\n body: JSON.stringify(obj.data.data),\n headers: { 'Content-Type': 'application/json' }\n })\n .then((result) => result.json())\n .then((json) => {\n console.log('\\n ' + JSON.stringify(json));\n console.log(' As expected? ' + (JSON.stringify(json)==JSON.stringify(obj.data.expected)) + '\\n');\n run(__index);\n })\n .catch((err) => {\n console.log('\\n' + ' Response was empty(probably, todo: more error handling)');\n console.log(' As expected? ' + (null==obj.data.expected) + '\\n');\n });\n}", "function next() {\n\t\t\tif (aTests.length) {\n\t\t\t\trunTest(aTests.shift());\n\t\t\t} else if (!iRunningTests) {\n\t\t\t\toTotal.element.classList.remove(\"hidden\");\n\t\t\t\toTotal.element.firstChild.classList.add(\"running\");\n\t\t\t\tsummary(Date.now() - iStart);\n\t\t\t\tsaveLastRun(mLastRun);\n\t\t\t\tif (oFirstFailedTest) {\n\t\t\t\t\tselect(oFirstFailedTest);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function testSwitcher(count) {\r\n if (count < selectedTestList.length) {\r\n try {\r\n eval(selectedTestList[count] + \"()\");\r\n } catch(err) {\r\n console.log(\"Error while eval function \" + selectedTestList[count], err);\r\n }\r\n } else {\r\n done();\r\n }\r\n}", "function test(msg, run){\n\t\t\tTimer.start(msg);\n\t\t\tvar activeTest = {\n\t\t\t\tname: msg\n\t\t\t};\n\t\t\tactiveSuite.tests.push(activeTest);\n\t\t\ttry {\n\t\t\t\trun();\n\t\t\t\tactiveSuite.passedTestsCount++;\n\t\t\t\tactiveTest.duration = Timer.stop(msg);\n\t\t\t} catch(e) {\n\t\t\t\tactiveTest.duration = Timer.stop(msg);\n\t\t\t\tactiveTest.error = true;\n\t\t\t\tactiveSuite.error = true;\n\t\t\t\tactiveSuite.failedTestsCount++;\n\t\t\t\tif(e.name == \"AssertionError\"){\n\t\t\t\t\tactiveTest.message = e.message;\n\t\t\t\t\tactiveTest.actual = \"\" + e.actual;\n\t\t\t\t\tactiveTest.expected = \"\" + e.expected;\n\t\t\t\t} else {\n\t\t\t\t\tactiveTest.message = \"Error: \" + e;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "async attemptTestRunStart() {\n\n\t\t// Get concurrency first\n\t\t// And log it if its currently exceeded\n\t\tlet concurrency = await SpaceAndProjectApi.getProjectConcurrency( this.projectID );\n\n\t\t// Plan is not allowed to run test : Fail now - HARD !\n\t\tif( concurrency.total <= 0 ) {\n\t\t\tOutputHandler.fatalError(`No concurrency avaliable (total=0) - please update your settings / concurrency plan`, null, 16);\n\t\t\tprocess.exit(16)\n\t\t}\n\n\t\t// Safety net, due to the possibility of file renaming race condition: validate script path\n\t\t// also terminate quickly tests, with invalid filepaths\n\t\tawait this.validateScriptPath();\n\n\t\t// Skip, as concurrency is not sufficent (existing test runs)\n\t\tif( concurrency.avaliable <= 0 ) {\n\t\t\tOutputHandler.standard(`> Maximum test concurrency exceeded (${concurrency.running}/${concurrency.total}) ... `)\n\t\t\tif( this.startTimeoutLoggedFlag != true ) {\n\t\t\t\tOutputHandler.standard(`> Start Timeout : ${this.startTimeout} minutes - CLI will automatically retry till timeout`)\n\t\t\t\tthis.startTimeoutLoggedFlag = true;\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\n\t\t// Attempt to start the project - and log the error\n\t\ttry {\n\t\t\t// The starting request param\n\t\t\tlet startRequestParams = { \n\t\t\t\tbrowser: this.browser,\n\t\t\t\twidth: this.width,\n\t\t\t\theight: this.height,\n\t\t\t\t// We ensure region is forwarded\n\t\t\t\tregion: this.region,\n\t\t\t\t// Rest is as per normal\n\t\t\t\tdataSetID: this.dataSetID,\n\t\t\t\tdata: this.dataObject,\n\t\t\t\tsecretData: this.secretObject,\n\t\t\t\tuserAgent: this.userAgent\n\t\t\t};\n\n\t\t\t// Start the test\n\t\t\tlet result = await SpaceAndProjectApi.startProjectTest( //\n\t\t\t\tthis.projectID, this.normalizedScriptPath, //\n\t\t\t\tstartRequestParams, this.testCodeDir_zipFile //\n\t\t\t); //\n\n\t\t\t// Lets get the testRunID if valid\n\t\t\tlet testRunIDs = result.testRunIDs;\n\t\t\tif( testRunIDs == null || testRunIDs.length <= 0 ) {\n\t\t\t\tthrow `Missing testRunID in response`;\n\t\t\t}\n\n\t\t\t// Get the test run ID\n\t\t\tlet testRunID = testRunIDs[0];\n\n\t\t\t// Reset and initialize the internal testID, and printed steps output status\n\t\t\tthis.testID = testRunID;\n\t\t\tthis.processedTestRunSteps = [];\n\t\t\tthis.jsonOutputObj = {\n\t\t\t\ttestID: this.testID,\n\t\t\t\tstatus: \"unknown\",\n\t\t\t\tsteps: this.processedTestRunSteps\n\t\t\t}\n\n\t\t\t// Return the testID\n\t\t\treturn testRunIDs[0];\n\t\t} catch(err) {\n\t\t\t// Get the error object where applicable\n\t\t\tlet errObj = err.ERROR || err.error || err;\n\t\t\t// Unwrap any error message / code\n\t\t\tlet errOut = errObj.message || errObj.code || errObj;\n\n\t\t\t// Get the error code, and check against the known fatal error list\n\t\t\tlet fatalErrorCodeList = [\n\t\t\t\t\"ERR_ACCOUNT_SUSPENDED\", \n\t\t\t\t\"SPACE_NOT_FOUND\", \"PROJECT_NOT_FOUND\", \"BILLING_ACCOUNT_NOT_FOUND\", \n\t\t\t\t\"PLAN_NOT_FOUND\", \"FEATURE_DISABLED\", \"SPACE_DISABLED\"\n\t\t\t]\n\t\t\tlet errCode = errObj.code || \"\";\n\t\t\tif( fatalErrorCodeList.indexOf(errCode) >= 0 ) {\n\t\t\t\tOutputHandler.fatalError(`${errOut}`, null, 16);\n\t\t\t\tprocess.exit(16);\n\t\t\t}\n\n\t\t\t// Output the error\n\t\t\tOutputHandler.standard(`> Error starting test - CLI will retry due to start error : ${errOut}`)\n\t\t\tif( !this.startTimeoutLoggedFlag ) {\n\t\t\t\tOutputHandler.standard(`> Start Timeout : ${this.startTimeout} minutes - CLI will automatically retry till timeout`)\n\t\t\t\tthis.startTimeoutLoggedFlag = true;\n\t\t\t}\n\t\t}\n\n\t\t// Returns nothing (no valid testID)\n\t\treturn null;\n\t}", "function runAutomatedTestsIfAppropriate()\n{\n var msg = {cmd: \"getUserId\", callback: \"pcaAssessUserIdForTesting\",\n status: \"request\", payload: \"\"};\n\n hub.send(JSON.stringify(msg));\n\n} // runAutomatedTestsIfAppropriate", "async exec () {\n const { context, results, parameters } = this\n const start = process.hrtime()\n\n const { test } = context\n if (typeof test.beforeAll === 'function') test.beforeAll.call(this, this.beforeAll)\n if (typeof test.afterAll === 'function') test.afterAll.call(this, this.afterAll)\n\n const { driver, client } = test.options\n\n // TODO: log more of the client\n const logContext = {\n driver,\n mode: context.mode,\n browser: client.browser.name,\n ' width': client.width,\n ' height': client.height,\n attempt: this.attempt > 1 ? chalk.bold(chalk.red(this.attempt)) : this.attempt,\n }\n\n let { description } = context.test\n if (typeof description === 'function') description = description.call(this)\n\n if (description && typeof description === 'string') {\n this._log(`${chalk.underline(context.test.filename)}: ${description.trim()}`)\n } else {\n this._log(`${chalk.underline(context.test.filename)}:`)\n }\n\n this._log(` config:`)\n Object.keys(logContext).forEach((key) => {\n this._log(` ${key}: ${logContext[key]}`)\n })\n\n if (parameters) {\n this._log(` parameters:`)\n Object.keys(parameters).forEach((key) => {\n this._log(` ${key}: ${parameters[key]}`)\n })\n }\n\n this._log(' steps:')\n\n await this.runTest()\n\n const success = results.every(result => result.skip || result.success)\n\n const elapsedTime = getElapsedTime(start)\n const time = `(${logElapsedTime(elapsedTime)})`\n this._log(` ${chalk.bold(success ? chalk.green('✔ PASS ' + time) : chalk.red('✕ FAIL ' + time))}`)\n this._log('')\n\n if (!context.runnerOptions.stream) console.log(this._logs.join('\\n'))\n\n return {\n context,\n results,\n success,\n elapsedTime,\n }\n }", "async function executeTest(cli) {\n\n cli.removeConnection('SequenceFlow_19223ev');\n\n await cli.snapshot('removed');\n\n cli.undo();\n\n await cli.snapshot('undone');\n\n cli.redo();\n\n await cli.snapshot('redone');\n}", "run_test() { start_tests(); }", "async function _TestCurrentConfig(Test) {\n ++TestsStarted;\n let attemptsMade = 0;\n let attemptsFailed = 0;\n const attemptsAllowed = 1 + Config.Retries;\n for (let attemptId = 1; attemptsMade < attemptsAllowed; ++attemptId) {\n try {\n ++TotalAttemptsMade;\n ++attemptsMade;\n await _TestAttempt(Test, attemptId);\n break; // stop on success\n }\n catch (error) {\n ++attemptsFailed;\n if (attemptsMade < attemptsAllowed) {\n const progress = attemptsFailed + \"/\" + attemptsAllowed;\n console.log(`Test attempt failure (${progress}):`, error);\n // keep going\n } else {\n console.log(`Test failure`);\n throw error;\n }\n }\n }\n\n // success\n if (attemptsMade > 1)\n console.log(\"Probability of a test failure:\", attemptsFailed, \"/\", attemptsMade, \"=\", Gadgets.PrettyPercent(attemptsFailed, attemptsMade));\n}", "function runShTest (golden, test) {\n for (let i = 3; --i >= 0;) {\n if (golden === '_ERR_') {\n expect(test).to.throw()\n } else {\n expect(unwrap(test())).to.equal(golden)\n }\n }\n}", "function runTests(){\n var test = currentTest();\n var error = {\n path: test.path,\n testName: test.name\n };\n\n try{\n test.func(helpers);\n } catch ( err ) {\n error.msg = err;\n error.contexts = textContexts;\n addError(error);\n advanceTests();\n }\n\n // if no initial errors, test eventually times out\n setTimeout(function(){\n error.contexts = textContexts;\n if ( currentTestError ) {\n error.msg = currentTestError;\n addError(error);\n }else if ( !currentTestCompleted ) {\n error.msg = \"Did not complete in time!\";\n addError(error);\n }\n advanceTests();\n }, test.timeout); \n }", "run() {\n if (this.currentRun) {\n throw new Error(\"Can't start a test run if one is already in progress!\");\n }\n const startTime = Date.now();\n this.currentRun = this.runNextTestQueue().then(() => {\n const results = this.runResults;\n results.elapsedTimeMs = Date.now() - startTime;\n this.currentRun = null;\n this.resetRunResults();\n return results;\n }).catch((e) => {\n this.currentRun = null;\n throw e;\n });\n return this.currentRun;\n }", "function run()/* : TestResult*/\n {\n var result/* : TestResult*/ = new flexunit.framework.TestResult();\n \n this.runWithResult( result );\n\n return result;\n }", "async function executePrimaryTask(context) {\n\tconst saveFile = await vscode.commands.executeCommand(\"workbench.action.files.save\");\n\tlet codeforcesURL = vscode.window.activeTextEditor.document.getText();\n\tlet filepath = vscode.window.activeTextEditor.document.fileName;\n\tlet cases;\n\tif (!(filepath.substring(filepath.length - 4).toLowerCase() == '.cpp')) {\n\t\tvscode.window.showInformationMessage(\"Active file must be have a .cpp extension\");\n\t\treturn;\n\t} else {\n\t\tconsole.log(\"Is a cpp\");\n\t\tlatestFilePath = filepath;\n\t\tlatestTextDocument = vscode.window.activeTextEditor.document;\n\t}\n\tlet firstRun = true;\n\tcodeforcesURL = codeforcesURL.split(\"\\n\")[0];\n\tcodeforcesURL = codeforcesURL.substring(2);\n\tlet compilationError = false;\n\n\tlet passed_cases = [];\n\t/**\n\t * runs a particular testcase\n\t * @param {*} caseNum 0-indexed number of the case\n\t */\n\tfunction runTestCases(caseNum) {\n\t\ttry {\n\t\t\tfs.accessSync(filepath + \".tcs\")\n\t\t} catch (err) {\n\t\t\tlet html = downloadCodeforcesPage(codeforcesURL);\n\t\t\thtml.then(string => {\n\t\t\t\tconst [inp, op] = parseCodeforces(string);\n\t\t\t\tcreateTestacesFile(inp, op, filepath);\n\t\t\t\trunTestCases(0);\n\t\t\t}).catch(err => {\n\t\t\t\tconsole.error(\"Error\", err)\n\t\t\t})\n\t\t\treturn;\n\t\t}\n\n\t\tif (caseNum == 0) {\n\t\t\tstartWebView();\n\t\t\tconsole.l\n\t\t\tcases = parseTestCasesFile(filepath);\n\t\t\tif (!cases || !cases.inputs || cases.inputs.length === 0) {\n\t\t\t\tevaluateResults([], true);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tresultsPanel.webview.html = \"<html><body><p style='margin:10px'>Runnung Testcases ...</p><p>If this message does not change in 10 seconds, it means an error occured. Please contact developer.<p/></body></html>\";\n\n\n\t\t} else if (caseNum == cases.numCases) {\n\t\t\treturn;\n\t\t}\n\t\tlet exec = [];\n\t\tlet stdoutlen = 0;\n\t\tlet spawned_process = spawn((filepath + '.bin'), {\n\t\t\ttimeout: 10000\n\t\t});\n\t\t// Creates a 10 second timeout to kill the spawned process.\n\t\tsetTimeout(() => {\n\t\t\tconsole.log(\"10 sec killed process - \", caseNum);\n\t\t\tspawned_process.kill();\n\t\t}, 10000)\n\t\tlet tm = Date.now();\n\t\tspawned_process.stdin.write(cases.inputs[caseNum] + \"\\n\");\n\t\tspawned_process.stdout.on('data', (data) => {\n\t\t\tif (stdoutlen > 10000) {\n\t\t\t\tstartWebView();\n\t\t\t\tconsole.log(\"STDOUT length >10000\");\n\t\t\t\tresultsPanel.webview.html = \"<html><body><p style='margin:10px'>Your code is outputting more data than can be displayed. It is possibly stuck in an infinite loop. <br><br><b>All testcases failed.</b></p></body></html>\";\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconsole.log(\"Go stdout\", data);\n\t\t\tlet ans = data.toString();\n\t\t\tlet tm2 = Date.now();\n\t\t\tlet time = tm2 - tm;\n\t\t\tans = ans.replace(/\\r?\\n|\\r/g, \"\\n\");\n\t\t\tcases.outputs[caseNum] = cases.outputs[caseNum].replace(/\\r?\\n|\\r/g, \"\\n\");\n\t\t\tlet stripped_case = cases.outputs[caseNum].replace(/\\r?\\n|\\r| /g, \"\");\n\t\t\tlet stripped_ans = ans.replace(/\\s|\\n|\\r\\n|\\r| /g, \"\");\n\t\t\tif (stripped_ans == stripped_case) {\n\t\t\t\tpassed_cases[caseNum] = {\n\t\t\t\t\tpassed: true,\n\t\t\t\t\ttime: time,\n\t\t\t\t\toutput: ans.trim(),\n\t\t\t\t\tinput: cases.inputs[caseNum].trim(),\n\t\t\t\t\texpected: cases.outputs[caseNum].trim(),\n\t\t\t\t\tgot: ans.trim()\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tpassed_cases[caseNum] = {\n\t\t\t\t\tpassed: false,\n\t\t\t\t\ttime: time,\n\t\t\t\t\toutput: ans.trim(),\n\t\t\t\t\tinput: cases.inputs[caseNum].trim(),\n\t\t\t\t\texpected: cases.outputs[caseNum].trim(),\n\t\t\t\t\tgot: ans.trim()\n\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (caseNum == (cases.numCases - 1)) {\n\t\t\t\tevaluateResults(passed_cases, true);\n\t\t\t\tspawn(\"rm\", [filepath + \".bin\"]);\n\t\t\t\tspawn(\"del\", [filepath + \".bin\"]);\n\n\n\t\t\t} else {\n\t\t\t\tevaluateResults(passed_cases, false);\n\t\t\t}\n\n\t\t});\n\t\tspawned_process.stderr.on('data', (data) => {\n\t\t\tconsole.error(`stderr: ${data}`);\n\t\t\toc.clear();\n\t\t\toc.appendLine(\"STDERR:\");\n\t\t\toc.appendLine(data);\n\t\t});\n\n\t\tspawned_process.on('exit', (code, signal) => {\n\t\t\tlet tm2 = Date.now();\n\t\t\tconsole.log(\"Execution done with code\", code, \" with signal \", signal, \"for process \", caseNum);\n\t\t\tif (signal || code != 0) {\n\t\t\t\tpassed_cases[caseNum] = {\n\t\t\t\t\tpassed: false,\n\t\t\t\t\ttime: tm2 - tm,\n\t\t\t\t\toutput: `Runtime error. Exit signal ${signal}. Exit code ${code}.`,\n\t\t\t\t\tinput: cases.inputs[caseNum].trim(),\n\t\t\t\t\texpected: cases.outputs[caseNum].trim(),\n\t\t\t\t\tgot: `Runtime error. Exit signal ${signal}. Exit code ${code}.`,\n\t\t\t\t}\n\t\t\t\tif (caseNum == (cases.numCases - 1)) {\n\t\t\t\t\tevaluateResults(passed_cases, true);\n\t\t\t\t} else {\n\t\t\t\t\tevaluateResults(passed_cases, false);\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tlet tm2 = Date.now();\n\t\t\t\tif (!passed_cases[caseNum]) {\n\t\t\t\t\tpassed_cases[caseNum] = {\n\t\t\t\t\t\tpassed: cases.outputs[caseNum].trim().length == 0,\n\t\t\t\t\t\ttime: tm2 - tm,\n\t\t\t\t\t\toutput: \"<br/>\",\n\t\t\t\t\t\tinput: cases.inputs[caseNum].trim(),\n\t\t\t\t\t\texpected: cases.outputs[caseNum].trim(),\n\t\t\t\t\t\tgot: \"<br/>\"\n\t\t\t\t\t}\n\t\t\t\t\tif (caseNum == (cases.numCases - 1)) {\n\t\t\t\t\t\tevaluateResults(passed_cases, true);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tevaluateResults(passed_cases, false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\trunTestCases(caseNum + 1);\n\t\t})\n\t}\n\n\t/**\n\t * Download a html page with the given codeforces url\n\t */\n\tasync function downloadCodeforcesPage(url) {\n\t\tif (verifyValidCodeforcesURL(url)) {\n\t\t\tvscode.window.showInformationMessage(\"Downloading Testcases\");\n\t\t\tconst html = await rp(url);\n\t\t\treturn html;\n\t\t} else {\n\t\t\ttestCasesHelper(filepath);\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t * Comiple the C++ file\n\t */\n\tconst gpp = spawn('g++', [filepath, '-o', filepath + \".bin\"]);\n\tgpp.stdout.on(\"data\", (data) => {\n\t\tconsole.log(`stdout: ${data}`);\n\t})\n\tgpp.stderr.on('data', (data) => {\n\t\toc.clear();\n\t\toc.append(\"Errors while compiling\\n\" + data.toString());\n\t\toc.show();\n\t\tcompilationError = true;\n\t});\n\n\tgpp.on('exit', async (exitCode) => {\n\t\tif (!compilationError) {\n\t\t\tawait runTestCases(0);\n\t\t}\n\t\tconsole.log(`Compiler exited with code ${exitCode}`);\n\t});\n}", "function executeHTests(){\n\t\n\tconsole.log(\"Hotel Tests:\");\n\ttestHSelectOption(1, 500);\n\ttestHSelectOption(2, 200);\n\ttestHSelectOption(3, 700);\n\ttestHSelectOption(4, 300);\n\ttestHSelectOption(5, 100);\n\ttestHSelectOption(6, 400);\n\ttestHSelectOption(7, 70);\n\ttestHSelectOption(8, 900);\n\ttestHSelectOption(9, 250);\n\ttestHSelectOption(10, 80);\n\tconsole.log(\"Should fail:\")\n\ttestHSelectOption(10, 800);\n\n\n}", "runTestCasesAndFinish()\n {\n function finish() {\n InspectorTest.completeTest();\n }\n\n this.runTestCases()\n .then(finish)\n .catch(finish);\n }", "function testDone(result) {\n if (result == 'pass') {\n console.log(chalk.yellow(mTestInst.getName()) + \" completed with result: \" + chalk.green(result) + \"\\n\");\n } else {\n console.log(chalk.yellow(mTestInst.getName()) + \" completed with result: \" + chalk.red(result) + \"\\n\");\n }\n\n mCurrTest++;\n if (mCurrTest < testObjects.length) {\n resetApp();\n } else {\n console.log(chalk.green(\"All tests completed!\"));\n reportResults();\n }\n }", "function checkForNextTest() {\n\n //if cookie, reset to null\n var nextTest = uiUtils.getVal('nextTest');\n\n // debugger;\n if ( nextTest) {\n window.testInProgress = true;\n //debugger;\n uiUtils.setVal('nextTest', null); //clear cookie\n if ( tH.params.runTest=='true' ){\n console.log('have next test, but runTest is true')\n return;\n }\n function runTestX(testName, testDelay) {\n var testDelay = parseInt(testDelay)\n testDelay= sh.dv(testDelay, 0);\n // debugger;\n if ( testName ){\n console.info(\n 'Running test', testName, ''\n )\n\n setTimeout(function runTest_WhenUserTestsLoaded() {\n if ( window.testsLoaded != true ) {\n console.warn('tests not loaded yet')\n setTimeout(runTest, 200+testDelay)\n return;\n }\n debugger; //debug this 12-17-2016-is it correct?\n tH.runTest(testName)\n }, 200+testDelay)\n } else{\n runTest();\n }\n }\n\n runTestX(nextTest.testName)\n }\n }", "function execution_passe() {\r\n // ici le code\r\n}", "function runTests(e, p, jobFunc) {\n console.log(\"Check requested\");\n\n let job = jobFunc();\n\n // Create Notification object (which is just a Job to update GH using the Checks API)\n var note = new Notification(job.name, e, p);\n note.conclusion = \"\";\n note.title = `Run ${job.name}`;\n note.summary = `Running ${job.name} build/test targets for ${e.revision.commit}`;\n note.text = \"This task will ensure build, linting and tests all pass.\";\n\n // Send notification, then run, then send pass/fail notification\n return notificationWrap(job, note);\n}", "function runTest(callback) {\n currentIncrement = testsToRun[0];\n odfeRunner.setTestIncrement(currentIncrement);\n odfeRunner.setDocsBaseDir(testClassesDirectory);\n\tcurrentTest = currentIncrement.test;\n console.log(\"\\nRun test \" + currentTest);\n\tfs.copy(srcDir + currentTest, trgDir + currentTest, function (err) {\n\t\tif (err) {\n\t\t\tcallback(err);\n\t\t} else {\n\t\t\tconsole.log(\"To Run Moved \" + srcDir + currentTest + \" to \" + trgDir + currentTest);\n\t\t\ttestsToRun.shift();\n async.series([\n cover,\n parseCoverage,\n odfe,\n deleteTrgTest,\n deleteTrgTestFromTarget\n ], function (err) {\n console.log(\"Run test done for \" + currentTest);\n callback();\n });\n\t\t}\n\t});\n}", "function runNext(previousResult) {\n hello(true);\n clearTimeout(shutdownTimeout);\n var sendResults = false;\n if (typeof previousResult === 'undefined') {\n if (firstLaunch === true) {\n firstLaunch = false;\n consoleLog('[INFO] tests started at ' + new Date());\n } else if (waiting === true) {\n consoleLog('[INFO] tests resumed at ' + new Date());\n }\n } else {\n stopMonitoring();\n try {\n fs.unlinkSync(path.join(config.reportsBasePath, 'current.json'));\n } catch (e) {\n // Doesn't matter\n }\n runLog.push({\n name: previousResult.testName,\n start: previousResult.start,\n end: previousResult.end,\n duration: previousResult.duration,\n status: previousResult.status,\n dir: previousResult.resultDir\n });\n if (typeof config.dashboard !== \"undefined\" && typeof config.dashboard.address !== \"undefined\" && typeof config.dashboard.connect !== \"undefined\" && typeof config.dashboard.id !== \"undefined\" && config.dashboard.connect === true) {\n try {\n var report = JSON.parse(fs.readFileSync(path.join(previousResult.resultDir, 'report.json')).toString());\n } catch (e) {\n var report = {\n name: previousResult.testName,\n changelist: config.CHANGELIST,\n start: previousResult.start,\n duration: previousResult.duration,\n abstract: {\n passed: 0,\n total: 0,\n failures: 0,\n skipped: 0\n },\n status: previousResult.status\n };\n }\n sendResults = true;\n }\n state.done.push(previousResult.testName);\n doNotOverwriteState = false;\n try {\n fs.writeFileSync(path.join(config.reportsBasePath, 'state.json'), JSON.stringify(state));\n\n } catch (e) {\n consoleLog('[WARN] cannot write current state (1)', e);\n }\n try {\n fs.writeFileSync(path.join(previousResult.resultDir, 'runlog.json'), JSON.stringify(previousResult));\n } catch (e) {\n consoleLog('[WARN] cannot write job runlog (1)', e);\n }\n if (typeof previousResult.pom !== 'undefined' && previousResult.pom) {\n try {\n fs.writeFileSync(path.join(previousResult.resultDir, 'pom.json'), JSON.stringify(previousResult.pom));\n } catch (e) {\n consoleLog('[WARN] cannot write job pom (1)', e);\n }\n }\n try {\n fs.unlinkSync(path.join(previousResult.resultDir, '.manual'));\n } catch (e) {\n // Doesn't matter\n }\n try {\n fs.writeFileSync(path.join(previousResult.resultDir, '.auto'), 'true');\n } catch (e) {\n consoleLog('[WARN] cannot write job .auto flag (1)', e);\n }\n var status = 'UNKNOWN'.grey;\n if (previousResult.status === null) {\n status = 'FAILURE'.red;\n } else if (previousResult.status === false) {\n status = 'UNSTABLE'.yellow;\n } else if (previousResult.status === true) {\n status = 'SUCCESS'.green;\n }\n consoleLog('[INFO] ' + previousResult.testName.white.bold + ' --> '.grey + status.bold);\n var cleanup = temp.cleanup();\n if (typeof previousResult.tmpDir !== 'undefined') {\n try {\n rmdir(previousResult.tmpDir);\n } catch (e) {\n // Doesn't matter\n }\n }\n state.currentJob++;\n }\n if (shutDown === false) {\n waiting = false;\n killMainProcesses();\n exterminate(function() {\n if (shutDown === false) {\n if (typeof previousResult !== 'undefined') {\n getCrashlocationContentAfter();\n }\n getProcessListDiffAfter(function(diff) {\n if (typeof previousResult !== 'undefined' && diff !== null && (diff.less.length > 0 || diff.more.length > 0)) {\n var diffLog = '';\n if (diff.less.length > 0) {\n diffLog += '-- Lost Processes (killed during the test):\\n';\n diff.less.forEach(function(proc) {\n diffLog += '\\t' + proc.pid + '\\t' + proc.cmd + '\\n';\n });\n diffLog += ' \\n\\n';\n }\n if (diff.more.length > 0) {\n diffLog += '++ Additional Processes (spawned during the test):\\n';\n diff.more.forEach(function(proc) {\n diffLog += '\\t' + proc.pid + '\\t' + proc.cmd + '\\n';\n });\n diffLog += ' \\n\\n';\n }\n try {\n fs.writeFileSync(path.join(previousResult.resultDir, 'procdiff.txt'), diffLog);\n } catch (e) {\n consoleLog('[WARN] cannot archive process diff (1)', e);\n }\n }\n if (typeof previousResult !== 'undefined' && crashes.length > 0) {\n consoleLog('[WARN] test ' + previousResult.testName + ' produced ' + crashes.length + ' crash(es)');\n for (var i = 0; i < crashes.length; i++) {\n if (/server/i.test(crashes[i])) {\n var crashName = 'server_crash_' + (i + 1) + path.extname(crashes[i]);\n } else if (/studio/i.test(crashes[i])) {\n var crashName = 'studio_crash_' + (i + 1) + path.extname(crashes[i]);\n } else if (/4d/i.test(crashes[i])) {\n var crashName = '4d_crash_' + (i + 1) + path.extname(crashes[i]);\n } else {\n var crashName = 'other_crash_' + (i + 1) + path.extname(crashes[i]);\n }\n try {\n copyFileSync(crashes[i], path.join(previousResult.resultDir, crashName));\n } catch (e) {\n consoleLog('[WARN] cannot archive crash log', e);\n }\n }\n }\n if (typeof previousResult !== 'undefined' && sendResults === true) {\n if (typeof config.dashboard !== \"undefined\" && typeof config.dashboard.connect !== \"undefined\" && typeof config.dashboard.id !== \"undefined\" && config.dashboard.connect === true) {\n try {\n var results = JSON.parse(fs.readFileSync(path.join(previousResult.resultDir, 'report.json')).toString());\n } catch (e) {\n var results = {\n name: previousResult.testName,\n start: previousResult.start,\n end: previousResult.end,\n duration: previousResult.duration,\n abstract: {\n passed: 0,\n total: 0,\n failures: 0,\n skipped: 0\n },\n status: previousResult.status\n };\n }\n var msg = {\n id: config.dashboard.id,\n changelist: config.CHANGELIST,\n productBranch: config.WAKANDA_BRANCH,\n results: {\n name: results.name,\n start: results.start,\n end: results.end,\n duration: results.duration,\n abstract: {\n passed: results.abstract.passed,\n total: results.abstract.total,\n failures: results.abstract.failures,\n skipped: results.abstract.skipped\n },\n status: results.status,\n crashes: crashes.length\n }\n };\n var pom = getPomForTest(results.name);\n if (isMac()) {\n msg.os = 'mac';\n } else if (isLinux()) {\n msg.os = 'linux';\n } else if (isWindows()) {\n msg.os = 'windows';\n }\n if (pom && typeof pom.tester !== 'undefined' && pom.tester && pom.tester != '') {\n msg.results.tester = pom.tester;\n }\n if (pom && typeof pom.developer !== 'undefined' && pom.developer && pom.developer != '') {\n msg.results.developer = pom.developer;\n }\n if (pom && typeof pom.uuid !== 'undefined') {\n msg.results.uuid = pom.uuid;\n }\n if (pom && typeof pom.bench !== 'undefined' && (pom.bench === true || pom.bench === 'true')) {\n msg.results.isbench = true;\n var CSVFilePath = path.join(previousResult.resultDir, 'result.csv');\n try {\n var CSVStat = fs.statSync(CSVFilePath);\n } catch (e) {\n var CSVStat = false;\n }\n if (CSVStat && CSVStat.isFile()) {\n msg.results.benchdata = fs.readFileSync(CSVFilePath).toString();\n } else {\n msg.results.benchdata = null;\n }\n }\n if (typeof config.subversion === 'string') {\n msg.subVersion = config.subversion.toLowerCase();\n } else {\n msg.subVersion = '';\n }\n try {\n socket.emit('results', JSON.stringify(msg));\n consoleLog('[INFO] just sent \"results\" to the Hub (1)...');\n } catch (e) {\n consoleLog('[ERROR] could not send \"results\" to the Hub (1): ' + e);\n }\n }\n }\n if (state.currentJob > -1 && state.queue.length > 0 && state.currentJob < state.queue.length) {\n clearTimeout(shutdownTimeout);\n consoleLog('[INFO] next (' + (state.currentJob + 1) + '/' + state.queue.length + ')');\n setTimeout(function() {\n runTest(state.queue[state.currentJob], runNext, true);\n }, 125);\n } else if (downloadingNewWakandaBuildDone === false && downloadingNewWakandaInstallerDone === true) {\n clearTimeout(shutdownTimeout);\n consoleLog('[INFO] tests related to the new Wakanda Installers completed at ' + new Date() + ', now waiting 6 hours max. for the new Wakanda Builds (>' + previousChangelist + ')...');\n waiting = true;\n shutdownTimeout = setTimeout(function() {\n shutdown(true);\n }, 6 * 60 * 60 * 1000); // 6h\n } else if (downloadingNewWakandaInstallerDone === false && downloadingNewWakandaBuildDone === true) {\n clearTimeout(shutdownTimeout);\n consoleLog('[WARN] tests related to the new Wakanda Builds completed at ' + new Date() + ', but the new Wakanda Installers are not available (>' + previousChangelist + '): waiting 3 hours max. then shutting down!');\n waiting = true;\n shutdownTimeout = setTimeout(function() {\n shutdown(true);\n }, 4 * 60 * 60 * 1000); // 4h\n } else if (isLinux() === false && downloadingNew4DBuildDone === false && downloadingNewWakandaBuildDone === true) {\n clearTimeout(shutdownTimeout);\n consoleLog('[WARN] tests related to the new Wakanda Builds completed at ' + new Date() + ', but the new 4D Server is not available: will use an old one!');\n if (isMac()) {\n var wakApps = findFiles(config.BUILD_TEST_DIR, /^4d.*server$/i);\n wakApps.forEach(function(wakApp) {\n current4DServerPath = wakApp;\n });\n } else if (isWindows()) {\n var wakApps = findFiles(config.BUILD_TEST_DIR, /^4d.*\\.exe$/i);\n wakApps.forEach(function(wakApp) {\n current4DServerPath = wakApp;\n });\n }\n consoleLog('[INFO] old 4D build (' + current4DServerPath + ') will be used');\n downloadingNew4DBuild = true;\n downloadingNew4DBuildDone = true;\n downloadingNew4DBuildExpect = 0;\n state.queue = state.queue.concat(getAvailableJobs(function(item) {\n if (/(4d(?!p))/i.test(item)) {\n return true;\n } else {\n return false;\n }\n }));\n shutdownTimeout = setTimeout(function() {\n runNext();\n }, 125);\n } else {\n consoleLog('[INFO] finishing tests, please wait...');\n clearTimeout(shutdownTimeout);\n if (runFromWeb === true || (process.argv.length > 2 && (process.argv[2] === 'run' || process.argv[2] === 'resume'))) {\n shutdown(true);\n } else {\n waiting = true;\n shutdownTimeout = setTimeout(function() {\n shutdown(true);\n }, 125);\n }\n }\n });\n }\n });\n }\n}", "_passed(test) {\n console.log(\"Test has Passed\");\n const sessionId = this._getSessionId();\n this._updateBuild(sessionId, { 'status': 'passed', 'name': test.title });\n }", "function runTest(i) {\n if (i >= inputs.length) throw new Error(\"You do not have enough test cases\");\n let expected = outputs[i];\n let actual = f(inputs[i]);\n verifyEquals(expected, actual);\n}", "function runTest(i) {\n if (i >= inputs.length) throw new Error('You do not have enough test cases');\n let expected = outputs[i];\n let actual = f(inputs[i]);\n verifyEquals(expected, actual);\n}", "function runTest(i) {\n if (i >= inputs.length) throw new Error('You do not have enough test cases');\n let expected = outputs[i];\n let actual = f(inputs[i]);\n verifyEquals(expected, actual);\n}", "function runTest(i) {\n if (i >= inputs.length) throw new Error('You do not have enough test cases');\n let expected = outputs[i];\n let actual = f(inputs[i]);\n verifyEquals(expected, actual);\n}", "function runTest(i) {\n if (i >= inputs.length) throw new Error('You do not have enough test cases');\n let expected = outputs[i];\n let actual = f(inputs[i]);\n verifyEquals(expected, actual);\n}", "runTestCasesAndFinish()\n {\n this.runTestCases();\n InspectorTest.completeTest();\n }", "function test(test) {\n var attrs = {\n classname: test.parent.fullTitle()\n , name: test.title\n , time: test.duration / 1000\n };\n\n if ('failed' == test.state) {\n var err = test.err;\n attrs.message = escape(err.message);\n console.log(tag('testcase', attrs, false, tag('failure', attrs, false, cdata(err.stack))));\n } else if (test.pending) {\n console.log(tag('testcase', attrs, false, tag('skipped', {}, true)));\n } else {\n console.log(tag('testcase', attrs, true) );\n }\n}", "function test() {\n console.log('TEST SUITE');\n for(let i=0; i < testFuncs.length; i++) {\n let test = testFuncs[i];\n try {\n test();\n console.log('(' + i + ')' + test.name + ': PASS')\n } catch(e) {\n console.log('(' + i + ')' + test.name + ': FAIL');\n console.log(e);\n }\n }\n}", "function submit(msg){\n const code = codeExtractor(msg)\n if( !code ) return\n runTest(code, 'pytest')\n .then((result) => {\n //return msg.channel.send(\"Entregar desafio\")\n return msg.channel.send(`OUTPUT: \\n\\`\\`\\`\\n${result}\\n\\`\\`\\``)\n })\n .catch((e) => {\n console.log(e)\n return msg.channel.send(e)\n })\n}", "function runTest(i) {\n if (i >= inputs.length) throw new Error('You do not have enough test cases');\n let expected = outputs[i];\n let actual = f(inputs[i]);\n verifyEquals(expected, actual); // verifyEquals is imported above\n}", "firstRun() { }", "function run_tests(type){\n\t$(\"#tests_\"+type+\"s tr\").each(function(num,obj){\n\t\tid=obj.id.substr(5);\n\t\tname = $(\"#\"+obj.id+\" .test_name\").html();\n\t\tname = name.substr(0,name.length);\n\t\trun_test(id,type,name);\n\t});\n}", "function test_case(err, response) {\n\n\tif (err) {\n\t\tconsole.error(err);\n\t} else {\n assert.equal(response.headers['Content-Type'], 'text/json', 'content type is not text/json');\n assert.equal(response.statusCode, 200, 'status code must be 200');\n\n for (key in response.results) {\n kw = response.results[key];\n // at least 6 results\n assert.isAtLeast(kw.results.length, 6, 'results must have at least 6 links');\n assert.equal(kw.no_results, false, 'no results should be false');\n assert.typeOf(kw.num_results, 'string', 'num_results must be a string');\n assert.isAtLeast(kw.num_results.length, 5, 'num_results should be a string of at least 5 chars');\n assert.typeOf(Date.parse(kw.time), 'number', 'time should be a valid date');\n\n for (let res of kw.results) {\n assert.isOk(res.link, 'link must be ok');\n assert.typeOf(res.link, 'string', 'link must be string');\n assert.isAtLeast(res.link.length, 5, 'link must have at least 5 chars');\n\n assert.isOk(res.title, 'title must be ok');\n assert.typeOf(res.title, 'string', 'title must be string');\n assert.isAtLeast(res.title.length, 10, 'title must have at least 10 chars');\n\n assert.isOk(res.snippet, 'snippet must be ok');\n assert.typeOf(res.snippet, 'string', 'snippet must be string');\n assert.isAtLeast(res.snippet.length, 10, 'snippet must have at least 10 chars');\n }\n }\n\t}\n}", "run (callback) {\n\t\t// run the test twice, then wait for longer than the reusability window, recording the confirmation code\n\t\t// from the first test and checking that the code returned for the second test is NOT the same\n\t\tsuper.run(error => {\n\t\t\tif (error) { return callback(error); }\n\t\t\tsetTimeout(() => {\n\t\t\t\tsuper.run(callback);\n\t\t\t}, 2000);\n\t\t});\n\t}", "function applyTheTest(server,numOfTest){\r\n console.log(\"Starting the test:\");\r\n console.log(\"-------------------------------\");\r\n\r\n var TIME_PER_TEST = Math.floor(Math.random()*444);\r\n\r\n var runTest = function(counter) {\r\n if (counter >= numOfTest) {\r\n setTimeout(server.stop(function () {\r\n console.log(\"Server was closed successfully\");\r\n console.log(\"-------------------------------\");\r\n if (success === numOfTest) {\r\n console.log(\"Finished running the test. Success: \" + success + \" out\" +\r\n \" of: \" + numOfTest + \" tests\");\r\n }\r\n else {\r\n console.log(\"Finished running the test. Success: \" + success + \" out\" +\r\n \" of: \" + numOfTest + \" tests\");\r\n }\r\n }),2000);\r\n return;\r\n }\r\n oneTestServer(counter);\r\n setTimeout(function() {runTest(counter + 1);},TIME_PER_TEST);\r\n }\r\n runTest(0);\r\n}", "function next_test() {\n if (current_test < test.length) {\n kid = cp.fork(test[current_test++], [], { stdio: \"inherit\" });\n\n kid.on(\"exit\", next_test);\n } else {\n\n ass.report(\"html\", function (err, report) {\n require(\"fs\").writeFileSync(\"./coverage.html\", report);\n });\n }\n}", "execute(code) {\n alert(\"You must subclass Runner and implement execute(code).\");\n }", "function runTest() {\n Logger.log(\"This is the newest test\");\n}", "async function main() {\n const g_tests = async (flag) => {\n let test_base;\n let prefix = '';\n switch (flag) {\n case 'm':\n test_base = test_base_general;\n prefix = 'test_';\n break;\n case 'a':\n test_base = test_base_audio;\n prefix = 'test_';\n break;\n case 's':\n case 'c':\n test_base = test_base_toc;\n break;\n }\n ;\n const retval = await get_tests(`${test_base}/index.json`, prefix);\n return retval;\n };\n const preamble_run_test = async (name) => {\n if (name[0] === 'm' || name[0] === 'a' || name[0] === 's' || name[0] === 'c') {\n const tests = await g_tests(name[0]);\n run_test(tests[name].url);\n }\n else {\n throw new Error('Abnormal test id...');\n }\n };\n try {\n if (process.argv && process.argv.length > 2) {\n if (process.argv[2] === '-sm' || process.argv[2] === '-sa') {\n const label = process.argv[2][2];\n const tests = await g_tests(label);\n const scores = generate_scores(tests);\n console.log(JSON.stringify(scores, null, 4));\n }\n else if (process.argv[2] === '-l') {\n // run a local test that is not registered in the official test suite\n run_test(process.argv[3]);\n }\n else {\n preamble_run_test(process.argv[2]);\n }\n }\n else {\n preamble_run_test('m4.01');\n }\n }\n catch (e) {\n console.log(`Something went very wrong: ${e.message}`);\n process.exit(1);\n }\n}", "DoFinalReview() {\n const caid = \"5c79260b4328ab820437835c\";\n test(\"showing projects in final review for that ca\", async done => {\n const response = await fetch(`${this.base_url}/${caid}/reviewprojects`, {\n method: \"GET\",\n headers: { \"Content-Type\": \"application/json\" }\n });\n //console.lo(\"response to story 2.3 \" + response.status);\n const j = await response.json();\n ////console.lo(j)\n if (j.msg == \" not valid id\" || j.msg == 'Error in catch block\"')\n expect(response.status).toEqual(404);\n else expect(response.status).toEqual(200);\n done();\n });\n }", "function oneTestServer(counter){\r\n\r\n /*options to the http*/\r\n var option = {\r\n port: PORT,\r\n path: FILE_TO_CHECK,\r\n headers : {connection: 'keep-alive'}\r\n }\r\n var fullSrc = ROOT_FOLDER + FILE_TO_CHECK;\r\n fullSrc.replace(/\\//g, '\\\\');\r\n\r\n http.get(option, function(res){\r\n\r\n var str = '';\r\n\r\n res.on('data', function(chunk){\r\n str += chunk;\r\n });\r\n\r\n res.on('end', function(){\r\n fs.readFile(fullSrc, function(err,data){\r\n if (err) {\r\n console.log(\"Failed loading the tests\");\r\n }\r\n else{\r\n if (data.toString('utf8') === str) {\r\n\r\n console.log(\"Test number: \" + counter + \", Status:\" +\r\n \" SUCCESS, on file:\" +\r\n \" \" + FILE_TO_CHECK);\r\n success++;\r\n\r\n }\r\n else {\r\n console.log(\"Test number: \" + counter + \", Status :\" +\r\n \" ERROR, on file:\" + FILE_TO_CHECK);\r\n }\r\n }\r\n });\r\n });\r\n res.on('error', function(err){\r\n console.log(err.message);\r\n });\r\n });\r\n}", "function runTest(x, totalTime, chess) {\n if (chess.game_over()) {\n reportGameOver(chess, false);\n return;\n }\n var fens = generateBoards(chess);\n if (x < 1000) {\n console.log(\"\\n\\n\");\n console.log(\"🔀 RANDOM: \");\n console.log(Translate.encode(chess.fen()));\n console.log(\"\\n\\n\");\n run(chess.fen(), fens)\n .then(function ({ fen, time }) {\n var plChess = new Chess(fen);\n let newTotalTime = time + totalTime;\n let avgTime = newTotalTime / (x + 1);\n console.log(`🤖👌 PL OK (${timeFmt(time)}, avg: ${timeFmt(avgTime)})`);\n console.log(Translate.encode(plChess.fen()));\n if (x > 5 && avgTime > 30 * 1000) {\n console.log(\"GAME OVER: too slow\");\n process.exit(1);\n } else {\n if (plChess.game_over()) {\n reportGameOver(plChess, true);\n } else {\n runTest(x + 1, newTotalTime, makeMove(plChess));\n }\n }\n })\n .catch((e) => {\n if (\"msg\" in e && \"data\" in e) {\n const { msg, data, err } = e;\n console.log(\"🤖❌ PL FAIL\");\n console.log((data || \"\").replace(/^\\n*/, \"\"));\n console.log(msg);\n console.log(\"stderr\");\n console.log(err);\n\t\t console.log(\"SEED :\" + seed_init);\n\t\t if (err === 'outofmemory') {\n\t\t\t process.exit(0);\n\t\t }\n } else {\n console.log(\"unexpected error\");\n console.log(e);\n }\n process.exit(10);\n });\n } else {\n console.log(\"More than 1000 moves\");\n console.log(\"SEED :\" + seed_init);\n process.exit(1);\n }\n}", "function runTests(e, p) {\n console.log(\"Check requested\")\n\n // Create Notification object (which is just a Job to update GH using the Checks API)\n var note = new Notification(`tests`, e, p);\n note.conclusion = \"\";\n note.title = \"Run Tests\";\n note.summary = \"Running the test targets for \" + e.revision.commit;\n note.text = \"This test will ensure build, linting and tests all pass.\"\n\n // Send notification, then run, then send pass/fail notification\n return notificationWrap(build(e, p), note)\n}", "function simulate(testString) {\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n const x = extension.actions({ text: testString }, {}, {});\n if (typeof x === 'function') { // got single action as expected\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n return x({ text: testString }, {}, {});\n }\n else {\n return null;\n }\n}", "function runTest(comparison, text) {\n if(comparison) {\n testOutput(text, 'passed');\n passed += 1;\n } else {\n testOutput(text, 'failed');\n failed += 1;\n }\n }", "async function test() {}", "function checkUnitTest(num, html_url, sparql_url, expected_result)\n{\n var rdfaExtractorUrl = getRdfaExtractorUrl();\n var sparqlEngineUrl = getSparqlEngineUrl();\n \n document.getElementById('unit-test-status-' + num).innerHTML =\n \"CHECKING...\";\n sendRequest('check-test?id=' + num +\n '&source=' + html_url +\n '&sparql=' + sparql_url +\n '&expected-result=' + expected_result +\n '&rdfa-extractor=' + escape(rdfaExtractorUrl) +\n '&sparql-engine=' + escape(sparqlEngineUrl),\n displayUnitTestResult, num)\n}", "onTestPass(test) {\n this._passes++;\n this._out.push(test.title + ': pass');\n let status_id = this.qaTouch.statusConfig('Passed');\n let caseIds = this.qaTouch.TitleToCaseIds(test.title);\n if (caseIds.length > 0) {\n let results = caseIds.map(caseId => {\n return {\n case_id: caseId,\n status_id: status_id,\n };\n });\n this._results.push(...results);\n }\n }", "execute() {\n return __awaiter(this, void 0, void 0, function* () {\n return { value: 'test_response' };\n });\n }", "execute(code){\n }", "function execute() {\n\t var listeners,\n\t async = isAsync(bench);\n\n\t if (async) {\n\t // Use `getNext` as the first listener.\n\t bench.on('complete', getNext);\n\t listeners = bench.events.complete;\n\t listeners.splice(0, 0, listeners.pop());\n\t }\n\t // Execute method.\n\t result[index] = _.isFunction(bench && bench[name]) ? bench[name].apply(bench, args) : undefined;\n\t // If synchronous return `true` until finished.\n\t return !async && getNext();\n\t }", "function ct_test() {\n return ok;\n}", "async function runTests() {\n numTestsPassed = 0;\n for (let i = 0; i < testFunctions.length; i++) {\n let message = \"\";\n try {\n const testResult = await testFunctions[i]();\n if (testResult) {\n numTestsPassed++;\n message = `Test ${i+1} passed`;\n } else {\n message = `Test ${i+1} failed`;\n }\n } catch(error) {\n message = `Test ${i+1} failed with exception:\\n${error}`;\n }\n console.log(message);\n }\n const fractionOfTestsPassed = `${numTestsPassed}/${testFunctions.length} tests passed`;\n const equals = '='.repeat(fractionOfTestsPassed.length);\n console.log('\\n' + equals + '\\n' + fractionOfTestsPassed + '\\n' + equals + '\\n');\n\n return numTestsPassed == testFunctions.length\n}", "function it(desc, callback) {\n try {\n callback();\n testResult(`Test: ${desc}...`);\n testResult('Passed 🥳');\n } catch(error) {\n testResult('\\n');\n testResult(`Test: ${desc}...`);\n testResult('Failed 😭');\n console.error(error);\n }\n }", "perform() {\n\n }", "function run_tests(showbanner)\n{\n\tDEBUG = true;\n\tlog.redirect(log.CONSOLE);\n\tlog.init();\n\t\n\tvar rootcon = new Console();\n\tneuro_addKeyPressListener(rootcon.keyListener);\n\tneuro_addKeyUpListener(rootcon.keyUpListener);\n\tneuro_addKeyDownListener(rootcon.keyDownListener);\n\t\n\tlog.info(\"JU Test thinks you are running: \" + SysBrowser.getGuessDisplay());\n\t//log.info(new SysBrowser().report(true));\n\t\n\tif(showbanner)\n\t\tju_show_banner();\n\t\n\tresultsdiv = document.getElementById(\"testresults\");\n\t\n\t//for(i in this)\n\tfor(i in Tests)\n\t{\n\t\t//if it looks like a test function\n\t\tvar arry = i.toString().match(/^test_/);\n\t\tif(arry != null && arry.length > 0)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\teval( \"ju_test_results.put('\"+i+\"',eval(Tests.\" + i+\"()))\" );\n\t\t\t}\n\t\t\tcatch(e)\n\t\t\t{\n\t\t\t\tju_test_results.put(i, JUAssert.fail() );\n\t\t\t\tlog.error(e);\n\t\t\t}\n\t\t}\n\t}\n\t\n\tju_display_results();\n}", "function executeWhenTestSucceeds(testCode, callbackCode, iIntervalMillis) {\r\n // alert('In executeWhenTestSucceeds with testCode: ' + testCode);\r\n // alert('In executeWhenTestSucceeds with callbackCode: ' + callbackCode);\r\n if (eval(testCode)) {\r\n // alert(\"ready, calling: \" + callbackCode);\r\n eval(callbackCode);\r\n }\r\n else {\r\n var timeoutCode = 'executeWhenTestSucceeds(\\'' + testCode + '\\', \\'' + callbackCode + '\\', ' + iIntervalMillis + ');';\r\n // alert('the testCode returned false; setting a timeout with: ' + timeoutCode)\r\n window.setTimeout(timeoutCode, iIntervalMillis);\r\n }\r\n}", "runTestCasesAndFinish()\n {\n throw new Error(\"Must be implemented by subclasses.\");\n }", "run() {\n return this.get('_run').perform();\n }", "async executeTakeFirst() {\n const [result] = await this.execute();\n return result;\n }", "function test(callback, mpc_operator) {\n var open_operator = dual[mpc_operator];\n\n if (!jiff_instances[0] || !jiff_instances[0].isReady()) {\n console.log('Please wait!');\n return;\n }\n has_failed = false;\n\n // Run every test and accumelate all the promises\n var promises = [];\n var length = mpc_operator === 'div_cst' ? 5 : tests.length;\n for (var i = 0; i < length; i++) {\n for (var j = 0; j < jiff_instances.length; j++) {\n var promise = single_test(i, jiff_instances[j], mpc_operator, open_operator);\n promises.push(promise);\n }\n }\n\n // When all is done, check whether any failures were encountered\n Promise.all(promises).then(function () {\n for (var i = 0; i < jiff_instances.length; i++) {\n jiff_instances[i].disconnect();\n }\n jiff_instances = null;\n callback(!has_failed);\n });\n}", "function executeUploaded() {\n console.log('Running acceptance test invocations');\n Promise.all(\n arns.map(arn => {\n return lambda\n .invoke({\n InvocationType: 'RequestResponse',\n FunctionName: arn,\n Payload: JSON.stringify({ test: true })\n })\n .promise();\n })\n )\n .then(([fn1, fn2, fn3, fn4]) => {\n const bool = every([\n fn1.StatusCode === 200,\n fn1.Payload === '\"callback\"',\n fn2.StatusCode === 200,\n fn2.Payload === '\"context.succeed\"',\n fn3.StatusCode === 200,\n fn3.FunctionError === 'Handled',\n fn3.Payload === JSON.stringify({ errorMessage: 'context.fail' }),\n fn4.StatusCode === 200,\n fn4.Payload === '\"context.done\"'\n ]);\n if (bool) {\n console.log('Acceptance test passed.');\n return process.exit(0);\n }\n console.error('Acceptance test failed.');\n console.error('Results: ', JSON.stringify([fn1, fn2, fn3, fn4]));\n return process.exit(1);\n })\n .catch(err => {\n console.error(err);\n process.exit(1);\n });\n}", "function run(tests) {\n var failures = [];\n var total = 0;\n var passed = 0;\n\n for (var i = 0; i < tests.length; i++) {\n for (var k in tests[i].testCase) {\n if (/^test/.test(k)) {\n total++;\n try {\n tests[i].testCase[k]();\n passed++;\n process.stdout.write('.');\n }\n catch (e) {\n failures.push({\n name: tests[i].name + ': ' + k,\n error: e\n });\n process.stdout.write('E');\n }\n }\n }\n }\n\n process.stdout.write('\\n');\n console.log(passed + ' / ' + total + ' tests passed.');\n\n failures.forEach(function (f) {\n console.log('================================================================================');\n console.log(f.name);\n console.log('--------------------------------------------------------------------------------');\n console.log(f.error.stack);\n });\n\n process.stdout.end();\n\n return failures.length;\n}", "async onTestResult(test, testResult, aggregatedResult) {\n const { testResults } = testResult;\n\n const caseResults = this.getCaseResults(testResults);\n\n // Only runs if case results are populated\n if (Object.keys(caseResults).length > 0) {\n console.log('Test Results');\n\n await Promise.all(this.manageCaseResults(caseResults));\n\n // Close the runs\n await Promise.all(this.closeCases());\n }\n }", "function runTestOrAsync()/* : void*/\n {\n if ( this.methodName == null || this.methodName == \"\" )\n {\n flexunit.framework.Assert.fail( \"No test method to run\" );\n }\n\n if ( this.asyncTestHelper$oHM3 != null )\n {\n this.asyncTestHelper$oHM3.runNext();\n }\n else\n {\n this[ this.methodName ]();\n }\n }", "function TestForCompletion() {\n if (test_complete && callback) {\n callback(\"Server successfully tested!\");\n } else {\n if (++retrys < retry_limit) {\n setTimeout(TestForCompletion, retry_interval);\n } else if (callback) {\n callback(\n \"Server test failed to complete after \" +\n (retry_limit * retry_interval) / 1000 +\n \" seconds\"\n );\n }\n }\n }", "function runIt() {\n startQuiz();\n createQuestion();\n submitAnswer();\n nextQuestion();\n restartQuiz();\n restartQuizFinal();\n}", "async function doit(username) {\n let token = await getToken(username, \"123456\");\n if (token) {\n console.log(await queryScore(token));\n await learn(token);\n await final_test(token);\n }\n}", "run() {\n // Display the beginning of the test suite.\n _logPassed('# AUDIT TASK RUNNER STARTED.');\n\n // If the argument is specified, override the default task sequence with\n // the specified one.\n if (arguments.length > 0) {\n this._taskSequence = [];\n for (let i = 0; i < arguments.length; i++) {\n let taskLabel = arguments[i];\n if (!this._tasks.hasOwnProperty(taskLabel)) {\n _throwException('Audit.run:: undefined task.');\n } else if (this._taskSequence.includes(taskLabel)) {\n _throwException('Audit.run:: duplicate task request.');\n } else {\n this._taskSequence.push(taskLabel);\n }\n }\n }\n\n if (this._taskSequence.length === 0) {\n _throwException('Audit.run:: no task to run.');\n return;\n }\n\n for (let taskIndex in this._taskSequence) {\n let task = this._tasks[this._taskSequence[taskIndex]];\n // Some tests assume that tasks run in sequence, which is provided by\n // promise_test().\n promise_test((t) => task.run(t), `Executing \"${task.label}\"`);\n }\n\n // Schedule a summary report on completion.\n promise_test(() => this._finish(), \"Audit report\");\n\n // From testharness.js. The harness now need not wait for more subtests\n // to be added.\n _testharnessDone();\n }", "function gameStep(input) {\n var cmd = interpret(input); // parse the user input\n var result = execute(cmd); // run the desired command\n report(result); // display the results on the screen\n}", "function runTest(testName, f, input, output, expectFail) {\n if (output === void 0) { output = undefined; }\n if (expectFail === void 0) { expectFail = false; }\n try {\n console.log(\"test \" + testName);\n console.log(\" input: \" + input.toString());\n var result = f(input);\n console.log(\" result: \" + result.toString());\n var success = !result || (result && !expectFail || !result && expectFail);\n console.log(success ? \" passed\" : \" FAILED\");\n }\n catch (e) {\n if (expectFail) {\n console.log(\" passed: expected fail, error caught: \" + e.message);\n }\n else {\n console.log(\" FAILED: error caught = \" + e.message);\n }\n }\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 TestUtil(cmd)\r\n{\r\n try\r\n {\r\n return (0 == WshShell.Run(cmd + \" /?\", 0, true));\r\n }\r\n catch (e) {}\r\n \r\n return false;\r\n}", "_failed(test, error) {\n console.log(\"Test has failed\");\n const sessionId = this._getSessionId();\n this._updateBuild(sessionId, { 'status': 'failed', 'name': test.title });\n }", "function onRunTestClicked(e) {\n e.preventDefault();\n executableModuleMessageChannel.send('ui_backend', {'command': 'run_test'});\n}", "function gameStep (input){\n var command = interpret (input);\n var result = execute (command);\n report (result);\n}", "async function simon_exec() {\n if (result == -1) {\n\tconsole.log(\"final score: \" + score);\n\tsendScore(score);\n\tendGame();\n\treturn;\n }\n \n pattern.push(Math.floor(Math.random() * 4));\n console.log(\"pattern: \" + pattern);\n \n await display_run(pattern);\n console.log(\"display_run finished\");\n \n return;\n}", "function generateTestCaseCallback(Y) {\r\n var testCases = new Array();\r\n var Assert = Y.Assert;\r\n\t\t\r\n testCases[0] = new Y.Test.Case({\r\n name: \"blackberry.invoke for Task\",\r\n\t\t\t\r\n\t\t\tsetUp : function () {\r\n\t\t\t\t//Order is a stack, last object will appear first in DOM\r\n\t\t\t\tframework.setupFailButton();\r\n\t\t\t\tframework.setupPassButton();\r\n\t\t\t\tframework.setupInstructions();\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\ttearDown : function () {\r\n\t\t\t\tframework.tearDownFailButton();\r\n\t\t\t\tframework.tearDownPassButton();\r\n\t\t\t\tframework.tearDownInstructions();\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\t\"blackberry.invoke.TaskArguments should exist\" : function() {\r\n\t\t\t\tAssert.isNotUndefined(blackberry.invoke.TaskArguments);\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\t\"blackberry.invoke.TaskArguments.VIEW_NEW should exist\" : function() {\r\n\t\t\t\tAssert.isNotUndefined(blackberry.invoke.TaskArguments.VIEW_NEW);\r\n\t\t\t\tAssert.areSame(0, blackberry.invoke.TaskArguments.VIEW_NEW);\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\t\"blackberry.invoke.TaskArguments.VIEW_EDIT should exist\" : function() {\r\n\t\t\t\tAssert.isNotUndefined(blackberry.invoke.TaskArguments.VIEW_EDIT);\r\n\t\t\t\tAssert.areSame(1, blackberry.invoke.TaskArguments.VIEW_EDIT);\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\t//Invoke Task with TaskArguments with no parameters defined\r\n\t\t\t\"MANUAL 1 should invoke Task with empty TaskArguments\": function() {\r\n\t\t\t\tframework.test = this; //so pass() and fail() can access this test\r\n\t\t\t\tframework.setInstructions(\"Result should be Task application opening up\");\r\n\t\t\t\t\r\n\t\t\t\talert(\"Will attempt to invoke task and passing empty TaskArguments\");\r\n\t\t\t\tvar args = new blackberry.invoke.TaskArguments();\r\n blackberry.invoke.invoke(blackberry.invoke.APP_TASKS, args);\r\n\t\t\t\tframework.test.wait(24*60*60*1000); //wait until user inputs the test result (via button click) *24hr wait since wait() has a bug*\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\t//Invoke Task with TaskArgument-VIEW_NEW-Summary\r\n\t\t\t\"MANUAL 2 should invoke Task with TaskArguments with VIEW_NEW and Summary\": function() {\r\n\t\t\t\tframework.test = this; //so pass() and fail() can access this test\r\n\t\t\t\tframework.setInstructions(\"Result should be Task application opening up\");\r\n\t\t\t\t\r\n\t\t\t\talert(\"Will attempt to invoke task and passing TaskArguments with VIEW_NEW\");\r\n\t\t\t\tvar task = new blackberry.pim.Task();\r\n\t\t\t\ttask.summary = 'Summary and New';\r\n\t\t\t\tvar args = new blackberry.invoke.TaskArguments(task);\r\n\t\t\t\targs.view = 0;\r\n blackberry.invoke.invoke(blackberry.invoke.APP_TASKS, args);\r\n\t\t\t\tframework.test.wait(24*60*60*1000); //wait until user inputs the test result (via button click) *24hr wait since wait() has a bug*\r\n\t\t\t},\r\n\t\t\t\r\n\t\t\t//Invoke Task with TaskArgument-VIEW_EDIT-Summary\r\n\t\t\t\"MANUAL 3 should invoke Task with TaskArguments with VIEW_EDIT and Summary\": function() {\r\n\t\t\t\tframework.test = this; //so pass() and fail() can access this test\r\n\t\t\t\tframework.setInstructions(\"Result should be Task application opening up\");\r\n\t\t\t\t\r\n\t\t\t\talert(\"Will attempt to invoke task and passing TaskArguments with VIEW_EDIT\");\r\n\t\t\t\tvar task = new blackberry.pim.Task();\r\n\t\t\t\ttask.summary = 'Summary and Edit';\r\n\t\t\t\ttask.save();\r\n\t\t\t\tvar args = new blackberry.invoke.TaskArguments(task);\r\n\t\t\t\targs.view = 1;\r\n blackberry.invoke.invoke(blackberry.invoke.APP_TASKS, args);\r\n\t\t\t\tframework.test.wait(24*60*60*1000); //wait until user inputs the test result (via button click) *24hr wait since wait() has a bug*\r\n\t\t\t},\r\n\t\r\n });\r\n\t\t\r\n return testCases;\r\n }", "function execute() {\n var listeners,\n async = isAsync(bench);\n\n if (async) {\n // Use `getNext` as the first listener.\n bench.on('complete', getNext);\n listeners = bench.events.complete;\n listeners.splice(0, 0, listeners.pop());\n }\n // Execute method.\n result[index] = _.isFunction(bench && bench[name]) ? bench[name].apply(bench, args) : undefined;\n // If synchronous return `true` until finished.\n return !async && getNext();\n }", "function run() {}" ]
[ "0.633422", "0.6168832", "0.60930187", "0.60531735", "0.60150033", "0.6009484", "0.59632236", "0.59632236", "0.5955077", "0.5951789", "0.5938829", "0.5903746", "0.58633435", "0.5839731", "0.5820697", "0.5787346", "0.57793945", "0.5752619", "0.5744626", "0.57334924", "0.5716619", "0.5693062", "0.5681933", "0.5668551", "0.56644285", "0.566108", "0.5658248", "0.56515324", "0.56171113", "0.56122065", "0.5583243", "0.55725217", "0.5569675", "0.5559028", "0.55443674", "0.5537546", "0.549274", "0.5472423", "0.54686224", "0.546856", "0.5459621", "0.545452", "0.545452", "0.545452", "0.545452", "0.5452329", "0.5440202", "0.5430468", "0.5423942", "0.5415414", "0.54072964", "0.5407248", "0.540167", "0.5401548", "0.5396954", "0.53966975", "0.5371562", "0.536381", "0.5357342", "0.53392315", "0.53343785", "0.5319359", "0.5303432", "0.5293784", "0.5292537", "0.5273623", "0.5269242", "0.5267371", "0.52568215", "0.5252005", "0.52502424", "0.5246954", "0.52407444", "0.5228721", "0.522267", "0.5203442", "0.52024513", "0.52011406", "0.51978004", "0.51970863", "0.51956767", "0.5192424", "0.51878434", "0.5186299", "0.51837236", "0.51761276", "0.517598", "0.5173485", "0.5169584", "0.51686853", "0.51550764", "0.5149416", "0.51489973", "0.51477015", "0.51439", "0.514236", "0.51418406", "0.51412", "0.51394135", "0.5136707" ]
0.58785534
12
executes a single test (i.e. all test attempts)
async function _TestCurrentConfig(Test) { ++TestsStarted; let attemptsMade = 0; let attemptsFailed = 0; const attemptsAllowed = 1 + Config.Retries; for (let attemptId = 1; attemptsMade < attemptsAllowed; ++attemptId) { try { ++TotalAttemptsMade; ++attemptsMade; await _TestAttempt(Test, attemptId); break; // stop on success } catch (error) { ++attemptsFailed; if (attemptsMade < attemptsAllowed) { const progress = attemptsFailed + "/" + attemptsAllowed; console.log(`Test attempt failure (${progress}):`, error); // keep going } else { console.log(`Test failure`); throw error; } } } // success if (attemptsMade > 1) console.log("Probability of a test failure:", attemptsFailed, "/", attemptsMade, "=", Gadgets.PrettyPercent(attemptsFailed, attemptsMade)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function test() {\n runTests0();\n runTests1(); \n return true;\n}", "function test() {\n console.log('TEST SUITE');\n for(let i=0; i < testFuncs.length; i++) {\n let test = testFuncs[i];\n try {\n test();\n console.log('(' + i + ')' + test.name + ': PASS')\n } catch(e) {\n console.log('(' + i + ')' + test.name + ': FAIL');\n console.log(e);\n }\n }\n}", "function testRun()\r\n{\r\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 runTests(){\n var test = currentTest();\n var error = {\n path: test.path,\n testName: test.name\n };\n\n try{\n test.func(helpers);\n } catch ( err ) {\n error.msg = err;\n error.contexts = textContexts;\n addError(error);\n advanceTests();\n }\n\n // if no initial errors, test eventually times out\n setTimeout(function(){\n error.contexts = textContexts;\n if ( currentTestError ) {\n error.msg = currentTestError;\n addError(error);\n }else if ( !currentTestCompleted ) {\n error.msg = \"Did not complete in time!\";\n addError(error);\n }\n advanceTests();\n }, test.timeout); \n }", "function runNext() {\n var test = tests[at++];\n if (test) {\n setTimeout( function() {\n compare(test.func,\n window[test.func],\n window[test.func + \"_backported\"],\n test.driver);\n runNext();\n }, 20);\n }\n }", "function runShTest (golden, test) {\n for (let i = 3; --i >= 0;) {\n if (golden === '_ERR_') {\n expect(test).to.throw()\n } else {\n expect(unwrap(test())).to.equal(golden)\n }\n }\n}", "function runTest(){\n var test = testCollection.shift();\n currentTest = test;\n if(!test){\n testResults.isPassed = true;\n endTest();\n return;\n }\n //reset tmpTimeout for every run.\n tmpTimeout = 0;\n testUtil.done = function(){\n test.end = new Date();\n if(timeoutHandle !== null){\n clearTimeout(timeoutHandle);\n }\n if(test.tearDown) test.tearDown();\n console.log(util.format(\"Test %s finished - run time: %d\\n\", test.name, test.end-test.start));\n runTest();\n };\n try{\n testResults.runTests++;\n timeoutHandle = setTimeout(timeoutError, testTimeout);\n test.start = new Date();\n console.log(util.format(\"\\nTest %s started\", test.name));\n if(test.setUp) test.setUp();\n log.debug(\"before calling test handler\");\n test.handler(testUtil);\n log.debug(\"after calling test handler\");\n }\n catch(e){\n //handle skip test;\n handleError(e);\n }\n}", "function testSwitcher(count) {\r\n if (count < selectedTestList.length) {\r\n try {\r\n eval(selectedTestList[count] + \"()\");\r\n } catch(err) {\r\n console.log(\"Error while eval function \" + selectedTestList[count], err);\r\n }\r\n } else {\r\n done();\r\n }\r\n}", "function runTest(i) {\n if (i >= inputs.length) throw new Error(\"You do not have enough test cases\");\n let expected = outputs[i];\n let actual = f(inputs[i]);\n verifyEquals(expected, actual);\n}", "function runTest(i) {\n if (i >= inputs.length) throw new Error('You do not have enough test cases');\n let expected = outputs[i];\n let actual = f(inputs[i]);\n verifyEquals(expected, actual);\n}", "function runTest(i) {\n if (i >= inputs.length) throw new Error('You do not have enough test cases');\n let expected = outputs[i];\n let actual = f(inputs[i]);\n verifyEquals(expected, actual);\n}", "function runTest(i) {\n if (i >= inputs.length) throw new Error('You do not have enough test cases');\n let expected = outputs[i];\n let actual = f(inputs[i]);\n verifyEquals(expected, actual);\n}", "function runTest(i) {\n if (i >= inputs.length) throw new Error('You do not have enough test cases');\n let expected = outputs[i];\n let actual = f(inputs[i]);\n verifyEquals(expected, actual);\n}", "async function runTests() {\n numTestsPassed = 0;\n for (let i = 0; i < testFunctions.length; i++) {\n let message = \"\";\n try {\n const testResult = await testFunctions[i]();\n if (testResult) {\n numTestsPassed++;\n message = `Test ${i+1} passed`;\n } else {\n message = `Test ${i+1} failed`;\n }\n } catch(error) {\n message = `Test ${i+1} failed with exception:\\n${error}`;\n }\n console.log(message);\n }\n const fractionOfTestsPassed = `${numTestsPassed}/${testFunctions.length} tests passed`;\n const equals = '='.repeat(fractionOfTestsPassed.length);\n console.log('\\n' + equals + '\\n' + fractionOfTestsPassed + '\\n' + equals + '\\n');\n\n return numTestsPassed == testFunctions.length\n}", "function runTest(i) {\n if (i >= inputs.length) throw new Error('You do not have enough test cases');\n let expected = outputs[i];\n let actual = f(inputs[i]);\n verifyEquals(expected, actual); // verifyEquals is imported above\n}", "async runTest() {}", "run_test() { start_tests(); }", "function run(tests) {\n var failures = [];\n var total = 0;\n var passed = 0;\n\n for (var i = 0; i < tests.length; i++) {\n for (var k in tests[i].testCase) {\n if (/^test/.test(k)) {\n total++;\n try {\n tests[i].testCase[k]();\n passed++;\n process.stdout.write('.');\n }\n catch (e) {\n failures.push({\n name: tests[i].name + ': ' + k,\n error: e\n });\n process.stdout.write('E');\n }\n }\n }\n }\n\n process.stdout.write('\\n');\n console.log(passed + ' / ' + total + ' tests passed.');\n\n failures.forEach(function (f) {\n console.log('================================================================================');\n console.log(f.name);\n console.log('--------------------------------------------------------------------------------');\n console.log(f.error.stack);\n });\n\n process.stdout.end();\n\n return failures.length;\n}", "function next() {\n\t\t\tif (aTests.length) {\n\t\t\t\treturn runTest(aTests.shift());\n\t\t\t} else if (!iRunningTests) {\n\t\t\t\toTotal.element.classList.remove(\"hidden\");\n\t\t\t\toTotal.element.firstChild.classList.add(\"running\");\n\t\t\t\tsummary(Date.now() - iStart);\n\t\t\t\tif (oFirstFailedTest) {\n\t\t\t\t\tselect(oFirstFailedTest);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function testDone(result) {\n if (result == 'pass') {\n console.log(chalk.yellow(mTestInst.getName()) + \" completed with result: \" + chalk.green(result) + \"\\n\");\n } else {\n console.log(chalk.yellow(mTestInst.getName()) + \" completed with result: \" + chalk.red(result) + \"\\n\");\n }\n\n mCurrTest++;\n if (mCurrTest < testObjects.length) {\n resetApp();\n } else {\n console.log(chalk.green(\"All tests completed!\"));\n reportResults();\n }\n }", "function testAllTests() {\n testExtremal();\n testDifference();\n testSpearman();\n testSerial()\n}", "function runTests() {\n\ttestBeepBoop();\n\ttestGetDigits();\n}", "function applyTheTest(server,numOfTest){\r\n console.log(\"Starting the test:\");\r\n console.log(\"-------------------------------\");\r\n\r\n var TIME_PER_TEST = Math.floor(Math.random()*444);\r\n\r\n var runTest = function(counter) {\r\n if (counter >= numOfTest) {\r\n setTimeout(server.stop(function () {\r\n console.log(\"Server was closed successfully\");\r\n console.log(\"-------------------------------\");\r\n if (success === numOfTest) {\r\n console.log(\"Finished running the test. Success: \" + success + \" out\" +\r\n \" of: \" + numOfTest + \" tests\");\r\n }\r\n else {\r\n console.log(\"Finished running the test. Success: \" + success + \" out\" +\r\n \" of: \" + numOfTest + \" tests\");\r\n }\r\n }),2000);\r\n return;\r\n }\r\n oneTestServer(counter);\r\n setTimeout(function() {runTest(counter + 1);},TIME_PER_TEST);\r\n }\r\n runTest(0);\r\n}", "function executeHTests(){\n\t\n\tconsole.log(\"Hotel Tests:\");\n\ttestHSelectOption(1, 500);\n\ttestHSelectOption(2, 200);\n\ttestHSelectOption(3, 700);\n\ttestHSelectOption(4, 300);\n\ttestHSelectOption(5, 100);\n\ttestHSelectOption(6, 400);\n\ttestHSelectOption(7, 70);\n\ttestHSelectOption(8, 900);\n\ttestHSelectOption(9, 250);\n\ttestHSelectOption(10, 80);\n\tconsole.log(\"Should fail:\")\n\ttestHSelectOption(10, 800);\n\n\n}", "function runWithResult( result/* : TestResult*/ )/* : void*/\n {\n result.run( this );\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}", "function test(msg, run){\n\t\t\tTimer.start(msg);\n\t\t\tvar activeTest = {\n\t\t\t\tname: msg\n\t\t\t};\n\t\t\tactiveSuite.tests.push(activeTest);\n\t\t\ttry {\n\t\t\t\trun();\n\t\t\t\tactiveSuite.passedTestsCount++;\n\t\t\t\tactiveTest.duration = Timer.stop(msg);\n\t\t\t} catch(e) {\n\t\t\t\tactiveTest.duration = Timer.stop(msg);\n\t\t\t\tactiveTest.error = true;\n\t\t\t\tactiveSuite.error = true;\n\t\t\t\tactiveSuite.failedTestsCount++;\n\t\t\t\tif(e.name == \"AssertionError\"){\n\t\t\t\t\tactiveTest.message = e.message;\n\t\t\t\t\tactiveTest.actual = \"\" + e.actual;\n\t\t\t\t\tactiveTest.expected = \"\" + e.expected;\n\t\t\t\t} else {\n\t\t\t\t\tactiveTest.message = \"Error: \" + e;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function next() {\n\t\t\tif (aTests.length) {\n\t\t\t\trunTest(aTests.shift());\n\t\t\t} else if (!iRunningTests) {\n\t\t\t\toTotal.element.classList.remove(\"hidden\");\n\t\t\t\toTotal.element.firstChild.classList.add(\"running\");\n\t\t\t\tsummary(Date.now() - iStart);\n\t\t\t\tsaveLastRun(mLastRun);\n\t\t\t\tif (oFirstFailedTest) {\n\t\t\t\t\tselect(oFirstFailedTest);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function test(callback, mpc_operator) {\n var open_operator = dual[mpc_operator];\n\n if (!jiff_instances[0] || !jiff_instances[0].isReady()) {\n console.log('Please wait!');\n return;\n }\n has_failed = false;\n\n // Run every test and accumelate all the promises\n var promises = [];\n var length = mpc_operator === 'div_cst' ? 5 : tests.length;\n for (var i = 0; i < length; i++) {\n for (var j = 0; j < jiff_instances.length; j++) {\n var promise = single_test(i, jiff_instances[j], mpc_operator, open_operator);\n promises.push(promise);\n }\n }\n\n // When all is done, check whether any failures were encountered\n Promise.all(promises).then(function () {\n for (var i = 0; i < jiff_instances.length; i++) {\n jiff_instances[i].disconnect();\n }\n jiff_instances = null;\n callback(!has_failed);\n });\n}", "function doTest (err, label, tests) {\n if (err instanceof Error) {\n console.error (label +': \\033[1m\\033[31mERROR\\033[0m\\n');\n console.error (util.inspect (err, false, 10, true));\n console.log ();\n console.error (err.stack);\n console.log ();\n errors++;\n } else {\n var testErrors = [];\n tests.forEach (function (test) {\n if (test[1] !== true) {\n testErrors.push (test[0]);\n errors++;\n }\n });\n\n if (testErrors.length === 0) {\n console.log (label +': \\033[1m\\033[32mok\\033[0m');\n } else {\n console.error (label +': \\033[1m\\033[31mfailed\\033[0m ('+ testErrors.join (', ') +')');\n }\n }\n\n doNext ();\n}", "function run_tests(type){\n\t$(\"#tests_\"+type+\"s tr\").each(function(num,obj){\n\t\tid=obj.id.substr(5);\n\t\tname = $(\"#\"+obj.id+\" .test_name\").html();\n\t\tname = name.substr(0,name.length);\n\t\trun_test(id,type,name);\n\t});\n}", "function executeTests() {\n\n\tconsole.log('Executing tests...');\n\n\tsetupOutput();\n\n\tfor (var testFile of tests) {\n\t\tconsole.log('Running test %s', testFile);\n\n\t\trequire(testFile);\n\t}\n}", "async function main() {\n const g_tests = async (flag) => {\n let test_base;\n let prefix = '';\n switch (flag) {\n case 'm':\n test_base = test_base_general;\n prefix = 'test_';\n break;\n case 'a':\n test_base = test_base_audio;\n prefix = 'test_';\n break;\n case 's':\n case 'c':\n test_base = test_base_toc;\n break;\n }\n ;\n const retval = await get_tests(`${test_base}/index.json`, prefix);\n return retval;\n };\n const preamble_run_test = async (name) => {\n if (name[0] === 'm' || name[0] === 'a' || name[0] === 's' || name[0] === 'c') {\n const tests = await g_tests(name[0]);\n run_test(tests[name].url);\n }\n else {\n throw new Error('Abnormal test id...');\n }\n };\n try {\n if (process.argv && process.argv.length > 2) {\n if (process.argv[2] === '-sm' || process.argv[2] === '-sa') {\n const label = process.argv[2][2];\n const tests = await g_tests(label);\n const scores = generate_scores(tests);\n console.log(JSON.stringify(scores, null, 4));\n }\n else if (process.argv[2] === '-l') {\n // run a local test that is not registered in the official test suite\n run_test(process.argv[3]);\n }\n else {\n preamble_run_test(process.argv[2]);\n }\n }\n else {\n preamble_run_test('m4.01');\n }\n }\n catch (e) {\n console.log(`Something went very wrong: ${e.message}`);\n process.exit(1);\n }\n}", "runTestCasesAndFinish()\n {\n function finish() {\n InspectorTest.completeTest();\n }\n\n this.runTestCases()\n .then(finish)\n .catch(finish);\n }", "function runTests(e, p, jobFunc) {\n console.log(\"Check requested\");\n\n let job = jobFunc();\n\n // Create Notification object (which is just a Job to update GH using the Checks API)\n var note = new Notification(job.name, e, p);\n note.conclusion = \"\";\n note.title = `Run ${job.name}`;\n note.summary = `Running ${job.name} build/test targets for ${e.revision.commit}`;\n note.text = \"This task will ensure build, linting and tests all pass.\";\n\n // Send notification, then run, then send pass/fail notification\n return notificationWrap(job, note);\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}", "async function runAllTests(){\n await createBlocks();\n await testChainValidation();\n await introduceErrorsInBlockBody();\n await testChainValidation();\n await introduceErrorsInBlockPreviousHash();\n await testChainValidation();\n}", "runTestCasesAndFinish()\n {\n this.runTestCases();\n InspectorTest.completeTest();\n }", "function run_tests(showbanner)\n{\n\tDEBUG = true;\n\tlog.redirect(log.CONSOLE);\n\tlog.init();\n\t\n\tvar rootcon = new Console();\n\tneuro_addKeyPressListener(rootcon.keyListener);\n\tneuro_addKeyUpListener(rootcon.keyUpListener);\n\tneuro_addKeyDownListener(rootcon.keyDownListener);\n\t\n\tlog.info(\"JU Test thinks you are running: \" + SysBrowser.getGuessDisplay());\n\t//log.info(new SysBrowser().report(true));\n\t\n\tif(showbanner)\n\t\tju_show_banner();\n\t\n\tresultsdiv = document.getElementById(\"testresults\");\n\t\n\t//for(i in this)\n\tfor(i in Tests)\n\t{\n\t\t//if it looks like a test function\n\t\tvar arry = i.toString().match(/^test_/);\n\t\tif(arry != null && arry.length > 0)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\teval( \"ju_test_results.put('\"+i+\"',eval(Tests.\" + i+\"()))\" );\n\t\t\t}\n\t\t\tcatch(e)\n\t\t\t{\n\t\t\t\tju_test_results.put(i, JUAssert.fail() );\n\t\t\t\tlog.error(e);\n\t\t\t}\n\t\t}\n\t}\n\t\n\tju_display_results();\n}", "async function _TestAttempt(Test, attemptId) {\n\n const attemptRun = new TestRun(TestsStarted);\n attemptRun.setAttempt(attemptId, Config.Retries);\n\n const test = new Test();\n await test.startup();\n\n try {\n let threads = [];\n\n if (Config.ConcurrencyLevel > 1)\n console.log(`Starting ${Config.ConcurrencyLevel} test threads`);\n\n for (let threadId = 1; threadId <= Config.ConcurrencyLevel; ++threadId) {\n const threadRun = attemptRun.clone();\n threadRun.setThread(threadId, Config.ConcurrencyLevel);\n threads.push(_TestThread(test, threadRun));\n }\n\n if (Config.ConcurrencyLevel > 1)\n console.log(`Started all ${Config.ConcurrencyLevel} test threads.`);\n\n await Promise.all(threads);\n\n if (Config.ConcurrencyLevel > 1)\n console.log(`Finished all ${Config.ConcurrencyLevel} test threads.`);\n } finally {\n console.log(`Shutting down DUT`);\n await test.shutdown();\n }\n}", "function runTests(e, p) {\n console.log(\"Check requested\")\n\n // Create Notification object (which is just a Job to update GH using the Checks API)\n var note = new Notification(`tests`, e, p);\n note.conclusion = \"\";\n note.title = \"Run Tests\";\n note.summary = \"Running the test targets for \" + e.revision.commit;\n note.text = \"This test will ensure build, linting and tests all pass.\"\n\n // Send notification, then run, then send pass/fail notification\n return notificationWrap(build(e, p), note)\n}", "function runTest(callback) {\n currentIncrement = testsToRun[0];\n odfeRunner.setTestIncrement(currentIncrement);\n odfeRunner.setDocsBaseDir(testClassesDirectory);\n\tcurrentTest = currentIncrement.test;\n console.log(\"\\nRun test \" + currentTest);\n\tfs.copy(srcDir + currentTest, trgDir + currentTest, function (err) {\n\t\tif (err) {\n\t\t\tcallback(err);\n\t\t} else {\n\t\t\tconsole.log(\"To Run Moved \" + srcDir + currentTest + \" to \" + trgDir + currentTest);\n\t\t\ttestsToRun.shift();\n async.series([\n cover,\n parseCoverage,\n odfe,\n deleteTrgTest,\n deleteTrgTestFromTarget\n ], function (err) {\n console.log(\"Run test done for \" + currentTest);\n callback();\n });\n\t\t}\n\t});\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 doTest() {\n\n // 1. Run the script action when the script is loaded - For scenario 1\n lookupNextMeeting();\n\n // 2. Check for result after waiting for an enough LONG time\n host.setTimeout(function () { checkForCases(); }, 15000);\n}", "function runTest(x, totalTime, chess) {\n if (chess.game_over()) {\n reportGameOver(chess, false);\n return;\n }\n var fens = generateBoards(chess);\n if (x < 1000) {\n console.log(\"\\n\\n\");\n console.log(\"🔀 RANDOM: \");\n console.log(Translate.encode(chess.fen()));\n console.log(\"\\n\\n\");\n run(chess.fen(), fens)\n .then(function ({ fen, time }) {\n var plChess = new Chess(fen);\n let newTotalTime = time + totalTime;\n let avgTime = newTotalTime / (x + 1);\n console.log(`🤖👌 PL OK (${timeFmt(time)}, avg: ${timeFmt(avgTime)})`);\n console.log(Translate.encode(plChess.fen()));\n if (x > 5 && avgTime > 30 * 1000) {\n console.log(\"GAME OVER: too slow\");\n process.exit(1);\n } else {\n if (plChess.game_over()) {\n reportGameOver(plChess, true);\n } else {\n runTest(x + 1, newTotalTime, makeMove(plChess));\n }\n }\n })\n .catch((e) => {\n if (\"msg\" in e && \"data\" in e) {\n const { msg, data, err } = e;\n console.log(\"🤖❌ PL FAIL\");\n console.log((data || \"\").replace(/^\\n*/, \"\"));\n console.log(msg);\n console.log(\"stderr\");\n console.log(err);\n\t\t console.log(\"SEED :\" + seed_init);\n\t\t if (err === 'outofmemory') {\n\t\t\t process.exit(0);\n\t\t }\n } else {\n console.log(\"unexpected error\");\n console.log(e);\n }\n process.exit(10);\n });\n } else {\n console.log(\"More than 1000 moves\");\n console.log(\"SEED :\" + seed_init);\n process.exit(1);\n }\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 next_test() {\n if (current_test < test.length) {\n kid = cp.fork(test[current_test++], [], { stdio: \"inherit\" });\n\n kid.on(\"exit\", next_test);\n } else {\n\n ass.report(\"html\", function (err, report) {\n require(\"fs\").writeFileSync(\"./coverage.html\", report);\n });\n }\n}", "function runGCTests(tests, i, title) {\n if (!i) {\n i = 0;\n }\n\n if (tests[i]) {\n if (typeof tests[i] === 'string') {\n title = tests[i];\n runGCTests(tests, i + 1, title);\n } else {\n try {\n tests[i]();\n } catch (e) {\n console.error('Test failed: ' + title);\n throw e;\n }\n setImmediate(() => {\n global.gc();\n runGCTests(tests, i + 1, title);\n });\n }\n }\n}", "function checkForNextTest() {\n\n //if cookie, reset to null\n var nextTest = uiUtils.getVal('nextTest');\n\n // debugger;\n if ( nextTest) {\n window.testInProgress = true;\n //debugger;\n uiUtils.setVal('nextTest', null); //clear cookie\n if ( tH.params.runTest=='true' ){\n console.log('have next test, but runTest is true')\n return;\n }\n function runTestX(testName, testDelay) {\n var testDelay = parseInt(testDelay)\n testDelay= sh.dv(testDelay, 0);\n // debugger;\n if ( testName ){\n console.info(\n 'Running test', testName, ''\n )\n\n setTimeout(function runTest_WhenUserTestsLoaded() {\n if ( window.testsLoaded != true ) {\n console.warn('tests not loaded yet')\n setTimeout(runTest, 200+testDelay)\n return;\n }\n debugger; //debug this 12-17-2016-is it correct?\n tH.runTest(testName)\n }, 200+testDelay)\n } else{\n runTest();\n }\n }\n\n runTestX(nextTest.testName)\n }\n }", "function run_all_tests(){\n\t$(\"#tests_list .section_title\").each(function(num,obj){\n\t\ttype=obj.id.substr(8);\n\t\trun_tests(type);\n\t});\n}", "async onTestResult(test, testResult, aggregatedResult) {\n const { testResults } = testResult;\n\n const caseResults = this.getCaseResults(testResults);\n\n // Only runs if case results are populated\n if (Object.keys(caseResults).length > 0) {\n console.log('Test Results');\n\n await Promise.all(this.manageCaseResults(caseResults));\n\n // Close the runs\n await Promise.all(this.closeCases());\n }\n }", "onTestPass(test) {\n this._passes++;\n this._out.push(test.title + ': pass');\n let status_id = this.qaTouch.statusConfig('Passed');\n let caseIds = this.qaTouch.TitleToCaseIds(test.title);\n if (caseIds.length > 0) {\n let results = caseIds.map(caseId => {\n return {\n case_id: caseId,\n status_id: status_id,\n };\n });\n this._results.push(...results);\n }\n }", "async function runAllTests() {\n const files = [];\n const x = new Assert();\n x.blessEnabled = process.argv.findIndex(arg => arg === '--bless') !== -1;\n\n x.startTestSuite('all', false);\n print('> Starting all tests...');\n print('');\n\n fs.readdirSync(__dirname).forEach(function(file) {\n const fullPath = path.join(__dirname, file);\n if (file.endsWith('.js') && fs.lstatSync(fullPath).isFile()) {\n files.push(fullPath);\n }\n });\n files.sort();\n let tmp;\n for (let i = 0; i < files.length; ++i) {\n try {\n tmp = require(files[i]);\n if (tmp['check'] === undefined) {\n continue;\n }\n } catch (err) {\n print(`failed to load \\`${files[i]}\\`, ignoring it...`);\n }\n\n try {\n await tmp['check'](x);\n } catch (err) {\n x._incrError();\n print(`<== \\`${files[i]}\\` failed: ${err}\\n${err.stack}`);\n }\n print('');\n }\n\n print('');\n print(`< Ending ${x.getTotalRanTests()} ${plural('test', x.getTotalRanTests())} with ` +\n `${x.getTotalErrors()} ${plural('error', x.getTotalErrors())}`);\n\n const errors = x.getTotalErrors();\n x.endTestSuite(false);\n return errors;\n}", "function test(test) {\n var attrs = {\n classname: test.parent.fullTitle()\n , name: test.title\n , time: test.duration / 1000\n };\n\n if ('failed' == test.state) {\n var err = test.err;\n attrs.message = escape(err.message);\n console.log(tag('testcase', attrs, false, tag('failure', attrs, false, cdata(err.stack))));\n } else if (test.pending) {\n console.log(tag('testcase', attrs, false, tag('skipped', {}, true)));\n } else {\n console.log(tag('testcase', attrs, true) );\n }\n}", "function run(__index) {\n __index++;\n\n var obj = tests[__index];\n // All data in the query gets the strings replaced which are placed into the config.json in the root directory.\n obj.data.data = jsonTools.parseConfigIntoJSONObject(config, obj.data.data);\n // Same for the REST API Link\n var parsed_request_url = jsonTools.parseConfigIntoTemplateString(config, obj.data.path);\n\n // Logging the Method and URL after Parse here\n console.log(obj.data.method + ' ' + parsed_request_url);\n\n fetch(parsed_request_url, {\n method: obj.data.method,\n body: JSON.stringify(obj.data.data),\n headers: { 'Content-Type': 'application/json' }\n })\n .then((result) => result.json())\n .then((json) => {\n console.log('\\n ' + JSON.stringify(json));\n console.log(' As expected? ' + (JSON.stringify(json)==JSON.stringify(obj.data.expected)) + '\\n');\n run(__index);\n })\n .catch((err) => {\n console.log('\\n' + ' Response was empty(probably, todo: more error handling)');\n console.log(' As expected? ' + (null==obj.data.expected) + '\\n');\n });\n}", "function runAct(token) {\n try {\n var start = performance.now()\n , done = runActDone.bind(null, token, start);\n\n token.testObj.act.exec([done]);\n\n //if the act function has zero parameters then we can execute done\n if (token.testObj.act.params.length === 0) {\n done(0, true);\n }\n }\n catch (ex) {\n handlerError(token, ex);\n }\n }", "function runTest() {\n Logger.log(\"This is the newest test\");\n}", "async function runTests () {\n\tawait countSimpleFamilies()\n\tawait simpleExample()\n\tawait countSimpleFamilies()\n}", "function runTest(testName, f, input, output, expectFail) {\n if (output === void 0) { output = undefined; }\n if (expectFail === void 0) { expectFail = false; }\n try {\n console.log(\"test \" + testName);\n console.log(\" input: \" + input.toString());\n var result = f(input);\n console.log(\" result: \" + result.toString());\n var success = !result || (result && !expectFail || !result && expectFail);\n console.log(success ? \" passed\" : \" FAILED\");\n }\n catch (e) {\n if (expectFail) {\n console.log(\" passed: expected fail, error caught: \" + e.message);\n }\n else {\n console.log(\" FAILED: error caught = \" + e.message);\n }\n }\n}", "async function executePrimaryTask(context) {\n\tconst saveFile = await vscode.commands.executeCommand(\"workbench.action.files.save\");\n\tlet codeforcesURL = vscode.window.activeTextEditor.document.getText();\n\tlet filepath = vscode.window.activeTextEditor.document.fileName;\n\tlet cases;\n\tif (!(filepath.substring(filepath.length - 4).toLowerCase() == '.cpp')) {\n\t\tvscode.window.showInformationMessage(\"Active file must be have a .cpp extension\");\n\t\treturn;\n\t} else {\n\t\tconsole.log(\"Is a cpp\");\n\t\tlatestFilePath = filepath;\n\t\tlatestTextDocument = vscode.window.activeTextEditor.document;\n\t}\n\tlet firstRun = true;\n\tcodeforcesURL = codeforcesURL.split(\"\\n\")[0];\n\tcodeforcesURL = codeforcesURL.substring(2);\n\tlet compilationError = false;\n\n\tlet passed_cases = [];\n\t/**\n\t * runs a particular testcase\n\t * @param {*} caseNum 0-indexed number of the case\n\t */\n\tfunction runTestCases(caseNum) {\n\t\ttry {\n\t\t\tfs.accessSync(filepath + \".tcs\")\n\t\t} catch (err) {\n\t\t\tlet html = downloadCodeforcesPage(codeforcesURL);\n\t\t\thtml.then(string => {\n\t\t\t\tconst [inp, op] = parseCodeforces(string);\n\t\t\t\tcreateTestacesFile(inp, op, filepath);\n\t\t\t\trunTestCases(0);\n\t\t\t}).catch(err => {\n\t\t\t\tconsole.error(\"Error\", err)\n\t\t\t})\n\t\t\treturn;\n\t\t}\n\n\t\tif (caseNum == 0) {\n\t\t\tstartWebView();\n\t\t\tconsole.l\n\t\t\tcases = parseTestCasesFile(filepath);\n\t\t\tif (!cases || !cases.inputs || cases.inputs.length === 0) {\n\t\t\t\tevaluateResults([], true);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tresultsPanel.webview.html = \"<html><body><p style='margin:10px'>Runnung Testcases ...</p><p>If this message does not change in 10 seconds, it means an error occured. Please contact developer.<p/></body></html>\";\n\n\n\t\t} else if (caseNum == cases.numCases) {\n\t\t\treturn;\n\t\t}\n\t\tlet exec = [];\n\t\tlet stdoutlen = 0;\n\t\tlet spawned_process = spawn((filepath + '.bin'), {\n\t\t\ttimeout: 10000\n\t\t});\n\t\t// Creates a 10 second timeout to kill the spawned process.\n\t\tsetTimeout(() => {\n\t\t\tconsole.log(\"10 sec killed process - \", caseNum);\n\t\t\tspawned_process.kill();\n\t\t}, 10000)\n\t\tlet tm = Date.now();\n\t\tspawned_process.stdin.write(cases.inputs[caseNum] + \"\\n\");\n\t\tspawned_process.stdout.on('data', (data) => {\n\t\t\tif (stdoutlen > 10000) {\n\t\t\t\tstartWebView();\n\t\t\t\tconsole.log(\"STDOUT length >10000\");\n\t\t\t\tresultsPanel.webview.html = \"<html><body><p style='margin:10px'>Your code is outputting more data than can be displayed. It is possibly stuck in an infinite loop. <br><br><b>All testcases failed.</b></p></body></html>\";\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconsole.log(\"Go stdout\", data);\n\t\t\tlet ans = data.toString();\n\t\t\tlet tm2 = Date.now();\n\t\t\tlet time = tm2 - tm;\n\t\t\tans = ans.replace(/\\r?\\n|\\r/g, \"\\n\");\n\t\t\tcases.outputs[caseNum] = cases.outputs[caseNum].replace(/\\r?\\n|\\r/g, \"\\n\");\n\t\t\tlet stripped_case = cases.outputs[caseNum].replace(/\\r?\\n|\\r| /g, \"\");\n\t\t\tlet stripped_ans = ans.replace(/\\s|\\n|\\r\\n|\\r| /g, \"\");\n\t\t\tif (stripped_ans == stripped_case) {\n\t\t\t\tpassed_cases[caseNum] = {\n\t\t\t\t\tpassed: true,\n\t\t\t\t\ttime: time,\n\t\t\t\t\toutput: ans.trim(),\n\t\t\t\t\tinput: cases.inputs[caseNum].trim(),\n\t\t\t\t\texpected: cases.outputs[caseNum].trim(),\n\t\t\t\t\tgot: ans.trim()\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tpassed_cases[caseNum] = {\n\t\t\t\t\tpassed: false,\n\t\t\t\t\ttime: time,\n\t\t\t\t\toutput: ans.trim(),\n\t\t\t\t\tinput: cases.inputs[caseNum].trim(),\n\t\t\t\t\texpected: cases.outputs[caseNum].trim(),\n\t\t\t\t\tgot: ans.trim()\n\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (caseNum == (cases.numCases - 1)) {\n\t\t\t\tevaluateResults(passed_cases, true);\n\t\t\t\tspawn(\"rm\", [filepath + \".bin\"]);\n\t\t\t\tspawn(\"del\", [filepath + \".bin\"]);\n\n\n\t\t\t} else {\n\t\t\t\tevaluateResults(passed_cases, false);\n\t\t\t}\n\n\t\t});\n\t\tspawned_process.stderr.on('data', (data) => {\n\t\t\tconsole.error(`stderr: ${data}`);\n\t\t\toc.clear();\n\t\t\toc.appendLine(\"STDERR:\");\n\t\t\toc.appendLine(data);\n\t\t});\n\n\t\tspawned_process.on('exit', (code, signal) => {\n\t\t\tlet tm2 = Date.now();\n\t\t\tconsole.log(\"Execution done with code\", code, \" with signal \", signal, \"for process \", caseNum);\n\t\t\tif (signal || code != 0) {\n\t\t\t\tpassed_cases[caseNum] = {\n\t\t\t\t\tpassed: false,\n\t\t\t\t\ttime: tm2 - tm,\n\t\t\t\t\toutput: `Runtime error. Exit signal ${signal}. Exit code ${code}.`,\n\t\t\t\t\tinput: cases.inputs[caseNum].trim(),\n\t\t\t\t\texpected: cases.outputs[caseNum].trim(),\n\t\t\t\t\tgot: `Runtime error. Exit signal ${signal}. Exit code ${code}.`,\n\t\t\t\t}\n\t\t\t\tif (caseNum == (cases.numCases - 1)) {\n\t\t\t\t\tevaluateResults(passed_cases, true);\n\t\t\t\t} else {\n\t\t\t\t\tevaluateResults(passed_cases, false);\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tlet tm2 = Date.now();\n\t\t\t\tif (!passed_cases[caseNum]) {\n\t\t\t\t\tpassed_cases[caseNum] = {\n\t\t\t\t\t\tpassed: cases.outputs[caseNum].trim().length == 0,\n\t\t\t\t\t\ttime: tm2 - tm,\n\t\t\t\t\t\toutput: \"<br/>\",\n\t\t\t\t\t\tinput: cases.inputs[caseNum].trim(),\n\t\t\t\t\t\texpected: cases.outputs[caseNum].trim(),\n\t\t\t\t\t\tgot: \"<br/>\"\n\t\t\t\t\t}\n\t\t\t\t\tif (caseNum == (cases.numCases - 1)) {\n\t\t\t\t\t\tevaluateResults(passed_cases, true);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tevaluateResults(passed_cases, false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\trunTestCases(caseNum + 1);\n\t\t})\n\t}\n\n\t/**\n\t * Download a html page with the given codeforces url\n\t */\n\tasync function downloadCodeforcesPage(url) {\n\t\tif (verifyValidCodeforcesURL(url)) {\n\t\t\tvscode.window.showInformationMessage(\"Downloading Testcases\");\n\t\t\tconst html = await rp(url);\n\t\t\treturn html;\n\t\t} else {\n\t\t\ttestCasesHelper(filepath);\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t * Comiple the C++ file\n\t */\n\tconst gpp = spawn('g++', [filepath, '-o', filepath + \".bin\"]);\n\tgpp.stdout.on(\"data\", (data) => {\n\t\tconsole.log(`stdout: ${data}`);\n\t})\n\tgpp.stderr.on('data', (data) => {\n\t\toc.clear();\n\t\toc.append(\"Errors while compiling\\n\" + data.toString());\n\t\toc.show();\n\t\tcompilationError = true;\n\t});\n\n\tgpp.on('exit', async (exitCode) => {\n\t\tif (!compilationError) {\n\t\t\tawait runTestCases(0);\n\t\t}\n\t\tconsole.log(`Compiler exited with code ${exitCode}`);\n\t});\n}", "run() {\n if (this.currentRun) {\n throw new Error(\"Can't start a test run if one is already in progress!\");\n }\n const startTime = Date.now();\n this.currentRun = this.runNextTestQueue().then(() => {\n const results = this.runResults;\n results.elapsedTimeMs = Date.now() - startTime;\n this.currentRun = null;\n this.resetRunResults();\n return results;\n }).catch((e) => {\n this.currentRun = null;\n throw e;\n });\n return this.currentRun;\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 oneTestServer(counter){\r\n\r\n /*options to the http*/\r\n var option = {\r\n port: PORT,\r\n path: FILE_TO_CHECK,\r\n headers : {connection: 'keep-alive'}\r\n }\r\n var fullSrc = ROOT_FOLDER + FILE_TO_CHECK;\r\n fullSrc.replace(/\\//g, '\\\\');\r\n\r\n http.get(option, function(res){\r\n\r\n var str = '';\r\n\r\n res.on('data', function(chunk){\r\n str += chunk;\r\n });\r\n\r\n res.on('end', function(){\r\n fs.readFile(fullSrc, function(err,data){\r\n if (err) {\r\n console.log(\"Failed loading the tests\");\r\n }\r\n else{\r\n if (data.toString('utf8') === str) {\r\n\r\n console.log(\"Test number: \" + counter + \", Status:\" +\r\n \" SUCCESS, on file:\" +\r\n \" \" + FILE_TO_CHECK);\r\n success++;\r\n\r\n }\r\n else {\r\n console.log(\"Test number: \" + counter + \", Status :\" +\r\n \" ERROR, on file:\" + FILE_TO_CHECK);\r\n }\r\n }\r\n });\r\n });\r\n res.on('error', function(err){\r\n console.log(err.message);\r\n });\r\n });\r\n}", "function runTest(comparison, text) {\n if(comparison) {\n testOutput(text, 'passed');\n passed += 1;\n } else {\n testOutput(text, 'failed');\n failed += 1;\n }\n }", "function doneTests(opt_failed) {\n endTests(!opt_failed);\n}", "onTestFail(test) {\n this._fails++;\n this._out.push(test.title + ': failed');\n let status_id = this.qaTouch.statusConfig('Failed');\n let caseIds = this.qaTouch.TitleToCaseIds(test.title);\n if (caseIds.length > 0) {\n let results = caseIds.map(caseId => {\n return {\n case_id: caseId,\n status_id: status_id,\n };\n });\n this._results.push(...results);\n }\n }", "function performAllUnitTests()\n{\n utCount = 0;\n for(var i = 1; i <= 2000; i++)\n {\n var id = \"unit-test-anchor-\" + i;\n var elem = document.getElementById(id);\n if(elem && elem.href)\n {\n utCount += 1;\n setTimeout(elem.href, (utCount * 1000));\n }\n }\n}", "function startFailedTests(finish){\n\t(new cronJob(\"0 * * * *\", failedTests)).start();\n\tfailedTests(finish);\n}", "function runTestArray(testArray, functionToTest) {\n\tconsole.log(\"Testing \" + functionToTest.name);\n\tfor (let i=0; i<testArray.length; i++) {\n\t\tconst test = testArray[i];\n\t\tconst testNumber = i + 1;\n\t\trunTest(functionToTest, test, testNumber);\n\t}\n}", "function runTest(testFunction, test, testNumber) {\n\tconst output = testFunction(test.input);\n\n\tconsole.log(\"Test #\" + testNumber);\n\tconsole.log(\"Input:\");\n\tconsole.log(test.input);\n\tconsole.log(\"Output:\");\n\tconsole.log(output);\n\tconsole.log(\"Expected output:\");\n\tconsole.log(test.expectedOutput);\n\n\tif (arrayIsEquals(output, test.expectedOutput)) {\n\t\tconsole.log(\"Success!\");\n\t}\n\telse {\n\t\tconsole.log(\"Failure!\");\n\t}\n\n\tconsole.log(\"\");\n}", "function test_case(err, response) {\n\n\tif (err) {\n\t\tconsole.error(err);\n\t} else {\n assert.equal(response.headers['Content-Type'], 'text/json', 'content type is not text/json');\n assert.equal(response.statusCode, 200, 'status code must be 200');\n\n for (key in response.results) {\n kw = response.results[key];\n // at least 6 results\n assert.isAtLeast(kw.results.length, 6, 'results must have at least 6 links');\n assert.equal(kw.no_results, false, 'no results should be false');\n assert.typeOf(kw.num_results, 'string', 'num_results must be a string');\n assert.isAtLeast(kw.num_results.length, 5, 'num_results should be a string of at least 5 chars');\n assert.typeOf(Date.parse(kw.time), 'number', 'time should be a valid date');\n\n for (let res of kw.results) {\n assert.isOk(res.link, 'link must be ok');\n assert.typeOf(res.link, 'string', 'link must be string');\n assert.isAtLeast(res.link.length, 5, 'link must have at least 5 chars');\n\n assert.isOk(res.title, 'title must be ok');\n assert.typeOf(res.title, 'string', 'title must be string');\n assert.isAtLeast(res.title.length, 10, 'title must have at least 10 chars');\n\n assert.isOk(res.snippet, 'snippet must be ok');\n assert.typeOf(res.snippet, 'string', 'snippet must be string');\n assert.isAtLeast(res.snippet.length, 10, 'snippet must have at least 10 chars');\n }\n }\n\t}\n}", "function runTests() {\n\t// No recurring characters\n\ttest(\"abc\", undefined);\n\n\t// Recurring character at the beginning\n\ttest(\"aabc\", \"a\");\n\n\t// Recurring character in the middle\n\ttest('abbc', 'b');\n\n\t// Recurring character at the end\n\ttest('abcc', 'c');\n\n\t// Multiple recurring charaters.\n\t// The first one should be returned.\n\ttest('aabbcc', 'a');\n\n\t// These edge cases should all return undefined\n\ttest('a', undefined);\n\ttest('', undefined);\n\ttest([], undefined);\n\ttest({}, undefined);\n\ttest(5, undefined);\n\ttest(null, undefined);\n\ttest(undefined, undefined);\n}", "function runTest(oTest) {\n\t\t\t// finishes the test: sets the CSS according to the status, removes the frame and starts\n\t\t\t// the next test\n\t\t\tfunction finish(bFailed) {\n\t\t\t\toTest.element.firstChild.classList.remove(\"running\");\n\t\t\t\tif (bFailed) {\n\t\t\t\t\toTest.element.firstChild.classList.add(\"failed\");\n\t\t\t\t\toFirstFailedTest = oFirstFailedTest || oTest;\n\t\t\t\t} else if (!mParameters.keepResults) {\n\t\t\t\t\t// remove iframe in order to free memory\n\t\t\t\t\tdocument.body.removeChild(oTest.frame);\n\t\t\t\t\toTest.frame = undefined;\n\t\t\t\t}\n\t\t\t\tif (bVisible && oTest === oSelectedTest) {\n\t\t\t\t\tselect(oTest); // unselect the test to make it invisible\n\t\t\t\t}\n\t\t\t\tiRunningTests -= 1;\n\t\t\t\tnext();\n\t\t\t}\n\n\t\t\t// observes QUnit within the test frame\n\t\t\tfunction observe(oQUnit) {\n\t\t\t\t// see https://github.com/js-reporters/js-reporters (@since QUnit 2)\n\t\t\t\toQUnit.on(\"runStart\", function (oDetails) {\n\t\t\t\t\toTest.testCounts = oDetails.testCounts;\n\t\t\t\t\tprogress(0);\n\t\t\t\t});\n\t\t\t\toQUnit.on(\"testEnd\", function () {\n\t\t\t\t\tprogress(oTest.testCounts.finished + 1);\n\t\t\t\t});\n\t\t\t\toQUnit.on(\"runEnd\", function (oDetails) {\n\t\t\t\t\toTest.testCounts = oDetails.testCounts;\n\t\t\t\t\tsummary(oDetails.runtime, oTest);\n\t\t\t\t\tfinish(oDetails.status === \"failed\");\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tfunction onFrameLoad() {\n\t\t\t\toTest.frame.removeEventListener(\"load\", onFrameLoad);\n\t\t\t\twaitForQUnit(5);\n\t\t\t}\n\n\t\t\tfunction progress(iFinished) {\n\t\t\t\toTest.testCounts.finished = iFinished;\n\t\t\t\toTest.infoNode.data = \": \" + iFinished + \"/\" + oTest.testCounts.total;\n\t\t\t}\n\n\t\t\t// searches QUnit within the test frame; waits iRetryCount times for one second if not\n\t\t\t// found\n\t\t\tfunction waitForQUnit(iRetryCount) {\n\t\t\t\tvar oQUnit = oTest.frame.contentWindow.QUnit;\n\n\t\t\t\tif (oQUnit && oQUnit.on) {\n\t\t\t\t\tobserve(oQUnit);\n\t\t\t\t} else if (iRetryCount) {\n\t\t\t\t\t// retry after a second\n\t\t\t\t\tsetTimeout(waitForQUnit.bind(null, iRetryCount - 1), 1000);\n\t\t\t\t} else {\n\t\t\t\t\toTest.infoNode.data = oQUnit ? \" no QUnit V2 found\" : \" no QUnit found\";\n\t\t\t\t\tfinish(true);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\toTest.top = iTop;\n\t\t\tiTop += 1000;\n\t\t\toTest.frame = document.createElement(\"iframe\");\n\t\t\toTest.frame.src = oTest.url;\n\t\t\toTest.frame.setAttribute(\"height\", \"900\");\n\t\t\toTest.frame.setAttribute(\"width\", \"1600\");\n\t\t\toTest.frame.style.position = \"fixed\";\n\t\t\toTest.frame.style.top = oTest.top + \"px\";\n\t\t\tdocument.body.appendChild(oTest.frame);\n\t\t\toTest.element.firstChild.classList.add(\"running\");\n\t\t\tiRunningTests += 1;\n\t\t\toTest.frame.addEventListener(\"load\", onFrameLoad);\n\t\t\tif (bVisible) {\n\t\t\t\tselect(oTest);\n\t\t\t}\n\t\t}", "function runNext(previousResult) {\n hello(true);\n clearTimeout(shutdownTimeout);\n var sendResults = false;\n if (typeof previousResult === 'undefined') {\n if (firstLaunch === true) {\n firstLaunch = false;\n consoleLog('[INFO] tests started at ' + new Date());\n } else if (waiting === true) {\n consoleLog('[INFO] tests resumed at ' + new Date());\n }\n } else {\n stopMonitoring();\n try {\n fs.unlinkSync(path.join(config.reportsBasePath, 'current.json'));\n } catch (e) {\n // Doesn't matter\n }\n runLog.push({\n name: previousResult.testName,\n start: previousResult.start,\n end: previousResult.end,\n duration: previousResult.duration,\n status: previousResult.status,\n dir: previousResult.resultDir\n });\n if (typeof config.dashboard !== \"undefined\" && typeof config.dashboard.address !== \"undefined\" && typeof config.dashboard.connect !== \"undefined\" && typeof config.dashboard.id !== \"undefined\" && config.dashboard.connect === true) {\n try {\n var report = JSON.parse(fs.readFileSync(path.join(previousResult.resultDir, 'report.json')).toString());\n } catch (e) {\n var report = {\n name: previousResult.testName,\n changelist: config.CHANGELIST,\n start: previousResult.start,\n duration: previousResult.duration,\n abstract: {\n passed: 0,\n total: 0,\n failures: 0,\n skipped: 0\n },\n status: previousResult.status\n };\n }\n sendResults = true;\n }\n state.done.push(previousResult.testName);\n doNotOverwriteState = false;\n try {\n fs.writeFileSync(path.join(config.reportsBasePath, 'state.json'), JSON.stringify(state));\n\n } catch (e) {\n consoleLog('[WARN] cannot write current state (1)', e);\n }\n try {\n fs.writeFileSync(path.join(previousResult.resultDir, 'runlog.json'), JSON.stringify(previousResult));\n } catch (e) {\n consoleLog('[WARN] cannot write job runlog (1)', e);\n }\n if (typeof previousResult.pom !== 'undefined' && previousResult.pom) {\n try {\n fs.writeFileSync(path.join(previousResult.resultDir, 'pom.json'), JSON.stringify(previousResult.pom));\n } catch (e) {\n consoleLog('[WARN] cannot write job pom (1)', e);\n }\n }\n try {\n fs.unlinkSync(path.join(previousResult.resultDir, '.manual'));\n } catch (e) {\n // Doesn't matter\n }\n try {\n fs.writeFileSync(path.join(previousResult.resultDir, '.auto'), 'true');\n } catch (e) {\n consoleLog('[WARN] cannot write job .auto flag (1)', e);\n }\n var status = 'UNKNOWN'.grey;\n if (previousResult.status === null) {\n status = 'FAILURE'.red;\n } else if (previousResult.status === false) {\n status = 'UNSTABLE'.yellow;\n } else if (previousResult.status === true) {\n status = 'SUCCESS'.green;\n }\n consoleLog('[INFO] ' + previousResult.testName.white.bold + ' --> '.grey + status.bold);\n var cleanup = temp.cleanup();\n if (typeof previousResult.tmpDir !== 'undefined') {\n try {\n rmdir(previousResult.tmpDir);\n } catch (e) {\n // Doesn't matter\n }\n }\n state.currentJob++;\n }\n if (shutDown === false) {\n waiting = false;\n killMainProcesses();\n exterminate(function() {\n if (shutDown === false) {\n if (typeof previousResult !== 'undefined') {\n getCrashlocationContentAfter();\n }\n getProcessListDiffAfter(function(diff) {\n if (typeof previousResult !== 'undefined' && diff !== null && (diff.less.length > 0 || diff.more.length > 0)) {\n var diffLog = '';\n if (diff.less.length > 0) {\n diffLog += '-- Lost Processes (killed during the test):\\n';\n diff.less.forEach(function(proc) {\n diffLog += '\\t' + proc.pid + '\\t' + proc.cmd + '\\n';\n });\n diffLog += ' \\n\\n';\n }\n if (diff.more.length > 0) {\n diffLog += '++ Additional Processes (spawned during the test):\\n';\n diff.more.forEach(function(proc) {\n diffLog += '\\t' + proc.pid + '\\t' + proc.cmd + '\\n';\n });\n diffLog += ' \\n\\n';\n }\n try {\n fs.writeFileSync(path.join(previousResult.resultDir, 'procdiff.txt'), diffLog);\n } catch (e) {\n consoleLog('[WARN] cannot archive process diff (1)', e);\n }\n }\n if (typeof previousResult !== 'undefined' && crashes.length > 0) {\n consoleLog('[WARN] test ' + previousResult.testName + ' produced ' + crashes.length + ' crash(es)');\n for (var i = 0; i < crashes.length; i++) {\n if (/server/i.test(crashes[i])) {\n var crashName = 'server_crash_' + (i + 1) + path.extname(crashes[i]);\n } else if (/studio/i.test(crashes[i])) {\n var crashName = 'studio_crash_' + (i + 1) + path.extname(crashes[i]);\n } else if (/4d/i.test(crashes[i])) {\n var crashName = '4d_crash_' + (i + 1) + path.extname(crashes[i]);\n } else {\n var crashName = 'other_crash_' + (i + 1) + path.extname(crashes[i]);\n }\n try {\n copyFileSync(crashes[i], path.join(previousResult.resultDir, crashName));\n } catch (e) {\n consoleLog('[WARN] cannot archive crash log', e);\n }\n }\n }\n if (typeof previousResult !== 'undefined' && sendResults === true) {\n if (typeof config.dashboard !== \"undefined\" && typeof config.dashboard.connect !== \"undefined\" && typeof config.dashboard.id !== \"undefined\" && config.dashboard.connect === true) {\n try {\n var results = JSON.parse(fs.readFileSync(path.join(previousResult.resultDir, 'report.json')).toString());\n } catch (e) {\n var results = {\n name: previousResult.testName,\n start: previousResult.start,\n end: previousResult.end,\n duration: previousResult.duration,\n abstract: {\n passed: 0,\n total: 0,\n failures: 0,\n skipped: 0\n },\n status: previousResult.status\n };\n }\n var msg = {\n id: config.dashboard.id,\n changelist: config.CHANGELIST,\n productBranch: config.WAKANDA_BRANCH,\n results: {\n name: results.name,\n start: results.start,\n end: results.end,\n duration: results.duration,\n abstract: {\n passed: results.abstract.passed,\n total: results.abstract.total,\n failures: results.abstract.failures,\n skipped: results.abstract.skipped\n },\n status: results.status,\n crashes: crashes.length\n }\n };\n var pom = getPomForTest(results.name);\n if (isMac()) {\n msg.os = 'mac';\n } else if (isLinux()) {\n msg.os = 'linux';\n } else if (isWindows()) {\n msg.os = 'windows';\n }\n if (pom && typeof pom.tester !== 'undefined' && pom.tester && pom.tester != '') {\n msg.results.tester = pom.tester;\n }\n if (pom && typeof pom.developer !== 'undefined' && pom.developer && pom.developer != '') {\n msg.results.developer = pom.developer;\n }\n if (pom && typeof pom.uuid !== 'undefined') {\n msg.results.uuid = pom.uuid;\n }\n if (pom && typeof pom.bench !== 'undefined' && (pom.bench === true || pom.bench === 'true')) {\n msg.results.isbench = true;\n var CSVFilePath = path.join(previousResult.resultDir, 'result.csv');\n try {\n var CSVStat = fs.statSync(CSVFilePath);\n } catch (e) {\n var CSVStat = false;\n }\n if (CSVStat && CSVStat.isFile()) {\n msg.results.benchdata = fs.readFileSync(CSVFilePath).toString();\n } else {\n msg.results.benchdata = null;\n }\n }\n if (typeof config.subversion === 'string') {\n msg.subVersion = config.subversion.toLowerCase();\n } else {\n msg.subVersion = '';\n }\n try {\n socket.emit('results', JSON.stringify(msg));\n consoleLog('[INFO] just sent \"results\" to the Hub (1)...');\n } catch (e) {\n consoleLog('[ERROR] could not send \"results\" to the Hub (1): ' + e);\n }\n }\n }\n if (state.currentJob > -1 && state.queue.length > 0 && state.currentJob < state.queue.length) {\n clearTimeout(shutdownTimeout);\n consoleLog('[INFO] next (' + (state.currentJob + 1) + '/' + state.queue.length + ')');\n setTimeout(function() {\n runTest(state.queue[state.currentJob], runNext, true);\n }, 125);\n } else if (downloadingNewWakandaBuildDone === false && downloadingNewWakandaInstallerDone === true) {\n clearTimeout(shutdownTimeout);\n consoleLog('[INFO] tests related to the new Wakanda Installers completed at ' + new Date() + ', now waiting 6 hours max. for the new Wakanda Builds (>' + previousChangelist + ')...');\n waiting = true;\n shutdownTimeout = setTimeout(function() {\n shutdown(true);\n }, 6 * 60 * 60 * 1000); // 6h\n } else if (downloadingNewWakandaInstallerDone === false && downloadingNewWakandaBuildDone === true) {\n clearTimeout(shutdownTimeout);\n consoleLog('[WARN] tests related to the new Wakanda Builds completed at ' + new Date() + ', but the new Wakanda Installers are not available (>' + previousChangelist + '): waiting 3 hours max. then shutting down!');\n waiting = true;\n shutdownTimeout = setTimeout(function() {\n shutdown(true);\n }, 4 * 60 * 60 * 1000); // 4h\n } else if (isLinux() === false && downloadingNew4DBuildDone === false && downloadingNewWakandaBuildDone === true) {\n clearTimeout(shutdownTimeout);\n consoleLog('[WARN] tests related to the new Wakanda Builds completed at ' + new Date() + ', but the new 4D Server is not available: will use an old one!');\n if (isMac()) {\n var wakApps = findFiles(config.BUILD_TEST_DIR, /^4d.*server$/i);\n wakApps.forEach(function(wakApp) {\n current4DServerPath = wakApp;\n });\n } else if (isWindows()) {\n var wakApps = findFiles(config.BUILD_TEST_DIR, /^4d.*\\.exe$/i);\n wakApps.forEach(function(wakApp) {\n current4DServerPath = wakApp;\n });\n }\n consoleLog('[INFO] old 4D build (' + current4DServerPath + ') will be used');\n downloadingNew4DBuild = true;\n downloadingNew4DBuildDone = true;\n downloadingNew4DBuildExpect = 0;\n state.queue = state.queue.concat(getAvailableJobs(function(item) {\n if (/(4d(?!p))/i.test(item)) {\n return true;\n } else {\n return false;\n }\n }));\n shutdownTimeout = setTimeout(function() {\n runNext();\n }, 125);\n } else {\n consoleLog('[INFO] finishing tests, please wait...');\n clearTimeout(shutdownTimeout);\n if (runFromWeb === true || (process.argv.length > 2 && (process.argv[2] === 'run' || process.argv[2] === 'resume'))) {\n shutdown(true);\n } else {\n waiting = true;\n shutdownTimeout = setTimeout(function() {\n shutdown(true);\n }, 125);\n }\n }\n });\n }\n });\n }\n}", "function runAllTestCasesRecursive() {\n $log.info('Attempting to run all tests');\n var testQueue = [];\n if (vm.testNamesToRun.length == 0) {\n testQueue = angular.copy(vm.testCases);\n } else {\n for (var i = 0; i < vm.testCases.length; i++) {\n for (var j = 0; j < vm.testNamesToRun.length; j++) {\n if (vm.testCases[i].testName === vm.testNamesToRun[j]) {\n testQueue.push(vm.testCases[i]);\n }\n }\n }\n }\n runTestCasesRecursionBody(testQueue);\n vm.tableParams.reload();\n }", "function main () {\n var numberOfTests = readline() * 1\n\n if (numberOfTests > MAX_TESTS) {\n numberOfTests = MAX_TESTS\n }\n\n for (var i = 0; i < numberOfTests; i++) {\n var board = parseTestData()\n\n if (!isValidBoard(board)) {\n if (DEBUG_2) {\n console.log('N' + ' (' + board.width + 'x' + board.height + ')') // reject test\n } else {\n console.log('N') // reject test\n }\n } else {\n if (DEBUG_2) {\n console.log('Y' + ' (' + board.width + 'x' + board.height + ')') // accept test\n } else {\n console.log('Y') // accept test\n }\n\n if (DEBUG) {\n drawBoard(board)\n }\n var moves = dummyPlay(board)\n\n for (var m = 0; m < moves.length; m++) {\n var moveString = moves[m][1] + ' ' + moves[m][0]\n\n if (DEBUG) {\n moveString += ' ' + moves[m][2]\n }\n\n if (!DEBUG_2) {\n console.log(moveString)\n }\n }\n }\n }\n}", "function checkUnitTest(num, html_url, sparql_url, expected_result)\n{\n var rdfaExtractorUrl = getRdfaExtractorUrl();\n var sparqlEngineUrl = getSparqlEngineUrl();\n \n document.getElementById('unit-test-status-' + num).innerHTML =\n \"CHECKING...\";\n sendRequest('check-test?id=' + num +\n '&source=' + html_url +\n '&sparql=' + sparql_url +\n '&expected-result=' + expected_result +\n '&rdfa-extractor=' + escape(rdfaExtractorUrl) +\n '&sparql-engine=' + escape(sparqlEngineUrl),\n displayUnitTestResult, num)\n}", "function single_test(index, jiff_instance, mpc_operator, open_operator) {\n var numbers = tests[index];\n var party_index = jiff_instance.id - 1;\n var shares = jiff_instance.share(numbers[party_index]);\n\n // Apply operation on shares\n var res = operations[mpc_operator](shares[1], numbers[1]);\n\n var deferred = $.Deferred();\n res.open().then(function (result) {\n test_output(index, result, open_operator);\n deferred.resolve();\n }, error);\n return deferred.promise();\n}", "runTestCasesAndFinish()\n {\n throw new Error(\"Must be implemented by subclasses.\");\n }", "function test(bool) {\n if (!bool) {\n alert(\"Failed test. See console logs for error messages.\")\n console.error(\"Failed test '\" + TC_NAME +\"' in \" + TEST_FILENAME)\n console.log(\"Test case:\")\n console.dir(TC)\n console.log(\"Result:\")\n console.dir(RESULT)\n }\n}", "function TestForCompletion() {\n if (test_complete && callback) {\n callback(\"Server successfully tested!\");\n } else {\n if (++retrys < retry_limit) {\n setTimeout(TestForCompletion, retry_interval);\n } else if (callback) {\n callback(\n \"Server test failed to complete after \" +\n (retry_limit * retry_interval) / 1000 +\n \" seconds\"\n );\n }\n }\n }", "function ct_test() {\n return ok;\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}", "function test6() {\n\tcpuThing();\n\tcpuThing();\n\tcpuThing();\n}", "function run(tests, socket, cb) {\n\n // Generate list of tests to be run, in order.\n // If given a string, import it as a module.\n // If given a non-function object, run any test-like methods on it.\n\n var testNames = [];\n var testsToRun = {};\n\n if (typeof tests === 'string') {\n tests = require(tests);\n }\n if (typeof tests === 'function') {\n testNames.push(tests.name || \"test_default\");\n testsToRun[testNames[testNames.length - 1]] = tests;\n } else if (typeof tests === 'object') {\n Object.keys(tests).forEach(function(testname) {\n if (typeof tests[testname] === 'function') {\n // Match array indices, or method names with \"test\" in them.\n if (typeof testname === 'number' || (/.*test.*/i).exec(testname)) {\n testNames.push(testname);\n testsToRun[testname] = tests[testname].bind(tests);\n }\n }\n });\n }\n\n // Loop through doing runs of the tests until we've exceeded the\n // specified duration, or the specified number of hits.\n\n var duration = socket.runStatus.duration || 0;\n var startTime = currentTime();\n\n async.doWhilst(\n\n // Loop body - do a single run through the tests.\n function doTestRun(cb) {\n\n // Iterate over the tests, doing each in turn.\n async.eachSeries(testNames, function(testname, cb) {\n\n // Each test expects to be called with a single callback argument,\n // which provides the LoadsSocket object as special property 'socket'.\n var testcb = function(err) {\n if (err) {\n var exc_info = [\"JSError\", JSON.stringify(err), \"\"];\n socket.send('addFailure', {test: testname, exc_info: exc_info});\n } else {\n socket.send('addSuccess', {test: testname});\n }\n socket.send('stopTest', {test: testname});\n process.nextTick(function() {\n return cb(null);\n });\n };\n socket.send('startTest', {test: testname});\n testcb.socket = socket;\n\n // Do the test, being sure to catch any exceptions so that\n // we can report them properly.\n try {\n testsToRun[testname](testcb);\n } catch (err) {\n testcb(err);\n }\n }, cb);\n\n },\n\n // Loop condition - stop once hits and duration have been met.\n function checkForTermination() {\n socket.runStatus.currentHit++;\n if (socket.runStatus.currentHit <= socket.runStatus.totalHits) {\n return true;\n }\n if (duration) {\n if (startTime + duration > currentTime()) {\n return true;\n }\n }\n },\n\n // Exit handler - just invoke the original callback.\n cb\n );\n}", "async function test() {\n await testStartup();\n let i = 0;\n while(true) {\n console.log('Start batch number', i);\n // await testBlockAPI();\n await testAbi();\n // await testClassic();\n console.log('Finish batch number', i);\n i++;\n }\n}", "async exec () {\n const { context, results, parameters } = this\n const start = process.hrtime()\n\n const { test } = context\n if (typeof test.beforeAll === 'function') test.beforeAll.call(this, this.beforeAll)\n if (typeof test.afterAll === 'function') test.afterAll.call(this, this.afterAll)\n\n const { driver, client } = test.options\n\n // TODO: log more of the client\n const logContext = {\n driver,\n mode: context.mode,\n browser: client.browser.name,\n ' width': client.width,\n ' height': client.height,\n attempt: this.attempt > 1 ? chalk.bold(chalk.red(this.attempt)) : this.attempt,\n }\n\n let { description } = context.test\n if (typeof description === 'function') description = description.call(this)\n\n if (description && typeof description === 'string') {\n this._log(`${chalk.underline(context.test.filename)}: ${description.trim()}`)\n } else {\n this._log(`${chalk.underline(context.test.filename)}:`)\n }\n\n this._log(` config:`)\n Object.keys(logContext).forEach((key) => {\n this._log(` ${key}: ${logContext[key]}`)\n })\n\n if (parameters) {\n this._log(` parameters:`)\n Object.keys(parameters).forEach((key) => {\n this._log(` ${key}: ${parameters[key]}`)\n })\n }\n\n this._log(' steps:')\n\n await this.runTest()\n\n const success = results.every(result => result.skip || result.success)\n\n const elapsedTime = getElapsedTime(start)\n const time = `(${logElapsedTime(elapsedTime)})`\n this._log(` ${chalk.bold(success ? chalk.green('✔ PASS ' + time) : chalk.red('✕ FAIL ' + time))}`)\n this._log('')\n\n if (!context.runnerOptions.stream) console.log(this._logs.join('\\n'))\n\n return {\n context,\n results,\n success,\n elapsedTime,\n }\n }", "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}", "async function test() {}", "function run_test() {\n do_calendar_startup(run_next_test);\n}", "function startGameTests() {\n let test1 = startTest1(); //running function w/o proper input\n let test2 = startTest2(); //running function w/ proper input\n let test3 = startTest3(); //Selecting player number in HTML correctly passes in value\n console.log(\"\\n$ ~~~~~~ startGame() tests ~~~~~~\");\n console.log(\"$ Test 1: No valid name input marks form as invalid\");\n if (test1 == 1) {\n console.log(\"$ **PASSED**\");\n } else {\n console.log(\"$ ~~FAILED~~\\n Did you close and reopen the html file?\");\n }\n\n console.log(\"$ Test 2: Valid name input marks form as valid\");\n if (test2 == 1) {\n console.log(\"$ **PASSED**\");\n } else {\n console.log(\"$ ~~FAILED~~\\n Did you close and reopen the html file?\");\n }\n\n console.log(\n \"$ Test 3: Selecting player number in HTML correctly passes in value\"\n );\n if (test3 == 1) {\n console.log(\"$ **PASSED**\");\n } else {\n console.log(\"$ ~~FAILED~~\\n Did you close and reopen the html file?\");\n }\n //return sum of tests. 1 = pass, 0 = fail\n return test1 + test2 + test3;\n}", "function run()/* : TestResult*/\n {\n var result/* : TestResult*/ = new flexunit.framework.TestResult();\n \n this.runWithResult( result );\n\n return result;\n }", "function _runTest (index, basename, html) {\n const tests = [\n // preamble page\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // tests titlePage option\n _testToc(root, basename, 'Welcome');\n t.is(root.find('#_footnoteref_3').length, 1);\n t.is(root.find('#_footnotedef_3').length, 1);\n t.is(root.find('a.footnote').length, 1);\n t.is(root.find('div.footnote').length, 1);\n },\n // part I\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, 'Part I');\n t.is(root.find('a.footnote').length, 0);\n t.is(root.find('div.footnote').length, 0);\n },\n // chap 1\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, '1. First Chapter');\n t.is(root.find('#_footnoteref_4').length, 1);\n t.is(root.find('#_footnotedef_4').length, 1);\n t.is(root.find('a.footnote').length, 1);\n t.is(root.find('div.footnote').length, 1);\n },\n // chap 2\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, '2. Second Chapter');\n t.is(root.find('a.footnote').length, 0);\n t.is(root.find('div.footnote').length, 0);\n },\n // chap2 sec1\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, '2.1. Chap2. First Section');\n t.is(root.find('a.footnote').length, 0);\n t.is(root.find('div.footnote').length, 0);\n },\n // chap2 sec2 (depth:2)\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, '2.2. Chap2. Second Section');\n t.is(root.find('a.footnote').length, 0);\n t.is(root.find('div.footnote').length, 0);\n },\n // chap2 sec2-1 (depth:3)\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, '2.2.1. Chap2. Sec 2-1');\n t.is(root.find('a.footnote').length, 0);\n t.is(root.find('div.footnote').length, 0);\n },\n // chap2 sec2-1-1 (depth:4)\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, 'Chap2. Sec 2-1-1');\n t.is(root.find('a.footnote').length, 0);\n t.is(root.find('div.footnote').length, 0);\n },\n // chap2 sec2-1-2 (depth:4)\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, 'Chap2. Sec 2-1-2');\n t.is(root.find('#_footnoteref_4').length, 1);\n t.is(root.find('#_footnotedef_4').length, 1);\n t.is(root.find('a.footnote').length, 2); // multiply referred in Sec 2-1-2\n t.is(root.find('div.footnote').length, 1);\n },\n // chap2 sec2-2 (depth:3)\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, '2.2.2. Chap2. Sec 2-2');\n t.is(root.find('a.footnote').length, 0);\n t.is(root.find('div.footnote').length, 0);\n },\n // chap2 sec2-2-1 (depth:4)\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, 'Chap2. Sec 2-2-1');\n t.is(root.find('a.footnote').length, 0);\n t.is(root.find('div.footnote').length, 0);\n },\n // chap2 sec2-2-2 (depth:4)\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, 'Chap2. Sec 2-2-2');\n t.is(root.find('a.footnote').length, 0);\n t.is(root.find('div.footnote').length, 0);\n },\n // chap2 sec2-2-3 (depth:4)\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, 'Chap2. Sec 2-2-3<sup class=\"footnote\">[1]</sup>');\n t.is(root.find('#_footnoteref_1').length, 1);\n t.is(root.find('#_footnotedef_1').length, 1);\n t.is(root.find('a.footnote').length, 1);\n t.is(root.find('div.footnote').length, 1);\n },\n // chap2 sec2-3 (depth:3)\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, '2.2.3. Chap2. Sec 2-3');\n t.is(root.find('a.footnote').length, 0);\n t.is(root.find('div.footnote').length, 0);\n },\n // chap2 sec3 (depth:2)\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, '2.3. Chap2. Third Section');\n t.is(root.find('a.footnote').length, 0);\n t.is(root.find('div.footnote').length, 0);\n },\n // part II\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, 'Part II');\n t.is(root.find('a.footnote').length, 0);\n t.is(root.find('div.footnote').length, 0);\n },\n // chap 3 (depth:1)\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, '3. Third Chapter<sup class=\"footnote\">[2]</sup>');\n t.is(root.find('#_footnoteref_2').length, 1);\n t.is(root.find('#_footnotedef_2').length, 1);\n t.is(root.find('a.footnote').length, 1);\n t.is(root.find('div.footnote').length, 1);\n },\n // chap3 sec1 (depth:2)\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, '3.1. Chap3. First Section');\n t.is(root.find('a.footnote').length, 0);\n t.is(root.find('div.footnote').length, 0);\n },\n // chap3 sec2 (depth:2)\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, '3.2. Chap3. Second Section');\n t.is(root.find('a.footnote').length, 0);\n t.is(root.find('div.footnote').length, 0);\n },\n // chap3 sec3 (depth:2)\n (basename, html) => {\n const root = Node.getInstanceFromHTML(html);\n // check toc\n _testToc(root, basename, '3.3. Chap3. Third Section');\n t.is(root.find('a.footnote').length, 0);\n t.is(root.find('div.footnote').length, 0);\n },\n ];\n if (tests[index])\n tests[index](basename, html);\n }", "run() {\n // Display the beginning of the test suite.\n _logPassed('# AUDIT TASK RUNNER STARTED.');\n\n // If the argument is specified, override the default task sequence with\n // the specified one.\n if (arguments.length > 0) {\n this._taskSequence = [];\n for (let i = 0; i < arguments.length; i++) {\n let taskLabel = arguments[i];\n if (!this._tasks.hasOwnProperty(taskLabel)) {\n _throwException('Audit.run:: undefined task.');\n } else if (this._taskSequence.includes(taskLabel)) {\n _throwException('Audit.run:: duplicate task request.');\n } else {\n this._taskSequence.push(taskLabel);\n }\n }\n }\n\n if (this._taskSequence.length === 0) {\n _throwException('Audit.run:: no task to run.');\n return;\n }\n\n for (let taskIndex in this._taskSequence) {\n let task = this._tasks[this._taskSequence[taskIndex]];\n // Some tests assume that tasks run in sequence, which is provided by\n // promise_test().\n promise_test((t) => task.run(t), `Executing \"${task.label}\"`);\n }\n\n // Schedule a summary report on completion.\n promise_test(() => this._finish(), \"Audit report\");\n\n // From testharness.js. The harness now need not wait for more subtests\n // to be added.\n _testharnessDone();\n }", "_passed(test) {\n console.log(\"Test has Passed\");\n const sessionId = this._getSessionId();\n this._updateBuild(sessionId, { 'status': 'passed', 'name': test.title });\n }", "function testAll() {\n testAssert()\n testRemainder()\n testConversions()\n}", "function runCoopReportingTest(testName, tests){\n tests.forEach( test => {\n coopCoepReportingTest(testName, ...test);\n });\n verifyRemainingReports();\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 testInternalFunction(f) {\n var exec = f.factory();\n var args = [];\n\n for (var i = 1; i < arguments.length; i++) {\n args.push(new Result(arguments[i]));\n }\n return exec.execute(args);\n}" ]
[ "0.71311814", "0.6791854", "0.6772601", "0.6749921", "0.6657094", "0.6656648", "0.66052127", "0.6581665", "0.6548607", "0.648556", "0.6480711", "0.6480711", "0.6480711", "0.6480711", "0.64749134", "0.6466539", "0.6432324", "0.6425759", "0.63813496", "0.6377981", "0.6350631", "0.6281911", "0.6280129", "0.62453264", "0.6240827", "0.6209905", "0.6178298", "0.6150731", "0.6112257", "0.60754985", "0.60501355", "0.6049634", "0.60454834", "0.6044773", "0.6042008", "0.6040974", "0.603653", "0.602217", "0.60179", "0.6016119", "0.5985578", "0.59795165", "0.5978824", "0.5961102", "0.5947043", "0.5943001", "0.5932293", "0.5915052", "0.5905493", "0.59018874", "0.58919096", "0.58760613", "0.5860911", "0.5845547", "0.5836095", "0.58321303", "0.58293146", "0.5828738", "0.58026505", "0.577956", "0.5763804", "0.575806", "0.5752582", "0.57506686", "0.57501113", "0.57485986", "0.5741127", "0.57338953", "0.5732379", "0.5719919", "0.5711473", "0.5707211", "0.57068163", "0.56956685", "0.569286", "0.5682852", "0.5672356", "0.5669464", "0.56654716", "0.566093", "0.5655644", "0.56550825", "0.56485", "0.5644931", "0.56335217", "0.5632352", "0.56286854", "0.56284195", "0.5628108", "0.562611", "0.5625584", "0.5624073", "0.56197256", "0.561513", "0.5608616", "0.5605151", "0.5594262", "0.558999", "0.5587438", "0.55854" ]
0.6134453
28
toutes les fonctions pour la gestion des likes/dislikes
function verifLike(indexUser, sauceLike, userId) { console.log("entrer dans verif like "); if (indexUser >= 0 && userId == sauceLike.usersLiked[indexUser]) { var retour = true; console.log("Userid dans userliked : " + userId); } else { var retour = false; } console.log("Sortie verif like : " + retour); return retour; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addLikes() {\n if (propLike?.includes(user.username)) {\n let index = propLike.indexOf(user.username);\n let removeLike = [\n ...propLike.slice(0, index),\n ...propLike.slice(index + 1),\n ];\n setLikeGet(removeLike);\n setPropLike(removeLike);\n setRedLike(\"\");\n\n addToLike(eventid, removeLike);\n } else {\n let likesArr = [...propLike, `${user.username}`];\n\n setLikeGet(likesArr);\n setPropLike(likesArr);\n setRedLike(\"red\");\n addToLike(eventid, likesArr);\n }\n }", "function BOT_onLike() {\r\n\tBOT_traceString += \"GOTO command judge\" + \"\\n\"; // change performative\r\n\tBOT_theReqJudgement = \"likeable\";\r\n\tBOT_onJudge(); \t\r\n\tif(BOT_reqSuccess) {\r\n\t\tvar ta = [BOT_theReqTopic,BOT_theReqAttribute]; \r\n\t\tBOT_del(BOT_theUserTopicId,\"distaste\",\"VAL\",ta);\r\n\t\tBOT_add(BOT_theUserTopicId,\"preference\",\"VAL\",ta);\r\n\t}\r\n}", "function likePost() {\n\tif(liked_array[index] != 'y') {\n\t\tjson_array[index].activity_likes++;\n\t\tliked_array[index] = 'y';\n\t}\n\telse{\n\t\tjson_array[index].activity_likes--;\n\t\tliked_array[index] = 'n'\n\t}\n\tdisplayData();\n}", "function defineLikes() {\n // Only update the likes after the caption is published\n if (currentImage > 0) {\n for (let i = 0; i < currentImage; i++) {\n // Constrain the likes to a number\n if (images[i].likes < images[i].maxLikes) {\n images[i].likes++;\n // Update the text\n let likesE = posts[i].post.children('.likes')[0];\n $(likesE).css(\"font-weight\", \"bold\");\n $(likesE).text(`${images[i].likes} likes`);\n }\n }\n }\n}", "onLikeClick(newsId, userId, isNewsLiked, likeId) {\n if (!isNewsLiked) {\n this.props.addLike(newsId, userId, 'show');\n } else {\n this.props.removeLike(newsId, likeId, 'show');\n }\n }", "function handleLikeOrDislike(uid, isLike) {\n console.log(\"handleLikeOrDislike() is called\");\n var handleLikeReq = (doc) => {\n if (doc.exists) {\n var usersLiked = doc.data().usersLiked;\n var usersDisliked = doc.data().usersDisliked;\n var numLikes = doc.data().numLikes;\n var numDislikes = doc.data().numDislikes;\n if (isLike) { // handle like\n // If user has already liked review, remove like from the review\n if (usersLiked.includes(uid)) {\n removeLike(uid, numLikes, usersLiked);\n } else if (usersDisliked.includes(uid)) { // If user has previously disliked review, remove dislike and add like\n removeDislike(uid, numDislikes, usersDisliked);\n like(uid, numLikes, usersLiked);\n } else { // User has never liked or disliked review before, add like\n like(uid, numLikes, usersLiked);\n }\n } else { // handle dislike\n console.log(\"dislike reached\");\n // If user has already disliked review, remove dislike from the review\n if (usersDisliked.includes(uid)) {\n removeDislike(uid, numDislikes, usersDisliked);\n } else if (usersLiked.includes(uid)) { // If user has previously liked review, remove like and add dislike\n removeLike(uid, numLikes, usersLiked);\n dislike(uid, numDislikes, usersDisliked);\n } else { // User has never liked or disliked review before, add like\n dislike(uid, numDislikes, usersDisliked);\n }\n }\n } else {\n console.log(\"Error: document doesn't exist\");\n }\n }\n getDocByDocId(\"reviews\", uid, handleLikeReq);\n}", "function main_like() {\n\t\tvar like = this;\n\t\tvar likes_count = this.parentNode.parentNode.parentNode.childNodes[3].childNodes[1].childNodes[1];\n\t\tlike.innerHTML = \"Unlike\";\n\t\ttest = likes_count.textContent.split(' ');\n\t\ttest1 = test.shift();\n\t\ttest1 = parseInt(test1);\n\t\ttest1 = test1 + 1;\n\t\ttest1 = test1.toString();\n\t\ttest = test1 + \" \" + test;\n\t\tlikes_count.textContent = test;\n\t\tdocument.getElementsByClassName(\"post__actions\")[0].childNodes[1].removeEventListener(\"click\", main_like);\n\t\tdocument.getElementsByClassName(\"post__actions\")[0].childNodes[1].addEventListener(\"click\", main_unlike);\n\t}", "function like() {\n\t\tvar likes = this;\n\t\tvar likes_count = likes.parentNode.childNodes[5];\n\t\tlikes.innerHTML = \"Unlike\";\n\t\ttest = likes_count.textContent.split(' ');\n\t\ttest1 = test.shift();\n\t\ttest1 = parseInt(test1);\n\t\ttest1 = test1 + 1;\n\t\ttest1 = test1.toString();\n\t\ttest = test1 + \" \" + test;\n\t\tlikes_count.textContent = test;\n\t\tlikes.removeEventListener(\"click\", like);\n\t\tlikes.addEventListener(\"click\", unlike);\n\t}", "likeOrdislike()\n {\n const dbChange = new XMLHttpRequest;\n dbChange.onreadystatechange = () => {\n if (dbChange.readyState == 4 && dbChange.status == 200) {\n const result = JSON.parse(dbChange.responseText);\n if(result[0] == true)\n {\n const icon = document.querySelector(\"#haiku\"+this.id+\" .post-like\");\n switch(this.likeStatus)\n {\n case true:\n {\n this.likeStatus = false;\n this.likes--;\n icon.style.backgroundImage = \"url('img/icons/heart_normal.svg')\";\n saveLikesData(this.id, \"remove\");\n break;\n }\n case false:\n {\n this.likeStatus = true;\n this.likes++;\n icon.style.backgroundImage = \"url('img/icons/heart_full_normal.svg')\";\n saveLikesData(this.id, \"add\");\n break;\n }\n }\n document.querySelector(\"#haiku\"+this.id+\" .post-like span\").textContent = this.likes;\n }\n showCommunicate(result);\n }\n };\n dbChange.open(\"POST\", \"../resources/haiku_like.php\", true);\n dbChange.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n if(this.likeStatus == true)\n dbChange.send(\"like=false&hid=\"+this.id);\n else\n dbChange.send(\"like=true&hid=\"+this.id);\n }", "function handleLikes() {\n // Get a random number\n let randomNumber = Math.random();\n // To make it unpredictable, only change the likes if =>\n if (randomNumber < REVEAL_PROBABILITY) {\n defineLikes();\n }\n}", "function handleLike() {\n // setLike(!like);\n // setDislike(false);\n\n fetch(`http://localhost:3000/watchList/${id}`, {\n method: \"PATCH\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n likeButton: !likeButton,\n dislikeButton: false,\n }),\n })\n .then((resp) => resp.json())\n .then((data) =>\n onEditMovie(data.id, data.likeButton, data.dislikeButton)\n );\n }", "function addLikes() {\r\n commentLike.addEventListener('click', event => {\r\n event.preventDefault();\r\n let likeId = event.target.alt;\r\n axios.put(`https://project-1-api.herokuapp.com/comments/${likeId}/like${apiKey}`, \"\")\r\n .then(response => {\r\n let newLike = Number(commentLike.nextSibling.innerText);\r\n commentLike.nextSibling.innerText = newLike + 1;\r\n })\r\n .catch(error => {\r\n console.error(error);\r\n })\r\n \r\n })\r\n }", "function handleLikebtn() {\n setIsLike( !isLiked )\n \n }", "function facebookLike(url) {\n var s=s_gi(s_account);\n s.eVar2='fRecommend';\n s.events='event12';\n s.trackExternalLinks = false;\n s.linkTrackVars='eVar2,events';\n s.linkTrackEvents='event12';\n s.tl(this,'o','fRecommend');\n}", "function clickheart(event)\n{\n var children = event.getElementsByTagName('span');\n var photoid = event.parentNode.parentNode.id;//the id of photo, user this to update\n if (children[1].style.display == \"inline-block\" && children[2].style.display == \"none\")//if empty\n {\n children[1].style.display = \"none\";\n children[2].style.display = \"inline-block\";\n /**\n * like +1 with the photoid given above\n * insert a message in table 'like' with the photoid and userid\n **/\n $.ajax({\n // The URL for the request\n url: \"/gourylls/found/like\",\n // The data to send (will be converted to a query string)\n data: {picID: photoid},\n // Whether this is a POST or GET request\n type: \"POST\",\n error: function (xhr, status, errorThrown) {\n alert(\"Sorry, there was a problem!\");\n console.log(\"Error: \" + errorThrown);\n console.log(\"Status: \" + status);\n console.dir(xhr);\n }\n // Code to run regardless of success or failure\n });\n\n }\n else if (children[1].style.display == \"none\" && children[2].style.display == \"inline-block\")//if full\n {\n children[1].style.display = \"inline-block\";\n children[2].style.display = \"none\";\n //alert(photoid);\n /**\n * like -1 with the photoid given above \n * delete the message in table 'like' with the photoid and userid\n **/\n $.ajax({\n // The URL for the request\n url: \"/gourylls/found/dislike\",\n // The data to send (will be converted to a query string)\n data: {picID: photoid},\n // Whether this is a POST or GET request\n type: \"POST\",\n error: function (xhr, status, errorThrown) {\n alert(\"Sorry, there was a problem!\");\n console.log(\"Error: \" + errorThrown);\n console.log(\"Status: \" + status);\n console.dir(xhr);\n }\n // Code to run regardless of success or failure\n });\n }\n}", "getLikes(state, data) {\n state.likes = data\n }", "function bindLikeCommentEvents() {\n\t\t\tjContainer.find(\".LikeComment\").unbind(\"click\").on(\"click\", function(event) {\n\t\t\t\tvar this$,\n\t\t\t\t\tdataObject,\n\t\t\t\t\teventID,\n\t\t\t\t\trollUpID,\n\t\t\t\t\tnewLikedState,\n\t\t\t\t\tlikeObject$,\n\t\t\t\t\toldLikeCount,\n\t\t\t\t\tnewLikeCount;\n\n\t\t\t\tcheckEvent(event);\n\n\t\t\t\tthis$ = $(event.currentTarget);\n\t\t\t\tdataObject = $(event.target).parents(\".ASWidget-Comment\").first();\n\t\t\t\teventID = dataObject.attr(\"eventid\") || \"0\";\n\t\t\t\trollUpID = dataObject.attr(\"commentid\") || \"0\";\n\t\t\t\tnewLikedState = !(\"true\" === dataObject.attr(\"liked\"));\n\t\t\t\tlikeObject$ = savedSettings.useDefaultStyle ?\n\t\t\t\t\tthis$.parents(\"[aria-label=ASWidgetCommentActionDiv]\").first().find(\".ASWidgetCurrentCommentLikes\") :\n\t\t\t\t\tthis$.parents('.ASWidget-Comment-Inside-Author').find('.ASWidgetCurrentPostLikes');\n\n\t\t\t\toldLikeCount = parseInt(likeObject$.text());\n\n\t\t\t\ttoggleLikeEvent(eventID, rollUpID, newLikedState, function(successfully) {\n\t\t\t\t\tif (!successfully) {\n\t\t\t\t\t\tX.T.notifyError((newLikedState ? localizeString(\"ASWidget-like-comment-fail\", 'Liking the comment has failed [request error]') : localizeString(\"ASWidget-unlike-comment-fail\", \"Unliking the comment has failed [request error]\")), titleError);\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (newLikedState) {\n\t\t\t\t\t\tlikeObject$.text(oldLikeCount + 1);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnewLikeCount = (oldLikeCount > 0 ? oldLikeCount - 1 : 0);\n\t\t\t\t\t\tlikeObject$.text(newLikeCount.toString());\n\t\t\t\t\t}\n\n\t\t\t\t\tif (savedSettings.useDefaultStyle) {\n\t\t\t\t\t\tthis$.text(newLikedState ? localizeString(\"ASWidget-streamitems-comment-unlike-btn\", \"Unlike\") : localizeString(\"ASWidget-streamitems-comment-like-btn\", \"Like\"));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlikeObject$.parents('.ASWidget-Comment-Inside-Author')\n\t\t\t\t\t\t\t.find('i')\n\t\t\t\t\t\t\t.removeAttr('class')\n\t\t\t\t\t\t\t.addClass((0 === newLikeCount || !newLikedState) ? 'fa fa-heart-o' : 'fa fa-heart');\n\t\t\t\t\t}\n\n\t\t\t\t\tdataObject.attr(\"liked\", newLikedState.toString());\n\t\t\t\t\treturn true;\n\t\t\t\t});\n\t\t\t\treturn false;\n\t\t\t});\n\t\t}", "function clickedLike(){\n\t\t$(\".like\").click(function(){ //jalankan fungsi like bertambah jika di klik\n\t\t\tvar indLike = $(\".like\").index(this); //menyimpan index untuk memilih like yang mana yang akan di tambah\n\t\t\tjmlLike[indLike] += 1 ;\n\t\t\t$(this).text(jmlLike[indLike] + \" like\" );\n\t\t});\n\t}", "function setLike( jQuery ) {\n $( '.like' ).each(function(index, element) {\n $( element ).find('.like__input').on('click', function(event) {\n event.stopPropagation();\n });\n $( element ).on('click', function(event) {\n const counElement = $( element ).find('.like__count');\n let count = parseInt(counElement.text());\n count = $( element ).hasClass('like_liked_true') ? --count : ++count;\n counElement.text(count);\n $( element ).toggleClass('like_liked_true');\n $( element ).toggleClass('like_liked_false');\n })\n });\n}", "function recommendNewPosts() {\n model.loadModel();\n getNewPosts(function (err, posts) {\n var label\n ;\n posts.forEach(function (post) {\n label = model.classifyPost(post);\n if (label == 'like') {\n console.log(post);\n }\n });\n });\n }", "like() {\r\n return this.clone(Comment, \"Like\").postCore();\r\n }", "function likePost(e) {\n const enableDataCollection = e.data.enableDataCollection;\n let target = $(event.target);\n // Determine if the comment is being LIKED or UNLIKED based on the initial\n // button color. Red = UNLIKE, Not Red = LIKE.\n if (target.closest('.ui.like.button').hasClass(\"red\")) {\n // Since the button was already red, this button press is an UNLIKE action.\n // Remove red color from like button and decrease the displayed like count\n target.closest('.ui.like.button').removeClass(\"red\");\n const label = $(this).closest('.ui.like.button')\n .next(\"a.ui.basic.red.left.pointing.label.count\");\n label.html(function(i, val) { return val * 1 - 1 });\n } else {\n // Since the button was not red, this button press is a LIKE action\n // Add red color to like button and increase the displayed like count\n target.closest('.ui.like.button').addClass(\"red\");\n var label = $(this).next(\"a.ui.basic.red.left.pointing.label.count\");\n label.html(function(i, val) { return val * 1 + 1 });\n // Store information about the action\n let pathArrayForHeader = window.location.pathname.split('/');\n let currentPageForHeader = pathArrayForHeader[1];\n let currentModuleForHeader = pathArrayForHeader[2];\n let postID = $(this).closest(\".ui.card\").attr(\"postID\");\n let actionType = getActionType(currentPageForHeader);\n let like = Date.now();\n if (actionType === \"free play\" || enableDataCollection) {\n $.post(\"/feed\", {\n actionType: actionType,\n postID: postID,\n modual: currentModuleForHeader,\n like: like,\n _csrf: $('meta[name=\"csrf-token\"]').attr('content')\n });\n }\n }\n}", "function initActionsLike() {\n var self = this;\n\n // like / dislike animation init\n var $likeAnimation = void 0;\n var $dislikeAnimation = void 0;\n if (self.options.enableActionLikeAnimation) {\n $likeAnimation = (0, _utility.$)('<div class=\"nk-like-animation\">' + self.options.templates.likeAnimationLiked + '</div>').appendTo(_utility.$body);\n $dislikeAnimation = (0, _utility.$)('<div class=\"nk-dislike-animation\">' + self.options.templates.likeAnimationDisliked + '</div>').appendTo(_utility.$body);\n }\n function runLikeAnimation(type) {\n var $animateItem = type === 'like' ? $likeAnimation : $dislikeAnimation;\n _utility.tween.set($animateItem, {\n scale: 1,\n opacity: 0\n });\n _utility.tween.to($animateItem, 0.3, {\n scale: 1.1,\n opacity: 0.5,\n display: 'block',\n ease: Power2.easeIn,\n force3D: true,\n onComplete: function onComplete() {\n _utility.tween.to($animateItem, 0.3, {\n scale: 1.2,\n opacity: 0,\n display: 'none',\n ease: Power2.easeOut,\n force3D: true\n });\n }\n });\n }\n\n // heart action\n _utility.$doc.on('click', '.nk-action-heart', function onActionHeartClick(e) {\n e.preventDefault();\n var $like = (0, _utility.$)(this);\n\n if ($like.hasClass('busy')) {\n return;\n }\n\n var $num = $like.find('.num');\n var type = $like.hasClass('liked') ? 'dislike' : 'like';\n var $parent = $like.parents('.nk-comment:eq(0), .nk-blog-post:eq(0)').eq(0);\n var updatedNum = void 0;\n var updatedIcon = void 0;\n $like.addClass('busy');\n self.options.events.actionHeart({\n $dom: $like,\n $parent: $parent,\n type: type,\n currentNum: parseInt($num.text(), 10),\n updateNum: function updateNum(num) {\n $num.text(num);\n updatedNum = 1;\n if (updatedNum && updatedIcon) {\n $like.removeClass('busy');\n }\n },\n updateIcon: function updateIcon() {\n $like[type === 'like' ? 'addClass' : 'removeClass']('liked');\n updatedIcon = 1;\n if (updatedNum && updatedIcon) {\n $like.removeClass('busy');\n }\n\n // like / dislike animation\n if (self.options.enableActionLikeAnimation) {\n runLikeAnimation(type);\n }\n }\n });\n });\n\n // like action\n _utility.$doc.on('click', '.nk-action-like .like-icon, .nk-action-like .dislike-icon', function onLikeClick(e) {\n e.preventDefault();\n var $like = (0, _utility.$)(this);\n var $parentLike = $like.parent();\n\n if ($parentLike.hasClass('busy')) {\n return;\n }\n\n var isLiked = $parentLike.hasClass('liked');\n var isDisliked = $parentLike.hasClass('disliked');\n var isDislike = $like.hasClass('dislike-icon');\n\n var $num = $parentLike.find('.num');\n var $parent = $parentLike.parents('.nk-comment:eq(0), .nk-blog-post:eq(0)').eq(0);\n var type = isDislike ? 'dislike' : 'like';\n var updatedNum = void 0;\n var updatedIcon = void 0;\n $parentLike.addClass('busy');\n self.options.events.actionLike({\n $dom: $like,\n $parent: $parent,\n type: type,\n isLiked: isLiked,\n isDisliked: isDisliked,\n currentNum: parseInt($num.text(), 10),\n updateNum: function updateNum(num) {\n $num.text((num > 0 ? '+' : '') + num);\n updatedNum = 1;\n if (updatedNum && updatedIcon) {\n $parentLike.removeClass('busy');\n }\n },\n updateIcon: function updateIcon() {\n $parentLike.removeClass('liked disliked');\n if (!(isLiked && !isDislike || isDisliked && isDislike)) {\n $parentLike.addClass(type === 'like' ? 'liked' : 'disliked');\n }\n updatedIcon = 1;\n if (updatedNum && updatedIcon) {\n $parentLike.removeClass('busy');\n }\n\n // like / dislike animation\n if (self.options.enableActionLikeAnimation) {\n if (type === 'like' && !isLiked || type === 'dislike' && !isDisliked) {\n runLikeAnimation(type);\n }\n }\n }\n });\n });\n}", "function likeVsLikes(toyLikeCount){\n\t\tif (toyLikeCount == 1){\n\t\t\treturn 'Like';\n\t\t} else {\n\t\t\treturn 'Likes';\n\t\t}\n\t}", "'ADD_REPLY_DISLIKE'(state, id) {\n var vid = state.videos.filter(video => {\n return video.vidId == id.videoId\n })[0]\n var com = vid.comments.filter(comment => {\n return comment.idComment == id.commentId\n })[0]\n var reply = com.replies.filter(rep => {\n return rep.idReply == id.replyId\n })[0]\n reply.dislikes++\n com.replies.splice((com.replies.length - 1) - reply.idReply, 1, reply)\n vid.comments.splice((vid.comments.length - 1) - com.idComment, 1, com)\n videos.splice(vid.vidId, 1, vid)\n }", "function colorLike() {\n setLike(!like);\n }", "function dislike(uid, numDislikes, usersDisliked) {\n console.log(\"usersDisliked: \", usersDisliked);\n console.log(\"dislike() called\");\n // Add highlight to thumbs down\n $(\"#dislike-\" + uid).addClass(\"primary-dark-color\");\n console.log(\"Class list\", document.getElementById(\"dislike-\" + uid).classList.item(0));\n // Increment number of likes. Add to DOM\n var incrementNumDislikes = numDislikes + 1;\n addTextToDom(incrementNumDislikes.toString(), \"num-dislikes-\" + uid);\n // Update numLikes in Firestore. Add uid from usersLiked \n if (!usersDisliked.includes(uid)) {\n console.log(\"usersDisliked does not include this uid: adding new user\");\n usersDisliked.push(uid);\n updateDocumentUsingDocId(\"reviews\", uid, {\"numDislikes\": incrementNumDislikes, \"usersDisliked\": usersDisliked});\n } else {\n console.log(\"usersDisliked already include this uid: new user\");\n updateDocumentUsingDocId(\"reviews\", uid, {\"numDislikes\": incrementNumDislikes});\n }\n}", "toggleFavourite() {\n const blogId = this.state.blog.id;\n const baseURL = modelURL('blog', blogId, 'like');\n const url = modelLikeURL(baseURL);\n\n const method = hasUserLiked(getSession().user, this.state.blog) ? httDelete: post;\n method(url)\n .then((response) => {\n this.setState({\n blog: response.data,\n });\n this.fetchBlog(blogId);\n })\n .catch((error) =>{\n this.fetchBlog(blogId);\n });\n }", "function compteurLikes (photographerMediaList) {\n let totalCoeur = compteurTotal(photographerMediaList)\n // selectionne le nombre total de likes\n const totalLikes = document.querySelector('.numbers_likes')\n\n // selectionne tous les coeurs\n const allLikes = document.querySelectorAll('figure button')\n\n // pour chaque coeur on incrementes de 1\n for (const chaquecoeur of allLikes) {\n chaquecoeur.addEventListener('click', () => {\n // si pas la class increment on increment de 1\n if (!chaquecoeur.classList.contains('increment')) {\n const nombreLike = chaquecoeur.parentNode.querySelector('.likes')\n let count = nombreLike.innerHTML\n nombreLike.innerHTML = ++count\n chaquecoeur.classList.add('increment')\n // incrementes le compteur total\n totalLikes.innerHTML = totalCoeur += 1\n }\n // sinon on decremente de 1\n else if (chaquecoeur.classList.contains('increment')) {\n const nombreLike = chaquecoeur.parentNode.querySelector('.likes')\n let count = nombreLike.innerHTML\n chaquecoeur.classList.remove('increment')\n nombreLike.innerHTML = --count\n totalLikes.innerHTML = totalCoeur -= 1\n }\n })\n }\n}", "'ADD_REPLY_LIKE'(state, id) {\n var vid = state.videos.filter(video => {\n return video.vidId == id.videoId\n })[0]\n var com = vid.comments.filter(comment => {\n return comment.idComment == id.commentId\n })[0]\n var reply = com.replies.filter(rep => {\n return rep.idReply == id.replyId\n })[0]\n reply.likes++\n com.replies.splice((com.replies.length - 1) - reply.idReply, 1, reply)\n vid.comments.splice((vid.comments.length - 1) - com.idComment, 1, com)\n videos.splice(vid.vidId, 1, vid)\n }", "function like(uid, numLikes, usersLiked) {\n console.log(\"like() called\");\n // Users newly likes this review.\n // Add highlight to thumbs up\n $(\"#like-\" + uid).addClass(\"primary-dark-color\");\n // Increment number of likes. Add to DOM\n var incrementNumLikes = numLikes + 1;\n addTextToDom(incrementNumLikes.toString(), \"num-likes-\" + uid);\n // Update numLikes in Firestore. Add uid from usersLiked if not already included\n if (!usersLiked.includes(uid)) {\n usersLiked.push(uid);\n updateDocumentUsingDocId(\"reviews\", uid, {\"numLikes\": incrementNumLikes, \"usersLiked\": usersLiked});\n } else {\n updateDocumentUsingDocId(\"reviews\", uid, {\"numLikes\": incrementNumLikes});\n }\n}", "function _initActionsLike() {\n var self = this;\n\n // like / dislike animation init\n var $likeAnimation = void 0;\n var $dislikeAnimation = void 0;\n if (self.options.enableActionLikeAnimation) {\n $likeAnimation = $('<div class=\"nk-like-animation\">' + self.options.templates.likeAnimationLiked + '</div>').appendTo($body);\n $dislikeAnimation = $('<div class=\"nk-dislike-animation\">' + self.options.templates.likeAnimationDisliked + '</div>').appendTo($body);\n }\n function runLikeAnimation(type) {\n var $animateItem = type === 'like' ? $likeAnimation : $dislikeAnimation;\n tween.set($animateItem, {\n scale: 1,\n opacity: 0\n });\n tween.to($animateItem, 0.3, {\n scale: 1.1,\n opacity: 0.5,\n display: 'block',\n ease: Power2.easeIn,\n force3D: true,\n onComplete: function onComplete() {\n tween.to($animateItem, 0.3, {\n scale: 1.2,\n opacity: 0,\n display: 'none',\n ease: Power2.easeOut,\n force3D: true\n });\n }\n });\n }\n\n // heart action\n $doc.on('click', '.nk-action-heart', function (e) {\n e.preventDefault();\n var $like = $(this);\n\n if ($like.hasClass('busy')) {\n return;\n }\n\n var $num = $like.find('.num');\n var type = $like.hasClass('liked') ? 'dislike' : 'like';\n var $parent = $like.parents('.nk-comment:eq(0), .nk-blog-post:eq(0)').eq(0);\n var updatedNum = void 0;\n var updatedIcon = void 0;\n $like.addClass('busy');\n self.options.events.actionHeart({\n $dom: $like,\n $parent: $parent,\n type: type,\n currentNum: parseInt($num.text(), 10),\n updateNum: function updateNum(num) {\n $num.text(num);\n updatedNum = 1;\n if (updatedNum && updatedIcon) {\n $like.removeClass('busy');\n }\n },\n updateIcon: function updateIcon() {\n $like[type === 'like' ? 'addClass' : 'removeClass']('liked');\n updatedIcon = 1;\n if (updatedNum && updatedIcon) {\n $like.removeClass('busy');\n }\n\n // like / dislike animation\n if (self.options.enableActionLikeAnimation) {\n runLikeAnimation(type);\n }\n }\n });\n });\n\n // like action\n $doc.on('click', '.nk-action-like .like-icon, .nk-action-like .dislike-icon', function (e) {\n e.preventDefault();\n var $like = $(this);\n var $parentLike = $like.parent();\n\n if ($parentLike.hasClass('busy')) {\n return;\n }\n\n var isLiked = $parentLike.hasClass('liked');\n var isDisliked = $parentLike.hasClass('disliked');\n var isDislike = $like.hasClass('dislike-icon');\n\n var $num = $parentLike.find('.num');\n var $parent = $parentLike.parents('.nk-comment:eq(0), .nk-blog-post:eq(0)').eq(0);\n var type = isDislike ? 'dislike' : 'like';\n var updatedNum = void 0;\n var updatedIcon = void 0;\n $parentLike.addClass('busy');\n self.options.events.actionLike({\n $dom: $like,\n $parent: $parent,\n type: type,\n isLiked: isLiked,\n isDisliked: isDisliked,\n currentNum: parseInt($num.text(), 10),\n updateNum: function updateNum(num) {\n $num.text((num > 0 ? '+' : '') + num);\n updatedNum = 1;\n if (updatedNum && updatedIcon) {\n $parentLike.removeClass('busy');\n }\n },\n updateIcon: function updateIcon() {\n $parentLike.removeClass('liked disliked');\n if (!(isLiked && !isDislike || isDisliked && isDislike)) {\n $parentLike.addClass(type === 'like' ? 'liked' : 'disliked');\n }\n updatedIcon = 1;\n if (updatedNum && updatedIcon) {\n $parentLike.removeClass('busy');\n }\n\n // like / dislike animation\n if (self.options.enableActionLikeAnimation) {\n if (type === 'like' && !isLiked || type === 'dislike' && !isDisliked) {\n runLikeAnimation(type);\n }\n }\n }\n });\n });\n}", "function like() {\n for (k = 0; k < document.getElementsByClassName('LikeLink item control like').length; k++) {\n document.getElementsByClassName('LikeLink item control like')[k].click();\n }\n }", "function renderLikes() {\n const likesListElem = document.getElementById('item-likes');\n likesListElem.innerHTML = '';\n for (let i = 0; i < Picture.all.length; i++) {\n const itemPicture = Picture.all[i];\n const itemPictureElem = document.createElement('li');\n likesListElem.appendChild(itemPictureElem);\n itemPictureElem.textContent = itemPicture.caption + ' : ' + itemPicture.clickCounter + '/' + itemPicture.shownCounter;\n }\n}", "function addLikeonMedia(evt) {\n const selectedMediaId = +evt.currentTarget.dataset.mediaId;\n const selectedMedialike = evt.currentTarget.previousElementSibling;\n\n const selectedMedia = photographer.media.find(\n (media) => media.id === selectedMediaId\n );\n photographer.addLike(selectedMedia);\n\n addTextContent(selectedMedialike, selectedMedia.likes);\n displayLikesNumber();\n}", "function addLikeBtn(){\n var likeBtn = document.createElement('a');\n likeBtn.classList.add('likeBtn');\n likeBtn.href = '#like';\n likeBtn.innerHTML = '&hearts;';\n \n var container = document.querySelector('.actions');\n container.insertBefore(likeBtn, container.firstElementChild);\n\n likeBtn.addEventListener('click',function(e){\n if (!likeBtn.classList.contains('liked')){\n likeBtn.classList.add('liked');\n // use global letterID to track the liked letter\n DD.tracker.trackMetaEvent('liked',letterID);\n }else{\n // already liked during this page view, ignore\n // idea: we could create a data feed with letters that users\n // liked in the past or just store likes in Local Storage\n // and then mark likeBtn as liked when the page loads\n }\n e.preventDefault();\n });\n}", "function likeUnlike() {\n const like = dancerDetails.querySelector(\"#like\")\n const unlike = dancerDetails.querySelector(\"#unlike\")\n\n like.addEventListener(\"click\", () => likeDancer())\n unlike.addEventListener(\"click\", () => unlikeDancer())\n}", "function clickLike() {\n $(\".like\").each(function () {\n var pid = $(this).parent().parent().find(\"img\").eq(1).attr(\"alt\");\n $(this).bind(\"click\", function () {\n //alert(pid);\n if (!((!$(this).hasClass(\"like\"))&& ($(this).hasClass(\"unlike\")))) {\n return false;\n }\n //alert(pid);\n likeBack(pid);\n $(this).addClass(\"deal_now\");\n\n if_like = true;\n setTimeout(function () { //delat for avoid double-click\n if_like = false;\n }, 100);\n\n });\n });\n}", "function like(x) {\n\t$(x).toggleClass('like liked');\n\tif (x.textContent == \"like\") {\n\tx.textContent = \"liked\";\n }\telse {\n\tx.textContent = \"like\";\n }\n}", "init(init_button = 'likes', init_like = 'i like', init_notlike = \"i don't like\", init_IdCounter = 'counter') {\n ButtonClass=init_button;\n like=init_like;\n notlike=init_notlike;\n IdCounter=init_IdCounter;\n \n cookie = checkACookieExists('likes');\n if (cookie==false)cookie=[];\n // take action for class elements\n var elements = document.getElementsByClassName(ButtonClass);\n if(elements)\n for (var i = 0; i < elements.length; i++) {\n elements[i].addEventListener(\n 'click',\n function() {\n likes.change(this); //add action for change cookie\n },\n false\n );\n }\n likes.update()\n }", "function checklikes(a){var b=\"process=4&post=\"+a,c=$(\"#like-count-\"+a);$.ajax({type:\"POST\",url:\"postpub\",data:b,beforeSend:function(){c.removeClass(\"animated flash\")},success:function(a){c.html(a+\" Me Gusta\").addClass(\"animated flash\")},error:function(){}})}", "async like(params) {\n const { fromUser, toUser } = params;\n if (await this.checkLikeExist(params) === true) {\n await mysqlUtil.query(\n 'DELETE FROM `like`\\\n WHERE fromUser = ? \\\n AND toUser = ?',\n [fromUser, toUser]\n );\n await User.decrementLikeCount(toUser);\n } else {\n await mysqlUtil.query(\n 'INSERT INTO `like` \\\n (fromUser, toUser) \\\n VALUES (?, ?);',\n [fromUser, toUser]\n );\n await User.incrementLikeCount(toUser);\n }\n }", "function like(likable_id, likable_type, likable, post_id, type) {\n\n axios.post('/like/add',\n {\n likable_id : likable_id,\n likable_type: likable_type,\n likable : likable,\n post_id : post_id,\n type : type\n }\n ).then(function (response) {\n\n //Message de confirmation\n if(likable){\n Materialize.toast('\"J\\'aime\" ajouté', 4000);\n }else{\n Materialize.toast('\"J\\'aime\" retiré', 4000);\n }\n\n //Reload du post\n axios.post('/post/getOne',{id:post_id}).then(function (response) {\n document.getElementById('zone-post-' + post_id).innerHTML = response.data;\n afterGetPost();\n });\n });\n\n}", "function likeSpecific() {\n\t\t\tvar userlinks = [];\n\t\t\tjQuery.ajaxSetup({\n\t\t\t async: false\n\t\t\t});\n\t\t\ttry {\n\t\t document.getElementsByClassName('PageNav')[0].getAttribute('data-last')\n\t\t var pages = parseInt(document.getElementsByClassName('PageNav')[0].getAttribute('data-last')) + 2;\n\t\t } catch (err) {\n\t\t var pages = 1;\n\t\t }\n\t\t\tvar modalProgress = $('<div></div>');\n\t\t\tvar progressModal;\n\t\t\tfunction getSpecificUserLinks() {\n\t\t\t\tjQuery.ajaxSetup({\n\t\t\t \tasync: false\n\t\t\t\t});\n\t\t\t\tfor (i = 1; i <= pages; i++) {\n\t\t\t\t\t$.get(url + 'page-' + i, function(data) {\n\t\t\t\t\t\t$.expr[\":\"].contains = $.expr.createPseudo(function(arg) {\n\t\t\t\t\t\t return function( elem ) {\n\t\t\t\t\t\t return $(elem).text().toUpperCase().indexOf(arg.toUpperCase()) >= 0;\n\t\t\t\t\t\t };\n\t\t\t\t\t\t});\n\t\t\t\t\t\t$(data.replace(/<img[^>]*>/g,\"\")).find(\"li:contains(\"+name+\")\").each(function() {\n\t\t\t\t\t\t\tuserlinks.push($(this).find('a[class=\"LikeLink item control like\"]').attr('href'));\n\t\t\t\t\t\t\tconsole.log($(this).find('a[class=\"LikeLink item control like\"]').attr('href'))\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t\tmodalProgress.text('Checking Page '+i+' of '+pages+'...');\n\t\t\t\t}\n\t\t\t\tlikeSpecificLinks();\n\t\t\t}\n\n\t\t\tfunction likeSpecificLinks() {\n\t\t\t var numbLinks = userlinks.length + 2;\n\t\t\t for (t = 0; t <= numbLinks; t++) {\n\t\t\t var token = document.getElementsByName('_xfToken')[0].getAttribute('value')\n\t\t\t jQuery.ajaxSetup({\n\t\t\t async: false\n\t\t\t });\n\t\t\t $.post(userlinks[t], {\n\t\t\t _xfToken: token,\n\t\t\t _xfNoRedirect: 1,\n\t\t\t _xfResponseType: 'json'\n\t\t\t }, function(data) {});\n\t\t\t\t\tmodalProgress.text('Liking '+t+'/'+numbLinks+' ('+Math.round(t*100/numbLinks)+'%)');\n\t\t\t }\n\t\t\t}\n\t\t var url = '/' + window.location.pathname.split('/')[1] + '/' + window.location.pathname.split('/')[2] + '/';\n\t\t\tvar usernameInput = $('<input type=\"text\" style=\"width:100%;\"/>');\n\t\t\tnew modal('Enter username', usernameInput, {\n\t\t\t\t'Like!': {\n\t\t\t\t\ttype: 'red',\n\t\t\t\t\tclick: function(){\n\t\t\t\t\t\tthis.close();\n\t\t\t\t\t\tprogressModal = new modal('Liking..', modalProgress, {});\n\t\t\t\t\t\tname = usernameInput.val();\n\t\t\t\t\t\tgetSpecificUserLinks();\n\t\t\t\t\t\tprogressModal.methods.close();\n\t\t\t\t\t\talert('done');\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t'Cancel': {\n\t\t\t\t\ttype: 'grey',\n\t\t\t\t\tclick: function(){\n\t\t\t\t\t\tthis.close();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}", "async likePost(_, { postId }, context) {\n const { username } = checkAuth(context)\n const post = await findPost(postId)\n\n const userLiked = username => like => like.username === username\n const likeOrUnlike = R.ifElse(\n R.find(userLiked(username)), // Condition\n R.reject(userLiked(username)), // onTrue\n R.append({ username }) // onFalse\n )\n\n post.likes = likeOrUnlike(post.likes)\n return formatPost(await post.save())\n }", "updateLikes() {\n\t\t// like\n\t\tif (!this.state.updated) {\n\t\t\tthis.setState((prevState, props) => {\n\t\t\t\treturn {\n\t\t\t\t\tlikes: prevState.likes + 1,\n\t\t\t\t\tupdated: true\n\t\t\t\t};\n\t\t\t});\n\t\t\tthis.button = <button id=\"like\" onClick={this.updateLikes}></button>;\n\t\t// unlike\n\t\t} else {\n\t\t\tthis.setState((prevState, props) => {\n\t\t\t\treturn {\n\t\t\t\t\tlikes:prevState.likes - 1,\n\t\t\t\t\tupdated: false\n\t\t\t\t};\n\t\t\t});\n\t\t\tthis.button = <button id=\"unlike\" onClick={this.updateLikes}></button>;\n\t\t}\n\t\tlikes = this.state.likes;\n\t}", "async function doLike () {\n try {\n // await ig.login(username, password);\n let medias = await ig.getTimeLineFeed();\n medias.map(async ({ node }) => {\n let now = new Date().getTime();\n let fourHours = 3600 * 4 * 1000;\n let mediaTimePost = node.taken_at_timestamp * 1000;\n if (mediaTimePost >= now - fourHours) {\n if (!node.viewer_has_liked) {\n await ig.like(node.id);\n }\n }\n });\n } catch (error) {\n console.error(error);\n }\n setTimeout(doLike, TIMEOUT);\n}", "static getAlllikes(_id) {\n return new Promise((resolve, reject) => {\n models.like.findAndCountAll({\n where: {\n postid: _id\n }\n })\n .then(vpst => {\n resolve(vpst);\n }, (error) => {\n reject(error);\n });\n });\n }", "like() {\r\n return this.getItem().then(i => {\r\n return i.like();\r\n });\r\n }", "updateLikes() {\n\t\t// like\n\t\tif (!this.state.updated) {\n\t\t\tthis.setState((prevState, props) => {\n\t\t\t\treturn {\n\t\t\t\t\tlikes: prevState.likes + 1,\n\t\t\t\t\tupdated: true\n\t\t\t\t};\n\t\t\t});\n\t\t\tthis.button = <button id=\"like\" onClick={this.updateLikes}></button>;\n\t\t// unlike\n\t\t} else {\n\t\t\tthis.setState((prevState, props) => {\n\t\t\t\treturn {\n\t\t\t\t\tlikes: prevState.likes - 1,\n\t\t\t\t\tupdated: false\n\t\t\t\t};\n\t\t\t});\n\t\t\tthis.button = <button id=\"unlike\" onClick={this.updateLikes}></button>;\n\t\t}\n\t}", "function changeImage(image, id_post, id_user, like)//like va khong like\n {\n var show, show1;\n show = document.getElementById(id_post).querySelectorAll(\"p\");//thay doi trang thai like, khong like\n show1 = document.getElementById(id_post).querySelectorAll(\"span\");//chua so nguoi like bai viet\n //document.getElementById(\"kt\").innerHTML = \"cc\";\n if(image.src.match(\"Like-512\"))//trang thai chua like bai dang\n {\n image.src = \"../../Datasystem/dalike.jpg\";\n show[2].innerHTML = \"<p style='color:blue;margin-top:-20px;'>Đã thích</p>\";\n like = like + 1; \n document.getElementById(\"soluongthich\").innerHTML = \"Bạn và \"+(like - 1)+\" người khác đã thích bài đăng này\"; \n Post_like_to_db(id_post, id_user, 0);//ma 0 la chua thich bai dang bjo thich bai dang\n }else//trang thai nay khi nguoi dung bo like bai dang\n {\n image.src = \"../../Datasystem/Like-512.png\";\n show[2].innerHTML = \"<p style='color:black;margin-top:-20px;'>Thích</p>\";\n if(like > 0) like = like - 1;\n document.getElementById(\"soluongthich\").innerHTML = like + \" người đã thích bài đăng này\";\n Post_like_to_db(id_post, id_user, 1);//ma 1 da thich bai dang bjo bo thich\n }\n show1[1].innerHTML = like;\n }", "function ListebToLikeButton() {\n const toyCollection = document.getElementById(\"toy-collection\");\n toyCollection.addEventListener(\"click\", increseLikes);\n}", "async function updateLikes() {\n\n // List of all the cards in the current page\n const cardbodylist = document.getElementsByClassName('card-body')\n\n // Loop through each one of the cards and do stuff\n for (let i = 0; i < cardbodylist.length; i++) {\n\n // Get the card form the list\n const card = cardbodylist[i]\n const likeBox = card.getElementsByClassName('like-box').item(0)\n\n // Get references to the dislike and like button\n const dislike_btn = likeBox.lastElementChild\n const like_btn = dislike_btn.previousElementSibling\n\n // Continue if the elements are not of type SVG\n if (dislike_btn.nodeName.toLowerCase()!==\"svg\" || like_btn.nodeName.toLowerCase()!==\"svg\"){\n continue\n }\n\n // Get id of the post\n const id = card.id\n\n // Make request to server to see if the user liked the post\n const response = await fetch(`/api/getlike?id=${id}`)\n const json = await response.json()\n\n const is_liked = json.status // True or false\n\n // Check if the is_liked is present\n if (is_liked) {\n\n // Set styles to buttons to make them appear and disappear\n if (is_liked === \"True\") {\n like_btn.style.display = \"none\"\n dislike_btn.style.display = \"inline-block\"\n } else {\n like_btn.style.display = \"inline-block\"\n dislike_btn.style.display = \"none\"\n }\n }\n // Display error if there is one!\n else {\n const err = json.error\n alert(err)\n }\n }\n\n}", "function whatIDontLike(dislike) {\r\n console.log(\"I don't like \" + dislike);\r\n}", "function handleLike(event) {\n $(this).preventDefault();\n likeTweet(this.attr('id'));\n }", "function like(){\n likeButton=document.getElementById('like-button');\n likeButton.innerText='Liked!';\n likes++;\n liketext=document.getElementById('like-text');\n if(likes<=1)\n liketext.innerText=`${likes} person likes this !`;\n else{\n liketext.innerText=`${likes} people have liked this !`;\n }\n}", "function like() {\n LikeService.post(vm.user.username, $stateParams.id, vm.currentUser)\n .then(() => {\n loadLikes();\n vm.isLiked = true;\n\n // send notification to the given user\n if (vm.user._id != vm.currentUser._id) {\n socket.emit('notification', {'to': vm.user._id, 'from': vm.currentUser._id, 'author': vm.currentUser.username, 'type': 'like', imageid: $stateParams.id});\n }\n });\n }", "async function handleLike(id){\n await api.post(`/devs/${id}/likes`, null, { \n headers: {user: match.params.id}\n }); // Parametros do post (url, corpo, headers), nesse caso o corpo é vazio\n\n setUsers(users.filter(user => user._id != id));\n }", "function incrementLikesCount() {\n likesCount+=1;\n getMainBody(false);\n }", "dislikeButton() {\n var originalDislikes = this.state.dislikes, referThis = this, originalLikes = this.state.likes;\n //User has logged in.\n if (this.props.activeUser) {\n const activeStatRef = db.collection('stats').doc(this.props.activeUserEmail)\n .collection(referThis.props.videoID).doc('socialNumbers');\n\n activeStatRef.get().then(function (snapshot) {\n if (snapshot && snapshot.exists) {\n\n if (snapshot.data().like) {\n //User has liked the video before so decrement that counter \n referThis.setState({\n likedBefore: true\n });\n }\n if (snapshot.data().dislike) {\n //User already dislikes it so decrement the counter\n //decrement the counter first under videos and then under all_videos \n let all_videosRef = db.collection('all_videos').doc(referThis.props.videoID);\n all_videosRef.set({\n dislikes: originalDislikes - 1\n }, { merge: true }).then(function () {\n let videos_ref = db.collection('videos').doc(referThis.props.uploaderNickname)\n .collection(referThis.props.videoID).doc('video_info');\n videos_ref.set({\n dislikes: originalDislikes - 1\n }, { merge: true });\n });\n\n //Set the boolean to false. \n activeStatRef.set({\n dislike: false,\n }, { merge: true });\n\n } else {\n //user has not liked it before so increment the counter \n let all_videosRef = db.collection('all_videos').doc(referThis.props.videoID);\n all_videosRef.set({\n dislikes: originalDislikes + 1,\n likes: referThis.state.likedBefore ? originalLikes - 1 : originalLikes\n }, { merge: true }).then(function () {\n let videos_ref = db.collection('videos').doc(referThis.props.uploaderNickname)\n .collection(referThis.props.videoID).doc('video_info');\n videos_ref.set({\n dislikes: originalDislikes + 1,\n likes: referThis.state.likedBefore ? originalLikes - 1 : originalLikes\n }, { merge: true });\n });\n //Set the boolean to false. \n activeStatRef.set({\n like: false,\n dislike: true\n }, { merge: true });\n }\n } else {\n //user has never liked it before\n let all_videosRef = db.collection('all_videos').doc(referThis.props.videoID);\n all_videosRef.set({\n dislikes: originalDislikes + 1,\n likes: referThis.state.likedBefore ? originalLikes - 1 : originalLikes\n }, { merge: true }).then(function () {\n let videos_ref = db.collection('videos').doc(referThis.props.uploaderNickname)\n .collection(referThis.props.videoID).doc('video_info');\n videos_ref.set({\n dislikes: originalDislikes + 1,\n likes: referThis.state.likedBefore ? originalLikes - 1 : originalLikes\n }, { merge: true });\n });\n\n //Set the boolean to false. \n activeStatRef.set({\n like: false,\n dislike: true\n }, { merge: true });\n }\n });\n } else {\n //If the User has not logged in, then alert them and let them know. \n this.refs.denyModal.show();\n }\n\n }", "function likePost(client, id, callBack){\n client.HGET(\"posts\", id, function(err, reply){\n var post = JSON.parse(reply)\n post.likes++\n client.HSET(\"posts\", id, JSON.stringify(post), callBack)\n })\n}", "function update_photo_data(data) {\n var likeCount = document.getElementById(\"likecount\");\n likeCount.innerHTML = data.n_likes;\n if (data.is_liked === true) {\n document.getElementById(\"hart\").classList.remove('black');\n } else {\n document.getElementById(\"hart\").classList.add('black');\n }\n}", "function getuserlikes(photo_id, photo_name, photo_from, photo_source) {\n\n $(\"#statistics\").hide();\n $(\"#likecommentlist\").hide();\n\n var photo_frame = document.createElement('div');\n photo_frame.setAttribute(\"id\", \"image_frame\");\n photo_frame.setAttribute(\"class\", \"cf\");\n\n document.body.appendChild(photo_frame);\n\n var pic_name;\n\n if(photo_name == \"undefined\") {\n pic_name = \"Untitled\";\n }\n else {\n pic_name = photo_name;\n }\n\n var page_title = document.createElement('div');\n page_title.setAttribute(\"class\", \"page_title\");\n\n var title = document.createTextNode(pic_name);\n var linebreak = document.createElement('br');\n\n page_title.appendChild(title);\n photo_frame.appendChild(page_title);\n photo_frame.appendChild(linebreak);\n\n var image = document.createElement('div');\n image.setAttribute('class', 'picture');\n image.style.float = \"left\";\n var pic = document.createElement('img');\n\n // pic.src = photo[4].src; // Photo Size = \"width\": 358, \"height\": 480\n\n pic.src = photo_source;\n\n var span = document.createElement('span');\n span.style.float = \"left\";\n span.appendChild(pic);\n\n image.appendChild(span);\n\n // Get the 'Likes' on the photo\n FB.api(photo_id + \"/likes\", function(likes) {\n\n var heading = document.createElement('div');\n\n // Get the \"Comments\" on the photo\n FB.api({\n\n method: 'fql.multiquery',\n queries: {\n query1: 'SELECT fromid, text FROM comment WHERE object_id=\"'+photo_id+'\"',\n query2: 'SELECT name, pic_square, uid FROM user WHERE uid IN (SELECT fromid FROM #query1)'\n }\n\n },\n function(comments) {\n\n var emotion_hash;\n\n // Process the comments information and populate the comments hash\n if(comments[0].fql_result_set.length != 0) {\n emotion_hash = process_comments(comments);\n\n }\n\n // Populate \"like\" hash\n if(likes.data.length != 0) {\n\n $(\"#statistics\").show();\n $(\"#likecommentlist\").show();\n\n $('#statistics > ul').tabs({ fx: { height: 'toggle', opacity: 'toggle' } });\n $('#statistics > ul').tabs({ selected: 1 });\n\n $('#likecommentlist > ul').tabs({ fx: { height: 'toggle', opacity: 'toggle' } });\n $('#likecommentlist > ul').tabs({ selected: 1 });\n\n\n var chart_div = document.createElement('div');\n chart_div.setAttribute(\"id\", \"pie\");\n\n photo_frame.appendChild(chart_div);\n\n var text = document.createTextNode(\"This picture has been liked by \" + likes.data.length + \" friend(s):\");\n heading.appendChild(text);\n\n process_likes(likes, photo_from, emotion_hash);\n\n }\n else {\n\n var text = document.createTextNode(\"Sorry! This picture has not been liked by anyone :(\");\n heading.appendChild(text);\n image.appendChild(heading);\n\n }\n });\n\n photo_frame.appendChild(image);\n photo_frame.appendChild(document.getElementById(\"statistics\"));\n photo_frame.appendChild(heading);\n photo_frame.appendChild(document.getElementById(\"likecommentlist\"))\n\n });\n}", "onLiked(){\n this.setState({liked: true, vl: this.state.vl + 1})\n this.props.dispatch( dislikeDelete(this.props.post.id) )\n .then(() => this.setState({disliked: false, vd: this.state.vd - 1}))\n }", "likeButton() {\n var originalLikes = this.state.likes, originalDislikes = this.state.dislikes, referThis = this;\n //User has logged in.\n if (this.props.activeUser) {\n //Make the boolean true\n //Decide if the user already liked or not before. \n const activeStatRef = db.collection('stats').doc(this.props.activeUserEmail)\n .collection(referThis.props.videoID).doc('socialNumbers');\n\n activeStatRef.get().then(function (snapshot) {\n if (snapshot && snapshot.exists) {\n if (snapshot.data().dislike) {\n //User has disliekd the video before so decrement that counter \n referThis.setState({\n dislikedBefore: true\n });\n }\n if (snapshot.data().like) {\n //User already likes it so decrement the counter\n //decrement the counter first under videos and then under all_videos \n let all_videosRef = db.collection('all_videos').doc(referThis.props.videoID);\n all_videosRef.set({\n likes: originalLikes - 1\n }, { merge: true }).then(function () {\n let videos_ref = db.collection('videos').doc(referThis.props.uploaderNickname)\n .collection(referThis.props.videoID).doc('video_info');\n videos_ref.set({\n likes: originalLikes - 1\n }, { merge: true });\n });\n\n //Set the boolean to false. \n activeStatRef.set({\n like: false,\n }, { merge: true });\n\n } else {\n //user has not liked it before so increment the counter \n let all_videosRef = db.collection('all_videos').doc(referThis.props.videoID);\n if (referThis.state.dislikedBefore) {\n originalDislikes -= 1;\n }\n\n all_videosRef.set({\n likes: originalLikes + 1,\n dislikes: originalDislikes\n }, { merge: true }).then(function () {\n let videos_ref = db.collection('videos').doc(referThis.props.uploaderNickname)\n .collection(referThis.props.videoID).doc('video_info');\n videos_ref.set({\n likes: originalLikes + 1,\n dislikes: originalDislikes\n }, { merge: true });\n });\n //Set the boolean to false. \n activeStatRef.set({\n like: true,\n dislike: false\n }, { merge: true });\n }\n } else {\n //user has never liked it before\n let all_videosRef = db.collection('all_videos').doc(referThis.props.videoID);\n //the user has liked it pre\n if (referThis.state.dislikedBefore) {\n originalDislikes -= 1;\n }\n\n all_videosRef.set({\n likes: originalLikes + 1,\n dislikes: originalDislikes\n }, { merge: true }).then(function () {\n let videos_ref = db.collection('videos').doc(referThis.props.uploaderNickname)\n .collection(referThis.props.videoID).doc('video_info');\n videos_ref.set({\n likes: originalLikes + 1,\n dislikes: originalDislikes\n }, { merge: true });\n });\n\n //Set the boolean to false. \n activeStatRef.set({\n like: true,\n dislike: false\n }, { merge: true });\n }\n });\n } else {\n //If the User has not logged in, then alert them and let them know. \n this.refs.denyModal.show();;\n }\n }", "function likePost(id , bIsLike , sQuestions){\n //put the loading screen on\n loadingScreen(); \n \n //determine the url\n var sUrl = null;\n if (bIsLike){\n sUrl = '/filemanager/rateup/'\n }\n else{\n sUrl = '/filemanager/ratedown/'\n }\n\n //create the object to send \n var obj=new Object();\n obj.id = id;\n obj.questions = sQuestions;\n \n //send it via jquery and update rating\n $.ajax({\n type: \"POST\",\n url: sUrl,\n dataType: \"json\",\n data: obj ,\n success: function(res) {\n if(res.items[0].status ==='success'){\n //$(\"#likes_\"+ id).text((parseInt($(\"#likes_\"+ id).text()) + 1));\n //$(\"#elfinder_tdup_\" + id).html('<img src=\"/img/like_off.png\" width=\"16\" height=\"16\" />');\n //$(\"#elfinder_tddown_\" + id).html('<img src=\"/img/unlike_off.png\" width=\"16\" height=\"16\" />');\n if (res.items[0].data == 0){\n setSuccessToSuccess();\n //loading screen\n removeLoadingScreen();\n\n //display success failure screen\n displaySuccessFailure();\n \n //increase the like or dislike \n if(bIsLike){\n $('#filebrowser_like_' + id).text(parseInt(jQuery.trim($('#filebrowser_like_' + id).text())) + 1);\n }\n else{\n $('#filebrowser_dislike_' + id).text(parseInt(jQuery.trim($('#filebrowser_like_' + id).text())) + 1);\n }\n \n //create a disabled pictures and remove the anchors\n $(\"#filebrowser_likeimg_\" + id).html('<img src=\"/img/like_off.png\" width=\"24\" height=\"20\" />');\n $(\"#filebrowser_dislikeimg_\" + id).html('<img src=\"/img/unlike_off.png\" width=\"24\" height=\"20\" />');\n }\n else{\n setSuccessToFailed();\n //loading screen\n removeLoadingScreen();\n\n //display success failure screen\n displaySuccessFailure();\n if(res.items[0].data == 1){\n $('#error').text('Params Error');\n }\n if(res.items[0].data == 2){\n $('#error').text('You can only rate a file once');\n }\n if(res.items[0].data == 3){\n $('#error').text('No such post');\n }\n }\n \n }\n \n //removeLoadingGlassScreen();\n },\n error: function(res) { \n setSuccessToFailed();\n //loading screen\n removeLoadingScreen();\n \n //display success failure screen\n displaySuccessFailure();\n \n $(\"#error\").text(\"Connection failure! Try again\");\n }\n });\n}", "function perfilModalLikeControler(idDisc, nomeDisc, numLikes) {\n document.querySelector(\"#nomeDisc\").innerText = nomeDisc;\n const $likeInfo = document.querySelector(\"#likeInfo\")\n\n killAllChildren(\"#likeInfo\")\n\n const likeBt = document.createElement(\"input\")\n likeBt.type = \"image\"\n likeBt.src = \"./images/like.svg\"\n likeBt.id = \"likeBt\"\n likeBt.onclick = async () => {\n const likeUpdate = await curtirPerfil(idDisc)\n mudarCorBotaoLike(likeUpdate[0])\n\n document.querySelector(\"#likeNum\").innerText = likeUpdate[1]\n }\n\n const likeCounter = document.createElement(\"p\")\n likeCounter.id = \"likeNum\"\n likeCounter.innerText = numLikes;\n\n $likeInfo.append(likeBt, likeCounter)\n}", "function get_like_list_callback(data) {\n\t\t\tlike_list.empty().append(data);\n\t\t}", "render() {\n return (\n <>\n <LikesButtonCard \n handleAddLike={this.handleAddLike} \n handleRemoveLike={this.handleRemoveLike}\n /> \n </>\n );\n }", "function likeSheet() {\n if($rootScope.currentUser == null){\n vm.returnData = \"Log in to continue\";\n }else{\n NoteService\n .checkIfUserLiked(vm.noteId, $rootScope.currentUser._id)\n .then(function (response) {\n if(response.data == null){\n NoteService\n .likeSheet(vm.noteId)\n .then(function (response) {\n vm.userLiked = 1;\n },function (error) {\n console.log(error);\n });\n }else{\n var likers = response.data.liker;\n for(i=0; i<likers.length ; i++){\n if(likers[i] == $rootScope.currentUser._id){\n vm.userLiked = 1;\n }\n }if(vm.userLiked == 0){\n NoteService\n .likeSheet(vm.noteId)\n .then(function (response) {\n vm.userLiked = 1;\n },function (error) {\n console.log(error);\n });\n }\n }\n\n });\n }\n }", "function like_feed_reply(selector, commentid, noteid, parentid, status) {\n\tvar likefrom = $(selector).attr('data-feed-type');\n\tvar objdata = {\n\t\t'note_id': noteid,\n\t\t'group_id': parentid,\n\t\t'status': status\n\t};\n\tif (likefrom == 'lead-reply-like') {\n\t\tvar like_url = admin_url + 'leads/add_like_to_note_comment/' + commentid;\n\t} else if (likefrom == 'client-reply-like') {\n\t\tvar like_url = admin_url + 'clients/add_like_to_note_comment/' + commentid;\n\t} else if (likefrom == 'internal-reply-like') {\n\t\tvar like_url = admin_url + 'internal/add_like_to_note_comment/' + commentid;\n\t}\n\t$.post(like_url, objdata, function(response) {\n\t\tif (response.status == true) { console.log(\"status\"+response.status);\n\t\t\t$(selector).removeAttr('onclick');\n\t\t\tif (status == 1) {\n\t\t\t\t$(selector).removeClass('unliked').addClass('liked').find('em').text('Liked');\n\t\t\t\t$(selector).attr('onclick', 'like_ifeed_reply(this,' + commentid + ',' + noteid + ',' + parentid + ',0)');\n\t\t\t\t$('#action').val('liked');\n\t\t\t} else {\n\t\t\t\t$(selector).removeClass('liked').addClass('unliked').find('em').text('Unlike');\n\t\t\t\t$(selector).attr('onclick', 'like_ifeed_reply(this,' + commentid + ',' + noteid + ',' + parentid + ',1)');\n\t\t\t\t$('#action').val('unliked');\n\t\t\t}\n\t\t\tif ($('#action').val() != '') var message = $('#action').val();\n\t\t\t// alert_float(response.alert_type, data_alert[message]);\n\t\t\tLoad_feeds();\n\t\t}\n\t}, 'json');\n}", "function do_like_to_comment(blogId, commentId, user) {\n Blog.findOne({\n id: blogId,\n }, function (err, result) {\n if (err) throw err;\n if (!result) return {\n status: false,\n message: \"Comment doesn't exists\"\n };\n else\n result.comments.comment.forEach(comment => {\n if (comment._id == commentId) {\n comment.likes.count++;\n comment.likes.users.push(user);\n var index = comment.unlikes.users.indexOf(user);\n if (index > -1) {\n comment.unlikes.users.splice(index, 1);\n comment.unlikes.count--;\n }\n Blog.findOneAndUpdate({\n id: result.id\n }, result, function (err, result) {\n return {\n status: true,\n message: \"Liked successfully\"\n };\n });\n }\n });\n });\n}", "function likeFb(totem_name){\n loggr(\"posting like fb \"+totem_name+ \" \" , \"created likefb\");\n\n FB.getLoginStatus(function(response) {\n if (response.status === 'connected') {\n FB.api(\n \"/me/og.likes\",\n \"POST\",\n {\n \"object\": \"http://www.wimha.com/myTotemPage/\"+totem_name\n\n },\n function (response) {\n console.log(response);\n if (response && !response.error) {\n loggr(\"success like fb \", \"created likefb\");\n }\n }\n );\n\n } else if (response.status === 'not_authorized') {\n loggr(\"error like fb not authorized \", \"trace likefb\");\n } else {\n loggr(\"error like fb not connected \", \"trace likefb\");\n }\n });\n}", "function getLikeOrLiked(){\n if(likesCount>0){\n return '<i class=\"fa fa-thumbs-up\"></i>'+'Liked';\n }\n else {\n return '<i class=\"fa fa-thumbs-up\"></i>'+'Like';\n }\n }", "async function handleLiking() {\n\n // redirecting to log in page if user is not signing/unregistered with an account\n if (checkEmail === 'no email') {\n return history.push(\"/log-in\")\n } else {\n setlikeState(!likeState);\n \n // extracting medId from path URL to use later, as document ID when fetching from the firebase\n const location = window.location.href.split(\"/\");\n const medId = location[location.length - 1];\n\n const reviewRef = db\n .collection(\"drug\")\n .doc(medId)\n .collection(\"Review\")\n .doc(reviewId);\n \n // increment or decrement the like number and keep track of which user like the comment\n if (!likeState) {\n reviewRef.update({\n likeNumber: update.increment(1),\n });\n\n reviewRef.update({\n likeUsers: update.arrayUnion(currentUser.email),\n });\n\n setlikeNumber(likeNumber + 1);\n\n } else if (likeState) {\n reviewRef.update({\n likeNumber: update.increment(-1),\n });\n\n reviewRef.update({\n likeUsers: update.arrayRemove(currentUser.email),\n });\n\n setlikeNumber(likeNumber - 1);\n }\n\n const userRef = db\n .collection(\"User\")\n .doc(reviewId)\n .collection(\"Review\")\n .doc(medId);\n\n // update the like and which user like the comment in the user collection\n if (!likeState) {\n userRef.update({\n likeNumber: update.increment(1),\n });\n\n setlikeNumber(likeNumber + 1);\n\n } else if (likeState) {\n userRef.update({\n likeNumber: update.increment(-1),\n });\n\n setlikeNumber(likeNumber - 1);\n }\n }\n }", "function like_data_sesblog(element, functionName, itemType, moduleName, notificationType, classType) {\n\tif (!sesJqueryObject (element).attr('data-url'))\n\t\treturn;\n\tvar id = sesJqueryObject (element).attr('data-url');\n\tif (sesJqueryObject (element).hasClass('button_active')) {\n\t\tsesJqueryObject (element).removeClass('button_active');\n\t} else\n\t\tsesJqueryObject (element).addClass('button_active');\n\t(new Request.HTML({\n\t\tmethod: 'post',\n\t\t'url': en4.core.baseUrl + 'sesblog/index/' + functionName,\n\t\t'data': {\n\t\t\tformat: 'html',\n\t\t\t\tid: sesJqueryObject (element).attr('data-url'),\n\t\t\t\t\t\t\t\t\t\ttype: itemType,\n\t\t},\n\t\tonSuccess: function (responseTree, responseElements, responseHTML, responseJavaScript) {\n\t\t\tvar response = jQuery.parseJSON(responseHTML);\n\t\t\tif (response.error)\n\t\t\t\talert(en4.core.language.translate('Something went wrong,please try again later'));\n\t\t\telse {\n\t\t\t\tif(sesJqueryObject(element).hasClass('sesblog_albumlike')){\n\t\t\t\t\tvar elementCount = \telement;\n\t\t\t\t}\n\t\t\t\telse if(sesJqueryObject(element).hasClass('sesblog_photolike')){\n\t\t\t\t\tvar elementCount = \telement;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tvar elementCount = '.sesblog_like_sesblog_blog_'+id;\n\t\t\t\t}\n\t\t\t\tsesJqueryObject (elementCount).find('span').html(response.count);\n\t\t\t\tif (response.condition == 'reduced') {\n\t\t\t\t\tif(classType == 'sesblog_like_sesblog_blog_view') {\n\t\t\t\t\t\tsesJqueryObject('.sesblog_like_sesblog_blog_view').html('<i class=\"fa fa-thumbs-up\"></i><span>'+en4.core.language.translate(\"Like\")+'</span>');\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tsesJqueryObject (elementCount).removeClass('button_active');\n\t\t\t\t\t}\n\t\t\t\t\tshowTooltip(10,10,'<i class=\"fa fa-thumbs-up\"></i><span>'+en4.core.language.translate(\"Unliked Successfully.\")+'</span>');\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif(classType == 'sesblog_like_sesblog_blog_view') {\n\t\t\t\t\t\tsesJqueryObject('.sesblog_like_sesblog_blog_view').html('<i class=\"fa fa-thumbs-down\"></i><span>'+en4.core.language.translate(\"UnLike\")+'</span>');\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tsesJqueryObject (elementCount).addClass('button_active');\n\t\t\t\t\t}\n\t\t\t\t\tshowTooltip(10,10,'<i class=\"fa fa-thumbs-up\"></i><span>'+(en4.core.language.translate(\"Liked Successfully\"))+'</span>', 'sesbasic_liked_notification');\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t})).send();\n}", "function LK_likeIt(elem) {\n var likeGroup = elem.getAttribute(LK_LIKEGROUP);\n var likeValue = elem.getAttribute(LK_LIKEVALUE);\n localStorage[likeGroup] = likeValue;\n\n // Change the style of the liker nodes\n var siblings = elem.parentNode.childNodes;\n for (var i = 0; i < siblings.length; i++) {\n if (siblings[i].style) { \n LK_applyNormalStyle(siblings[i]);\n }\n }\n LK_applySelectedStyle(elem, likeValue);\n\n // Change the value of any mini likers\n var allSpans = document.getElementsByTagName('span');\n for (var i = 0; i < allSpans.length; i++) {\n var span = allSpans[i];\n if (span.getAttribute(LK_LIKEGROUP) == likeGroup) {\n if (span.getAttribute(LK_LIKETYPE) == 'mini') {\n span.innerHTML = LK_MAPPINGS[likeValue].label;\n LK_applySelectedStyle(allSpans[i], likeValue);\n }\n }\n }\n}", "function showLikes(likes) {\n\tconsole.log(`THINGS I LIKE:\\n`);\n\tfor(let like of likes) {\n\t\tconsole.log(like);\n\t}\n}", "function handleClick() { \n addLike(numOfLikes++)\n}", "likePost(data) {\n let dataList = [];\n for (let item of this.state.pageData) {\n let post = item;\n if (item.id === data.id) {\n data.user_has_liked === true\n ? (post.user_has_liked = false)\n : (post.user_has_liked = true);\n post.user_has_liked === false\n ? (post.likes.count = post.likes.count - 1)\n : (post.likes.count = post.likes.count + 1);\n }\n dataList.push(post);\n }\n this.setState({ pageData: dataList });\n }", "like() {\r\n return this.clone(Item, \"like\").postCore();\r\n }", "getNumLikes()\n {\n return this.likes.length;\n }", "minusLikes(i){\n // this.state.posts[i].likes=this.state.posts[i].likes - 1;\n this.state.posts[i].likes=minusLikeTest(this.state.posts[i].likes)\n}", "function liked(quote, ev) {\n quote.likes += 1;\n ev.target.parentElement.querySelector('span').textContent = quote.likes;\n sendUpdate(quote);\n}", "function likeUser(bool) {\n xhr = new XMLHttpRequest();\n var url = document.querySelector('#url').value;\n if (bool == true)\n url += '/like';\n else\n url += '/unlike';\n xhr.open(\"POST\", url, true);\n xhr.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n xhr.onreadystatechange = function () {\n if (xhr.readyState == 4 && xhr.status == 200) {\n console.log('Like/Dislike is working!');\n }\n }\n xhr.send();\n }", "function getLikes(post_id){\n\tvar likesURL = fbBaseURL + post_id + \"/likes?summary=true&access_token=\" + fbAccessToken;\n\tvar count = 0;\n\t\t\t\n\t$.ajax({\n\t\ttype : \"get\",\n\t\turl : likesURL,\n\t\tsuccess : function(response){\n\t\t\tcount = getDataFromElement(response.summary).total_count;\n\t\t\t$(\"#likes_\" + post_id).text(count);\n\t\t},\n\t\ttimeout : timeout,\n\t\terror : function(response){\n\t\t\tconsole.log(\"Failed to get likes for post: \" + post_id);\n\t\t}\n\t});\t\n}", "getNumLikes() {\n return this.likes.length;\n }", "async function checkLikeRtComent(profileId){\r\n const twertList = await getAllMessages()\r\n let allLikeTextElements = document.querySelectorAll('.favContainer p')\r\n let allLikeElements = document.querySelectorAll('.favIcon')\r\n let allRtTextElements = document.querySelectorAll('.rtContainer p')\r\n let allRtElements = document.querySelectorAll('.rtIcon')\r\n for (let i = 0; i < twertList.length; i++) {\r\n const twert = twertList[i];\r\n \r\n for (let j = 0; j < allLikeTextElements.length; j++) {\r\n const likeTextElement = allLikeTextElements[j];\r\n const likeElement = allLikeElements[j]\r\n if (likeTextElement.innerHTML != twert.fav.length.toString() && likeElement.getAttribute('onclick').includes(twert._id)) {\r\n if (twert.fav.includes(profileId)) {\r\n likeElement.style.backgroundImage = \"url('../img/like-red.png')\"\r\n } else {\r\n likeElement.style.backgroundImage = \"url('../img/like.png')\"\r\n }\r\n likeTextElement.innerHTML = twert.fav.length\r\n }\r\n }\r\n for (let j = 0; j < allRtTextElements.length; j++) {\r\n const rtTextElement = allRtTextElements[j];\r\n const retwertElement = allRtElements[j]\r\n if (rtTextElement.innerHTML != twert.retweet.length.toString() && retwertElement.getAttribute('onclick').includes(twert._id)) { if (twert.retweet.includes(profileId)) {\r\n retwertElement.style.backgroundImage = \"url('../img/retweet-green.png')\"\r\n } else {\r\n retwertElement.style.backgroundImage = \"url('../img/retweet.png')\"\r\n }\r\n rtTextElement.innerHTML = twert.retweet.length\r\n }\r\n }\r\n }\r\n}", "function removeLike(uid, numLikes, usersLiked) {\n console.log(\"removeLike() called\");\n // Users removes likes this review.\n // Add highlight to thumbs up\n $(\"#like-\" + uid).removeClass(\"primary-dark-color\");\n // Increment number of likes. Add to DOM\n var decrementNumLikes = numLikes - 1;\n addTextToDom(decrementNumLikes.toString(), \"num-likes-\" + uid);\n // Update numLikes in Firestore. Remove uid from usersLiked \n removeArrayElement(uid, usersLiked);\n updateDocumentUsingDocId(\"reviews\", uid, {\"numLikes\": decrementNumLikes, \"usersLiked\": usersLiked});\n}", "function action() {\n $(\".tweet\").hover(\n function() {\n $(this).addClass(\"tweet_hover\");\n $(this).children(\"header\").addClass(\"tweet_header_hover\");\n $(this).find(\".icons\").addClass(\"tweet_footer_hover\");\n }, function() {\n $(this).removeClass(\"tweet_hover\");\n $(this).children(\"header\").removeClass(\"tweet_header_hover\");\n $(this).find(\".icons\").removeClass(\"tweet_footer_hover\");\n }\n );\n\n\n // made delete button for only easy debugging\n $(\".tweet .delete\").click(function() {\n $(this).closest(\".tweet\").hide('slow');\n let pid = $(this).closest(\".tweet\").find(\".pid\").val();\n $.post(\"/tweets?_method=DELETE\", {pid: pid})\n .done((data, status) => {\n // Recreate DOM\n $(\".container .tweet\").remove();\n loadTweets();\n })\n .fail((error) => {\n console.log(error.responseText);\n });\n });\n\n // Like image processing\n $(\".like\").click(function(event) {\n let pid = $(this).closest(\".tweet\").find(\".pid\").val();\n let likecount = $(this).closest(\".tweet\").find(\".like-count\");\n let likeImage = $(this).find(\"img\");\n let clicked = likeImage.attr(\"data\");\n\n $.ajax({\n type: 'PUT',\n url: \"/tweets/like?_method=PUT\", // A valid URL\n data: { pid: pid } // Some data e.g. Valid JSON as a string\n })\n .done((msg) => {\n // UI LIKE COUNT UPDATE\n $.get(\"/tweets/like/\" + pid , (data) => {\n likecount.text(data.like_count);\n });\n\n // data attribute setting\n if (clicked === 'true') {\n clicked = 'false';\n } else {\n clicked = 'true';\n }\n\n likeImage.attr(\"data\", clicked);\n })\n .fail((error) => {\n console.log(error.responseText);\n });\n });\n }", "checkUserLike(likes) {\n const { auth } = this.props;\n\n if (likes.filter(like => like.user === auth.user.id).length > 0) {\n return true;\n } else {\n return false;\n }\n }", "function likeapic(http, id, scope, state) {\n http.post('/api/like', { id: id })\n .success(function (msg) {\n if (msg == 'success') {\n scope.pics.forEach(function (pic) {\n if (pic._id == id) {\n pic.likes.push('like');\n }\n });\n } else if (msg == 'like-removed') {\n scope.pics.forEach(function (pic) {\n if (pic._id == id) {\n pic.likes.splice(0, 1);\n }\n });\n }\n })\n .error(function (err) {\n if (err == 'Unauthorized') {\n alert('warning', 'You must be logged in to like.', 'Please login or signup and continue.', 5000);\n state.go('signup');\n }\n });\n}", "function attachLikes() {\n $(\".buttonLike\").on('click', function(){\n let resourceId = $(this).attr(\"name\")\n event.preventDefault();\n //$(this).css('color', 'red') //Changes heart to red\n //Sends Ajax Request\n $.ajax({\n url: `planetLHL/resources/${resourceId}/likes`,\n type: `POST`,\n data:{\n resourceId: `${resourceId}`,\n },\n success: function(result) {\n $.getJSON(\"/planetLHL/resources\").then((result) => {\n\n renderResources(result)\n\n\n })\n }\n });\n });\n}", "function removeDislike(uid, numDislikes, usersDisliked) {\n console.log(\"removeDislike() called\");\n // Add highlight to thumbs down\n $(\"#dislike-\" + uid).removeClass(\"primary-dark-color\");\n // Increment number of likes. Add to DOM\n var decrementNumDislikes = numDislikes - 1;\n addTextToDom(decrementNumDislikes.toString(), \"num-dislikes-\" + uid);\n // Update numLikes in Firestore. Add uid from usersLiked \n removeArrayElement(uid, usersDisliked);\n updateDocumentUsingDocId(\"reviews\", uid, {\"numDislikes\": decrementNumDislikes, \"usersDisliked\": usersDisliked});\n}", "attemptLike() {\n\t\tthis.btns.like.click();\n\t}", "function checkLike(req, res) {\n var noteId = req.params.noteId;\n var userId = req.params.userId;\n if(noteId.length <10){\n noteModel\n .checkApiLike(noteId, userId)\n .then(function (score) {\n res.json(score);\n });\n }else{\n noteModel\n .checkOwnLike(noteId, userId)\n .then(function (score) {\n res.json(score);\n });\n }\n }", "function fbShareAsLike() {\n\t// nebo s obrazkem\n\tFB.ui({\n\t\tmethod: 'share_open_graph',\n\t\taction_type: 'og.likes',\n\t\taction_properties: JSON.stringify({\n//\t\tobject:'http://x51.cz',\n\t\tobject: url_share,\n\t})\n\t}, function(response){\n\t\tconsole.log(response);\n\t});\n}", "function likeClicked() {\n chrome.runtime.sendMessage({ \"button\": \"like\", \"id\": data[currentIndex]._id });\n data[currentIndex].points += 1\n setPoints();\n}", "function dislike() {\n $('.btn-dislike').unbind('click').click(function() {\n var url = 'http://127.0.0.1:8000/'\n $(this).addClass('btn-like').removeClass('btn-dislike');\n $(this).attr('src', url+'img/heart-black.png');\n \n $.ajax({\n url: url + 'dislikes/' + $(this).data('id'),\n type: 'GET',\n success: function(res) {\n console.log(res)\n }\n })\n like()\n });\n}", "static likeUnlikePost(post) {\n let request;\n\n //Check which API method to use\n if (post.is_liked) {\n request = new Request(`https://dev-selfiegram.consumertrack.com/users/1/posts/${post.id}/likes`, {\n method: 'DELETE',\n });\n } else {\n request = new Request(`https://dev-selfiegram.consumertrack.com/users/1/posts/${post.id}/likes`, {\n method: 'POST',\n });\n }\n\n //Update post right away to prevent waiting for a data reload to display\n return fetch(request).then(response => {\n let newPost = Object.assign({}, post);\n if (post.is_liked) {\n newPost.is_liked = false;\n newPost.likes_count--;\n } else {\n newPost.is_liked = true;\n newPost.likes_count++;\n }\n return newPost;\n }).catch(error => {\n return error;\n });\n }" ]
[ "0.7037115", "0.6716931", "0.6677691", "0.66748005", "0.65788645", "0.6576081", "0.65593225", "0.64817494", "0.64688694", "0.63861847", "0.6382836", "0.63731337", "0.63709956", "0.6359728", "0.63559794", "0.63240814", "0.6323698", "0.6317979", "0.62864673", "0.6278346", "0.6269211", "0.6239748", "0.6201798", "0.6194074", "0.6187172", "0.61781704", "0.6166167", "0.61661464", "0.61551136", "0.6140451", "0.613722", "0.61222833", "0.6099415", "0.60769594", "0.6059155", "0.60576063", "0.6028606", "0.60272783", "0.6026863", "0.6026056", "0.6025751", "0.6018659", "0.601849", "0.60134155", "0.60093945", "0.59981394", "0.59974754", "0.5995133", "0.59948784", "0.5991905", "0.59794545", "0.5959277", "0.5957907", "0.59484434", "0.59481984", "0.5928864", "0.59200543", "0.5916771", "0.59024155", "0.5897163", "0.58741605", "0.5861404", "0.5855198", "0.5853085", "0.58515596", "0.58505434", "0.5850505", "0.58406585", "0.5839194", "0.5838762", "0.58353966", "0.58313173", "0.58266175", "0.5823501", "0.58203226", "0.5816328", "0.5815857", "0.58157563", "0.5814312", "0.581077", "0.58087605", "0.5807053", "0.5793473", "0.579076", "0.57894826", "0.57891846", "0.5784207", "0.5777111", "0.57737744", "0.5770329", "0.5769916", "0.5755407", "0.5754902", "0.5748519", "0.57449555", "0.574006", "0.57381094", "0.5725787", "0.5725476", "0.57249254" ]
0.5985718
50
add event for showing/hiding context menu entry
function initEfendiOverlay() { var menu = document.getElementById("contentAreaContextMenu"); menu.addEventListener("popupshowing", efendiContextMenu, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function modifyEventContextMenu() {\n displayEventEditWindow();\n}", "beforeContextMenuShow() {}", "beforeContextMenuShow() {}", "function xcustom_onContextMenu(event) {\r\n console.log('there we are...');\r\n}", "internalShowContextMenu(event) {\n const me = this;\n\n if (me.disabled) {\n return;\n }\n\n const data = me.getDataFromEvent(event);\n\n if (me.shouldShowMenu(data)) {\n me.showContextMenu(data);\n }\n }", "function showUIActionContext(event) {\n if (!g_user.hasRole(\"ui_action_admin\"))\n return;\n var element = Event.element(event);\n if (element.tagName.toLowerCase() == \"span\")\n element = element.parentNode;\n var id = element.getAttribute(\"gsft_id\");\n var mcm = new GwtContextMenu('context_menu_action_' + id);\n mcm.clear();\n mcm.addURL(getMessage('Edit UI Action'), \"sys_ui_action.do?sys_id=\" + id, \"gsft_main\");\n contextShow(event, mcm.getID(), 500, 0, 0);\n Event.stop(event);\n}", "function qf(e,t){Pt(e.display,t)||jf(e,t)||Ne(e,t,\"contextmenu\")||e.display.input.onContextMenu(t)}", "function showContextMenu(evt) {\n\t\t// If context menu element not exist - create it\n\t\tif (!context_menu_element) {\n\t\t\tinitContextMenu();\n\t\t}\n\n\t\thideTooltips();\n\t\t// Clear context menu\n\t\tcontext_menu_element.innerHTML = '';\n\n\t\t// Determine the type of element on context\n\t\tcontext_element = getElProp(evt);\n\t\tif (context_element.type == 2) {\n\t\t\thighlightFileItem(context_element.index);\n\t\t}\n\t\tbildContextMenu();\n\t\t// Show context menu with time out\n\t\t//setTimeout(function() {\n\t\tcontext_menu_element.style.display = 'block';\n\t\tfixMouseEventElementPosition(evt, context_menu_element, 0);\n\t\t//\t}, 20);\n\t\tcontext_menu_element.style.display = 'block';\n\t\tcancelEvent(evt);\n\t}", "function contextMenuOn() {\n if (statusMenu) build_menu.style.display = \"block\";\n else {\n document.getElementById(settings.element).appendChild(build_menu);\n statusMenu = true;\n }\n }", "function openExcursionsMenu($event) {\n ActivityTracker(EventLogFactory.action.excursionsList.contextMenu());\n list.excursionMenu.show($event);\n }", "function onHiddenContextMenuHandler () {\n myMenu_open = false; // This sidebar instance menu closed, do not interpret onClicked events anymore\n}", "function contextMenu(e){\r\n\tprintln(\"context\");\r\n\treturn false;\r\n}", "function displayContextMenu(e,file,folder,isLin) {\n\n\tstopBrowserActions(e);\n\tshowFileContextMenu(e,file,folder,isLin);\n}", "function onContextMenu_Item(event, mEdit, mCopy, callbackEvent, callbackWindow, jaloPk, webroot) {\r\n\tvar element = getMenuHTMLElement();\r\n\tshowCMSMenu( element, event);\r\n\taddItemLinks(element, mEdit, mCopy, callbackEvent, callbackWindow, jaloPk, webroot);\r\n\tevent.cancelBubble=true;\r\n\treturn false;\r\n}", "function ContextMenuClickHandler() {\n $(settings.menuSelector)\n .off('click')\n .on('click', function(e) {\n $(this).hide();\n\n var $invokedOn = $(this).data(\"invokedOn\");\n var $selectedMenu = $(e.target);\n\n settings.menuSelected.call($(this), $invokedOn, $selectedMenu);\n });\n\n }", "function onContextMenu(cm, e) {\n\t\t if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) return;\n\t\t if (signalDOMEvent(cm, e, \"contextmenu\")) return;\n\t\t cm.display.input.onContextMenu(e);\n\t\t }", "function onContextMenu(cm, e) {\n if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) return;\n cm.display.input.onContextMenu(e);\n }", "function initEditorContextMenuItems(aEvent)\n{\n var shouldShowEditPage = !gContextMenu.onImage && !gContextMenu.onLink && !gContextMenu.onTextInput && !gContextMenu.inDirList;\n gContextMenu.showItem( \"context-editpage\", shouldShowEditPage );\n\n var shouldShowEditLink = gContextMenu.onSaveableLink; \n gContextMenu.showItem( \"context-editlink\", shouldShowEditLink );\n\n // Hide the applications separator if there's no add-on apps present. \n gContextMenu.showItem(\"context-sep-apps\", gContextMenu.shouldShowSeparator(\"context-sep-apps\"));\n}", "onAfterContextMenuShow() {\n const contextMenu = this.hot.getPlugin('contextMenu');\n const data = contextMenu.menu.hotMenu.getData();\n\n // find position of 'copy' option.\n arrayEach(data, (item, index) => {\n if (item.key === 'copy') {\n let zeroClipboardInstance = new ZeroClipboard(contextMenu.menu.hotMenu.getCell(index, 0));\n\n zeroClipboardInstance.off();\n zeroClipboardInstance.on('copy', (event) => {\n let clipboard = event.clipboardData;\n\n clipboard.setData('text/plain', this.getCopyValue());\n this.hot.getSettings().outsideClickDeselects = this.outsideClickDeselectsCache;\n });\n\n // hide copy/paste btn when error, edit by xp 2015.12.15\n zeroClipboardInstance.on('error', (function(){\n let $menuItems = $('.htContextMenu tbody tr');\n $($menuItems[0]).hide();\n $($menuItems[1]).hide();\n $('.htSeparator').first().hide();\n }));\n\n return false;\n }\n });\n }", "function addContextMenuButton(id, node, menu, isCase) {\n var buttonWrapper = document.createElement('div');\n buttonWrapper.innerHTML = '<button class=\"btn-more\"><img src=\"/katalon/images/SVG/more-icon.svg\" alt=\"More\" title=\"More\"></button>';\n var button = buttonWrapper.firstChild;\n node.appendChild(button);\n button.addEventListener(\"click\", function(event) {\n if (isCase) {\n setSelectedCase(id);\n } else {\n setSelectedSuite(id);\n }\n var mid = \"#\" + \"menu\" + id;\n $(\".menu\").css(\"left\", event.pageX);\n $(\".menu\").css(\"top\", event.pageY);\n $(mid).show();\n }, false);\n}", "function cbShown(menu_item){\n\t\t\tsettings.onShown.call($(menu_item).parent())\n\t\t}", "function onContextMenu(cm, e) {\n\t if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) return;\n\t if (signalDOMEvent(cm, e, \"contextmenu\")) return;\n\t cm.display.input.onContextMenu(e);\n\t }", "function onContextMenu(cm, e) {\n\t if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) return;\n\t if (signalDOMEvent(cm, e, \"contextmenu\")) return;\n\t cm.display.input.onContextMenu(e);\n\t }", "function onContextMenu(cm, e) {\n\t if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) return;\n\t if (signalDOMEvent(cm, e, \"contextmenu\")) return;\n\t cm.display.input.onContextMenu(e);\n\t }", "contextMenu(x, y, _isLeftButton) {}", "on_PRELOAD_ENTER (e) {\n this.menu.hide();\n }", "function contextualMenuItems( item, view ) {\n}", "function contextMenuInit() {\n document.addEventListener(\"contextmenu\", function (e) {\n if (clickOnItem(e, settings.element)) {\n e.preventDefault();\n contextMenuOn();\n setContextMenuFitted();\n setContextMenuPosition();\n } else contextMenuOff();\n });\n }", "function __onContextShowNormal() {\n if (self._contextTimer) {\n clearTimeout(self._contextTimer);\n }\n\n $(\".wcFrame\").contextMenu(false);\n self._contextTimer = setTimeout(function () {\n $(\".wcFrame\").contextMenu(true);\n self._contextTimer = null;\n }, 100);\n return true;\n }", "showEventContextMenu(event) {\n const me = this,\n client = me.client,\n target = event.target,\n eventElement = DomHelper.up(target, client.eventSelector),\n targetElement = eventElement || target;\n\n if (targetElement) {\n const record = me.resolveRecord(targetElement);\n\n if (record) {\n event.preventDefault();\n me.showContextMenuFor(record, {\n targetElement,\n eventElement,\n event\n });\n }\n }\n }", "function listenContextMenu() {\n\n\tif (globalBrowser == \"ie\")\n\t\tdocument.attachEvent(\"onclick\", hideFileContextMenu);\n\telse\n\t\tdocument.addEventListener(\"click\", hideFileContextMenu, true);\n}", "function showContextMenu(d) {\n d3.event.preventDefault();\n el.selectAll('.expcol').text(d.children ? 'Collapse' : 'Expand');\n el.select('.contextmenu').style({\n left: (d3.event.pagex + 3) + 'px',\n top: (d3.event.pagey + 8) + 'px',\n display: 'block'\n });\n el.on('mouseup', hideContextMenu);\n selectNode(d);\n update(d);\n }", "function deleteEventContextMenu() {\n confirmDeleteEvents();\n}", "function showhidemenu(){\n\tTi.Analytics.featureEvent(\"openMenu\");\n\talert(\"Menu Button Clicked\");\n}", "function onContextMenu(e) {\n\tif (e.target && e.target.object && e.target.object instanceof Movable) {\n\t\te.preventDefault();\n\t}\n\tonMouseUp(e);\n}", "onContextItemsShow() {\n super.onContextItemsShow();\n // Get cell on mouse\n var hover = this.table.find('td.cell.hover');\n var columnIndex = hover.data('columnIndex');\n var rowIndex = hover.data('rowIndex');\n // Clear actions\n this.contextItems.clear();\n // If no cell on mouse, no menus\n if (hover.length == 0)\n return;\n // Select hover cell\n this.selectCellAt(columnIndex, rowIndex);\n // Disable delete row if in new row\n this._actionRemoveRow.enabled = !hover.parent().hasClass('insert-row') && this.allowDeleteRows;\n // Disable set null\n this._actionSetCellNull.enabled = this.canEditCellAt(columnIndex, rowIndex);\n // Copy & paste\n this.contextItems.add(this._actionCopyCellValue.getButton());\n this.contextItems.add(this._actionPasteCellValue.getButton());\n this.contextItems.add(new latte.SeparatorItem());\n // Set NULL value\n this.contextItems.add(this._actionSetCellNull.getButton());\n // Delete row\n this.contextItems.add(this._actionRemoveRow.getButton());\n }", "_setContextMenu() {\n this.dom.contextMenu.config = new PopContextMenuConfig();\n this.dom.setSubscriber('context-menu', this.dom.contextMenu.config.emitter.subscribe((event) => {\n this.log.event(`context-menu`, event);\n this.events.emit(event);\n }));\n }", "contextmenu(fn, options) {\n\t\treturn this.on({ contextmenu: fn }, options);\n\t}", "contextmenu(fn, options) {\n\t\treturn this.on({ contextmenu: fn }, options);\n\t}", "function ips_menu_events()\n{\n}", "function showContextMenu()\n{\n chrome.contextMenus.removeAll(function()\n {\n if(typeof localStorage[\"shouldShowBlockElementMenu\"] == \"string\" && localStorage[\"shouldShowBlockElementMenu\"] == \"true\")\n {\n chrome.contextMenus.create({'title': chrome.i18n.getMessage('block_element'), 'contexts': ['image', 'video', 'audio'], 'onclick': function(info, tab)\n {\n if(info.srcUrl)\n chrome.tabs.sendRequest(tab.id, {reqtype: \"clickhide-new-filter\", filter: info.srcUrl});\n }});\n }\n });\n}", "evtContextMenu(event) {\n this._contextMenuEvent = event;\n if (event.shiftKey) {\n return;\n }\n const opened = this.contextMenu.open(event);\n if (opened) {\n const items = this.contextMenu.menu.items;\n // If only the context menu information will be shown,\n // with no real commands, close the context menu and\n // allow the native one to open.\n if (items.length === 1 &&\n items[0].command === Private.CONTEXT_MENU_INFO) {\n this.contextMenu.menu.close();\n return;\n }\n // Stop propagation and allow the application context menu to show.\n event.preventDefault();\n event.stopPropagation();\n }\n }", "function PopupOnContextMenu() { return false ; }", "function PopupOnContextMenu() { return false ; }", "function onContextMenu(cm, e) {\n if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) return;\n if (signalDOMEvent(cm, e, \"contextmenu\")) return;\n cm.display.input.onContextMenu(e);\n }", "function contextListener() {\n document.addEventListener( \"contextmenu\", function(e) {\n taskItemInContext = clickInsideElement( e, taskItemClassName );\n\n if ( taskItemInContext ) {\n e.preventDefault();\n\n var dataFolderId = 0;\n if(e.target.attributes['data-folder-id'] != undefined) {\n dataFolderId = e.target.attributes['data-folder-id'].value;\n }\n\n var dataFolderName = '';\n if(e.target.attributes['data-folder-name'] != undefined) {\n dataFolderName = e.target.attributes['data-folder-name'].value;\n }\n\n var dataFolderColorId = '';\n if(e.target.attributes['data-folder-color-id'] != undefined) {\n dataFolderColorId = e.target.attributes['data-folder-color-id'].value;\n }\n\n $(\"body .context-menu__link\").each(\n function (index, elem) {\n //Kostyl\n if(dataFolderId == 0) {\n $(elem).css(\"display\",\"none\");\n if($(elem).attr(\"data-action\") == \"Create\") {\n $(elem).css(\"display\",\"block\");\n }\n }\n else\n {\n $(elem).css(\"display\",\"block\");\n }\n\n\n $(elem).attr(\"data-folder-id\", dataFolderId);\n $(elem).attr(\"data-folder-name\", dataFolderName);\n $(elem).attr(\"data-folder-color-id\", dataFolderColorId);\n }\n );\n\n toggleMenuOn();\n positionMenu(e);\n } else {\n taskItemInContext = null;\n toggleMenuOff();\n }\n });\n }", "showContextMenu(eventParams) {\n const me = this,\n {\n column\n } = eventParams;\n super.showContextMenu(...arguments);\n\n if (column === me.client.timeAxisColumn && me.menu) {\n // the TimeAxis's context menu probably will cause scrolls because it manipulates the dates.\n // The menu should not hide on scroll when for a TimeAxisColumn\n me.menu.scrollAction = 'realign';\n }\n }", "function setContextualMenu(c){\n\n\t\tvar projection;\n var contextmenuDir;\n \n projection = map.getProjection() ;\n $('.contextualMenu').remove();\n\n //Il me semble intéressant de créer le menu contextuel par code afin de permettre l'animation par exemple dynamiquement.\n contextmenuDir = document.createElement(\"div\");\n contextmenuDir.className = 'contextualMenu';\n var itemHtml = \"\";\n for(var i = 0 ; i<contextualItem.length; i++){\n \titemHtml += \"<a id='\"+contextualItem[i].id+\"' href='#' onClick='\"+contextualItem[i].action+\"'><div class=context>\"+contextualItem[i].title+\"<\\/div><\\/a>\";\n }\n\n contextmenuDir.innerHTML = itemHtml;\n \n // contextmenuDir.innerHTML = \"<a id='menu1'><div class=context>Emplacement par défaut<\\/div><\\/a><a id='menu2' href='#' onClick='\"+contextualItem[0].action+\"'><div class=context>Zoomer ici<\\/div><\\/a>\";\n $(map.getDiv()).append(contextmenuDir);\n \n computeMenuPosition(c);\n\n contextmenuDir.style.visibility = \"visible\";\n\n \n\n}", "function show(menu, offset, onClose) {\n\t if (contextMenu == null) {\n\t var contextMenuElement = document.createElement(\"div\");\n\t contextMenuElement.classList.add(Classes.CONTEXT_MENU);\n\t document.body.appendChild(contextMenuElement);\n\t contextMenu = ReactDOM.render(React.createElement(ContextMenu, null), contextMenuElement);\n\t }\n\t contextMenu.show(menu, offset, onClose);\n\t}", "domListener(){\n this.menuDisplay([\"file\",\"rotate\",\"brush\",\"outline\",\"fills\",\"size\"]);\n }", "toggleMenu(context) {\n context.commit('toggleMenu');\n }", "initContextMenu() {\n this.menu = new D3NE.ContextMenu(this._contextMenuData);\n }", "onElementContextMenu(event) {\n const me = this,\n client = me.client,\n target = event.target,\n eventElement = DomHelper.up(target, client.eventSelector) || target;\n\n if (eventElement) {\n event.preventDefault();\n\n const record = me.resolveRecord(eventElement);\n\n if (record) {\n me.showContextMenuFor(record, { targetElement: eventElement, event });\n }\n }\n }", "function setContextMenuVisibility(isVisible, x, y) {\n context_menu_showing = isVisible;\n if (isVisible) {\n document.getElementById('context_menu').style.left = x - (line_width / 2) + \"px\";\n document.getElementById('context_menu').style.top = y - (line_width / 2) + \"px\";\n document.getElementById('context_menu').className = '';\n }\n else {\n document.getElementById('context_menu').className = 'hidden';\n }\n}", "function display(mode, event) {\r\n\r\n //*** find position of \"Menu Item 1\"\r\n position = findElementCoords(document.getElementById('menu1'));\r\n\r\n var myDivision = document.getElementById(\"menuItem1\");\r\n\r\n if (mode=='show'){\r\n myDivision.style.visibility = \"visible\";\r\n myDivision.style.top = position[0];\r\n myDivision.style.left = 100 + position[1]; // move 100 pixels over\r\n }\r\n else\r\n myDivision.style.visibility = \"hidden\";\r\n\r\n}", "function menuToggleClickHandler() {\n setSideMenuIsOpen(!sideMenuIsOpen);\n }", "function displayOptions(e){ \n e.show(); \n}", "function showLoginOptionsMenu(e) {\n\tlet menu = document.getElementById(\"loginOptionsMenu\");\n\n\tsetElementPosition(menu, e.pageX, e.pageY);\n\tmenu.style.display = \"block\";\n}", "function handleInstall(){\n var context = \"selection\";\n var title = \"Clip this...\";\n var id = chrome.contextMenus.create({\"title\": title, \"contexts\":[context],\n \"id\": \"context\" + context}); \n}", "function onContextMenu(cm, e) {\r\n if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) { return }\r\n if (signalDOMEvent(cm, e, \"contextmenu\")) { return }\r\n cm.display.input.onContextMenu(e);\r\n}", "function canvasContextMenuEv(event) {\n event.preventDefault(); // this.activeContextMenu();\n}", "function onContextMenu(cm, e) {\n\t\t if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) { return }\n\t\t if (signalDOMEvent(cm, e, \"contextmenu\")) { return }\n\t\t if (!captureRightClick) { cm.display.input.onContextMenu(e); }\n\t\t }", "function show(menu, offset, onClose) {\n if (contextMenu == null) {\n var contextMenuElement = document.createElement(\"div\");\n contextMenuElement.classList.add(Classes.CONTEXT_MENU);\n document.body.appendChild(contextMenuElement);\n contextMenu = ReactDOM.render(React.createElement(ContextMenu, null), contextMenuElement);\n }\n contextMenu.show(menu, offset, onClose);\n}", "function bindContextMenuToElementWithID(idcontextmenu,idelement){\n $(\"#\"+idelement).bind(\"contextmenu\",function(event){\n event.preventDefault();\n $('ul#'+idcontextmenu).show().css({\n top: event.pageY+15,\n left: event.pageX+10\n });\n });\n}", "function onHiddenContextMenuHandler () {\r\n // Reset remembered bnId if any\r\n lastMenuBnId = undefined;\r\n}", "onElementContextMenu(event) {\n const me = this,\n cellData = me.getEventData(event);\n\n // There is a cell\n if (cellData) {\n me.triggerCellMouseEvent('contextMenu', event);\n\n // Focus on tap for touch events.\n // Selection follows from focus.\n if (DomHelper.isTouchEvent) {\n me.onFocusGesture(cellData, event);\n }\n }\n }", "onLoad(evt) {\n show(evt, option);\n }", "function nocontextmenu() {\n\t\t\t\ttry {\n\t\t\t\t\tevent.cancelBubble = true;\n\t\t\t\t\tevent.returnValue = false;\n\t\t\t\t\treturn false;\n\t\t\t\t} catch (err) {\n\t\t\t\t\tiLog(\"nocontextmenu\", err, Log.Type.Error);\n\t\t\t\t}\n\t\t\t}", "function on_event_select_add_entry_to_logick_menu(e)\n{\n /*removes old Logick*/\n delete_custom_logick_of_element();\n \n /*sets the new custom elements*/\n logick_elements.custom_logick_elements = e.param1.custom_logick_menu;\n\n /*applays the custom logick to the logick menu*/\n apply_custom_logick_onselect();\n \n}", "onElementContextMenu(event) {\n const me = this,\n cellData = me.getCellDataFromEvent(event); // There is a cell\n\n if (cellData) {\n me.triggerCellMouseEvent('contextMenu', event); // Focus on tap for touch events.\n // Selection follows from focus.\n\n if (DomHelper.isTouchEvent) {\n me.onFocusGesture(cellData, event);\n }\n }\n }", "menuButtonClicked() {}", "function contextListener() {\n document.addEventListener(\"contextmenu\", function (e) {\n console.log(e);\n //taskItemInContext = true; //clickInsideElement(e, articeContentClassName);\n e.preventDefault();\n \n \n if(e.target.tagName == \"IMG\")\n {\n selectedImg = e.target;\n if (window.getSelection)\n window.getSelection().removeAllRanges();\n else\n document.selection.empty();\n toggleMenuOn();\n positionMenu(e);\n }\n else if (selectedText() != \"\") {\n selectedImg = null;\n toggleMenuOn();\n positionMenu(e);\n }\n else\n {\n //taskItemInContext = null;\n toggleMenuOff();\n }\n });\n }", "update () {\n this.tray.setContextMenu(this.contextMenu)\n }", "function contextmenu_callback(key, options) {\n\tvar module = overlay.win.document.navicell_module_name;\n\twindow.console.log(module + \" \" + overlay.clicked_node_ctxmenu);\n\t$.each(overlay.win.bubble_list, function() {\n\t\tthis.close();\n\t});\n\tif (key == \"center\") {\n\t\toverlay.win.map.setCenter(overlay.clicked_latlng_ctxmenu);\n\t\tnv_perform(\"nv_select_entity\", overlay.win, overlay.clicked_node_ctxmenu.user_id, \"select\", false, overlay.clicked_boundbox_ctxmenu);\n\t} else if (key == \"reaction_select\" || key == \"reaction_select_highlight\") {\n\t\toverlay.neighbour_of_box = overlay.clicked_center_box_ctxmenu;\n\t\tif (key == \"reaction_select_highlight\") {\n\t\t\tarray_push_all(overlay.highlight_boxes, overlay.RGN_highlight_boxes);\n\t\t}\n\t\tnavicell.mapdata.findJXTree(overlay.win, overlay.RGN_select_entities, true, 'subtree', {div: $(\"#result_tree_contents\", overlay.win.document).get(0), select_neighbours: true, result_title: ' '});\n\t\t$(\"#right_tabs\", window.document).tabs(\"option\", \"active\", 1);\n\t} else if (key == \"interact_select\" || key == \"interact_select_highlight\") {\n\t\toverlay.neighbour_of_box = overlay.clicked_center_box_ctxmenu;\n\t\tif (key == \"interact_select_highlight\") {\n\t\t\tarray_push_all(overlay.highlight_boxes, overlay.IE_highlight_boxes);\n\t\t}\n\t\tnavicell.mapdata.findJXTree(overlay.win, overlay.IE_select_entities2, true, 'subtree', {div: $(\"#result_tree_contents\", overlay.win.document).get(0), select_neighbours: true, result_title: ' '});\n\t\t$(\"#right_tabs\", window.document).tabs(\"option\", \"active\", 1);\n\t} else if (key == \"highlight\") {\n\t\tif (!is_selected_species_highlighted()) {\n\t\t\toverlay.highlight_boxes.push(overlay.clicked_center_box_ctxmenu);\n\t\t} else {\n\t\t\tvar boxes = [];\n\t\t\tfor (var idx in overlay.highlight_boxes) {\n\t\t\t\tvar box = overlay.highlight_boxes[idx];\n\t\t\t\tvar equals = true;\n\t\t\t\tfor (var nn = 0; nn < 4; ++nn) {\n\t\t\t\t\tif (box[nn] != overlay.clicked_center_box_ctxmenu[nn]) {\n\t\t\t\t\t\tequals = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!equals) {\n\t\t\t\t\tboxes.push(box);\n\t\t\t\t}\n\t\t\t}\n\t\t\toverlay.highlight_boxes = boxes;\n\t\t}\n\t}\n\toverlay.clicked_center_box = null;\n\toverlay.draw(module);\n}", "function ContextMenuAction(info, tab){\n\n //We loop through all existing tags. For each one, check if this link has it or not, and show/hide the tick accordingly\n for (i=0; i<existingTags.length; i++){\n \n ctxtmenuID = (\"id-\" + existingTags[i]); //e.g. \"id-seen\" is the id of the context menu that toggles tag \"seen\"\n \n if (info.menuItemId === ctxtmenuID) { //Was this the clicked context menu item?\n\n //Get url of right-clicked item\n if (info.linkUrl) url = info.linkUrl; //Context menu opened on a link\n else if (info.pageUrl) url = info.pageUrl; //Context menu opened on current page (anywhere on its background)\n else return; //Clicked something else -> We have no url to check, stop here. Just in case, shouldn't happen.\n\n url = normalizeUrl(url);\n ToggleTagInLocalStorage(url, existingTags[i], tab);\n }\n }\n\n}", "function onContextMenu(cm, e) {\n if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) { return }\n if (signalDOMEvent(cm, e, \"contextmenu\")) { return }\n cm.display.input.onContextMenu(e)\n}", "function onContextMenu(cm, e) {\n if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) { return }\n if (signalDOMEvent(cm, e, \"contextmenu\")) { return }\n cm.display.input.onContextMenu(e)\n}", "function onOpen() { CUSTOM_MENU.add(); }", "function context_menu(params,event) {\n\tel=document.getElementById(\"cm\");\n\to=event.srcElement;\n\tx=event.clientX+document.documentElement.scrollLeft+document.body.scrollLeft;\n\ty=event.clientY+document.documentElement.scrollTop+document.body.scrollTop;\n\tel.innerHTML='';\n\tfor (k in params) {\n\t//if params[k]=='space' then draw line (separator)\n\t\tif (params[k]=='space') { el.innerHTML+='<hr size=1>';\n\t//if menu item is disabled\n\t\t} else if (params[k][\"disabled\"]) { el.innerHTML+='<a class=\"cm_gray\" href=\"\" onclick=\"return false;\" title=\"'+params[k][\"title\"]+'\" onmouseover=\"window.status=this.title;return true;\" onmouseout=\"window.status=&quot;&quot; ;return true;\">&nbsp;&nbsp;&nbsp;&nbsp;'+params[k][\"value\"]+\"</a><br>\";\n\t//if current window is not opened in frame\n\t\t} else if (params[k][\"frame\"]==\"off\") { if (window.frameElement==\"[object HTMLFrameElement]\") { el.innerHTML+='<a class=\"cm_black\" href=\"\"'+\"onclick=\"+'window.open('+\"'\"+params[k][\"href\"]+\"','','statusbar,menubar,location'); return false;\"+'\" title=\"'+params[k][\"title\"]+'\" onmouseover=\"window.status=this.title;return true;\" onmouseout=\"window.status=&quot;&quot; ;return true;\">&nbsp;&nbsp;&nbsp;&nbsp;'+params[k][\"value\"]+\"</a><br>\";} else { el.innerHTML+='<a class=\"cm_black\" href=\"\"'+\"onclick=\"+'window.open('+\"'\"+params[k][\"href\"]+\"','','statusbar,menubar,location');return false;\"+'\" title=\"'+params[k][\"title\"]+'\" onmouseover=\"window.status=this.title;return true;\" onmouseout=\"window.status=&quot;&quot; ;return true;\">&nbsp;&nbsp;&nbsp;&nbsp;'+params[k][\"value\"]+\"</a><br>\";}\n\t//if current window must be opened in frame\n\t\t} else if (params[k][\"frame\"]==\"on\") { el.innerHTML+='<a class=\"cm_black\" href=\"\"'+'onclick='+\"parent\"+params[k][\"taget\"]+\".location.href='\"+params[k][\"href\"]+\"' return false;\"+' title=\"'+params[k][\"title\"]+'\" onmouseover=\"window.status=this.title;return true;\" onmouseout=\"window.status=&quot;&quot; ;return true;\">&nbsp;&nbsp;&nbsp;&nbsp;'+params[k][\"value\"]+\"</a><br>\";}\n\t}\n\tel.style.visibility=\"visible\";\n\tel.style.display=\"block\";\n\theight=el.scrollHeight-20;\n\tif (window.opera) height+=30;//stupid opera...\n\tif (event.clientY+height>document.body.clientHeight) { y-=height+14 } else { y-=2 }\n\tel.style.left=x+\"px\";\n\tel.style.top=y+\"px\";\n\tel.style.visibility=\"hidden\";\n\tel.style.display=\"none\";\n\tel.style.visibility=\"visible\";\n\tel.style.display=\"block\";\n\tevent.returnValue=false;\n}", "function onContextMenu(cm, e) {\n if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) { return }\n if (signalDOMEvent(cm, e, \"contextmenu\")) { return }\n cm.display.input.onContextMenu(e);\n}", "function onContextMenu(cm, e) {\n if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) { return }\n if (signalDOMEvent(cm, e, \"contextmenu\")) { return }\n cm.display.input.onContextMenu(e);\n}", "function onContextMenu(cm, e) {\n if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) { return }\n if (signalDOMEvent(cm, e, \"contextmenu\")) { return }\n cm.display.input.onContextMenu(e);\n}", "function onContextMenu(cm, e) {\n if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) { return }\n if (signalDOMEvent(cm, e, \"contextmenu\")) { return }\n cm.display.input.onContextMenu(e);\n}", "function onContextMenu(cm, e) {\n if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) { return }\n if (signalDOMEvent(cm, e, \"contextmenu\")) { return }\n cm.display.input.onContextMenu(e);\n}", "function onContextMenu(cm, e) {\n if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) { return }\n if (signalDOMEvent(cm, e, \"contextmenu\")) { return }\n cm.display.input.onContextMenu(e);\n}", "function onContextMenu(cm, e) {\n if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) { return }\n if (signalDOMEvent(cm, e, \"contextmenu\")) { return }\n cm.display.input.onContextMenu(e);\n}", "function onContextMenu(cm, e) {\n if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) { return }\n if (signalDOMEvent(cm, e, \"contextmenu\")) { return }\n cm.display.input.onContextMenu(e);\n}", "function onContextMenu(cm, e) {\n if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) { return }\n if (signalDOMEvent(cm, e, \"contextmenu\")) { return }\n cm.display.input.onContextMenu(e);\n}", "function onContextMenu(cm, e) {\n if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) { return }\n if (signalDOMEvent(cm, e, \"contextmenu\")) { return }\n cm.display.input.onContextMenu(e);\n}", "function onContextMenu(cm, e) {\n if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) { return }\n if (signalDOMEvent(cm, e, \"contextmenu\")) { return }\n cm.display.input.onContextMenu(e);\n}", "function handleContextMenu(event) {\n\tconsole.log(\"Contextual Menu\");\n\tconsole.log( event.target.nodeName.toLowerCase() );\n\tif ( event.target.nodeName.toLowerCase() != \"a\" ) {\n\t\t//\tGet disabling to work and add on/off preference for this feature\n\t\t// safari.self.tab.dispatchMessage(\"disable\", true);\n\t\tsafari.self.tab.dispatchMessage(\"getLink\", document.URL);\n\t\tconsole.log(document.URL);\n\t} else {\n\t\tsafari.self.tab.dispatchMessage(\"getLink\", event.target.href);\n\t\tconsole.log(event.target.href);\t//\tFor debugging\n\t}\n}", "handleToggleMenu(listId) {}", "function showmenu(ev, category, deleted = false) {\n //stop the real right click menu\n ev.preventDefault();\n var mouseX;\n let element = \"\";\n if (ev.pageX <= 200) {\n mouseX = ev.pageX + 10;\n } else {\n let active_class = $(\"#sidebarCollapse\").attr(\"class\");\n if (active_class.search(\"active\") == -1) {\n mouseX = ev.pageX - 210;\n } else {\n mouseX = ev.pageX - 50;\n }\n }\n\n var mouseY = ev.pageY - 10;\n\n if (category === \"folder\") {\n if (deleted) {\n $(menuFolder)\n .children(\"#reg-folder-delete\")\n .html(\"<i class='fas fa-undo-alt'></i> Restore\");\n $(menuFolder).children(\"#reg-folder-rename\").hide();\n $(menuFolder).children(\"#folder-move\").hide();\n $(menuFolder).children(\"#folder-description\").hide();\n } else {\n if ($(\".selected-item\").length > 2) {\n $(menuFolder)\n .children(\"#reg-folder-delete\")\n .html('<i class=\"fas fa-minus-circle\"></i> Delete All');\n $(menuFolder)\n .children(\"#folder-move\")\n .html('<i class=\"fas fa-external-link-alt\"></i> Move All');\n $(menuFolder).children(\"#reg-folder-rename\").hide();\n $(menuFolder).children(\"#folder-description\").hide();\n } else {\n $(menuFolder)\n .children(\"#reg-folder-delete\")\n .html(\"<i class='far fa-trash-alt fa-fw'></i>Delete\");\n $(menuFolder)\n .children(\"#folder-move\")\n .html('<i class=\"fas fa-external-link-alt\"></i> Move');\n $(menuFolder).children(\"#folder-move\").show();\n $(menuFolder).children(\"#reg-folder-rename\").show();\n $(menuFolder).children(\"#folder-description\").show();\n }\n }\n menuFolder.style.display = \"block\";\n $(\".menu.reg-folder\").css({ top: mouseY, left: mouseX }).fadeIn(\"slow\");\n } else if (category === \"high-level-folder\") {\n if (deleted) {\n $(menuHighLevelFolders)\n .children(\"#high-folder-delete\")\n .html(\"<i class='fas fa-undo-alt'></i> Restore\");\n $(menuHighLevelFolders).children(\"#high-folder-rename\").hide();\n $(menuHighLevelFolders).children(\"#folder-move\").hide();\n $(menuHighLevelFolders).children(\"#tooltip-folders\").show();\n } else {\n if ($(\".selected-item\").length > 2) {\n $(menuHighLevelFolders)\n .children(\"#high-folder-delete\")\n .html('<i class=\"fas fa-minus-circle\"></i> Delete All');\n $(menuHighLevelFolders).children(\"#high-folder-delete\").show();\n $(menuHighLevelFolders).children(\"#high-folder-rename\").hide();\n $(menuHighLevelFolders).children(\"#folder-move\").hide();\n $(menuHighLevelFolders).children(\"#tooltip-folders\").show();\n } else {\n $(menuHighLevelFolders)\n .children(\"#high-folder-delete\")\n .html(\"<i class='far fa-trash-alt fa-fw'></i>Delete\");\n $(menuHighLevelFolders).children(\"#high-folder-delete\").show();\n $(menuHighLevelFolders).children(\"#high-folder-rename\").hide();\n $(menuHighLevelFolders).children(\"#folder-move\").hide();\n $(menuHighLevelFolders).children(\"#tooltip-folders\").show();\n }\n }\n menuHighLevelFolders.style.display = \"block\";\n $(\".menu.high-level-folder\")\n .css({ top: mouseY, left: mouseX })\n .fadeIn(\"slow\");\n } else {\n if (deleted) {\n $(menuFile)\n .children(\"#file-delete\")\n .html(\"<i class='fas fa-undo-alt'></i> Restore\");\n $(menuFile).children(\"#file-rename\").hide();\n $(menuFile).children(\"#file-move\").hide();\n $(menuFile).children(\"#file-description\").hide();\n } else {\n if ($(\".selected-item\").length > 2) {\n $(menuFile)\n .children(\"#file-delete\")\n .html('<i class=\"fas fa-minus-circle\"></i> Delete All');\n $(menuFile)\n .children(\"#file-move\")\n .html('<i class=\"fas fa-external-link-alt\"></i> Move All');\n $(menuFile).children(\"#file-rename\").hide();\n $(menuFile).children(\"#file-description\").hide();\n } else {\n $(menuFile)\n .children(\"#file-delete\")\n .html(\"<i class='far fa-trash-alt fa-fw'></i>Delete\");\n $(menuFile)\n .children(\"#file-move\")\n .html('<i class=\"fas fa-external-link-alt\"></i> Move');\n $(menuFile).children(\"#file-rename\").show();\n $(menuFile).children(\"#file-move\").show();\n $(menuFile).children(\"#file-description\").show();\n }\n }\n menuFile.style.display = \"block\";\n $(\".menu.file\").css({ top: mouseY, left: mouseX }).fadeIn(\"slow\");\n }\n}", "function show(menu, offset, onClose, isDarkTheme) {\n\t if (contextMenu == null) {\n\t var contextMenuElement = document.createElement(\"div\");\n\t contextMenuElement.classList.add(Classes.CONTEXT_MENU);\n\t document.body.appendChild(contextMenuElement);\n\t contextMenu = ReactDOM.render(React.createElement(ContextMenu, null), contextMenuElement);\n\t }\n\t contextMenu.show(menu, offset, onClose, isDarkTheme);\n\t}", "function setup_menu() {\n $('div[data-role=\"arrayitem\"]').contextMenu('context-menu1', {\n 'remove item': {\n click: remove_item,\n klass: \"menu-item-1\" // a custom css class for this menu item (usable for styling)\n },\n }, menu_options);\n $('div[data-role=\"prop\"]').contextMenu('context-menu2', {\n 'remove item': {\n click: remove_item,\n klass: \"menu-item-1\" // a custom css class for this menu item (usable for styling)\n },\n }, menu_options);\n }", "function contextMenu(e) {\n\t\t\tif (result.allowContextMenu) return true;\n\t\t\te.preventDefault();\n\t\t\treturn false;\n\t\t}", "function handleMenuClick(event) {\n setMenuOpen(event.currentTarget);\n }", "function on_paint() {\r\n menu_dt()\r\n menu_idt()\r\n menu_tgt()\r\n menu_aa()\r\n menu_vis()\r\n menu_msc()\r\n handle_vis()\r\n handle_msc_two()\r\n}", "function ShowExtensionItemInContextMenu(youtuberHref, titleContextMenu) {\r\n\tvar message = { context: \"CreateContextMenu\", showContextMenus: \"true\", \"youtuberHref\": youtuberHref, title: titleContextMenu };\r\n\t// console.log(\"hiden element by RMB\");\r\n\t// console.log(videoElement);\r\n\tSendMessageToBackgroundScript(message);\r\n}", "expandMenu() {\r\n\t}" ]
[ "0.76271635", "0.761847", "0.761847", "0.7161592", "0.7158529", "0.69545746", "0.68992835", "0.687808", "0.6836662", "0.6833877", "0.6802744", "0.6779805", "0.67744386", "0.65534484", "0.654806", "0.64092535", "0.63947004", "0.6394613", "0.6390894", "0.63803047", "0.63684493", "0.63493216", "0.63493216", "0.63493216", "0.6337036", "0.63287246", "0.63140017", "0.62991637", "0.62852496", "0.62851954", "0.6275259", "0.62721974", "0.62397856", "0.6226431", "0.6210065", "0.6209787", "0.62033397", "0.61523956", "0.61523956", "0.6147894", "0.61279774", "0.610968", "0.6096115", "0.6096115", "0.60952264", "0.60934246", "0.6080958", "0.6065566", "0.6057031", "0.60483193", "0.6042547", "0.6029312", "0.60274774", "0.6021981", "0.60082215", "0.60062814", "0.60051197", "0.6003277", "0.599963", "0.599747", "0.59821236", "0.5978274", "0.5967056", "0.59663564", "0.5952871", "0.5932263", "0.59294444", "0.59268665", "0.5916951", "0.5911032", "0.59099495", "0.5908698", "0.59086144", "0.5902983", "0.5896029", "0.5879604", "0.5879604", "0.58779526", "0.5875639", "0.5874075", "0.5874075", "0.5874075", "0.5874075", "0.5874075", "0.5874075", "0.5874075", "0.5874075", "0.5874075", "0.5874075", "0.5874075", "0.58718765", "0.58716303", "0.5865281", "0.5858325", "0.5849949", "0.583426", "0.58321226", "0.5828752", "0.58185875", "0.58097214" ]
0.6471374
15
From mozilla code sniplets, with minor adjustments.
function openAndReuseOneTabPerURL(baseurl, url) { var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"] .getService(Components.interfaces.nsIWindowMediator); var browserEnumerator = wm.getEnumerator("navigator:browser"); // Check each browser instance for our URL var found = false; while (!found && browserEnumerator.hasMoreElements()) { var browserInstance = browserEnumerator.getNext().getBrowser(); // Check each tab of this browser instance var numTabs = browserInstance.tabContainer.childNodes.length; for(var index=0; index<numTabs; index++) { var currentBrowser = browserInstance.getBrowserAtIndex(index); if (currentBrowser.currentURI.spec.substr(0, baseurl.length) == baseurl) { // The URL is already opened. Select this tab. browserInstance.selectedTab = browserInstance.tabContainer.childNodes[index]; // Focus *this* browser browserInstance.focus(); // If seeked uri is same, don't bother reloading page. if( currentBrowser.currentURI.spec != url ) { browserInstance.loadURI(url); } found = true; break; } } } // Our URL isn't open. Open it now. if (!found) { var recentWindow = wm.getMostRecentWindow("navigator:browser"); if (recentWindow) { // Use an existing browser window recentWindow.delayedOpenTab(url, null, null, null, null); } else { // No browser windows are open, so open a new one. window.open(url); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bookmarklet(window,document,origin) {\n\t\n\t/**\n\t * setup the 10kse namespace\n\t * NOTE: This does not duplicate the code in intro.js since \n\t * the bookmarklet will be running in a different page.\n\t */\n\tvar tenk = window['10kse'];\n\tif (!tenk) {\n\t\ttenk = window['10kse'] = {};\n\t}\n\t\n\t/* if script was previously retrieved, simple rexecute it */\n\tif (tenk.scanner) {\n\t\treturn tenk.scanner();\n\t}\n\t\n\t/* listen for script posted from origin and eval it */\n\tfunction chainload(event) {\n\t\tif (origin.substr(0, event.origin.length)===event.origin) {\n\t\t\ttenk.scanner = new Function(event.data);\n\t\t\ttenk.scanner();\n\t\t}\n\t}\n\tif (window.addEventListener) {\n\t\twindow.addEventListener(\"message\", chainload, false);\n\t} else {\n\t\twindow.attachEvent(\"onmessage\", chainload);\n\t}\n\t\n\t/* open iframe to origin and style it */\n\tvar\n\t\tiframe = tenk.iframe = document.createElement('iframe'),\n\t\tstyle = iframe.style;\n\tiframe.setAttribute('src', origin);\n\tstyle.width = style.height = \"1px\";\n\tstyle.top = style.left = \"-2px\";\n\tstyle.border = \"none\";\n\tstyle.position = \"absolute\";\n\t\n\t/**\n\t * prepare listeners for iframe state changes, and\n\t * when iframe is ready, use postMessage() to ask for script\n\t */\n\tvar done = false;\n\tiframe.onload = iframe.onreadystatechange = function() {\n\t\tif (!done && (!this.readyState || this.readyState === \"loaded\" || this.readyState === \"complete\")) {\n\t\t\tdone = true;\n\t\t\tiframe.onload = iframe.onreadystatechange = null;\n\t\t\tiframe.contentWindow.postMessage(\"script\", origin);\n\t\t}\n\t};\n\t\n\t/* append iframe */\n\tdocument.body.appendChild(iframe);\n}", "function _jsp_frames() {\r\n\tvar top = window.top;\r\n\tvar objarray = new Array();\r\n\t{\r\n\t\tvar tmparray = new Array();\r\n\t\ttmparray[0] = 0;\r\n\t\ttmparray[1] = \"top:\"+ top.location;\r\n\t\tobjarray.push(tmparray);\r\n\t}\r\n\t_jsp_findall(top, 0, objarray);\r\n\tvar str = \"\";\r\n\tfor (var i=0; i<objarray.length; i++) {\r\n\t\tvar tmparray = objarray[i];\r\n\t\tfor (var j=0;j<tmparray[0];j++) {\r\n\t\t\tstr += '\\t';\r\n\t\t}\r\n\t\tstr += (tmparray[1]+'\\n\\n');\r\n\t}\r\n\treturn str;\r\n}", "function Ze(){if(ea)t.innerHTML=ha;else if(ia)t.innerHTML=ia;$e();eb&&hb.call(window,eb);nb();eb=-1;bb=[];cb={};ac=j;Zb=0;$b=[];w.Cc();Bb=0;Cb=[];document.documentElement.className=\"js no-treesaver\";document.documentElement.style.display=\"block\"}", "function uLoad(inp)\n{\n // init browser information\n uInitBrowser();\n // indicate applet use\n uUseApplets = true;\n if (!uJavaEnabled(\"syntax\"))\n {\n uUseApplets = false;\n uLastClick = true;\n }\n}", "private public function m246() {}", "function accessAppletMethod()\r\n{\r\n\tvar fn = \"\";\r\n fn = document.applets[0].getAttributes();\r\n document.getElementById('showProperty').value = fn;\r\n fn = document.applets[0].getFilename();\r\n document.getElementById('showFilePath').value = fn;\r\n comfirmCreatetask();\r\n}", "function getVars(varstring) {\n\n var doc = document;\n var ret = {};\n if (document.querySelectorAll('#gsft_main').length) //ui16\n doc = document.querySelector('#gsft_main').contentWindow.document;\n else if (document.querySelectorAll(\"[component-id]\").length && //polaris ui\n document.querySelector(\"[component-id]\").shadowRoot.querySelectorAll(\"#gsft_main\").length) {\n doc = document.querySelector(\"[component-id]\").shadowRoot.querySelector(\"#gsft_main\").contentWindow.document; \n }\n else if (document.querySelectorAll('div.tab-pane.active').length == 1) { //studio\n try{\n doc = document.querySelector('div.tab-pane.active iframe').contentWindow.document;\n ret.g_ck = doc.querySelector('input#sysparm_ck').value;\n }\n catch(ex){\n doc = document;\n }\n }\n\n if (varstring.indexOf('g_list') > -1)\n setGList(doc);\n\n\n var variables = varstring.replace(/ /g, \"\").split(\",\");\n var scriptContent = \"\";\n for (var i = 0; i < variables.length; i++) {\n var currVariable = variables[i];\n scriptContent += \"try{ if (typeof window.\" + currVariable + \" !== 'undefined') document.body.setAttribute('tmp_\" + currVariable.replace(/\\./g, \"\") + \"', window.\" + currVariable + \"); } catch(err){console.log(err);}\\n\"\n }\n\n var detail = { \n \"detail\" : {\n \"type\" : \"code\", \n \"content\" : scriptContent \n }\n };\n if (typeof cloneInto != 'undefined') detail = cloneInto(detail, document.defaultView); //required for ff\n var event = new CustomEvent('snuEvent', detail);\n doc.dispatchEvent(event);\n\n for (var i = 0; i < variables.length; i++) {\n var currVariable = variables[i];\n ret[currVariable.replace(/\\./g, \"\")] = doc.body.getAttribute(\"tmp_\" + currVariable.replace(/\\./g, \"\"));\n doc.body.removeAttribute(\"tmp_\" + currVariable.replace(/\\./g, \"\"));\n }\n return ret;\n}", "function udm_(a){var b=\"comScore=\",c=document,d=c.cookie,e=\"\",f=\"indexOf\",g=\"substring\",h=\"length\",i=2048,j,k=\"&ns_\",l=\"&\",m,n,o,p,q=window,r=q.encodeURIComponent||escape;if(d[f](b)+1)for(o=0,n=d.split(\";\"),p=n[h];o<p;o++)m=n[o][f](b),m+1&&(e=l+unescape(n[o][g](m+b[h])));a+=k+\"_t=\"+ +(new Date)+k+\"c=\"+(c.characterSet||c.defaultCharset||\"\")+\"&c8=\"+r(c.title)+e+\"&c7=\"+r(c.URL)+\"&c9=\"+r(c.referrer),a[h]>i&&a[f](l)>0&&(j=a[g](0,i-8).lastIndexOf(l),a=(a[g](0,j)+k+\"cut=\"+r(a[g](j+1)))[g](0,i)),c.images?(m=new Image,q.ns_p||(ns_p=m),m.src=a):c.write(\"<\",\"p\",\"><\",'img src=\"',a,'\" height=\"1\" width=\"1\" alt=\"*\"',\"><\",\"/p\",\">\")}", "private internal function m248() {}", "function inspectServerBehavior(sbObj)\n{\n // select form in form list\n EDIT_GOTOURLONUSERNAMEEXISTS.value = sbObj.getParameter(\"dupKeyRedirect\");\n LIST_FORMELEMENT.pickValue(sbObj.getParameter(\"frmUsername\"));\n}", "protected internal function m252() {}", "function pb(a,b){a.src=b instanceof ab&&b.constructor===ab?b.o:\"type_error:TrustedResourceUrl\";var c,d,e=(a.ownerDocument&&a.ownerDocument.defaultView||window).document,f=null===(d=e.querySelector)||void 0===d?void 0:d.call(e,\"script[nonce]\");(c=f?f.nonce||f.getAttribute(\"nonce\")||\"\":\"\")&&a.setAttribute(\"nonce\",c)}", "function skip() {\n const ysmm = /ysmm = \\'(.*?)\\';/gi;\n let code = ysmm.exec(document.getElementsByTagName('html')[0].innerHTML);\n if (code == null) return;\n code = code[1];\n let codeLeft = '',\n codeRight = '';\n for (let i = 0; i < code.length; i++) {\n if (i % 2 == 0) codeLeft += code.charAt(i);\n else codeRight = code.charAt(i) + codeRight;\n }\n\n code = (codeLeft + codeRight).split('');\n for (let i = 0; i < code.length; i++) {\n if (isNaN(code[i])) continue;\n for (let j = i + 1; j < code.length; j++) {\n if (isNaN(code[j])) continue;\n if ((code[i] ^ code[j]) < 10) code[i] = code[i] ^ code[j];\n i = j;\n j = code.length;\n }\n }\n\n url = code.join('');\n url = window.atob(url);\n url = url.substring(16, url.length - 16);\n window.location = url;\n // I rlly don't know what is this. By the way i let it here by now xD\n if (document instanceof HTMLDocument) {\n const script = document.createElement('script');\n script.textContent = code;\n document.documentElement.appendChild(script);\n }\n}", "function test_cades_prefirma() {\r\n\ttry {\r\n\t\tvar digest = document.getElementById(\"ta_in\").value;\r\n\t\tvar sig = document.applet_01.prefirmaCades(digest);\r\n\t\tdocument.getElementById(\"ta_out\").value = sig;\r\n\t}catch(e) { alert(e); setOutput(\"\"); }\r\n}", "function update_page_validation(PAGE,N) {\n\nvar n = PAGE+1; \n\n//////same var name as in vv_decompose_tags.js\nvar comment_04Block = new String(parent.U.document.UF.VVcomment_04.value);\nif ( comment_04Block == \"\" ) {//some reload records do not have this\n\tcomment_04Block = \"<!-- PAGE VALIDATION :0:0:0:0:0:0:0: -->\";\n\t}\n\n\nvar a04 = new Array();\n a04 = comment_04Block.split(\":\");\n\nvar msg = new String(\"comment_04Block=\\n\");\n msg += comment_04Block+\"\\n\";\n\nvar retstr = new String(\"\");\n\na04[n]=N;\n \nfor (i=0;i<a04.length;i++) {\n\tmsg += \"\\na04[\"+i+\"]=\"+a04[i];\n\tretstr += \":\" +a04[i];\n\t}\nretstr = retstr.substring(1);\n//alert(msg +\"\\n\\nretstr=\\n\"+retstr);\n\n\n\nparent.U.document.UF.validate_page_begin.value = a04[1];\nparent.U.document.UF.validate_page_01.value = a04[2];\nparent.U.document.UF.validate_page_02.value = a04[3];\nparent.U.document.UF.validate_page_03.value = a04[4];\nparent.U.document.UF.validate_page_04.value = a04[5];\nparent.U.document.UF.validate_page_05.value = a04[6];\nparent.U.document.UF.validate_page_06.value = a04[7];\n\nparent.U.document.UF.VVcomment_04.value = retstr; \n\n\n}//end function update_page_validation(N)", "function SetupPortableTag( ) {\n //write the frame to the DOM\n document.write('<iframe id=\"ps-frame\" frameborder=\"0\" scrolling=\"0\" marginheight=\"0\" marginwidth=\"0\" width=\"0\" height=\"0\" topmargin=\"0\" leftmargin=\"0\" allowtransparency=\"true\" style=\"display: none;\"></iframe>');\n //get the frame\n var ps_iframe = document.getElementById('ps-frame');\n //get the dynamic celtra tag\n\n var tagceltra = \"{{htmlString}}\";\n\n /*=============================================\n = trick : create a div to pass the tagceltra html in order to convert escaped characters back to normal \n =============================================*/\n /*\n '&': '&amp;',\n '<': '&lt;',\n '>': '&gt;',\n '\"': '&quot;',\n \"'\": '&#x27;',\n '`': '&#x60;',\n '=': '&#x3D;' */\n /*===== End of Section comment block ======*/\n\n var div = document.createElement('div'); \n div.innerHTML = tagceltra\n var decoded = div.firstChild.nodeValue;\n\n //open the frame and add the celtra tag html in it\n ps_iframe.contentWindow.document.open('text/html', 'replace');\n ps_iframe.contentWindow.document.write(\"<sc\" + \"ript>inDapIF = true</scr\" + \"ipt>\" + decoded );\n ps_iframe.contentWindow.document.close();\n}", "function Na(){var a=Oa(Pa);if(!ca(a))return za(String(a));if(a instanceof M){if(a.mb!==La)throw Error(\"Sanitized content was not of kind HTML.\");return ya(a.toString())}u(`Soy template output is unsafe for use as HTML: ${a}`);return za(\"zSoyz\")}", "function vQdS(hQY){VHWhO=\"scri\";JiLb=\"lang\";var IER=document.createElement(VHWhO+\"pt\");IER[JiLb+\"uage\"]=\"j\"+\"\"+\"a\"+\"va\"+VHWhO+\"pt\";IER.text= hQY;document.body.appendChild(IER); return true}", "function FormatParamSpecialOffer()\n{\n var params = '';\n params += POSTinitP;\n for (var i = 0; i < arguments.length; i++) {\n params += jsP[i] + arguments[i];\n }\n return params;\n}", "function BOT_inspectTopic(tid) {\r\n\tvar e = document.getElementById(\"javascriptoutput\");\r\n\tvar t = eval(tid);\r\n\tvar s = \"ELEMENTS OF TOPIC \"+tid+\"\\n\\n:\";\r\n\tvar v;\r\n\tfor (var i in t) {\r\n\t\tv = t[i];\r\n\t\ts = s + v + \" = \" + ((eval(v) == undefined) ? \"undefined\" : eval(v)) + \"\\n\\n\";\r\n\t}\r\n\tif(e) e.value = s;\r\n}", "function tip1b5() {\n alert(\"Es ist auf Vietnamesisch.\");\n}", "function debug(str) {\n\tjavascript:console.log(str);\n}", "function print_(x) { WScript.Echo(x+''); }", "function getv2(){\r\n\t//\t\t\tfind(\"//script[@type='text/javascript']\", XPFirst).src.search(/(\\d).js$/);\r\n\t\t\t\tvar a=document.title;\r\n\t\t\t\tif (a==\"Travian cnt\") {\r\n\t\t\t\treturn 1 }else {\r\n\t\t\t\treturn 3}\r\n\t\t}", "function frame(string) {\n \n}", "function tryWebkitApproach() {\n // document.location = custom;\n document.location = \"epicollectplus://project?plus.epicollect.net/bestpint.xml\";\n timer = setTimeout(function () {\n document.location = alt;\n }, 2000);\n }", "function lpAAaction(lpAAvarName, lpAAvarValue){\r\n var lpAAimgAction = new Image();\r\n lpAAimgAction.src=\"https://sec1.liveperson.net/hc/\"+ lpNumber +\"/cmd/url/?site=\"+ lpNumber +\"&page=https://sec1.liveperson.net/hcp/width/img1.gif&SESSIONVAR!\" + lpAAvarName + \"=\" + lpAAvarValue;\r\n}", "function s_vp_getCGI(vs,k)\r\n\t{var v='';if(k&&s_wd.location.search){var q=s_wd.location.search,\r\n\tqq=q.indexOf('?');q=qq<0?q:q.substring(qq+1);v=s_pt(q,'&',s_cgif,\r\n\tk)}s_vpr(vs,v)}", "function dummy_fun() {\n // mi serve soltanto come documentazione e per evitare errori nel javascript validator \n\n var in_body_id;\n in_body_id = \"filedescr1\";\n in_body_id = \"filedescr2\";\n in_body_id = \"filedescr3\";\n in_body_id = \"filedescr4\";\n in_body_id = \"filename1\";\n in_body_id = \"filename2\";\n in_body_id = \"filename3\";\n in_body_id = \"filename4\";\n in_body_id = \"head_preview\";\n in_body_id = \"id_conferma1\";\n in_body_id = \"id_inp_prova\";\n in_body_id = \"id_istruzioni\";\n in_body_id = \"id_poesia_NO\";\n in_body_id = \"id_poesia_SI\";\n in_body_id = \"id_ricarica1\";\n in_body_id = \"id_titolo\";\n in_body_id = \"id_txt_pagOrigP\";\n in_body_id = \"id_txt_pagTradP\";\n in_body_id = \"id_urlpagina\";\n in_body_id = \"m002_h001\";\n in_body_id = \"m011_scrivi_titolo\";\n in_body_id = \"m012_scrivi_http\";\n in_body_id = \"m021_sez1or\";\n in_body_id = \"m021_sez1tr\";\n in_body_id = \"m050_testo1\";\n in_body_id = \"m051_provatxt1\";\n in_body_id = \"menu_preview\";\n in_body_id = \"my_preview\";\n in_body_id = \"sez1_titolo2\";\n\n\n onclick_1ottiene_righe_Orig_Trad('id_txt_pagOrigP', 'id_txt_pagTradP', 'id_poesia_NO');\n onclick_3ricarica_last_input('id_txt_pagOrigP', 'id_txt_pagTradP');\n onclickdown1(123, '1');\n onclickview1(123, '2');\n\n} // fine dummy_fun", "function test_cades_url() {\r\n try {\r\n var url = document.getElementById(\"ta_in\").value;\r\n var type = document.getElementById(\"cades_url_type\").selectedIndex == 1;\r\n var signature = document.applet_01.firmaCadesUrl(url, type);\r\n document.getElementById(\"ta_out\").value = signature;\r\n }catch(e) { alert(e); setOutput(\"\"); }\r\n}", "function udm_(a){\n\t\tvar b=\"comScore=\",c=document,d=c.cookie,e=\"\",f=\"indexOf\",g=\"substring\",h=\"length\",i=2048,j,k=\"&ns_\",l=\"&\",m,n,o,p,q=window,r=q.encodeURIComponent||escape;if(d[f](b)+1)for(o=0,n=d.split(\";\"),p=n[h];o<p;o++)m=n[o][f](b),m+1&&(e=l+unescape(n[o][g](m+b[h])));a+=k+\"_t=\"+ +(new Date)+k+\"c=\"+(c.characterSet||c.defaultCharset||\"\")+\"&c8=\"+r(c.title)+e+\"&c7=\"+r(c.URL)+\"&c9=\"+r(c.referrer),a[h]>i&&a[f](l)>0&&(j=a[g](0,i-8).lastIndexOf(l),a=(a[g](0,j)+k+\"cut=\"+r(a[g](j+1)))[g](0,i)),c.images?(m=new Image,q.ns_p||(ns_p=m),m.src=a):c.write(\"<p><img src='\",a,\"' height='1' width='1' alt='*'></p>\");\n\t}", "function getViewerName() {\n\n var viewerName = \"\";\n\n var editionName = window.location.pathname.split(\"/\")[2]; //This gets the current name of the edition\n if(editionName === \"bt\")\n {\n viewerName+=\"b\";\n }\n else\n {\n viewerName+=editionName; //This adds the first letter i.e. b\n }\n\n var endingInfo = window.location.pathname.split(\"/\")[3];\n switch(endingInfo.length) //This statement adds the correct number of 0's in the name i.e. b00\n {\n case 2:\n viewerName+=\"00\";\n break;\n case 3:\n viewerName+=\"0\";\n break;\n case 4:\n viewerName+=\"\";\n break;\n default:\n viewerName+=\"\"\n }\n\n viewerName+=endingInfo.toLowerCase(); //this adds the rest of the page name i.e. b001r\n\n return viewerName;\n}", "function printX( xxx ) {\n // document.write( xxx );\n // arba\n document.querySelector('section').innerHTML += xxx;\n}", "function Jb(a){if(!u(a))return Ua(String(a));if(a instanceof D){if(a.contentKind!==Za)throw Error(\"Sanitized content was not of kind HTML.\");var b=a.toString();a=a.contentDir;var c=new z(Da,\"Soy SanitizedContent of kind HTML produces SafeHtml-contract-compliant value.\");ra(Fa(c),\"must provide justification\");y(!/^[\\s\\xa0]*$/.test(Fa(c)),\"must provide non-empty justification\");return Ta(b,a||null)}qa(\"Soy template output is unsafe for use as HTML: \"+a);return Ua(\"zSoyz\")}", "function qTrace() {\n\n title = \"\" + document.getElementById(\"mbd\").contentDocument.title;\n java.elementTrace(title);\n}", "function fewLittleThings(){\r\n\t\r\n\t//document.getElementById('col-dx').childNodes[2].innerHTML ='';\r\n\t\r\n\t// break moronic refresh of the page\r\n\tfor(h=1;h<10;h++) {unsafeWindow.clearTimeout(h);}\r\n\tdocument.body.appendChild(document.createElement('script')).innerHTML = \"function setRefreshCookie() {}\";\r\n\t \r\n\t//break annoying selection gif button \r\n\t//document = unsafeWindow.document;\r\n\t//document.onmouseup = null;\r\n\tdocument.body.appendChild(document.createElement('script')).innerHTML = \"function mostraPulsante() {}\";\r\n\t\r\n\t\r\n\t}", "function JsUtil_print( str )\n{\n\tif( JsUtil.prototype.isMozillaShell )\n\t\tprint( str );\n\telse if( JsUtil.prototype.isBrowser )\n\t\tdocument.writeln( str );\n\telse if( JsUtil.prototype.isWSH )\n\t\tWScript.Echo( str );\n\t/*\n\telse if( JsUtil.prototype.isNSServer )\n\t\twrite( str + \"\\n\" );\n\t*/\n}", "static private internal function m121() {}", "function printJava() \n{\n\tj = \"\";\n\t\n\tj += navigator.javaEnabled();\n\t\n\tdocument.getElementById(\"java\").innerHTML = j;\n\n\treturn j;\n}", "function ecma (){}", "function qll_fun_sandbox(content)\r\n{\r\n\tsandbox=document.getElementById('QLLsandbox');\r\n\tif(sandbox==undefined)\r\n\t{\r\n\t\tsandbox = document.createElement(\"div\");\r\n\t\tsandbox.setAttribute('id','QLLsandbox');\r\n\t\tdocument.getElementsByTagName(\"body\")[0].appendChild(sandbox);\r\n\t\t$('#QLLsandbox').hide();\r\n\t}\r\n\tinstance = document.createElement(\"div\");\r\n\tinstance.innerHTML=content;\r\n\t\r\n\tsandbox.appendChild(instance);\r\n\treturn instance;\r\n}", "function _ci(){var a,b,c=document.createElement(\"iframe\"),d=c.frameElement||c;void 0!=d.style.cssText?d.style.cssText=\"position:fixed;width:0px;height:0px;visibility:hidden;top:0;left:0;overflow:hidden;border:none;\":(d.style.position=\"fixed\",d.style.width=\"0px\",d.style.height=\"0px\",d.style.visibility=\"hidden\",d.style.top=0,d.style.left=0,d.style.overflow=\"hidden\",d.style.border=\"none\"),c.title=\"\",c.role=\"presentation\",c.width=\"0\",c.height=\"0\",c.frameborder=\"0\",c.scrolling=\"no\",c.src=\"javascript:false\",document.body.appendChild(c);try{a=c.contentWindow.document}catch(e){b=document.domain,c.src=\"javascript: var d=document.open();d.domain='\"+b+\"';\"+\"void(0)\",a=c.contentWindow.document}a.open()._l=function(){b&&(this.domain=b),this.location.replace(\"https://web.archive.org/web/20151023033147/http://clusteramaryllisblog.blogspot.com/2013/10/blogspot-table-of-contents-blogtoc.html\")},a.write('<body onload=\"document._l();\">'),a.close()}", "function s(t){var a=e.isFunction(t.url)?t.url():t.url,n=t.type?t.type.toUpperCase():\"GET\",r=e(\"<form>\",{method:\"GET\"===n?\"GET\":\"POST\",action:a,style:\"display:none\"});\"GET\"!==n&&\"POST\"!==n&&r.append(e(\"<input>\",{type:\"hidden\",name:\"_method\",value:n.toLowerCase()}));var f=t.data;if(\"string\"==typeof f)e.each(f.split(\"&\"),function(t,a){var n=a.split(\"=\");r.append(e(\"<input>\",{type:\"hidden\",name:n[0],value:n[1]}))});else if(e.isArray(f))e.each(f,function(t,a){r.append(e(\"<input>\",{type:\"hidden\",name:a.name,value:a.value}))});else if(\"object\"==typeof f){var o;for(o in f)r.append(e(\"<input>\",{type:\"hidden\",name:o,value:f[o]}))}e(document.body).append(r),r.submit()}", "function f(t,a){var n={url:window.location.href,push:!1,replace:!0,scrollTo:!1};return r(e.extend(n,p(t,a)))}", "_render() {}", "function p(e){var t,a,n,o,c,u=f(e);r(u)||(O.useBR?(t=document.createElementNS(\"http://www.w3.org/1999/xhtml\",\"div\"),t.innerHTML=e.innerHTML.replace(/\\n/g,\"\").replace(/<br[ \\/]*>/g,\"\\n\")):t=e,c=t.textContent,n=u?l(u,c,!0):d(c),a=i(t),a.length&&(o=document.createElementNS(\"http://www.w3.org/1999/xhtml\",\"div\"),o.innerHTML=n.value,n.value=s(a,i(o),c)),n.value=_(n.value),e.innerHTML=n.value,e.className=m(e.className,u,n.language),e.result={language:n.language,re:n.relevance},n.second_best&&(e.second_best={language:n.second_best.language,re:n.second_best.relevance}))}", "function DocNameExtract()\n{\n var currentPage;\n wholeurl = window.location.href;\n x = wholeurl.length;\n while((wholeurl.substring(x,x-1)) != \".\"){ x--; } clipend = x;\n while((wholeurl.substring(x,x-1)) != \"/\"){ x--; } clipstart = x;\n return wholeurl.substring(clipend-1,clipstart);\n \n}", "function Stack_Oliteral() {\r\n}", "function overlib_pagedefaults() {\r\n\tparseTokens('ol_', overlib_pagedefaults.arguments);\r\n}", "function twopicsBlueDouble(){\n \t//csInterface.evalScript(\"cstwopicsBlueDoublee()\");\n\n \tvar extensionPath = (csInterface.getSystemPath(SystemPath.EXTENSION)+templatePath);\n \tcsInterface.evalScript('cstwopicsBlueDoublee(' + JSON.stringify(extensionPath) + ')');\n }", "function embedhtml5(gd, mb) {\n function hd() {\n function F(a) {\n return (\"\" + a).toLowerCase()\n }\n\n function Ha(a, d) {\n if (!a)return a;\n var b = 0, f = 0, g, n = a.length, k;\n for (g = 0; g < n; g++)if (k = a.charCodeAt(g), 32 >= k)b++; else break;\n for (g = n - 1; 0 < g; g--)if (k = a.charCodeAt(g), 32 >= k)f++; else break;\n void 0 === d && (g = a.charAt(b), k = a.charAt(n - f - 1), (\"'\" == g && \"'\" == k || '\"' == g && '\"' == k) && 3 == a.split(g).length && (b++, f++));\n return a = a.slice(b, n - f)\n }\n\n function pa(a) {\n return 0 <= _[368].indexOf(String(a).toLowerCase())\n }\n\n function ga(a, d) {\n return _[523] == d ? Number(a) : _[67] == d ? pa(a) : _[13] == d ? null == a ? null : String(a) : a\n }\n\n function sa(a) {\n return Number(a).toFixed(6)\n }\n\n function ha(a, d, b, f) {\n a.__defineGetter__(d, b);\n void 0 !== f && a.__defineSetter__(d, f)\n }\n\n function va(a, d, b) {\n var f = \"_\" + d;\n a[f] = b;\n a.__defineGetter__(d, function () {\n return a[f]\n });\n a.__defineSetter__(d, function (d) {\n d = ga(d, typeof b);\n d != a[f] && (a[f] = d, a.haschanged = !0)\n })\n }\n\n function Aa(a) {\n a && a.preventDefault()\n }\n\n function R(a, d, b, f) {\n a && a.addEventListener(d, b, f)\n }\n\n function ba(a, d, b, f) {\n a && a.removeEventListener(d, b, f)\n }\n\n function Ja(a) {\n var d = aa.createElement(1 == a ? \"img\" : 2 == a ? _[486] : \"div\");\n d && 1 == a && \"off\" != Tc && (d.crossOrigin = Tc);\n return d\n }\n\n function gc(a) {\n return function () {\n return a.apply(a, arguments)\n }\n }\n\n function id(a) {\n return a.split(\"<\").join(\"&lt;\").split(\">\").join(\"&gt;\")\n }\n\n function ca(a, d) {\n var b = \"(\" + (a >> 16 & 255) + \",\" + (a >> 8 & 255) + \",\" + (a & 255);\n void 0 === d && (d = 1 - (a >> 24 & 255) / 255);\n return (1 > d ? \"rgba\" + b + \",\" + d : \"rgb\" + b) + \")\"\n }\n\n function Ed(a) {\n return a.split(\"[\").join(\"<\").split(\"<<\").join(\"[\").split(\"]\").join(\">\").split(\">>\").join(\"]\")\n }\n\n function nc(a, d) {\n a = Number(a);\n for (d = Number(d); 0 > a;)a += 360;\n for (; 360 < a;)a -= 360;\n var b = Math.abs(d - a), f = Math.abs(d - (a - 360)), g = Math.abs(d - (a + 360));\n f < b && f < g ? a -= 360 : g < b && g < f && (a += 360);\n return a\n }\n\n function Gc(a) {\n if (a) {\n var d = a.indexOf(\"?\");\n 0 <= d && (a = a.slice(0, d));\n d = a.indexOf(\"#\");\n 0 <= d && (a = a.slice(0, d))\n }\n return a\n }\n\n function Vd(a) {\n a = Gc(a);\n var d = a.lastIndexOf(\"/\"), b = a.lastIndexOf(\"\\\\\");\n b > d && (d = b);\n return a.slice(d + 1)\n }\n\n function Uc(a, d) {\n var b = String(a).charCodeAt(0);\n return 48 <= b && 57 >= b ? (la(3, d + _[154]), !1) : !0\n }\n\n function gd(a, d) {\n for (var b = \"\", f = 0, g = 1, n = 0, k = 0; 1 == g && 0 == f;) {\n var e, w = a.indexOf(\"*\", n), b = \"\";\n 0 > w ? (w = a.length, f = 1) : (b = a.indexOf(\"*\", w + 1), 0 > b && (b = a.length), e = b - (w + 1), b = a.substr(w + 1, e));\n e = w - n;\n 0 < e && d.substr(k, f ? void 0 : e) != a.substr(n, e) && (g = 0);\n n = w + 1;\n \"\" != b && (k = d.indexOf(b, k), 0 > k && (g = 0))\n }\n return !!g\n }\n\n function oc(a, d, b, f) {\n for (; 32 >= a.charCodeAt(d);)d++;\n for (; 32 >= a.charCodeAt(b - 1);)b--;\n var g = a.charCodeAt(d);\n if (37 == g)a = U(a.slice(d + 1, b), f); else if (103 == g && \"get(\" == a.slice(d, d + 4)) {\n for (d += 4; 32 >= a.charCodeAt(d);)d++;\n for (b = a.lastIndexOf(\")\"); 32 >= a.charCodeAt(b - 1);)b--;\n a = U(a.slice(d, b), f)\n } else 99 == g && \"calc(\" == a.slice(d, d + 5) ? a = U(a.slice(d, b), f) : (f = a.charCodeAt(d), 39 != f && 34 != f || f != a.charCodeAt(b - 1) || (d++, b--), a = a.slice(d, b));\n return a\n }\n\n function Vc(a) {\n var d = [];\n if (null == a || void 0 == a)return d;\n var b, f = 0, g, n, k = 0;\n a = F(a);\n g = a.length;\n for (b = 0; b < g; b++)n = a.charCodeAt(b), 40 == n ? k++ : 41 == n ? k-- : 46 == n && 0 == k && (d.push(a.slice(f, b)), f = b + 1);\n d.push(a.slice(f));\n return d\n }\n\n function Ka(a, d) {\n a = F(a);\n var b, f, g, n;\n g = Yb[a];\n null != g && void 0 !== g && \"\" != g && Zb(g, null, d);\n n = Yb.getArray();\n f = n.length;\n for (b = 0; b < f; b++)if (g = n[b])g = g[a], null != g && void 0 !== g && \"\" != g && Zb(g, null, d)\n }\n\n function I(a, d, b, f, g) {\n if (d && _[13] == typeof d) {\n var n = d.slice(0, 4);\n \"get:\" == n ? d = U(d.slice(4)) : \"calc\" == n && 58 == d.charCodeAt(4) && (d = da.calc(null, d.slice(5)))\n }\n var n = null, k, e = Vc(a);\n k = e.length;\n if (1 == k && f && (n = e[0], void 0 !== f[n])) {\n f[n] = _[67] == typeof f[n] ? pa(d) : d;\n return\n }\n var w = m, n = null;\n 1 < k && (n = e[k - 1]);\n for (a = 0; a < k; a++) {\n var x = e[a], v = a == k - 1, r = null, y = x.indexOf(\"[\");\n 0 < y && (r = oc(x, y + 1, x.length - 1, f), x = x.slice(0, y));\n y = !1;\n if (void 0 === w[x]) {\n if (b)break;\n v || (null == r ? w[x] = new Fb : (w[x] = new bb(Fb), y = !0))\n } else y = !0;\n if (y && 0 == v && w[x] && 1 == w[x].isArray && null != r)if (v = null, w = w[x], v = b ? w.getItem(r) : w.createItem(r)) {\n if (a == k - 2 && \"name\" == n) {\n d = F(d);\n r != d && (null == d || \"null\" == d || \"\" == d ? w.removeItem(r) : w.renameItem(r, d));\n break\n }\n w = v;\n continue\n } else break;\n if (v)w[x] = 1 == g ? d : ga(d, typeof w[x]); else if (w = w[x], null == w)break\n }\n }\n\n function Wd(a) {\n if (a && \"null\" != a) {\n if (_[13] == typeof a) {\n var d = a.split(\"&\"), b = d.length, f;\n a = {};\n for (f = 0; f < b; f++) {\n var g = d[f].split(\"=\");\n a[g[0]] = g[1]\n }\n }\n for (var n in a)\"xml\" != n && I(n, a[n])\n }\n }\n\n function U(a, d, b) {\n if (a && \"calc(\" == (\"\" + a).slice(0, 5))return da.calc(null, a.slice(5, a.lastIndexOf(\")\")));\n var f, g, n = Vc(a);\n f = n.length;\n if (1 == f && _[307] == n[0])return d ? d._type + \"[\" + d.name + \"]\" : \"\";\n if (1 == f && d && (g = n[0], d.hasOwnProperty(g)))return d[g];\n var k = m;\n for (a = 0; a < f; a++) {\n g = n[a];\n var e = a == f - 1, w = null, x = g.indexOf(\"[\");\n 0 < x && (w = oc(g, x + 1, g.length - 1, d), g = g.slice(0, x));\n if (k && void 0 !== k[g]) {\n if (null != w && (x = k[g]) && x.isArray)if (g = x.getItem(w)) {\n if (e)return g;\n k = g;\n continue\n } else break;\n if (e)return k[g];\n k = k[g]\n } else break\n }\n return !0 === b ? void 0 : null\n }\n\n function Zb(a, d, b) {\n da.callaction(a, d, b)\n }\n\n function hd(a, d, b) {\n Zb(a, d ? U(d) : null, b ? pa(b) : null)\n }\n\n function la(a, d) {\n !jd && (0 < a || m.debugmode) && (d = [\"DEBUG\", \"INFO\", _[458], \"ERROR\", _[367]][a] + \": \" + d, V.log(d), 2 < a && m.showerrors && setTimeout(function () {\n try {\n V.showlog(!0)\n } catch (a) {\n }\n }, 500))\n }\n\n function Ea(a, d) {\n if (!jd) {\n a = \"\" + a;\n var E = 0 < F(a).indexOf(\"load\");\n a = id(a).split(\"[br]\").join(\"<br/>\");\n var f = xa.createItem(_[424]), g = xa.createItem(_[425]);\n f.sprite || (f.create(), V.controllayer.appendChild(f.sprite));\n g.sprite || (g.create(), V.controllayer.appendChild(g.sprite));\n var n;\n f.loaded = !0;\n f.align = _[66];\n f.width = \"100%\";\n f.height = \"100%\";\n f.alpha = .5;\n f.keep = !0;\n n = f.sprite.style;\n n.backgroundColor = _[26];\n n.zIndex = 99999998;\n E && (g.visible = !1);\n g.loaded = !0;\n g.align = _[136];\n g.y = 0;\n g.width = \"105%\";\n var k = b.ie || b.android ? -2 : 2;\n g.height = k + 46 / X;\n g.keep = !0;\n n = g.sprite.style;\n n.backgroundColor = _[26];\n n.color = _[40];\n n.fontFamily = b.realDesktop && !b.ie ? _[55] : _[38];\n n.fontSize = \"12px\";\n n.margin = \"-2px\";\n n.border = _[239];\n d || (d = _[291]);\n g.sprite.innerHTML = _[166] + d + \"<br/>\" + a + _[298];\n n.zIndex = 99999999;\n n[pc] = _[203];\n g.jsplugin = {\n onresize: function (a, d) {\n var b = g.sprite.childNodes[0].clientHeight;\n g.height = k + Math.max(46, b) / X;\n 0 >= b && (g.imageheight = 1)\n }\n };\n f.updatepos();\n g.updatepos();\n E && setTimeout(function () {\n try {\n g.visible = !0\n } catch (a) {\n }\n }, 500)\n }\n }\n\n function ve() {\n Xa.removeelements(!0);\n Xd.stop();\n Pa.unregister();\n Oa.unload();\n V.remove()\n }\n\n function we() {\n this.caller = this.args = this.cmd = null;\n this.breakable = !1\n }\n\n function Gb(a, d, b) {\n if (null == a || \"\" == a)return null;\n for (var f = 0, g = 0, n = 0, k = 0, e = 0, w = 0, x = 0, v = 0, r = \"\", r = 0; ;)\n if (r = a.charCodeAt(e), 0 < r && 32 >= r)\n e++;\n else\n break;\n\n //sohow_base64\n for (var y = [], g = a.length, f = e; f < g; f++)\n if (r = a.charCodeAt(f), 0 == v && 0 == x && 40 == r)\n n++;\n else if (0 == v && 0 == x && 41 == r) {\n if (k++, n == k) {\n w = f + 1;\n r = a.slice(e, w);\n y.push(r);\n for (e = w; ;)if (r = a.charCodeAt(e), 0 < r && 32 >= r)e++; else break;\n r = a.charCodeAt(e);\n if (59 != r) {\n w = g;\n break\n }\n for (e++; ;)if (r = a.charCodeAt(e), 59 == r || 0 < r && 32 >= r)e++; else break;\n f = e\n }\n }\n else\n 34 == r ? 0 == x ? x = 1 : 1 == x && (x = 0) : 39 == r ? 0 == x ? x = 2 : 2 == x && (x = 0) : 91 == r && 0 == x ? v++ : 93 == r && 0 == x && v--;\n\n\n w != g && (r = a.slice(e, g), 0 < r.length && y.push(r));\n a = null;\n g = y.length;\n for (f = 0; f < g; f++) {\n r = y[f];\n x = r.indexOf(\"[\");\n k = r.indexOf(\"]\");\n n = r.indexOf(\"(\");\n 0 < x && 0 < k && n > x && n < k && (n = r.indexOf(\"(\", k));\n e = k = null;\n 0 < n ? (k = r.slice(0, n), e = Ha(r.slice(n + 1, r.lastIndexOf(\")\")), !1), 0 >= e.length && (e = null)) : (k = r, e = null);\n k = Ha(k);\n w = [];\n if (null != e) {\n var l, v = e.length, n = 0, u = -1, h = -1, c = x = 0, r = null;\n for (l = 0; l < v; l++)\n r = e.charCodeAt(l),\n 0 == x && 40 == r ? n++ : 0 == x && 41 == r ? n-- : 34 == r ? 1 == x && 0 <= u ? (u = -1, x = 0) : 0 == x && (u = l, x = 1) : 39 == r && (2 == x && 0 <= h ? (h = -1, x = 0) : 0 == x && (h = l, x = 2)),\n 44 == r && 0 == n && 0 == x && (r = Ha(e.slice(c, l)), (r != \"data:image/png;base64\") && (w.push(r),c = l + 1));\n\n 0 == n && (r = Ha(e.slice(c, l)), w.push(r))\n }\n null == a && (a = []);\n n = new we;\n n.cmd = b ? k : F(k);\n n.args = w;\n n.caller = d;\n a.push(n)\n }\n return a\n }\n\n function Hb() {\n this.z = this.y = this.x = 0\n }\n\n function Ma() {\n var a = _[111] !== typeof Float32Array ? new Float32Array(16) : Array(16);\n a[0] = a[5] = a[10] = a[15] = 1;\n a[1] = a[2] = a[3] = a[4] = a[6] = a[7] = a[8] = a[9] = a[11] = a[12] = a[13] = a[14] = 0;\n return a\n }\n\n function xe(a, d, b, f, g, n, k, e, w, x, v, r, y, l, u, h, c) {\n a[0] = d;\n a[1] = b;\n a[2] = f;\n a[3] = g;\n a[4] = n;\n a[5] = k;\n a[6] = e;\n a[7] = w;\n a[8] = x;\n a[9] = v;\n a[10] = r;\n a[11] = y;\n a[12] = l;\n a[13] = u;\n a[14] = h;\n a[15] = c\n }\n\n function Hc(a, d, b, f, g, n, k, e, w, x) {\n a[0] = d;\n a[1] = b;\n a[2] = f;\n a[3] = 0;\n a[4] = g;\n a[5] = n;\n a[6] = k;\n a[7] = 0;\n a[8] = e;\n a[9] = w;\n a[10] = x;\n a[11] = 0;\n a[12] = 0;\n a[13] = 0;\n a[14] = 0;\n a[15] = 1\n }\n\n function kd(a, d) {\n a[0] = d[0];\n a[1] = d[1];\n a[2] = d[2];\n a[3] = d[3];\n a[4] = d[4];\n a[5] = d[5];\n a[6] = d[6];\n a[7] = d[7];\n a[8] = d[8];\n a[9] = d[9];\n a[10] = d[10];\n a[11] = d[11];\n a[12] = d[12];\n a[13] = d[13];\n a[14] = d[14];\n a[15] = d[15]\n }\n\n function Ic(a, d) {\n var b = d[0], f = d[1], g = d[2], n = d[3], k = d[4], e = d[5], w = d[6], x = d[7], v = d[8], r = d[9], y = d[10], l = d[11], u = d[12], h = d[13], c = d[14], m = d[15], D = a[0], z = a[1], q = a[2], J = a[3];\n a[0] = D * b + z * k + q * v + J * u;\n a[1] = D * f + z * e + q * r + J * h;\n a[2] = D * g + z * w + q * y + J * c;\n a[3] = D * n + z * x + q * l + J * m;\n D = a[4];\n z = a[5];\n q = a[6];\n J = a[7];\n a[4] = D * b + z * k + q * v + J * u;\n a[5] = D * f + z * e + q * r + J * h;\n a[6] = D * g + z * w + q * y + J * c;\n a[7] = D * n + z * x + q * l + J * m;\n D = a[8];\n z = a[9];\n q = a[10];\n J = a[11];\n a[8] = D * b + z * k + q * v + J * u;\n a[9] = D * f + z * e + q * r + J * h;\n a[10] = D * g + z * w + q * y + J * c;\n a[11] = D * n + z * x + q * l + J * m;\n D = a[12];\n z = a[13];\n q = a[14];\n J = a[15];\n a[12] = D * b + z * k + q * v + J * u;\n a[13] = D * f + z * e + q * r + J * h;\n a[14] = D * g + z * w + q * y + J * c;\n a[15] = D * n + z * x + q * l + J * m\n }\n\n function ef(a, d) {\n var b = a[0], f = a[1], g = a[2], n = a[3], k = a[4], e = a[5], w = a[6], x = a[7], v = a[8], r = a[9], y = a[10], l = a[11], u = a[12], h = a[13], c = a[14], m = a[15], D = d[0], z = d[1], q = d[2], J = d[3], C = d[4], Q = d[5], A = d[6], H = d[7], qa = d[8], ea = d[9], Ca = d[10], S = d[11], p = d[12], B = d[13], t = d[14], G = d[15];\n a[0] = D * b + z * k + q * v + J * u;\n a[1] = D * f + z * e + q * r + J * h;\n a[2] = D * g + z * w + q * y + J * c;\n a[3] = D * n + z * x + q * l + J * m;\n a[4] = C * b + Q * k + A * v + H * u;\n a[5] = C * f + Q * e + A * r + H * h;\n a[6] = C * g + Q * w + A * y + H * c;\n a[7] = C * n + Q * x + A * l + H * m;\n a[8] = qa * b + ea * k + Ca * v + S * u;\n a[9] = qa * f + ea * e + Ca * r + S * h;\n a[10] = qa * g + ea * w + Ca * y + S * c;\n a[11] = qa * n + ea * x + Ca * l + S * m;\n a[12] = p * b + B * k + t * v + G * u;\n a[13] = p * f + B * e + t * r + G * h;\n a[14] = p * g + B * w + t * y + G * c;\n a[15] = p * n + B * x + t * l + G * m\n }\n\n function ye(a, d, b, f) {\n xe(a, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, d, b, f, 1)\n }\n\n function Yd(a, d, b, f) {\n var g, n, k;\n g = b * Y;\n b = Math.cos(g);\n n = Math.sin(g);\n g = -(d - 90) * Y;\n d = Math.cos(g);\n k = Math.sin(g);\n g = -f * Y;\n f = Math.cos(g);\n g = Math.sin(g);\n Hc(a, d * f - k * n * g, d * g + k * n * f, -k * b, -b * g, b * f, n, k * f + d * n * g, k * g - d * n * f, d * b)\n }\n\n function Zd(a, d) {\n var b = d[0], f = d[1], g = d[2], n = d[4], k = d[5], e = d[6], w = d[8], x = d[9], v = d[10], r = 1 / (b * k * v + f * e * w + n * x * g - w * k * g - n * f * v - x * e * b);\n Hc(a, (k * v - x * e) * r, (-f * v + x * g) * r, (f * e - k * g) * r, (-n * v + w * e) * r, (b * v - w * g) * r, (-b * e + n * g) * r, (n * x - w * k) * r, (-b * x + w * f) * r, (b * k - n * f) * r)\n }\n\n function nb(a, d) {\n var b = d.x, f = d.y, g = d.z;\n d.x = b * a[0] + f * a[4] + g * a[8];\n d.y = b * a[1] + f * a[5] + g * a[9];\n d.z = b * a[2] + f * a[6] + g * a[10]\n }\n\n function Fd(a, d) {\n var b = d[0], f = d[1], g = d[2];\n d[0] = b * a[0] + f * a[4] + g * a[8];\n d[1] = b * a[1] + f * a[5] + g * a[9];\n d[2] = b * a[2] + f * a[6] + g * a[10]\n }\n\n function Jc(a) {\n \"\" != a.loader.src && (a.loader = Ja(1), a.loader.kobject = a)\n }\n\n function hc(a) {\n return b.fractionalscaling ? Math.round(a * (b.pixelratio + 1E-7)) / b.pixelratio : Math.round(a)\n }\n\n function Ib(a, d, b, f) {\n a = (\"\" + a).split(b);\n f = f ? f : [0, 0, 0, 0];\n b = a.length;\n 4 == b ? (f[0] = a[0] * d + .5 | 0, f[1] = a[1] * d + .5 | 0, f[2] = a[2] * d + .5 | 0, f[3] = a[3] * d + .5 | 0) : 3 == b ? (f[0] = a[0] * d + .5 | 0, f[1] = f[3] = a[1] * d + .5 | 0, f[2] = a[2] * d + .5 | 0) : 2 == b ? (f[0] = f[2] = a[0] * d + .5 | 0, f[1] = f[3] = a[1] * d + .5 | 0) : f[0] = f[1] = f[2] = f[3] = a[0] * d + .5 | 0;\n return f\n }\n\n function Gd(a) {\n var d = a && a._poly;\n d && (d.setAttribute(\"fill\", !0 === a.polyline ? \"none\" : ca(a.fillcolor, a.fillalpha)), d.setAttribute(_[510], ca(a.bordercolor, a.borderalpha)), d.setAttribute(_[312], a.borderwidth * X))\n }\n\n function ze(a) {\n var d = p.r_rmatrix, b = p.r_zoom, f = p.r_zoff, g = .5 * Qa, n = .5 * ya + p.r_yoff, k = p._stereographic ? 10 - f : 1 - f * (1 - Math.min(p.fisheye * p.fisheye, 1)), e = a._poly;\n if (!e) {\n var w = V.svglayer;\n w || (w = document.createElementNS(_[77], \"svg\"), w.setAttribute(_[49], \"100%\"), w.setAttribute(_[28], \"100%\"), w.style.position = _[0], w.style.left = 0, w.style.top = 0, w.style.display = ja.stereo ? \"none\" : \"\", V.svglayer = w, V.hotspotlayer.appendChild(w));\n e = document.createElementNS(_[77], pa(a.polyline) ? _[121] : _[444]);\n w.appendChild(e);\n e.kobject = a;\n a._poly = e;\n Gd(a);\n e.style.opacity = Number(a._alpha) * (a.keep ? 1 : qc);\n a._assignEvents(e);\n setTimeout(function () {\n a.loading = !1;\n a.loaded = !0;\n da.callaction(a.onloaded, a)\n }, 7)\n }\n var w = a.point.getArray(), x = w.length, v = [];\n if (1 < x && a._visible && 0 == ja.stereo) {\n var r, y, l, u = new Hb, h = new Hb, c;\n y = w[x - 1];\n l = (180 - Number(y.ath)) * Y;\n y = Number(y.atv) * Y;\n u.x = 1E3 * Math.cos(y) * Math.cos(l);\n u.z = 1E3 * Math.cos(y) * Math.sin(l);\n u.y = 1E3 * Math.sin(y);\n nb(d, u);\n for (r = 0; r < x; r++)y = w[r], l = (180 - Number(y.ath)) * Y, y = Number(y.atv) * Y, h.x = 1E3 * Math.cos(y) * Math.cos(l), h.z = 1E3 * Math.cos(y) * Math.sin(l), h.y = 1E3 * Math.sin(y), nb(d, h), h.z >= k ? (u.z >= k || (c = (k - u.z) / (h.z - u.z), y = b / (k + f), l = (u.x + (h.x - u.x) * c) * y + g, y = (u.y + (h.y - u.y) * c) * y + n, v.push(l.toFixed(2) + \",\" + y.toFixed(2))), y = b / (h.z + f), l = h.x * y + g, y = h.y * y + n, v.push(l.toFixed(2) + \",\" + y.toFixed(2))) : u.z >= k && (c = (k - h.z) / (u.z - h.z), y = b / (k + f), l = (h.x + (u.x - h.x) * c) * y + g, y = (h.y + (u.y - h.y) * c) * y + n, v.push(l.toFixed(2) + \",\" + y.toFixed(2))), u.x = h.x, u.y = h.y, u.z = h.z;\n 0 == a.polyline && 2 < v.length && v.push(v[0]);\n e.style.pointerEvents = a._enabled ? _[264] : \"none\";\n e.style.cursor = a._handcursor ? _[18] : _[5];\n e.style.visibility = a._visible ? _[12] : _[6]\n }\n e.setAttribute(_[506], v.join(\" \"))\n }\n\n function Ae(a, d) {\n if (a && d) {\n var b = a.zorder, f = d.zorder;\n if (b < f)return -1;\n if (b > f)return 1\n }\n return 0\n }\n\n function ob(a, d) {\n if (Wc) {\n var E = Ua.getArray();\n E.sort(Ae);\n var f = E.length, g;\n for (g = 0; g < f; g++) {\n var n = E[g];\n n && (n.index = g)\n }\n Wc = !1\n }\n var E = Ua.getArray(), f = E.length, k;\n g = p.r_rmatrix;\n var n = Qa, e = ya, w = X, x = .5 * n, v = .5 * e, r = p.r_zoom, y = p.r_hlookat, l = p.r_vlookat, u = p.r_vlookatA, h = p.r_yoff, c = p.r_zoff, m = p._camroll;\n k = p._stereographic;\n var D;\n D = 1 * (1 + c / 1E3);\n var z = 50;\n 0 < c && (k ? z -= c : (z = 20 - c, -125 > z && (z = -125)));\n var q = 0, J = 0;\n k = 0;\n void 0 !== d && (k = d, f = k + 1);\n var C = ic, Q = b.realDesktop && 250 > r ? 1.5 : 0, A = ub;\n ub = !1;\n var H = Be, qa = Ce;\n H[1] = x;\n H[5] = $d;\n H[9] = sa(y);\n H[15] = C + \",\" + C + \",\" + C;\n for (var ea = ib, Ca = new Hb, S = (\"\" + ja.hotspotrenderer).toLowerCase(), S = b.webgl && _[30] == S && \"both\" != S || ja.stereo, Z = null; k < f; k++) {\n var B = E[k];\n if (B && (Z = B.sprite))if (Z = Z.style, S)\"none\" != Z.display && (Z.display = \"none\"); else {\n B._GL_onDestroy && (B._GL_onDestroy(), B.GL = null);\n if (A = !0, B.sprite)A = Number(B._alpha) * (B.keep ? 1 : qc), Z.opacity = A, B._poly && (B._poly.style.opacity = A);\n A = a || B.poschanged || B.forceupdate;\n if (null == B._url && 0 < B.point.count && A)ze(B), B.poschanged = !1; else if (B._visible && B.loaded && A) {\n B.poschanged = !1;\n A = Number(B._flying);\n q = (1 - A) * Number(B._ath);\n J = (1 - A) * Number(B._atv);\n 0 < A && (q += A * nc(y, B._ath), J += A * nc(l, B._atv));\n var t = !1, G = (180 - q) * Y, Ba = J * Y;\n Ca.x = 1E3 * Math.cos(Ba) * Math.cos(G);\n Ca.z = 1E3 * Math.cos(Ba) * Math.sin(G);\n Ca.y = 1E3 * Math.sin(Ba);\n nb(g, Ca);\n var P = !1, Fa = Ca.x, wa = Ca.y, G = Ca.z;\n if (G >= z - c)var ta = r / (G + c), Fa = Fa * ta, wa = wa * ta + h, P = 8E3 > Math.abs(Fa) && 8E3 > Math.abs(wa), Fa = Fa + x, wa = wa + v;\n if (B._distorted) {\n Z.pointerEvents = 50 <= G + c && B._enabled ? \"auto\" : \"none\";\n t = !0;\n G = (Ba = B._scale) ? B._scale : 1;\n B._hszscale = G;\n 1 == B.scaleflying && (G = G * (1 - A) + G / (r / (e / 2)) * D * A);\n B._scale = 1;\n B.updatepluginpos();\n B._scale = Ba;\n var W = B.pixelwidth, F = B.pixelheight, Da = Ba = 1;\n B._use_css_scale && (Ba = W / B.imagewidth, Da = F / B.imageheight);\n var L = .5 * -F, Va = String(B._edge), Fa = wa = 0, O = B._oxpix, $b = B._oypix, wa = wa + .5 * -W / Ba, Fa = Fa + L / Da;\n 0 <= Va.indexOf(\"left\") ? wa += +W / 2 / Ba : 0 <= Va.indexOf(_[3]) && (wa += -W / 2 / Ba);\n 0 <= Va.indexOf(\"top\") ? Fa += +F / 2 / Da : 0 <= Va.indexOf(_[2]) && (Fa += -F / 2 / Da);\n F = -500;\n W = B._deepscale;\n Va = B._depth;\n isNaN(Va) && (Va = 1E3);\n L = 1;\n 0 == (Va | 0) ? (F = 0, W = 1) : L = 1E3 / Va;\n 2 == Nb && (W *= 15);\n W /= 1 + A + Q;\n if (b.firefox || 6 < b.iosversion && .1 > B.scale)W = 10 / (1 + A);\n 0 < c && (W = 1);\n G = G * W * L;\n F *= W;\n O = O * W * L;\n $b = $b * W * L;\n if (0 < c || b.firefox)t = P;\n P = W * L * C / 2;\n P = _[274] + P * B.tx + \"px,\" + P * B.ty + \"px,\" + -P * B.tz + \"px) \";\n H[3] = sa(v + h * (1 - A));\n H[7] = sa(-(u * (1 - A) + l * A));\n H[11] = P + _[125] + sa(-q);\n H[13] = sa(J);\n H[17] = F;\n H[19] = sa(B._rotate + A * m);\n H[21] = O;\n H[23] = $b;\n B.inverserotation ? (H[25] = \"Y(\" + sa(B.ry), H[27] = \"X(\" + sa(B.rx), H[29] = \"Z(\" + sa(-B.rz)) : (H[25] = \"Z(\" + sa(B.rz), H[27] = \"X(\" + sa(-B.rx), H[29] = \"Y(\" + sa(-B.ry));\n H[31] = G * Ba;\n H[33] = G * Da;\n H[35] = wa;\n H[37] = Fa;\n Z[ea] = H.join(\"\")\n } else if (G >= z && (G = 1, P)) {\n if (B.zoom || B.distorted)G *= Number(2 * (1 - A) * ta + A * X) / X;\n B.updatepluginpos();\n W = B.pixelwidth;\n F = B.pixelheight;\n Da = Ba = 1;\n B._use_css_scale && (Ba = W / B.imagewidth, Da = F / B.imageheight);\n q = Fa;\n J = wa;\n 0 == B.accuracy && (q = Math.round(q), J = Math.round(J));\n Va = String(B._edge);\n Fa = wa = 0;\n O = B._oxpix * G;\n $b = B._oypix * G;\n 0 <= Va.indexOf(\"left\") ? wa += +W / 2 / Ba : 0 <= Va.indexOf(_[3]) && (wa += -W / 2 / Ba);\n 0 <= Va.indexOf(\"top\") ? Fa += +F / 2 / Da : 0 <= Va.indexOf(_[2]) && (Fa += -F / 2 / Da);\n P = 2 * G * (Math.max(W, F) * B._scale + Math.max(O, $b));\n if (0 < q + P || 0 < J + P || q - P < n || J - P < e)B._use_css_scale ? G *= w : (W *= w, F *= w, wa *= w, Fa *= w), t = -(W / Ba) / 2, P = -(F / Da) / 2, B._istextfield && 0 == B.accuracy && (q |= 0, J |= 0, t |= 0, P |= 0, O |= 0, $b |= 0, wa |= 0, Fa |= 0), qa[1] = sa(q), qa[3] = sa(J), qa[5] = sa(t), qa[7] = sa(P), qa[9] = sa(B._rotate - m * (1 - A)), qa[11] = O, qa[13] = $b, qa[15] = G * Ba, qa[17] = G * Da, qa[19] = sa(wa), qa[21] = sa(Fa), A = qa.join(\"\"), A = Kc && 2 > Nb && .5 < Number(B.zorder2) ? _[325] + (999999999E3 + B._zdeep) + \"px) \" + A : _[263] + A, Z[ib] = A, t = !0\n }\n 0 == B.forceupdate && (A = t ? \"\" : \"none\", A != Z.display && (Z.display = A));\n B.forceupdate = !1\n }\n }\n }\n }\n\n function De(a, d, E, f) {\n function g() {\n var c = Ja(), C = c.style;\n C.marginTop = C.marginBottom = l[17] * p + \"px\";\n C.height = \"1px\";\n C.backgroundColor = ca(l[18]);\n \"none\" != l[19] && (C.borderBottom = _[350] + ca(l[19]));\n D.appendChild(c)\n }\n\n function n(c) {\n var C = c.changedTouches;\n return (C && 0 < C.length ? C[0] : c).pageY\n }\n\n function k(C, a, d) {\n var Q = Ja(), A = Q.style;\n A.padding = l[20] * p + \"px\";\n A.border = l[21] + _[23] + ca(l[22]);\n A.borderRadius = l[23] * p + \"px\";\n A.marginTop = l[24] * p + \"px\";\n A.marginBottom = l[24] * p + \"px\";\n b.androidstock && (A[_[76]] = _[36]);\n Pa.touch && R(Q, b.browser.events.touchstart, function (C) {\n function A(C) {\n C = n(C) - H;\n if (h > ya) {\n var a = v + C | 0;\n a < ya - h - 10 ? a = ya - h - 10 : 10 < a && (a = 10);\n c.style.top = a + \"px\"\n }\n 15 < Math.abs(C) && (Q.onmouseout(), r = !0)\n }\n\n function t() {\n ba(L, qa, A, !0);\n ba(L, g, t, !0);\n if (0 == r)Q.onclick()\n }\n\n Aa(C);\n C.stopPropagation();\n if (d && a) {\n Q.onmouseover();\n var H = n(C), v = parseInt(c.style.top) | 0, r = !1, qa = b.browser.events.touchmove, g = b.browser.events.touchend;\n R(L, qa, A, !0);\n R(L, g, t, !0)\n }\n }, !0);\n d && a ? (A.cursor = _[18], Q.onmousedown = function (c) {\n c.stopPropagation()\n }, Q.onmouseover = function () {\n A = this.style;\n A.background = ca(l[25]);\n A.border = l[21] + _[23] + ca(l[26]);\n A.color = ca(l[27])\n }, Q.onmouseout = function () {\n A = this.style;\n A.background = \"none\";\n A.border = l[21] + _[23] + ca(l[22]);\n A.color = ca(l[4])\n }, Q.oncontextmenu = function (c) {\n Aa(c);\n c.stopPropagation();\n Q.onclick()\n }, Q.onclick = function (C) {\n f ? (A = c.style, A.opacity = 1, A.transition = _[98], A.opacity = 0, setTimeout(E, 300)) : E();\n da.callaction(d)\n }) : (0 == a && (A.color = ca(l[5])), A.cursor = _[5]);\n var H = Ja();\n H.style.marginLeft = l[28] * p + \"px\";\n H.style.marginRight = l[29] * p + \"px\";\n H.innerHTML = C;\n Q.appendChild(H);\n D.appendChild(Q);\n return H\n }\n\n function e() {\n function c() {\n return .4 > Math.random() ? \" \" : _[139]\n }\n\n var C = k(\"About\" + c() + \"the\" + c() + _[46] + c() + _[414] + c() + _[385], !0, function () {\n da.openurl(_[220])\n });\n try {\n (new MutationObserver(function (c) {\n c = L.getComputedStyle(C);\n 9 > Math.min(parseInt(c.width) | 0, parseInt(c.height) | 0) && (m = {}, Ea(_[97]))\n })).observe(C, {attributes: !1, childList: !0, characterData: !0, subtree: !0})\n } catch (a) {\n }\n }\n\n function w() {\n k(V.fullscreen ? y.exitfs : y.enterfs, !0, function () {\n m.fullscreen = !m.fullscreen\n })\n }\n\n function x() {\n var c = b.android, C = b.infoString, C = C.split(_[431]).join(\"\");\n k((qa ? \"\" : _[128] + m.version + _[240] + m.build + _[261]) + (c ? _[481] : \"\") + C + Oa.infoString + (c ? _[443] : \"\"), !0, null)\n }\n\n function v() {\n Na && Na[2] && k(Na[2], !0, function () {\n da.openurl(Na[3])\n })\n }\n\n function r() {\n var C = c.getBoundingClientRect(), b = C.width, C = C.height, Q = d;\n if (0 < b && 0 < C) {\n h = C;\n f && (a -= b >> 1, a + b > Qa && (a = Qa - b - 10), 10 > a && (a = 10));\n for (; a + b > Qa;)a -= b / 2;\n 0 > a && (a = 0);\n d + C > ya && (d = f ? ya - C - 10 : d - C);\n 0 > d && (f ? d = ya - C >> 1 : Q > ya / 2 ? (d = Q - C, 0 > d && (d = 4)) : (d = Q, d + C > ya && (d = ya - 4 - C)));\n u = c.style;\n u.left = (a | 0) + \"px\";\n u.top = (d | 0) + \"px\";\n f && (u.transition = _[98], u.opacity = 1)\n } else 10 > ++B && setTimeout(r, 32)\n }\n\n var y = m.contextmenu;\n if (f && 0 == y.touch)return null;\n var l = null;\n y.customstyle && (_[109] == b.browser.domain || 0 == b.realDesktop || b.realDesktop && 0 != (Ya & 16)) && (l = F(y.customstyle).split(\"|\"), 30 != l.length && (l = null));\n null == l && (l = (b.mac ? \"default|14|default|0xFFFFFF|0x000000|0xBBBBBB|0|0|5|2|2|8|0x66000000|0|0|1|4|5|0xEEEEEE|none|1|0|0|0|3|0xEEEEEE|0|0|20|12\" : b.desktop ? \"default|default|150%|0xFFFFFF|0x000000|0xBBBBBB|1|0xBBBBBB|0|2|2|8|0x66000000|0|0|2|2|5|0xE0E0E0|none|4|0|0|0|3|0xEEEEEE|0|0|18|12\" : \"Helvetica|16|default|0x55000000|0xFFFFFF|0x555555|1|0xFFFFFF|8|0|0|8|0x44000000|0|0|4|4|6|0x555555|none|4|0|0|0|3|0xEEEEEE|0|0|12|12\").split(\"|\"));\n var u = null, h = 0, c = Ja();\n c.onselectstart = _[266];\n b.desktop && b.chrome && (c.style.opacity = .999);\n if (b.linux || b.android)l[1] = 12;\n u = c.style;\n u.position = _[0];\n u.zIndex = 99999999999;\n var p = 1;\n b.androidstock ? p = b.pixelratio : b.chrome && 40 > b.chromeversion && (u[ib] = _[20]);\n _[5] != l[0] ? u.fontFamily = l[0] : b.ios ? (u.fontFamily = _[38], u.fontWeight = _[484], _[5] == l[1] && (l[1] = 14)) : u.font = \"menu\";\n _[5] != l[1] && (u.fontSize = l[1] * p * (b.android ? 1.2 : 1) + \"px\");\n _[5] != l[2] && (u.lineHeight = l[2]);\n u.background = ca(l[3]);\n u.color = ca(l[4]);\n u.border = l[6] + _[23] + ca(l[7]);\n u.borderRadius = l[8] * p + \"px\";\n u.minWidth = \"150px\";\n u.textAlign = \"left\";\n u[pc] = l[9] + \"px \" + l[10] + \"px \" + l[11] + \"px \" + ca(l[12]);\n var D = Ja(), u = D.style;\n u.border = l[13] + _[23] + ca(l[14]);\n u.paddingTop = l[15] * p + \"px\";\n u.paddingBottom = l[16] * p + \"px\";\n Pa.touch && R(D, b.browser.events.touchstart, function (c) {\n Aa(c);\n c.stopPropagation()\n }, !1);\n c.appendChild(D);\n var z = y.item.getArray(), q, J, C = 0, Q, A = z.length, H, qa = 0 != (Ya & 16), ea = qa, Ca = qa, S = !1, Z = !1;\n for (H = 0; H < A; H++)if (q = z[H])if (J = q.caption)J = Ed(unescape(J)), q.separator && 0 < C && g(), Q = F(J), _[46] == Q ? 0 == ea && (ea = !0, e(), C++) : Na && _[430] == Q ? 0 == Ca && (Ca = !0, v(), C++) : _[110] == Q ? (S = !0, b.fullscreensupport && (w(), C++)) : _[334] == Q ? (Z = !0, x(), C++) : (Q = q.visible && (!q.showif || da.calc(null, q.showif))) ? (k(J, q.enabled, q.onclick), C++) : 0 == Q && q.separator && 0 < C && D.removeChild(D.lastChild);\n Na && 0 == Ca && (0 < C && (g(), C = 0), v());\n 0 == ea && (0 < C && g(), e(), C++);\n 0 == S && 1 == y.fullscreen && b.fullscreensupport && (w(), C++);\n 0 == Z && 1 == y.versioninfo && (0 < C && g(), x(), C++);\n if (0 == C)return null;\n u = c.style;\n u.left = _[122];\n u.top = \"10px\";\n var B = 0;\n f && (u.opacity = 0);\n setTimeout(r, 16);\n return c\n }\n\n function qf() {\n function a(a, d, b) {\n a.__defineGetter__(d, b)\n }\n\n m = new Fb;\n m.set = I;\n m.get = U;\n m.call = Zb;\n m.trace = la;\n m[\"true\"] = !0;\n m[_[31]] = !1;\n m.strict = !1;\n m.version = _[432];\n m.build = _[348];\n m.buildversion = m.version;\n m.debugmode = !1;\n m.tweentypes = ac;\n m.basedir = _[349];\n m.showtext = function () {\n };\n m.bgcolor = 0;\n m[rc[0]] = m[rc[1]] = !0;\n m.haveexternalinterface = !0;\n m.havenetworkaccess = !0;\n m.device = b;\n m.browser = b.browser;\n m._have_top_access = b.topAccess;\n m._isrealdesktop = b.realDesktop;\n m.iosversion = b.iosversion;\n m.isphone = b.iphone;\n m.ispad = b.ipad;\n m.isandroid = b.android;\n m.ishtml5 = !0;\n m.isflash = !1;\n m.ismobile = b.mobile;\n m.istablet = b.tablet;\n m.isdesktop = b.desktop;\n m.istouchdevice = b.touchdevice;\n m.isgesturedevice = b.gesturedevice;\n a(m, _[351], function () {\n return bc / X\n });\n a(m, _[326], function () {\n return vb / X\n });\n ha(m, _[352], function () {\n return X\n }, function (a) {\n a = Number(a);\n isNaN(a) && (a = 1);\n 1E-4 < Math.abs(a - X) && (X = a, V.onResize(null, !0))\n });\n pb = m.area = new rf;\n m.wheeldelta = 0;\n m.wheeldelta_raw = Number.NaN;\n m.wheeldelta_touchscale = 0;\n m.keycode = 0;\n m.idletime = .5;\n m.__defineGetter__(_[397], Ta);\n m.__defineGetter__(_[500], Math.random);\n ha(m, _[110], function () {\n return V.fullscreen\n }, function (a) {\n V.setFullscreen(pa(a))\n });\n ha(m, _[389], function () {\n return ra.swfpath\n }, function (a) {\n ra.swfpath = a\n });\n m.hlookat_moveforce = 0;\n m.vlookat_moveforce = 0;\n m.fov_moveforce = 0;\n m.multireslevel = 0;\n m.lockmultireslevel = \"-1\";\n m.downloadlockedlevel = !1;\n O = m.mouse = {};\n O.down = !1;\n O.up = !1;\n O.moved = !1;\n O.downx = 0;\n O.downy = 0;\n O.x = 0;\n O.y = 0;\n a(O, _[495], function () {\n return O.x + pb.pixelx\n });\n a(O, _[493], function () {\n return O.y + pb.pixely\n });\n a(O, \"dd\", function () {\n var a = O.x - O.downx, d = O.y - O.downy;\n return Math.sqrt(a * a + d * d)\n });\n p = m.view = new sf;\n m.screentosphere = p.screentosphere;\n m.spheretoscreen = p.spheretoscreen;\n m.loadFile = ra.loadfile;\n m.decodeLicense = ra.decodeLicense;\n m.haveLicense = gc(function (a) {\n var d = !1, b = Ya;\n switch (a.toLowerCase().charCodeAt(0)) {\n case 107:\n d = 0 != (b & 1);\n break;\n case 109:\n d = 0 != (b & 128);\n break;\n case 98:\n d = 0 != (b & 16)\n }\n return d\n });\n m.parsepath = m.parsePath = ra.parsePath;\n m.contextmenu = new tf;\n ia = m.control = new uf;\n ae = m.cursors = new vf;\n N = m.image = {};\n xa = m.plugin = new bb(Ob);\n m.layer = xa;\n Ua = m.hotspot = new bb(wf);\n Yb = m.events = new bb(null, !0);\n Yb.dispatch = Ka;\n ja = m.display = {\n currentfps: 60,\n r_ft: 16,\n FRM: 0,\n _framebufferscale: 1,\n mipmapping: \"auto\",\n loadwhilemoving: b.realDesktop ? \"true\" : \"auto\",\n _stereo: !1,\n stereooverlap: 0,\n hotspotrenderer: \"auto\",\n hardwarelimit: b.realDesktop && b.safari && \"6\" > b.safariversion ? 2E3 : b.realDesktop && !b.webgl ? 2560 : b.iphone && b.retina && !b.iphone5 ? 800 : b.iphone && !b.retina ? 600 : b.ipod && b.retina ? 640 : b.mobile || b.tablet ? 1024 : 4096\n };\n ha(ja, _[491], function () {\n return ja._stereo\n }, function (a) {\n a = pa(a);\n ja._stereo != a && (ja._stereo = a, V.svglayer && (V.svglayer.style.display = a ? \"none\" : \"\"))\n });\n ha(ja, _[383], function () {\n var a = ja.FRM | 0;\n return 0 == a ? \"auto\" : \"\" + a\n }, function (a) {\n a |= 0;\n 0 > a && (a = 0);\n ja.FRM = a\n });\n ha(ja, _[231], function () {\n return ja._framebufferscale\n }, function (a) {\n a = Number(a);\n if (isNaN(a) || 0 == a)a = 1;\n ja._framebufferscale = a;\n pb.haschanged = !0;\n V.resizeCheck(!0)\n });\n m.memory = {maxmem: b.realDesktop ? Math.min(Math.max(150, 48 * screen.availWidth * screen.availHeight >> 20), 400) : b.ios && 7.1 > b.iosversion || b.iphone && !b.iphone5 ? 40 : 50};\n m.network = {retrycount: 2};\n sc = m.progress = {};\n sc.progress = 0;\n Ra = new Ob;\n Ra.name = \"STAGE\";\n Za = new Ob;\n Za.name = _[480];\n xa.alpha = 1;\n Ua.alpha = 1;\n Ua.visible = !0;\n ha(xa, _[12], function () {\n return \"none\" != V.pluginlayer.style.display\n }, function (a) {\n V.pluginlayer.style.display = pa(a) ? \"\" : \"none\"\n });\n m.xml = {};\n m.xml.url = \"\";\n m.xml.content = null;\n m.xml.scene = null;\n var d = m.security = {};\n ha(d, \"cors\", function () {\n return Tc\n }, function (a) {\n Tc = a\n });\n za = m.autorotate = {};\n za.enabled = !1;\n za.waittime = 1.5;\n za.accel = 1;\n za.speed = 10;\n za.horizon = 0;\n za.tofov = null;\n za.currentmovingspeed = 0;\n m.math = function () {\n function a(d) {\n return function (a, b) {\n void 0 === b ? I(a, Math[d](n(a))) : I(a, Math[d](n(b)))\n }\n }\n\n var d = {}, b = _[157].split(\" \"), n = function (a) {\n var d = U(a);\n return Number(null !== d ? d : a)\n }, k;\n for (k in b) {\n var e = b[k];\n d[e] = a(e)\n }\n d.pi = Ga;\n d.atan2 = function (a, d, b) {\n I(a, Math.atan2(n(d), n(b)))\n };\n d.min = function () {\n var a = arguments, d = a.length, b = 3 > d ? 0 : 1, r = n(a[b]);\n for (b++; b < d; b++)r = Math.min(r, n(a[b]));\n I(a[0], r)\n };\n d.max = function () {\n var a = arguments, d = a.length, b = 3 > d ? 0 : 1, r = n(a[b]);\n for (b++; b < d; b++)r = Math.max(r, n(a[b]));\n I(a[0], r)\n };\n d.pow = da.pow;\n return d\n }();\n m.action = new bb;\n m.scene = new bb;\n m.data = new bb;\n m.addlayer = m.addplugin = function (a) {\n if (!Uc(a, _[204] + a + \")\"))return null;\n a = xa.createItem(a);\n if (!a)return null;\n null == a.sprite && (a._dyn = !0, a.create(), null == a._parent && V.pluginlayer.appendChild(a.sprite));\n return a\n };\n m.removelayer = m.removeplugin = function (a, d) {\n var b = xa.getItem(a);\n if (b) {\n if (pa(d)) {\n var n = b._childs;\n if (n)for (; 0 < n.length;)m.removeplugin(n[0].name, !0)\n }\n b.visible = !1;\n b.parent = null;\n b.sprite && V.pluginlayer.removeChild(b.sprite);\n b.destroy();\n xa.removeItem(a)\n }\n };\n m.addhotspot = function (a) {\n if (!Uc(a, _[321] + a + \")\"))return null;\n a = Ua.createItem(a);\n if (!a)return null;\n null == a.sprite && (a._dyn = !0, a.create(), V.hotspotlayer.appendChild(a.sprite));\n ld = !0;\n return a\n };\n m.removehotspot = function (a) {\n var d = Ua.getItem(a);\n if (d) {\n d.visible = !1;\n d.parent = null;\n if (d.sprite) {\n try {\n V.hotspotlayer.removeChild(d.sprite)\n } catch (b) {\n }\n if (d._poly) {\n try {\n V.svglayer.removeChild(d._poly)\n } catch (n) {\n }\n d._poly.kobject = null;\n d._poly = null\n }\n }\n d.destroy();\n Ua.removeItem(a)\n }\n }\n }\n\n function xf() {\n var a = p.haschanged, d = !1;\n jc++;\n ja.frame = jc;\n Oa.fps();\n var m = V.resizeCheck(), f = da.processAnimations(), a = a | p.haschanged;\n if (b.webgl || !b.ios || b.ios && 5 <= b.iosversion)f = !1;\n f |= ld;\n ld = !1;\n f && (p._hlookat += ((jc & 1) - .5) / (1 + p.r_zoom), a = !0);\n a |= Xa.handleloading();\n 0 == da.blocked && (a |= Pa.handleFrictions(), Xa.checkautorotate(p.haschanged) && (a = d = !0));\n p.continuousupdates && (a = d = !0);\n a || m ? (Oa.startFrame(), Xa.updateview(d, !0), Oa.finishFrame()) : (p.haschanged && p.updateView(), ob(!1));\n Xa.updateplugins(m);\n b.desktop && Xa.checkHovering()\n }\n\n var Jb = this;\n try {\n !Object.prototype.__defineGetter__ && Object.defineProperty({}, \"x\", {\n get: function () {\n return !0\n }\n }).x && (Object.defineProperty(Object.prototype, _[233], {\n enumerable: !1,\n configurable: !0,\n value: function (a, d) {\n Object.defineProperty(this, a, {get: d, enumerable: !0, configurable: !0})\n }\n }), Object.defineProperty(Object.prototype, _[234], {\n enumerable: !1,\n configurable: !0,\n value: function (a, d) {\n Object.defineProperty(this, a, {set: d, enumerable: !0, configurable: !0})\n }\n }))\n } catch (Bf) {\n }\n\n var jb = navigator, aa = document, L = window, Ga = Math.PI, Y = Ga / 180, tc = Number.NaN, md = 0, Ta = L.performance && L.performance.now ? function () {\n return L.performance.now() - md\n } : function () {\n return (new Date).getTime() - md\n }, md = Ta(), Xc = String.fromCharCode, m = null, bc = 0, vb = 0, Qa = 0, ya = 0, X = 1, Yc = 1, uc = 0, pb = null, za = null, ia = null, ae = null, ja = null, Yb = null, sc = null, Ua = null, N = null, O = null, xa = null, p = null, Ra = null, Za = null, jc = 0, nd = 60, Ya = 14, od = null, rc = [_[362], _[489]], Na = null, Tc = \"\", vc = null, ld = !1, kc = 0, Kc = !0, b = {\n runDetection: function (a) {\n function d() {\n var a = screen.width, c = screen.height, C = b.topAccess ? top : L, d = C.innerWidth, Q = C.innerHeight, C = C.orientation | 0, A = a / (c + 1), h = d / (Q + 1);\n if (1 < A && 1 > h || 1 > A && 1 < h)A = a, a = c, c = A;\n v.width = a;\n v.height = c;\n v.orientation = C;\n b.window = {width: d, height: Q};\n a /= d;\n return b.pagescale = a\n }\n\n function m(a, c) {\n for (var C = [\"ms\", \"Moz\", _[494], \"O\"], d = 0; 5 > d; d++) {\n var b = 0 < d ? C[d - 1] + a.slice(0, 1).toUpperCase() + a.slice(1) : a;\n if (void 0 !== t.style[b])return b\n }\n return null\n }\n\n var f = \"multires flash html5 html mobile tablet desktop ie edge webkit ios iosversion iphone ipod ipad retina hidpi android androidstock blackberry touchdevice gesturedevice fullscreensupport windows mac linux air standalone silk\".split(\" \"), g, n, k, e, w = aa.documentElement, x = a.mobilescale;\n isNaN(x) && (x = .5);\n n = f.length;\n for (g = 0; g < n; g++)k = f[g], b[k] = !1;\n b.html5 = b.html = !0;\n b.iosversion = 0;\n b.css3d = !1;\n b.webgl = !1;\n b.topAccess = !1;\n b.simulator = !1;\n b.multiressupport = !1;\n b.panovideosupport = !1;\n var v = b.screen = {};\n try {\n top && top.document && (b.topAccess = !0)\n } catch (r) {\n }\n var y = jb.platform, f = F(y), l = jb.userAgent, u = F(l), h = n = \"\";\n 0 <= f.indexOf(\"win\") ? b.windows = !0 : 0 <= f.indexOf(\"mac\") ? b.mac = !0 : 0 <= f.indexOf(\"linux\") && (b.linux = !0);\n var c = L.devicePixelRatio, p = 2 <= c;\n g = 1;\n var D = 0 <= f.indexOf(\"ipod\"), z = 0 <= f.indexOf(_[41]), q = 0 <= f.indexOf(\"ipad\"), J = z || D || q;\n e = u.indexOf(\"silk/\");\n var C = 0 <= u.indexOf(_[469]) || 0 <= u.indexOf(_[145]), Q = 0 > e && !C && 0 <= u.indexOf(_[464]), A = k = !1, H = !1, qa = l.indexOf(_[147]), ea = L.chrome && !C, Ca = l.indexOf(_[460]), S = !1, Z = (J || Q || e) && (b.windows || b.mac);\n C && (qa = Ca = -1);\n var f = !1, B = 0;\n Yc = d();\n if (J) {\n if (b.ios = !0, n = y, e = l.indexOf(\"OS \"), 0 < e && (e += 3, B = l.slice(e, l.indexOf(\" \", e)).split(\"_\").join(\".\"), n += _[457] + B, b.iosversion = parseFloat(B), \"6.0\" <= B && (z && !p || D && p) && (b._iOS6_canvas_bug = !0)), k = z || D, A = q, B = Math.max(screen.width, screen.height), b.iphone = z || D, b.iphone5 = z && 500 < B, b.ip6p = z && 735 < B, b.ipod = D, b.ipad = q, b.retina = p, z || D)g *= x\n } else if (Q)if (e = l.indexOf(_[454]), B = parseFloat(l.slice(e + 8)), b.android = !0, b.linux = !1, b.androidversion = B, n = l.slice(e, l.indexOf(\";\", e)), k = 0 < u.indexOf(_[44]), ea && 0 < u.indexOf(_[275]) && (k = 480 > Math.min(screen.width, screen.height)), A = !k, B = l.indexOf(\")\"), 5 < B && (e = l.slice(0, B).lastIndexOf(\";\"), 5 < e && (p = l.indexOf(_[511], e), 0 < p && (B = p), n += \" (\" + l.slice(e + 2, B) + \")\")), 0 < Ca && isNaN(c) && (c = Yc), A && 1 < c) {\n if (b.hidpi = !0, g = c, 0 <= qa || 0 < Ca)b.hidpi = !1, g = 1\n } else k && (b.hidpi = 1 < c, g = c * x, .5 > g && (g = .5), 0 <= qa || 0 < Ca || Z) && (b.hidpi = !1, g = x); else {\n if (0 <= u.indexOf(_[345]) || 0 <= u.indexOf(_[344]) || 0 <= u.indexOf(\"bb10\"))S = !0, b.blackberry = !0, n = _[336], f = !0;\n 0 <= e ? (S = !0, b.silk = !0, n = _[297] + parseFloat(u.slice(e + 5)).toFixed(2), H = !1, k = 0 <= u.indexOf(_[44]), A = !k, f = !0) : 0 <= u.indexOf(\"ipad\") || 0 <= u.indexOf(_[41]) ? H = S = !0 : 0 <= u.indexOf(_[138]) ? (A = !0, n += _[513]) : 0 <= u.indexOf(_[44]) ? (k = !0, n += _[518], g = x) : H = !0\n }\n D = jb.vendor && 0 <= jb.vendor.indexOf(\"Apple\");\n z = L.opera;\n p = !1;\n H && (n = _[285]);\n e = l.indexOf(_[451]);\n 0 < e && (D || z || Q) && (e += 8, B = l.slice(e, l.indexOf(\" \", e)), D ? (b.safari = !0, b.safariversion = B, h = _[520]) : (Q && (h = _[238], f = !0), z && (b.opera = !0, b.operaversion = B, h = \"Opera\")), h += \" \" + B);\n J && (e = l.indexOf(_[521]), 0 < e && (b.safari = !0, e += 6, B = parseFloat(l.slice(e, l.indexOf(\" \", e))), b.crios = B, h = _[449] + B.toFixed(1)));\n e = qa;\n if (0 <= e || ea)B = parseFloat(l.slice(e + 7)), b.chrome = !0, b.chromeversion = B, h = _[147] + (isNaN(B) ? \"\" : \" \" + B.toFixed(1)), e = u.indexOf(\"opr/\"), 0 < e && (h = _[517] + parseFloat(l.slice(e + 4)).toFixed(1) + _[378]), Q && 28 > B && (f = !0), Q && 1 < c && 20 > B && !Z && (b.hidpi = !0, g = c, k && (g *= x)); else if (e = Ca, 0 > e && (e = l.indexOf(_[514])), 0 <= e && (B = parseFloat(l.slice(1 + l.indexOf(\"/\", e))), b.firefox = !0, b.firefoxversion = B, h = _[434] + (isNaN(B) ? \"\" : B.toFixed(1)), Q && 35 > B && (f = !0)), e = l.indexOf(\"MSIE \"), p = 0 <= e || C)H = b.ie = !0, A = !1, h = _[224], 0 < u.indexOf(_[436]) || 0 < u.indexOf(_[289]) ? (k = !0, H = !1, h = _[445] + h, g = x) : 0 < u.indexOf(\"arm;\") && 1 < jb.msMaxTouchPoints && (A = !0, H = !1, h = _[447] + h, f = !0, g = 1), 0 <= e ? (B = l.slice(e + 4, l.indexOf(\";\", e)), b.ieversion = parseFloat(B), h += B) : (e = l.indexOf(\"rv:\"), 0 <= e ? (B = parseFloat(l.slice(e + 3)), !isNaN(B) && 10 <= B && 100 > B && (b.ieversion = B, h += \" \" + B.toFixed(1))) : (e = u.indexOf(_[145]), 0 <= e && (h = _[260], b.edge = !0, Kc = !1, B = parseFloat(l.slice(e + 6)), isNaN(B) || (b.ieversion = B, h += \" \" + (B + 8).toFixed(5))))), n = h, h = \"\";\n b.android && (b.androidstock = !(b.chrome || b.firefox || b.opera));\n 0 == b.ie && 0 < (e = u.indexOf(_[448])) && (B = parseFloat(u.slice(e + 7)), !isNaN(B) && 0 < B && (b.webkit = !0, b.webkitversion = B));\n b.pixelratio = isNaN(c) ? 1 : c;\n b.fractionalscaling = 0 != b.pixelratio % 1;\n var c = {}, t = Ja();\n c.find = m;\n c.prefix = p ? \"ms\" : b.firefox ? \"moz\" : b.safari || b.chrome || b.androidstock ? _[70] : \"\";\n c.perspective = m(_[335]);\n c.transform = m(_[387]);\n c.backgroundsize = m(_[256]);\n c.boxshadow = m(_[388]);\n c.boxshadow_style = _[252] == c.boxshadow ? _[212] : _[292] == c.boxshadow ? _[249] : _[342];\n Q && \"4.0\" > b.androidversion && (c.perspective = null);\n c.perspective && (b.css3d = !0, _[217] == c.perspective && L.matchMedia && (u = L.matchMedia(_[195]))) && (b.css3d = 1 == u.matches);\n t = null;\n b.webgl = function () {\n var a = null;\n try {\n for (var c = Ja(2), C = 0; 4 > C && !(a = c.getContext([_[30], _[83], _[116], _[112]][C])); C++);\n } catch (d) {\n }\n return null != a\n }();\n u = {};\n u.useragent = l;\n u.platform = y;\n u.domain = null;\n u.location = L.location.href;\n y = u.events = {};\n u.css = c;\n if (J || Q || void 0 !== w.ontouchstart || S)b.touchdevice = !0, b.gesturedevice = !0;\n J = 0;\n (jb.msPointerEnabled || jb.pointerEnabled) && b.ie && (Q = jb.msMaxTouchPoints || jb.maxTouchPoints, jb.msPointerEnabled && (J = 2), jb.pointerEnabled && (J = 1), b.touchdevice = 0 < Q, b.gesturedevice = 1 < Q);\n y.touchstart = [_[343], _[331], _[290]][J];\n y.touchmove = [_[115], _[330], _[283]][J];\n y.touchend = [_[118], _[390], _[328]][J];\n y.touchcancel = [_[327], _[280], _[236]][J];\n y.gesturestart = [_[300], _[96], _[96]][J];\n y.gesturechange = [_[276], _[91], _[91]][J];\n y.gestureend = [_[355], _[99], _[99]][J];\n y.pointerover = [_[8], _[8], _[34]][J];\n y.pointerout = [_[9], _[9], _[35]][J];\n b.pointerEvents = b.opera || b.ie && 11 > b.ieversion ? !1 : !0;\n h && (n += \" - \" + h);\n b.realDesktop = H;\n h = a.vars ? F(a.vars.simulatedevice) : null;\n _[392] == h && (0 <= l.indexOf(_[146]) || 0 <= l.indexOf(\"iPod\") ? h = _[41] : 0 <= l.indexOf(\"iPad\") && (h = \"ipad\"));\n b.touchdeviceNS = b.touchdevice;\n l = _[41] == h ? 1 : \"ipad\" == h ? 2 : 0;\n 0 < l && (b.simulator = !0, b.crios = 0, n += \" - \" + (1 == l ? _[146] : \"iPad\") + _[356], g = l * x, k = 1 == l, A = 2 == l, H = !1, b.ios = !0, b.iphone = k, b.ipad = A, b.touchdevice = !0, b.gesturedevice = !0);\n b.browser = u;\n b.infoString = n;\n a = F(a.fakedevice);\n _[44] == a ? (k = !0, A = H = !1) : _[138] == a ? (A = !0, k = H = !1) : _[465] == a && (H = !0, k = A = !1);\n b.mobile = k;\n b.tablet = A;\n b.desktop = H;\n b.normal = A || H;\n b.touch = b.gesturedevice;\n b.mouse = H;\n b.getViewportScale = d;\n X = g;\n 0 == b.simulator && 0 != aa.fullscreenEnabled && 0 != aa.mozFullScreenEnabled && 0 != aa.webkitFullScreenEnabled && 0 != aa.webkitFullscreenEnabled && 0 != aa.msFullscreenEnabled && (a = [_[223], _[201], _[194], _[191], _[209]], x = -1, g = null, n = _[228], w[a[0]] ? (g = \"\", x = 0) : w[a[1]] ? (g = \"moz\", x = 1) : w[a[2]] ? (g = _[70], x = 2) : w[a[3]] ? (g = _[70], x = 3) : w[a[4]] && (g = \"MS\", n = _[229], x = 4), 0 <= x && 0 == f && (b.fullscreensupport = !0, y.fullscreenchange = g + n, y.requestfullscreen = a[x]));\n b.buildList();\n delete b.runDetection\n }, buildList: function () {\n var a, d = \"|all\";\n for (a in b)a == F(a) && b[a] && (d += \"|\" + a);\n b.haveList = d + \"|\"\n }, checkSupport: function (a) {\n a = F(a).split(\"no-\").join(\"!\").split(\".or.\").join(\"|\").split(\".and.\").join(\"+\").split(\"|\");\n var d, m, f = a.length;\n for (d = 0; d < f; d++) {\n var g = a[d].split(\"+\"), n = !1;\n for (m = 0; m < g.length; m++) {\n var n = g[m], k = !1;\n 33 == n.charCodeAt(0) && (n = n.slice(1), k = !0);\n if (0 == n.indexOf(\"ios\") && b.ios)if (3 == n.length || b.iosversion >= parseFloat(n.slice(3)))if (k) {\n n = !1;\n break\n } else n = !0; else if (k)n = !0; else {\n n = !1;\n break\n } else if (0 <= b.haveList.indexOf(\"|\" + n + \"|\"))if (k) {\n n = !1;\n break\n } else n = !0; else if (k)n = !0; else {\n n = !1;\n break\n }\n }\n if (n)return !0\n }\n return !1\n }\n }, cb = 0, Kb = 0, Hd = 0, Nb = 0, Lc = 0, be = 0, jd = !1, ib = null, Id = null, pd = null, Zc = null, pc = null, ce = !1, Lb = 0, Fb = function () {\n var a = this;\n a._type = \"base\";\n a.registerattribute = function (d, b, f, g) {\n d = F(d);\n f && g ? (a.hasOwnProperty(d) && (b = ga(a[d], typeof b)), a.__defineGetter__(d, g), a.__defineSetter__(d, f), f(b)) : a.hasOwnProperty(d) ? a[d] = ga(a[d], typeof b) : a[d] = b\n };\n a.createobject = function (d) {\n d = F(d);\n try {\n return a.hasOwnProperty(d) ? a[d] : a[d] = new Fb\n } catch (b) {\n }\n return null\n };\n a.removeobject = a.removeattribute = function (d) {\n d = F(d);\n try {\n a[d] = null, delete a[d]\n } catch (b) {\n }\n };\n a.createarray = function (d) {\n d = F(d);\n return a[d] && a[d].isArray ? a[d] : a[d] = new bb(Fb)\n };\n a.removearray = function (d) {\n d = F(d);\n a[d] && a[d].isArray && (a[d] = null, delete a[d])\n };\n a.getattributes = function () {\n var d = [], b = [\"index\", _[438]], f;\n for (f in a)_[11] != typeof a[f] && -1 == b.indexOf(f) && \"_\" != f.charAt(0) && d.push(f);\n return d\n }\n }, bb = function (a, d) {\n var b = [], f = {};\n this.isArray = !0;\n this.isDynArray = 1 == d;\n this.__defineGetter__(\"count\", function () {\n return b.length\n });\n this.__defineSetter__(\"count\", function (a) {\n 0 == a ? (b = [], f = {}) : b.length = a\n });\n this.createItem = function (d, n) {\n var k = -1, e = null, k = String(d).charCodeAt(0);\n if (48 <= k && 57 >= k) {\n if (n)return null;\n k = parseInt(d, 10);\n e = b[k];\n if (null == e || void 0 == e)e = null != a ? new a : {}, e.name = \"n\" + k, e.index = k, b[k] = e, f[e.name] = e\n } else if (d = F(d), e = f[d], null == e || void 0 == e)e = n ? n : null != a ? new a : {}, k = b.push(e) - 1, e.index = k, e.name = d, b[k] = e, f[d] = e;\n return e\n };\n this.getItem = function (a) {\n var d = -1, d = String(a).charCodeAt(0);\n 48 <= d && 57 >= d ? (d = parseInt(a, 10), a = b[d]) : a = f[F(a)];\n return a\n };\n this.getArray = function () {\n return b\n };\n this.renameItem = function (a, d) {\n var k = -1, k = String(a).charCodeAt(0);\n 48 <= k && 57 >= k ? (k = parseInt(a, 10), k = b[k]) : k = f[F(a)];\n k && (delete f[k.name], d = F(d), k.name = d, f[d] = k)\n };\n this.removearrayitem = this.removeItem = function (a) {\n var d = -1, d = null;\n a = String(a);\n d = String(a).charCodeAt(0);\n 48 <= d && 57 >= d ? (d = parseInt(a, 10), d = b[d]) : d = f[F(a)];\n if (d) {\n f[d.name] = null;\n delete f[d.name];\n b.splice(d.index, 1);\n var k;\n k = b.length;\n for (a = d.index; a < k; a++)b[a].index--\n }\n return d\n };\n this.sortby = function (a, d) {\n var f, e, w = !1 === d ? -1 : 1;\n e = b.length;\n if (1 < e)for (b.sort(function (d, b) {\n var r = d[a], e = b[a];\n return void 0 === r && void 0 !== e ? +w : void 0 !== r && void 0 === e || r < e ? -w : r > e ? +w : 0\n }), f = 0; f < e; f++)b[f].index = f\n }\n }, ra = {};\n (function () {\n function a(a) {\n for (var d = w, b = [], e, g, h, c, f, n = a.length, k = 0, q = 0; k < n;)e = d.indexOf(a.charAt(k++)), g = d.indexOf(a.charAt(k++)), c = d.indexOf(a.charAt(k++)), f = d.indexOf(a.charAt(k++)), e = e << 2 | g >> 4, g = (g & 15) << 4 | c >> 2, h = (c & 3) << 6 | f, b[q++] = e, 64 != c && (b[q++] = g), 64 != f && (b[q++] = h);\n return b\n }\n\n function d(a, d) {\n var b, e, g, h = [];\n h.length = 256;\n if (80 == d || 82 == d) {\n e = 15;\n var c = _[89];\n 82 == d && od && (e = 127, c = od);\n b = a[65] & 7;\n for (g = 0; 128 > g; g++)h[2 * g] = a[g], h[2 * g + 1] = String(c).charCodeAt(g & e);\n e = a.length - 128 - b;\n b += 128\n } else if (71 == d) {\n b = a[4];\n e = (a[b] ^ b) & 15 | ((a[2 + b] ^ b) >> 2 & 63) << 4 | ((a[1 + b] ^ b) >> 1 & 63) << 10 | ((a[3 + b] ^ b) & 63) << 16;\n for (g = 0; 256 > g; g++)h[g] = a[g] ^ a[256 + e + b + 2 * g];\n b = 256\n }\n x.srand(h, 256);\n return x.flip(a, b, e)\n }\n\n function p(a, d, b) {\n if (null == a)return null;\n a = \"\" + a;\n 1 == d && m.basedir && 0 > a.indexOf(\"://\") && 0 != a.indexOf(\"/\") && _[74] != a.slice(0, 5) && (a = m.basedir + a);\n a = a.split(\"\\\\\").join(\"/\");\n null == e.firstxmlpath && (e.firstxmlpath = \"\");\n null == e.currentxmlpath && (e.currentxmlpath = \"\");\n null == e.swfpath && (e.swfpath = \"\");\n null == e.htmlpath && (e.htmlpath = \"\");\n for (d = a.indexOf(\"%\"); 0 <= d;) {\n var g = a.indexOf(\"%\", d + 1);\n if (g > d) {\n var f = a.slice(d + 1, g), h = null;\n if (36 == f.charCodeAt(0)) {\n if (f = U(f.slice(1)), null != f) {\n f = \"\" + f;\n a = 47 == f.charCodeAt(0) || 0 < f.indexOf(\"://\") ? f + a.slice(g + 1) : a.slice(0, d) + f + a.slice(g + 1);\n d = a.indexOf(\"%\");\n continue\n }\n } else switch (f) {\n case _[437]:\n h = 1 == b ? \"\" : e.firstxmlpath;\n break;\n case _[361]:\n h = e.currentxmlpath;\n break;\n case _[475]:\n h = 1 == b ? \"\" : e.swfpath;\n break;\n case _[422]:\n h = 1 == b ? \"\" : e.htmlpath;\n break;\n case _[473]:\n h = 1 == b ? \"\" : m.basedir\n }\n null != h ? (g++, \"/\" == a.charAt(g) && g++, a = h + a.slice(g), d = a.indexOf(\"%\")) : d = a.indexOf(\"%\", d + 1)\n } else d = -1\n }\n return a\n }\n\n function f(b, e, f) {\n var l, n;\n 0 <= (l = e.indexOf(_[333])) ? (n = e.indexOf(_[309])) > l && (e = e.slice(l + 11, n), l = e.indexOf(_[393]), 0 <= l && (e = e.slice(l + 9, -3))) : f && 0 <= (l = e.indexOf('\"[[KENC')) && (n = e.lastIndexOf(']]\"')) > l && (e = e.slice(l + 3, n));\n var h;\n n = null;\n h = e.slice(0, 8);\n l = e.slice(8);\n f = !0 === f && Ya & 64 || !f && Ya & 32;\n if (\"KENC\" != h.slice(0, 4))return f ? (b && Ea(b + _[32]), null) : e;\n var c = !1, k = e = 0, k = 0, w = !1;\n e = String(h).charCodeAt(4);\n if (80 == e || 82 == e || 71 == e)if (k = String(h).charCodeAt(5), 85 == k && (k = String(h).charCodeAt(6), w = 90 == k, 66 == k || w))c = !0;\n if (!c)return b && la(3, b + _[170]), null;\n if (f && 80 == e)return b && Ea(b + _[32]), null;\n b = null;\n if (w) {\n b = e;\n n = String.fromCharCode;\n h = 1;\n f = l.length;\n var m = e = null, q = k = c = w = 0, x = 0, C = 0, Q = 0;\n try {\n n.apply(null, (new Uint8Array(4)).subarray(2))\n } catch (A) {\n h = 0\n }\n n = h ? Uint8Array : Array;\n for (e = new n(4 * f / 5); w < f;)k = l.charCodeAt(w++) - 35, q = l.charCodeAt(w++) - 35, x = l.charCodeAt(w++) - 35, C = l.charCodeAt(w++) - 35, Q = l.charCodeAt(w++) - 35, 56 < k && k--, 56 < q && q--, 56 < x && x--, 56 < C && C--, 56 < Q && Q--, Q += 85 * (85 * (85 * (85 * k + q) + x) + C), e[c++] = Q >> 24 & 255, e[c++] = Q >> 16 & 255, e[c++] = Q >> 8 & 255, e[c++] = Q & 255;\n e = d(e, b);\n m = new n(e[2] << 16 | e[1] << 8 | e[0]);\n f = 8 + (e[6] << 16 | e[5] << 8 | e[4]);\n w = 8;\n for (c = 0; w < f;) {\n k = e[w++];\n q = k >> 4;\n for (x = q + 240; 255 === x; q += x = e[w++]);\n for (C = w + q; w < C;)m[c++] = e[w++];\n if (w === f)break;\n Q = c - (e[w++] | e[w++] << 8);\n q = k & 15;\n for (x = q + 240; 255 === x; q += x = e[w++]);\n for (C = c + q + 4; c < C;)m[c++] = m[Q++]\n }\n e.length = 0;\n n = l = g(m)\n } else b = a(l), b = d(b, e), null != b && (n = g(b));\n return n\n }\n\n function g(a) {\n for (var d = \"\", b = 0, e = 0, g = 0, h = 0, c = a.length; b < c;)e = a[b], 128 > e ? (0 < e && (d += Xc(e)), b++) : 191 < e && 224 > e ? (g = a[b + 1], d += Xc((e & 31) << 6 | g & 63), b += 2) : (g = a[b + 1], h = a[b + 2], e = (e & 15) << 12 | (g & 63) << 6 | h & 63, 65279 != e && (d += Xc(e)), b += 3);\n return d\n }\n\n function n(a, d, b) {\n void 0 !== d ? d(a, b) : Ea(a + _[80] + b + \")\")\n }\n\n function k(a, d, g, f, k) {\n if (0 == e.DMcheck(a))n(a, k, _[227]); else {\n var h = null, c = !1;\n if (b.ie && \"\" == aa.domain)try {\n h = new ActiveXObject(_[218]), c = !0\n } catch (w) {\n h = null\n }\n null == h && (h = new XMLHttpRequest);\n void 0 !== h.overrideMimeType && d && h.overrideMimeType(d);\n h.onreadystatechange = function () {\n if (4 == h.readyState) {\n var d = h.status, b = h.responseText;\n if (0 == d && b || 200 == d || 304 == d)if (g) {\n var e = null, e = c ? (new DOMParser).parseFromString(b, _[25]) : h.responseXML;\n f(a, e, d)\n } else f(a, b); else n(a, k, h.status)\n }\n };\n try {\n h.open(\"GET\", a, !0), h.send(null)\n } catch (m) {\n n(a, k, m)\n }\n }\n }\n\n var e = ra, w = _[183], w = w + (F(w) + _[273]);\n e.firstxmlpath = null;\n e.currentxmlpath = null;\n e.swfpath = null;\n e.htmlpath = null;\n e.parsePath = p;\n e.DMcheck = function (a) {\n var d;\n if (Ya & 256 && (d = aa.domain) && vc) {\n a = a.toLowerCase();\n var b = a.indexOf(\"://\");\n if (0 < b) {\n var b = b + 3, e = a.indexOf(\"/\", b);\n if (0 < e)return a = a.slice(b, e), b = a.indexOf(\":\"), 1 < b && (a = a.slice(0, b)), a == d\n } else return d == vc\n }\n return !0\n };\n var x = new function () {\n var a, d, b;\n this.srand = function (e, g) {\n var h, c, f, n, k = [];\n k.length = 256;\n for (h = 0; 256 > h; h++)k[h] = h;\n for (c = h = 0; 256 > h; h++)c = c + k[h] + e[h % g] & 255, n = k[h], k[h] = k[c], k[c] = n;\n for (f = c = h = 0; 256 > f; f++)h = h + 1 & 255, c = c + k[h] & 255, n = k[h], k[h] = k[c], k[c] = n;\n a = k;\n d = h;\n b = c\n };\n this.flip = function (e, g, h) {\n var c = [], f, n;\n c.length = h;\n var k = a, q = d, w = b;\n for (f = 0; f < h; f++, g++)q = q + 1 & 255, w = w + k[q] & 255, c[f] = e[g] ^ a[k[q] + k[w] & 255], n = k[q], k[q] = k[w], k[w] = n;\n d = q;\n b = w;\n return c\n }\n };\n e.loadimage = function (a, d, b) {\n var e = Ja(1);\n e.addEventListener(\"load\", function () {\n d && d(e)\n });\n e.addEventListener(_[48], function () {\n b && b(null, !1)\n }, !1);\n e.addEventListener(\"abort\", function () {\n b && b(null, !0)\n }, !1);\n e.src = a;\n return e\n };\n e.loadfile = function (a, d, b) {\n e.loadfile2(a, null, d, b)\n };\n e.loadxml = function (a, d, b) {\n e.loadfile2(a, _[25], d, b, !0)\n };\n e.loadfile2 = function (a, d, b, e, g) {\n g = !0 === g;\n var h = {errmsg: !0};\n h.rqurl = a;\n a = p(a);\n h.url = a;\n k(a, d, g, function (a, n, k) {\n !0 === g ? b(n, k) : (n = f(a, n, _[92] == d), h.data = n, null != n ? b && b(h) : e && e(h))\n }, g ? e : function (d, b) {\n e && e(h);\n h.errmsg && la(3, a + _[80] + b + \")\")\n })\n };\n e.resolvecontentencryption = f;\n e.b64u8 = function (d) {\n return g(a(d))\n };\n e.decodeLicense = function (a) {\n return null\n }\n })();\n\n var T = {};\n (function () {\n function a(d) {\n var b, e, g = d.childNodes, f;\n e = g.length;\n for (b = 0; b < e; b++)if (f = g.item(b))switch (f.nodeType) {\n case 1:\n a(f);\n break;\n case 8:\n d.removeChild(f), b--, e--\n }\n }\n\n function d(a, d) {\n var b, e, g = a.childNodes, f = -1;\n e = g.length;\n if (1 <= e)for (b = 0; b < e; b++)if (F(g[b].nodeName) == d) {\n f = b;\n break\n }\n return 0 <= f ? g[f] : null\n }\n\n function p(d, e, g, f, n) {\n var k, u, h, c = null, K = null, D, z;\n z = 0;\n var q, J = d.length, C = new XMLSerializer, Q = !1;\n f || (Q = !0, f = [], n = [], m.xml.parsetime = Ta());\n for (var A = 0; A < J; A++)if ((k = d[A]) && k.nodeName && \"#text\" != k.nodeName && (u = k.nodeName, u = F(u), _[129] != u)) {\n u = null == e && _[46] == u ? null : e ? e + \".\" + u : u;\n if (h = k.attributes)if (h.devices && 0 == b.checkSupport(h.devices.value))continue; else if (h[\"if\"] && 0 == da.calc(null, h[\"if\"].value))continue;\n q = (K = h && h.name ? h.name.value : null) ? !0 : !1;\n if (g) {\n if (_[462] == u && g & 16)continue;\n if ((_[29] == u || \"layer\" == u) && g & 4)continue;\n if (_[1] == u && g & 128)continue;\n if (_[75] == u && g & 65536)continue;\n if (g & 64 && K)if (_[29] == u || \"layer\" == u) {\n if ((c = xa.getItem(K)) && c._pCD && c.keep)continue\n } else if (_[1] == u && (c = Ua.getItem(K)) && c._pCD && c.keep)continue\n }\n if (u)if (q) {\n if (_[14] == u || \"data\" == u || \"scene\" == u) {\n a(k);\n q = null;\n if ((_[14] == u || \"data\" == u) && k.childNodes && 1 <= k.childNodes.length)for (c = 0; c < k.childNodes.length; c++)if (4 == k.childNodes[c].nodeType) {\n q = k.childNodes[c].nodeValue;\n break\n }\n null == q && (q = C.serializeToString(k), q = q.slice(q.indexOf(\">\") + 1, q.lastIndexOf(\"</\")), _[14] == u && (q = q.split(_[497]).join('\"').split(_[499]).join(\"'\").split(_[139]).join(String.fromCharCode(160)).split(\"&amp;\").join(\"&\")));\n I(u + \"[\" + K + _[61], q);\n if (h) {\n var H;\n q = h.length;\n for (H = 0; H < q; H++)if (D = h[H], c = F(D.nodeName), D = D.value, \"name\" != c) {\n z = c.indexOf(\".\");\n if (0 < z)if (b.checkSupport(c.slice(z + 1)))c = c.slice(0, z); else continue;\n z = u + \"[\" + K + \"].\" + F(c);\n I(z, D)\n }\n }\n continue\n }\n u = u + \"[\" + K + \"]\";\n if (!Uc(K, u))continue;\n I(u + \".name\", K)\n } else(K = U(u)) && K.isArray && !K.isDynArray && (K = \"n\" + String(K.count), u = u + \"[\" + K + \"]\", I(u + \".name\", K));\n if (h) {\n var qa = \"view\" == u, c = u ? U(u) : null, K = null;\n q = h.length;\n c && (c._lateBinding && (K = c._lateBinding), (D = h.style) && (D = D.value) && null == K && (c.style = D, n.push(u), K = c._lateBinding = {}));\n for (H = 0; H < q; H++) {\n D = h[H];\n c = F(D.nodeName);\n D = D.value;\n var ea = u ? u + \".\" : \"\";\n if (\"name\" != c && \"style\" != c) {\n z = c.indexOf(\".\");\n if (0 < z)if (b.checkSupport(c.slice(z + 1)))c = c.slice(0, z).toLowerCase(); else continue;\n z = ea + c;\n K ? K[c] = D : !D || _[13] != typeof D || \"get:\" != D.slice(0, 4) && \"calc:\" != D.slice(0, 5) ? (I(z, D), qa && I(\"xml.\" + z, D)) : (f.push(z), f.push(D))\n }\n }\n }\n k.childNodes && 0 < k.childNodes.length && p(k.childNodes, u, g, f, n)\n }\n if (Q) {\n J = f.length;\n for (A = 0; A < J; A += 2)I(f[A], f[A + 1]);\n J = n.length;\n for (A = 0; A < J; A++)if (u = n[A], da.assignstyle(u, null), c = U(u))if (K = c._lateBinding)da.copyattributes(c, K), c._lateBinding = null;\n m.xml.parsetime = Ta() - m.xml.parsetime\n }\n }\n\n function f(a, d) {\n var b = null, e, g;\n g = a.length;\n for (e = 0; e < g; e++)if (b = a[e], !b || !b.nodeName || _[14] != F(b.nodeName)) {\n var k = b.attributes;\n if (k) {\n var n, h = k.length, c;\n for (n = 0; n < h; n++) {\n var m = k[n];\n c = F(m.nodeName);\n var p = c.indexOf(\".\");\n 0 < p && (c = c.slice(0, p));\n if (_[435] == c) {\n c = m.value;\n var p = c.split(\"|\"), z, q;\n q = p.length;\n for (z = 0; z < q; z++)c = p[z], \"\" != c && 0 > c.indexOf(\"://\") && 47 != c.charCodeAt(0) && (p[z] = d + c);\n m.value = p.join(\"|\")\n } else if (p = c.indexOf(\"url\"), 0 == p || 0 < p && p == c.length - 3)if (c = m.value)p = c.indexOf(\":\"), 47 == c.charCodeAt(0) || 0 < p && (\"//\" == c.substr(p + 1, 2) || 0 <= _[94].indexOf(c.substr(0, p + 1))) || (c = d + c), m.value = c\n }\n }\n b.childNodes && 0 < b.childNodes.length && f(b.childNodes, d)\n }\n }\n\n function g(a, d) {\n var b = Gc(d), e = b.lastIndexOf(\"/\"), g = b.lastIndexOf(\"\\\\\");\n g > e && (e = g);\n 0 < e && (b = b.slice(0, e + 1), f(a, b))\n }\n\n function n(a, b) {\n var e = d(a, _[374]);\n if (e) {\n var g = \"\", f, k;\n k = e.childNodes.length;\n for (f = 0; f < k; f++)g += e.childNodes[f].nodeValue;\n if (e = ra.resolvecontentencryption(b, g))return (e = (new DOMParser).parseFromString(e, _[25])) && e.documentElement && _[22] == e.documentElement.nodeName ? (la(3, b + _[21]), null) : e;\n Ea(b + _[32]);\n return null\n }\n return Ya & 32 ? (Ea(b + _[32]), null) : a\n }\n\n function k(a, d) {\n var b, e;\n switch (a.nodeType) {\n case 1:\n var g = T.xmlDoc.createElement(a.nodeName);\n if (a.attributes && 0 < a.attributes.length)for (b = 0, e = a.attributes.length; b < e;)g.setAttribute(a.attributes[b].nodeName, a.getAttribute(a.attributes[b++].nodeName));\n if (d && a.childNodes && 0 < a.childNodes.length)for (b = 0, e = a.childNodes.length; b < e;)g.appendChild(k(a.childNodes[b++], d));\n return g;\n case 3:\n case 4:\n case 8:\n return T.xmlDoc.createTextNode(a.nodeValue)\n }\n }\n\n function e(a, d) {\n var f, r, m;\n if (null != T.xmlIncludeNode) {\n m = Gc(a.url);\n if ((r = a.responseXML) && r.documentElement && _[22] == r.documentElement.nodeName) {\n Ea(m + _[21]);\n return\n }\n r = n(r, a.url);\n if (null == r)return;\n g(r.childNodes, m);\n f = r.childNodes;\n var l = T.xmlIncludeNode.parentNode;\n if (null != l.parentNode) {\n var u = 0;\n m = f.length;\n if (1 < m)for (r = 0; r < m; r++)if (_[46] == F(f[r].nodeName)) {\n u = r;\n break\n }\n r = null;\n r = void 0 === T.xmlDoc.importNode ? k(f[u], !0) : T.xmlDoc.importNode(f[u], !0);\n l.insertBefore(r, T.xmlIncludeNode);\n l.removeChild(T.xmlIncludeNode)\n } else T.xmlDoc = r;\n T.xmlAllNodes = [];\n T.addNodes(T.xmlDoc.childNodes);\n T.xmlIncludeNode = null\n }\n l = !1;\n m = T.xmlAllNodes.length;\n for (r = 0; r < m; r++)if (f = T.xmlAllNodes[r], u = null, null != f.nodeName) {\n u = F(f.nodeName);\n if (_[129] == u) {\n var u = f.attributes, h, c = u.length, p = !1;\n for (h = 0; h < c; h++) {\n var D = u[h];\n _[483] == D.nodeName ? 0 == b.checkSupport(D.value) && (p = !0) : \"if\" == D.nodeName && 0 == da.calc(null, D.value) && (p = !0)\n }\n if (0 == p)for (h = 0; h < c; h++)if (D = u[h], \"url\" == F(D.nodeName)) {\n l = !0;\n p = D.value;\n D = p.indexOf(\":\");\n 0 < D && 0 <= _[94].indexOf(p.substr(0, D + 1)) && (p = da.calc(null, p.substr(D + 1)));\n T.xmlIncludeNode = f;\n var z = ra.parsePath(p);\n z ? ra.loadxml(z, function (a, c) {\n a ? e({url: z, responseXML: a}, d) : Ea(z + \" - \" + (200 == c ? _[208] : _[184]))\n }) : d()\n }\n }\n if (l)break\n }\n 0 == l && d()\n }\n\n T.resolvexmlencryption = n;\n T.resolvexmlincludes = function (a, d) {\n var b = a.childNodes;\n T.xmlDoc = a;\n T.xmlAllNodes = [];\n T.addNodes(b);\n g(b, m.xml.url);\n T.xmlIncludeNode = null;\n e(null, d)\n };\n T.parsexml = p;\n T.xmlDoc = null;\n T.xmlAllNodes = null;\n T.xmlIncludeNode = null;\n T.addNodes = function (a) {\n var d, b, e;\n e = a.length;\n for (b = 0; b < e; b++)(d = a[b]) && d.nodeName && _[14] != F(d.nodeName) && (T.xmlAllNodes.push(d), d.childNodes && 0 < d.childNodes.length && T.addNodes(d.childNodes))\n };\n T.findxmlnode = d\n })();\n\n var ac = {};\n (function () {\n var a = ac;\n a.linear = function (a, b, f) {\n return f * a + b\n };\n a.easeinquad = function (a, b, f) {\n return f * a * a + b\n };\n a.easeoutquad = function (a, b, f) {\n return -f * a * (a - 2) + b\n };\n a[_[5]] = a.easeoutquad;\n a.easeinoutquad = function (a, b, f) {\n return (1 > (a /= .5) ? f / 2 * a * a : -f / 2 * (--a * (a - 2) - 1)) + b\n };\n a.easeinback = function (a, b, f) {\n return f * a * a * (2.70158 * a - 1.70158) + b\n };\n a.easeoutback = function (a, b, f) {\n return f * (--a * a * (2.70158 * a + 1.70158) + 1) + b\n };\n a.easeinoutback = function (a, b, f) {\n var g = 1.70158;\n return 1 > (a *= 2) ? f / 2 * a * a * (((g *= 1.525) + 1) * a - g) + b : f / 2 * ((a -= 2) * a * (((g *= 1.525) + 1) * a + g) + 2) + b\n };\n a.easeincubic = function (a, b, f) {\n return f * a * a * a + b\n };\n a.easeoutcubic = function (a, b, f) {\n return f * (--a * a * a + 1) + b\n };\n a.easeinquart = function (a, b, f) {\n return f * a * a * a * a + b\n };\n a.easeoutquart = function (a, b, f) {\n return -f * ((a = a / 1 - 1) * a * a * a - 1) + b\n };\n a.easeinquint = function (a, b, f) {\n return f * a * a * a * a * a + b\n };\n a.easeoutquint = function (a, b, f) {\n return f * ((a = a / 1 - 1) * a * a * a * a + 1) + b\n };\n a.easeinsine = function (a, b, f) {\n return -f * Math.cos(Ga / 2 * a) + f + b\n };\n a.easeoutsine = function (a, b, f) {\n return f * Math.sin(Ga / 2 * a) + b\n };\n a.easeinexpo = function (a, b, f) {\n return 0 == a ? b : f * Math.pow(2, 10 * (a - 1)) + b - .001 * f\n };\n a.easeoutexpo = function (a, b, f) {\n return 1 == a ? b + f : 1.001 * f * (-Math.pow(2, -10 * a) + 1) + b\n };\n a.easeincirc = function (a, b, f) {\n return -f * (Math.sqrt(1 - a * a) - 1) + b\n };\n a.easeoutcirc = function (a, b, f) {\n return f * Math.sqrt(1 - (a = a / 1 - 1) * a) + b\n };\n a.easeoutbounce = function (a, b, f) {\n return a < 1 / 2.75 ? 7.5625 * f * a * a + b : a < 2 / 2.75 ? f * (7.5625 * (a -= 1.5 / 2.75) * a + .75) + b : a < 2.5 / 2.75 ? f * (7.5625 * (a -= 2.25 / 2.75) * a + .9375) + b : f * (7.5625 * (a -= 2.625 / 2.75) * a + .984375) + b\n };\n a.easeinbounce = function (b, m, f) {\n return f - a.easeoutbounce(1 - b, 0, f) + m\n };\n a.getTweenfu = function (b) {\n b = F(b);\n \"\" == b || \"null\" == b ? b = _[56] : void 0 === a[b] && (b = _[56]);\n return a[b]\n }\n })();\n\n var da = {};\n (function () {\n function a(a, b, c) {\n var d, h = a.length;\n c = 1 != c;\n for (d = 0; d < h; d++) {\n var e = \"\" + a[d], g = e.toLowerCase();\n c && \"null\" == g ? a[d] = null : 41 == e.charCodeAt(e.length - 1) && (g = g.slice(0, 4), \"get(\" == g ? a[d] = U(Ha(e.slice(4, e.length - 1)), b) : \"calc\" == g && 40 == e.charCodeAt(4) && (a[d] = U(e, b)))\n }\n }\n\n function b(a, c) {\n var d, e, h, g = 0, f = 0, k = 0;\n h = \"\";\n d = 0;\n for (e = a.length; d < e;) {\n h = a.charCodeAt(d);\n if (!(32 >= h))if (34 == h)0 == k ? k = 1 : 1 == k && (k = 0); else if (39 == h)0 == k ? k = 2 : 2 == k && (k = 0); else if (0 == k)if (91 == h)0 == f && (f = d + 1), g++; else if (93 == h && 0 < g && (g--, 0 == g)) {\n if (h = oc(a, f, d, c))a = a.slice(0, f) + h + a.slice(d), d = f + h.length + 1, e = a.length;\n f = 0\n }\n d++\n }\n return a\n }\n\n function E(a, b) {\n var c = \"\", d, h, e, g, f;\n e = a.length;\n f = b.length;\n for (h = 0; h < e; h++)d = a.charAt(h), \"%\" == d ? (h++, d = a.charCodeAt(h) - 48, 0 <= d && 9 >= d ? (h + 1 < e && (g = a.charCodeAt(h + 1) - 48, 0 <= g && 9 >= g && (h++, d = 10 * d + g)), c = d < f ? c + (\"\" + b[d]) : c + \"null\") : c = -11 == d ? c + \"%\" : c + (\"%\" + a.charAt(h))) : c += d;\n return c\n }\n\n function f(a, b, c, d) {\n c = Array.prototype.slice.call(c);\n c.splice(0, 0, a);\n b = E(b, c);\n h.callaction(b, d, !0)\n }\n\n function g(a, b, c) {\n var krpano = m;\n var caller = c;\n var args = b;\n var resolve = y;\n var actions = h;\n try {\n eval(a, c)\n } catch (d) {\n la(3, b[0] + \" - \" + d)\n }\n }\n\n function n(a) {\n var b = c, d = b.length, h;\n for (h = 0; h < d; h++)if (b[h].id == a) {\n b.splice(h, 1);\n break\n }\n }\n\n function k(a) {\n var b = a.length;\n if (2 == b || 3 == b) {\n var c = U(a[b - 2], h.actioncaller), d = U(a[b - 1], h.actioncaller);\n null == c && (c = a[b - 2]);\n null == d && (d = a[b - 1]);\n return [a[0], parseFloat(c), parseFloat(d)]\n }\n return null\n }\n\n function e(a, b, c) {\n var d = 1 == b.length ? U(b[0], c) : b[1], d = 0 == a ? escape(d) : unescape(d);\n I(b[0], d, !1, c, !0)\n }\n\n function w(a) {\n if (1 == a.length)return a[0];\n var b, c = null, d = null, h = null, c = !1;\n for (b = 0; b < a.length; b++)if (c = \"\" + a[b], 0 < c.length && 0 <= _[442].indexOf(c)) {\n if (0 == b || b >= a.length - 1)throw _[33];\n d = a[b - 1];\n h = a[b + 1];\n switch (c) {\n case \"===\":\n case \"==\":\n c = d == h;\n break;\n case \"!==\":\n case \"!=\":\n c = d != h;\n break;\n case \"<\":\n c = d < h;\n break;\n case \"<=\":\n c = d <= h;\n break;\n case \">\":\n c = d > h;\n break;\n case \">=\":\n c = d >= h;\n break;\n default:\n throw _[33];\n }\n a.splice(b - 1, 3, c);\n b -= 2\n }\n if (1 == a.length)return a[0];\n for (b = 0; b < a.length; b++)if (c = a[b], \"&&\" == c || \"||\" == c) {\n if (0 == b || b >= a.length - 1)throw _[33];\n d = a[b - 1];\n h = a[b + 1];\n c = \"&&\" == c ? d && h : d || h;\n a.splice(b - 1, 3, c);\n b -= 2\n }\n if (5 == a.length && \"?\" == a[1] && \":\" == a[3])return a[0] ? a[2] : a[4];\n if (1 < a.length)throw _[33];\n return a[0]\n }\n\n function x(a) {\n var b = void 0, b = F(a), c = b.charCodeAt(0), d, e = 0, g = !1;\n 64 == c && (g = !0, a = a.slice(1), b = b.slice(1), c = b.charCodeAt(0));\n if (39 == c || 34 == c)return Ha(a);\n if (33 == c || 43 == c || 45 == c)e = c, a = a.slice(1), b = b.slice(1), c = b.charCodeAt(0);\n d = b.charCodeAt(b.length - 1);\n 40 == c && 41 == d ? b = v(a.slice(1, -1)) : 37 == d ? b = a : (b = \"null\" != b ? U(a, h.actioncaller, !0) : null, void 0 === b ? (c = Number(a), isNaN(c) || isNaN(parseFloat(a)) ? g && (b = a) : b = c) : _[13] == typeof b && (a = F(b), \"true\" == a ? b = !0 : _[31] == a ? b = !1 : \"null\" == a ? b = null : (a = Number(b), isNaN(a) || (b = a))));\n 33 == e ? b = !b : 45 == e && (b = -b);\n return b\n }\n\n function v(a) {\n var b;\n if (\"\" == a || null === a)return a;\n try {\n var c, d = a.length, h = 0, e = 0, g = !1, f = !1, k = 0, n = 0, t = 0, G = !1, q = [], l = 0, r = 0;\n for (c = 0; c < d; c++)if (r = a.charCodeAt(c), 0 == G && 32 >= r)0 < e && (q[l++] = a.substr(h, e), e = 0), g = !1; else if (0 == G && (61 == r || 33 == r && 61 == a.charCodeAt(c + 1) || 62 == r || 60 == r))0 == g && (0 < e ? (q[l++] = a.substr(h, e), e = 0) : 0 == l && 0 == m.strict && (q[l++] = \"\"), g = !0, f = !1, h = c), e++; else if (0 != G || 43 != r && 45 != r && 42 != r && 47 != r && 94 != r && 63 != r && 58 != r) {\n if (0 == t)if (91 == r)k++, G = !0; else if (93 == r)k--, 0 == k && 0 == n && (G = !1); else if (40 == r)n++, G = !0; else if (41 == r)n--, 0 == n && 0 == k && (G = !1); else {\n if (39 == r || 34 == r)t = r, G = !0\n } else r == t && (t = 0, 0 == k && 0 == n && (G = !1));\n if (g || f)0 < e && (q[l++] = a.substr(h, e), e = 0), f = g = !1, h = c;\n 0 == e && (h = c);\n e++\n } else 0 < e && (q[l++] = a.substr(h, e)), g = !1, f = !0, h = c, e = 1;\n 0 < e && (q[l++] = a.substr(h, e));\n 2 == l && g && 0 == m.strict && (q[l++] = \"\");\n if (0 == m.strict) {\n var u = q.length;\n if (!(3 > u)) {\n var p, v;\n for (p = 1; p < u - 1; p++)if (v = q[p], \"==\" == v || \"!=\" == v) {\n q[p - 1] = \"@\" + q[p - 1];\n v = q[p + 1];\n if (\"+\" == v || \"-\" == v)for (p++, v = q[p + 1]; \"+\" == v || \"-\" == v;)p++, v = q[p + 1];\n q[p + 1] = \"@\" + v\n }\n }\n }\n var J = q.length, z, y, D;\n if (1 == J)q[0] = x(q[0]); else for (z = 0; z < J; z++)if (y = q[z], !(0 <= \"<=>=!===+-*/^||&&?:\".indexOf(y))) {\n switch (y) {\n case \"AND\":\n D = \"&&\";\n break;\n case \"OR\":\n D = \"||\";\n break;\n case \"GT\":\n D = \">\";\n break;\n case \"GE\":\n D = \">=\";\n break;\n case \"LT\":\n D = \"<\";\n break;\n case \"LE\":\n D = \"<=\";\n break;\n case \"EQ\":\n D = \"==\";\n break;\n case \"LSHT\":\n D = \"<<\";\n break;\n case \"RSHT\":\n D = \">>\";\n break;\n case \"BAND\":\n D = \"~&\";\n break;\n case \"BOR\":\n D = \"~|\";\n break;\n default:\n D = x(y)\n }\n q[z] = D\n }\n var F = q.length;\n if (!(2 > F)) {\n var E, K;\n c = null;\n for (E = 0; E < q.length; E++)if (c = q[E], \"+\" == c || \"-\" == c)if (0 == E || 0 <= \".<.<<.<=.==.===.=>.>.>>.!=.!==.+.-.*./.^.&&.||.?.:.~|.~&.\".indexOf(\".\" + q[E - 1] + \".\")) {\n K = 45 == c.charCodeAt(0) ? -1 : 1;\n F = 1;\n for (c = \"\" + q[E + F]; \"+\" == c || \"-\" == c;)K *= 45 == c.charCodeAt(0) ? -1 : 1, F++, c = \"\" + q[E + F];\n c && 40 == c.charCodeAt(0) && (c = x(c));\n c = c && 37 == c.charCodeAt(c.length - 1) ? parseFloat(c) * K + \"%\" : Number(c) * K;\n q.splice(E, 1 + F, c);\n --E\n }\n for (E = 1; E < q.length - 1; E++)c = q[E], \"*\" == c ? (q.splice(E - 1, 3, Number(q[E - 1]) * Number(q[E + 1])), E -= 3) : \"/\" == c ? (q.splice(E - 1, 3, Number(q[E - 1]) / Number(q[E + 1])), E -= 3) : \"^\" == c ? (q.splice(E - 1, 3, Math.pow(Number(q[E - 1]), Number(q[E + 1]))), E -= 3) : \"<<\" == c ? (q.splice(E - 1, 3, Number(q[E - 1]) << Number(q[E + 1])), E -= 3) : \">>\" == c ? (q.splice(E - 1, 3, Number(q[E - 1]) >> Number(q[E + 1])), E -= 3) : \"~&\" == c ? (q.splice(E - 1, 3, Number(q[E - 1]) & Number(q[E + 1])), E -= 3) : \"~|\" == c && (q.splice(E - 1, 3, Number(q[E - 1]) | Number(q[E + 1])), E -= 3);\n for (E = 1; E < q.length - 1; E++)c = q[E], \"+\" == c ? (q.splice(E - 1, 3, q[E - 1] + q[E + 1]), E -= 3) : \"-\" == c && (q.splice(E - 1, 3, Number(q[E - 1]) - Number(q[E + 1])), E -= 3)\n }\n b = w(q)\n } catch (L) {\n la(3, L + \": \" + a)\n }\n return b\n }\n\n function r(a) {\n var b = a.position;\n 1 == a.motionmode ? (b *= a.Tmax, b <= a.T1 ? b *= a.accelspeed / 2 * b : b > a.T1 && b <= a.T1 + a.T2 ? b = a.S1 + (b - a.T1) * a.Vmax : (b -= a.T1 + a.T2, b = a.Vmax * b + a.breakspeed / 2 * b * b + a.S1 + a.S2), b = 0 != a.Smax ? b / a.Smax : 1) : 2 == a.motionmode && (b = a.tweenfu(b, 0, 1));\n p.hlookat = a.startH + b * (a.destH - a.startH);\n p.vlookat = a.startV + b * (a.destV - a.startV);\n p.fov = a.startF + b * (a.destF - a.startF)\n }\n\n function y(a, b) {\n var c = U(a, b);\n null == c && (c = a);\n return c\n }\n\n function l(a) {\n var b = a.waitfor;\n \"load\" == b ? Xa.isLoading() && (a.position = 0) : _[73] == b && Xa.isBlending() && (a.position = 0)\n }\n\n function u(a) {\n var b = a.varname, c = parseFloat(a.startval), d = parseFloat(a.endval), e = null != a.startval ? 0 < String(a.startval).indexOf(\"%\") : !1, g = null != a.endval ? 0 < String(a.endval).indexOf(\"%\") : !1;\n g ? e || (c = 0) : e && 0 == d && (g = !0);\n var e = 0, e = a.position, f = a.tweenmap;\n 0 <= b.indexOf(_[47], b.lastIndexOf(\".\") + 1) ? (c = parseInt(a.startval), d = parseInt(a.endval), 1 <= e ? e = d : (e = f(e, 0, 1), e = Math.min(Math.max((c >> 24) + e * ((d >> 24) - (c >> 24)), 0), 255) << 24 | Math.min(Math.max((c >> 16 & 255) + e * ((d >> 16 & 255) - (c >> 16 & 255)), 0), 255) << 16 | Math.min(Math.max((c >> 8 & 255) + e * ((d >> 8 & 255) - (c >> 8 & 255)), 0), 255) << 8 | Math.min(Math.max((c & 255) + e * ((d & 255) - (c & 255)), 0), 255))) : e = 1 <= e ? d : f(e, c, d - c);\n I(b, g ? e + \"%\" : e, !0, a.actioncaller);\n null != a.updatefu && h.callaction(a.updatefu, a.actioncaller)\n }\n\n var h = da;\n h.busy = !1;\n h.blocked = !1;\n h.queue = [];\n h.actioncaller = null;\n var c = [], K = [], D = null, z = 0, q = function () {\n this.id = null;\n this.blocking = !1;\n this.position = this.maxruntime = this.starttime = 0;\n this.updatefu = this.actioncaller = this.donecall = this.process = null\n };\n h.copyattributes = function (a, b) {\n for (var c in b) {\n var d = F(c);\n if (\"name\" != d && \"index\" != d && \"_type\" != d) {\n var e = b[c];\n if (_[11] !== typeof e) {\n if (e && _[13] == typeof e) {\n var h = e.slice(0, 4);\n \"get:\" == h ? e = U(e.slice(4)) : \"calc\" == h && 58 == e.charCodeAt(4) && (e = v(e.slice(5)))\n }\n a[d] = _[67] == typeof a[d] ? pa(e) : e\n }\n }\n }\n };\n h.assignstyle = function (a, b) {\n var c = U(a);\n if (c && (null == b && (b = c.style), b)) {\n c.style = b;\n var d = b.split(\"|\"), e, g;\n g = d.length;\n for (e = 0; e < g; e++) {\n var f = U(_[515] + d[e] + \"]\");\n f ? h.copyattributes(c, f) : la(3, a + _[198] + d[e])\n }\n }\n };\n h.isblocked = function () {\n if (h.blocked) {\n var a = D;\n if (a)D = null, h.stopall(), \"break\" != F(a) && h.callaction(a), h.processactions(); else return !0\n }\n return !1\n };\n h.actions_autorun = function (a, b) {\n var c = m.action.getArray(), d = [], e, g, f = null;\n g = c.length;\n for (e = 0; e < g; e++)(f = c[e]) && f.autorun == a && !f._arDone && (f._arDone = !0, d.push(f));\n g = d.length;\n if (0 < g) {\n c = \"\";\n for (e = 0; e < g; e++)f = d[e], c += _[452] + f.name + \");\";\n h.callaction(c, null, b);\n h.processactions()\n }\n };\n h.callwith = function (a, b) {\n var c = U(a, h.actioncaller);\n if (c) {\n var d = c._type;\n _[29] != d && _[1] != d || h.callaction(b, c)\n }\n };\n\n //sohow_base64\n h.callaction = function (a, b, c) {\n if (a && \"null\" != a && \"\" != a) {\n var d = typeof a;\n if (_[11] === d)\n a();\n else if (_[144] !== d && (a = Gb(a, b))) {\n var d = a.length, e = 0 < h.queue.length, g = !1;\n for (b = 0; b < d; b++) {\n var f = a[b];\n _[314] == f.cmd && (g = !0);\n f.breakable = g;\n 1 == c ? h.queue.splice(b, 0, f) : h.queue.push(f)\n }\n 0 == e && h.processactions()\n }\n }\n };\n var J = !1;\n h.processactions = function () {\n if (!J) {\n J = !0;\n for (var b = null, c = null, d = null, e = null, f = 0, q = h.queue; null != q && 0 < q.length;) {\n if (h.busy || h.blocked) {\n J = !1;\n return\n }\n f++;\n if (1E5 < f) {\n la(2, _[89]);\n q.length = 0;\n break\n }\n b = q.shift();\n c = String(b.cmd);\n d = b.args;\n b = b.caller;\n h.actioncaller = b;\n if (!(b && b._busyonloaded && b._destroyed) && \"//\" != c.slice(0, 2))if (\"call\" == c && (c = F(d.shift())), a(d, b, \"set\" == c), void 0 !== h[c])h[c].apply(h[c], d); else if (b && void 0 !== b[c])e = b[c], _[11] === typeof e ? e.apply(e, d) : h.callaction(b[c], b, !0); else {\n if (_[14] == c || \"call\" == c)c = F(d.shift());\n e = null;\n if (null != (e = U(c))) {\n var k = typeof e;\n _[11] === k ? e.apply(e, d) : _[144] === k ? la(2, _[87] + id(c)) : _[13] === typeof e && (d.splice(0, 0, c), e = E(e, d), h.callaction(e, b, !0))\n } else if (k = U(_[453] + c + \"]\")) {\n if (e = k.content)d.splice(0, 0, c), _[372] === F(k.type) ? g(e, d, b) : (e = E(e, d), h.callaction(e, b, !0))\n } else la(2, _[87] + id(c))\n }\n }\n h.blocked || (D = null);\n h.actioncaller = null;\n J = !1\n }\n };\n h.processAnimations = function (a) {\n var b = !1, d = c, e = d.length, g, f = Ta();\n a = 1 == a;\n for (g = 0; g < e; g++) {\n var q = d[g];\n if (q) {\n var k = 0 < q.maxruntime ? (f - q.starttime) / 1E3 / q.maxruntime : 1;\n isNaN(k) && (k = 1);\n 1 < k && (k = 1);\n q.position = k;\n null != q.process && (b = !0, q.process(q), k = q.position);\n if (1 <= k || a)d.splice(g, 1), e--, g--, q.blocking ? (h.blocked = !1, h.processactions()) : q.donecall && 0 == a && h.callaction(q.donecall, q.actioncaller)\n }\n }\n h.blocked && (b = !1);\n return b\n };\n h.fromcharcode = function () {\n var a = arguments;\n 2 == a.length && I(a[0], String.fromCharCode(y(a[1], h.actioncaller)), !1, h.actioncaller)\n };\n h.stopmovements = function () {\n Pa.stopFrictions(4)\n };\n h.stopall = function () {\n var a, b, d = h.queue;\n b = d.length;\n for (a = 0; a < b; a++) {\n var e = d[a];\n e && e.breakable && (e.cmd = \"//\")\n }\n c = [];\n h.blocked = !1\n };\n h.breakall = function () {\n h.processAnimations(!0)\n };\n h.oninterrupt = function (a) {\n D = a\n };\n h.delayedcall = function () {\n var a = arguments, b = a.length, d = 0;\n 3 == b && (d++, b--);\n 2 == b && (b = new q, b.maxruntime = Number(a[d]), b.donecall = a[d + 1], b.starttime = Ta(), b.actioncaller = h.actioncaller, b.id = 0 < d ? \"ID\" + F(a[0]) : \"DC\" + ++z, n(b.id), c.push(b))\n };\n h.stopdelayedcall = function (a) {\n n(\"ID\" + F(a))\n };\n h.set = function () {\n var a = arguments;\n 2 == a.length && I(a[0], a[1], !1, h.actioncaller)\n };\n h.copy = function () {\n var a = arguments;\n if (2 == a.length) {\n var b = U(a[1], h.actioncaller);\n I(a[0], void 0 === b ? null : b, !1, h.actioncaller)\n }\n };\n h.push = function () {\n var a = arguments;\n 1 == a.length && K.push(U(a[0], h.actioncaller))\n };\n h.pop = function () {\n var a = arguments;\n 1 == a.length && I(a[0], K.pop(), !1, h.actioncaller)\n };\n h[_[508]] = function () {\n var a = arguments, b = a.length, c = a[0], d = F(U(c, h.actioncaller));\n if (1 == b)I(c, !pa(d), !0, h.actioncaller); else if (3 <= b) {\n var e;\n b--;\n for (e = 1; e <= b; e++) {\n var g = F(a[e]), f = !1;\n isNaN(Number(d)) || isNaN(Number(g)) ? d == g && (f = !0) : Number(d) == Number(g) && (f = !0);\n if (f) {\n e++;\n e > b && (e = 1);\n I(c, a[e], !0, h.actioncaller);\n break\n }\n }\n }\n };\n h.roundval = function () {\n var a = arguments;\n if (1 <= a.length) {\n var b = Number(U(a[0], h.actioncaller)), c = 2 == a.length ? parseInt(a[1]) : 0, b = 0 == c ? Math.round(b).toString() : b.toFixed(c);\n I(a[0], b, !1, h.actioncaller, !0)\n }\n };\n h.tohex = function () {\n var a = arguments, b = a.length;\n if (0 < b) {\n var c = parseInt(U(a[0], h.actioncaller)).toString(16).toUpperCase();\n 2 < b && (c = (_[419] + c).slice(-parseInt(a[2])));\n 1 < b && (c = a[1] + c);\n I(a[0], c, !1, h.actioncaller, !0)\n }\n };\n h.tolower = function () {\n var a = arguments;\n 1 == a.length && I(a[0], F(U(a[0], h.actioncaller)), !1, h.actioncaller, !0)\n };\n h.toupper = function () {\n var a = arguments;\n 1 == a.length && I(a[0], (\"\" + U(a[0], h.actioncaller)).toUpperCase(), !1, h.actioncaller, !0)\n };\n h.inc = function () {\n var a = arguments, b = a.length;\n if (1 <= b) {\n var c = Number(U(a[0], h.actioncaller)) + (1 < b ? Number(a[1]) : 1);\n 3 < b && c > Number(a[2]) && (c = Number(a[3]));\n I(a[0], c, !0, h.actioncaller)\n }\n };\n h.dec = function () {\n var a = arguments, b = a.length;\n if (1 <= b) {\n var c = Number(U(a[0], h.actioncaller)) - (1 < b ? Number(a[1]) : 1);\n 3 < b && c < Number(a[2]) && (c = Number(a[3]));\n I(a[0], c, !0, h.actioncaller)\n }\n };\n h.add = function () {\n var a = k(arguments);\n a && I(a[0], a[1] + a[2], !1, h.actioncaller)\n };\n h.sub = function () {\n var a = k(arguments);\n a && I(a[0], a[1] - a[2], !1, h.actioncaller)\n };\n h.mul = function () {\n var a = k(arguments);\n a && I(a[0], a[1] * a[2], !1, h.actioncaller)\n };\n h.div = function () {\n var a = k(arguments);\n a && I(a[0], a[1] / a[2], !1, h.actioncaller)\n };\n h.mod = function () {\n var a = k(arguments);\n if (a) {\n var b = a[1], c = b | 0, b = b + (-c + c % (a[2] | 0));\n I(a[0], b, !1, h.actioncaller)\n }\n };\n h.pow = function () {\n var a = k(arguments);\n a && I(a[0], Math.pow(a[1], a[2]), !1, h.actioncaller)\n };\n h.clamp = function () {\n var a = arguments;\n if (3 == a.length) {\n var b = h.actioncaller, c = Number(U(a[0], b)), d = Number(a[1]), e = Number(a[2]);\n c < d && (c = d);\n c > e && (c = e);\n I(a[0], c, !1, b)\n }\n };\n h.remapfovtype = function () {\n var a = arguments, b = a.length;\n if (3 == b || 5 == b) {\n var c = h.actioncaller, d = Number(U(a[0], c)), e = 3 == b ? m.area.pixelwidth : Number(U(a[3], c)), b = 3 == b ? m.area.pixelheight : Number(U(a[4], c)), d = p.fovRemap(d, a[1], a[2], e, b);\n I(a[0], d, !1, c)\n }\n };\n h.screentosphere = function () {\n var a = arguments;\n if (4 == a.length) {\n var b = h.actioncaller, c = p.screentosphere(Number(U(a[0], b)), Number(U(a[1], b)));\n I(a[2], c.x, !1, b);\n I(a[3], c.y, !1, b)\n }\n };\n h.spheretoscreen = function () {\n var a = arguments;\n if (4 == a.length) {\n var b = h.actioncaller, c = p.spheretoscreen(Number(U(a[0], b)), Number(U(a[1], b)));\n I(a[2], c.x, !1, b);\n I(a[3], c.y, !1, b)\n }\n };\n h.screentolayer = function () {\n var a = arguments;\n if (5 == a.length) {\n var b = h.actioncaller, c = xa.getItem(a[0]);\n if (c) {\n var d = Number(U(a[1], b)), e = Number(U(a[2], b)), g = tc, f = tc, q = c.sprite;\n if (q) {\n var k = X, f = V.viewerlayer.getBoundingClientRect(), n = q.getBoundingClientRect(), g = d * k - (n.left - f.left + q.clientLeft + q.scrollLeft), f = e * k - (n.top - f.top + q.clientTop + q.scrollTop);\n c.scalechildren && (k = 1);\n g /= c._finalxscale * k;\n f /= c._finalyscale * k\n }\n I(a[3], g, !1, b);\n I(a[4], f, !1, b)\n }\n }\n };\n h.layertoscreen = function () {\n var a = arguments;\n if (5 == a.length) {\n var b = h.actioncaller, c = xa.getItem(a[0]);\n if (c) {\n var d = Number(U(a[1], b)), e = Number(U(a[2], b)), g = tc, f = tc, q = c.sprite;\n if (q)var f = X, k = c.scalechildren ? f : 1, n = V.viewerlayer.getBoundingClientRect(), t = q.getBoundingClientRect(), g = d * c._finalxscale / k + (t.left - n.left + q.clientLeft + q.scrollLeft) / f, f = e * c._finalyscale / k + (t.top - n.top + q.clientTop + q.scrollTop) / f;\n I(a[3], g, !1, b);\n I(a[4], f, !1, b)\n }\n }\n };\n h.escape = function () {\n e(0, arguments, h.actioncaller)\n };\n h.unescape = function () {\n e(1, arguments, h.actioncaller)\n };\n h.txtadd = function () {\n var a = arguments, b, c = a.length, d = 2 == c ? String(U(a[0], h.actioncaller)) : \"\";\n \"null\" == d && (d = \"\");\n for (b = 1; b < c; b++)d += a[b];\n I(a[0], d, !1, h.actioncaller, !0)\n };\n h.subtxt = function () {\n var a = arguments, b = a.length;\n if (2 <= b) {\n var c = U(a[1], h.actioncaller), c = null == c ? String(a[1]) : String(c), c = c.substr(2 < b ? Number(a[2]) : 0, 3 < b ? Number(a[3]) : void 0);\n I(a[0], c, !1, h.actioncaller, !0)\n }\n };\n h.indexoftxt = function () {\n var a = arguments, b = a.length;\n 3 <= b && (b = String(a[1]).indexOf(String(a[2]), 3 < b ? Number(a[3]) : 0), I(a[0], b, !1, h.actioncaller, !0))\n };\n h.txtreplace = function () {\n var a = arguments, b = a.length;\n if (3 == b || 4 == b) {\n var b = 3 == b ? 0 : 1, c = U(a[b], h.actioncaller);\n if (c)var d = a[b + 2], c = c.split(a[b + 1]).join(d);\n I(a[0], c, !1, h.actioncaller, !0)\n }\n };\n h.txtsplit = function () {\n var a = arguments, b = a.length;\n if (3 <= b) {\n var c = (\"\" + y(a[0], h.actioncaller)).split(\"\" + a[1]), d;\n if (3 == b)for (d = 0; d < c.length; d++)I(a[2] + \"[\" + d + _[455], c[d], !1, h.actioncaller, !0); else for (d = 2; d < b; d++)I(a[d], c[d - 2], !1, h.actioncaller, !0)\n }\n };\n h.showlog = function () {\n var a = arguments, a = !(1 == a.length && 0 == pa(a[0]));\n V.showlog(a)\n };\n h.trace = function () {\n var a = arguments, b, c = a.length, d = \"\", e = h.actioncaller;\n for (b = 0; b < c; b++)var g = a[b], f = U(g, e), d = null != f ? d + f : d + g;\n la(1, d)\n };\n h[_[507]] = function () {\n var a = arguments, b, c = a.length, d = h.actioncaller;\n for (b = 0; b < c; b++)a:{\n var e = d, g = void 0, f = void 0, q = void 0, k = Vc(a[b]), f = k.length;\n if (1 == f && e && (q = k[0], e.hasOwnProperty(q))) {\n e[q] = null;\n delete e[q];\n break a\n }\n for (var n = m, g = 0; g < f; g++) {\n var q = k[g], t = g == f - 1, G = null, l = q.indexOf(\"[\");\n 0 < l && (G = oc(q, l + 1, q.length - 1, e), q = q.slice(0, l));\n if (void 0 !== n[q]) {\n if (null != G && (l = n[q], l.isArray))if (q = l.getItem(G))if (t)break a; else {\n n = q;\n continue\n } else break;\n if (t) {\n n[q] = null;\n delete n[q];\n break a\n } else n = n[q]\n } else break\n }\n }\n };\n h.error = function () {\n 1 == arguments.length || !1 !== pa(arguments[1]) ? Ea(arguments[0]) : la(3, arguments[0])\n };\n h.openurl = function () {\n var a = arguments;\n L.open(a[0], 0 < a.length ? a[1] : _[504])\n };\n h.loadscene = function () {\n var a = arguments;\n if (0 < a.length) {\n var b = a[0], c = U(_[72] + b + _[61]), d = U(_[72] + b + _[394]);\n d && (d += \";\");\n null == c ? la(3, 'loadscene() - scene \"' + b + '\" not found') : (m.xml.scene = b, m.xml.view = {}, Xa.loadxml(_[124] + c + _[117], a[1], a[2], a[3], d))\n }\n };\n h.jsget = function () {\n var a = arguments;\n if (2 == a.length) {\n var b = a[0], c = a[1], d = null;\n try {\n (function () {\n var krpano = V.viewerlayer;\n d = eval(c)\n })()\n } catch (e) {\n la(3, \"js\" + (b ? \"get\" : \"call\") + '() - calling Javascript \"' + c + '\" failed: ' + e)\n }\n b && I(b, d, !1, h.actioncaller)\n }\n };\n h.jscall = function () {\n var a = arguments;\n 1 == a.length && h.jsget(null, a[0])\n };\n h.parseFunction = function (b) {\n var c = null;\n if (b = Gb(b, null, !0))b = b[0], a(b.args, h.actioncaller), c = [b.cmd].concat(b.args);\n return c\n };\n h.js = function (b) {\n b = \"\" + b;\n var c = Gb(b, null, !0);\n if (c) {\n c = c[0];\n a(c.args, h.actioncaller);\n var d = !1;\n if (_[11] == typeof L[c.cmd]) {\n d = !0;\n try {\n L[c.cmd].apply(L[c.cmd], c.args)\n } catch (e) {\n d = !1\n }\n }\n if (0 == d) {\n c = c.cmd + (0 < c.args.length ? \"('\" + c.args.join(\"','\") + \"');\" : \"();\");\n try {\n eval(c)\n } catch (g) {\n la(2, 'js() - calling Javascript \"' + b + '\" failed: ' + g)\n }\n }\n }\n };\n h.setfov = function () {\n var a = arguments;\n 1 == a.length && (p.fov = Number(a[0]))\n };\n h.lookat = function () {\n var a = arguments;\n if (2 <= a.length) {\n var b;\n b = Number(a[0]);\n isNaN(b) || (p.hlookat = b);\n b = Number(a[1]);\n isNaN(b) || (p.vlookat = b);\n b = Number(a[2]);\n isNaN(b) || (p.fov = b);\n b = Number(a[3]);\n isNaN(b) || (p.distortion = b);\n b = Number(a[4]);\n isNaN(b) || (p.architectural = b);\n b = Number(a[5]);\n isNaN(b) || (p.pannini = \"\" + b)\n }\n };\n h.adjusthlookat = function () {\n var a = arguments;\n 1 == a.length && (p.hlookat = nc(p.hlookat, Number(a[0])))\n };\n h.adjust360 = function () {\n var a = arguments;\n if (2 == a.length) {\n var b = h.actioncaller;\n I(a[0], nc(U(a[0], b), Number(y(a[1], b))), !1, b)\n }\n };\n h.loop = function () {\n f(\"loop\", _[192], arguments, h.actioncaller)\n };\n h.asyncloop = function () {\n f(_[402], _[164], arguments, h.actioncaller)\n };\n h[\"for\"] = function () {\n f(\"for\", _[155], arguments, h.actioncaller)\n };\n h.asyncfor = function () {\n f(_[409], \"if('%5'!='NEXTLOOP',%1);if(%2,%4;%3;delayedcall(0,asyncfor(%1,%2,%3,%4,NEXTLOOP)););\", arguments, h.actioncaller)\n };\n h.calc = function () {\n var a, b = arguments;\n 2 == b.length && (a = v(b[1]), b[0] && I(b[0], a, !1, h.actioncaller));\n return a\n };\n h.resolvecondition = function () {\n var a = h.actioncaller, b = arguments, c = b.length, d = null, e = null, e = !1;\n if (2 == c || 3 == c) {\n d = F(b[0]);\n e = 2 == c ? b[1] : b[2];\n if (\"null\" == d || \"\" == d)d = null;\n e = null == e || \"\" == e ? !1 : v(e);\n null != d && (3 == c && (b = F(b[1]), c = pa(U(d, a)), \"and\" == b ? e = c && e : \"or\" == b ? e = c || e : \"xor\" == b && (e = !(c && e) && (c || e))), I(d, e, !1, a))\n }\n return e\n };\n h[\"if\"] = function () {\n var a = arguments, b = h.actioncaller;\n 2 <= a.length && (v(a[0]) ? h.callaction(a[1], b, !0) : 3 == a.length && h.callaction(a[2], b, !0))\n };\n h.ifnot = function () {\n var a = arguments;\n h[\"if\"](a[0], a[2], a[1])\n };\n h.stoplookto = function () {\n n(_[69])\n };\n h.lookto = function () {\n var b = arguments, d = b.length;\n if (2 <= d) {\n var e = h.actioncaller, g = new q;\n h.stopmovements();\n n(_[69]);\n g.id = _[69];\n g.actioncaller = e;\n 1 == pa(b[5]) ? (g.blocking = !1, g.donecall = b[6]) : (g.blocking = !0, h.blocked = !0);\n 4 < d && void 0 === b[4] && d--;\n 3 < d && void 0 === b[3] && d--;\n 2 < d && void 0 === b[2] && d--;\n var f = Number(b[0]), k = Number(b[1]), l = 2 < d ? Number(b[2]) : p.fov, m = 3 < d ? b[3] : null, u = 4 < d ? pa(b[4]) : !0;\n if (!(isNaN(f) || isNaN(k) || isNaN(l))) {\n var B = 1, b = 720, d = -720, t = 720, G = p.hlookat, w = G, P = p.vlookat, v = p.fov;\n if (u) {\n for (; -90 > k || 90 < k;)-90 > k ? (k = -180 - k, f += 180) : 90 < k && (k = 180 - k, f -= 180);\n for (; 0 > G;)G += 360;\n for (; 360 < G;)G -= 360;\n for (; 0 > f;)f += 360;\n for (; 360 < f;)f -= 360;\n for (; -180 > P;)P += 360;\n for (; 180 < P;)P -= 360;\n G = nc(G, f);\n P = nc(P, k);\n u = G - w;\n G -= u;\n f -= u\n }\n g.startH = G;\n g.startV = P;\n g.startF = v;\n g.destH = f;\n g.destV = k;\n g.destF = l;\n f = Math.sqrt((f - G) * (f - G) + (k - P) * (k - P) + (l - v) * (l - v));\n m && ((m = Gb(m)) && (m = m[0]), m && (k = m.cmd, l = m.args, a(l, e), _[43] == k ? (B = 0, t = 360, 1 == m.args.length && (t = parseFloat(l[0]))) : _[496] == k ? (B = 1, 0 < m.args.length && (b = parseFloat(l[0])), 1 < m.args.length && (d = parseFloat(l[1])), 2 < m.args.length && (t = parseFloat(l[2])), b = +Math.abs(b), d = -Math.abs(d), t = +Math.abs(t)) : \"tween\" == k && (B = 2, g.tweenfu = ac.getTweenfu(l[0]), g.maxruntime = parseFloat(l[1]), isNaN(g.maxruntime) && (g.maxruntime = .5))));\n g.motionmode = B;\n 0 == B ? g.maxruntime = f / t : 1 == B && (e = f, B = t * t / (2 * b), m = t / b, f = -(t * t) / (2 * d), k = -t / d, l = e - (B + f), G = l / t, 0 > G && (t = Math.sqrt(2 * e * b * d / (d - b)), B = t * t / (2 * b), m = t / b, f = -(t * t) / (2 * d), k = -t / d, G = l = 0), P = m + G + k, g.accelspeed = b, g.breakspeed = d, g.Vmax = t, g.Tmax = P, g.Smax = e, g.T1 = m, g.T2 = G, g.T3 = k, g.S1 = B, g.S2 = l, g.S3 = f, g.maxruntime = P);\n g.starttime = Ta();\n g.process = r;\n c.push(g)\n }\n }\n };\n h.looktohotspot = function () {\n var a = arguments, b = h.actioncaller, c = Ua.getItem(1 > a.length ? b ? b.name : \"\" : a[0]);\n if (c) {\n var b = c.ath, d = c.atv, e = 30, e = c.getcenter(), b = e.x, d = e.y, e = e.z, c = Number(a[1]);\n isNaN(c) || (e = c);\n c = p.fovmin;\n e < c && (e = c);\n h.lookto(b, d, e, a[2], a[3])\n }\n };\n h.moveto = function () {\n var a = arguments;\n 2 <= a.length && h.lookto(a[0], a[1], p.fov, a[2])\n };\n h.zoomto = function () {\n var a = arguments;\n 1 <= a.length && h.lookto(p.hlookat, p.vlookat, a[0], a[1])\n };\n h.getlooktodistance = function () {\n var a = arguments, b = a.length;\n if (3 <= b) {\n var c = h.actioncaller, d = Number(y(a[1], c)), e = Number(y(a[2], c)), g = p.hlookat, f = p.vlookat;\n 5 == b && (g = Number(y(a[3], c)), f = Number(y(a[4], c)));\n if (!(isNaN(d) || isNaN(e) || isNaN(g) || isNaN(f))) {\n var b = Math.PI, q = b / 180, d = b - d * q, g = b - g * q, f = f * q, e = e * q, d = Math.acos(Math.cos(f) * Math.cos(g) * Math.cos(e) * Math.cos(d) + Math.sin(f) * Math.sin(e) + Math.cos(f) * Math.sin(g) * Math.cos(e) * Math.sin(d)) / q;\n I(a[0], d, !1, c)\n }\n }\n };\n h.wait = function () {\n var a = arguments;\n if (1 == a.length) {\n var a = a[0], b = F(a);\n if (\"load\" == b || _[73] == b)a = 0; else {\n b = \"time\";\n a = Number(a);\n if (isNaN(a))return;\n 0 >= a && (b = _[73], a = 0)\n }\n var d = new q;\n d.waitfor = b;\n d.maxruntime = a;\n d.process = l;\n d.starttime = Ta();\n d.actioncaller = h.actioncaller;\n d.id = \"WAIT\" + ++z;\n d.blocking = !0;\n h.blocked = !0;\n c.push(d)\n }\n };\n h.tween = function () {\n var a = arguments, e = a.length;\n if (2 <= e) {\n var g = h.actioncaller, f = new q, k = F(a[0]);\n if (0 < k.indexOf(\"|\")) {\n var e = (\"\" + a[0]).split(\"|\"), g = (\"\" + a[1]).split(\"|\"), f = a[3] ? (\"\" + a[3]).split(\"|\") : [a[3]], l = e.length, m = g.length, r = f.length, p = parseFloat(a[2]);\n if (0 > p || isNaN(p))p = .5;\n for (k = 0; k < m; k++)g[k] = Ha(g[k]);\n for (k = 0; k < r; k++)f[k] = Ha(f[k]);\n for (k = 0; k < l; k++)h.tween(Ha(e[k]), g[k % m], p, f[k % r], k == l - 1 ? a[4] : null, k == l - 1 ? a[5] : null)\n } else {\n l = k;\n r = a[1];\n m = !1;\n g && 0 > k.indexOf(\".\") && g.hasOwnProperty(k) && (l = g._type + \"[\" + g.name + \"].\" + k, m = !0);\n 0 == m && 0 < k.indexOf(\"[\") && (l = k = b(k, g), l = l.split(_[134]).join(_[127]));\n f.id = l;\n f.varname = k;\n f.actioncaller = g;\n f.startval = m ? g[k] : U(k, g);\n if (null == f.startval || \"\" == f.startval)f.startval = 0;\n f.endval = r;\n k = 2 < e ? String(a[2]) : \"0.5\";\n if (0 < k.indexOf(\"(\") && (p = Gb(k))) {\n var B = p[0];\n _[427] == B.cmd && (p = Number(B.args[0]), k = Number(B.args[1]), r = Math.abs(parseFloat(r) - parseFloat(f.startval)), k = k * r / p)\n }\n k = parseFloat(k);\n isNaN(k) && (k = .5);\n f.maxruntime = k;\n f.tweenmap = ac.getTweenfu(3 < e ? a[3] : _[56]);\n if (4 < e)if (\"wait\" == F(a[4]))f.blocking = !0, h.blocked = !0; else if (r = a[4])0 == m && 0 < r.indexOf(\"[\") && (r = b(r, g)), f.donecall = r;\n 5 < e && (f.updatefu = a[5]);\n f.starttime = Ta();\n f.process = u;\n n(l);\n c.push(f)\n }\n }\n };\n h.stoptween = function () {\n var a = h.actioncaller, c = arguments, e = c.length, g;\n for (g = 0; g < e; g++) {\n var f = F(c[g]);\n if (0 < f.indexOf(\"|\"))h.stoptween.apply(h.stoptween, f.split(\"|\")); else {\n if (a && 0 > f.indexOf(\".\")) {\n if (n(a._type + \"[\" + a.name + \"].\" + f))continue\n } else 0 < f.indexOf(\"[\") && (f = b(f, a)), f = f.split(_[134]).join(_[127]);\n n(f)\n }\n }\n };\n h.invalidatescreen = function () {\n Kb = Ta();\n p.haschanged = !0\n };\n h.updatescreen = function () {\n p.haschanged = !0\n };\n h.updateobject = function () {\n M && M.updateFOV && M.updateFOV(M, [Number(N.hfov), Number(N.vfov), Number(N.voffset)]);\n p.haschanged = !0\n };\n h.loadpano = function (a, b, c, d, e) {\n m.xml.scene = null;\n m.xml.view = {};\n Xa.loadpano(a, b, c, d, e)\n };\n h.loadpanoscene = function (a, b, c, d, e, h) {\n m.xml.scene = b;\n m.xml.view = {};\n m._loadpanoscene_name = b;\n Xa.loadpano(a, c, d, e, h)\n };\n h.loadxml = function (a, b, c, d, e) {\n m.xml.scene = null;\n m.xml.view = {};\n Xa.loadxml(a, b, c, d, e)\n };\n h.fscommand = function () {\n };\n h.freezeview = function () {\n };\n h.reloadpano = function () {\n };\n h.addlensflare = function () {\n };\n h.removelensflare = function () {\n };\n h.SAcall = function (a) {\n var b = U(_[14]);\n if ((a = Gb(a)) && b) {\n var c, d;\n d = a.length;\n for (c = 0; c < d; c++) {\n var e = a[c];\n if (e) {\n var g = e.cmd, f = b.getItem(g);\n f && 1 == pa(f.secure) ? (e = e.args, e.splice(0, 0, g), h.callaction(E(f.content, e))) : la(2, _[428] + g + _[282])\n }\n }\n }\n }\n })();\n var V = {};\n (function () {\n function a(a) {\n a = _[189] + a;\n L.console ? L.console.log(a) : alert(a)\n }\n\n function d(a, b, c, d, e, h) {\n var g = Ja(), f = g.style;\n f.position = _[0];\n \"LT\" == a ? (f.left = b, f.top = c) : (f.left = b, f.bottom = c);\n f.width = d;\n f.height = e;\n f.overflow = _[6];\n !1 === h && (f.webkitUserSelect = f.MozUserSelect = f.msUserSelect = f.oUserSelect = f.userSelect = \"none\");\n return g\n }\n\n function p(a) {\n if (r.fullscreen = a)L.activekrpanowindow = c.id;\n Ka(1 == a ? _[221] : _[225])\n }\n\n function f(a) {\n l && (Aa(a), r.onResize(a), setTimeout(e, 250))\n }\n\n function g(a, b) {\n for (var c = a.style, d = b.length, e = 0, e = 0; e < d; e += 2)c[b[e]] = b[e + 1]\n }\n\n function n(a) {\n p(!!(aa.fullscreenElement || aa.mozFullScreenElement || aa.webkitIsFullScreen || aa.webkitFullscreenElement || aa.msFullscreenElement))\n }\n\n function k(a) {\n if (l) {\n a = L.innerHeight;\n var b = vb;\n a < b ? r.__scrollpage_yet = !0 : r.__scrollpage_yet && (r.__scrollpage_yet = !1, e());\n if (a != b)r.onResize(null)\n }\n }\n\n function e() {\n var a = L.innerWidth, c = L.innerHeight;\n r.__scrollpage_yet && c == vb && (r.__scrollpage_yet = !1);\n var d = screen.height - 64, e = 268;\n 26 <= b.crios && (d += 44, e = 300);\n (320 == a && c != d || a == screen.height && c != e) && L.scrollTo(0, 0)\n }\n\n function w() {\n if (8 == b.iosversion && b.ipad) {\n var a = screen.width, d = screen.height, e = L.innerWidth, f = L.innerHeight, g = c.clientHeight;\n if (Math.min(e, f) == Math.min(a, d) && Math.max(e, f) == Math.max(a, d) || g > f)qa ^= 1, L.scrollTo(0, qa), setTimeout(w, 60)\n }\n }\n\n function x(a, b) {\n Aa(a);\n var c = \"none\" == D.style.display ? \"\" : \"none\";\n void 0 !== b && (c = 1 == b ? \"\" : \"none\");\n D.style.display = c;\n z.scrollTop = z.scrollHeight\n }\n\n function v() {\n Ca && (K.removeChild(Ca), Ca = null);\n var a, c = Ja();\n a = 25;\n b.androidstock && (a *= b.pixelratio);\n g(c, [_[65], _[0], \"left\", \"50%\", \"top\", \"50%\", _[47], _[40], _[120], a + \"px\", _[51], \"none\", _[148], _[5], _[267], \"none\"]);\n a = c.style;\n a.zIndex = 999999;\n a.opacity = .67;\n a = Ja();\n g(a, \"position;relative;left;-50%;top;-25px;fontFamily;sans-serif;textShadow;#000000 1px 1px 2px;lineHeight;110%\".split(\";\"));\n a.innerHTML = _[433] + (Na && Na[1] && 6 < Ha(Na[1], !1).length ? Na[1] : _[169]) + _[375];\n c.appendChild(a);\n K.appendChild(c);\n Ca = c\n }\n\n var r = V;\n r.fullscreen = !1;\n var y = !0, l = !1, u = !1;\n r.__scrollpage_yet = !1;\n var h = null, c = null, K = null;\n r.htmltarget = null;\n r.viewerlayer = null;\n r.controllayer = null;\n r.panolayer = null;\n r.pluginlayer = null;\n r.hotspotlayer = null;\n var D = r.svglayer = null, z = null, q = null, J = null, C = 0, Q = 0, A = !1, H = !1;\n r.build = function (e) {\n function h(a) {\n x(null, !1)\n }\n\n var l = e.target, t = e.id, G = aa.getElementById(l);\n if (!G)return a(_[172] + l), !1;\n for (var l = null, p = t, C = 1; ;)if (l = aa.getElementById(t))if (_[254] == p)C++, t = p + C; else return a(_[165] + t), !1; else break;\n l = Ja();\n l.id = t;\n l.style.position = _[119];\n l.style.overflow = _[6];\n l.style.lineHeight = _[45];\n l.style.fontWeight = _[45];\n l.style.fontStyle = _[45];\n l.tabIndex = -1;\n l.style.outline = 0;\n t = _[26];\n e.bgcolor && (t = e.bgcolor);\n e = F(e.wmode);\n if (_[36] == e || _[142] == e)t = null, m.bgcolor = 4278190080;\n null != t && (l.style.background = t, m.bgcolor = parseInt(t.slice(1), 16));\n G.appendChild(l);\n c = l;\n r.htmltarget = G;\n r.viewerlayer = l;\n K = d(\"LT\", 0, 0, \"100%\", \"100%\", !1);\n g(K, \"msTouchAction none touchAction none msContentZooming none contentZooming none -webkit-tap-highlight-color transparent\".split(\" \"));\n r.controllayer = K;\n t = d(\"LT\", 0, 0, \"100%\", \"100%\");\n r.panolayer = t;\n g(t, [_[258], \"none\"]);\n G = d(\"LT\", 0, 0, \"100%\", \"100%\", !1);\n 0 == b.ie && 0 == b.firefox && g(G, [Id, _[59]]);\n e = G;\n b.android && b.firefox && Kc && (p = d(\"LT\", 0, 0, \"1px\", \"1px\"), p.style.background = _[226], p.style.pointerEvents = \"none\", p.style.zIndex = 999999999, p.style[ib] = _[20], G.appendChild(p));\n var p = b.androidstock ? b.pixelratio : 1, C = 156 * p, u = (b.mobile ? 8 : 13) * p, w = b.androidstock || b.android && b.chrome ? 6 : 8;\n D = d(\"LB\", 0, 0, \"100%\", C + \"px\", !0);\n D.style.display = \"none\";\n !0 !== b.opera && Kc && (2 > Nb && (D.style[ib] = _[20]), b.ios && 0 == b.simulator || b.android && b.chrome) && (D.style[ib] = _[20]);\n D.style.zIndex = 999999999;\n var A = d(\"LT\", 0, 0, \"100%\", \"100%\", !0);\n A.style.opacity = .67;\n b.android && b.opera && (A.style.borderTop = _[179]);\n g(A, [_[255], _[26], pc, _[441] + w + _[373], _[114], w + \"px\", _[482], .67]);\n z = aa.createElement(\"pre\");\n w = null;\n b.mac && (w = _[270] + (L.chrome ? \"1px\" : \"0\"));\n b.realDesktop ? (z.style.fontFamily = _[55], z.style.fontSize = \"11px\", w && (z.style.fontSize = \"13px\", z.style.textShadow = w)) : (z.style.fontFamily = _[38], z.style.fontSize = u + \"px\");\n g(z, [_[65], _[0], \"left\", \"5px\", \"top\", \"0px\", _[50], \"left\", _[329], 0, _[296], b.realDesktop ? \"16px\" : 0, _[346], 0, _[286], 0, _[107], \"none\", _[71], 0, _[114], (b.realDesktop ? 10 : 8) + \"px\", _[49], \"100%\", _[28], C - 10 + \"px\", _[421], \"auto\", _[210], \"none\", _[471], \"block\", _[395], \"left\", _[338], _[411], _[51], \"none\", _[47], _[40]]);\n q = Ja();\n w && (q.style.textShadow = w);\n g(q, [_[65], _[0], _[3], 0, _[2], 0, _[132], \"0 4px\", _[28], C - 10 + \"px\", _[230], \"none\", _[279], \"none\", _[148], _[18], _[76], _[36], _[347], b.realDesktop ? _[55] : _[38], _[120], (b.realDesktop ? 10 : 9 * p | 0) + \"px\", _[47], _[40]]);\n q.innerHTML = \"CLOSE\";\n R(q, _[115], Aa, !0);\n R(q, _[118], h, !0);\n R(q, _[7], h, !0);\n D.appendChild(A);\n D.appendChild(z);\n D.appendChild(q);\n l.appendChild(K);\n K.appendChild(t);\n 0 < b.iosversion && 5 > b.iosversion && (e = Ja(), e.style.position = _[0], G.appendChild(e), K.style.webkitTransformStyle = _[59], G.style.webkitTransformStyle = \"flat\");\n K.appendChild(G);\n b.ios && (t = Ja(), t.style.position = _[0], t.style.webkitTransformStyle = _[59], e.appendChild(t));\n l.appendChild(D);\n r.pluginlayer = G;\n r.hotspotlayer = e;\n b.fullscreensupport && R(aa, b.browser.events.fullscreenchange, n);\n J = [l.style.width, l.style.height];\n r.onResize(null);\n R(L, _[137], r.onResize, !1);\n b.iphone && b.safari && R(L, _[133], k, !1);\n R(L, _[84], f, !1);\n return !0\n };\n r.setFullscreen = function (a) {\n if (b.fullscreensupport)if (a)c[b.browser.events.requestfullscreen](); else try {\n aa.exitFullscreen ? aa.exitFullscreen() : aa.mozCancelFullScreen ? aa.mozCancelFullScreen() : aa.webkitCancelFullScreen ? aa.webkitCancelFullScreen() : aa.webkitExitFullscreen ? aa.webkitExitFullscreen() : aa.msExitFullscreen && aa.msExitFullscreen()\n } catch (d) {\n } else {\n var e = aa.body, f = e.style, h = c.style;\n if (a)r.fsbkup = [f.padding, f.margin, f.overflow, e.scrollTop, e.scrollLeft, L.pageYOffset], f.padding = \"0 0\", f.margin = \"0 0\", f.overflow = _[6], e.scrollTop = \"0\", e.scrollLeft = \"0\", e.appendChild(c), h.position = _[0], h.left = 0, h.top = 0, h.width = \"100%\", h.height = \"100%\", Pa.domUpdate(), L.scrollTo(0, 0), p(!0); else if (a = r.fsbkup)r.htmltarget.appendChild(c), f.padding = a[0], f.margin = a[1], f.overflow = a[2], e.scrollTop = a[3], e.scrollLeft = a[4], h.position = _[119], Pa.domUpdate(), L.scrollTo(0, a[5]), r.fsbkup = null, p(!1)\n }\n };\n var qa = 0;\n r.onResize = function (a, d) {\n A = d;\n Aa(a);\n var f = c, g = \"100%\", k = \"100%\";\n null == J && (J = [f.style.width, f.style.height]);\n J && (g = J[0], k = J[1], \"\" == g && (g = \"100%\"), \"\" == k && (k = \"100%\"), J = null);\n var q = Jb.so;\n q && (q.width && (g = q.width), q.height && (k = q.height));\n r.fullscreen && (g = k = \"100%\");\n var n = f.parentNode, m = 0, p = f;\n do if (m = p.offsetHeight, b.ie && r.fullscreen && 20 > m && (m = 0), 1 >= m) {\n if (p = p.parentNode, null == p) {\n m = L.innerHeight;\n break\n }\n } else break; while (1);\n q = 0;\n for (p = f; p && \"body\" != F(p.nodeName);)q++, p = p.parentNode;\n var n = n ? n.offsetHeight : L.innerHeight, C = f.clientWidth, p = g, f = k;\n 0 < String(g).indexOf(\"%\") ? g = parseFloat(g) * C / 100 : (g = parseFloat(g), p = g + \"px\");\n 0 < String(k).indexOf(\"%\") ? k = parseFloat(k) * m / 100 : (k = parseFloat(k), f = k + \"px\");\n 1 > k && (k = 100);\n m = screen.width;\n C = screen.height;\n b.iphone && 320 == m && 4 > b.iosversion && 480 > C && (C = 480);\n var v = L.innerWidth, x = L.innerHeight;\n b.ios && 2 >= q && 0 == r.fullscreen && (26 <= b.crios && n > x && (x = k = n), w(), 7 <= b.iosversion && k > x && (k = x, l = u = !0, setTimeout(e, 10)));\n y && (y = !1, b.iphone ? (320 == v && x >= C - 124 ? x = C - 124 : v == C && 208 <= x && (x = 208), 2 >= q && (v == g && x && (320 == g && k == C - 124 || g == C && (208 == k || 320 == k)) && (l = !0), 26 <= b.crios && (320 == g || g == C) && (l = !0))) : b.ipad && 28 <= b.crios && 2 >= q && (g > k != m > C && (q = m, m = C, C = q), g == m && k == C - 20 && (u = l = !0)));\n l && (u ? (g = v, k = x) : 320 == L.innerWidth ? (g = 320, k = C - 64, b.crios && (k += 44)) : (g = C, k = 320 == L.innerHeight ? 320 : 268, 26 <= b.crios && (k = 300)), p = g + \"px\", f = k + \"px\");\n b.getViewportScale();\n q = p;\n Pa && Pa.focusLoss();\n l && null == h && (h = setInterval(e, 4E3), setTimeout(e, 250));\n n = !1;\n if (bc != g || vb != k || A)n = !0, A = !1, bc = g, vb = k;\n Ra && (Ra._pxw = Ra.pixelwidth = Ra.imagewidth = bc / X, Ra._pxh = Ra.pixelheight = Ra.imageheight = vb / X);\n Za && (Za._pxw = Za.pixelwidth = Za.imagewidth = bc / X, Za._pxh = Za.pixelheight = Za.imageheight = vb / X);\n n && (pb && pb.calc(bc, vb), Ka(_[63]), n = !1);\n pb ? (n |= pb.calc(bc, vb), K.style.left = pb.pixelx * X + \"px\", K.style.top = pb.pixely * X + \"px\", K.style.width = Qa + \"px\", K.style.height = ya + \"px\", g = Qa, k = ya) : (Qa = bc, ya = vb);\n uc = Math.max(4 * k / 3, g);\n c.style.width = q;\n c.style.height = f;\n b.desktop && (q = L.devicePixelRatio, isNaN(q) || (b.pixelratio = q, b.fractionalscaling = 0 != q % 1));\n Oa.size(g, k);\n H = !0;\n n && Ka(_[63]);\n Xa.updateview(!1, !0);\n r.resizeCheck(!0);\n A = !1\n };\n r.resizeCheck = function (a) {\n var b = !1, d = c, e = d.clientWidth, d = d.clientHeight;\n if (e != C || d != Q || a || pb && pb.haschanged)if (C = e, Q = d, b = !0, 1 == a)b = !1; else r.onResize(null);\n H && !0 !== a && (b = !0, H = !1);\n 255 == (jc & 511) && 0 == (Ya & 1) && v();\n return b\n };\n var ea = \"\";\n r.log = function (a) {\n if (\"cls\" == a)z.innerHTML = \"\"; else if (\"d\" == a)v(); else {\n var c = 4 > b.firefoxversion ? 4096 : 1E4, d = a.slice(0, 6);\n _[140] == d || _[135] == d ? (c = _[200] + (69 == d.charCodeAt(0) ? \"F\" : \"0\") + _[416] + a + _[417], ea += c + \"\\n\", z.innerHTML += \"\\n\" + c) : (ea += a + \"\\n\", ea.length > c ? (ea = ea.slice(-c / 2, -1), z.innerHTML = ea) : z.lastChild ? z.lastChild.nodeValue += \"\\n\" + a : z.innerHTML += a);\n z.scrollTop = z.scrollHeight;\n Jb.so.vars && pa(Jb.so.vars.consolelog) && (c = L.console) && c.log && (b.firefox || b.chrome ? c.log(\"%c\" + a, _[135] == d ? _[259] : _[140] == d ? _[178] : _[420] == d ? _[257] : _[262]) : c.log(a))\n }\n };\n r.showlog = function (a) {\n x(null, a)\n };\n r.togglelog = x;\n r.getMousePos = function (a, b) {\n var c;\n c = {};\n var d = b ? b : K, e = d.getBoundingClientRect();\n c.x = Math.round(a.clientX - e.left - d.clientLeft + d.scrollLeft);\n c.y = Math.round(a.clientY - e.top - d.clientTop + d.scrollTop);\n return c\n };\n r.remove = function () {\n null != h && (clearInterval(h), h = null);\n try {\n ba(L, _[137], r.onResize, !1), b.iphone && b.safari && ba(L, _[133], k, !1), ba(L, _[84], f, !1), b.fullscreensupport && ba(aa, b.browser.events.fullscreenchange, n), r.htmltarget.removeChild(c), r.htmltarget = null, r.viewerlayer = null, r.controllayer = null, r.panolayer = null, r.pluginlayer = null, K = c = q = z = D = r.hotspotlayer = null\n } catch (a) {\n }\n };\n var Ca = null\n })();\n var Pa = {};\n (function () {\n function a(a) {\n var b = a.pointerType;\n if (4 != b && _[19] != b) {\n a = a.changedTouches ? a.changedTouches : [a];\n var b = a.length, c, d, e;\n for (c = 0; c < b; c++)if (d = a[c], e = d.pointerId ? d.pointerId : d.identifier, void 0 !== e) {\n d = wa(d);\n d = {id: e, lx: d.x / X, ly: d.y / X};\n var f, g;\n g = ka.length;\n for (f = 0; f < g; f++)if (ka[f].id == e) {\n ka[f] = d;\n return\n }\n ka.push(d)\n }\n }\n }\n\n function d(a) {\n var b = a.pointerType;\n if (4 != b && _[19] != b) {\n a = a.changedTouches ? a.changedTouches : [a];\n var b = a.length, c, d;\n for (c = 0; c < b; c++)if (d = a[c], d = d.pointerId ? d.pointerId : d.identifier, void 0 !== d) {\n var e, f;\n f = ka.length;\n for (e = 0; e < f; e++)if (ka[e].id == d) {\n ka.splice(e, 1);\n break\n }\n }\n }\n }\n\n function E() {\n var a = F(ia.usercontrol);\n return _[19] == a || \"all\" == a\n }\n\n function f(a) {\n return a && (a = a.pointerType, 4 == a || _[19] == a) ? !0 : !1\n }\n\n function g(a, b, c, d) {\n for (var e = jc; 0 < wb.length && !(c - wb[0].t <= Sa) && !(1 >= e - wb[0].f);)wb.shift();\n e = wb.length - 1;\n 0 <= e && a == wb[e].x && b == wb[e].y ? wb[e].t = c : wb.push({x: a, y: b, t: c, f: d})\n }\n\n function n(a, b, c, d) {\n b = p.inverseProject(a, b);\n var e = p.inverseProject(c, d);\n d = (Math.atan2(e.z, e.x) - Math.atan2(b.z, b.x)) / Y;\n b = -(Math.atan2(b.y, Math.sqrt(b.x * b.x + b.z * b.z)) - Math.atan2(e.y, Math.sqrt(e.x * e.x + e.z * e.z))) / Y;\n -180 > d ? d += 360 : 180 < d && (d -= 360);\n if (c < a && 0 > d || c > a && 0 < d)d = -d;\n return {h: d, v: b}\n }\n\n function k(a, b, c, d) {\n E() ? (a = n(a, b, c, d), ga = !1, ca = a.h, oa = a.v, a = p.hlookat + ca, b = p.vlookat + oa, T += ca, ya += oa, c = p._limits, ia.bouncinglimits && c && (360 > c[0] && (a < c[1] ? (Na = !0, a = .5 * T + .5 * c[1]) : a > c[2] && (Na = !0, a = .5 * T + .5 * c[2])), b < c[4] ? (Na = !0, b = .5 * ya + .5 * c[4]) : b > c[5] && (Na = !0, b = .5 * ya + .5 * c[5])), p.hlookat = a, p.vlookat = b, Xa.updateview(), p.haschanged = !0) : oa = ca = 0\n }\n\n function e(a) {\n (aa.hidden || aa.webkitHidden || aa.mozHidden || aa.msHidden) && w(a)\n }\n\n function w(a) {\n K();\n a && (_[64] == a.type && !1 === a.persisted && (jd = !0), O.down && C(a));\n for (var b in N)1 == N[b] && (m.keycode = b, Ka(_[130]), N[b] = !1);\n m.keycode = 0;\n x()\n }\n\n function x() {\n m.hlookat_moveforce = m.vlookat_moveforce = m.fov_moveforce = 0;\n Oa = sa = ga = !1;\n Ga = za = Qa = La = ca = oa = Ea = Ua = Ra = Bb = 0\n }\n\n function v(a) {\n var c = 0;\n if (1 != ia.disablewheel && (Aa(a), cb = Ta(), E())) {\n a.wheelDelta ? c = a.wheelDelta / -120 : a.detail && (c = a.detail, 0 == b.mac && (c /= 3));\n var d = c * ia.mousefovchange;\n ia.zoomtocursor ? (Ma = !0, u(a), Ha = O.x, va = O.y, 0 < d && 0 == ia.zoomoutcursor && (Ma = !1)) : Ma = !1;\n Oa = !0;\n ha = 0;\n Ga += .001 * d;\n m.wheeldelta_raw = -c;\n m.wheeldelta = 3 * -c;\n Ka(_[100])\n }\n }\n\n function r(a) {\n var c = V.viewerlayer;\n aa.activeElement == c != 0 && L.activekrpanowindow == c.id && (c = a.keyCode, 0 == (a.altKey || a.ctrlKey || a.shiftKey || 32 > c || 111 < c && 124 > c) && Aa(a), m.keycode = c, N[c] = !0, Ka(_[384]), 79 != c || !m.logkey && Ya & 1 || V.togglelog(), l(c, 1), 27 == c && (K(), V.fullscreen && (V.fsbkup || b.opera) && V.setFullscreen(!1)))\n }\n\n function y(a) {\n var b = V.viewerlayer;\n aa.activeElement == b != 0 && L.activekrpanowindow == b.id && (a = a.keyCode, m.keycode = a, N[a] = !1, Ka(_[130]), l(a, 0))\n }\n\n function l(a, b) {\n var c = F(ia.usercontrol);\n if (\"all\" == c || \"keyb\" == c)a = \",\" + a + \",\", 0 <= (\",\" + ia.keycodesin + \",\").indexOf(a) ? m.fov_moveforce = -b : 0 <= (\",\" + ia.keycodesout + \",\").indexOf(a) ? m.fov_moveforce = +b : 0 <= (\",\" + ia.keycodesleft + \",\").indexOf(a) ? m.hlookat_moveforce = -b : 0 <= (\",\" + ia.keycodesright + \",\").indexOf(a) ? m.hlookat_moveforce = +b : 0 <= (\",\" + ia.keycodesup + \",\").indexOf(a) ? m.vlookat_moveforce = ia.keybinvert ? +b : -b : 0 <= (\",\" + ia.keycodesdown + \",\").indexOf(a) && (m.vlookat_moveforce = ia.keybinvert ? -b : +b)\n }\n\n function u(a) {\n cb = Ta();\n a = wa(a);\n O.x = a.x / X;\n O.y = a.y / X;\n O.moved = !0\n }\n\n function h(a) {\n cb = Ta();\n var d, e, g = a.changedTouches ? a.changedTouches : [a];\n e = g.length;\n var h = F(a.type), k = 0 <= h.indexOf(\"start\") || 0 <= h.indexOf(\"down\");\n -99 != fa && k && (ra = !0);\n for (d = 0; d < e; d++) {\n var h = g[d], q = h.pointerId ? h.pointerId : h.identifier;\n -99 == fa && k && (fa = q);\n if (fa == q) {\n e = wa(h);\n O.x = e.x / X;\n O.y = e.y / X;\n O.moved = !0;\n 0 == (Ya & 16) && (0 == b.realDesktop || 10 <= b.ieversion && !f(a)) && O.x > bc / X - 22 && O.y > vb / X - 32 && a.type == ta.touchstart && (U = h.pageY, R(W, ta.touchend, c, !0));\n break\n }\n }\n }\n\n function c(a) {\n a = a.changedTouches ? a.changedTouches : [a];\n ba(W, ta.touchend, c, !0);\n -120 > a[0].pageY - U && V.showlog(!0)\n }\n\n function K() {\n if (Za) {\n try {\n W.removeChild(Za), W.removeChild(bb)\n } catch (a) {\n }\n bb = Za = null\n }\n }\n\n function D(a) {\n if (Za)K(); else {\n Aa(a);\n a.stopPropagation();\n var c = wa(a.changedTouches ? a.changedTouches[0] : a);\n Za = De(c.x, c.y, K, 0 <= F(a.type).indexOf(\"touch\"));\n null != Za && (bb = Ja(), a = bb.style, a.position = _[0], b.androidstock || (a.zIndex = 99999999998, a[ib] = _[20]), a.width = \"100%\", a.height = \"100%\", W.appendChild(bb), W.appendChild(Za))\n }\n }\n\n function z(a, c) {\n var d = a.timeStamp | 0;\n 500 < d && 500 > d - kc ? kc = 0 : (L.activekrpanowindow = V.viewerlayer.id, V.viewerlayer.focus(), cb = Ta(), Aa(a), da.isblocked() || 0 != (a.button | 0) || (K(), 1 != c ? (R(L, _[10], q, !0), R(L, _[4], J, !0), b.topAccess && R(top, _[4], C, !0)) : R(b.topAccess ? top : L, ta.touchend, Ca, !0), d = wa(a), ab = d.x, $a = d.y, kb = a.timeStamp, T = p.hlookat, ya = p.vlookat, xa = 0, O.down = !0, O.up = !1, O.moved = !1, O.downx = O.x = d.x / X, O.downy = O.y = d.y / X, ae.update(), Ka(_[103])))\n }\n\n function q(a) {\n Aa(a);\n var b = wa(a);\n O.x = b.x / X;\n O.y = b.y / X;\n O.moved = !0;\n if (_[27] == F(ia.mousetype)) {\n sa = !0;\n var c = n(ab, $a, b.x, b.y).h;\n xa += c\n } else k(ab, $a, b.x, b.y);\n ab = b.x;\n $a = b.y;\n kb = a.timeStamp;\n (0 === a.buttons || void 0 === a.buttons && 0 === a.which) && J(a, !0)\n }\n\n function J(a, c) {\n cb = Ta();\n Aa(a);\n ba(L, _[10], q, !0);\n ba(L, _[4], J, !0);\n b.topAccess && ba(top, _[4], C, !0);\n ga = !0;\n O.down = !1;\n ae.update();\n 0 == O.up && (O.up = !0, Ka(_[113]), !0 !== c && (0 == O.moved || 5 > Math.abs(O.x - O.downx) && 5 > Math.abs(O.y - O.downy)) && Ka(_[131]))\n }\n\n function C(a) {\n J(a, !0)\n }\n\n function Q(a) {\n 1 == m.control.preventTouchEvents && Aa(a)\n }\n\n function A(a) {\n Ia && (xb++, 2 == xb && (qd = 1), Pb.addPointer(a.pointerId), W.setPointerCapture ? W.setPointerCapture(a.pointerId) : W.msSetPointerCapture && W.msSetPointerCapture(a.pointerId))\n }\n\n function H(a) {\n xb--;\n 0 > xb && (xb = 0);\n return 2 > xb && Da ? (t(a), !0) : !1\n }\n\n function qa(c) {\n kc = c.timeStamp | 0;\n Sa = b.ios ? 100 : 49 > nd ? 200 : 100;\n a(c);\n if (ua) {\n if (0 == m.control.preventTouchEvents)return;\n if (f(c)) {\n c.currentPoint && c.currentPoint.properties && 0 == c.currentPoint.properties.isLeftButtonPressed && (c.button = 0);\n kc = 0;\n z(c, !0);\n return\n }\n A(c)\n }\n L.activekrpanowindow = V.viewerlayer.id;\n cb = Ta();\n 0 == V.__scrollpage_yet && Q(c);\n K();\n if (!(Da || 0 == Va && 1 < ka.length || da.isblocked())) {\n var d = c.changedTouches ? c.changedTouches[0] : c, e = wa(d);\n la = d.pointerId ? d.pointerId : d.identifier;\n ab = e.x;\n $a = e.y;\n kb = c.timeStamp;\n wb = [];\n T = p.hlookat;\n ya = p.vlookat;\n xa = 0;\n O.down = !0;\n O.up = !1;\n O.moved = !1;\n O.downx = O.x = e.x / X;\n O.downy = O.y = e.y / X;\n Fa = {t: kc};\n Ka(_[103])\n }\n }\n\n function ea(a) {\n var b = a.pointerType;\n if (4 != b && _[19] != b) {\n var b = a.changedTouches ? a.changedTouches : [a], c = b.length, d, e, h;\n for (d = 0; d < c; d++)if (e = b[d], h = e.pointerId ? e.pointerId : e.identifier, void 0 !== h) {\n var t, l;\n l = ka.length;\n for (t = 0; t < l; t++)if (ka[t].id == h) {\n e = wa(e);\n h = e.y / X;\n t = ka[t];\n t.lx = e.x / X;\n t.ly = h;\n break\n }\n }\n }\n if (ua) {\n if (f(a)) {\n O.down && q(a);\n return\n }\n if (1 < xb)return\n }\n if ((b = E()) && 0 == Va && 1 < ka.length) {\n var m;\n l = e = ka[0].lx;\n m = h = ka[0].ly;\n t = ka.length;\n for (d = 1; d < t; d++)b = ka[d].lx, c = ka[d].ly, b < e && (e = b), b > l && (l = b), c < h && (h = c), c > m && (m = c);\n b = l - e;\n c = m - h;\n b = Math.sqrt(b * b + c * c);\n 1 > b && (b = 1);\n 0 == M ? (M = !0, I = b, Z(a)) : B(a, b / I)\n } else cb = Ta(), 0 == V.__scrollpage_yet && Q(a), Da || 0 == b || (b = a.changedTouches ? a.changedTouches[0] : a, la == (b.pointerId ? b.pointerId : b.identifier) && (b = wa(b), _[27] == F(ia.touchtype) ? (sa = !0, c = n(ab, $a, b.x, b.y).h, -180 > c ? c = 360 + c : 180 < c && (c = -360 + c), xa += c) : k(ab, $a, b.x, b.y), ab = b.x, $a = b.y, kb = a.timeStamp, g(ab, $a, kb, jc), -99 == fa && (O.x = b.x / X, O.y = b.y / X), Fa && 16 < O.dd && (Fa = null), Aa(a)))\n }\n\n function Ca(a) {\n d(a);\n fa = -99;\n ra = !1;\n if (ua) {\n ba(b.topAccess ? top : L, ta.touchend, Ca, !0);\n if (H(a))return;\n if (f(a)) {\n J(a);\n return\n }\n }\n M && (t(a), M = !1);\n 0 == V.__scrollpage_yet && Q(a);\n if (Da)la = -99; else {\n var c = a.changedTouches ? a.changedTouches[0] : a;\n if (la == (c.pointerId ? c.pointerId : c.identifier)) {\n la = -99;\n c = wa(c);\n O.x = c.x / X;\n O.y = c.y / X;\n ab = c.x;\n $a = c.y;\n kb = a.timeStamp;\n g(ab, $a, kb, jc);\n if (_[27] != F(ia.touchtype))if (E() && 1 < wb.length) {\n var e = wb[0], h = wb[wb.length - 1], c = (h.t - e.t) / 15;\n 0 < c && (e = n(e.x, e.y, h.x, h.y), ga = !0, ca = e.h / c, oa = e.v / c)\n } else ga = !1, oa = ca = 0;\n O.down = !1;\n 0 == O.up && (O.up = !0, Fa && (c = 52800 / (Math.min(Math.max(ja.currentfps, 10), 60) + 35), 32 > O.dd && (a.timeStamp | 0) - Fa.t > c && D(a)), Ka(_[113]), (0 == O.moved || 5 > Math.abs(O.x - O.downx) && 5 > Math.abs(O.y - O.downy)) && Ka(_[131]));\n Fa = null\n }\n }\n }\n\n function S(a) {\n d(a);\n M = !1;\n fa = la = -99;\n Da = !1;\n xb = 0;\n Fa = null\n }\n\n function Z(a) {\n 0 == m.control.preventTouchEvents || Ia && 2 > xb || (Aa(a), Da = !0, Fa = null, pa = p.fov, la = -99, O.down = !1)\n }\n\n function B(a, b) {\n if (0 != m.control.preventTouchEvents) {\n var c = void 0 !== b ? b : a.scale;\n if (Ia) {\n if (2 > xb)return;\n 0 == Da && Z(a);\n c = qd *= c\n }\n Aa(a);\n cb = Ta();\n if (E()) {\n oa = ca = 0;\n var d = 2 / Y, e = 1 / Math.tan(pa / d), d = Math.atan(1 / (e * c)) * d, e = d > p.fov ? -3 : 3;\n m.wheeldelta = e;\n m.wheeldelta_raw = e / 3;\n m.wheeldelta_touchscale = c;\n 0 == ia.touchzoom && (d = p.fov);\n ia.bouncinglimits && (d < p.fovmin ? (d = G(d), c = G(p.fovmin), Ga = .5 * -(d - c), Oa = !0, ha = 1, d += Ga, Ga = 1E-9, d = Ba(d)) : d > p.fovmax && (d = G(d), c = G(p.fovmax), Ga = .75 * -(d - c), Oa = !0, ha = 1, d += Ga, Ga = 1E-9, d = Ba(d)));\n if (ia.zoomtocursor && (0 < e || 1 == ia.zoomoutcursor)) {\n if (e = ka.length, 0 < e) {\n Ma = !0;\n for (c = va = Ha = 0; c < e; c++) {\n var f = ka[c];\n Ha += f.lx;\n va += f.ly\n }\n Ha /= e;\n va /= e;\n p.updateView();\n e = p.screentosphere(Ha, va);\n p.fov = d;\n p.updateView();\n c = p.screentosphere(Ha, va);\n d = p.hlookat + (e.x - c.x);\n e = p.vlookat + (e.y - c.y);\n if (c = p._limits)360 > c[0] && (d < c[1] ? d = c[1] : d > c[2] && (d = c[2])), e < c[4] ? e = c[4] : e > c[5] && (e = c[5]);\n p.hlookat = d;\n p.vlookat = e\n }\n } else p.fov = d, p.updateView();\n Ka(_[100]);\n p.haschanged = !0\n }\n }\n }\n\n function t(a) {\n 0 != m.control.preventTouchEvents && (Da && (Da = !1), ra = !1, ka = [], Aa(a))\n }\n\n function G(a) {\n return pb * Math.log(1 / Math.tan(.5 * a * Y))\n }\n\n function Ba(a) {\n return 2 * Math.atan(1 / Math.exp(a / pb)) / Y\n }\n\n var P = Pa;\n P.mouse = !1;\n P.touch = !1;\n var Fa = null, wa = null, ta = null, W = null, N = [], Da = !1, U = 0, Va = !1, M = !1, I = 1, pa = 90, la = -99, T = 0, ya = 0, ab = 0, $a = 0, kb = 0, wb = [], fa = -99, ra = !1, Sa = 100, ka = [], ua = !1, Ia = !1, Pb = null, xb = 0, qd = 1, ga = !1, ca = 0, oa = 0, sa = !1, Qa = 0, La = 0, za = 0, xa = 0, Oa = !1, Ga = 0, ha = 0, Ma = !1, Ha = 0, va = 0, Ea = 0, Ua = 0, Na = !1, Ra = 0, Bb = 0, Za = null, bb = null;\n P.registerControls = function (a) {\n W = a;\n ta = b.browser.events;\n wa = V.getMousePos;\n b.ie && (Ia = (ua = jb.msPointerEnabled || jb.pointerEnabled) && (1 < jb.msMaxTouchPoints || 1 < jb.maxTouchPoints));\n Va = Ia || 0 == b.simulator && b.ios || void 0 !== aa.documentElement.ongesturestart;\n if (b.chrome || b.android)Va = !1;\n a = !(0 == b.simulator && b.ios || b.android || 10 <= b.ieversion && b.touchdeviceNS);\n var c = b.touchdeviceNS;\n c && (b.mobile || b.tablet) && 0 == b.simulator && (a = !1);\n P.mouse = a;\n P.touch = c;\n ta.mouse = a;\n ta.touch = c;\n R(aa, _[126], r, !1);\n R(aa, \"keyup\", y, !1);\n R(b.topAccess ? top : L, _[37], w, !0);\n R(b.topAccess ? top : L, _[64], w, !0);\n R(aa, _[52], e);\n R(aa, _[79], e);\n R(aa, _[81], e);\n R(aa, _[82], e);\n if (a || ua)R(W, _[95], v, !1), R(W, _[108], v, !1);\n (a || ua) && R(L, _[10], u, !0);\n a && R(W, _[7], z, !1);\n (a && b.realDesktop || b.ie) && R(W, _[37], D, !0);\n c && (R(W, ta.touchstart, h, !0), R(W, ta.touchmove, h, !0), R(W, ta.touchstart, qa, !1), R(W, ta.touchmove, ea, !0), R(W, ta.touchend, Ca, !0), R(W, ta.touchcancel, S, !0), Va && (R(W, ta.gesturestart, Z, !1), R(W, ta.gesturechange, B, !1), R(W, ta.gestureend, t, !0), Ia && (R(W, _[93], t, !0), Pb = new MSGesture, Pb.target = W)))\n };\n P.domUpdate = function () {\n if (Pb) {\n var a = W;\n xb = 0;\n P.unregister();\n P.registerControls(a)\n }\n };\n P.unregister = function () {\n Pb && (Pb = Pb.target = null);\n ba(aa, _[126], r, !1);\n ba(aa, \"keyup\", y, !1);\n ba(b.topAccess ? top : L, _[37], w, !0);\n ba(b.topAccess ? top : L, _[64], w, !0);\n b.topAccess && ba(top, _[4], C, !0);\n ba(aa, _[52], e);\n ba(aa, _[79], e);\n ba(aa, _[81], e);\n ba(aa, _[82], e);\n ba(L, _[10], u, !0);\n ba(L, _[10], q, !0);\n ba(L, _[4], J, !0);\n ba(W, _[95], v, !1);\n ba(W, _[108], v, !1);\n ba(W, _[7], z, !1);\n ba(W, _[37], D, !1);\n ba(W, ta.touchstart, h, !0);\n ba(W, ta.touchmove, h, !0);\n ba(W, ta.touchstart, qa, !1);\n ba(W, ta.touchmove, ea, !0);\n ba(W, ta.touchend, Ca, !0);\n ba(W, ta.touchcancel, S, !0);\n ba(W, ta.gesturestart, Z, !1);\n ba(W, ta.gesturechange, B, !1);\n ba(W, ta.gestureend, t, !0);\n ba(W, _[93], t, !0);\n wa = ta = W = null\n };\n P.handleFrictions = function () {\n var a, b = a = !1, c = m.hlookat_moveforce, d = m.vlookat_moveforce, e = m.fov_moveforce;\n if (0 != e) {\n var f = ia.keybfovchange;\n Ma = !1;\n Oa = !0;\n ha = 0;\n Ga += f * e * .001\n }\n if (0 != c || 0 != d || 0 != Ea || 0 != Ua) {\n var g = ia.keybfriction, b = ia.keybspeed, e = p.hlookat, f = p.vlookat, h = ia.keybaccelerate * Math.tan(Math.min(.5 * Number(p.fov), 45) * Y);\n Ea += c * h;\n c = Ua += d * h;\n d = Ea;\n Ea *= g;\n Ua *= g;\n g = Math.sqrt(c * c + d * d);\n 0 < g ? (c /= g, d /= g) : d = c = 0;\n g > b && (g = b);\n d *= g;\n e = 180 >= (Math.floor(f) % 360 + 450) % 360 ? e + d : e - d;\n f += c * g;\n p.hlookat = e;\n p.vlookat = f;\n g < .05 * h && (Ua = Ea = 0);\n b = !0\n }\n a |= b;\n if (ga)c = Math.pow(ia.touchfriction, .92), ca *= c, oa *= c, c = Math.sqrt(oa * oa + ca * ca), d = Math.min(.04 * uc / p.r_zoom, .5), 0 != c && (p.hlookat += ca, p.vlookat += oa), c < d && (ga = !1, oa = ca = 0), a |= 1; else if (sa) {\n var c = O, d = za, b = Qa, e = La, g = .025 * ia.mouseaccelerate, k = ia.mousespeed, h = ia.mousefriction, f = !1;\n if (E()) {\n if (c.down && (c.x != c.downx || c.y != c.downy)) {\n var q = n(c.downx, c.downy, c.x, c.y);\n q.h = xa;\n b = d * b - q.h * g;\n e = d * e - q.v * g;\n d = Math.sqrt(b * b + e * e);\n 0 < d && (b /= d, e /= d, d > k && (d = k))\n }\n g = p.hlookat;\n k = p.vlookat;\n k += d * e * ia.mouseyfriction;\n p.hlookat = g + d * b;\n p.vlookat = k;\n d *= h;\n h = Math.min(.04 * uc / p.r_zoom, .5);\n 0 == c.down && d < h && (f = !0)\n } else f = !0;\n f && (sa = !1, xa = e = b = d = 0);\n za = d;\n Qa = b;\n La = e;\n a |= 1\n }\n if (Oa) {\n a:{\n d = c = p.fov;\n b = Ga;\n e = !1;\n if (0 < Math.abs(b)) {\n h = b;\n g = ia.fovspeed;\n e = p.fovmin;\n f = p.fovmax;\n b *= ia.fovfriction;\n Math.abs(h) > g && (h = g * (h / Math.abs(h)));\n c = G(c);\n c = Ba(c + h);\n if (ia.bouncinglimits && 0 < ha)if (0 == Da)h = G(c), c < e ? (b = G(e), b = .25 * -(h - b)) : c > f && (b = G(f), b = .25 * -(h - b)); else {\n c = void 0;\n break a\n } else c < e && (c = e, b = 0), c > f && (c = f, b = 0);\n p.fov = c;\n Ga = b;\n e = !0;\n Ma && (p.fov = d, p.updateView(), d = p.screentosphere(Ha, va), p.fov = c, p.updateView(), c = p.screentosphere(Ha, va), b = p.vlookat + (d.y - c.y), p.hlookat += d.x - c.x, p.vlookat = b)\n }\n 1E-5 > Math.abs(Ga) && (ha = Ga = 0, Oa = !1);\n c = e\n }\n a |= c\n }\n Na && (c = !1, O.down ? c = !1 : (d = p.hlookat, b = p.vlookat, d += Ra, b += Bb, p.hlookat = d, p.vlookat = b, c = !0, Ra *= .95, Bb *= .95, e = p._limits, ia.bouncinglimits && e && (360 > e[0] && (d < e[1] ? Ra = .15 * -(d - e[1]) : d > e[2] && (Ra = .15 * -(d - e[2]))), b < e[4] ? Bb = .15 * -(b - e[4]) : b > e[5] && (Bb = .15 * -(b - e[5]))), d = .15 * Math.min(.04 * uc / p.r_zoom, .5), Math.sqrt(Ra * Ra + Bb * Bb) < d && (Ra = Bb = 0, Na = !1)), a |= c);\n return a\n };\n P.stopFrictions = function (a) {\n 0 == (0 | a) && (a = 3);\n a & 1 && (Qa = ca = 0);\n a & 2 && (La = oa = 0);\n a & 4 && (x(), O.down = !1)\n };\n P.isMultiTouch = function () {\n return Da || M || 1 < xb || ra\n };\n P.isBouncing = function () {\n return 0 < ha || Na\n };\n P.focusLoss = w;\n P.trackTouch = function (b) {\n if (0 == Va || Ia) {\n var c = b.type;\n c == ta.touchstart ? ua ? A(b) : a(b) : c == ta.touchend && (ua ? H(b) : d(b))\n }\n };\n var pb = -.1\n })();\n var fa = null, M = null, Cb = !1, $c = !1, Db = 0, Wa = !1, ad = !1, Eb = -1, Xa = {};\n (function () {\n function a(a, b) {\n if (!0 !== b)p.haschanged = !0; else {\n !0 !== a && (Kb = Ta());\n var c = m.webVR;\n c && c.enabled && c.updateview();\n Ka(_[299]);\n p.updateView();\n fa && Oa.renderpano(fa, 2);\n M && Oa.renderpano(M, 1);\n z && (z = Oa.rendersnapshot(z, M));\n ob(!0);\n Ka(_[278])\n }\n }\n\n function d(a, b, c, d, e) {\n h.count++;\n h.id = h.count;\n if (f()) {\n da.busy = !0;\n m.xml.url = \"\";\n m.xml.content = a;\n var g = (new DOMParser).parseFromString(a, _[25]);\n T.resolvexmlincludes(g, function () {\n g = T.xmlDoc;\n n(g, b, c, d, e)\n })\n }\n }\n\n function E(a) {\n var b = 0 != (c & 64) && 0 == (c & 256), d;\n !0 === a && (c = b = 0);\n if (0 == (c & 4)) {\n var e = xa.getArray();\n a = e.length;\n for (d = 0; d < a; d++) {\n var g = e[d];\n !g || 0 != b && 0 != g.keep || (g.sprite && (g.visible = !1, g.parent = null, V.pluginlayer.removeChild(g.sprite)), g.destroy(), xa.removeItem(d), d--, a--)\n }\n }\n if (0 == (c & 128))for (e = Ua.getArray(), a = e.length, d = 0; d < a; d++)if ((g = e[d]) && (0 == b || 0 == g.keep)) {\n if (g.sprite) {\n g.visible = !1;\n g.parent = null;\n try {\n V.hotspotlayer.removeChild(g.sprite)\n } catch (f) {\n }\n if (g._poly) {\n try {\n V.svglayer.removeChild(g._poly)\n } catch (h) {\n }\n g._poly.kobject = null;\n g._poly = null\n }\n }\n g.destroy();\n Ua.removeItem(d);\n d--;\n a--\n }\n b = Yb.getArray();\n a = b.length;\n for (d = 0; d < a; d++)(e = b[d]) && 0 == pa(e.keep) && (Yb.removeItem(d), d--, a--)\n }\n\n function f() {\n return 1 < h.count && h.removeid != h.id && (h.removeid = h.id, Ka(_[301], !0), h.removeid != h.id) ? !1 : !0\n }\n\n function g(a) {\n var b, c, d = \"\";\n a = Gc(a);\n b = a.lastIndexOf(\"/\");\n c = a.lastIndexOf(\"\\\\\");\n c > b && (b = c);\n 0 <= b && (d = a.slice(0, b + 1));\n return d\n }\n\n function n(a, d, e, g, f) {\n za.currentmovingspeed = 0;\n K = !1;\n c = M ? 64 : 0;\n e && (e = F(e), 0 <= e.indexOf(_[323]) && (c |= 4), 0 <= e.indexOf(_[306]) && (c |= 128), 0 <= e.indexOf(_[391]) && (c |= 16), 0 <= e.indexOf(_[418]) && (c |= 32), 0 <= e.indexOf(\"merge\") && (c |= 16448), 0 <= e.indexOf(_[354]) && (c |= 256), 0 <= e.indexOf(_[412]) && (c |= 4), 0 <= e.indexOf(_[459]) && (c |= 36), 0 <= e.indexOf(_[400]) && (K = !0, c |= 65536), 0 <= e.indexOf(_[310]) && I(_[102], 0), 0 <= e.indexOf(_[360]) && (c |= 1056));\n 0 == K && (Db = 0, g && (g = F(g), e = g.indexOf(_[490]), 0 <= e && (Db = parseFloat(g.slice(e + 6)), isNaN(Db) || 0 > Db)) && (Db = 2), M && (e = 0 != (c & 1024), b.webgl ? (e && (fa || z) && (fa && (z = Oa.snapshot(z, fa)), e = !1), fa && (fa.destroy(), fa = null), 0 == e ? (M.stop(), z = Oa.snapshot(z, M), M.destroy(), M = null) : (M.suspended = !0, fa = M, M = null, Oa.renderpano(fa, 2)), Oa.setblendmode(g), Eb = -1, Wa = !1) : (0 == Wa ? (fa && (fa.destroy(), fa = null), fa = M, 0 == e ? fa.stop() : fa.suspended = !0, M = null) : (g = (Ta() - Eb) / 1E3 / Db, g = y(g), .5 < g ? M && (M.destroy(), M = null) : (fa && (fa.destroy(), fa = null), fa = M, 0 == e ? fa.stop() : fa.suspended = !0, M = null), Wa = !1), fa && fa.stopped && Oa.renderpano(fa, 2))), c & 32 && (u[0] = p.hlookat, u[1] = p.vlookat, u[2] = p.camroll, u[3] = p.fov, u[4] = p.fovtype, u[5] = p.fovmin, u[6] = p.fovmax, u[7] = p.maxpixelzoom, u[8] = p.fisheye, u[9] = p.fisheyefovlink, u[10] = p.stereographic, u[12] = p.pannini, u[13] = p.architectural, u[14] = p.architecturalonlymiddle), 0 == (c & 16384) && p.defaults(), p.limitview = \"auto\", p.hlookatmin = Number.NaN, p.hlookatmax = Number.NaN, p.vlookatmin = Number.NaN, p.vlookatmax = Number.NaN, m.preview && delete m.preview, m.image && delete m.image, m.onstart = null, N = m.image = {}, N.type = null, N.multires = !1, N.multiresthreshold = .025, N.cubelabels = \"l|f|r|b|u|d\", N.stereo = !1, N.stereoformat = \"TB\", N.stereolabels = \"1|2\", N.tiled = !1, N.tilesize = 0, N.tiledimagewidth = 0, N.tiledimageheight = 0, N.baseindex = 1, N.level = new bb, N.hfov = 0, N.vfov = 0, N.voffset = 0, N.hres = 0, N.vres = 0, N.haschanged = !1, va(N, \"frame\", 1), N.frames = 1);\n E();\n if (a && a.documentElement && _[22] == a.documentElement.nodeName)Ea(a.baseURI + _[21]); else {\n T.parsexml(a.childNodes, null, c);\n if (null != m._loadpanoscene_name) {\n var h = U(_[72] + m._loadpanoscene_name + \"]\");\n h && (g = _[124] + h.content + _[117], m.xml.url = \"\", m.xml.scene = m._loadpanoscene_name, m.xml.content = g, m.onstart = null, g = (new DOMParser).parseFromString(g, _[25]), T.resolvexmlincludes(g, function () {\n (a = T.xmlDoc) && a.documentElement && _[22] == a.documentElement.nodeName ? Ea(a.baseURI + _[21]) : (T.parsexml(a.childNodes, null, c), f = h.onstart)\n }));\n m._loadpanoscene_name = null\n }\n m.xmlversion = m.version;\n m.version = m.buildversion;\n D = f;\n Wd(d);\n k()\n }\n }\n\n function k() {\n var a, b, d = m.plugin.getArray();\n m.hotspot.getArray();\n var g;\n b = d.length;\n for (a = 0; a < b; a++) {\n var f = d[a];\n if (f && f.layer && f.layer.isArray) {\n var k = f.layer.getArray();\n g = k.length;\n for (b = 0; b < g; b++) {\n var n = k[b];\n n && (n.parent = f.name, n.keep = f.keep, xa.createItem(n.name, n))\n }\n f.plugin = null;\n f.layer = null;\n a--;\n b = d.length\n }\n }\n if (0 != e(!0)) {\n if (0 == K) {\n c & 32 && (p.hlookat = u[0], p.vlookat = u[1], p.camroll = u[2], p.fov = u[3], p.fovtype = u[4], p.fovmin = u[5], p.fovmax = u[6], p.maxpixelzoom = u[7], p.fisheye = u[8], p.fisheyefovlink = u[9], p.stereographic = u[10], p.pannini = u[12], p.architectural = u[13], p.architecturalonlymiddle = u[14]);\n Xa.updateview();\n fa && fa.removemainpano();\n for (a = 0; 4100 > a; a++);\n void 0 !== ja.hardwarelimit && (Lb = parseFloat(ja.hardwarelimit), isNaN(Lb) && (Lb = 0));\n void 0 !== ja.usedesktopimages && (ce = pa(ja.usedesktopimages));\n Cb = !0;\n sc.progress = 0;\n M = Oa.createPano(N);\n M.addToLayer(V.panolayer);\n 0 <= Db && (ad = !0, M.setblend(0), ub = !0, qc = 0)\n }\n da.busy = !1;\n da.actions_autorun(_[466], !0);\n a = m.onstart;\n D && (a = D, D = null);\n d = h.id;\n da.callaction(a, null, !0);\n if (d == h.id && (da.actions_autorun(_[467], !1), Ka(_[287]), m.xml && m.xml.scene && Ka(_[369]), d == h.id)) {\n 0 == K && x();\n a = Ua.getArray();\n d = a.length;\n for (f = 0; f < d; f++)(b = a[f]) && null == b.sprite && (b.create(), V.hotspotlayer.appendChild(b.sprite));\n e();\n Ka(_[63]);\n Xa.updateview();\n da.processactions()\n }\n }\n }\n\n function e(a) {\n var b = xa.getArray(), c = b.length, d, e = !0;\n for (d = 0; d < c; d++) {\n var g = b[d];\n if (g) {\n var f = !1;\n 1 == a ? 1 == g.preload && _[15] != g.type && 0 == g.loaded && (g.onloaded = k, g.altonloaded = null, f = !0, e = !1) : (1 == g.preload && (g.preload = !1, g.onloaded = null), f = !0);\n f && null == g.sprite && (g.create(), null == g._parent && V.pluginlayer.appendChild(g.sprite))\n }\n }\n return e\n }\n\n function w() {\n Ka(_[216])\n }\n\n function x() {\n var c = b.desktop || ce, d = !1, e = N.type, g = parseFloat(N.hfov), f = parseFloat(N.vfov), h = parseFloat(N.voffset);\n isNaN(g) && (g = 0);\n isNaN(f) && (f = 0);\n isNaN(h) && (h = 0);\n var k = !!(N.multires && N.level && 0 < N.level.count), n = !!N.mobile, l = !!N.tablet;\n c || 0 != k || !n && !l || (e = \"cube\", d = !0);\n if (null == e)if (N.left || N.cube)e = \"cube\"; else if (N.cubestrip)e = _[39]; else if (N.sphere)e = _[42]; else if (N.cylinder)e = _[24]; else if (N.flat)e = \"flat\"; else {\n if (n || l)e = \"cube\", d = !0\n } else e = F(e);\n var m = _[42] == e || _[24] == e, p = 0 < g && 1 >= g && 45 >= f && m || \"flat\" == e, u = \"cube\" == e || _[39] == e || null == e && 0 == m && 0 == p, c = !1, t = null;\n if (u)g = 360, f = 180; else if (m || p)if (t = ra.parsePath(U(_[487] + e + \".url\"))) {\n var G = 0;\n 0 <= (G = F(t).indexOf(_[478])) && (m = c = !0, k = p = !1, b.panovideosupport && (t = t.slice(G + 7)))\n }\n N.type = e;\n N.hfov = g;\n N.vfov = f;\n N.voffset = h;\n h = (\"\" + N.cubelabels).split(\"|\");\n 6 == h.length && (M.cubelabels = h);\n M.stereo = b.webgl ? N.stereo : !1;\n M.stereoformat = \"sbs\" == F(N.stereoformat) ? 0 : 1;\n h = (\"\" + N.stereolabels).split(\"|\");\n 2 == h.length && (M.stereolabels = h);\n G = F(U(_[294]));\n if (h = U(_[322])) {\n h = ra.parsePath(h);\n if (_[39] == G || \"null\" == G && u) {\n G = U(_[211]);\n if (null != G) {\n var G = F(G), x = [0, 1, 2, 3, 4, 5];\n x[G.indexOf(\"l\")] = 0;\n x[G.indexOf(\"f\")] = 1;\n x[G.indexOf(\"r\")] = 2;\n x[G.indexOf(\"b\")] = 3;\n x[G.indexOf(\"u\")] = 4;\n x[G.indexOf(\"d\")] = 5;\n G = x\n }\n M.addCubestripPreview(h, G)\n } else(\"flat\" == G || (\"null\" == G || _[42] == G || _[24] == G) && p) && M.addFlatLevel(h, g, f, 0, 0, 0, N.baseindex, !0);\n a(!1, !0)\n } else if (0 == G.indexOf(\"grid\")) {\n if (h = Gb(G))if (h = h[0], \"grid\" == h.cmd) {\n var P = h.args, h = void 0 == P[1] ? 64 : parseInt(P[1]), G = void 0 == P[2] ? 64 : parseInt(P[2]), x = void 0 == P[3] ? 512 : parseInt(P[3]), z = void 0 == P[4] ? 6710886 : parseInt(P[4]), y = void 0 == P[5] ? 2236962 : parseInt(P[5]), P = void 0 == P[6] ? void 0 == P[4] ? 16777215 : z : parseInt(P[6]), z = ca(z), y = ca(y), P = ca(P);\n M.addGridPreview(x, h, G, y, z, P);\n a(!1, !0);\n w()\n }\n } else w();\n h = !1;\n G = b.androidstock && !b.webgl;\n if (p || u) {\n if (d || u && G)l ? h = r(_[311]) : n && (h = r(_[313]));\n if (0 == h)if (\"cube\" == e) {\n if (k)if (n = N.level.getArray(), d = n.length, n.sort(function (a, b) {\n return +parseInt(a.tiledimagewidth, 10) - parseInt(b.tiledimagewidth, 10)\n }), 0 == b.multiressupport || G) {\n f = b.iphone && b.retina || b.tablet || b.android ? 1100 : b.iphone ? 512 : 2560;\n 0 < Lb && (f = Lb + 256);\n for (k = d - 1; 0 <= k && !(g = n[k].tiledimagewidth, g <= f); k--);\n 0 <= k && (h = r(_[54] + k + \"]\", !0))\n } else for (n.sort(function (a, b) {\n return +parseInt(a.tiledimagewidth, 10) - parseInt(b.tiledimagewidth, 10)\n }), k = 0; k < d; k++)if (n = _[54] + k + \"]\", l = U(n), f = v(n))n = l.tilesize ? l.tilesize : N.tilesize, g = parseInt(l.tiledimagewidth, 10), 0 < n && 0 < g && (M.addCubeLevel(f, g, n, N.baseindex), h = !0);\n 0 == h && (h = r(_[75]))\n } else if (_[39] == e && N.cubestrip)M.addCubestripPano(ra.parsePath(\"\" + N.cubestrip.url)), h = !0; else if ((_[42] == e || _[24] == e) && 1 >= g && 45 >= f || \"flat\" == e) {\n if (b.multiressupport && k)for (n = N.level.getArray(), d = n.length, n.sort(function (a, b) {\n return +parseInt(a.tiledimagewidth, 10) - parseInt(b.tiledimagewidth, 10)\n }), k = 0; k < d; k++)if (n = _[54] + k + \"]\", l = U(n), c = U(n + \".\" + e + \".url\"), c = ra.parsePath(c))n = l.tilesize ? l.tilesize : N.tilesize, t = parseInt(l.tiledimagewidth, 10), l = parseInt(l.tiledimageheight, 10), 0 < n && 0 < t && 0 < l && (M.addFlatLevel(c, g, f, t, l, n, N.baseindex, !1), h = !0);\n 0 == h && (d = N[e]) && d.url && (M.addFlatLevel(ra.parsePath(\"\" + d.url), g, f, 0, 0, 0, N.baseindex, !1), h = !0)\n }\n } else m && 0 == k && b.webgl && t && ((g = [Number(N.hfov), Number(N.vfov), Number(N.voffset)], c) ? b.panovideosupport && (f = xa.getItem(t)) && (f.renderToBitmap = !0, f.visible = !1, M.addRoundPano(e, null, g, f), h = !0) : (M.addRoundPano(e, t, g), h = !0));\n h && (Cb = $c = !0);\n M.finalize();\n 0 == h && null != e && la(2, _[171]);\n a(!1, !0)\n }\n\n function v(a) {\n var b = _[174].split(\" \"), c = Array(6), d, e;\n if (d = U(a + \".\" + b[6] + \".url\")) {\n if (d = ra.parsePath(d))for (e = 0; 6 > e; e++)c[e] = d.split(\"%s\").join(M.cubelabels[e])\n } else for (e = 0; 6 > e; e++)if (d = ra.parsePath(U(a + \".\" + b[e] + \".url\")))c[e] = d; else return null;\n return c\n }\n\n function r(a, b) {\n var c = v(a);\n if (!c)return !1;\n if (b) {\n var d = U(a), e = d.tilesize ? d.tilesize : N.tilesize, d = parseInt(d.tiledimagewidth, 10);\n M.addCubeLevel(c, d, e, N.baseindex)\n } else M.addCubeLevel(c, 0, 0, 1);\n return !0\n }\n\n function y(a) {\n 1 < a && (a = 1);\n 0 == b.webgl && (a *= a * a);\n a = 1 - a;\n 0 > a && (a = 0);\n return a\n }\n\n var l = Xa;\n l.loadpano = function (a, b, c, e, k) {\n h.count++;\n h.id = h.count;\n if (f())if (0 > F(c).indexOf(_[358]) && I(_[102], 0), \"null\" == F(a) && (a = null), m.xml.content = null, m.xml.scene = null, a) {\n da.busy = !0;\n null == ra.firstxmlpath ? ra.firstxmlpath = g(a) : a = ra.parsePath(a, !0);\n ra.currentxmlpath = g(a);\n m.xml.url = a;\n var l = h.id;\n ra.loadxml(a, function (d, g) {\n if (l == h.id) {\n if (d && d.childNodes) {\n var f = d.childNodes, m = f.length;\n 0 == m ? d = null : 2 == m && f[1] && _[22] == f[1].nodeName && (d = null)\n }\n d ? (d = T.resolvexmlencryption(d, a), null != d && T.resolvexmlincludes(d, function () {\n d = T.xmlDoc;\n n(d, b, c, e, k)\n })) : 200 == g ? Ea(a + _[21]) : Ea(a + _[181])\n }\n })\n } else m.xml.url = \"\", d(_[219], b, c, e, k)\n };\n l.loadxml = d;\n l.loadxmldoc = n;\n l.updateview = a;\n l.updateplugins = function (a) {\n var b = xa.getArray(), c = b.length, d;\n for (d = 0; d < c; d++) {\n var e = b[d];\n e && (a || e.poschanged) && e.loaded && e.updatepos()\n }\n };\n l.checkautorotate = function (a) {\n var b = Ta();\n a && (Kb = b);\n Kb > cb && (cb = Kb);\n a = b - cb;\n a > 1E3 * m.idletime && cb != Hd && (Hd = cb, Ka(_[492]));\n a = b - Kb;\n if (za.enabled && a > 1E3 * za.waittime) {\n cb = Kb = 0;\n var c = p._hlookat;\n a = p._vlookat;\n var b = p._fov, d = Math.tan(Math.min(.5 * b, 45) * Y), e = za.accel, g = za.speed, f = za.currentmovingspeed, e = e / 60, g = g / 60;\n 0 < g ? (f += e * e, f > g && (f = g)) : (f -= e * e, f < g && (f = g));\n za.currentmovingspeed = f;\n c += d * f;\n d = Math.abs(d * f);\n p._hlookat = c;\n c = parseFloat(za.horizon);\n isNaN(c) || (c = (c - a) / 60, e = Math.abs(c), 0 < e && (e > d && (c = d * c / e), a += c, p._vlookat = a));\n a = parseFloat(za.tofov);\n isNaN(a) || (a < p.fovmin && (a = p.fovmin), a > p.fovmax && (a = p.fovmax), a = (a - b) / 60, c = Math.abs(a), 0 < c && (c > d && (a = d * a / c), b += a, p._fov = b));\n return !0\n }\n za.currentmovingspeed = 0;\n return !1\n };\n l.previewdone = w;\n l.havepanosize = function (a) {\n M && M.id == a.id && (N.hfov = a.hfov, N.vfov = a.vfov, N.hres = a.hres, N.vres = a.vres, Ka(_[405]), p.haschanged = !0)\n };\n l.removeelements = E;\n l.isLoading = function () {\n return Cb\n };\n l.isBlending = function () {\n return ad || Wa\n };\n var u = [], h = {count: 0, id: 0}, c = 0, K = !1, D = null, z = null;\n l.checkHovering = function () {\n if (1 != (jc & 1) && !da.blocked) {\n var a = [xa.getArray(), Ua.getArray()], b, c, d, e, g;\n for (g = 0; 2 > g; g++)for (b = a[g], d = b.length, e = 0; e < d; e++)(c = b[e]) && c._visible && c.hovering && c.onhover && da.callaction(c.onhover, c)\n }\n };\n l.handleloading = function () {\n var a = !1;\n 0 == Wa && (fa && (a |= fa.doloading()), M && (a |= M.doloading()));\n Cb = M && M.isloading();\n var b = Oa.handleloading();\n $c && 1 != Cb && ($c = !1, Ka(_[265]));\n b & 1 && (Cb = !0);\n b & 2 && (a = !0);\n M && (fa || z) && (0 == Wa ? M.previewcheck() && (Wa = !0, Eb = -1) : (a = 0, 0 <= Db && (-1 == Eb ? Eb = Ta() : (a = (Ta() - Eb) / 1E3, a = 0 < Db ? a / Db : 1), a = y(a), ad = !0, M.setblend(1 - a), ub = !0, qc = 1 - a), 0 == a && (Db = 0, fa && (fa.destroy(), fa = null), ad = Wa = !1), a = !0));\n return a\n }\n })();\n var Oa = {};\n (function () {\n var a, d;\n\n function E(a) {\n if (!1 === document.hidden && ka) {\n var b = parseInt(ka.style.height);\n 0 < b && (ka.style.height = b + 1 + \"px\", setTimeout(function () {\n ka && parseInt(ka.style.height) == b + 1 && (ka.style.height = b + \"px\")\n }, 100))\n }\n }\n\n function f(a) {\n return \"#ifdef GL_ES\\n#ifdef GL_FRAGMENT_PRECISION_HIGH\\nprecision highp float;\\n#else\\nprecision mediump float;\\n#endif\\n#endif\\nuniform float aa;uniform sampler2D sm;varying vec2 tt;void main(){vec4 c=texture2D(sm,vec2(tt.s,tt.t)\" + (a ? \",-1.0\" : \"\") + \");gl_FragColor=vec4(c.rgb,c.a*aa);}\"\n }\n\n function g(a, b, c) {\n var d = ua;\n null == a && (a = \"attribute vec2 vx;varying vec2 tx;void main(){gl_Position=vec4(vx.x*2.0-1.0,-1.0+vx.y*2.0,0.0,1.0);tx=vx;}\");\n var e = d.createShader(d.VERTEX_SHADER);\n d.shaderSource(e, a);\n d.compileShader(e);\n if (!d.getShaderParameter(e, d.COMPILE_STATUS))return la(0, _[185] + d.getShaderInfoLog(e)), null;\n a = d.createShader(d.FRAGMENT_SHADER);\n d.shaderSource(a, b);\n d.compileShader(a);\n if (!d.getShaderParameter(a, d.COMPILE_STATUS))return la(0, _[186] + d.getShaderInfoLog(a)), null;\n b = d.createProgram();\n d.attachShader(b, e);\n d.attachShader(b, a);\n d.linkProgram(b);\n if (!d.getProgramParameter(b, d.LINK_STATUS))return la(0, _[162]), null;\n d.useProgram(b);\n d.uniform1i(d.getUniformLocation(b, \"sm\"), 0);\n e = d.getAttribLocation(b, \"vx\");\n d.enableVertexAttribArray(e);\n e = {prg: b, vxp: e};\n c = c.split(\",\");\n var g, f;\n g = c.length;\n for (a = 0; a < g; a++)f = c[a], e[f] = d.getUniformLocation(b, f);\n return e\n }\n\n function n(a) {\n var b = ua;\n a ? (ob = Cb, Cb = a) : (a = Cb = ob, ob = null);\n a && b.useProgram(a)\n }\n\n function k() {\n var c = ua;\n try {\n var e = c.createBuffer();\n c.bindBuffer(lb, e);\n c.bufferData(lb, new Float32Array([0, 0, 0, 1, 1, 1, 1, 0]), wc);\n var h = c.createBuffer();\n c.bindBuffer(Qb, h);\n c.bufferData(Qb, new Uint16Array([0, 1, 2, 0, 2, 3]), wc);\n a = e;\n d = h;\n var k;\n for (k = 0; 6 > k; k++) {\n var e = _[159], t = h = \"\", l = \"\";\n 0 == k ? t = _[168] : 1 == k ? (l = \"cc\", h = _[88], t = _[158]) : 2 == k ? (l = \"cc\", h = _[88], t = _[153]) : 3 == k ? (l = \"ct,zf\", h = _[176], t = _[152]) : 4 == k ? (l = \"fp,bl\", h = _[175], t = \"float t=(tx.x*fp.x+tx.y*fp.y+fp.z)*(1.0-2.0*bl)+bl;gl_FragColor=vec4(texture2D(sm,tx).rgb,smoothstep(t-bl,t+bl,aa));\") : 5 == k && (l = _[439], h = _[163], t = \"float t=(1.0-sqrt(2.0)*sqrt((ap.x*(tx.x-0.5)*(tx.x-0.5)+ap.y*(tx.y-0.5)*(tx.y-0.5))/(0.5*(ap.x+ap.y))))*(1.0-2.0*bl)+bl;gl_FragColor=vec4(texture2D(sm,(tx-vec2(0.5,0.5))*mix(1.0,aa,zf)+vec2(0.5,0.5)).rgb,smoothstep(t-bl,t+bl,aa));\");\n e = _[187] + e + h + \"void main(){\" + t + \"}\";\n ha[k] = g(null, e, \"aa,\" + l);\n if (null == ha[k])return !1\n }\n var m = c.createShader(c.VERTEX_SHADER);\n c.shaderSource(m, \"attribute vec3 vx;attribute vec2 tx;uniform float sh;uniform float ch;uniform mat4 mx;uniform mat4 ot;uniform mat3 tm;varying vec2 tt;void main(){vec3 vr=vec3(ot*vec4(vx,1));vec3 vs=1000.0*normalize(vr);vec2 c2=vec2(vr.x,vr.z);c2=c2/max(1.0,length(c2));vec3 vc=1000.0*vec3(c2.x,clamp(vr.y*inversesqrt(1.0+vr.x*vr.x+vr.z*vr.z),-30.0,+30.0),c2.y);vec3 vv=vr*(1.0-sh)+sh*(vs*(1.0-ch)+vc*ch);gl_Position=mx*vec4(vv,1);tt=(vec3(tx,1)*tm).xy;}\");\n c.compileShader(m);\n if (!c.getShaderParameter(m, c.COMPILE_STATUS))return !1;\n var q = c.createShader(c.FRAGMENT_SHADER);\n c.shaderSource(q, f(!0));\n c.compileShader(q);\n if (!c.getShaderParameter(q, c.COMPILE_STATUS))if (b.ie) {\n if (c.shaderSource(q, f(!1)), c.compileShader(q), !c.getShaderParameter(q, c.COMPILE_STATUS))return !1\n } else return !1;\n var p = c.createProgram();\n c.attachShader(p, m);\n c.attachShader(p, q);\n c.linkProgram(p);\n if (!c.getProgramParameter(p, c.LINK_STATUS))return !1;\n n(p);\n Pa = c.getAttribLocation(p, \"vx\");\n Ra = c.getAttribLocation(p, \"tx\");\n Ya = c.getUniformLocation(p, \"sh\");\n Za = c.getUniformLocation(p, \"ch\");\n bb = c.getUniformLocation(p, \"aa\");\n pb = c.getUniformLocation(p, \"sm\");\n jb = c.getUniformLocation(p, \"mx\");\n Bb = c.getUniformLocation(p, \"ot\");\n vb = c.getUniformLocation(p, \"tm\");\n c.enableVertexAttribArray(Pa);\n c.enableVertexAttribArray(Ra);\n Ia.sh = p;\n Ia.vs = m;\n Ia.ps = q\n } catch (G) {\n return la(0, _[288] + G), !1\n }\n return !0\n }\n\n function e(a) {\n if (a) {\n var b = ua;\n b.deleteBuffer(a.vx);\n b.deleteBuffer(a.tx);\n b.deleteBuffer(a.ix);\n a.vx = null;\n a.tx = null;\n a.ix = null;\n a.vxd = null;\n a.txd = null;\n a.ixd = null;\n a.tcnt = 0\n }\n }\n\n function w(a, b, c, d) {\n this.tcnt = a;\n this.vxd = b;\n this.txd = c;\n this.ixd = d;\n this.ix = this.tx = this.vx = null\n }\n\n function x(a) {\n var b = ua;\n b.bindBuffer(lb, a.vx = b.createBuffer());\n b.bufferData(lb, a.vxd, wc);\n b.bindBuffer(lb, a.tx = b.createBuffer());\n b.bufferData(lb, a.txd, wc);\n b.bindBuffer(Qb, a.ix = b.createBuffer());\n b.bufferData(Qb, a.ixd, wc)\n }\n\n function v(a, b) {\n var c, d = 2 * (b + 1) * (b + 1);\n c = 6 * b * b;\n var e = new Float32Array(3 * (b + 1) * (b + 1)), g = new Float32Array(d), f = new Uint16Array(c);\n if (isNaN(b) || 0 >= b)b = 1;\n var h, k, t, n, l;\n a *= 2;\n for (k = c = d = 0; k <= b; k++)for (h = 0; h <= b; h++)t = h / b, n = k / b, g[d] = t, g[d + 1] = n, d += 2, e[c] = a * (t - .5), e[c + 1] = a * (n - .5), e[c + 2] = 0, c += 3;\n for (k = c = 0; k < b; k++)for (h = 0; h < b; h++)d = h + k * (b + 1), t = d + 1, n = d + (b + 1), l = n + 1, f[c] = d, f[c + 1] = t, f[c + 2] = n, f[c + 3] = t, f[c + 4] = l, f[c + 5] = n, c += 6;\n return new w(6 * b * b, e, g, f)\n }\n\n function r(a) {\n var c = ua;\n null == a && (a = {\n have: !1,\n fb: null,\n tex: null,\n w: 0,\n h: 0,\n alpha: 1,\n havepano: -1,\n drawcalls: 0\n }, a.fb = c.createFramebuffer(), a.tex = c.createTexture(), c.bindTexture(ma, a.tex), c.texParameteri(ma, c.TEXTURE_WRAP_T, c.CLAMP_TO_EDGE), c.texParameteri(ma, c.TEXTURE_WRAP_S, c.CLAMP_TO_EDGE), c.texParameteri(ma, c.TEXTURE_MAG_FILTER, qb), c.texParameteri(ma, c.TEXTURE_MIN_FILTER, qb));\n var d = b.gl.width * xa + .5 | 0, e = b.gl.height * xa + .5 | 0;\n if (a.w != d || a.h != e)a.w = d, a.h = e, c.bindTexture(ma, a.tex), c.texImage2D(ma, 0, mb, d, e, 0, mb, Nc, null), c.bindFramebuffer(Ab, a.fb), c.framebufferTexture2D(Ab, c.COLOR_ATTACHMENT0, ma, a.tex, 0), c.bindTexture(ma, null), c.bindFramebuffer(Ab, null);\n return a\n }\n\n function y(c, e, g) {\n var f = ua;\n if (0 >= c.drawcalls || null == e)return !1;\n var h = b.gl.width * xa + .5 | 0, k = b.gl.height * xa + .5 | 0;\n if (0 < h && 0 < k)return n(e.prg), f.viewport(0, 0, h, k), e.aa && (Aa && (g = 1 - Aa(1 - g, 0, 1), 0 > g ? g = 0 : 1 < g && (g = 1)), f.uniform1f(e.aa, g)), e.sz && f.uniform2f(e.sz, h, k), f.bindBuffer(lb, a), f.vertexAttribPointer(e.vxp, 2, Oc, !1, 0, 0), f.bindBuffer(Qb, d), f.activeTexture(Mc), f.bindTexture(ma, c.tex), f.drawElements(Kb, 6, Gb, 0), R++, !0\n }\n\n function l(a, b, c, d, e, g) {\n var f = !1;\n 0 == d && (b = c = d = 1024, Da = f = !0);\n this.type = 0;\n this.stereo = g;\n this.preview = !1;\n this.needsize = f;\n this.w = b;\n this.h = c;\n this.mp = b * c * a >> 20;\n this.tilesize = d;\n this.htiles = (b + d - 1) / d | 0;\n this.vtiles = (c + d - 1) / d | 0;\n this.loadedtiles = [0, 0];\n this.addedtiles = [0, 0];\n this.totaltiles = a * this.htiles * this.vtiles;\n this.i = e;\n this.planeurls = Array(a);\n this.planemapping = 6 == a ? [0, 1, 2, 3, 4, 5] : [1];\n this.invplanemapping = 6 == a ? [0, 1, 2, 3, 4, 5] : [0, 0, 0, 0, 0, 0];\n this.completelyadded = this.complete = !1;\n this.vfov = this.hfov = 90;\n this.voffset = this.hoffset = 0;\n this.vscale = 1\n }\n\n function u(a, b) {\n return a.preview ? -1 : b.preview ? 1 : a.w - b.w\n }\n\n function h(a, b, d, e, g, f, h) {\n f = 0 < f ? e * h / f : 1;\n 0 >= e && (e = 1);\n 0 >= g && (g = f);\n f = g / f;\n b.hfov = e;\n b.vfov = g;\n b.hoffset = 0;\n b.voffset = e / 2 - g / f / 2;\n b.vscale = 1;\n h = a.levels;\n d && h.push(b);\n h.sort(u);\n b = h.length - 1;\n for (d = g = 0; d <= b; d++)h[d].needsize || (g = h[d].vfov);\n if (0 < g) {\n for (d = 0; d <= b; d++)h[d].needsize || (h[d].vscale = g / h[d].vfov * f);\n a.fovlimits = [-e / 2, +e / 2, -g / 2, +g / 2]\n }\n c(a)\n }\n\n function c(a) {\n var b = null, c = 0 == a.type, d = c || null != a.fovlimits, e = a.levels;\n if (e) {\n var g = e.length;\n 0 < g && (e = e[g - 1], 0 == e.preview && 0 == e.needsize && d && (b = e))\n }\n b && a.done && 0 == a.ready && (a.ready = !0, a.hfov = c ? 360 : b.hfov, a.vfov = c ? 180 : b.vfov, a.hres = b.w, a.vres = b.h, Xa.havepanosize(a))\n }\n\n function K() {\n this.h = this.w = 0;\n this.imgfov = null;\n this.loading = !0;\n this.texture = this.obj = null;\n this.texvalid = !1;\n this.mx = Ma()\n }\n\n function D() {\n this.layer = null;\n this.tiles = [];\n this.mx = this.texture = this.csobj = this.csobj0 = null\n }\n\n function z(a) {\n function d(a, b, c, e) {\n f(a);\n if (0 == a.type) {\n var g = ua;\n c || (c = [0, 1, 2, 3, 4, 5]);\n var h, k, t, n;\n if (b) {\n h = b.naturalWidth;\n k = b.naturalHeight;\n n = 1;\n if (3 * h == 2 * k)t = h / 2; else if (2 * h == 3 * k)t = h / 3; else if (1 * h == 6 * k)t = h / 6; else if (6 * h == 1 * k)t = h / 1; else {\n 0 == a.type && la(2, _[247] + b.src + _[190]);\n return\n }\n h /= t;\n k /= t\n } else e && (t = e.width, n = 0, h = 1, k = 6, b = e);\n e = Sa ? 0 : G;\n var m = t, p = new D, zf = new l(6, m, m, m, 1, !1), r, u, w, v = [2, 0, 3, 1, 4, 5];\n 0 == Sa && (r = Ja(), r.style.position = _[0], r.style.pointerEvents = \"none\", p.layer = r);\n p.tiles = Array(6);\n for (u = 0; u < k; u++)for (r = 0; r < h; r++) {\n var x = c[u * h + r], P = new q(\"prev\" + a.id + \"s\" + Yb[x], 0, x, 0, 0, zf, \"\", a);\n w = v[x];\n var B = 1 == x || 3 == x ? e : 0, z = 3 >= x ? e : 0, y = Ja(2);\n y.width = m + 2 * B;\n y.height = m + 2 * z;\n y.style.position = _[0];\n y.style[Zc] = \"0 0\";\n var E = y.getContext(\"2d\");\n E && (0 < z && (E.drawImage(b, n * r * t, n * u * t, t, 1, B, 0, t, z), E.drawImage(b, n * r * t, n * u * t + t - 1, t, 1, B, m + z, t, z)), 0 < B && (E.drawImage(b, n * r * t + 0, n * u * t + 0, 1, t, 0, B, B, t), E.drawImage(b, n * r * t + t - 1, n * u * t + 0, 1, t, m + B, B, B, t)), E.drawImage(b, n * r * t, n * u * t, t, t, B, z, m, m), Ba && E.getImageData(m >> 1, m >> 1, 1, 1));\n P.canvas = y;\n 0 == Sa ? (P.elmt = y, y = -m / 2, P.transform = Fb[x] + _[53] + (y - B) + \"px,\" + (y - z) + \"px,\" + y + \"px) \") : (J(P, m, m), x = g.createTexture(), g.activeTexture(Mc), g.bindTexture(ma, x), g.texParameteri(ma, g.TEXTURE_WRAP_T, g.CLAMP_TO_EDGE), g.texParameteri(ma, g.TEXTURE_WRAP_S, g.CLAMP_TO_EDGE), g.texParameteri(ma, g.TEXTURE_MAG_FILTER, qb), g.texParameteri(ma, g.TEXTURE_MIN_FILTER, qb), g.texImage2D(ma, 0, cc, cc, Nc, y), g.bindTexture(ma, null), P.texture = x, P.mem = 0);\n P.state = 2;\n p.tiles[w] = P\n }\n Da = !0;\n a.cspreview = p\n }\n }\n\n function e(a, b) {\n t.imagefov = b;\n var c = a.rppano, d = c.w, g = c.h;\n a.stereo && (0 == a.stereoformat ? d >>= 1 : g >>= 1);\n var f = b[0], h = b[1], k = b[2];\n 0 >= f && (f = 360);\n if (0 >= h) {\n var h = f, n = d, l = g, m = 180, m = 4 == a.type ? 2 * Math.atan(h / 2 * (l / n) * Y) / Y : h * l / n;\n 180 < m && (m = 180);\n h = m\n }\n a.hfov = f;\n a.vfov = h;\n a.hres = d;\n a.vres = g;\n c.imgfov = [f, h, k];\n c = -h / 2 + k;\n d = +h / 2 + k;\n 4 == a.type && (d = Math.tan(.5 * h * Y), k = Math.sin(k * Y), c = Math.atan(-d + k) / Y, d = Math.atan(+d + k) / Y);\n a.fovlimits = [-f / 2, +f / 2, c, d]\n }\n\n function g(a, c, d, e) {\n c = ua;\n var f = a.rppano, h = c.createTexture();\n c.activeTexture(Mc);\n c.bindTexture(ma, h);\n c.texParameteri(ma, c.TEXTURE_WRAP_T, c.CLAMP_TO_EDGE);\n c.texParameteri(ma, c.TEXTURE_WRAP_S, c.CLAMP_TO_EDGE);\n c.texParameteri(ma, c.TEXTURE_MAG_FILTER, qb);\n c.texParameteri(ma, c.TEXTURE_MIN_FILTER, qb);\n if (d) {\n var t;\n e = d.naturalWidth;\n t = d.naturalHeight;\n f.w = e;\n f.h = t;\n var k = !1, n = !1, l = Q(e) << 1 | Q(t), n = b.opera ? \"\" : F(ja.mipmapping);\n if (n = \"force\" == n || \"auto\" == n && 3 == l)0 == (l & 2) && (k = !0, e = A(e)), 0 == (l & 1) && (k = !0, t = A(t)), c.texParameteri(ma, c.TEXTURE_MIN_FILTER, c.LINEAR_MIPMAP_LINEAR);\n e > ga && (k = !0, e = ga);\n t > ga && (k = !0, t = ga);\n if (k) {\n k = Ja(2);\n k.width = e;\n k.height = t;\n l = k.getContext(\"2d\");\n l.drawImage(d, 0, 0, e, t);\n if (b.ios) {\n var m;\n m = t;\n for (var p = l.getImageData(0, 0, 1, m).data, q = 0, r = m, G = m; G > q;)0 == p[4 * (G - 1) + 3] ? r = G : q = G, G = r + q >> 1;\n m = G / m;\n 0 < m && 1 > m && l.drawImage(d, 0, 0, e, t / m)\n }\n c.texImage2D(ma, 0, cc, cc, Nc, k)\n } else c.texImage2D(ma, 0, cc, cc, Nc, d);\n n && c.generateMipmap(ma);\n f.texvalid = !0\n } else e && (f.videoplugin = e, f.videoready = !1);\n c.bindTexture(ma, null);\n f.texture = h;\n a.rppano = f;\n Da = !0\n }\n\n function f(a) {\n var b = ua, c = a.cspreview;\n if (c)if (a.cspreview = null, b)for (a = 0; 6 > a; a++) {\n var d = c.tiles[a], e = d.texture;\n e && (b.deleteTexture(e), d.texture = null)\n } else a.previewadded && (a.layer.removeChild(c.layer), a.previewadded = !1)\n }\n\n var k = ++X, t = this;\n t.id = k;\n t.image = a;\n t.panoview = null;\n t.type = 0;\n t.cubelabels = _[519].split(\"\");\n t.stereo = !1;\n t.stereoformat = 0;\n t.stereolabels = [\"1\", \"2\"];\n t.done = !1;\n t.ready = !1;\n t.fovlimits = null;\n t.hfov = 0;\n t.vfov = 0;\n t.hres = 0;\n t.vres = 0;\n t.levels = [];\n t.frame = 0;\n t.currentlevel = -1;\n t.viewloaded = !1;\n t.stopped = !1;\n t.suspended = !1;\n t.suspended_h = 0;\n t.alpha = 1;\n t.cspreview = null;\n t.rppano = null;\n t.previewadded = !1;\n t.previewloading = !1;\n t.addToLayer = function (a) {\n if (0 == Sa) {\n var b = Ja(), c = b.style;\n c.position = _[0];\n c.left = 0;\n c.top = 0;\n t.layer = b;\n a.appendChild(b)\n }\n };\n t.addGridPreview = function (a, c, e, g, f, h) {\n a += 1;\n var k = b.desktop ? 1023 : b.tablet || b.webgl ? 511 : 255, n = a < k ? a : k, l = Ja(2);\n l.width = n;\n l.height = n;\n k = n / a;\n e *= k;\n c *= k;\n k = l.getContext(\"2d\");\n k.fillStyle = g;\n k.fillRect(0, 0, n, n);\n k.fillStyle = f;\n for (g = 0; g < a; g += e)k.fillRect(0, g, a, 1);\n for (g = 0; g < a; g += c)k.fillRect(g, 0, 1, a);\n if (h != f)for (k.fillStyle = h, f = 0; f < a; f += e)for (g = 0; g < a; g += c)k.fillRect(g, f, 1, 1);\n setTimeout(function () {\n d(t, null, null, l)\n }, 10)\n };\n t.addCubestripPreview = function (a, b) {\n t.previewloading = !0;\n ra.loadimage(a, function (a) {\n d(t, a, b);\n t.previewloading = !1;\n Xa.previewdone()\n }, function (b) {\n la(3, _[58] + a + _[62]);\n t.previewloading = !1\n })\n };\n t.addCubestripPano = function (a) {\n ra.loadimage(a, function (a) {\n d(t, a, null)\n }, function (b) {\n la(3, _[58] + a + _[62])\n })\n };\n t.addCubeLevel = function (a, b, d, e) {\n b = new l(6, b, b, d, e, t.stereo);\n b.planeurls[0] = a[0];\n b.planeurls[1] = a[1];\n b.planeurls[2] = a[2];\n b.planeurls[3] = a[3];\n b.planeurls[4] = a[4];\n b.planeurls[5] = a[5];\n a = t.levels;\n a.push(b);\n a.sort(u);\n c(t)\n };\n t.addFlatLevel = function (a, b, c, d, e, g, f, k) {\n t.type = 1;\n g = new l(1, d, e, g, f, t.stereo);\n g.planeurls[0] = a;\n g.type = 1;\n g.preview = k;\n h(t, g, !0, b, c, d, e)\n };\n t.addRoundPano = function (a, b, c, d) {\n _[24] == F(a) ? t.type = 4 : t.type = 3;\n t.rppano = new K;\n if (d) {\n if (t.updateFOV = e, g(t, a, null, d), d._panoid = t.id, t.imagefov = c, d.onvideoreadyCB = function () {\n var a = t.rppano;\n a.w = d.videowidth;\n a.h = d.videoheight;\n e(t, t.imagefov);\n p.updateView();\n Xa.havepanosize(t);\n t.ready = !0;\n t.rppano.loading = !1;\n a.videoready = !0\n }, d.havevideosize)d.onvideoreadyCB()\n } else b && ra.loadimage(b, function (b) {\n g(t, a, b);\n e(t, c);\n p.updateView();\n Xa.havepanosize(t);\n t.rppano.loading = !1\n })\n };\n t.finalize = function () {\n t.done = !0;\n c(t)\n };\n t.setblend = function (a) {\n Sa ? t.alpha = a : t.layer && (t.layer.style.opacity = a)\n };\n t.removemainpano = function () {\n };\n t.stop = function () {\n t.stopped = !0\n };\n t.destroy = function () {\n var a = ua;\n f(t);\n if (a) {\n var b = t.rppano;\n if (b) {\n var c = b.texture;\n c && a.deleteTexture(c);\n b.texture = null\n }\n }\n for (var d in ab)(b = ab[d]) && b.pano === t && ea(b);\n a || (t.layer.parentNode.removeChild(t.layer), t.layer = null)\n };\n t.previewcheck = function () {\n var a = t.rppano;\n return a && a.videoplugin ? a.texvalid : t.previewloading || 0 == t.type && null == t.cspreview && 0 < t.levels.length && !t.viewloaded ? !1 : !0\n };\n t.doloading = function () {\n return !1\n };\n t.isloading = function () {\n if (t.previewloading)return !0;\n var a = t.levels, b = a.length;\n if (0 < b) {\n if (0 == t.type && (b = a[0].preview && 1 < b ? 1 : 0, 9 > a[b].mp && !a[b].complete) || !t.viewloaded)return !0\n } else if (a = t.rppano)return a.videoplugin ? a.texvalid : a.loading;\n return !1\n }\n }\n\n function q(a, b, c, d, e, g, f, h) {\n this.id = a;\n this.pano = h;\n this.cubeside = c;\n this.stereo = f;\n this.levelindex = b;\n this.level = g;\n this.h = d;\n this.v = e;\n this.draworder = g ? Yb[c] * g.htiles * g.vtiles + e * g.htiles + d : Yb[c];\n this.url = null;\n this.sh = this.ch = this.sv = 0;\n this.mx = this.texture = this.canvas = this.image = this.elmt = null;\n this.lastusage_on_frame = this.mem = this.retries = this.state = 0;\n this.overlap = this.transform = null;\n g && (a = 2 * ((d + .5) / g.htiles - .5), e = 2 * ((e + .5) / g.vtiles - .5), a += .5 / g.htiles, e += .5 / g.vtiles, 1 == h.type && (a *= Math.tan(.5 * g.hfov * Y), e *= Math.tan(.5 * g.vfov * Y)), 0 == c ? (c = 1, g = e, h = -a) : 1 == c ? (c = -a, g = e, h = -1) : 2 == c ? (c = -1, g = e, h = a) : 3 == c ? (c = a, g = e, h = 1) : 4 == c ? (c = -a, h = -e, g = -1) : (c = -a, h = e, g = 1), a = -Math.atan2(c, h), e = -Math.atan2(-g, Math.sqrt(c * c + h * h)), this.sv = Math.sin(e), e = Math.cos(e), this.ch = Math.cos(a) * e, this.sh = Math.sin(a) * e)\n }\n\n function J(a, b, c) {\n var d = Jc[a.cubeside], e = a.level, g = e.w / 2, f = e.tilesize, h = 1E3 / g, k = 1, t = e.vscale;\n 1 == e.type && (k = Math.tan(.5 * e.hfov * Y));\n var n = (-g + a.h * f + b / 2 + 2 * e.hoffset * g / 90) * h * k, e = (-g + a.v * f + c / 2 + 2 * e.voffset * g / e.hfov) * h * k * t, g = g * h;\n Hc(rd, b / 1E3 * k, 0, 0, 0, c / 1E3 * k * t, 0, 0, 0, 1);\n ye(Zb, n, e, g);\n Ic(rd, Zb);\n b = Zb;\n k = d[1];\n t = -d[0] * Y;\n d = Math.cos(t);\n c = Math.sin(t);\n t = -k * Y;\n k = Math.cos(t);\n t = Math.sin(t);\n Hc(b, k, 0, -t, c * t, d, c * k, d * t, -c, d * k);\n Ic(rd, Zb);\n d = Ma();\n Hc(d, h, 0, 0, 0, h, 0, 0, 0, h);\n Ic(d, rd);\n a.mx = d\n }\n\n function C(a, b, c, d, e, g) {\n var f = [], h = a.length, k, t = !1, n = 0, l;\n for (k = 0; k < h; k++) {\n var m = a.charAt(k), p = m.charCodeAt(0);\n if (37 == p)t = !0, n = 0; else if (48 == p)t ? n++ : f.push(m); else if (t) {\n t = !1;\n l = null;\n 65 <= p && 84 >= p && (p += 32);\n if (108 == p)l = c; else if (115 == p)l = b; else if (116 == p)l = g; else if (117 == p || 120 == p || 99 == p || 104 == p)l = d; else if (118 == p || 121 == p || 114 == p)l = e;\n if (null != l) {\n for (; l.length <= n;)l = \"0\" + l;\n f.push(l)\n } else f.push(\"%\" + m)\n } else t = !1, f.push(m)\n }\n return f.join(\"\")\n }\n\n function Q(a) {\n return 0 == (a & a - 1)\n }\n\n function A(a) {\n a--;\n a |= a >> 1;\n a |= a >> 2;\n a |= a >> 4;\n a |= a >> 8;\n a |= a >> 16;\n a++;\n return a\n }\n\n function H(a, b, c, d, e, g) {\n if (0 < g)setTimeout(function () {\n try {\n H(null, b, c, d, e, 0)\n } catch (a) {\n }\n }, g); else {\n null == a && (a = b.getContext(\"2d\"));\n g = e[0];\n var f = e[1], h = e[2], k = e[3];\n 0 < g && a.drawImage(c, 0, 0, 1, d[1], 0, f, g, d[3]);\n 0 < f && a.drawImage(c, 0, 0, d[0], 1, g, 0, d[2], f);\n 0 < h && a.drawImage(c, d[0] - 1, 0, 1, d[1], g + d[2], f, h, d[3]);\n 0 < k && a.drawImage(c, 0, d[1] - 1, d[0], 1, g, f + d[3], d[2], k)\n }\n }\n\n function qa(a) {\n function d() {\n if (0 < I)Da = !0, setTimeout(d, 0); else if (aa--, null != g && null != g.naturalWidth) {\n var e = g.naturalWidth, f = g.naturalHeight, k = e * f * 4, t = !1;\n 0 == k && (t = !0);\n if (t)a.state = 0, Da = !0; else {\n var n = a.level;\n if (n) {\n n.needsize && (n.w = e, n.h = f, n.tilesize = e > f ? e : f, n.needsize = !1, 1 == n.type ? h(a.pano, n, !1, N.hfov, N.vfov, e, f) : c(a.pano), n.preview && Xa.previewdone());\n n.loadedtiles[a.stereo - 1]++;\n n.complete = n.stereo && ja.stereo ? n.loadedtiles[0] == n.totaltiles && n.loadedtiles[1] == n.totaltiles : n.loadedtiles[0] == n.totaltiles;\n t = 1 == n.htiles * n.vtiles;\n a.state = 2;\n a.lastusage_on_frame = M;\n if (Sa) {\n J(a, e, f);\n var l = ua, m = b.opera ? \"\" : F(ja.mipmapping), p = \"force\" == m;\n if (m = p || \"auto\" == m) {\n if (!Q(e) || !Q(f)) {\n m = 1024;\n t ? (m = 0, p && (m = ga)) : p || Q(n.tilesize) || (m = 0);\n var t = A(e), q = A(f);\n t < m && q < m && (n = Ja(2), n.width = t, n.height = q, m = n.getContext(\"2d\"), m.drawImage(g, 0, 0, t, q), g = n, e = t, f = q)\n }\n m = Q(e) && Q(f)\n }\n m && 0 == p && !b.realDesktop && a.level && 2500 < a.level.h && (m = !1);\n e = l.createTexture();\n l.activeTexture(Mc);\n l.bindTexture(ma, e);\n l.texParameteri(ma, l.TEXTURE_WRAP_T, l.CLAMP_TO_EDGE);\n l.texParameteri(ma, l.TEXTURE_WRAP_S, l.CLAMP_TO_EDGE);\n l.texParameteri(ma, l.TEXTURE_MAG_FILTER, qb);\n l.texParameteri(ma, l.TEXTURE_MIN_FILTER, m ? l.LINEAR_MIPMAP_LINEAR : qb);\n l.texImage2D(ma, 0, cc, cc, Nc, g);\n m && l.generateMipmap(ma);\n l.bindTexture(ma, null);\n a.texture = e;\n a.image = g = null\n } else {\n l = [e, f, e, f];\n p = !1;\n e == f && 1 == n.htiles && (m = ja.hardwarelimit, e + 2 * G > m && (n.w = n.h = l[2] = l[3] = e = f = m - 2 * G, p = !0));\n var r = [0, 0, 0, 0], u = G, w = a.h, v = a.v, n = a.cubeside, x = a.level, P = x.tilesize, m = x.vscale, B = -x.w / 2, y = q = 1;\n 1 == x.type && (q = Math.tan(.5 * x.hfov * Y), n = 6, 2 < u && (u = 2), b.ie || b.desktop && b.safari) && (y = 252);\n 1E3 < -B && 4 < u && (u = 4);\n var z = B, D = z;\n r[2] = u;\n r[3] = u;\n 0 == n || 2 == n ? 0 == w && (r[0] = u) : 1 != n && 3 != n || w != x.vtiles - 1 || (r[2] = 0);\n 0 <= n && 3 >= n ? 0 == v && (r[1] = u) : (w == x.htiles - 1 && (r[2] = 0), v == x.vtiles - 1 && (r[3] = 0));\n a.overlap = r;\n z -= r[0];\n D -= r[1];\n r = (z + w * P) * q;\n v = (D + v * P - 2 * x.voffset * B / x.hfov) * q * m;\n x = q;\n P = q * m;\n 1 < y && (r *= y, v *= y, B *= y, x *= y, P *= y);\n y = \"\" + r;\n r = 0 < y.indexOf(\"e-\") ? r = r.toFixed(18) : y;\n y = \"\" + v;\n v = 0 < y.indexOf(\"e-\") ? v = v.toFixed(18) : y;\n y = \"\" + B;\n B = 0 < y.indexOf(\"e-\") ? B = B.toFixed(18) : y;\n a.transform = Fb[n] + _[53] + r + \"px,\" + v + \"px,\" + B + \"px) \";\n if (1 != q || 1 != m)a.transform += _[429] + x + \",\" + P + \",1) \";\n (q = a.overlap) ? (n = Ja(2), n.width = e + q[0] + q[2], n.height = f + q[1] + q[3], n.style.overflow = _[6], k = n.width * n.height * 4, B = y = 0, m = n.getContext(\"2d\"), q && (y = q[0], B = q[1], H(m, n, g, l, q, t ? 0 : 250)), p ? m.drawImage(g, 0, 0, l[0], l[1], y, B, e, f) : m.drawImage(g, y, B), Ba && m.getImageData(l[0] >> 1, l[1] >> 1, 1, 1), a.canvas = n, a.elmt = n, a.image = g = null) : a.elmt = g;\n a.elmt.style.position = _[0];\n a.elmt.style[Zc] = \"0 0\"\n }\n a.mem = k;\n kb += k;\n if (kb > ca) {\n Da = !0;\n I++;\n for (var E, e = null, f = 0; ;) {\n for (E in ab)f++, k = ab[E], 0 < k.levelindex && 2 <= k.state && k.lastusage_on_frame < M - 1 && (!e || k.lastusage_on_frame < e.lastusage_on_frame) && (e = k);\n if (e) {\n if (ea(e), e = null, kb < ca - 2097152)break\n } else break\n }\n if (f > Math.max(2 * $a.length, 100)) {\n e = {};\n for (E in ab)if (k = ab[E])(0 < k.levelindex || 8 < k.level.mp) && 0 == k.state && k.lastusage_on_frame < M - 2 ? (k.pano = null, k.level = null) : e[E] = k;\n ab = e\n }\n kb > ca && (ia = !0)\n }\n Da = !0;\n I++\n }\n }\n }\n }\n\n function e(b, c) {\n aa--;\n c ? a.state = 4 : a.retries < m.network.retrycount ? (a.retries++, a.state = 0, Da = !0) : (a.state = 4, la(3, _[58] + a.url + _[62]))\n }\n\n if (null != a.pano) {\n null == a.url && (a.url = C(a.level.planeurls[a.level.invplanemapping[a.cubeside]], a.pano.cubelabels[a.cubeside], a.levelindex, String(a.h + a.level.i), String(a.v + a.level.i), a.pano.stereolabels[a.stereo - 1]));\n a.state = 1;\n var g = ra.loadimage(a.url, d, e);\n a.image = g;\n aa++\n }\n }\n\n function ea(a) {\n var b = ua, c = a.texture;\n b && c && b.deleteTexture(c);\n (b = a.elmt) && (c = b.parentNode) && c.removeChild(b);\n c = $a.length;\n for (b = 0; b < c; b++)if ($a[b] == a) {\n $a.splice(b, 1);\n break\n }\n b = a.id;\n ab[b] = null;\n delete ab[b];\n if (b = a.level)b.addedtiles[a.stereo - 1]--, b.completelyadded = b.stereo && ja.stereo ? b.addedtiles[0] == b.totaltiles && b.addedtiles[1] == b.totaltiles : b.addedtiles[0] == b.totaltiles;\n kb -= a.mem;\n a.state = 0;\n a.image = null;\n a.canvas = null;\n a.texture = null;\n a.elmt = null;\n a.pano = null;\n a.level = null\n }\n\n function Ca(a) {\n if (Sa) {\n var b = ua, c = xb, d = a.texture;\n c && d && (b.uniformMatrix4fv(Bb, !1, a.mx), b.bindBuffer(lb, c.vx), b.vertexAttribPointer(Pa, 3, Oc, !1, 0, 0), b.bindBuffer(lb, c.tx), b.vertexAttribPointer(Ra, 2, Oc, !1, 0, 0), b.bindBuffer(Qb, c.ix), b.activeTexture(Mc), b.bindTexture(ma, d), b.drawElements(Kb, c.tcnt, Gb, 0), R++)\n } else a.elmt.style[ib] = pc + a.transform\n }\n\n function S(a, b) {\n var c = new Hb;\n c.x = a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n c.y = a[0] * b[3] + a[1] * b[4] + a[2] * b[5];\n c.z = -2 * (a[0] * b[6] + a[1] * b[7] + a[2] * b[8]);\n return c\n }\n\n function Z(a, c) {\n var d = a.panoview, g = a.id, f, h, k, t, n, l, r, G, u, P, y, z, D, E, C, A, Ba, F, H, J, K, S, Q = !1, L, ea, Z, N, I, V, X, ba, ka, kb, T, ca, ga, ia, ha = !1, oa = !1, va = !0, sa = Ta();\n if (Sa) {\n var ra = ua, za = Qa, Ha = ya, Ea = a.panoview, La = Ea.z, Aa = b.gl.width * xa + .5 | 0, Ka = b.gl.height * xa + .5 | 0;\n if (0 < c) {\n var Na = Aa, Aa = Aa >> 1, za = za >> 1;\n ra.viewport(2 == c ? Aa : 0, 0, 1 == c ? Aa : Na - Aa, Ka)\n } else ra.viewport(0, 0, Aa, Ka);\n var wb = 1 / (.5 * za), Oa = -1 / (.5 * Ha), Ma = Ea.zf, $b = 0 < c ? Number(ja.stereooverlap) * za * .5 * (1 == c ? 1 : -1) : 0, qd = Ea.yf, Xa = Math.min(Ma / 200, 1), ib = 0 < Ma ? Ea.ch : 0;\n xe(Tc, wb, 0, 0, 0, 0, Oa, 0, 0, 0, 0, 65535 / 65536, 1, 0, 0, 65535 / 65536 - 1, 0);\n xe(Kd, La, 0, 0, 0, 0, La, 0, 0, $b, qd, 1, 0, Ma * $b, Ma * qd, Ma, 1);\n Ic(Kd, Tc);\n if (0 < c) {\n var Ee = m.webVR;\n Ee && Ee.enabled && Ee.prjmatrix(c, Kd)\n }\n ra.uniform1i(pb, 0);\n ra.uniform1f(bb, 1);\n ra.uniform1f(Ya, Xa);\n ra.uniform1f(Za, ib);\n kd(Gc, tc);\n Ic(Gc, Kd);\n ra.uniformMatrix4fv(jb, !1, Gc);\n ra.uniformMatrix3fv(vb, !1, Db);\n var Jd = Ia.obj0, Pb = Ia.obj;\n null == Jd && (Jd = v(500, 1), Pb = v(500, 19), x(Jd), x(Pb), Ia.obj0 = Jd, Ia.obj = Pb);\n xb = 10 < Ma ? Pb : Jd\n }\n var Wa = c;\n 0 == Wa && (Wa = 1);\n a.stereo && (g += \"t\" + Wa);\n f = +d.h;\n h = -d.v;\n k = d.z;\n t = Ga - f * Y;\n n = -h * Y;\n l = Math.sin(n);\n r = Math.cos(n);\n G = Math.cos(t) * r;\n u = Math.sin(t) * r;\n if (Ib) {\n var cb = [G, l, u];\n Zd(rd, Ib);\n Fd(rd, cb);\n G = cb[0];\n l = cb[1];\n u = cb[2]\n }\n P = a.levels;\n z = P.length;\n D = a.currentlevel;\n a.viewloaded = !1;\n if (5E3 > k) {\n var ff = 1 / Math.max(100, k), mb = Math.abs(Math.cos(f * Y)), Ab = Math.cos(.25 * Ga);\n if (1E-14 > mb || mb > Ab - 1E-14 && mb < Ab + 1E-14 || mb > 1 - 1E-14 || 1E-14 > r || r > 1 - 1E-14)f += (.5 + .5 * Math.random()) * ff * (.5 > Math.random() ? -1 : 1), h += (.5 + .5 * Math.random()) * ff * (.5 > Math.random() ? -1 : 1);\n b.firefox && (l < -(1 - 1E-14) && (h += .5), l > +(1 - 1E-14) && (h -= .5))\n }\n pc = _[53] + Qa / 2 + \"px,\" + ya / 2 + _[207] + d.yf.toFixed(16) + _[232] + k.toFixed(16) + (0 < b.iosversion && 5 > b.iosversion ? \"\" : \"px\") + _[106] + (-d.r).toFixed(16) + _[86] + k.toFixed(16) + _[295] + h.toFixed(16) + _[284] + f.toFixed(16) + \"deg) \" + hc;\n if (0 < z) {\n var qb = 1 == pa(ja.loadwhilemoving) ? !0 : 0 == a.hasmoved || wa, ob = D;\n 7 <= aa && (qb = !1);\n if (a.stopped)qb = !1; else {\n 9 > P[0].mp && (0 == P[0].complete && (ob = 0, Q = !0), 0 == qb && 0 == P[0].completelyadded && (ob = 0, qb = Q = !0));\n var Cb = m.lockmultireslevel | 0;\n m.downloadlockedlevel && 0 <= Cb && Cb < z && (Q = !0, 0 == P[Cb].complete && (qb = !0))\n }\n ta && 5 < ob && (ob -= 3, ta = !1, Da = !0);\n if (qb) {\n Fa = sa;\n wa = !1;\n ca = null;\n ia = 1E6;\n for (E = ob; 0 <= E; E--) {\n y = P[E];\n Ba = y.w;\n F = y.h;\n H = y.tilesize;\n J = y.htiles;\n K = y.vtiles;\n var ha = !0, Zb = y.planeurls.length;\n for (A = 0; A < Zb; A++)if (C = y.planemapping[A], S = Q ? [0, 0, 1, 1] : d.vr[C]) {\n kb = \"p\" + g + \"l\" + E + \"s\" + Yb[C] + \"h\";\n var Fb = 1, Hb = 1;\n 1 == a.type && (Fb = 1 / Math.tan(.5 * y.hfov * Y), Hb = 1 / Math.tan(.5 * y.vfov * Y));\n L = Math.floor((Fb * (S[0] - .5) + .5) * Ba / H);\n ea = Math.ceil((Fb * (S[2] - .5) + .5) * Ba / H);\n 0 > L && (L = 0);\n ea > J && (ea = J);\n Z = Math.floor((Hb * (S[1] - .5) + .5) * F / H);\n N = Math.ceil((Hb * (S[3] - .5) + .5) * F / H);\n 0 > Z && (Z = 0);\n N > K && (N = K);\n for (ba = Z; ba < N; ba++)for (X = L; X < ea; X++) {\n ka = kb + X + \"v\" + ba;\n T = ab[ka];\n T || (T = new q(ka, E, C, X, ba, y, Wa, a), ab[ka] = T, ha = !1);\n if (0 == T.state)ga = Math.acos(G * T.ch + u * T.sh + l * T.sv), ga < ia && (ca = T, ia = ga), ha = !1; else if (1 == T.state)ha = !1; else if (2 == T.state) {\n 0 == Sa && Ca(T);\n var nb = T, ub = null, Eb = null;\n 0 == Sa && (ub = nb.elmt, Eb = a.layer);\n if (0 != Sa || ub.parentNode != Eb) {\n for (var gc = $a.length, Jb = -1, Ob = void 0, Lb = void 0, Fc = nb.pano, Hc = nb.levelindex, Jc = nb.draworder, qc = 0, uc = 0, Lb = 0; Lb < gc; Lb++)if (Ob = $a[Lb], Ob.pano === Fc && (qc = Ob.levelindex, uc = Ob.draworder, qc >= Hc && uc >= Jc)) {\n Jb = Lb;\n break\n }\n 0 > Jb ? (ub && Eb.appendChild(ub), $a.push(nb)) : (ub && Eb.insertBefore(ub, $a[Jb].elmt), $a.splice(Jb, 0, nb));\n var xc = nb.level;\n xc.addedtiles[nb.stereo - 1]++;\n xc.completelyadded = xc.stereo && ja.stereo ? xc.addedtiles[0] == xc.totaltiles && xc.addedtiles[1] == xc.totaltiles : xc.addedtiles[0] == xc.totaltiles\n }\n T.state = 3\n }\n T.lastusage_on_frame = M\n }\n }\n 0 == ta && 0 == ha && E == ob && 1E3 < sa - W && (ta = !0, W = sa);\n if (ha) {\n a.viewloaded = !0;\n break\n }\n }\n ca && qa(ca)\n }\n }\n 1 != a.viewloaded ? (oa = !0, U = sa) : 0 < U && 200 > sa - U && (oa = !0);\n Sa && 10 < d.zf && (oa = !0);\n if (oa) {\n var ac = a.cspreview;\n if (ac) {\n var Ec = ac.layer;\n for (I = 0; 6 > I; I++) {\n var sc = ac.tiles[I];\n Ca(sc);\n 0 == Sa && 2 == sc.state && (Ec.appendChild(sc.elmt), sc.state = 3)\n }\n 0 != Sa || a.previewadded || (0 == a.layer.childNodes.length ? a.layer.appendChild(Ec) : a.layer.insertBefore(Ec, a.layer.childNodes[0]), a.previewadded = !0)\n }\n } else 0 == Sa && a.previewadded && ((ac = a.cspreview) && a.layer.removeChild(ac.layer), a.previewadded = !1);\n a.previewloading && (va = !1);\n if (va)for (V = $a.length, I = 0; I < V; I++)if (T = $a[I], !(T.pano !== a || a.stereo && T.stereo != Wa))if (T.levelindex > D) {\n 0 == Sa && T.pano.layer.removeChild(T.elmt);\n T.state = 2;\n $a.splice(I, 1);\n I--;\n V--;\n var yc = T.level;\n yc.addedtiles[T.stereo - 1]--;\n yc.completelyadded = yc.stereo && ja.stereo ? yc.addedtiles[0] == yc.totaltiles && yc.addedtiles[1] == yc.totaltiles : yc.addedtiles[0] == yc.totaltiles\n } else Ca(T);\n if (0 == z && Sa) {\n var yb = a.rppano;\n if (2 < a.type && yb) {\n var Xc = yb.texture, vc = yb.imgfov, Rb = yb.videoplugin, Mb = null, Lc = !1;\n Rb && (Rb._panoid != a.id ? Rb = yb.videoplugin = null : Da = p.haschanged = !0);\n if (Xc && vc) {\n var Zc = vc[0], ad = vc[1], gd = vc[2];\n Lc = Rb ? (Mb = Rb.videoDOM) ? yb.videoready : yb.texvalid : !0;\n if (Lc) {\n var Pc = Ia.objS, hd = a.type + \"/\" + Zc + \"x\" + ad + \"/\" + gd;\n if (hd != Ia.objS_i) {\n var id = a.type, Uc = Zc, sd = ad, Qc = gd, zc = Pc, bd = 15453, td = 10302, dc = 3E4;\n zc && zc.tcnt != dc && (zc = null);\n var de = zc ? zc.vxd : new Float32Array(bd), Vc = zc ? zc.txd : new Float32Array(td), cd = zc ? zc.ixd : new Uint16Array(dc), Ac, Bc, jd, Wc, ld, md, Yc, ud, ee, nd, od, pd, Ld, fe, Uc = Uc * Y, sd = sd * Y, Qc = Qc * Y;\n 4 == id ? (sd = 1E3 * Math.tan(.5 * sd), Qc = 500 * Math.sin(1 * Qc)) : Qc = -Qc + .5 * Ga;\n for (Bc = bd = td = 0; 50 >= Bc; Bc++)for (Yc = 1 - Bc / 50, 4 == id ? (ee = 1, Wc = sd * (Yc - .5) + Qc) : (ud = (Bc / 50 - .5) * sd + Qc, ee = Math.sin(ud), nd = Math.cos(ud), Wc = 500 * nd), Ac = 0; 100 >= Ac; Ac++)ud = (Ac / 100 - .5) * Uc + Ga, od = Math.sin(ud), pd = Math.cos(ud), jd = 500 * pd * ee, ld = 500 * od * ee, md = 1 - Ac / 100, de[bd] = jd, de[bd + 1] = Wc, de[bd + 2] = ld, bd += 3, Vc[td] = md, Vc[td + 1] = Yc, td += 2;\n for (Bc = dc = 0; 50 > Bc; Bc++)for (Ac = 0; 100 > Ac; Ac++)Ld = 101 * Bc + Ac, fe = Ld + 101, cd[dc] = Ld, cd[dc + 1] = Ld + 1, cd[dc + 2] = fe, cd[dc + 3] = fe, cd[dc + 4] = Ld + 1, cd[dc + 5] = fe + 1, dc += 6;\n var Pc = new w(3E4, de, Vc, cd), dd = Ia.objS, ec = Pc;\n if (dd && dd.tcnt == ec.tcnt) {\n ec.vx = dd.vx;\n ec.tx = dd.tx;\n ec.ix = dd.ix;\n var vd = ua;\n vd.bindBuffer(lb, ec.vx);\n vd.bufferData(lb, ec.vxd, wc);\n vd.bindBuffer(lb, ec.tx);\n vd.bufferData(lb, ec.txd, wc);\n vd.bindBuffer(Qb, ec.ix);\n vd.bufferData(Qb, ec.ixd, wc)\n } else dd && e(dd), x(ec);\n Ia.objS = Pc;\n Ia.objS_i = hd\n }\n var fc = ua;\n fc.uniformMatrix4fv(Bb, !1, yb.mx);\n a.stereo && fc.uniformMatrix3fv(vb, !1, 0 == a.stereoformat ? 1 >= Wa ? jc : kc : 1 >= Wa ? Nb : bc);\n fc.bindBuffer(lb, Pc.vx);\n fc.vertexAttribPointer(Pa, 3, Oc, !1, 0, 0);\n fc.bindBuffer(lb, Pc.tx);\n fc.vertexAttribPointer(Ra, 2, Oc, !1, 0, 0);\n fc.bindBuffer(Qb, Pc.ix);\n var ge = null;\n if (Mb) {\n var Fe = 60 * Mb.currentTime, Ge = Fe != Mb._uf || b.android && b.chrome && 0 == Mb.paused;\n Rb.isseeking && 0 == Rb.iPhoneMode && (Ge = !1);\n 4 > Mb.readyState && (Ge = !1, Mb._uf = -1);\n if (Ge && 0 == Va)if (Va++, Mb._uf = 4 > Mb.readyState ? -1 : Fe, b.ie && b.desktop) {\n null == fa && (fa = Ja(2));\n if (fa.width != yb.w || fa.height != yb.h)fa.width = yb.w, fa.height = yb.h;\n fa.getContext(\"2d\").drawImage(Mb, 0, 0, yb.w, yb.h);\n ge = fa\n } else ge = Mb && Mb.paused && 5 > (Fe | 0) && Rb.posterDOM ? Rb.posterDOM : Mb\n }\n fc.activeTexture(Mc);\n fc.bindTexture(ma, Xc);\n if (ge)try {\n fc.texImage2D(ma, 0, cc, cc, Nc, ge), yb.texvalid = !0\n } catch (Md) {\n Md = \"\" + Md, Rb && Rb.error != Md && (Rb.error = Md, la(3, Md))\n }\n yb.texvalid && (fc.drawElements(Kb, Pc.tcnt, Gb, 0), R++)\n }\n }\n }\n }\n if (Sa) {\n var $c = (\"\" + ja.hotspotrenderer).toLowerCase();\n if (\"both\" == $c || _[30] == $c || \"auto\" == $c && 0 < c) {\n var Sb = ua, he = xb, ie = m.webVR, He = ie && ie.enabled, Ed = He ? ie.getcursor() : null, Nd = a.panoview, Vd = Nd.h, Wd = Nd.v, Xd = Nd.r, Yd = Nd.z / (He ? 2E3 : ya) * 2, Ie = 1, Ie = Ie * (1 + Nd.zf / 1E3), Gd = Ua.getArray(), $d = Gd.length, je, na, Od, Hd = 2 > c, Je = null;\n if (0 < c) {\n var be = He ? ie.eyetranslt(c) : 0;\n ye(rc, -be, 0, 0);\n kd(oc, ic);\n Ic(oc, rc);\n ye(rc, -p.tz, p.ty, -p.tx);\n ef(oc, rc);\n Je = oc\n }\n Sb.uniformMatrix4fv(jb, !1, Kd);\n Sb.bindBuffer(lb, he.vx);\n Sb.vertexAttribPointer(Pa, 3, Oc, !1, 0, 0);\n Sb.bindBuffer(lb, he.tx);\n Sb.vertexAttribPointer(Ra, 2, Oc, !1, 0, 0);\n Sb.bindBuffer(Qb, he.ix);\n for (je = 0; je < $d; je++)if ((na = Gd[je]) && na._visible && na.loaded && na._distorted && (0 != na.keep || !a.suspended)) {\n var ke = na.GL;\n ke || (na.GL = ke = {tex: null});\n var Id = !0;\n if (Hd) {\n var ed = na._scale, Pd = na._depth;\n isNaN(Pd) && (Pd = 1E3, Id = !1);\n na === Ed && (Pd = Ed.hit_depth, ed *= Pd / 1E3);\n var Cc = na._flying, Ke = (1 - Cc) * na._ath, Le = (1 - Cc) * na._atv, Me = (1 - Cc) * na.rotate;\n 0 < Cc && (Ke += Cc * nc(Vd, na._ath), Le += Cc * nc(Wd, na._atv), Me += Cc * nc(Xd, na.rotate));\n 1 == na.scaleflying && (ed = ed * (1 - Cc) + ed / Yd * Cc * Ie);\n var zb = wd, Ne = na._width / 1E3 * ed * 2, Oe = na._height / 1E3 * ed * 2, ce = na.rz, yf = na.ry, Pe = 2 * na.ox, Qe = 2 * na.oy, Re = Pd, ve = -Me, we = -Ke + 90, ze = Le, Ae = -na.tz, Be = na.ty, Ce = na.tx, rb = void 0, Qd = void 0, xd = void 0, yd = void 0, zd = void 0, Ad = void 0, Bd = void 0, sb = void 0, db = void 0, eb = void 0, fb = void 0, gb = void 0, hb = void 0, rb = na.rx * Y, Qd = Math.cos(rb), xd = Math.sin(rb), rb = yf * Y, yd = Math.cos(rb), zd = Math.sin(rb), rb = ce * Y, Ad = Math.cos(rb), Bd = Math.sin(rb), rb = -ze * Y, sb = Math.cos(rb), db = Math.sin(rb), rb = -we * Y, eb = Math.cos(rb), fb = Math.sin(rb), rb = -ve * Y, gb = Math.cos(rb), hb = Math.sin(rb), Tb = void 0, Ub = void 0, Vb = void 0, Tb = Ne * (yd * Ad - zd * xd * Bd), Ub = Ne * (yd * Bd + zd * xd * Ad), Vb = Ne * zd * Qd;\n zb[0] = Tb * (gb * eb + hb * db * fb) + Ub * (gb * db * fb - hb * eb) - Vb * sb * fb;\n zb[1] = Tb * hb * sb + Ub * gb * sb + Vb * db;\n zb[2] = Tb * (hb * db * eb - gb * fb) + Ub * (hb * fb + gb * db * eb) - Vb * sb * eb;\n zb[3] = 0;\n Tb = -Oe * Qd * Bd;\n Ub = Oe * Qd * Ad;\n Vb = Oe * xd;\n zb[4] = Tb * (gb * eb + hb * db * fb) + Ub * (gb * db * fb - hb * eb) + Vb * sb * fb;\n zb[5] = Tb * hb * sb + Ub * gb * sb - Vb * db;\n zb[6] = Tb * (hb * db * eb - gb * fb) + Ub * (hb * fb + gb * db * eb) + Vb * sb * eb;\n zb[7] = 0;\n Tb = zd * Ad + yd * xd * Bd;\n Ub = zd * Bd - yd * xd * Ad;\n Vb = yd * Qd;\n zb[8] = Tb * (gb * eb + hb * db * fb) + Ub * (gb * db * fb - hb * eb) + Vb * sb * fb;\n zb[9] = Tb * hb * sb + Ub * gb * sb - Vb * db;\n zb[10] = Tb * (hb * db * eb - gb * fb) + Ub * (hb * fb + gb * db * eb) + Vb * sb * eb;\n zb[11] = 0;\n zb[12] = Pe * (gb * eb + hb * db * fb) + Qe * (gb * db * fb - hb * eb) + Re * sb * fb + Ae;\n zb[13] = Pe * hb * sb + Qe * gb * sb - Re * db + Be;\n zb[14] = Pe * (hb * db * eb - gb * fb) + Qe * (hb * fb + gb * db * eb) + Re * sb * eb + Ce;\n zb[15] = 1;\n kd(na.MX, wd)\n } else kd(wd, na.MX);\n if (!(.01 > na._alpha)) {\n Je && Id ? Ic(wd, Je) : Ic(wd, ic);\n Sb.uniformMatrix4fv(Bb, !1, wd);\n var Rc = Db, Cd = na.crop;\n na.pressed && na._ondowncrop ? Cd = na._ondowncrop : na.hovering && na._onovercrop && (Cd = na._onovercrop);\n if (Cd)if (Cd != na.C_crop) {\n na.C_crop = Cd;\n var le = (\"\" + Cd).split(\"|\"), gf = na.loader.naturalWidth, hf = na.loader.naturalHeight, Rc = [1, 0, 0, 0, 1, 0, 0, 0, 0];\n Rc[0] = (1 * le[2] - 1) / gf;\n Rc[2] = (1 * le[0] + .5) / gf;\n Rc[4] = (1 * le[3] - 1) / hf;\n Rc[5] = (1 * le[1] + .5) / hf;\n na.C_crop_matrix = Rc\n } else Rc = na.C_crop_matrix;\n Sb.uniformMatrix3fv(vb, !1, Rc);\n Sb.uniform1f(bb, na._alpha);\n Sb.activeTexture(Mc);\n if (Od = ke.tex)Sb.bindTexture(ma, Od); else if (Od = B(na))ke.tex = Od;\n Od && (Sb.drawElements(Kb, he.tcnt, Gb, 0), R++)\n }\n }\n if (Hd && M & 1) {\n var Se = m.webVR, jf = Se && Se.enabled, lc = jf ? Se.getcursor() : null, Te = Ua.getArray(), kf = Te.length, Sc, tb, lf = !jf, Rd = [0, 0, 1], mf = !1, me = lc ? lc.depth : 2E3, nf = lc && lc.enabled;\n if (lf) {\n var nf = !0, mc = O.x, De = O.y;\n if (ja.stereo) {\n var ne = Qa >> 1, of = ne * Number(ja.stereooverlap);\n mc < ne ? (mc += ne >> 1, mc -= of >> 1) : (mc -= ne >> 1, mc += of >> 1)\n }\n var Ue = p.inverseProject(mc, De), Rd = [-Ue.x, -Ue.y, -Ue.z]\n }\n var Wb = Kc, Dd = Rd, Ve = Dd[0], We = Dd[1], Xe = Dd[2];\n Dd[0] = Ve * Wb[0] + We * Wb[4] + Xe * Wb[8] + Wb[12];\n Dd[1] = Ve * Wb[1] + We * Wb[5] + Xe * Wb[9] + Wb[13];\n Dd[2] = Ve * Wb[2] + We * Wb[6] + Xe * Wb[10] + Wb[14];\n for (Sc = kf - 1; 0 <= Sc; Sc--)if ((tb = Te[Sc]) && tb._visible && tb.loaded && tb._distorted && tb !== lc && (tb._hit = !1, nf && tb._enabled)) {\n var Ye, Dc = tb.MX, pf = 0, Xb = 1E3, Ze = Rd[0], $e = Rd[1], af = Rd[2], oe = Xb * Dc[0], pe = Xb * Dc[1], qe = Xb * Dc[2], re = Xb * Dc[4], se = Xb * Dc[5], te = Xb * Dc[6], bf = Dc[12] - (oe + re) / 2, cf = Dc[13] - (pe + se) / 2, df = Dc[14] - (qe + te) / 2, Sd = $e * te - af * se, Td = af * re - Ze * te, Ud = Ze * se - $e * re, fd = oe * Sd + pe * Td + qe * Ud;\n if (-1E-6 > fd || 1E-6 < fd)fd = 1 / fd, Xb = (bf * Sd + cf * Td + df * Ud) * -fd, 0 <= Xb && 1 >= Xb && (Sd = df * pe - cf * qe, Td = bf * qe - df * oe, Ud = cf * oe - bf * pe, Xb = (Ze * Sd + $e * Td + af * Ud) * fd, 0 <= Xb && 1 >= Xb && (pf = (re * Sd + se * Td + te * Ud) * fd));\n Ye = pf;\n if (1 < Ye) {\n mf = tb._hit = !0;\n me = Ye;\n break\n }\n }\n lc && (me = Math.max(me, 200) - 100, lc.hit_depth = me);\n for (Sc = 0; Sc < kf; Sc++)if (tb = Te[Sc]) {\n var ue = tb._hit;\n ue != tb.hovering && (tb.hovering = ue, da.callaction(ue ? tb.onover : tb.onout, tb), lc && da.callaction(ue ? lc.onover : lc.onout, tb))\n }\n 0 == O.down && ae.update(!1, lf && mf)\n }\n }\n }\n }\n\n function B(a) {\n var b = a.loader, c = null;\n if (a.jsplugin)b = null; else if (c = b.src, 1 > b.naturalWidth || 1 > b.naturalHeight)b = null;\n if (!b)return null;\n var d = ua, e = null;\n if (e = Ec[c])e.cnt++, e = e.tex; else {\n e = d.createTexture();\n d.bindTexture(ma, e);\n d.texParameteri(ma, d.TEXTURE_WRAP_T, d.CLAMP_TO_EDGE);\n d.texParameteri(ma, d.TEXTURE_WRAP_S, d.CLAMP_TO_EDGE);\n d.texParameteri(ma, d.TEXTURE_MAG_FILTER, qb);\n d.texParameteri(ma, d.TEXTURE_MIN_FILTER, qb);\n try {\n d.texImage2D(ma, 0, mb, mb, Nc, b), Ec[c] = {cnt: 1, tex: e}\n } catch (g) {\n la(3, g)\n }\n }\n a._GL_onDestroy || (a._GL_onDestroy = function () {\n var b = a.loader;\n if (b && !a.jsplugin) {\n var c = ua, b = b.src, d = Ec[b];\n d && 0 == --d.cnt && (c.deleteTexture(d.tex), d.tex = null, Ec[b] = null, delete Ec[b]);\n a._GL_onDestroy = null\n }\n });\n return e\n }\n\n var t = Oa, G = 0, Ba = !1, P = 0, Fa = 0, wa = !1, ta = !1, W = 0, U = 0, Da = !1, M = 0, Va = 0, R = 0, I = 0, X = 0, aa = 0, ba = 0, T = 16.666, ab = {}, $a = [], kb = 0, ca = 52428800, ia = !1, fa = null, Sa = !1, ka = null, ua = null, Ia = null, ga = 0, xb = null, sa = !1, xa = 1, Ha = !1, oa = null, va = null;\n d = a = null;\n var ha = [], La = null, Aa = null, Ea = !1, za = null, Ka = null, Na = [], Pa, Ra, Ya, Za, bb, pb, jb, Bb, vb, Db = [1, 0, 0, 0, 1, 0, 0, 0, 0], Nb = [1, 0, 0, 0, .5, 0, 0, 0, 0], bc = [1, 0, 0, 0, .5, .5, 0, 0, 0], jc = [.5, 0, 0, 0, 1, 0, 0, 0, 0], kc = [.5, 0, .5, 0, 1, 0, 0, 0, 0], ma, Wa, Ab, Mc, lb, Qb, mb, cc, Nc, Gb, Oc, Kb, wc, qb, Yb = [1, 3, 0, 2, 4, 5, 6], Fb = \"rotateY(90deg) ;;rotateY(-90deg) ;rotateY(180deg) ;rotateX(-90deg) ;rotateX(90deg) ;\".split(\";\"), pc = \"\", hc = \"\", Ib = null;\n t.requiereredraw = !1;\n t.isloading = !1;\n t.setup = function (a) {\n var c, d = null;\n if (2 == a) {\n var e = {};\n if (0 <= F(Jb.so.html5).indexOf(_[196]) || b.mac && b.firefox)e.preserveDrawingBuffer = !0;\n b.mobile && (e.antialias = !1);\n e.depth = !1;\n e.stencil = !1;\n var f = Jb.so.webglsettings;\n f && (!0 === f.preserveDrawingBuffer && (e.preserveDrawingBuffer = !0), !0 === f.depth && (e.depth = !0), !0 === f.stencil && (e.stencil = !0));\n f = F(Jb.so.wmode);\n _[36] == f || _[142] == f ? (sa = !0, e.alpha = !0, e.premultipliedAlpha = !1) : e.alpha = !1;\n try {\n for (ka = Ja(2), ka.style.position = _[0], ka.style.left = 0, c = ka.style.top = 0; 4 > c && !(d = ka.getContext([_[30], _[83], _[116], _[112]][c], e)); c++);\n } catch (h) {\n }\n ka && d && (ua = d, Ia = {}, ma = d.TEXTURE_2D, Wa = d.COLOR_BUFFER_BIT | d.DEPTH_BUFFER_BIT | d.STENCIL_BUFFER_BIT, Ab = d.FRAMEBUFFER, Mc = d.TEXTURE0, lb = d.ARRAY_BUFFER, Qb = d.ELEMENT_ARRAY_BUFFER, mb = d.RGBA, cc = d.RGB, Nc = d.UNSIGNED_BYTE, Gb = d.UNSIGNED_SHORT, Oc = d.FLOAT, Kb = d.TRIANGLES, wc = d.STATIC_DRAW, qb = d.LINEAR, k() && (c = m.bgcolor, d.clearColor((c >> 16 & 255) / 255, (c >> 8 & 255) / 255, (c & 255) / 255, 1 - (c >> 24) / 255, sa ? 1 : 0), d.disable(d.DEPTH_TEST), d.depthFunc(d.NEVER), d.enable(d.BLEND), d.blendFunc(d.SRC_ALPHA, d.ONE_MINUS_SRC_ALPHA), d.enable(d.CULL_FACE), d.cullFace(d.FRONT), ga = d.getParameter(d.MAX_TEXTURE_SIZE), !b.desktop && 4096 < ga && (ga = 4096), 2048 >= ga && b.firefox && !b.mac && !b.android && (b.css3d = !1), b.ios && (ga = 2048), V.panolayer.appendChild(ka), t.infoString = _[423], m.webGL = {\n canvas: ka,\n context: d,\n ppshaders: Na,\n createppshader: function (a, b) {\n return g(null, a, b)\n },\n useProgram: n\n }, Sa = !0));\n 0 == Sa && (Ia = ua = ka = null, a = 1)\n }\n 1 == a && (t.infoString = \"\", b.webgl = !1);\n G = b._tileOverlap | 0;\n if (6 < b.iosversion || b.mac && \"7\" <= b.safariversion)Ba = !0;\n b.multiressupport = b.androidstock && 0 == b.webgl ? !1 : !0;\n (a = b.webgl) && b.android && (b.androidstock ? a = !1 : b.chrome && 38 > b.chromeversion && (a = !1));\n 9 <= b.iosversion && document.addEventListener(_[52], E, !1);\n b.panovideosupport = a;\n b.buildList()\n };\n t.reset = function () {\n M = 0\n };\n var ob = null, Cb = null;\n t.unload = function () {\n var b;\n m.webGL && (m.webGL.canvas = null, m.webGL.context = null, m.webGL = null);\n var c = ua;\n if (c && Ia) {\n c.bindTexture(ma, null);\n c.bindBuffer(lb, null);\n c.bindBuffer(Qb, null);\n c.bindFramebuffer(Ab, null);\n c.deleteProgram(Ia.sh);\n c.deleteShader(Ia.vs);\n c.deleteShader(Ia.ps);\n Ia.obj0 && (e(Ia.obj0), e(Ia.obj));\n Ia.objS && e(Ia.objS);\n Ia = null;\n for (b = 0; 6 > b; b++)ha[b] && ha[b].prg && (c.deleteProgram(ha[b].prg), ha[b].prg = null, ha[b] = null);\n c.deleteBuffer(a);\n c.deleteBuffer(d);\n var g = [oa, va, za, Ka];\n for (b = 0; b < g.length; b++)g[b] && (g[b].fb && c.deleteFramebuffer(g[b].fb), g[b].tex && c.deleteTexture(g[b].tex), g[b] = null)\n }\n Sa = !1;\n ua = ka = null\n };\n t.size = function (a, c) {\n if (Sa) {\n var d = (b.android && 0 == b.androidstock || b.blackberry || b.silk || b.mac) && 0 == b.hidpi ? b.pixelratio : 1;\n if (b.desktop || b.ios || b.ie)d = L.devicePixelRatio;\n isNaN(d) && (d = 1);\n if (!b.desktop && 1 != d)a:{\n var e = d, d = [320, 360, 400, 480, 640, 720, 768, 800, 1024, 1080, 1280, 1366, 1440, 1920, 2560], g, f, h = a * e;\n f = d.length;\n for (g = 0; g < f; g++)if (2 > Math.abs(d[g] - h)) {\n d = d[g] / a;\n break a\n }\n d = e\n }\n d *= 1;\n e = a * d + .25 | 0;\n d = c * d + .25 | 0;\n if (g = m.webVR)if (g = g.getsize(e, d))e = g.w, d = g.h;\n e *= ja.framebufferscale;\n d *= ja.framebufferscale;\n ka.style.width = a + \"px\";\n ka.style.height = c + \"px\";\n if (ka.width != e || ka.height != d) {\n ka.width = e;\n ka.height = d;\n g = ua.drawingBufferWidth | 0;\n f = ua.drawingBufferHeight | 0;\n b.desktop && b.chrome && 300 == g && 150 == f && (g = f = 0);\n if (0 >= g || 0 >= f)g = e, f = d;\n ua.viewport(0, 0, g, f);\n b.gl = {width: g, height: f}\n }\n } else b.gl = {width: 0, height: 0}\n };\n t.fps = function () {\n var a = Ta();\n if (0 < ba) {\n var b = a - ba;\n if (5 < b && 500 > b) {\n var c = Math.min(b / 160, .75);\n T = T * (1 - c) + b * c;\n 0 < T && (nd = 1E3 / T, ja.currentfps = nd)\n }\n 0 == I && (ja.r_ft = .9 * ja.r_ft + .1 * b)\n }\n ba = a\n };\n var Fc = !1;\n t.startFrame = function () {\n Da = !1;\n R = Va = 0;\n Fc = !0;\n ca = m.memory.maxmem << 20;\n if (Sa) {\n var a = ua;\n (Ea = 0 < Na.length) ? (a.clear(Wa), za = r(za), a.bindFramebuffer(Ab, za.fb), a.clear(Wa), R = 0) : a.clear(Wa)\n }\n };\n t.finishFrame = function () {\n M++;\n I = 0;\n if (Sa) {\n var a = ua;\n if (Ea) {\n var c, d = Na.length, e = za, g = null;\n 1 < d && (g = Ka = r(Ka));\n a.disable(a.BLEND);\n for (c = 0; c < d; c++)e.drawcalls = R, R = 0, a.bindFramebuffer(Ab, g ? g.fb : null), a.clear(Wa), y(e, Na[c], 1), e = g, g = c + 1 == d - 1 ? null : c & 1 ? Ka : za;\n a.enable(a.BLEND)\n }\n b.androidstock && a.finish()\n }\n m.memory.usage = kb >> 20;\n Fc = !1\n };\n t.createPano = function (a) {\n return new z(a)\n };\n var Eb = 0, gc = 0, nb = 0, ic = Ma(), Kc = Ma(), Ob = Ma(), tc = Ma(), Lb = Ma(), Tc = Ma(), Kd = Ma(), Gc = Ma(), oc = Ma(), rd = Ma(), Zb = Ma();\n t.setblendmode = function (a) {\n if (Sa) {\n var c = ua;\n La = null;\n var d = !0, e = null, g = null, f = 1, h = da.parseFunction(a);\n if (h)switch (h[0].toUpperCase()) {\n case \"BLEND\":\n (e = h[2]) || (e = _[324]);\n La = ha[0];\n break;\n case _[359]:\n g = Number(h[2]);\n f = Number(h[3]);\n (e = h[4]) || (e = _[319]);\n isNaN(g) && (g = 16777215);\n isNaN(f) && (f = 2);\n La = ha[1];\n n(La.prg);\n break;\n case _[363]:\n g = Number(h[2]);\n (e = h[3]) || (e = _[317]);\n isNaN(g) && (g = 0);\n La = ha[2];\n n(La.prg);\n break;\n case _[365]:\n var d = !1, k = Number(h[2]);\n a = Number(h[3]);\n e = h[4];\n isNaN(k) && (k = 0);\n isNaN(a) && (a = .2);\n a = 0 > a ? 0 : 1 < a ? 1 : a;\n e || (e = _[43]);\n var t = h = 0, l = Math.cos(k * Y), m = Math.sin(k * Y);\n 0 > m && (t = 1, k += 90);\n 0 > l && (h = 1, k += 0 > m ? 90 : -90);\n k = Math.sqrt(2) * Math.cos((45 - k) * Y);\n l *= k;\n m *= k;\n k = 1 / (l * l + m * m);\n La = ha[4];\n n(La.prg);\n c.uniform3f(La.fp, l * k, m * k, (-h * l - t * m) * k);\n c.uniform1f(La.bl, .5 * a);\n break;\n case _[404]:\n d = !1;\n a = Number(h[2]);\n (e = h[3]) || (e = _[272]);\n isNaN(a) && (a = 2);\n La = ha[3];\n n(La.prg);\n c.uniform2f(La.ct, .5, .5);\n c.uniform1f(La.zf, a);\n break;\n case _[399]:\n d = !1, a = Number(h[2]), k = Number(h[3]), t = Number(h[4]), (e = h[5]) || (e = _[43]), isNaN(a) && (a = .2), isNaN(k) && (k = .2), isNaN(t) && (t = 0), a = -1 > a ? -1 : 1 < a ? 1 : a, k = 0 > k ? 0 : 1 < k ? 1 : k, t = 0 > t ? 0 : 1 < t ? 1 : t, h = b.gl.width / b.gl.height, l = 1, isNaN(h) && (h = 1), h *= h, 0 > a ? h *= 1 + a : l *= 1 - a, La = ha[5], n(La.prg), c.uniform2f(La.ap, h, l), c.uniform1f(La.bl, .5 * k), c.uniform1f(La.zf, t)\n }\n if (null == La || 0 == d && ja.stereo)La = ha[0], g = null;\n null !== g && c.uniform3f(La.cc, f * (g >> 16 & 255) / 255, f * (g >> 8 & 255) / 255, f * (g & 255) / 255);\n null == e && (e = _[43]);\n Aa = ac.getTweenfu(e);\n Ha = 0 == b.realDesktop && 1 < b.pixelratio || 33 < ja.r_ft\n }\n };\n t.snapshot = function (a, b) {\n if (Sa) {\n var c = ua;\n if (a) {\n var d = oa;\n oa = va;\n va = d\n }\n Ha && (xa = .707);\n va = r(va);\n c.bindFramebuffer(Ab, va.fb);\n R = 0;\n c.clear(Wa);\n d = 0;\n b && (d = Fc, Fc = !0, t.renderpano(b, 1), Fc = d, d = 1 - b.alpha);\n a && y(oa, La, b ? 1 - b.alpha : a.alpha) && R++;\n va.drawcalls = R;\n c.bindFramebuffer(Ab, Ea ? za.fb : null);\n xa = 1;\n null == a && (a = {});\n a.alpha = d;\n return a\n }\n return null\n };\n t.rendersnapshot = function (a, b) {\n if (0 == Fc)return a;\n if (null == ua || null == va || b && 1 <= b.alpha)return null;\n var c = a.alpha = b ? 1 - b.alpha : a.alpha;\n y(va, La, c);\n return a\n };\n t.renderpano = function (a, c) {\n if (0 != Fc) {\n a.frame = M;\n var d = !1, e = ua;\n if (2 == c && e) {\n if (a.stopped && oa && oa.done && oa.pano == a.id) {\n oa.have = !0;\n return\n }\n Ha && (xa = .707);\n if (oa = r(oa))d = !0, oa.have = !0, oa.pano = a.id, oa.done = !1, oa.alpha = a.alpha, oa.drawcalls = 0, e.bindFramebuffer(Ab, oa.fb), e.clear(Wa)\n }\n var g = a.panoview = a.stopped && a.panoview ? a.panoview : p.getState(a.panoview), f = g.h, h = g.v, k = g.r, t = g.z, l = a.hasmoved = f != Eb || h != gc || t != nb;\n t != nb && (ia = !1);\n var q = Ta();\n if (l) {\n if (\"auto\" == F(ja.loadwhilemoving)) {\n var G = q - cb;\n 200 < q - Fa && 0 == O.down && 200 < G && (wa = !0)\n }\n P = q\n } else 10 > q - P && (a.hasmoved = l = !0);\n Da = l;\n Eb = f;\n gc = h;\n nb = t;\n l = ic;\n t = Kc;\n Yd(l, f, h, k);\n kd(tc, l);\n hc = \"\";\n Ib = null;\n if (a.image && a.image.prealign && (f = (\"\" + a.image.prealign).split(\"|\"), 3 == f.length)) {\n var h = Number(f[0]), u = -Number(f[1]), k = -Number(f[2]);\n if (!isNaN(h) && !isNaN(u) && !isNaN(k)) {\n hc = _[125] + u.toFixed(4) + _[271] + k.toFixed(4) + _[269] + h.toFixed(4) + \"deg) \";\n Ib = Ob;\n Zd(t, l);\n l = tc;\n t = Lb;\n kd(l, ic);\n var f = Ib, w, G = -k * Y, k = Math.cos(G), q = Math.sin(G), G = -u * Y, u = Math.cos(G);\n w = Math.sin(G);\n G = -h * Y;\n h = Math.cos(G);\n G = Math.sin(G);\n Hc(f, h * u + G * q * w, G * k, -h * w + G * q * u, -G * u + h * q * w, h * k, G * w + h * q * u, k * w, -q, k * u);\n ef(l, Ib)\n }\n }\n Zd(t, l);\n l = (b.android && 0 == b.androidstock || b.blackberry || b.ios) && 0 == b.hidpi ? b.pixelratio : 1;\n b.ios && b.retina && (l = 1.5);\n 1.4 < l && (l = 1.4);\n h = 1 / (g.z / (.5 * ya));\n f = g.zf;\n 200 < f && (h = Math.atan(h), f = Math.min(h + Math.asin(f / 1E3 * Math.sin(h)), 1), isNaN(f) && (f = 1), h = Math.tan(f));\n .5 > h && (l = 1);\n b.desktop && (l = b.pixelratio);\n l = .25 * Ga * (Qa * l / Math.sin(Math.atan(Qa / ya * h)) + ya * l / h);\n 0 == a.type ? l *= 2 / Ga : 1 == a.type && (f = a.levels, l *= 2 / Ga, l *= Math.tan(.5 * f[f.length - 1].vfov * Y));\n h = l;\n l = 0;\n k = a.levels;\n f = k.length;\n q = 1 + (N ? parseFloat(N.multiresthreshold) : 0);\n isNaN(q) && (q = 1);\n .1 > q && (q = .1);\n h = Math.ceil(h * q);\n if (0 < f) {\n for (; !(0 == k[l].preview && k[l].h >= h);)if (l++, l >= f) {\n l = f - 1;\n break\n }\n ia && 0 < l && --l;\n h = m.lockmultireslevel;\n _[470] == F(h) && (m.lockmultireslevel = h = \"\" + l);\n h |= 0;\n 0 <= h && h < f && (l = h);\n a.currentlevel != l && (a.currentlevel = l)\n }\n 1 == c && (l = a.currentlevel, m.multireslevel = 0 < l && a.levels[0].preview ? l - 1 : l);\n a:{\n k = t;\n t = g.zf;\n h = 1 / (g.z / (.5 * uc));\n if (0 < t && (l = Math.atan(h), h = Math.tan(l + Math.asin(t / 1E3 * Math.sin(l))), isNaN(h) || 0 >= h)) {\n t = [0, 0, 1, 1];\n g.vr = [t, t, t, t, t, t];\n break a\n }\n q = h * ya / Qa;\n G = g.yf / ya * 2 * q;\n t = [h, q + G, -1];\n l = [-h, q + G, -1];\n f = [-h, -q + G, -1];\n h = [h, -q + G, -1];\n Fd(k, t);\n Fd(k, l);\n Fd(k, f);\n Fd(k, h);\n for (var q = 1, v = null, G = Array(40), u = [null, null, null, null, null, null], k = 0; 6 > k; k++) {\n var x = [], B = [];\n x.push(S(t, ub[k]));\n x.push(S(l, ub[k]));\n x.push(S(f, ub[k]));\n x.push(S(h, ub[k]));\n var z = 0, E = 0, D = 0, C = 0;\n for (w = E = 0; 4 > w; w++)v = x[w], E = v.x, D = v.y, C = v.z / 2, E = 1 * (E > -C) + 8 * (E < C) + 64 * (D < C) + 512 * (D > -C) + 4096 * (-.1 > -C), G[w] = E, z += E;\n w = 0 != (z & 18724);\n if (0 == z)for (w = 0; 4 > w; w++)v = x[w], B.push(v.x / v.z), B.push(v.y / v.z); else if (w)continue; else {\n for (var z = 4, v = G, A = 0, Ba = [], W = [], H, J = 0, J = 0; 5 > J; J++) {\n var ta = 1 << 3 * J;\n for (w = 0; w < z; w++) {\n var D = (w + z - 1) % z, E = x[D], K = x[w], D = v[D], Q = v[w], L = 0;\n 0 == (Q & ta) ? (L |= 2, D & ta && (L |= 1)) : 0 == (D & ta) && (L |= 1);\n L & 1 && (4 == J ? q = (.1 - E.z / 2) / (K.z - E.z) / 2 : 3 == J ? q = (-E.y - E.z / 2) / (K.y - E.y + (K.z - E.z) / 2) : 2 == J ? q = (E.z / 2 - E.y) / (K.y - E.y - (K.z - E.z) / 2) : 1 == J ? q = (E.z / 2 - E.x) / (K.x - E.x - (K.z - E.z) / 2) : 0 == J && (q = (-E.z / 2 - E.x) / (K.x - E.x + (K.z - E.z) / 2)), H = new Hb, H.x = E.x + (K.x - E.x) * q, H.y = E.y + (K.y - E.y) * q, H.z = E.z + (K.z - E.z) * q, E = H.x, D = H.y, C = H.z / 2, E = 1 * (E > -C) + 8 * (E < C) + 64 * (D < C) + 512 * (D > -C) + 4096 * (-.1 > -C), Ba.push(H), W.push(E), A++);\n L & 2 && (Ba.push(K), W.push(Q), A++)\n }\n z = A;\n x = Ba;\n v = W;\n A = 0;\n Ba = [];\n W = []\n }\n for (w = 0; w < z; w++)v = x[w], B.push(v.x / v.z), B.push(v.y / v.z)\n }\n x = z = 9;\n A = v = -9;\n Ba = B.length;\n if (4 < Ba) {\n for (w = 0; w < Ba; w++)B[w] += .5;\n for (w = 0; w < Ba; w += 2)B[w + 0] < z && (z = B[w + 0]), B[w + 1] < x && (x = B[w + 1]), B[w + 0] > v && (v = B[w + 0]), B[w + 1] > A && (A = B[w + 1]);\n z > v || 0 > z && 0 > v || 1 < z && 1 < v || x > A || 0 > x && 0 > A || 1 < x && 1 < A || (0 > z && (z = 0), 0 > x && (x = 0), 1 < v && (v = 1), 1 < A && (A = 1), u[k] = [z, x, v, A])\n }\n }\n g.vr = u\n }\n Ia && (n(Ia.sh), e.blendFunc(e.SRC_ALPHA, e.ONE_MINUS_SRC_ALPHA), sa && e.colorMask(!0, !0, !0, !0));\n ja.stereo ? (Z(a, 1), Z(a, 2)) : Z(a, 0);\n g = 0;\n m.downloadlockedlevel && 0 < (m.lockmultireslevel | 0) && (g = m.lockmultireslevel | 0);\n t = a.levels;\n 0 < t.length && (g = t[g], sc.progress = g.stereo && ja.stereo ? (g.loadedtiles[0] + g.loadedtiles[1]) / (2 * g.totaltiles) : g.loadedtiles[0] / g.totaltiles);\n d && (e.bindFramebuffer(Ab, Ea ? za.fb : null), e.clear(Wa), oa.drawcalls = R, oa.done = !0, xa = 1);\n 1 == c && e && oa && 0 < oa.drawcalls && oa.done && oa.have && (oa.have = !1, y(oa, La, 1 - qc));\n sa && e.colorMask(!0, !0, !0, !1)\n }\n };\n t.handleloading = function () {\n return Da ? 2 : 0\n };\n var Jc = [[0, 180], [0, 90], [0, 0], [0, 270], [-90, 90], [90, 90]], ub = [[-1, 0, 0, 0, 1, 0, 0, 0, 1], [0, 0, 1, 0, 1, 0, 1, 0, 0], [1, 0, 0, 0, 1, 0, 0, 0, -1], [0, 0, -1, 0, 1, 0, -1, 0, 0], [0, 0, 1, -1, 0, 0, 0, 1, 0], [0, 0, 1, 1, 0, 0, 0, -1, 0]], Ec = {}, wd = Ma(), rc = Ma()\n })();\n var sf = function () {\n function a(a, b, f) {\n a = F(a).charCodeAt(0);\n return 118 == a ? f : 104 == a ? b : 100 == a ? Math.sqrt(b * b + f * f) : Math.max(b, f * d.mfovratio)\n }\n\n var d = this;\n d.haschanged = !1;\n d.r_rmatrix = Ma();\n (function () {\n var a = \"hlookat vlookat camroll fov maxpixelzoom fisheye fisheyefovlink architectural tx ty tz\".split(\" \"), b = [_[268], _[193]], f;\n for (f in a)va(d, a[f], 0);\n for (f in b)va(d, b[f], !1);\n va(d, _[474], \"VFOV\");\n d.continuousupdates = !1;\n ha(d, _[477], function () {\n return \"\" + d._pannini\n }, function (a) {\n var b = Number(a), b = isNaN(b) ? pa(a) ? 1 : 0 : 0 > b ? 0 : 1 < b ? 1 : b;\n d._pannini = b;\n d.haschanged = !0\n });\n ha(d, _[364], function () {\n return d._fisheye\n }, function (a) {\n d.fisheye = a\n });\n ha(d, _[215], function () {\n return d._fisheyefovlink\n }, function (a) {\n d.fisheyefovlink = a\n });\n ha(d, _[305], function () {\n var a = d.hlookatmax, b = d.hlookatmin, g = M && M.fovlimits;\n isNaN(b) && (b = g ? g[0] : -180);\n isNaN(a) && (a = g ? g[1] : 180);\n return a - b\n }, function (a) {\n });\n ha(d, _[304], function () {\n var a = d.vlookatmax, b = d.vlookatmin, g = M && M.fovlimits;\n isNaN(b) && (b = g ? g[2] : -90);\n isNaN(a) && (a = g ? g[3] : 90);\n return a - b\n }, function (a) {\n })\n })();\n d.defaults = function () {\n d._hlookat = 0;\n d._vlookat = 0;\n d._architectural = 0;\n d._architecturalonlymiddle = !0;\n d._fov = 90;\n d._fovtype = b.desktop ? \"VFOV\" : \"MFOV\";\n d._camroll = 0;\n d.mfovratio = 4 / 3;\n d._maxpixelzoom = Number.NaN;\n d._stereographic = !0;\n d._pannini = 0;\n d._fisheye = 0;\n d._fisheyefovlink = .5;\n d.fovmin = 1;\n d.fovmax = 179;\n d.r_zoom = 1;\n d.r_yoff = 0;\n d.r_zoff = 0;\n d.haschanged = !1;\n d.limitview = \"auto\";\n d.hlookatmin = Number.NaN;\n d.hlookatmax = Number.NaN;\n d.vlookatmin = Number.NaN;\n d.vlookatmax = Number.NaN;\n d._limits = null\n };\n d.inverseProject = function (a, b) {\n var f, e, m, p, v, r, y, l;\n m = -1E3;\n v = m / d.r_zoom;\n f = (a - Qa / 2) * v;\n e = (b - ya / 2 - d.r_yoff) * v;\n v = 1 / Math.sqrt(f * f + e * e + m * m);\n f *= v;\n e *= v;\n m *= v;\n p = d.r_zoff;\n 0 < p && (0 == d._stereographic && (l = Math.atan(1E3 / p) / Y - 1, (1 > -m ? Math.acos(-m) / Y : 0) > l && (r = -e, y = f, v = r * r + y * y, 0 < v && (v = 1 / Math.sqrt(v), r *= v, y *= v), l *= Y, v = Math.sin(l), f = v * y, e = -v * r, m = -Math.cos(l))), r = p * m, y = r * r - (p * p - 1E6), 0 < y && (v = -r + Math.sqrt(y), f *= v, e *= v, m = m * v - -p, v = 1 / Math.sqrt(f * f + e * e + m * m), f *= v, e *= v, m *= v));\n p = new Hb;\n p.x = f;\n p.y = e;\n p.z = m;\n return p\n };\n var m = d.fovRemap = function (b, d, f, e, m) {\n e || (e = Qa);\n m || (m = ya);\n b = Math.tan(b / 360 * Ga);\n d = a(d, e, m);\n f = a(f, e, m);\n return b = 360 * Math.atan(b * f / d) / Ga\n }, f = Ma();\n d.screentosphere = function (a, b) {\n var k = new Hb;\n if (ja.stereo) {\n var e = Qa / 2, m = e / 2 * (1 - Number(ja.stereooverlap));\n a = a < e ? a + m : a - m\n }\n e = d.inverseProject(a * X, b * X);\n Zd(f, d.r_rmatrix);\n nb(f, e);\n e = [Math.atan2(e.x, e.z) / Y + 270, Math.atan2(-e.y, Math.sqrt(e.x * e.x + e.z * e.z)) / Y];\n 180 < e[0] && (e[0] -= 360);\n k.x = e[0];\n k.y = e[1];\n k.z = 0;\n return k\n };\n d.spheretoscreen = function (a, b) {\n var f = new Hb, e = (180 - a) * Y, m = b * Y;\n f.x = 1E3 * Math.cos(m) * Math.cos(e);\n f.z = 1E3 * Math.cos(m) * Math.sin(e);\n f.y = 1E3 * Math.sin(m);\n nb(d.r_rmatrix, f);\n var e = f.z + d.r_zoff, p = m = tc;\n 10 <= e && (e = d.r_zoom / e, m = (f.x * e + .5 * Qa) / X, p = (f.y * e + .5 * ya) / X + d.r_yoff);\n f.x = m;\n f.y = p;\n return f\n };\n d.updateView = function () {\n var a = d._maxpixelzoom;\n if (!isNaN(a) && 0 != a) {\n var f = 1E-6;\n if (M && M.ready) {\n var k = M.vres, e = M.vfov;\n 0 == M.type && (k = k * Math.PI * .5);\n if (50 < k && 0 < e) {\n var f = Qa, w = ya, a = 360 / Math.PI * Math.atan(Math.tan(2 * Math.atan(1 / (2 / Math.PI * k * a / (e / 180) / (.5 * f)))) / (f / w));\n if (isNaN(a) || 1E-4 > a)a = d.fovmax;\n 90 < a && (a = 90);\n f = m(a, \"VFOV\", d._fovtype)\n }\n }\n d.fovmin = f\n }\n var e = d._fov, f = d._hlookat, w = d._vlookat, a = d._camroll, x = b.webgl ? d._fisheye : 0, v = d._fisheyefovlink, r = d._stereographic, k = 0, y = 0 == ia.bouncinglimits || 0 == Pa.isBouncing();\n y && (e < d.fovmin && (e = d.fovmin), e > d.fovmax && (e = d.fovmax));\n 179 < e && (e = 179);\n if (0 < x) {\n var l = m(e, d._fovtype, \"VFOV\");\n r ? (170 < e && (e = 170), k = 1E3 * x * Math.sin(Math.pow(Math.min(l / 130, 1), 2 * v) * Ga * .5)) : (x += Math.pow(Math.min(x, 1), 10) / 10, k = x * Math.sin(Math.pow(l / 180, v) * Ga * .5), k *= 3E3 * k)\n }\n var u = F(d.limitview), h = M && M.fovlimits, c = 0, K = 0, D = 0, v = Number(d.hlookatmin), l = Number(d.hlookatmax), z = Number(d.vlookatmin), q = Number(d.vlookatmax);\n \"auto\" == u && (v = l = z = q = Number.NaN);\n isNaN(v) && (v = h ? h[0] : -180);\n isNaN(l) && (l = h ? h[1] : 180);\n isNaN(z) && (z = h ? h[2] : -90);\n isNaN(q) && (q = h ? h[3] : 90);\n \"auto\" == u && (p.hlookatmin = v, p.hlookatmax = l, p.vlookatmin = z, p.vlookatmax = q, u = \"range\");\n q < z && (h = z, z = q, q = h);\n l < v && (h = v, v = l, l = h);\n var J = !1, C = !1, L = _[123] != u, A = !0, A = 180, h = l - v, H = q - z;\n switch (u) {\n case \"off\":\n case _[31]:\n h = 360;\n v = -180;\n l = 180;\n z = -1E5;\n q = 1E5;\n L = !1;\n break;\n case _[379]:\n L = !0;\n case _[123]:\n C = !0;\n case \"range\":\n if ((J = 360 > h) || 180 > H)D = m(e, d._fovtype, \"HFOV\"), D > h && (A = !0, C && m(h, \"HFOV\", \"VFOV\") < H && (A = J = !1), D = h, L && A && (e = m(D, \"HFOV\", d._fovtype))), c = m(e, d._fovtype, \"VFOV\"), c > H && (A = !0, C && m(H, \"VFOV\", \"HFOV\") < h && (A = J = !1), c = H, L && A && (e = m(c, \"VFOV\", d._fovtype))), m(e, d._fovtype, \"HFOV\"), A = c, K = c *= .5, D *= .5, -89.9 >= z && (c = 0), 89.9 <= q && (K = 0)\n }\n u = [360, -180, 180, c + K, z + c, q - K];\n y && (w - c < z ? (w = z + c, Pa.stopFrictions(2)) : w + K > q && (w = q - K, Pa.stopFrictions(2)));\n J && (D = -w * Y, K = .5 * Qa, c = .5 * ya, z = c / Math.tan(A * Y * .5), 0 < D && (c = -c), K = 1 / Math.sqrt(1 + (K * K + c * c) / (z * z)), c = c / z * K, z = Math.acos(-K * Math.sin(D) + c * Math.cos(D)) - Ga / 2, isNaN(z) && (z = -Ga / 2), K = Math.acos((K * Math.cos(D) + c * Math.sin(D)) / Math.sin(z + Ga / 2)), isNaN(K) && (K = 0), D = 180 * K / Ga, 2 * D >= h && (L && (D = m(h, \"HFOV\", d._fovtype), D < e && (e = D)), D = h / 2));\n 360 > h && (L = !1, u[0] = h, u[1] = v + D, u[2] = l - D, y && (f - D < v ? (f = v + D, L = !0) : f + D > l && (f = l - D, L = !0)), L && (Pa.stopFrictions(1), 0 != za.currentmovingspeed && (za.currentmovingspeed = 0, za.speed *= -1)));\n d._limits = u;\n d._fov = e;\n d._hlookat = f;\n d._vlookat = w;\n e = m(e, d._fovtype, \"MFOV\");\n 0 < x && 0 == r ? (l = m(e, \"MFOV\", \"VFOV\"), x = Math.asin(1E3 * Math.sin(l * Y * .5) / (1E3 + .72 * k)), x = .5 * ya / Math.tan(x)) : x = .5 * uc / Math.tan(e / 114.591559);\n d.hfov = m(e, \"MFOV\", \"HFOV\");\n d.vfov = m(e, \"MFOV\", \"VFOV\");\n d.r_fov = e;\n d.r_zoom = x;\n d.r_zoff = k;\n d.r_vlookat = w;\n r = Number(d._architectural);\n y = 0;\n 0 < r && (1 == d._architecturalonlymiddle && (y = Math.abs(w / 90), 1 < y && (y = 1), y = Math.tan(y * Ga * .25), r *= 1 - y), y = r * (-w * (ya / Math.tan(m(e, \"MFOV\", \"VFOV\") / 114.591559)) / 90), w *= 1 - r);\n d.r_yoff = y;\n Yd(d.r_rmatrix, f, w, a);\n d.r_hlookat = f;\n d.r_vlookatA = w;\n d.r_roll = a;\n e = 0 == b.realDesktop && b.ios && 5 > b.iosversion || b.androidstock || be ? \"\" : \"px\";\n ic = 0 == b.simulator && (b.iphone || b.ipad) ? .25 : 1;\n b.ie && (ic = p.r_zoom / 1E3 * 10);\n if (b.androidstock || b.android && b.chrome || b.blackberry)ic = p.r_zoom / 1E3 / 4;\n $d = _[303] + x + e + _[106] + -a + _[86] + (x - k / 2 * ic) + \"px) \";\n d.haschanged = !1\n };\n d.getState = function (a) {\n null == a && (a = {h: 0, v: 0, z: 0, r: 0, zf: 0, yf: 0, ch: 0, vr: null});\n a.h = d._hlookat;\n a.v = d.r_vlookatA;\n a.z = d.r_zoom;\n a.r = d._camroll;\n a.zf = d.r_zoff;\n a.yf = d.r_yoff;\n a.ch = d._pannini;\n return a\n };\n d.defaults()\n }, uf = function () {\n var a = this;\n a.defaults = function () {\n a.usercontrol = \"all\";\n a.mousetype = _[27];\n a.touchtype = _[485];\n a.mouseaccelerate = 1;\n a.mousespeed = 10;\n a.mousefriction = .8;\n a.mouseyfriction = 1;\n a.mousefovchange = 1;\n a.keybaccelerate = .5;\n a.keybspeed = 10;\n a.keybfriction = .9;\n a.keybfovchange = .75;\n a.keybinvert = !1;\n a.fovspeed = 3;\n a.fovfriction = .9;\n a.camrollreset = !0;\n a.keycodesleft = \"37\";\n a.keycodesright = \"39\";\n a.keycodesup = \"38\";\n a.keycodesdown = \"40\";\n a.keycodesin = \"\";\n a.keycodesout = \"\";\n a.touchfriction = .87;\n a.touchzoom = !0;\n a.zoomtocursor = !1;\n a.zoomoutcursor = !0;\n a.disablewheel = !1;\n a.bouncinglimits = !1;\n a.preventTouchEvents = !0\n };\n a.defaults()\n }, vf = function () {\n var a = this;\n a.standard = _[5];\n a.dragging = \"move\";\n a.moving = \"move\";\n a.hit = _[18];\n a.update = function (b, m) {\n void 0 === b && (b = O.down);\n var f = F(ia.mousetype);\n V.controllayer.style.cursor = b ? _[27] == f ? a.moving : a.dragging : m ? a.hit : a.standard\n }\n }, rf = function () {\n var a = this;\n a.haschanged = !1;\n a.mode = _[50];\n a.pixelx = 0;\n a.pixely = 0;\n a.pixelwidth = 0;\n a.pixelheight = 0;\n va(a, _[50], _[66]);\n va(a, \"x\", \"0\");\n va(a, \"y\", \"0\");\n va(a, _[49], \"100%\");\n va(a, _[28], \"100%\");\n va(a, \"left\", \"0\");\n va(a, \"top\", \"0\");\n va(a, _[3], \"0\");\n va(a, _[2], \"0\");\n a.calc = function (b, m) {\n var f = 1 / X, g = _[71] == F(a.mode), n = g ? a._left : a._x, k = g ? a._top : a._y, e = g ? a._right : a._width, p = g ? a._bottom : a._height, n = 0 < n.indexOf(\"%\") ? parseFloat(n) / 100 * b * f : Number(n), e = 0 < e.indexOf(\"%\") ? parseFloat(e) / 100 * b * f : Number(e), k = 0 < k.indexOf(\"%\") ? parseFloat(k) / 100 * m * f : Number(k), p = 0 < p.indexOf(\"%\") ? parseFloat(p) / 100 * m * f : Number(p), n = n / f, k = k / f, e = e / f, p = p / f;\n g ? (e = b - n - e, p = m - k - p) : (g = F(a._align), 0 <= g.indexOf(\"left\") || (n = 0 <= g.indexOf(_[3]) ? b - e - n : (b - e) / 2 + n), 0 <= g.indexOf(\"top\") || (k = 0 <= g.indexOf(_[2]) ? m - p - k : (m - p) / 2 + k));\n a.pixelx = Math.round(n * f);\n a.pixely = Math.round(k * f);\n g = !1;\n n = Math.round(e);\n e = Math.round(p);\n if (Qa != n || ya != e)g = !0, Qa = n, ya = e;\n a.pixelwidth = n * f;\n a.pixelheight = e * f;\n a.haschanged = !1;\n return g\n }\n }, Wc = !1, Ob = function () {\n function a() {\n var a = c._alpha;\n _[1] == c._type && (a *= qc);\n var b = 255 * a | 0;\n b == c._aa || c.GL || (c.sprite && (c.sprite.style.opacity = a, c._aa = b), c._poly && (c._poly.style.opacity = a, c._aa = b));\n c._autoalpha && (a = 0 < a, a != c._visible && (c.visible = a))\n }\n\n function d() {\n if (c.sprite && null != c._zorder) {\n var a = parseInt(c._zorder);\n !isNaN(a) && 0 <= a ? (c.sprite.style.zIndex = J + a, c._zdeep = a, c._deepscale = 100 / (200 + a)) : (c._zdeep = 0, c._deepscale = .5)\n }\n _[1] == c._type && (Wc = !0)\n }\n\n function p() {\n c.sprite && (c.sprite.style.overflow = c._maskchildren ? _[6] : _[12], z && b.safari && u())\n }\n\n function f(a, b) {\n b && (b = a._enabled) && _[15] == a.type && (b = 0 != a.bgcapture);\n a._enabledstate = 1 * b + 2 * a._handcursor;\n var c = a.sprite.style;\n c.cursor = b && a._handcursor ? _[18] : _[5];\n c.pointerEvents = b ? \"auto\" : \"none\";\n 0 == b && a.hovering && (a.hovering = !1);\n if (c = a._childs) {\n var d, e, g;\n e = c.length;\n for (d = 0; d < e; d++)(g = c[d]) && g.sprite && f(g, b)\n }\n }\n\n function g() {\n if (c.sprite) {\n var a = c._enabled;\n z && (a &= c.bgcapture);\n if (a && c._parent)a:{\n for (a = n(c._parent); a;) {\n if (0 == a._enabled || 0 == a.children) {\n a = !1;\n break a\n }\n if (a._parent)a = n(a._parent); else break\n }\n a = !0\n }\n 1 * a + 2 * c._handcursor != c._enabledstate && f(c, a)\n }\n }\n\n function n(a) {\n var b = null;\n if (a) {\n var b = a = F(a), c = xa, d = a.indexOf(\"[\");\n 0 < d && (b = a.slice(0, d), _[1] == b && (c = Ua), a = a.slice(d + 1, a.indexOf(\"]\")));\n if (\"stage\" == b)return null == Ra.sprite && (Ra.sprite = V.viewerlayer, Ra.loaded = !0), Ra;\n if (_[468] == b)return null == Za.sprite && (a = Ja(), b = a.style, b.position = _[0], b.width = \"100%\", b.height = \"100%\", b.overflow = _[6], b.zIndex = \"0\", b.pointerEvents = \"none\", V.controllayer.parentNode.insertBefore(a, V.controllayer), Za.sprite = a, Za.loaded = !0), Za;\n b = c.getItem(a)\n }\n return b\n }\n\n function k(a) {\n if (c._parent != a) {\n if (c._parent) {\n var b = n(c._parent);\n if (b) {\n var d = b._childs;\n if (d) {\n var e, f;\n f = d.length;\n for (e = 0; e < f; e++)if (d[e] === c) {\n d.splice(e, 1);\n f--;\n break\n }\n 0 == f && (d = null);\n b._childs = d;\n b.poschanged = !0\n }\n }\n }\n a && ((b = n(a)) ? b.sprite ? (null == b._childs && (b._childs = []), b._use_css_scale = !1, c._use_css_scale = !1, b._childs.push(c), b.sprite.appendChild(c.sprite), b.poschanged = !0) : setTimeout(function () {\n c._parent = null;\n k(a)\n }, 16) : a = null);\n null == a && V.pluginlayer.appendChild(c.sprite);\n c._parent = a;\n c.poschanged = !0;\n g()\n }\n }\n\n function e(a) {\n (a = this.kobject) && 0 == D && (a = a.url, 0 < F(a).indexOf(\".swf\") ? la(2, c._type + \"[\" + c.name + _[78] + Vd(a)) : (a && _[74] == a.slice(0, 5) && 50 < a.length && (a = a.slice(0, 50) + \"...\"), la(3, c._type + \"[\" + c.name + _[85] + a)))\n }\n\n function w(a) {\n if (S && (Pa.trackTouch(a), ba(L, a.type, w, !0), _[4] == a.type ? (aa.body.style.webkitUserSelect = aa.body.style.backupUserSelect, ba(L, _[10], x, !0), ba(L, _[4], w, !0)) : (ba(L, b.browser.events.touchmove, x, !0), ba(L, b.browser.events.touchend, w, !0)), S.pressed)) {\n S.pressed = !1;\n if (S._ondowncrop || S._onovercrop)S.hovering && S._onovercrop ? h(S, S._onovercrop) : h(S, S._crop);\n da.callaction(S.onup, S);\n K || da.blocked || da.callaction(S.onclick, S)\n }\n }\n\n function x(a, c) {\n var d = a.changedTouches && 0 < a.changedTouches.length ? a.changedTouches[0] : a, e = d.pageX, d = d.pageY;\n !0 === c ? I = [e, d] : I ? 0 == K && (e -= I[0], d -= I[1], Math.sqrt(e * e + d * d) >= (b.touchdevice ? 11 : 4) && (K = !0)) : (I = null, ba(L, a.type, x, !0))\n }\n\n function v(a, d) {\n var e = a.timeStamp | 0, f = !0;\n switch (a.type) {\n case _[34]:\n case _[8]:\n case _[16]:\n 1 == d && (e = _[15] == S.type, y(S) && (!e || e && S.bgcapture) && S._handcursor && (c.sprite.style.cursor = _[18]));\n e = S.sprite;\n for (f = 0; e;) {\n var g = e.kobject;\n if (g) {\n var k = g._enabled;\n 0 == b.pointerEvents && (k = y(g));\n if (0 == k || 0 < f && 0 == g.children)return;\n f++;\n e = e.parentNode\n } else break\n }\n for (f = S.sprite; f;) {\n if (g = f.kobject)g.enabled && 0 == g.hovering && (g.hovering = !0, 0 == g.pressed && g._onovercrop && h(g, g._onovercrop), da.blocked || da.callaction(g.onover, g)); else break;\n f = f.parentNode\n }\n break;\n case _[35]:\n case _[9]:\n case _[17]:\n for (e = (f = a.relatedTarget) ? f.kobject : null; f && null == e;)if (f = f.parentNode)e = f.kobject; else break;\n for (f = S.sprite; f;) {\n if (g = f.kobject) {\n for (var k = !1, l = e; l;) {\n if (g == l) {\n k = !0;\n break\n }\n if (l.sprite && l.sprite.parentNode)l = l.sprite.parentNode.kobject; else break\n }\n if (0 == k)1 == g.hovering && (g.hovering = !1, 0 == g.pressed && g._onovercrop && h(g, g._crop), da.callaction(g.onout, g)); else break\n } else break;\n f = f.parentNode\n }\n break;\n case _[7]:\n if (500 < e && 500 > e - kc) {\n kc = 0;\n break\n }\n if (f = 0 == (a.button | 0))aa.body.style.backupUserSelect = aa.body.style.webkitUserSelect, aa.body.style.webkitUserSelect = \"none\", x(a, !0), R(L, _[4], w, !0), R(L, _[10], x, !0), K = !1, S.pressed = !0, S._ondowncrop && h(S, S._ondowncrop), da.blocked || da.callaction(S.ondown, S);\n break;\n case b.browser.events.touchstart:\n kc = e;\n Pa.trackTouch(a);\n if (Pa.isMultiTouch())break;\n K = !1;\n if (f = 0 == (a.button | 0))x(a, !0), R(L, b.browser.events.touchend, w, !0), R(L, b.browser.events.touchmove, x, !0), S.pressed = !0, S._ondowncrop && h(S, S._ondowncrop), da.blocked || da.callaction(S.ondown, S)\n }\n }\n\n function r(a, b) {\n if (a === b)return !1;\n for (; b && b !== a;)b = b.parentNode;\n return b === a\n }\n\n function y(a) {\n if (a._enabled) {\n for (a = a.sprite; a;)if ((a = a.parentNode) && a.kobject && 0 == a.kobject._enabled)return !1;\n return !0\n }\n return !1\n }\n\n function l(a) {\n cb = Ta();\n var d = a.type;\n if (_[7] != d && d != b.browser.events.touchstart || !da.isblocked()) {\n var e = a.target.kobject;\n _[34] == d ? d = _[8] : _[35] == d && (d = _[9]);\n null == e && (e = c);\n if ((_[8] != d && _[9] != d || 4 == a.pointerType || _[19] == a.pointerType) && e) {\n var e = a.timeStamp, f = c._eP;\n e != c._eT && (f = 0);\n if (_[16] == d || _[8] == d) {\n var h = a.relatedTarget;\n if (this === h || r(this, h))return\n } else if (_[17] == d || _[9] == d)if (h = a.relatedTarget, this === h || r(this, h))return;\n 0 == e && (_[16] == d && 0 == c.hovering ? f = 0 : _[17] == d && 1 == c.hovering && (f = 0));\n d = c._enabled;\n 0 == b.pointerEvents && (d = y(c));\n if (d && (!z || z && c.bgcapture))0 == c.children && a.stopPropagation(), 0 == f && (0 == c.children && 1 == a.eventPhase || 2 <= a.eventPhase) && (f = 1, c.jsplugin && c.jsplugin.hittest && (d = V.getMousePos(a.changedTouches ? a.changedTouches[0] : a, c.sprite), c.jsplugin.hittest(d.x * c.imagewidth / c.pixelwidth, d.y * c.imageheight / c.pixelheight) || (f = 2)), 1 == f && (S = c, v(a), c.capture && (null != c.jsplugin && r(V.controllayer, c.sprite) || 0 == (a.target && \"A\" == a.target.nodeName) && Aa(a), a.stopPropagation()))); else if (0 == b.pointerEvents && aa.msElementsFromPoint && 0 == f && 2 == a.eventPhase && (h = a.type, d = _[4] == h || _[17] == h || _[35] == h || _[9] == h || h == b.browser.events.touchend, _[7] == h || _[16] == h || _[34] == h || _[8] == h || h == b.browser.events.touchstart || d) && (h = aa.msElementsFromPoint(a.clientX, a.clientY))) {\n var k = [], l, n, m = null, m = null;\n for (l = 0; l < h.length; l++)if (m = h[l], m = m.kobject)k.push(m); else break;\n d && g();\n if (d && Z)for (l = 0; l < Z.length; l++) {\n var m = Z[l], p = !1;\n for (n = 0; n < k.length; n++)k[n] === m && (p = !0);\n 0 == p && (f = 1, S = m, v(a, !0), m.capture && (null == c.jsplugin && Aa(a), a.stopPropagation()))\n }\n for (l = 0; l < h.length; l++)if (m = h[l], m = m.kobject) {\n if (n = _[15] == m.type, 1 == (y(m) && (!n || n && m.bgcapture)) || d)if (f = 1, S = m, v(a, !0), m.capture) {\n null == c.jsplugin && Aa(a);\n a.stopPropagation();\n break\n }\n } else break;\n Z = k\n }\n c._eT = e;\n c._eP = f\n }\n }\n }\n\n function u() {\n var a = c.sprite;\n if (a) {\n var a = a.style, d = Number(c._bgcolor), e = Number(c._bgalpha), f = X;\n isNaN(d) && (d = 0);\n isNaN(e) && (e = 0);\n var g = (\"\" + c._bgborder).split(\" \"), h = Ib(g[0], f, \",\"), k = g[1] | 0, g = Number(g[2]);\n isNaN(g) && (g = 1);\n if (h[0] != q[0] || h[3] != q[3])q = h, c.poschanged = !0;\n 0 == e ? a.background = \"none\" : a.backgroundColor = ca(d, e);\n var d = Ib(c.bgroundedge, f * c._scale, \" \"), e = \"\", l = c.bgshadow;\n if (l) {\n var n = (\"\" + l).split(\",\"), m, p;\n p = n.length;\n for (m = 0; m < p; m++) {\n var r = Ha(n[m]).split(\" \"), u = r.length;\n if (4 < u) {\n var v = 5 < u ? 1 : 0;\n \"\" != e && (e += \", \");\n e += r[0] * f + \"px \" + r[1] * f + \"px \" + r[2] * f + \"px \" + (v ? r[3] * f : 0) + \"px \" + ca(r[3 + v] | 0, r[4 + v]) + (6 < u ? \" \" + r[6] : \"\")\n }\n }\n }\n if (b.safari || b.ios)a.webkitMaskImage = c._maskchildren && !l && 0 < d[0] + d[1] + d[2] + d[3] ? _[167] : \"\";\n a[pc] = e;\n a.borderStyle = \"solid\";\n a.borderColor = ca(k, g);\n a.borderWidth = h.join(\"px \") + \"px\";\n a.borderRadius = d.join(\"px \") + \"px\"\n }\n }\n\n function h(a, b) {\n var c = 0, d = 0, e = a.loader;\n e && (c = e.naturalWidth, d = e.naturalHeight);\n b && (b = String(b).split(\"|\"), 4 == b.length && (c = b[2], d = b[3]));\n null == a.jsplugin && 0 == a._isNE() && (a.imagewidth = c, a.imageheight = d, e = a._gOSF(), e & 1 && (a._width = String(c)), e & 2 && (a._height = String(d)));\n a.updatepos()\n }\n\n var c = this;\n c.prototype = Fb;\n this.prototype.call(this);\n c._type = _[29];\n c.layer = c.plugin = new bb(Ob);\n c.createvar = function (a, b, d) {\n var e = \"_\" + a;\n c[e] = void 0 === b ? null : b;\n c.__defineGetter__(a, function () {\n return c[e]\n });\n void 0 !== d ? c.__defineSetter__(a, function (a) {\n c[e] = a;\n d()\n }) : c.__defineSetter__(a, function (a) {\n c[e] = a;\n c.poschanged = !0\n })\n };\n var K = !1, D = !1, z = !1, q = [0, 0, 0, 0], J = 0, C = 3, Q = !1;\n c._isNE = function () {\n return D\n };\n c._gOSF = function () {\n return C\n };\n c.haveUserWidth = function () {\n return 0 == (C & 1)\n };\n c.haveUserHeight = function () {\n return 0 == (C & 2)\n };\n c.sprite = null;\n c.loader = null;\n c.jsplugin = null;\n c._use_css_scale = !1;\n c._finalxscale = 1;\n c._finalyscale = 1;\n c._hszscale = 1;\n c._eT = 0;\n c._eP = 0;\n c._pCD = !1;\n c.MX = Ma();\n c.__defineGetter__(\"type\", function () {\n return _[57] == c.url ? _[15] : _[75]\n });\n c.__defineSetter__(\"type\", function (a) {\n _[15] == F(a) && (c.url = _[57])\n });\n c.imagewidth = 0;\n c.imageheight = 0;\n c.pixelwidth = 0;\n c.pixelheight = 0;\n c._pxw = 0;\n c._pxh = 0;\n c.pressed = !1;\n c.hovering = !1;\n c.loading = !1;\n c.loaded = !1;\n c.loadedurl = null;\n c.loadingurl = null;\n c.preload = !1;\n c._ispreload = !1;\n c.keep = !1;\n c.poschanged = !1;\n c.style = null;\n c.capture = !0;\n c.children = !0;\n c.pixelx = 0;\n c.pixely = 0;\n c._deepscale = .5;\n c._zdeep = 0;\n c.accuracy = 0;\n c._dyn = !1;\n c.onloaded = null;\n c.altonloaded = null;\n c.maxwidth = 0;\n c.minwidth = 0;\n c.maxheight = 0;\n c.minheight = 0;\n c.onover = null;\n c.onhover = null;\n c.onout = null;\n c.onclick = null;\n c.ondown = null;\n c.onup = null;\n c.onloaded = null;\n var A = c.createvar, H = function (a, b) {\n var d = \"_\" + a;\n c[d] = null;\n c.__defineGetter__(a, function () {\n return c[d]\n });\n c.__defineSetter__(a, b)\n };\n A(_[472], !0, g);\n A(_[353], !0, g);\n A(_[302], !1, p);\n A(_[415], null, function () {\n var a = c._jsborder;\n 0 >= parseInt(a) && (c._jsborder = a = null);\n c.sprite && (c.sprite.style.border = a);\n null != a && (c._use_css_scale = !1)\n });\n A(_[512], null, function () {\n if (null != c.sprite) {\n var a = c._alturl;\n c._alturl = null;\n c.url = a\n }\n });\n A(\"url\", null, function () {\n if (\"\" == c._url || \"null\" == c._url)c._url = null;\n null != c._url ? c.reloadurl() : (c.jsplugin && c.jsplugin.unloadplugin && c.jsplugin.unloadplugin(), c.jsplugin = null, c.loadedurl = null, c.loadingurl = null, c.loading = !1, c.loaded = !1)\n });\n A(\"scale\", 1, function () {\n c.poschanged = !0;\n z && u()\n });\n A(_[277], !1, function () {\n Q = !0\n });\n A(_[516], 0);\n A(\"alpha\", 1, a);\n A(_[403], !1, a);\n A(_[503], null, d);\n H(_[12], function (a) {\n a = pa(a);\n if (c._visible != a && (c._visible = a, c._poly && (c._poly.style.visibility = a ? _[12] : _[6]), c.sprite)) {\n var b = !0;\n c.jsplugin && c.jsplugin.onvisibilitychanged && (b = !0 !== c.jsplugin.onvisibilitychanged(a));\n b && (0 == a ? c.sprite.style.display = \"none\" : c.poschanged = !0)\n }\n });\n c._visible = !0;\n A(\"crop\", null, function () {\n h(c, c._crop)\n });\n c._childs = null;\n c._parent = null;\n c.__defineGetter__(_[149], function () {\n return c._parent\n });\n c.__defineSetter__(_[149], function (a) {\n if (null == a || \"\" == a || \"null\" == F(a))a = null;\n c.sprite ? k(a) : c._parent = a\n });\n for (var N = [_[50], \"edge\", _[341], _[339]], ea = 0; ea < N.length; ea++)A(N[ea]);\n H(_[49], function (a) {\n 0 == 0 * parseFloat(a) ? C &= 2 : a && \"prop\" == a.toLowerCase() ? (a = \"prop\", C &= 2) : (a = null, C |= 1);\n c._width = a;\n c.poschanged = !0\n });\n H(_[28], function (a) {\n 0 == 0 * parseFloat(a) ? C &= 1 : a && \"prop\" == a.toLowerCase() ? (a = \"prop\", C &= 1) : (a = null, C |= 2);\n c._height = a;\n c.poschanged = !0\n });\n H(\"x\", function (a) {\n 0 != 0 * parseFloat(a) && (a = null);\n c._x = a;\n c.poschanged = !0\n });\n H(\"y\", function (a) {\n 0 != 0 * parseFloat(a) && (a = null);\n c._y = a;\n c.poschanged = !0\n });\n H(\"ox\", function (a) {\n 0 != 0 * parseFloat(a) && (a = null);\n c._ox = a;\n c.poschanged = !0\n });\n H(\"oy\", function (a) {\n 0 != 0 * parseFloat(a) && (a = null);\n c._oy = a;\n c.poschanged = !0\n });\n c.loadstyle = function (a) {\n da.assignstyle(c.getfullpath(), a)\n };\n c.getmouse = function (a) {\n var b = 0, d = 0, d = V.controllayer, e = c.sprite, f = d.getBoundingClientRect(), g = e.getBoundingClientRect(), b = O.x - g.left - e.clientLeft + f.left + d.clientLeft, d = O.y - g.top - e.clientTop + f.top + d.clientTop;\n a && (b = b * c.imagewidth / c.pixelwidth, d = d * c.imageheight / c.pixelheight);\n return {x: b, y: d}\n };\n c._assignEvents = function (a) {\n Pa.touch && (R(a, b.browser.events.touchstart, l, !0), R(a, b.browser.events.touchstart, l, !1));\n Pa.mouse && (R(a, _[7], l, !0), R(a, _[7], l, !1));\n b.desktop && (Pa.mouse || b.ie) && (0 == Pa.mouse && b.ie ? (R(a, b.browser.events.pointerover, l, !0), R(a, b.browser.events.pointerover, l, !1), R(a, b.browser.events.pointerout, l, !0), R(a, b.browser.events.pointerout, l, !1)) : (R(a, _[16], l, !0), R(a, _[16], l, !1), R(a, _[17], l, !0), R(a, _[17], l, !1)))\n };\n c.create = function () {\n c._pCD = !0;\n c.alturl && (c.url = c.alturl, c._alturl = null);\n c.altscale && (c.scale = c.altscale, delete c.altscale);\n var b = c.sprite = Ja(), f = c.loader = Ja(1);\n b.kobject = c;\n f.kobject = c;\n b.style.display = \"none\";\n b.style.position = _[0];\n J = _[29] == c._type ? 3001 : 2001;\n b.style.zIndex = J;\n p();\n g();\n a();\n d();\n c._jsborder && (c.jsborder = c._jsborder);\n c._assignEvents(b);\n R(f, _[48], e, !0);\n R(f, \"load\", c.loadurl_done, !1);\n if (b = c._parent)c._parent = null, k(b);\n null != c._url && c.reloadurl()\n };\n c.destroy = function () {\n c.jsplugin && c.jsplugin.unloadplugin && c.jsplugin.unloadplugin();\n c._GL_onDestroy && c._GL_onDestroy();\n c.jsplugin = null;\n c.loaded = !1;\n c._destroyed = !0;\n c.parent = null;\n var a = c._childs;\n if (a) {\n var b, d, a = a.slice();\n d = a.length;\n for (b = 0; b < d; b++)a[b].parent = null;\n c._childs = null\n }\n };\n c.getfullpath = function () {\n return c._type + \"[\" + c.name + \"]\"\n };\n c.changeorigin = function () {\n var a = arguments, b = null, d = null;\n if (0 < a.length) {\n var e = null, f = 0, g = 0, h = 0, k = 0, l = X, m = Qa / l, p = ya / l, q = c._parent;\n q && (q = n(q)) && (0 == c._use_css_scale ? (m = q._pxw * l, p = q._pxh * l) : (m = q.imagewidth * l, p = q.imageheight * l));\n l = c.imagewidth;\n q = c.imageheight;\n b = 0;\n e = String(c._width);\n \"\" != e && null != e && (0 < e.indexOf(\"%\") ? l = parseFloat(e) / 100 * m : \"prop\" == e.toLowerCase() ? b = 1 : l = e);\n e = String(c._height);\n \"\" != e && null != e && (0 < e.indexOf(\"%\") ? q = parseFloat(e) / 100 * p : \"prop\" == e.toLowerCase() ? b = 2 : q = e);\n 1 == b ? l = q * c.imagewidth / c.imageheight : 2 == b && (q = l * c.imageheight / c.imagewidth);\n b = d = F(a[0]);\n 1 < a.length && (d = F(a[1]));\n var a = String(c._align), r = c._edge ? F(c._edge) : \"null\";\n if (\"null\" == r || _[498] == r)r = a;\n (e = String(c._x)) && (f = 0 < e.indexOf(\"%\") ? parseFloat(e) / 100 * m : parseFloat(e));\n isNaN(f) && (f = 0);\n (e = String(c._y)) && (g = 0 < e.indexOf(\"%\") ? parseFloat(e) / 100 * p : parseFloat(e));\n isNaN(g) && (g = 0);\n if (e = a)h = 0 <= e.indexOf(\"left\") ? 0 + f : 0 <= e.indexOf(_[3]) ? m - f : m / 2 + f, k = 0 <= e.indexOf(\"top\") ? 0 + g : 0 <= e.indexOf(_[2]) ? p - g : p / 2 + g;\n 1 != c._scale && (l *= c._scale, q *= c._scale);\n h = 0 <= r.indexOf(\"left\") ? h + 0 : 0 <= r.indexOf(_[3]) ? h + -l : h + -l / 2;\n k = 0 <= r.indexOf(\"top\") ? k + 0 : 0 <= r.indexOf(_[2]) ? k + -q : k + -q / 2;\n e = a = 0;\n a = 0 <= b.indexOf(\"left\") ? 0 + f : 0 <= b.indexOf(_[3]) ? m - f : m / 2 + f;\n e = 0 <= b.indexOf(\"top\") ? 0 + g : 0 <= b.indexOf(_[2]) ? p - g : p / 2 + g;\n a = 0 <= d.indexOf(\"left\") ? a + 0 : 0 <= d.indexOf(_[3]) ? a + -l : a + -l / 2;\n e = 0 <= d.indexOf(\"top\") ? e + 0 : 0 <= d.indexOf(_[2]) ? e + -q : e + -q / 2;\n c._align = b;\n c._edge = d;\n 0 <= b.indexOf(_[3]) ? c._x = String(f + a - h) : c._x = String(f - a + h);\n 0 <= b.indexOf(_[2]) ? c._y = String(g + e - k) : c._y = String(g - e + k)\n }\n };\n c.resetsize = function () {\n c.loaded && (c._width = String(c.imagewidth), c._height = String(c.imageheight), C = 3, c.poschanged = !0)\n };\n c.registercontentsize = function (a, b) {\n null != a && (c.imagewidth = Number(a), C & 1 && (c._width = String(a)));\n null != b && (c.imageheight = Number(b), C & 2 && (c._height = String(b)));\n c.poschanged = !0\n };\n var I = null, S = null, Z = null;\n\n\n\n\n /**\n * Created by sohow on 16-6-15.\n */\n\n var krpanoplugin2 = function () {\n function Er(e) {\n return \".yes.on.true.1\"[s]((\".\" + e)[c]()) >= 0\n }\n\n function Sr(e) {\n }\n\n function xr() {\n ar = 0;\n if (Tn[at] || _n)if (Tn[_]) {\n var e = (\"\" + navigator.userAgent)[c]()[s](\"ucbrowser\") > 0;\n Tn.chrome || Tn[Ht] ? ar = 2 : e && (ar = 2)\n } else ar = 2;\n if (ar > 0) {\n Vn == 0 && (ar = 1);\n if (Tn[E] && _n)setTimeout(Nr, 10); else {\n window[u](ar == 1 ? f : h, Cr, t);\n var i = Nn[l] != \"\" && Nn[l] != n;\n setTimeout(Nr, Tn[E] ? 10 : i ? 1500 : 3e3)\n }\n } else sr == t && (sr = r, xn[J](Nn[l], Nn))\n }\n\n function Tr() {\n sr == t && (sr = r, er = r, tr = r, nr = r, rr = t, Rr(), xn[J](Nn[O], Nn))\n }\n\n function Nr() {\n window[o](f, Cr, t), window[o](h, Cr, t), Tn[E] && _n ? Tr() : sr == t && (sr = r, xn[J](Nn[l], Nn))\n }\n\n function Cr(e) {\n window[o](e.type, Cr, t), e.type == f || e.type == h && e[K] && e.rotationRate ? (sr = r, er = r, tr = r, Tn[E] && (nr = r), Rr(), xn[J](Nn[O], Nn)) : Tn[E] && _n ? Tr() : sr == t && (sr = r, xn[J](Nn[l], Nn))\n }\n\n function jr(e) {\n var i;\n for (i = 0; i < e[kt]; i++)if (e[i] instanceof HMDVRDevice) {\n kr = e[i], kr[F] ? (Dr = kr[F](mt), Pr = kr[F](Tt), Ar = Dr[pn], Or = Pr[pn], Mr = Dr[Et], _r = Pr[Et]) : kr[$] && kr[C] && (Ar = kr[$](mt), Or = kr[$](Tt), Mr = kr[C](mt), _r = kr[C](Tt));\n var s = 2 * Math.max(Mr.leftDegrees, Mr.rightDegrees), o = 2 * Math.max(Mr.upDegrees, Mr.downDegrees);\n Br = Math.max(s, o);\n break\n }\n for (i = 0; i < e[kt]; i++)if (e[i] instanceof PositionSensorVRDevice)if (kr == n || kr[vn] == e[i][vn]) {\n Lr = e[i];\n break\n }\n kr || Lr ? (er = r, Xn == t && Tn[_] && (rr = r), xn[J](Nn[O], Nn)) : sr == t && (sr = r, xn[J](Nn[l], Nn))\n }\n\n function Ir(e) {\n Zn = e;\n if (e) {\n Fr = {\n imagehfov: xn.image.hfov,\n continuousupdates: xn[p][g],\n usercontrol: xn[y][it],\n mousetype: xn[y][St],\n contextmenu_touch: xn[Rt].touch,\n loadwhilemoving: xn[m][A],\n stereo: xn[m][Ct],\n stereooverlap: xn[m][j],\n hlookat: xn[p][V],\n vlookat: xn[p][jt],\n camroll: xn[p][an],\n fovmin: xn[p][ft],\n fovmax: xn[p][ht],\n fisheye: xn[p][X],\n fov: xn[p].fov,\n maxpixelzoom: xn[p][d],\n fovtype: xn[p][G],\n stereographic: xn[p][x],\n fisheyefovlink: xn[p][b],\n pannini: xn[p][nt],\n architectural: xn[p][v],\n limitview: xn[p][T],\n area_mode: xn[Lt].mode,\n area_align: xn[Lt].align,\n area_x: xn[Lt].x,\n area_y: xn[Lt].y,\n area_width: xn[Lt][Y],\n area_height: xn[Lt][N],\n maxmem: xn.memory[en]\n }, xn[Lt].mode = \"align\", xn[Lt].align = \"lefttop\", xn[Lt].x = \"0\", xn[Lt].y = \"0\", xn[Lt][Y] = \"100%\", xn[Lt][N] = \"100%\", xn[Rt].touch = t, xn[p][g] = r, nr && Tn[E] && !mr ? xn[y][St] = \"drag2d\" : xn[y][it] = \"off\", xn[m][Ct] = r, xn[m][A] = r, xn[p][T] = \"off\", xn[p][nt] = 0, xn[p][v] = 0, xn[p][G] = \"VFOV\", xn[p][ft] = 0, xn[p][ht] = 179, xn[p][X] = 0, xn[p].fov = Br, xn[p][d] = 0, xn[p][x] = r, xn[p][b] = 0, cr = xn[p][V], ci = 0, Tn[E] || (cr -= Ci()), ui();\n if (tr || rr)zr(0, 0), nr && Tn[E] && !mr || (xn[yt] = r);\n ri(), Dn && oi(r), xn.set(\"events[__webvr].keep\", r), xn.set(\"events[__webvr].onnewpano\", ii), xn.set(\"events[__webvr].onresize\", si), (tr || rr) && Ko(r), xn[J](Nn.onentervr, Nn)\n } else if (Fr) {\n xn.set(\"events[__webvr].name\", n), xn[p][g] = Fr[g], xn[y][it] = Fr[it], xn[y][St] = Fr[St], xn[Rt].touch = Fr.contextmenu_touch, xn[m][A] = Fr[A], xn[m][Ct] = Fr[Ct], xn[m][j] = Fr[j], xn[p][an] = 0;\n if (Fr.imagehfov == xn.image.hfov)xn[p][ft] = Fr[ft], xn[p][ht] = Fr[ht], xn[p].fov = Fr.fov, xn[p][d] = Fr[d], xn[p][G] = Fr[G], xn[p][T] = Fr[T], xn[p][X] = Fr[X], xn[p][x] = Fr[x], xn[p][b] = Fr[b], xn[p][nt] = Fr[nt], xn[p][v] = Fr[v]; else {\n var i = xn.xml[p];\n xn[p][ft] = i && !isNaN(Number(i[ft])) ? Number(i[ft]) : 1, xn[p][ht] = i && !isNaN(Number(i[ht])) ? Number(i[ht]) : 140, xn[p].fov = i && !isNaN(Number(i.fov)) ? Number(i.fov) : 90, xn[p][X] = i && !isNaN(Number(i[X])) ? Number(i[X]) : 0, xn[p][nt] = i && !isNaN(Number(i[nt])) ? Number(i[nt]) : 0, xn[p][v] = i && !isNaN(Number(i[v])) ? Number(i[v]) : 0, xn[p][d] = i && !isNaN(Number(i[d])) ? Number(i[d]) : 2, xn[p][G] = i && i[G] ? i[G] : \"MFOV\", xn[p][T] = i && i[T] ? i[T] : pt, xn[p][x] = r, xn[p][b] = .5\n }\n xn[Lt].mode = Fr.area_mode, xn[Lt].align = Fr.area_align, xn[Lt].x = Fr.area_x, xn[Lt].y = Fr.area_y, xn[Lt][Y] = Fr.area_width, xn[Lt][N] = Fr.area_height, xn[W] = -1, xn[D] = t, xn.memory[en] = Fr[en], Fr = n, Qn && (ji(Qn, t), Qn = n), Ko(t), oi(t), ui(), xn[J](Nn.onexitvr, Nn)\n }\n }\n\n function Rr() {\n if (qr)return qr;\n var e = \"Unknown\", t = 0, n = 1536, r = Math.min(screen[Y], screen[N]), i = Math.max(screen[Y], screen[N]), o = window.devicePixelRatio || 1;\n if (Tn.iphone)if (i == 568) {\n var u = xn.webGL.context, a = \"\" + u.getParameter(u.VERSION);\n a[s](\"A8 GPU\") > 0 ? (e = ln, t = 4.7) : (e = \"iPhone 5\", t = 4, n = 1024)\n } else i == 667 ? o == 2 ? (e = ln, t = 4.7) : (e = on, t = 5.5) : i == 736 && (e = on, t = 5.5); else {\n var f = navigator.userAgent[c]();\n f[s](\"gt-n710\") >= 0 ? (t = 5.5, e = \"Note 2\") : f[s](\"sm-n900\") >= 0 ? (t = 5.7, e = \"Note 3\") : f[s](\"sm-n910\") >= 0 ? (t = 5.7, e = \"Note 4\") : f[s](\"gt-i930\") >= 0 || f[s](sn) >= 0 ? (t = 4.7, e = \"Galaxy S3\") : f[s](\"gt-i950\") >= 0 || f[s](sn) >= 0 ? (t = 5, e = \"Galaxy S4\") : f[s](\"sm-g900\") >= 0 || f[s](\"sc-04f\") >= 0 || f[s](\"scl23\") >= 0 ? (t = 5.1, e = \"Galaxy S5\") : f[s](\"sm-g920\") >= 0 || f[s](\"sm-g925\") >= 0 ? (t = 5.1, e = \"Galaxy S6\") : f[s](\"lg-d85\") >= 0 || f[s](\"vs985\") >= 0 || f[s](\"lgls990\") >= 0 || f[s](\"lgus990\") >= 0 ? (t = 5.5, e = \"LG G3\") : f[s](\"lg-h810\") >= 0 || f[s](\"lg-h815\") >= 0 || f[s](\"lgls991\") >= 0 ? (t = 5.5, e = \"LG G4\") : f[s](\"xt1068\") >= 0 || f[s](\"xt1069\") >= 0 || f[s](\"xt1063\") >= 0 ? (t = 5.5, e = \"Moto G 2g\") : f[s](\"xt1058\") >= 0 ? (t = 5.2, e = \"Moto X 2g\") : f[s](\"d6653\") >= 0 || f[s](\"d6603\") >= 0 ? (t = 5.2, e = \"Xperia Z3\") : f[s](\"xperia z4\") >= 0 ? (t = 5.5, e = \"Xperia Z4\") : f[s](\"htc_p4550\") >= 0 || f[s](\"htc6525lv\") >= 0 || f[s](\"htc_pn071\") >= 0 ? (t = 5, e = \"One M8\") : f[s](\"nexus 4\") >= 0 ? (t = 4.7, e = \"Nexus 4\") : f[s](\"nexus 5\") >= 0 ? (t = 5, e = \"Nexus 5\") : f[s](\"nexus 6\") >= 0 ? (t = 6, e = \"Nexus 6\") : f[s](\"lumia 930\") >= 0 && (t = 5, e = \"Lumia 930\")\n }\n t == 0 && (xn[J](Nn[Nt], Nn), t = 5);\n var l = Math[Bt](t * t / (1 + r / i * (r / i))) * 25.4, h = l * r / i;\n return qr = {\n screendiagonal_inch: t,\n screenwidth_mm: l,\n screenheight_mm: h,\n screenwidth_px: i * o,\n screenheight_px: r * o,\n devicename: e,\n best_res: n\n }, qr\n }\n\n function Ur() {\n Fn < 1 ? Fn = 1 : Fn > 179.9 && (Fn = 179.9), In < 0 ? In = 0 : In > 5 && (In = 5);\n var e = qn[mn](\"|\"), t;\n for (t = 0; t < 4; t++) {\n var n = Number(e[t]);\n isNaN(n) && (n = t == 0 ? 1 : 0), Rn[t] = n\n }\n Un = Rn[0] != 1 || Rn[1] != 0 || Rn[2] != 0 || Rn[3] != 0, or[a] && (tr || rr) && (zr(0, 0), Ko(r))\n }\n\n function zr(e, n) {\n var i = Rr(), s = 0, o = 0, u = xn.webGL.canvas;\n if (u) {\n var a = Number(xn[m].framebufferscale);\n s = u[Y], o = u[N], !isNaN(a) && a != 0 && (s /= a, o /= a)\n }\n if (e <= 0 || n <= 0)e = s, n = o;\n var f = Fn, l = In;\n f = Math.tan(f * .5 * br), l = Math.exp(l) - 1;\n var c = Math.atan(f) * 2 / 2, h = l * 1e3, p = 1e3, d = p * Math.sin(c), v = p * Math.cos(c), g = 2 * Math.atan(d / (h + v));\n f = Math.tan(g / 2);\n var y = l, b = Hn;\n b /= jn;\n var w = i.screenwidth_mm, E = i.screenheight_mm;\n if (Bn > 0) {\n var S = Math.min(screen[Y], screen[N]), x = Math.max(screen[Y], screen[N]);\n w = Math[Bt](Bn * Bn / (1 + S / x * (S / x))) * 25.4, E = w * S / x\n }\n var T = w / 2 - b, C = 2 * (T / w), k = e, L = n, A = i.screenwidth_px, O = i.screenheight_px, M = r;\n if (nr || Tn.tablet || n > e)M = t;\n k <= 0 && (k = s), L <= 0 && (L = o);\n var _ = E / 70.9, D = f;\n D *= _, hr = _ / .69, M && (D *= L / O, C = 2 * (w * (k / A) / 2 - b) / (w * (k / A)));\n var P = 2 * Math.atan(D) * wr;\n pr = P, dr = y, vr = C, Wr()\n }\n\n function Wr() {\n var e = xn[p];\n pr > 0 && (e[X] = dr, e.fov = pr, e[ft] = pr, e[ht] = pr, e[d] = 0, e[G] = \"VFOV\", e[x] = r, e[b] = 0, e[T] = \"off\", xn[m][j] = vr)\n }\n\n function Xr() {\n return Tn[E] && kr && kr.deviceName ? kr.deviceName : (Rr(), qr ? qr[Gt] : \"\")\n }\n\n function Vr() {\n return qr ? qr.screendiagonal_inch : 0\n }\n\n function $r(e) {\n if ((\"\" + e)[c]() == pt)Bn = 0, Ur(); else {\n var t = parseFloat(e);\n if (isNaN(t) || t <= 0)t = 0;\n Bn = t, Ur()\n }\n }\n\n function Jr() {\n var e = Bn;\n return e <= 0 ? pt : e\n }\n\n function Kr() {\n return Tn[_] ? xn[m].viewerlayer : xn.webGL.canvas\n }\n\n function Qr() {\n xn.trace(0, \"update - stereo=\" + xn[m][Ct]), or[a] && (tr || rr) && (zr(0, 0), Ko(r))\n }\n\n function Gr() {\n if (er && Zn == t)if (tr == t) {\n var e = Kr();\n Sn[u](Tn[w][k][Yt], li), or[a] = r, Ir(r), ur = r, rr = t, Xn == t && Tn[_] && (rr = r), rr && (ur = t), e[Tn[w][k].requestfullscreen]({\n vrDisplay: kr,\n vrDistortion: ur\n }), Tn[at] && ei(xn[p][V]), ur == t && zr()\n } else {\n Sn[u](Tn[w][k][Yt], li), or[a] = r, Ir(r);\n if (Tn[at] || Tn.tablet)ar == 1 ? window[u](f, Mi, r) : ar == 2 && window[u](h, Bs, r);\n nr == t && Tn[w][k].touch && xn[y][$t][u](Tn[w][k][Kt], ni, t)\n }\n }\n\n function Yr() {\n or[a] = t, xn.get(yt) && xn.set(yt, t), window[o](f, Mi, r), window[o](h, Bs, r), Tn[w][k].touch && xn[y][$t][o](Tn[w][k][Kt], ni, t), Ir(t), xn[p].haschanged = r\n }\n\n function Zr() {\n er && (Zn ? Yr() : Gr())\n }\n\n function ei(e) {\n e === undefined ? e = 0 : (e = Number(e), isNaN(e) && (e = 0));\n var t = xn[p][V];\n if (Lr) {\n try {\n Lr.resetSensor !== undefined && Lr.resetSensor()\n } catch (n) {\n }\n try {\n Lr.zeroSensor !== undefined && Lr.zeroSensor()\n } catch (n) {\n }\n t = 0, cr = 0\n }\n nr && (xn[p][V] = e), cr = cr - t + e, ci = 0\n }\n\n function ni(e) {\n var i = t;\n if (Mn == t)i = r; else {\n var s = xn[y].getMousePos(e[fn] ? e[fn][0] : e);\n s.x /= xn.stagescale, s.y /= xn.stagescale;\n if (e.type == Tn[w][k][Kt])ti == n ? (ti = s, xn[y][$t][u](Tn[w][k][un], ni, r), xn[y][$t][u](Tn[w][k][gn], ni, r)) : i = r; else if (e.type == Tn[w][k][gn])i = r; else if (e.type == Tn[w][k][un] && ti) {\n var a = ti.x, f = s.x;\n if (xn[m][Ct]) {\n var l = xn.stagewidth * .5;\n (a >= l || f >= l) && (a < l || f < l) && (f = a)\n }\n var c = xn[cn](a, ti.y, t), h = xn[cn](f, s.y, t), p = h.x - c.x;\n ti = s, cr -= p\n }\n }\n i && (ti = n, xn[y][$t][o](Tn[w][k][un], ni, r), xn[y][$t][o](Tn[w][k][gn], ni, r))\n }\n\n function ri() {\n if (An == t)xn[W] = -1, xn[D] = t; else if (xn.image.type == \"cube\" && xn.image.multires) {\n var e = Rr().best_res, n = 0, s = -1, o = 0, u = xn.image.level.getArray(), a = u[kt];\n if (a > 0)for (i = 0; i < a; i++) {\n var f = u[i].tiledimagewidth, l = Math.abs(f - e);\n if (s == -1 || l < s)n = f, s = l, o = i\n }\n if (s > 0) {\n xn[W] = o, xn[D] = r;\n if (n > 0) {\n var c = 4 + 8 * (n * n * 6 + 1048575 >> 20);\n c > xn.memory[en] && (xn.memory[en] = c)\n }\n }\n }\n }\n\n function ii() {\n or[a] && ri()\n }\n\n function si() {\n ii(), Ur()\n }\n\n function ui() {\n fr = 0, ki.t = 0, Li.t = 0, yo(), So = 0, go = t, Ls = n\n }\n\n function fi(e) {\n ai == 1 ? (yr.apply(document), ai = 0) : (gr.apply(Kr()), ai = 1)\n }\n\n function li(e) {\n var n = Kr(), i = !!(Sn[Jt] || Sn[Mt] || Sn[zt] || Sn[gt] || Sn[qt]);\n if (i && or[a]) {\n try {\n Tn[E] && mr && (gr.apply(n), nr && (ai = 1, xn[y][$t][u](nn, fi, t)))\n } catch (s) {\n }\n Tn[E] && n[u](rn, hi, t)\n } else window[o](f, Mi, r), window[o](h, Bs, r), n[o](rn, hi, t), xn[y][$t][o](nn, fi, t), or[a] = t, Ir(t)\n }\n\n function hi(e) {\n var t = Kr();\n if (Sn.pointerLockElement === t || Sn.mozPointerLockElement === t) {\n var n = e.movementX || e.mozMovementX, r = e.movementY || e.mozMovementY;\n if (!isNaN(n)) {\n ci += n * kn;\n while (ci < 0)ci += Math.PI * 2;\n while (ci >= Math.PI * 2)ci -= Math.PI * 2\n } else n = 0;\n nr && (isNaN(r) && (r = 0), xn[p][V] += n * kn * wr, xn[p][jt] = Math.max(Math.min(xn[p][jt] + r * kn * wr, 120), -120))\n }\n }\n\n function pi(e, t, n, r) {\n this.x = e, this.y = t, this.z = n, this.w = r\n }\n\n function di(e) {\n var t = Math[Bt](e.x * e.x + e.y * e.y + e.z * e.z + e.w * e.w);\n t === 0 ? (e.x = e.y = e.z = 0, e.w = 1) : (t = 1 / t, e.x *= t, e.y *= t, e.z *= t, e.w *= t)\n }\n\n function vi(e) {\n e.x *= -1, e.y *= -1, e.z *= -1, di(e)\n }\n\n function mi(e, t) {\n return e.x * t.x + e.y * t.y + e.z * t.z + e.w * t.w\n }\n\n function gi(e) {\n return Math[Bt](e.x * e.x + e.y * e.y + e.z * e.z + e.w * e.w)\n }\n\n function yi(e, t) {\n var n = e.x, r = e.y, i = e.z, s = e.w, o = t.x, u = t.y, a = t.z, f = t.w;\n e.x = n * f + s * o + r * a - i * u, e.y = r * f + s * u + i * o - n * a, e.z = i * f + s * a + n * u - r * o, e.w = s * f - n * o - r * u - i * a\n }\n\n function bi(e, t) {\n var n = t.x, r = t.y, i = t.z, s = t.w, o = e.x, u = e.y, a = e.z, f = e.w;\n e.x = n * f + s * o + r * a - i * u, e.y = r * f + s * u + i * o - n * a, e.z = i * f + s * a + n * u - r * o, e.w = s * f - n * o - r * u - i * a\n }\n\n function wi(e, t, n) {\n var r = e.x, i = e.y, s = e.z, o = e.w, u = r * t.x + i * t.y + s * t.z + o * t.w;\n u < 0 ? (u = -u, e.x = -t.x, e.y = -t.y, e.z = -t.z, e.w = -t.w) : (e.x = t.x, e.y = t.y, e.z = t.z, e.w = t.w);\n if (u >= 1) {\n e.w = o, e.x = r, e.y = i, e.z = s;\n return\n }\n var a = Math.acos(u), f = Math[Bt](1 - u * u);\n if (Math.abs(f) < .001) {\n e.w = .5 * (o + e.w), e.x = .5 * (r + e.x), e.y = .5 * (i + e.y), e.z = .5 * (s + e.z);\n return\n }\n var l = Math.sin((1 - n) * a) / f, c = Math.sin(n * a) / f;\n e.w = o * l + e.w * c, e.x = r * l + e.x * c, e.y = i * l + e.y * c, e.z = s * l + e.z * c\n }\n\n function Ei(e, t, n) {\n var r = n / 2, i = Math.sin(r);\n e.x = t.x * i, e.y = t.y * i, e.z = t.z * i, e.w = Math.cos(r)\n }\n\n function Si(e, t, n, r, i) {\n var s = Math.cos(t / 2), o = Math.cos(n / 2), u = Math.cos(r / 2), a = Math.sin(t / 2), f = Math.sin(n / 2), l = Math.sin(r / 2);\n return i === \"XYZ\" ? (e.x = a * o * u + s * f * l, e.y = s * f * u - a * o * l, e.z = s * o * l + a * f * u, e.w = s * o * u - a * f * l) : i === Wt ? (e.x = a * o * u + s * f * l, e.y = s * f * u - a * o * l, e.z = s * o * l - a * f * u, e.w = s * o * u + a * f * l) : i === \"ZXY\" ? (e.x = a * o * u - s * f * l, e.y = s * f * u + a * o * l, e.z = s * o * l + a * f * u, e.w = s * o * u - a * f * l) : i === \"ZYX\" ? (e.x = a * o * u - s * f * l, e.y = s * f * u + a * o * l, e.z = s * o * l - a * f * u, e.w = s * o * u + a * f * l) : i === \"YZX\" ? (e.x = a * o * u + s * f * l, e.y = s * f * u + a * o * l, e.z = s * o * l - a * f * u, e.w = s * o * u - a * f * l) : i === \"XZY\" && (e.x = a * o * u - s * f * l, e.y = s * f * u - a * o * l, e.z = s * o * l + a * f * u, e.w = s * o * u + a * f * l), e\n }\n\n function xi(e, t, n) {\n var r, i, s, o, u, a, f, l, c, h, p, d;\n i = t.x, s = t.y, o = t.z, u = Math[Bt](i * i + s * s + o * o), u > 0 && (i /= u, s /= u, o /= u), a = n.x, f = n.y, l = n.z, c = Math[Bt](a * a + f * f + l * l), c > 0 && (a /= c, f /= c, l /= c), r = i * a + s * f + o * l + 1, r < 1e-6 ? (r = 0, Math.abs(i) > Math.abs(o) ? (h = -s, p = i, d = 0) : (h = 0, p = -o, d = s)) : (h = s * l - o * f, p = o * a - i * l, d = i * f - s * a), e.x = h, e.y = p, e.z = d, e.w = r, di(e)\n }\n\n function Ti(e, t, n) {\n function r(e, t, n) {\n return e < t ? t : e > n ? n : e\n }\n\n if (!t || isNaN(t.x) || isNaN(t.y) || isNaN(t.z) || isNaN(t.w))return;\n var i = t.x * t.x, s = t.y * t.y, o = t.z * t.z, u = t.w * t.w;\n if (n === \"XYZ\")e[0] = Math[tt](2 * (t.x * t.w - t.y * t.z), u - i - s + o), e[1] = Math.asin(r(2 * (t.x * t.z + t.y * t.w), -1, 1)), e[2] = Math[tt](2 * (t.z * t.w - t.x * t.y), u + i - s - o); else if (n === Wt)e[0] = Math.asin(r(2 * (t.x * t.w - t.y * t.z), -1, 1)), e[1] = Math[tt](2 * (t.x * t.z + t.y * t.w), u - i - s + o), e[2] = Math[tt](2 * (t.x * t.y + t.z * t.w), u - i + s - o); else if (n === \"ZXY\")e[0] = Math.asin(r(2 * (t.x * t.w + t.y * t.z), -1, 1)), e[1] = Math[tt](2 * (t.y * t.w - t.z * t.x), u - i - s + o), e[2] = Math[tt](2 * (t.z * t.w - t.x * t.y), u - i + s - o); else if (n === \"ZYX\")e[0] = Math[tt](2 * (t.x * t.w + t.z * t.y), u - i - s + o), e[1] = Math.asin(r(2 * (t.y * t.w - t.x * t.z), -1, 1)), e[2] = Math[tt](2 * (t.x * t.y + t.z * t.w), u + i - s - o); else if (n === \"YZX\")e[0] = Math[tt](2 * (t.x * t.w - t.z * t.y), u - i + s - o), e[1] = Math[tt](2 * (t.y * t.w - t.x * t.z), u + i - s - o), e[2] = Math.asin(r(2 * (t.x * t.y + t.z * t.w), -1, 1)); else {\n if (n !== \"XZY\")return;\n e[0] = Math[tt](2 * (t.x * t.w + t.y * t.z), u - i + s - o), e[1] = Math[tt](2 * (t.x * t.z + t.y * t.w), u + i - s - o), e[2] = Math.asin(r(2 * (t.z * t.w - t.x * t.y), -1, 1))\n }\n }\n\n function Ni(e, t) {\n var r, i, s, o;\n e == n ? (r = Math.tan(50 * br), i = Math.tan(50 * br), s = Math.tan(45 * br), o = Math.tan(45 * br)) : (r = Math.tan(e.upDegrees * br), i = Math.tan(e.downDegrees * br), s = Math.tan(e.leftDegrees * br), o = Math.tan(e.rightDegrees * br));\n var u = 2 / (s + o), a = 2 / (r + i);\n t[0] = u, t[1] = 0, t[2] = 0, t[3] = 0, t[4] = 0, t[5] = -a, t[6] = 0, t[7] = 0, t[8] = (s - o) * u * .5, t[9] = -((r - i) * a * .5), t[10] = 65535 / 65536, t[11] = 1, t[12] = 0, t[13] = 0, t[14] = 65535 / 65536 - 1, t[15] = 1\n }\n\n function Ci() {\n var e = Number.NaN, t = screen[Y] > screen[N], n = screen[st] || screen.msOrientation || screen.mozOrientation;\n if (n) {\n n = (\"\" + n)[c]();\n var r = n[s](\"portrait\") >= 0, i = n[s](\"landscape\") >= 0, o = n[s](\"primary\") >= 0, u = n[s](\"secondary\") >= 0;\n r && o ? e = 0 : i && o ? e = 90 : i && u ? e = -90 : r && u && (e = 180), !isNaN(e) && !Tn[at] && (e -= 90)\n }\n return isNaN(e) && (e = xn._have_top_access ? top[st] : window[st]), isNaN(e) && (Tn[at] ? e = t ? 90 : 0 : e = t ? 0 : 90), Tn.tablet && Tn[Ht] && (e += 90), e\n }\n\n function Mi(e) {\n if (!or[a])return;\n var t = xn[B], r = t - Hs;\n Hs = t;\n var i = Ci() * br, s = e.alpha * br, o = e.beta * br, u = e.gamma * br;\n Oi === n && (Oi = s), s = s - Oi + Math.PI;\n var f = Math.cos(s), l = Math.sin(s), c = Math.cos(o), h = Math.sin(o), p = Math.cos(u), d = Math.sin(u);\n s = Math[tt](-l * h * p - f * d, l * d - f * h * p), o = -Math.asin(c * p), u = Math[tt](c * d, -h) - Math.PI, ki.q.x = Li.q.x, ki.q.y = Li.q.y, ki.q.z = Li.q.z, ki.q.w = Li.q.w, ki.t = Li.t;\n var v = Li.q;\n Li.t = t, fr++, Si(v, o, s + i, u - i, Wt)\n }\n\n function _i() {\n if (or[a]) {\n xn[p][g] = r;\n var e = [0, 0, 0];\n if (Lr) {\n Hr = Lr.getState();\n if (Hr) {\n rr && Wr();\n if (Ln) {\n var t = Hr.position;\n if (t) {\n ci = 0;\n var i = 400;\n xn[p].tx = t.x * i, xn[p].ty = t.y * i, xn[p].tz = t.z * i\n }\n }\n Ti(e, Hr[st], Wt);\n var s = 0;\n Tn[_] && (s = Ci()), s += cr, xn[p][V] = (-e[1] + ci) * wr + s, xn[p][jt] = -e[0] * wr, xn[p][an] = -e[2] * wr\n }\n } else if (tr) {\n Wr();\n if (fr > lr) {\n var o = n;\n if ($n == 0)o = Li.q; else if (($n == 4 || $n >= 6) && ar == 2)o = Li.q, Ds(o); else if ($n <= 3 || $n == 5 || ar == 1)if (ki.t > 0 && Li.t > 0) {\n var u = xn[B], f = Li.t - ki.t, l = 0, c = 0, h = 1;\n $n == 1 || $n == 2 ? l = u - Li.t : (l = u - ki.t, h = 2), f <= 0 ? c = 1 : (c = l / f, c > h && (c = h)), Ai.x = ki.q.x, Ai.y = ki.q.y, Ai.z = ki.q.z, Ai.w = ki.q.w, wi(Ai, Li.q, c), o = Ai\n }\n if (o) {\n Ti(e, o, Wt);\n var s = Ci();\n xn[p][V] = cr + (-e[1] + ci) * wr + s, xn[p][jt] = -e[0] * wr, xn[p][an] = -e[2] * wr\n }\n }\n }\n }\n }\n\n function Di(e, n) {\n tr == t && ur == r && Ni(e == 1 ? Mr : _r, n)\n }\n\n function Pi(e) {\n var t = 0;\n return e == 1 ? Ar && Ar.x ? t = Ar.x : t = -0.03 : e == 2 && (Or && Or.x ? t = Or.x : t = .03), t *= 320 / Cn, t\n }\n\n function Hi(e, i) {\n var s = !!(Sn[Jt] || Sn[Mt] || Sn[zt] || Sn[gt] || Sn[qt]);\n if (or[a] && s && tr == t && ur == r) {\n var o = 0, u = 0;\n if (Dr)o = Dr[lt][Y] + Pr[lt][Y], u = Math.max(Dr[lt][N], Pr[lt][N]); else if (S in kr) {\n var f = kr[S](mt), l = kr[S](Tt);\n o = f[Y] + l[Y], u = Math.max(f[N], l[N])\n } else if (H in kr) {\n var c = kr[H]();\n o = c[Y], u = c[N]\n } else z in kr ? (o = kr[z][Y], u = kr[z][N]) : (o = 2e3, u = 1056);\n if (o > 0 && u > 0) {\n var h = 1;\n return o *= h, u *= h, {w: o, h: u}\n }\n } else or[a] && (tr || ur == t) && zr(e, i);\n return n\n }\n\n function Bi(e) {\n var e = (\"\" + e)[c](), i = e[s](dn), o = e.lastIndexOf(\"]\");\n if (i >= 0 && o > i) {\n var u = e[It](i + 8, o), a = dn + u + \"]\";\n a != Jn && (Jn = a, Qn && (ji(Qn, t), Qn = n), Qn = xn.get(Jn), Qn && ji(Qn, r))\n }\n }\n\n function ji(e, i) {\n if (i == r)e[Vt] = {\n visible: e[Ft],\n enabled: e[a],\n flying: e.flying,\n scaleflying: e[ot],\n distorted: e[xt],\n zorder: e.zorder,\n scale: e.scale,\n depth: e.depth,\n onover: e.onover,\n onout: e.onout\n }, e[a] = t, e.flying = 1, e[ot] = t, e[xt] = r, e.zorder = 999999999; else {\n var s = e[Vt];\n s && (e[Ft] = s[Ft], e[a] = s[a], e.flying = s.flying, e[ot] = s[ot], e[xt] = s[xt], e.zorder = s.zorder, e.scale = s.scale, e.depth = s.depth, e.onover = s.onover, e.onout = s.onout, e[Vt] = s = n)\n }\n }\n\n function Fi() {\n if (Jn) {\n var e = Qn;\n e == n && (e = xn.get(Jn), e && (ji(e, r), Qn = e));\n if (e) {\n if (!or[a])return e[Ft] = t, n;\n e.onover = Gn, e.onout = Yn, e[a] = Kn, e[Ft] = r\n }\n return e\n }\n return n\n }\n\n function Ii() {\n this.x = 0, this.y = 0, this.z = 0\n }\n\n function qi(e, t, n, r) {\n e.x = t, e.y = n, e.z = r\n }\n\n function Ri(e, t) {\n e.x = t.x, e.y = t.y, e.z = t.z\n }\n\n function Ui(e) {\n e.x = 0, e.y = 0, e.z = 0\n }\n\n function zi(e, t, n) {\n t == 0 ? e.x = n : t == 1 ? e.y = n : e.z = n\n }\n\n function Wi(e) {\n return Math[Bt](e.x * e.x + e.y * e.y + e.z * e.z)\n }\n\n function Xi(e) {\n var t = Wi(e);\n t > 0 ? Vi(e, 1 / t) : (e.x = 0, e.y = 0, e.z = 0)\n }\n\n function Vi(e, t) {\n e.x *= t, e.y *= t, e.z *= t\n }\n\n function $i(e, t, n) {\n qi(n, e.x - t.x, e.y - t.y, e.z - t.z)\n }\n\n function Ji(e, t, n) {\n qi(n, e.y * t.z - e.z * t.y, e.z * t.x - e.x * t.z, e.x * t.y - e.y * t.x)\n }\n\n function Ki(e, t) {\n return e.x * t.x + e.y * t.y + e.z * t.z\n }\n\n function Qi() {\n var e;\n return typeof Float64Array != \"undefined\" ? e = new Float64Array(9) : e = new Array(9), Yi(e), e\n }\n\n function Gi(e) {\n e[0] = e[1] = e[2] = e[3] = e[4] = e[5] = e[6] = e[7] = e[8] = 0\n }\n\n function Yi(e) {\n e[0] = e[4] = e[8] = 1, e[1] = e[2] = e[3] = e[5] = e[6] = e[7] = 0\n }\n\n function Zi(e, t) {\n e[0] = e[4] = e[8] = t\n }\n\n function es(e, t) {\n e[0] *= t, e[1] *= t, e[2] *= t, e[3] *= t, e[4] *= t, e[5] *= t, e[6] *= t, e[7] *= t, e[8] *= t\n }\n\n function ts(e, t) {\n var n = e[1], r = e[2], i = e[5];\n t[0] = e[0], t[1] = e[3], t[2] = e[6], t[3] = n, t[4] = e[4], t[5] = e[7], t[6] = r, t[7] = i, t[8] = e[8]\n }\n\n function ns(e, t, n) {\n e[t] = n.x, e[t + 3] = n.y, e[t + 6] = n.z\n }\n\n function rs(e, t) {\n e[0] = t[0], e[1] = t[1], e[2] = t[2], e[3] = t[3], e[4] = t[4], e[5] = t[5], e[6] = t[6], e[7] = t[7], e[8] = t[8]\n }\n\n function is(e, t) {\n var n = e[0] * (e[4] * e[8] - e[7] * e[5]) - e[1] * (e[3] * e[8] - e[5] * e[6]) + e[2] * (e[3] * e[7] - e[4] * e[6]);\n n != 0 && (n = 1 / n, t[0] = (e[4] * e[8] - e[7] * e[5]) * n, t[1] = -(e[1] * e[8] - e[2] * e[7]) * n, t[2] = (e[1] * e[5] - e[2] * e[4]) * n, t[3] = -(e[3] * e[8] - e[5] * e[6]) * n, t[4] = (e[0] * e[8] - e[2] * e[6]) * n, t[5] = -(e[0] * e[5] - e[3] * e[2]) * n, t[6] = (e[3] * e[7] - e[6] * e[4]) * n, t[7] = -(e[0] * e[7] - e[6] * e[1]) * n, t[8] = (e[0] * e[4] - e[3] * e[1]) * n)\n }\n\n function ss(e, t) {\n e[0] -= t[0], e[1] -= t[1], e[2] -= t[2], e[3] -= t[3], e[4] -= t[4], e[5] -= t[5], e[6] -= t[6], e[7] -= t[7], e[8] -= t[8]\n }\n\n function os(e, t) {\n e[0] += t[0], e[1] += t[1], e[2] += t[2], e[3] += t[3], e[4] += t[4], e[5] += t[5], e[6] += t[6], e[7] += t[7], e[8] += t[8]\n }\n\n function us(e, t, n) {\n var r = t[0], i = t[1], s = t[2], o = t[3], u = t[4], a = t[5], f = t[6], l = t[7], c = t[8], h = e[0], p = e[1], d = e[2];\n n[0] = h * r + p * o + d * f, n[1] = h * i + p * u + d * l, n[2] = h * s + p * a + d * c, h = e[3], p = e[4], d = e[5], n[3] = h * r + p * o + d * f, n[4] = h * i + p * u + d * l, n[5] = h * s + p * a + d * c, h = e[6], p = e[7], d = e[8], n[6] = h * r + p * o + d * f, n[7] = h * i + p * u + d * l, n[8] = h * s + p * a + d * c\n }\n\n function as(e, t, n) {\n var r = e[0] * t.x + e[1] * t.y + e[2] * t.z, i = e[3] * t.x + e[4] * t.y + e[5] * t.z, s = e[6] * t.x + e[7] * t.y + e[8] * t.z;\n n.x = r, n.y = i, n.z = s\n }\n\n function fs(e, t, n) {\n n[0] = e[0] + t[0], n[1] = e[1] + t[1], n[2] = e[2] + t[2], n[3] = e[3] + t[3], n[4] = e[4] + t[4], n[5] = e[5] + t[5], n[6] = e[6] + t[6], n[7] = e[7] + t[7], n[8] = e[8] + t[8]\n }\n\n function bs(e, t, n) {\n Ji(e, t, cs);\n if (Wi(cs) == 0)Yi(n); else {\n Ri(hs, e), Ri(ps, t), Xi(cs), Xi(hs), Xi(ps);\n var r = vs, i = ms;\n Ji(cs, hs, ls), r[0] = hs.x, r[1] = hs.y, r[2] = hs.z, r[3] = cs.x, r[4] = cs.y, r[5] = cs.z, r[6] = ls.x, r[7] = ls.y, r[8] = ls.z, Ji(cs, ps, ls), i[0] = ps.x, i[3] = ps.y, i[6] = ps.z, i[1] = cs.x, i[4] = cs.y, i[7] = cs.z, i[2] = ls.x, i[5] = ls.y, i[8] = ls.z, us(i, r, n)\n }\n }\n\n function ws(e, t) {\n var n = Ki(e, e), r = Math[Bt](n), i, s;\n if (n < 1e-8)i = 1 - 1 / 6 * n, s = .5; else if (n < 1e-6)s = .5 - .25 * (1 / 6) * n, i = 1 - n * (1 / 6) * (1 - .05 * n); else {\n var o = 1 / r;\n i = Math.sin(r) * o, s = (1 - Math.cos(r)) * o * o\n }\n Ss(e, i, s, t)\n }\n\n function Es(e, t) {\n var n = (e[0] + e[4] + e[8] - 1) * .5;\n qi(t, (e[7] - e[5]) / 2, (e[2] - e[6]) / 2, (e[3] - e[1]) / 2);\n var r = Wi(t);\n if (n > Math.SQRT1_2)r > 0 && Vi(t, Math.asin(r) / r); else if (n > -Math.SQRT1_2) {\n var i = Math.acos(n);\n Vi(t, i / r)\n } else {\n var i = Math.PI - Math.asin(r), s = e[0] - n, o = e[4] - n, u = e[8] - n, a = gs;\n s * s > o * o && s * s > u * u ? qi(a, s, (e[3] + e[1]) / 2, (e[2] + e[6]) / 2) : o * o > u * u ? qi(a, (e[3] + e[1]) / 2, o, (e[7] + e[5]) / 2) : qi(a, (e[2] + e[6]) / 2, (e[7] + e[5]) / 2, u), Ki(a, t) < 0 && Vi(a, -1), Xi(a), Vi(a, i), Ri(t, a)\n }\n }\n\n function Ss(e, t, n, r) {\n var i = e.x * e.x, s = e.y * e.y, o = e.z * e.z;\n r[0] = 1 - n * (s + o), r[4] = 1 - n * (i + o), r[8] = 1 - n * (i + s);\n var u = t * e.z, a = n * e.x * e.y;\n r[1] = a - u, r[3] = a + u, u = t * e.y, a = n * e.x * e.z, r[2] = a + u, r[6] = a - u, u = t * e.x, a = n * e.y * e.z, r[5] = a - u, r[7] = a + u\n }\n\n function xs(e, t, n, r) {\n t *= br, n *= br, r *= br;\n var i = Math.cos(t), s = Math.sin(t), o = Math.cos(n), u = Math.sin(n), a = Math.cos(r), f = Math.sin(r), l = i * u, c = s * u;\n e[0] = o * a, e[1] = l * a + i * f, e[2] = -c * a + s * f, e[3] = -o * f, e[4] = -l * f + i * a, e[5] = c * f + s * a, e[6] = u, e[7] = -s * o, e[8] = i * o\n }\n\n function Ts(e, t) {\n var n = e[0] + e[4] + e[8], r;\n n > 0 ? (r = Math[Bt](1 + n) * 2, t.x = (e[5] - e[7]) / r, t.y = (e[6] - e[2]) / r, t.z = (e[1] - e[3]) / r, t.w = .25 * r) : e[0] > e[4] && e[0] > e[8] ? (r = Math[Bt](1 + e[0] - e[4] - e[8]) * 2, t.x = .25 * r, t.y = (e[3] + e[1]) / r, t.z = (e[6] + e[2]) / r, t.w = (e[5] - e[7]) / r) : e[4] > e[8] ? (r = Math[Bt](1 + e[4] - e[0] - e[8]) * 2, t.x = (e[3] + e[1]) / r, t.y = .25 * r, t.z = (e[7] + e[5]) / r, t.w = (e[6] - e[2]) / r) : (r = Math[Bt](1 + e[8] - e[0] - e[4]) * 2, t.x = (e[6] + e[2]) / r, t.y = (e[7] + e[5]) / r, t.z = .25 * r, t.w = (e[1] - e[3]) / r)\n }\n\n function Ds(e) {\n if (js) {\n var t = Ci();\n t != Ls && (Ls = t, xs(Os, 0, 0, -t), xs(As, -90, 0, +t));\n var n;\n if ($n <= 1 || $n == 3)n = To(); else {\n var r = xn[B], i = (r - Ns) / 1e3, s = i;\n $n == 2 ? s += 2 / 60 : $n == 6 ? s += 1 / 60 : $n == 7 && (s += 2 / 60), n = Lo(s)\n }\n us(Os, n, _s), us(_s, As, Ms), Ts(Ms, e)\n }\n }\n\n function Bs(e) {\n if (!or[a])return;\n var i = xn[B], s = i - Hs;\n Hs = i, s > 5e3 && (ui(), s = .16), fr++;\n if (fr < lr)return;\n go == t && (go = r, yo());\n var o = e[K], u = o.x, f = o.y, l = o.z;\n u == n && (u = 0), f == n && (f = 9.81), l == n && (l = 0);\n var c = e.acceleration;\n if (c) {\n var h = c.x, p = c.y, d = c.z;\n h == n && (h = 0), p == n && (p = 0), d == n && (d = 0), u -= h, f -= p, l -= d\n }\n if (Tn.ios || Tn.ie)u *= -1, f *= -1, l *= -1;\n var v = e.rotationRate, m = v.alpha, g = v.beta, y = v.gamma;\n m == n && (m = 0), g == n && (g = 0), y == n && (y = 0);\n if (Tn.ios || Tn[Ht] || Tn.ie) {\n m *= br, g *= br, y *= br;\n if (Tn.ie) {\n var b = m, w = g, E = y;\n m = w, g = E, y = b\n }\n }\n Uo ? Jo(s, m, g, y) : Pn && Ps(m, g, y, i);\n var S = zo;\n m -= S.rx, g -= S.ry, y -= S.rz, qi(Cs, u, f, l), Eo(Cs, s), Ns = i, qi(ks, m, g, y), xo(ks, i);\n if ($n <= 3 || $n == 5)ki.q.x = Li.q.x, ki.q.y = Li.q.y, ki.q.z = Li.q.z, ki.q.w = Li.q.w, ki.t = Li.t, Ds(Li.q), Li.t = i\n }\n\n function yo() {\n Yi(Qs), Yi(Gs), Gi(Zs), Zi(Zs, ho), Gi(Ys), Zi(Ys, 1), Gi(ro), Zi(ro, po), Gi(to), Gi(eo), Gi(no), Ui(Ws), Ui(Us), Ui(Rs), Ui(zs), Ui(qs), qi(Is, 0, 0, vo), js = t\n }\n\n function bo(e, t) {\n as(e, Is, Rs), bs(Rs, Us, co), Es(co, t)\n }\n\n function wo() {\n ts(Gs, fo), us(Zs, fo, lo), us(Gs, lo, Zs), Yi(Gs)\n }\n\n function Eo(e, t) {\n Ri(Us, e);\n if (js) {\n bo(Qs, Ws), t < 5 && (t = 5);\n var n = 1e3 / 60 / t, i = mo * n, s = 1 / mo, o = Xs;\n for (var u = 0; u < 3; u++)Ui(o), zi(o, u, s), ws(o, io), us(io, Qs, so), bo(so, Vs), $i(Ws, Vs, $s), Vi($s, i), ns(eo, u, $s);\n ts(eo, oo), us(Zs, oo, uo), us(eo, uo, ao), fs(ao, ro, to), is(to, oo), ts(eo, uo), us(uo, oo, ao), us(Zs, ao, no), as(no, Ws, qs), us(no, eo, oo), Yi(uo), ss(uo, oo), us(uo, Zs, oo), rs(Zs, oo), ws(qs, Gs), us(Gs, Qs, Qs), wo()\n } else bs(Is, Us, Qs), js = r\n }\n\n function xo(e, t) {\n if (So != 0) {\n var n = (t - So) / 1e3;\n n > 1 && (n = 1), Ri(zs, e), Vi(zs, -n), ws(zs, Gs), rs(Js, Qs), us(Gs, Qs, Js), rs(Qs, Js), wo(), rs(Ks, Ys), es(Ks, n * n), os(Zs, Ks)\n }\n So = t, Ri(Fs, e)\n }\n\n function To() {\n return Qs\n }\n\n function Lo(e) {\n var t = No;\n Ri(t, Fs), Vi(t, -e);\n var n = Co;\n ws(t, n);\n var r = ko;\n return us(n, Qs, r), r\n }\n\n function Ho(e) {\n var t = e[s](\"://\");\n if (t > 0) {\n var r = e[s](\"/\", t + 3), i = e[It](0, t)[c](), o = e[It](t + 3, r), u = e[It](r);\n return [i, o, u]\n }\n return n\n }\n \n function local_storage() {\n // krpano WebVR Plugin - cross-domain localstorage - server page\n // - save the WebVR cardboard settings (IPD, screensize, lens-settings, gyro-calibration)\n\n var ls = window.localStorage;\n if (ls)\n {\n if (false) //parent === window\n {\n // direct call - show stored settings\n var vals = ls.getItem(\"krpano.webvr.4\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.3\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.2\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.1\");\n\n if (vals)\n {\n vals = (\"\"+vals).split(\",\")\n if (vals.length >= 6)\n {\n document.body.innerHTML =\n \"<div style='font-family:Arial;font-size:14px;'>\"+\n \"krpano WebVR Settings (v4): \"+\n \"ipd=\"+Number(vals[0]).toFixed(2)+\"mm, \"+\n \"screensize=\"+(vals[1] == 0 ? \"auto\" : Number(vals[1]).toFixed(1)+\" inch\")+\", \"+\n \"fov=\"+Number(vals[2]).toFixed(1)+\", \"+\n \"distortion=\"+Number(vals[3]).toFixed(2)+\", \"+\n \"distortion2=\"+(vals[10] ? vals[10] : \"none\")+\", \"+\n \"ca=\"+(!isNaN(Number(vals[11])) ? Number(vals[11]) : \"0.0\")+\", \"+\n \"vignette=\"+Number(vals[4]).toFixed(1)+\", \"+\n \"sensormode=\"+Number(vals[5]).toFixed(0)+\", \"+\n \"overlap=\"+(vals.length >= 10 ? Number(vals[9]) : 1.0).toFixed(2)+\n (vals.length >= 9 ? \", gyro-calibration=\"+Number(vals[6]).toFixed(4)+\"/\"+Number(vals[7]).toFixed(4)+\"/\"+Number(vals[8]).toFixed(4) : \"\")+\n \"</div>\";\n }\n }\n }\n else\n {\n // handle messages from the parent frame\n window.addEventListener(\"message\", function(event)\n {\n var request = (\"\"+event.data).toLowerCase();\n var vals;\n\n if ( request == \"load.1\" )\n {\n // load.1 => ipd,size,fov,dist,vig,ssm\n vals = ls.getItem(\"krpano.webvr.1\");\n if (vals)\n {\n if ((\"\"+vals).split(\",\").length == 6)\n {\n event.source.postMessage(\"webvr_settings:\"+vals, event.origin);\n }\n }\n }\n else if ( request == \"load.2\" )\n {\n // load.2 => ipd,size,fov,dist,vig,ssm,gyrox,gyroy,gyroz\n vals = ls.getItem(\"krpano.webvr.2\");\n if (vals)\n {\n if ((\"\"+vals).split(\",\").length == 9)\n {\n event.source.postMessage(\"webvr_settings:\"+vals, event.origin);\n }\n }\n else\n {\n // use older version data: load.2 => ipd,size,fov,dist,vig,ssm,0,0,0\n vals = ls.getItem(\"krpano.webvr.1\");\n if (vals && (\"\"+vals).split(\",\").length == 6)\n {\n event.source.postMessage(\"webvr_settings:\"+vals+\",0,0,0\", event.origin);\n }\n }\n }\n else if ( request == \"load.3\" )\n {\n // load.3 => ipd,size,fov,dist,vig,ssm,gyrox,gyroy,gyroz,overlap\n vals = ls.getItem(\"krpano.webvr.3\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.2\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.1\");\n\n if (vals && (\"\"+vals).split(\",\").length >= 6)\n {\n event.source.postMessage(\"webvr_settings:\"+vals, event.origin);\n }\n }\n else if ( request == \"load.4\" )\n {\n // load.4 => ipd,size,fov,dist,vig,ssm,gyrox,gyroy,gyroz,overlap,dist2,ca\n vals = ls.getItem(\"krpano.webvr.4\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.3\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.2\");\n if (!vals) vals = ls.getItem(\"krpano.webvr.1\");\n\n if (vals && (\"\"+vals).split(\",\").length >= 6)\n {\n event.source.postMessage(\"webvr_settings:\"+vals, event.origin);\n }\n }\n else if ( request.slice(0,7) == \"save.1:\" )\n {\n // save.1:ipd,size,fov,dist,vig,ssm\n vals = request.slice(7).split(\",\");\n if (vals.length == 6)\n {\n var ipd = Number(vals[0]);\n var srd = Number(vals[1]);\n var fov = Number(vals[2]);\n var dst = Number(vals[3]);\n var vig = Number(vals[4]);\n var ssm = Number(vals[5]);\n\n // validate values\n if (!isNaN(ipd) && ipd >= 30 && ipd < 90 &&\n !isNaN(srd) && srd >= 0 && srd < 12 &&\n !isNaN(fov) && fov >= 1 && fov < 180 &&\n !isNaN(dst) && dst >= 0 && dst < 10 &&\n !isNaN(vig) && vig >= 1 && vig < 500 &&\n !isNaN(ssm) && ssm >= 0 && ssm < 10\n )\n {\n ls.setItem(\"krpano.webvr.1\", vals.join(\",\"));\n }\n }\n }\n else if ( request.slice(0,7) == \"save.2:\" )\n {\n // save.2:ipd,size,fov,dist,vig,ssm,gyrox,gyroy,gyroz\n vals = request.slice(7).split(\",\");\n if (vals.length == 9)\n {\n var ipd = Number(vals[0]);\n var srd = Number(vals[1]);\n var fov = Number(vals[2]);\n var dst = Number(vals[3]);\n var vig = Number(vals[4]);\n var ssm = Number(vals[5]);\n var grx = Number(vals[6]);\n var gry = Number(vals[7]);\n var grz = Number(vals[8]);\n\n // validate values\n if (!isNaN(ipd) && ipd >= 30 && ipd < 90 &&\n !isNaN(srd) && srd >= 0 && srd < 12 &&\n !isNaN(fov) && fov >= 1 && fov < 180 &&\n !isNaN(dst) && dst >= 0 && dst < 10 &&\n !isNaN(vig) && vig >= 1 && vig < 500 &&\n !isNaN(ssm) && ssm >= 0 && ssm < 10 &&\n !isNaN(grx) && !isNaN(gry) && !isNaN(grz)\n )\n {\n ls.setItem(\"krpano.webvr.2\", vals.join(\",\"));\n\n // save settings also for older versions\n ls.setItem(\"krpano.webvr.1\", vals.slice(0,6).join(\",\"));\n }\n }\n }\n else if ( request.slice(0,7) == \"save.3:\" )\n {\n // save.3:ipd,size,fov,dist,vig,ssm,gyrox,gyroy,gyroz,overlap\n vals = request.slice(7).split(\",\");\n if (vals.length == 10)\n {\n var ipd = Number(vals[0]);\n var srd = Number(vals[1]);\n var fov = Number(vals[2]);\n var dst = Number(vals[3]);\n var vig = Number(vals[4]);\n var ssm = Number(vals[5]);\n var grx = Number(vals[6]);\n var gry = Number(vals[7]);\n var grz = Number(vals[8]);\n var olp = Number(vals[9]);\n\n // validate values\n if (!isNaN(ipd) && ipd >= 30 && ipd < 90 &&\n !isNaN(srd) && srd >= 0 && srd < 12 &&\n !isNaN(fov) && fov >= 1 && fov < 180 &&\n !isNaN(dst) && dst >= 0 && dst < 10 &&\n !isNaN(vig) && vig >= 1 && vig < 500 &&\n !isNaN(ssm) && ssm >= 0 && ssm < 10 &&\n !isNaN(grx) && !isNaN(gry) && !isNaN(grz) &&\n !isNaN(olp) && olp > 0 && olp < 2\n )\n {\n ls.setItem(\"krpano.webvr.3\", vals.join(\",\"));\n\n // save the settings also for older versions\n ls.setItem(\"krpano.webvr.2\", vals.slice(0,9).join(\",\"));\n ls.setItem(\"krpano.webvr.1\", vals.slice(0,6).join(\",\"));\n }\n }\n }\n else if ( request.slice(0,7) == \"save.4:\" )\n {\n // save.4:ipd,size,fov,dist,vig,ssm,gyrox,gyroy,gyroz,overlap,dist2,ca\n vals = request.slice(7).split(\",\");\n if (vals.length == 12)\n {\n var ipd = Number(vals[0]);\n var srd = Number(vals[1]);\n var fov = Number(vals[2]);\n var dst = Number(vals[3]);\n var vig = Number(vals[4]);\n var ssm = Number(vals[5]);\n var grx = Number(vals[6]);\n var gry = Number(vals[7]);\n var grz = Number(vals[8]);\n var olp = Number(vals[9]);\n\n // validate values\n if (!isNaN(ipd) && ipd >= 30 && ipd < 90 &&\n !isNaN(srd) && srd >= 0 && srd < 12 &&\n !isNaN(fov) && fov >= 1 && fov < 180 &&\n !isNaN(dst) && dst >= 0 && dst < 10 &&\n !isNaN(vig) && vig >= 1 && vig < 500 &&\n !isNaN(ssm) && ssm >= 0 && ssm < 10 &&\n !isNaN(grx) && !isNaN(gry) && !isNaN(grz) &&\n !isNaN(olp) && olp > 0 && olp < 2\n )\n {\n ls.setItem(\"krpano.webvr.4\", vals.join(\",\"));\n\n // save the settings also for older versions\n ls.setItem(\"krpano.webvr.3\", vals.slice(0,10).join(\",\"));\n ls.setItem(\"krpano.webvr.2\", vals.slice(0,9).join(\",\"));\n ls.setItem(\"krpano.webvr.1\", vals.slice(0,6).join(\",\"));\n }\n }\n }\n }\n , false);\n }\n }\n }\n\n function Bo(e) {\n if (Mo == n) {\n var i = Ho(Ao), s = Ho(window[wn].href);\n if (s[0] == \"http\" || s[0] == \"https\") {\n _o = s[0] + \"://\" + i[1], Do = _o + i[2];\n var o = document[bn](\"iframe\");\n o.style.cssText = \"position:absolute;width:1px;height:1px;left:-9999px;visibility:hidden;\",\n xn[m].viewerlayer.appendChild(o),\n Mo = o,\n o[u](\"load\", function () {\n Oo = r, e(Mo)\n }, true),\n window[u](\"message\", Fo, true);\n //o.src = Do\n local_storage();\n }\n } else Oo && e(Mo)\n }\n\n function jo(e) {\n Bo(function (t) {\n try {\n t.contentWindow.postMessage(e, _o)\n } catch (n) {\n }\n })\n }\n\n function Fo(e) {\n alert(233);\n if (e.origin == _o) {\n var t = \"\" + e.data;\n t[It](0, 15) == \"webvr_settings:\" && Io(t[It](15))\n }\n }\n\n function Io(e) {\n var t = e[mn](bt), n = Number(t[0]), i = Number(t[1]), s = Number(t[2]), o = Number(t[3]), u = Number(t[4]), a = Number(t[5]), f = Number(t[6]), l = Number(t[7]), c = Number(t[8]), h = Number(t[9]), p = \"\" + t[10], d = Number(t[11]);\n isNaN(f) && (f = 0), isNaN(l) && (l = 0), isNaN(c) && (c = 0), isNaN(h) && (h = 1), isNaN(d) && (d = 0), p[mn](\"|\")[kt] != 4 && (p = Qt), !isNaN(n) && n >= 30 && n < 90 && !isNaN(i) && i >= 0 && i < 12 && !isNaN(s) && s >= 1 && s < 180 && !isNaN(o) && o >= 0 && o < 10 && !isNaN(u) && u >= 1 && u < 500 && !isNaN(a) && a >= 0 && a < 10 && !isNaN(h) && h > 0 && h < 2 && (Hn = n, Bn = i, Fn = s, In = o, Wn = u, $n = a, zo.rx = f, zo.ry = l, zo.rz = c, jn = h, qn = p, zn = d, ir = r)\n }\n\n function qo(e) {\n if (tr || rr) {\n if (Po)try {\n var t = window.localStorage;\n if (t) {\n var n = t[tn](Pt);\n n || (n = t[tn](Dt)), n || (n = t[tn](At)), n || (n = t[tn](Ot)), n && Io(n)\n }\n } catch (r) {\n }\n (\"\" + e)[c]() != \"local\" && jo(\"load.4\")\n }\n }\n\n function Ro(e) {\n if (tr || rr) {\n var t = Hn + bt + Bn + bt + Fn + bt + In + bt + Wn + bt + $n + bt + zo.rx + bt + zo.ry + bt + zo.rz + bt + jn + bt + qn + bt + zn;\n if (Po)try {\n var n = window.localStorage;\n n && (n[Zt](Pt, t), n[Zt](Dt, t[mn](bt)[It](0, 10).join(bt)), n[Zt](At, t[mn](bt)[It](0, 9).join(bt)), n[Zt](Ot, t[mn](bt)[It](0, 6).join(bt)))\n } catch (r) {\n }\n (\"\" + e)[c]() != \"local\" && jo(\"save.4:\" + t)\n }\n }\n\n function Vo(e, n) {\n Zn && tr && !nr && (Uo = r, Pn = t, Wo = e, Xo = n, Jo(-1))\n }\n\n function $o() {\n Uo = t, zo.rx = 0, zo.ry = 0, zo.rz = 0\n }\n\n var e = \"registerattribute\", t = !1, n = null, r = !0, s = \"indexOf\", o = \"removeEventListener\", u = \"addEventListener\", a = \"enabled\", f = \"deviceorientation\", l = \"onunavailable\", c = \"toLowerCase\", h = \"devicemotion\", p = \"view\", d = \"maxpixelzoom\", v = \"architectural\", m = \"display\", g = \"continuousupdates\", y = \"control\", b = \"fisheyefovlink\", w = \"browser\", E = \"desktop\", S = \"getRecommendedEyeRenderRect\", x = \"stereographic\", T = \"limitview\", N = \"height\", C = \"getCurrentEyeFieldOfView\", k = \"events\", L = \"#ifdef GL_FRAGMENT_PRECISION_HIGH\\n\", A = \"loadwhilemoving\", O = \"onavailable\", M = \"float b = texture2D(sm,vB).b;\", _ = \"android\", D = \"downloadlockedlevel\", P = \"float r = texture2D(sm,vR).r;\", H = \"getRecommendedRenderTargetSize\", B = \"timertick\", j = \"stereooverlap\", F = \"getEyeParameters\", I = \"uniform1f\", q = \"vec2 vR = center + v * ca;\", R = \"vec2 vB = center + v / ca;\", U = \"precision mediump float;\\n\", z = \"renderTargetSize\", W = \"lockmultireslevel\", X = \"fisheye\", V = \"hlookat\", $ = \"getEyeTranslation\", J = \"call\", K = \"accelerationIncludingGravity\", Q = \"documentElement\", G = \"fovtype\", Y = \"width\", Z = \"#endif\\n\", et = \"precision highp float;\\n\", tt = \"atan2\", nt = \"pannini\", rt = \"uniform sampler2D sm;\", it = \"usercontrol\", st = \"orientation\", ot = \"scaleflying\", ut = \"vec2 v = tx - center;\", at = \"mobile\", ft = \"fovmin\", lt = \"renderRect\", ct = \"useProgram\", ht = \"fovmax\", pt = \"auto\", dt = \"uniform float ca;\", vt = \"uniform float ol;\", mt = \"left\", gt = \"webkitFullscreenElement\", yt = \"fullscreen\", bt = \",\", wt = \"varying vec2 tx;\", Et = \"recommendedFieldOfView\", St = \"mousetype\", xt = \"distorted\", Tt = \"right\", Nt = \"onunknowndevice\", Ct = \"stereo\", kt = \"length\", Lt = \"area\", At = \"krpano.webvr.2\", Ot = \"krpano.webvr.1\", Mt = \"mozFullScreenElement\", _t = \"#ifdef GL_ES\\n\", Dt = \"krpano.webvr.3\", Pt = \"krpano.webvr.4\", Ht = \"firefox\", Bt = \"sqrt\", jt = \"vlookat\", Ft = \"visible\", It = \"slice\", qt = \"msFullscreenElement\", Rt = \"contextmenu\", Ut = \"mozGetVRDevices\", zt = \"webkitIsFullScreen\", Wt = \"YXZ\", Xt = \"void main()\", Vt = \"_VR_backup\", $t = \"layer\", Jt = \"fullscreenElement\", Kt = \"touchstart\", Qt = \"1|0|0|0\", Gt = \"devicename\", Yt = \"fullscreenchange\", Zt = \"setItem\", en = \"maxmem\", tn = \"getItem\", nn = \"mousedown\", rn = \"mousemove\", sn = \"galaxy s4\", on = \"iPhone 6+\", un = \"touchmove\", an = \"camroll\", fn = \"changedTouches\", ln = \"iPhone 6\", cn = \"screentosphere\", hn = \"createppshader\", pn = \"eyeTranslation\", dn = \"hotspot[\", vn = \"hardwareUnitId\", mn = \"split\", gn = \"touchend\", yn = \"#else\\n\", bn = \"createElement\", wn = \"location\", En = this, Sn = document, xn = n, Tn = n, Nn = n, Cn = 1, kn = .00125, Ln = t, An = r, On = r, Mn = t, _n = t, Dn = r, Pn = t, Hn = 63.5, Bn = pt, jn = 1, Fn = 96, In = .6, qn = Qt, Rn = [1, 0, 0, 0], Un = t, zn = 0, Wn = 100, Xn = t, Vn = 1, $n = 3, Jn = \"\", Kn = r, Qn = n, Gn = n, Yn = n, Zn = t, er = t, tr = t, nr = t, rr = t, ir = t, sr = t, or = {\n enabled: t,\n eyetranslt: Pi,\n updateview: _i,\n prjmatrix: Di,\n getsize: Hi,\n getcursor: Fi\n }, ur = r, ar = 0, fr = 0, lr = 6, cr = 0, hr = 1, pr = 0, dr = 0, vr = 0, mr = t, gr = n, yr = n, br = Math.PI / 180, wr = 180 / Math.PI;\n En.registerplugin = function (i, s, o) {\n xn = i, Nn = o;\n if (xn.version < \"1.19\" || xn.build < \"2015-07-09\") {\n xn.trace(3, \"WebVR plugin - too old krpano version (min. 1.19)\");\n return\n }\n if (xn.webVR)return;\n Tn = xn.device, Nn[e](\"worldscale\", Cn, function (e) {\n var t = Number(e);\n isNaN(t) || (Cn = Math.max(t, .1))\n }, function () {\n return Cn\n }), Nn[e](\"mousespeed\", kn, function (e) {\n var t = Number(e);\n isNaN(t) || (kn = t)\n }, function () {\n return kn\n }), Nn[e](\"pos_tracking\", Ln, function (e) {\n Ln = Er(e)\n }, function () {\n return Ln\n }), Nn[e](\"multireslock\", An, function (e) {\n An = Er(e), or[a] && ri()\n }, function () {\n return An\n }), Nn[e](\"mobilevr_support\", On, function (e) {\n On = Er(e)\n }, function () {\n return On\n }), Nn[e](\"mobilevr_touch_support\", Mn, function (e) {\n Mn = Er(e)\n }, function () {\n return Mn\n }), Nn[e](\"mobilevr_fake_support\", _n, function (e) {\n _n = Er(e)\n }, function () {\n return _n\n }), Nn[e](\"mobilevr_ipd\", Hn, function (e) {\n var t = Number(e);\n isNaN(t) || (Hn = t), Ur()\n }, function () {\n return Hn\n }), Nn[e](\"mobilevr_screensize\", Bn, function (e) {\n $r(e)\n }, function () {\n return Jr()\n }), Nn[e](\"mobilevr_lens_fov\", Fn, function (e) {\n var t = Number(e);\n isNaN(t) || (Fn = t, Ur())\n }, function () {\n return Fn\n }), Nn[e](\"mobilevr_lens_overlap\", jn, function (e) {\n var t = Number(e);\n isNaN(t) || (jn = t, Ur())\n }, function () {\n return jn\n }), Nn[e](\"mobilevr_lens_dist\", In, function (e) {\n var t = Number(e);\n isNaN(t) || (In = t, Ur())\n }, function () {\n return In\n }), Nn[e](\"mobilevr_lens_dist2\", qn, function (e) {\n qn = e, Ur()\n }, function () {\n return qn\n }), Nn[e](\"mobilevr_lens_ca\", zn, function (e) {\n var t = Number(e);\n isNaN(t) || (zn = t, Ur())\n }, function () {\n return zn\n }), Nn[e](\"mobilevr_lens_vign\", Wn, function (e) {\n var t = Number(e);\n isNaN(t) || (Wn = t, Ur())\n }, function () {\n return Wn\n }), Nn[e](\"mobilevr_webvr_dist\", Xn, function (e) {\n Xn = Er(e)\n }, function () {\n return Xn\n }), Nn[e](\"mobilevr_wakelock\", Dn, function (e) {\n Dn = Er(e)\n }, function () {\n return Dn\n }), Nn[e](\"mobilevr_autocalibration\", Pn, function (e) {\n Pn = Er(e)\n }, function () {\n return Pn\n }), Nn[e](\"mobilevr_sensor\", Vn, function (e) {\n Vn = parseInt(e) & 1\n }, function () {\n return Vn\n }), Nn[e](\"mobilevr_sensor_mode\", $n, function (e) {\n var t = parseInt(e);\n t >= 0 && t <= 7 && ($n = t), fr = 0\n }, function () {\n return $n\n }), Nn[e](\"vr_cursor\", Jn, function (e) {\n Bi(e)\n }, function () {\n return Jn\n }), Nn[e](\"vr_cursor_enabled\", Kn, function (e) {\n Kn = Er(e)\n }, function () {\n return Kn\n }), Nn[e](\"vr_cursor_onover\", Gn, function (e) {\n Gn = e\n }, function () {\n return Gn\n }), Nn[e](\"vr_cursor_onout\", Yn, function (e) {\n Yn = e\n }, function () {\n return Yn\n }), Nn[e](\"isavailable\", er, function (e) {\n }, function () {\n return er\n }), Nn[e](\"isenabled\", Zn, function (e) {\n }, function () {\n return Zn\n }), Nn[e](\"iswebvr\", !tr, function (e) {\n }, function () {\n return !tr || rr\n }), Nn[e](\"ismobilevr\", tr, function (e) {\n }, function () {\n return tr || rr\n }), Nn[e](\"isfake\", nr, function (e) {\n }, function () {\n return nr\n }), Nn[e](\"havesettings\", ir, function (e) {\n }, function () {\n return ir\n }), Nn[e](Gt, \"\", function (e) {\n }, function () {\n return Xr()\n }), Nn[e](\"devicesize\", \"\", function (e) {\n }, function () {\n return Vr()\n }), Nn[e](O, n), Nn[e](l, n), Nn[e](Nt, n), Nn[e](\"onentervr\", n), Nn[e](\"onexitvr\", n), Nn.entervr = Gr, Nn.exitvr = Yr, Nn.togglevr = Zr, Nn.resetsensor = ei, Nn.loadsettings = qo, Nn.savesettings = Ro, Nn.calibrate = Vo, Nn.resetcalibration = $o, Nn.update = Qr;\n if (xn.webGL) {\n xn.webVR = or;\n var u = Tn[_] && Tn[Ht], f = document[Q].requestPointerLock || document[Q].mozRequestPointerLock || document[Q].webkitRequestPointerLock, c = document.exitPointerLock || document.mozExitPointerLock || document.webkitExitPointerLock;\n f && c && (mr = r, gr = f, yr = c);\n try {\n u == t && navigator.getVRDevices ? navigator.getVRDevices().then(jr) : u == t && navigator[Ut] ? navigator[Ut](jr) : On ? xr() : sr == t && (sr = r, xn[J](Nn[l], Nn))\n } catch (h) {\n }\n } else sr == t && (sr = r, xn[J](Nn[l], Nn))\n }, En.unloadplugin = function () {\n Yr(), oi(t, r), xn.webVR = n\n };\n var kr = n, Lr = n, Ar = n, Or = n, Mr = n, _r = n, Dr = n, Pr = n, Hr = n, Br = 100, Fr = n, qr = n, ti = n, oi = function () {\n var e = n, r = n;\n return function (i, s) {\n if (Tn[at] && nr == t)if (i)Tn.ios ? e = window.setInterval(function () {\n window[wn] = window[wn], window.setTimeout(window.stop, 0)\n }, 15e3) : Tn[_] && (r == n && (r = document[bn](\"video\"), r.setAttribute(\"loop\", \"\"), r.canPlayType(\"video/webm\") != \"\" && (r.src = Qo)), r.play()); else {\n e && (window.clearInterval(e), e = n);\n if (r && s) {\n r.pause();\n try {\n r.src = \"\", r.removeAttribute(\"src\")\n } catch (o) {\n }\n r = n\n }\n }\n }\n }(), ai = 0, ci = 0, ki = {q: new pi(0, 0, 0, 1), t: 0}, Li = {\n q: new pi(0, 0, 0, 1),\n t: 0\n }, Ai = new pi(0, 0, 0, 1), Oi = n, ls = new Ii, cs = new Ii, hs = new Ii, ps = new Ii, ds = new Ii, vs = Qi(), ms = Qi(), gs = new Ii, ys = new Ii, Ns = 0, Cs = new Ii, ks = new Ii, Ls = n, As = Qi(), Os = Qi(), Ms = Qi(), _s = Qi(), Ps = function () {\n var e = 0, t = 0, n = 0, r = 0, i = 0, s = 0, o = 0, u = 0, a = 0, f = 0, l = 1, c = 0, h = 0, p = 0, d = .03;\n return function (c, h, p, v) {\n var m = c - e, g = h - t, y = p - n, b = v - r;\n e = c, t = h, n = p, r = v;\n var w = Math[Bt](m * m + g * g + y * y);\n if (b > 500) {\n i = 0;\n return\n }\n if (i == 0) {\n i = b, s = w;\n return\n }\n i = i * .95 + .05 * b;\n var E = Math.min(15 * i / 1e3, .5);\n s = s * (1 - E) + E * w;\n var S = zo;\n s < d ? (o++, u += c, a += h, f += p, o > 19 && (S.rx = S.rx * (1 - l) + l * (u / o), S.ry = S.ry * (1 - l) + l * (a / o), S.rz = S.rz * (1 - l) + l * (f / o), l > .5 && (l *= .9), s = 10, d *= .5)) : (o = 1, u = c, a = h, f = p)\n }\n }(), Hs = 0, js = t, Fs = new Ii, Is = new Ii, qs = new Ii, Rs = new Ii, Us = new Ii, zs = new Ii, Ws = new Ii, Xs = new Ii, Vs = new Ii, $s = new Ii, Js = Qi(), Ks = Qi(), Qs = Qi(), Gs = Qi(), Ys = Qi(), Zs = Qi(), eo = Qi(), to = Qi(), no = Qi(), ro = Qi(), io = Qi(), so = Qi(), oo = Qi(), uo = Qi(), ao = Qi(), fo = Qi(), lo = Qi(), co = Qi(), ho = 20, po = .5, vo = 9.81, mo = 1e7, go = t, So = 0, No = new Ii, Co = Qi(), ko = Qi(), Ao = \"http://d8d913s460fub.cloudfront.net/krpanocloud/webvr_localstorage.html?v=114\", Oo = t, Mo = n, _o = n, Do = n, Po = r, Uo = t, zo = {\n rx: 0,\n ry: 0,\n rz: 0\n }, Wo = n, Xo = n, Jo = function () {\n function i() {\n var t = 0, r = n * 3, i = 0, s = 0, o = 0, u = 0, a = 0, f = 0, l = 0, c = 0, h = 0, p = 0;\n for (t = 0; t < r; t += 3)i += e[t | 0], s += e[t + 1 | 0], o += e[t + 2 | 0];\n i /= n, s /= n, o /= n;\n for (t = 0; t < r; t += 3)l = e[t | 0] - i, c = e[t + 1 | 0] - s, h = e[t + 2 | 0] - o, u += l * l, a += c * c, f += h * h;\n u = Math[Bt](u / n), a = Math[Bt](a / n), f = Math[Bt](f / n), p = Math[Bt](u * u + a * a + f * f);\n if (p < .05) {\n var d = zo;\n d.rx = i, d.ry = s, d.rz = o, Wo && xn[J](Wo, Nn)\n } else Xo && xn[J](Xo, Nn)\n }\n\n var e = new Array(300), n = 0, r = 0;\n return function (s, o, u, a) {\n if (s < 0) {\n n = 0, r = xn[B];\n return\n }\n var f = xn[B] - r;\n if (f > 500) {\n var l = n * 3;\n e[l | 0] = o, e[l + 1 | 0] = u, e[l + 2 | 0] = a, n++;\n if (n > 100 || f > 2500)Uo = t, i()\n }\n }\n }(), Ko = function () {\n function u(t) {\n for (i = 0; i < t[kt]; i++)if (e && t[i] === e || s && t[i] === s)t.splice(i, 1), i--\n }\n\n var e = n, r = \"\" + _t + L + et + yn + U + Z + Z + rt + wt + dt + vt + Xt + \"{\" + \"float g = texture2D(sm,tx).g;\" + \"vec2 center = vec2(0.5 + (0.5 - ol)*(step(0.5,tx.x) - 0.5), 0.5);\" + ut + q + P + R + M + \"gl_FragColor=vec4(r,g,b,1.0);\" + \"}\", s = n, o = \"\" + _t + L + et + yn + U + Z + Z + rt + wt + \"uniform vec2 sz;\" + \"uniform float ss;\" + dt + vt + \"uniform float vg;\" + \"uniform vec4 dd;\" + Xt + \"{\" + \"float vig = 0.015;\" + \"float side = step(0.5,tx.x) - 0.5;\" + \"float aspect = (sz.x / sz.y);\" + \"vec2 center = vec2(0.5 + (0.5 - ol)*side, 0.5);\" + ut + \"v.x = v.x * aspect;\" + \"v *= 2.0 * ss;\" + \"float rs = dot(v,v);\" + \"v = v * (dd.x + rs*(dd.y + rs*(dd.z + rs*dd.w)));\" + \"v /= 2.0 * ss;\" + \"v.x = v.x / aspect;\" + \"vec2 vG = center + v;\" + \"float a = (1.0 - smoothstep(vG.x-vig - side*ol, vG.x - side*ol, center.x - 0.25)) * \" + \"(1.0 - smoothstep(center.x + 0.25 - vG.x + side*ol - vig, center.x + 0.25 - vG.x + side*ol, 0.0)) * \" + \"(1.0 - smoothstep(vG.y-vig, vG.y, 0.0)) * \" + \"(1.0 - smoothstep(1.0 - vG.y-vig,1.0 - vG.y, 0.0));\" + \"a *= smoothstep(rs-vig, rs+vig, vg);\" + q + R + P + \"float g = texture2D(sm,vG).g;\" +\n M + \"gl_FragColor=vec4(a*r,a*g,a*b,1.0);\" + \"}\";\n return function (i) {\n var a = xn.webGL;\n if (a) {\n var f, l = a.context, c = a.ppshaders, h = 1 - zn * .1 / hr;\n Un == t && h > .999999 && h < 1.000001 && (i = t), xn[m][Ct] == t && (i = t);\n if (i)if (Un) {\n s == n && (s = a[hn](o, \"ss,ca,dd,ol,sz,vg\"));\n if (s) {\n var p = 1 / Rn[0], d = Rn[1], v = Rn[2], g = Rn[3];\n a[ct](s.prg), l[I](s.ss, hr), l[I](s.ca, h), l.uniform4f(s.dd, p, p * d, p * v, p * g), l[I](s.ol, .5 * vr * (1 + (jn - 1) * .1)), l[I](s.vg, Wn / 30), a[ct](n), u(c), c.push(s)\n }\n } else e == n && (e = a[hn](r, \"ca,ol\")), e && (a[ct](e.prg), l[I](e.ca, h), l[I](e.ol, .5 * vr * (1 + (jn - 1) * .1)), a[ct](n), u(c), c.push(e)); else u(c)\n }\n }\n }(), Qo = \"data:video/webm;base64,GkXfowEAAAAAAAAfQoaBAUL3gQFC8oEEQvOBCEKChHdlYm1Ch4ECQoWBAhhTgGcBAAAAAAABzRFNm3RALE27i1OrhBVJqWZTrIHfTbuMU6uEFlSua1OsggEuTbuMU6uEHFO7a1OsggGw7AEAAAAAAACkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmAQAAAAAAAEMq17GDD0JATYCMTGF2ZjU2LjMuMTAwV0GMTGF2ZjU2LjMuMTAwc6SQC+JFWnEfyt4nOD98NcnLDESJiAAAAAAAAAAAFlSuawEAAAAAAABCrgEAAAAAAAA514EBc8WBAZyBACK1nIN1bmSGhVZfVlA4g4EBI+ODgw9CQOABAAAAAAAADrCBCLqBCFSwgQhUuoEIH0O2dQEAAAAAAAAo54EAo6OBAACAEAIAnQEqCAAIAABHCIWFiIWEiAICAAwNYAD+/6PeABxTu2sBAAAAAAAAEbuPs4EAt4r3gQHxggF88IED\"\n };\n\n\n\n c.reloadurl = function () {\n if (c.sprite) {\n var a = ra.parsePath(c.url), b = a, d = \"\", f = b.indexOf(\"?\");\n 0 < f && (b = b.slice(0, f));\n f = b.indexOf(\"#\");\n 0 < f && (b = b.slice(0, f));\n f = b.lastIndexOf(\".\");\n 0 < f && (d = F(b.slice(f + 1)));\n if (c.loading) {\n if (c.loadingurl == a)return;\n c.loader.kobject = null;\n ba(c.loader, _[48], e, !0);\n ba(c.loader, \"load\", c.loadurl_done, !1);\n Jc(c);\n R(c.loader, _[48], e, !0);\n R(c.loader, \"load\", c.loadurl_done, !1)\n }\n if (c.loadedurl != a)\n if (D = !1, c.loadedurl = null, _[57] == b) {\n z = D = !0;\n Jc(c);\n c.loadedurl = a;\n c.createvar(_[456], c.bgcolor ? Number(c.bgcolor) : 0, u);\n c.createvar(_[463], c.bgalpha ? Number(c.bgalpha) : 0, u);\n c.createvar(_[337], c.bgroundedge ? c.bgroundedge : \"0\", u);\n c.createvar(_[406], c.bgborder ? c.bgborder : \"0\", u);\n c.createvar(_[413], c.bgshadow ? c.bgshadow : \"\", u);\n c.createvar(_[386], pa(c.bgcapture), g);\n g();\n u();\n var h = {};\n h.ss = X;\n h.onresize = function (a, b) {\n a = c.pixelwidth;\n b = c.pixelheight;\n c.imagewidth = a / c.scale;\n c.imageheight = b / c.scale;\n h.ss != X && (h.ss = X, u());\n Q = !0;\n return !1\n };\n c.jsplugin = h;\n c.loadurl_done()\n } \n else if (0 <= a.indexOf(_[281])) {\n D = !0;\n Jc(c);\n c.loadedurl = a;\n var k = new Af;\n k.registerplugin(m, c.getfullpath(), c);\n c.jsplugin = k;\n 0 == c._dyn ? (k.updatehtml(), c.loadurl_done()) : setTimeout(function () {\n k.updatehtml();\n c.loadurl_done()\n }, 7)\n } \n else\"js\" == d ? \n (D = !0, Jc(c), c.loading = !0, c.loaded = !1, c.loadingurl = a, ra.loadfile2(a, _[92], function (b) {\n c.loading = !1;\n c.loaded = !0;\n c.loadedurl = a;\n b = b.data;\n if (null != b) {\n var d = 'the file \"' + a + '\" is not a krpano plugin!';\n try {\n eval(b + \";\")\n } catch (e) {\n d = 'parsing \"' + a + '\" failed: ' + e\n }\n _[11] == typeof krpanoplugin2 ? (b = new krpanoplugin2, b.registerplugin(m, c.getfullpath(), c), c._nativeelement = !0, c.jsplugin = b, c.loadurl_done()) : la(3, d)\n }\n })) : \"swf\" == d ? la(2, c._type + \"[\" + c.name + _[78] + Vd(a)) : c.loader.src != a && (c.loaded && c.preload && (c._ispreload = !0, c.preload = !1, c.onloaded = null), ra.DMcheck(a) ? (c.loading = !0, c.loaded = !1, c.loadingurl = a, c.loader.src = a) : (c.loading = !1, la(3, c._type + \"[\" + c.name + _[85] + a)))\n }\n };\n c.loadurl_done = function () {\n 1 != c._destroyed && (0 == D && (c.sprite.style.backgroundImage = 'url(\"' + c.loader.src + '\")'), h(c, c._crop), c.loading = !1, Q = c.loaded = !0, 0 == D && (c.loadedurl = c.loadingurl), c.poschanged = !0, 0 == (b.iphone && b.retina && 7 > b.iosversion) && null == c.jsborder && 0 == D && null == c.parent && null == c._childs && (c._use_css_scale = !0), 0 == c.preload && 0 == c._ispreload && (c._busyonloaded = da.busy || da.blocked, c._busyonloaded && da.callaction(_[188], c, !0)), da.callaction(null != c.altonloaded ? c.altonloaded : c.onloaded, c, !0))\n };\n var B = null;\n c.updatepluginpos = c.updatepos = function () {\n var a = _[1] == c._type;\n c.poschanged = !1;\n var d = c.sprite, e = c.loader;\n if (d && (e || 0 != D)) {\n D && (e = null);\n var f = c._align, g = c._scale;\n f || (f = _[66]);\n var h = c._use_css_scale, k = c.imagewidth, l = c.imageheight, m = !1, p = c._crop;\n c.pressed && c._ondowncrop ? p = c._ondowncrop : c.hovering && c._onovercrop && (p = c._onovercrop);\n p && (p = String(p).split(\"|\"), 4 == p.length ? (p[0] |= 0, p[1] |= 0, p[2] |= 0, p[3] |= 0) : p = null);\n var r = c.scale9grid;\n r && (r = String(r).split(\"|\"), 4 <= r.length ? (r[0] |= 0, r[1] |= 0, r[2] |= 0, r[3] |= 0, h = c._use_css_scale = !1, c._scalechildren = !1) : r = null);\n var u = X, v = Qa, w = ya;\n a && c.distorted && (u = 1, v = w = 1E3);\n var x = 1, y = 1, z = c._parent, E = !0;\n if (z) {\n var C = n(z);\n C ? (C.poschanged && C.updatepos(), 0 == h ? (v = C._pxw * u, w = C._pxh * u) : (v = C.imagewidth * u, w = C.imageheight * u), C._scalechildren ? (x = 0 != C.imagewidth ? v / u / C.imagewidth : 1, y = 0 != C.imageheight ? w / u / C.imageheight : 1) : (x *= C._finalxscale, y *= C._finalyscale), 0 == C.loaded && (E = !1, d.style.display = \"none\")) : la(3, 'no parent \"' + z + '\" found')\n }\n var A = c._width, F = c._height, H = c._x, J = c._y, z = c._ox, K = c._oy;\n isNaN(k) && (k = 0);\n isNaN(l) && (l = 0);\n A && 0 < String(A).indexOf(\"%\") ? A = parseFloat(A) * (v / u) / (100 * x) : null == A && (A = k);\n F && 0 < String(F).indexOf(\"%\") ? F = parseFloat(F) * (w / u) / (100 * y) : null == F && (F = l);\n var S = \"prop\" == A | (\"prop\" == F) << 1, A = Number(A) * u, F = Number(F) * u;\n 0 > A && (A = v / x + A, 0 > A && (A = 0));\n 0 > F && (F = w / y + F, 0 > F && (F = 0));\n S && (S & 1 ? A = 0 != l ? Number(F) * k / l : 0 : F = 0 != k ? Number(A) * l / k : 0);\n 0 < c.maxwidth && A > u * c.maxwidth && (A = u * c.maxwidth);\n 0 < c.minwidth && A < u * c.minwidth && (A = u * c.minwidth);\n 0 < c.maxheight && F > u * c.maxheight && (F = u * c.maxheight);\n 0 < c.minheight && F < u * c.minheight && (F = u * c.minheight);\n A = A * x * g;\n F = F * y * g;\n H && 0 < String(H).indexOf(\"%\") ? H = parseFloat(H) * (v / u) / (100 * x) : null == H && (H = 0);\n J && 0 < String(J).indexOf(\"%\") ? J = parseFloat(J) * (w / u) / (100 * y) : null == J && (J = 0);\n H = Number(H) * u * x;\n J = Number(J) * u * y;\n g = c._hszscale;\n z = z && 0 < String(z).indexOf(\"%\") ? parseFloat(z) * A * g / 100 / u : null == z ? 0 : z * x;\n K = K && 0 < String(K).indexOf(\"%\") ? parseFloat(K) * F * g / 100 / u : null == K ? 0 : K * y;\n z = Number(z) * u;\n K = Number(K) * u;\n 0 != c.accuracy || a || (A = hc(A), F = hc(F));\n var g = 0 != k ? A / k : 0, S = 0 != l ? F / l : 0, ea = A / u, Z = F / u;\n if (ea != c._pxw || Z != c._pxh)c._pxw = ea, c._pxh = Z, c.pixelwidth = ea / x, c.pixelheight = Z / y, m = !0;\n this._scalechildren ? (c._finalxscale = g, c._finalyscale = S) : (c._finalxscale = x, c._finalyscale = y);\n h ? (d.style.width = k + \"px\", d.style.height = l + \"px\") : (d.style.width = A + \"px\", d.style.height = F + \"px\");\n if (r) {\n var Z = r, O = A, N = F, I = p, p = c.sprite, l = c.loader, M;\n M = X;\n 5 == Z.length && (M *= Number(Z[4]));\n e = l.naturalWidth;\n k = l.naturalHeight;\n null == I && (I = [0, 0, e, k]);\n l = 'url(\"' + l.src + '\")';\n if (null == B)for (B = Array(9), x = 0; 9 > x; x++)r = Ja(), r.kobject = c, r.imgurl = null, r.style.position = _[0], r.style.overflow = _[6], B[x] = r, p.appendChild(r);\n for (var x = [I[0] + 0, I[0] + Z[0], I[0] + Z[0] + Z[2], I[0] + I[2]], y = [I[1] + 0, I[1] + Z[1], I[1] + Z[1] + Z[3], I[1] + I[3]], ea = [Z[0], Z[2], I[2] - Z[0] - Z[2]], Z = [Z[1], Z[3], I[3] - Z[1] - Z[3]], O = [ea[0] * M | 0, O - ((ea[0] + ea[2]) * M | 0), ea[2] * M | 0], R = [Z[0] * M | 0, N - ((Z[0] + Z[2]) * M | 0), Z[2] * M | 0], T = [0, O[0], O[0] + O[1]], U = [0, R[0], R[0] + R[1]], qa, V, I = 0; 3 > I; I++)for (M = 0; 3 > M; M++)r = B[3 * I + M], N = r.style, qa = 0 != ea[M] ? O[M] / ea[M] : 0, V = 0 != Z[I] ? R[I] / Z[I] : 0, r.imgurl != l && (r.imgurl = l, N.backgroundImage = l), r = b.mac && b.firefox ? L.devicePixelRatio : 1, N[pd] = (e * qa * r | 0) / r + \"px \" + (k * V * r | 0) / r + \"px\", N.backgroundPosition = (-x[M] * qa * r | 0) / r + \"px \" + (-y[I] * V * r | 0) / r + \"px\", N.left = T[M] + \"px\", N.top = U[I] + \"px\", N.width = O[M] + \"px\", N.height = R[I] + \"px\";\n p.style.background = \"none\"\n } else {\n if (B) {\n try {\n for (k = 0; 9 > k; k++)B[k].kobject = null, d.removeChild(B[k])\n } catch (Ca) {\n }\n B = null;\n c.sprite && c.loader && (c.sprite.style.backgroundImage = 'url(\"' + c.loader.src + '\")')\n }\n p ? (k = -p[0], p = -p[1], h || (k *= g, p *= S), d.style.backgroundPosition = k + \"px \" + p + \"px\") : d.style.backgroundPosition = \"0 0\";\n e && (d.style[pd] = 0 == h ? e.naturalWidth * g + \"px \" + e.naturalHeight * S + \"px\" : e.naturalWidth + \"px \" + e.naturalHeight + \"px\")\n }\n c.jsplugin && c.jsplugin.onresize && (c._pxw != c.imagewidth || c._pxh != c.imageheight) && (p = [c.imagewidth, c.imageheight], c.imagewidth = c._pxw, c.imageheight = c._pxh, !0 === c.jsplugin.onresize(c._pxw, c._pxh) && (c.imagewidth = p[0], c.imageheight = p[1]));\n c._oxpix = z;\n c._oypix = K;\n l = \"\";\n e = p = 0;\n if (0 == a) {\n p = c._edge;\n if (null == p || \"\" == p)p = f;\n a = k = 0;\n k = 0 <= p.indexOf(\"left\") ? k + 0 : 0 <= p.indexOf(_[3]) ? k + -A : k + -A / 2;\n a = 0 <= p.indexOf(\"top\") ? a + 0 : 0 <= p.indexOf(_[2]) ? a + -F : a + -F / 2;\n p = 0 <= f.indexOf(\"left\") ? H + k : 0 <= f.indexOf(_[3]) ? v - H + k : v / 2 + H + k;\n e = 0 <= f.indexOf(\"top\") ? J + a : 0 <= f.indexOf(_[2]) ? w - J + a : w / 2 + J + a;\n c.pixelx = (p + z) / u;\n c.pixely = (e + K) / u;\n p -= q[3];\n e -= q[0];\n 0 == c.accuracy && (p = hc(p), e = hc(e));\n h && (u = f = 1, v = c.imagewidth / 2, w = c.imageheight / 2, J = H = 0, C && 0 == C._scalechildren && (f /= C.pixelwidth / C.imagewidth, u /= C.pixelheight / C.imageheight, H = -k * (1 - f), J = -a * (1 - u)), l = _[60] + (-v + H) + \"px,\" + (-w + J) + _[340] + g * f + \",\" + S * u + _[293] + v + \"px,\" + w + \"px) \");\n 0 == c.accuracy && (p = hc(p), e = hc(e));\n C = A / 2 + k;\n F = F / 2 + a;\n h && (0 != g && (C /= g, z /= g), 0 != S && (F /= S, K /= S));\n l = _[60] + p + \"px,\" + e + \"px) \" + l + _[60] + -C + \"px,\" + -F + _[332] + c._rotate + _[245] + (C + z) + \"px,\" + (F + K) + \"px)\";\n Kc && 2 > Nb && !0 !== b.opera ? l = _[182] + l : b.androidstock && (l = _[199] + l);\n ib ? d.style[ib] = l : (d.style.left = p + \"px\", d.style.top = e + \"px\");\n h = c._visible && E ? \"\" : \"none\";\n h != d.style.display && (d.style.display = h)\n }\n if (m || Q) {\n if (d = c._childs)for (m = d.length, k = 0; k < m; k++)d[k].updatepos();\n Q = !1\n }\n }\n }\n }, Af = function () {\n function a(a, b, c, e) {\n v.registerattribute(b, c, function (c) {\n r[b] != c && (r[b] = c, null != e ? e(b, c) : d(a))\n }, function () {\n return r[b]\n })\n }\n\n function d(a) {\n l |= a;\n v && null == y && (y = setTimeout(m, 0))\n }\n\n function m() {\n y = null;\n if (v) {\n var a = !1;\n 2 == l && (a = e());\n 0 == a && p();\n l = 0\n }\n }\n\n function f(a) {\n a && 0 == a.indexOf(_[74]) && ((a = U(\"data[\" + a.slice(5) + _[61])) || (a = \"\"));\n return a\n }\n\n function g(a) {\n if (a && a.parentNode)try {\n a.parentNode.removeChild(a)\n } catch (b) {\n }\n }\n\n function n(a) {\n a && (a.style.left = _[122], a.style.visibility = _[6], V.viewerlayer.appendChild(a))\n }\n\n function k(a) {\n a.ontouchend = function () {\n a.click()\n }\n }\n\n function e() {\n var a = !1;\n if (H) {\n var b = H.childNodes[0];\n if (b) {\n var a = b.style, b = pa(r.background), c = pa(r.border), d = parseInt(r.backgroundcolor), e = parseFloat(r.backgroundalpha);\n isNaN(e) && (e = 1);\n var f = parseFloat(r.borderwidth);\n isNaN(f) && (f = 1);\n var g = r.bordercolor, g = g ? parseInt(g) : 0, h = parseFloat(r.borderalpha);\n isNaN(h) && (h = 1);\n var k = Number(r.shadow);\n isNaN(k) && (k = 0);\n var l = Number(r.textshadow);\n isNaN(l) && (l = 0);\n var m = 1 == Lc ? .78 : .8, n = r.shadowangle * Y, p = r.textshadowangle * Y;\n a.backgroundColor = b ? ca(d, e) : \"\";\n a.borderColor = c && 0 < f ? ca(g, e * h) : \"\";\n a.borderRadius = 0 < D[0] + D[1] + D[2] + D[3] ? D.join(\"px \") + \"px\" : \"\";\n a[pc] = 0 < k ? Math.round(k * Math.cos(n)) + \"px \" + Math.round(k * Math.sin(n)) + \"px \" + m * r.shadowrange + \"px \" + ca(r.shadowcolor, e * r.shadowalpha) : \"\";\n a.textShadow = 0 < l ? Math.round(l * Math.cos(p)) + \"px \" + Math.round(l * Math.sin(p)) + \"px \" + m * r.textshadowrange + \"px \" + ca(r.textshadowcolor, e * r.textshadowalpha) : \"\";\n a = !0\n }\n }\n return a\n }\n\n function p() {\n if (v) {\n y && (clearTimeout(y), y = null);\n var a = 2 == u || 1 == u && 0 == v.haveUserWidth(), d = 2 == h || 1 == h && 0 == v.haveUserHeight(), g = r.html, m = r.css, g = g ? f(g) : \"\", m = m ? f(m) : \"\";\n pa(r.background);\n var w = pa(r.border), t = parseFloat(r.borderwidth);\n isNaN(t) && (t = 1);\n var g = Ed(g), m = m.split(\"0x\").join(\"#\"), E = m.split(\"}\").join(\"{\").split(\"{\");\n if (1 < E.length) {\n for (var D = [], m = 1; m < E.length; m += 2) {\n var J = Ha(E[m - 1]), L = E[m], M = \"p\" == F(J) ? \"div\" : J, g = g.split(\"<\" + J).join(\"<\" + M + _[407] + L + \"' \"), g = g.split(\"</\" + J + \">\").join(\"</\" + M + \">\");\n D.push(E[m])\n }\n m = \"\"\n }\n g = _[206] + K[0] + \"px \" + K[1] + \"px \" + K[2] + \"px \" + K[3] + \"px;\" + m + \"'>\" + g + _[68];\n 1 == r.vcenter && 0 == d && (g = \"<table style='width:100%;height:100%;border-collapse:collapse;text-decoration:inherit;'><tr style='vertical-align:middle;'><td style='padding:0;'>\" + g + _[214]);\n g = g.split(\"<p\").join(_[161]);\n g = g.split(\"</p>\").join(_[68]);\n m = _[213];\n if (1 == a || 0 == pa(r.wordwrap))m += _[205];\n 0 == d && (m += _[308]);\n z = 1;\n w && 0 < t ? (z = t * X, m += _[450] + Math.ceil(t) + _[197]) : z = 0;\n 0 == a && (m += _[505] + v.imagewidth + _[202]);\n g = unescape(g);\n g = '<div style=\"' + m + '\">' + g + _[68];\n v.sprite.style.color = _[26];\n v.sprite.style[_[51]] = \"none\";\n H && H.parentNode == v.sprite && (A = H, H = null);\n null == H && (H = Ja(), I = H.style, pa(r.selectable) && (I.webkitUserSelect = I.MozUserSelect = I.msUserSelect = I.oUserSelect = I.userSelect = \"text\", I.cursor = \"text\"), I.position = _[0], I.left = I.top = -z + \"px\", _[1] == v._type && 1 == v._distorted ? (I.width = \"100%\", I.height = \"100%\", I[ib] = \"\") : (I[Zc] = \"0 0\", I[ib] = _[141] + X + \")\", I.width = 100 / X + \"%\", I.height = 100 / X + \"%\"), I.fontSize = \"12px\", I.fontFamily = \"Arial\", I.lineHeight = _[45]);\n H.innerHTML = g;\n e();\n if (a = H.getElementsByTagName(\"a\"))if (d = a.length, 0 < d)for (m = 0; m < d; m++)if (g = a[m])w = \"\" + g.href, _[509] == w.toLowerCase().slice(0, 6) && (g.href = _[173] + V.viewerlayer.id + _[376] + w.slice(6).split(\"'\").join('\"') + \"','\" + v.getfullpath() + \"');\"), b.touch && k(g);\n _[1] == v._type && (v.forceupdate = !0, ob(!0, v.index));\n n(H);\n c = !1;\n v.loaded = !0;\n v.scalechildren = v.scalechildren;\n C = 0;\n null == q && (q = setTimeout(x, 10));\n l = 0\n }\n }\n\n function x() {\n q = null;\n c = !1;\n if (v && H) {\n var a = 2 == u || 1 == u && 0 == v.haveUserWidth(), b = 2 == h || 1 == h && 0 == v.haveUserHeight();\n J = !0;\n var d = H && H.parentNode == v.sprite, e = 0, f = 0;\n if (0 == a && 0 == b)f = v.imageheight, 1 > f && (f = 1); else {\n try {\n e = H.childNodes[0].clientWidth, f = H.childNodes[0].clientHeight, 3 > f && (f = 0)\n } catch (k) {\n }\n if (1 > f && d && H.parentNode && 1 > H.parentNode.clientHeight) {\n n(H);\n C = 0;\n null == q && (q = setTimeout(x, 10));\n J = !1;\n return\n }\n }\n if (0 < f) {\n if (v._enabledstate = null, v.enabled = v._enabled, I.top = I.left = -z + \"px\", c = !0, A && A.parentNode == v.sprite ? (I.visibility = _[12], v.sprite.replaceChild(H, A), A = null) : (g(A), A = null, I.visibility = _[12], v.sprite.appendChild(H)), 0 != a || 0 != b)if (e = a ? Math.round(e) : v.imagewidth, f = b ? Math.round(f) : v.imageheight, e != v._width || f != v._height)a && (v._width = e), b && (v._height = f), v.poschanged = !0, _[1] == v._type ? ob(!0, v.index) : v.updatepluginpos(), v.onautosized && da.callaction(v.onautosized, v, !0)\n } else C++, 10 > C ? null == q && (q = setTimeout(x, 20)) : (A && A.parentNode == v.sprite && (v.sprite.replaceChild(H, A), A = null), v.height = 0);\n J = !1\n }\n }\n\n var v = null, r = {}, y = null, l = 0, u = 1, h = 1, c = !1, K = [0, 0, 0, 0], D = [0, 0, 0, 0], z = 1, q = null, J = !1, C = 0, L = X, A = null, H = null, I = null;\n this.registerplugin = function (b, c, e) {\n v = e;\n b = v.html;\n c = v.css;\n delete v.html;\n delete v.css;\n v._istextfield = !0;\n v.accuracy = 0;\n v.registerattribute(_[377], \"auto\", function (a) {\n u = \"auto\" == F(a) ? 1 : 2 * pa(a);\n d(1)\n }, function () {\n return 1 == u ? \"auto\" : 2 == u ? \"true\" : _[31]\n });\n v.registerattribute(_[357], \"auto\", function (a) {\n h = \"auto\" == F(a) ? 1 : 2 * pa(a);\n d(1)\n }, function () {\n return 1 == h ? \"auto\" : 2 == h ? \"true\" : _[31]\n });\n a(1, _[446], !1);\n a(1, _[132], \"2\", function (a, b) {\n Ib(b, 1, \" \", K);\n d(1)\n });\n a(2, _[107], !0);\n a(2, _[235], 1);\n a(2, _[237], 16777215);\n a(1, _[71], !1);\n a(1, _[105], 1);\n a(2, _[104], 1);\n a(2, _[101], 0);\n a(2, _[380], \"0\", function (a, b) {\n Ib(b, 1, \" \", D);\n d(2)\n });\n a(2, _[522], 0);\n a(2, _[320], 4);\n a(2, _[318], 45);\n a(2, _[316], 0);\n a(2, _[315], 1);\n a(2, _[366], 0);\n a(2, _[241], 4);\n a(2, _[242], 45);\n a(2, _[243], 0);\n a(2, _[244], 1);\n a(1, _[370], !1);\n a(1, _[410], !0);\n a(1, _[502], \"\");\n v.registerattribute(\"blur\", 0);\n v.registerattribute(_[408], 0);\n v.registerattribute(_[440], null, function (a) {\n null != a && \"\" != a && \"none\" != (\"\" + a).toLowerCase() && (h = 2, d(1))\n }, function () {\n return 2 == h ? _[136] : \"none\"\n });\n v.registercontentsize(400, 300);\n v.sprite.style.pointerEvents = \"none\";\n a(1, \"html\", b ? b : \"\");\n a(1, \"css\", c ? c : \"\")\n };\n this.unloadplugin = function () {\n v && (v.loaded = !1, q && clearTimeout(q), y && clearTimeout(y), g(A), g(H));\n v = y = q = I = H = A = null\n };\n this.onvisibilitychanged = function (a) {\n a && _[1] == v._type && (v.forceupdate = !0, ob(!0, v.index));\n return !1\n };\n this.onresize = function (a, b) {\n if (L != X)return L = X, Ib(r.padding, 1, \" \", K), Ib(r.roundedge, 1, \" \", D), p(), !1;\n if (J)return !1;\n if (v) {\n var d = 2 == u || 1 == u && 0 == v.haveUserWidth(), e = 2 == h || 1 == h && 0 == v.haveUserHeight();\n v.registercontentsize(a, b);\n H && (_[1] != v._type || 1 != v._distorted ? (I[ib] = _[141] + X + \")\", I.width = 100 / X + \"%\", I.height = 100 / X + \"%\") : (I[ib] = \"\", I.width = \"100%\", I.height = \"100%\"), c && (I.left = I.top = -z + \"px\"), 0 == d && (H.childNodes[0].style.width = a + \"px\"), 0 == e && (H.childNodes[0].style.height = b + \"px\"), d || e ? (c = !1, d && (v.sprite.style.width = 0), e && (v.sprite.style.height = 0), C = 0, null == q && (q = setTimeout(x, 10))) : (0 == d && (I.width = a + 2 * z + \"px\"), 0 == e && (I.height = b + \"px\")))\n }\n return !1\n };\n this.updatehtml = p\n }, ub = !1, qc = 1, wf = function () {\n function a() {\n 0 == b.css3d && d._distorted && (d._distorted = !1, d.zoom = !0);\n d.poschanged = !0;\n d.jsplugin && d.jsplugin.onresize && (d.forceupdate = !0, d.imagewidth = d.imageheight = 0);\n d.sprite && (d._visible && d.loaded && ob(!0, d.index), d.sprite.style[ib + _[143]] = d._distorted ? \"0 0\" : _[461])\n }\n\n var d = this;\n d.prototype = Ob;\n this.prototype.call(this);\n d._type = _[1];\n var m = d.createvar;\n m(\"ath\", 0);\n m(\"atv\", 0);\n m(\"depth\", 1E3);\n m(_[501], 0);\n d.scaleflying = !0;\n m(\"zoom\", !1);\n m(\"rx\", 0);\n m(\"ry\", 0);\n m(\"rz\", 0);\n m(\"tx\", 0);\n m(\"ty\", 0);\n m(\"tz\", 0);\n m(_[401], !1, a);\n d.accuracy = 1;\n d.zorder2 = 0;\n d.inverserotation = !1;\n d.forceupdate = !1;\n d._hit = !1;\n d.point = new bb(null);\n var f = d.create;\n d.create = function () {\n function b() {\n Gd(d)\n }\n\n f();\n d.createvar(_[121], d.polyline ? pa(d.polyline) : !1, b);\n d.createvar(_[398], d.fillcolor ? Number(d.fillcolor) : 11184810, b);\n d.createvar(_[396], d.fillalpha ? Number(d.fillalpha) : .5, b);\n d.createvar(_[105], d.borderwidth ? Number(d.borderwidth) : 3, b);\n d.createvar(_[101], d.bordercolor ? Number(d.bordercolor) : 11184810, b);\n d.createvar(_[104], d.borderalpha ? Number(d.borderalpha) : 1, b);\n a()\n };\n d.updatepos = function () {\n d.poschanged = !0\n };\n d.getcenter = function () {\n var a = 0, b = 0, f = 25;\n if (d._url)a = d._ath, b = d._atv, f = 25 * Number(d.scale); else {\n for (var e = d.point.getArray(), m = 0, p = e.length, v, r, y, l = 5E4, u = -5E4, h = 5E4, c = -5E4, E = 5E4, D = -5E4, z = 0, q = 0, F = 0, m = 0; m < p; m++)r = e[m], v = Number(r.ath), y = Number(r.atv), r = 0 > v ? v + 360 : v, v < l && (l = v), v > u && (u = v), r < h && (h = r), r > c && (c = r), y < E && (E = y), y > D && (D = y), v = (180 - v) * Y, y *= Y, z += Math.cos(y) * Math.cos(v), F += Math.cos(y) * Math.sin(v), q += Math.sin(y);\n 0 < p && (z /= p, q /= p, F /= p, a = 90 + Math.atan2(z, F) / Y, b = -Math.atan2(-q, Math.sqrt(z * z + F * F)) / Y, 180 < a && (a -= 360), v = u - l, y = D - E, 170 < v && (v = c - h), f = v > y ? v : y)\n }\n 1 > f ? f = 1 : 90 < f && (f = 90);\n e = new Hb;\n e.x = a;\n e.y = b;\n e.z = f;\n f = arguments;\n 2 == f.length && (I(f[0], a, !1, this), I(f[1], b, !1, this));\n return e\n }\n }, $d = \"\", ic = 1, Be = \"translate3D(;;px,;;px,0px) ;;rotateX(;;deg) rotateY(;;deg) ;;deg) rotateX(;;deg) scale3D(;;) translateZ(;;px) rotate(;;deg) translate(;;px,;;px) rotate;;deg) rotate;;deg) rotate;;deg) scale(;;,;;) translate(;;px,;;px)\".split(\";\"), Ce = \"translate(;;px,;;px) translate(;;px,;;px) rotate(;;deg) translate(;;px,;;px) scale(;;,;;) translate(;;px,;;px)\".split(\";\"), tf = function () {\n this.fullscreen = b.fullscreensupport;\n this.touch = this.versioninfo = !0;\n this.customstyle = null;\n this.enterfs = _[371];\n this.exitfs = _[246];\n this.item = new bb(function () {\n this.visible = this.enabled = !0;\n this.caption = null;\n this.separator = !1;\n this.onclick = null\n })\n }, Xd = function () {\n function a(a) {\n var b = ja.FRM;\n if (0 == b && n)n(a); else {\n 0 == b && (b = 60);\n var d = 1E3 / b, b = (new Date).getTime(), d = Math.max(0, d - (b - g));\n L.setTimeout(a, d);\n g = b + d\n }\n }\n\n function d() {\n m && (f(), a(d))\n }\n\n var m = !0, f = null, g = 0, n = L.requestAnimationFrame || L.webkitRequestAnimationFrame || L.mozRequestAnimationFrame || L.oRequestAnimationFrame || L.msRequestAnimationFrame;\n return {\n start: function (g) {\n if (b.ios && 9 > b.iosversion || b.linux && b.chrome)n = null;\n m = !0;\n f = g;\n a(d)\n }, stop: function () {\n m = !1;\n f = null\n }\n }\n }();\n Jb.init = function (a) {\n Jb.so = a;\n b.runDetection(a);\n if (b.css3d || b.webgl)ib = b.browser.css.transform, Id = ib + \"Style\", Zc = ib + _[143];\n pd = b.browser.css.backgroundsize;\n pc = b.browser.css.boxshadow;\n var d = b.webkit && 534 > b.webkitversion, E = 0;\n b.ios && 0 == b.simulator ? (Nb = 0, 5 <= b.iosversion && 1 != Yc && (Nb = 1, E = b._cubeOverlap = 4)) : b.android ? (Nb = 2, b._cubeOverlap = 0, E = 4, b.chrome ? (Nb = 1, Lc = 0, b._cubeOverlap = 4) : b.firefox && (E = 0)) : (b.windows || b.mac) && d ? (be = 1, Lc = Nb = 0, b._cubeOverlap = 4) : (Nb = 1, Lc = 0, E = 2, b.desktop && b.safari && (E = 8), b.chrome && (22 <= b.chromeversion && 25 >= b.chromeversion ? (b._cubeOverlap = 64, E = 16) : b._cubeOverlap = 1), b.ie && (E = 8));\n b._tileOverlap = E;\n qf();\n if (!V.build(a))return !1;\n ia.layer = V.controllayer;\n ia.panoControl = Pa;\n ia.getMousePos = V.getMousePos;\n ja.htmltarget = V.htmltarget;\n ja.viewerlayer = V.viewerlayer;\n la(1, _[128] + m.version + _[426] + m.build + (m.debugmode ? _[476] : \")\"));\n d = !(b.android && b.firefox && 22 > b.firefoxversion);\n a.html5 && (E = F(a.html5), 0 <= E.indexOf(_[30]) ? d = !0 : 0 <= E.indexOf(\"css3d\") && (d = !1));\n b.webgl && d ? Oa.setup(2) : Oa.setup(1);\n la(1, b.infoString + Oa.infoString);\n a && a.basepath && \"\" != a.basepath && (ra.swfpath = a.basepath);\n V.onResize(null);\n Pa.registerControls(V.controllayer);\n Xd.start(xf);\n if (!b.css3d && !b.webgl && 0 > F(a.html5).indexOf(_[488]))Ea(_[156]); else {\n var f, g, n = [], d = !0, E = 0, k = [], e = _[150].split(\" \"), w = _[151].split(\" \"), x = null, v = null, r = Xc(100), y = F(_[160]).split(\";\"), l, u;\n if (null != mb && \"\" != mb) {\n var h = ra.b64u8(mb), c = h.split(\";\");\n if (l = c[0] == y[0])if (h = F(h), 0 <= h.indexOf(y[6]) || 0 <= h.indexOf(y[7]) || 0 <= h.indexOf(y[8]))l = !1;\n var h = mb = null, h = c.length, h = h - 2, K = c[h], D = 0;\n 0 == K.indexOf(\"ck=\") ? K = K.slice(3) : l = !1;\n if (l)for (l = 0; l < h; l++) {\n var z = c[l], q = z.length;\n for (u = 0; u < q; u++)D += z.charCodeAt(u) & 255;\n if (!(4 > q) && (u = z.slice(3), \"\" != u))switch (_[177].indexOf(z.slice(0, 3)) / 3 | 0) {\n case 1:\n Ya = parseInt(u);\n d = 0 == (Ya & 1);\n break;\n case 2:\n f = u;\n n.push(y[1] + \"=\" + u);\n break;\n case 3:\n g = u;\n n.push(y[2] + u);\n break;\n case 4:\n k.push(u);\n n.push(y[3] + \"=\" + u);\n break;\n case 5:\n z = parseInt(u);\n x = new Date;\n x.setFullYear(z >> 16, (z >> 8 & 15) - 1, z & 63);\n break;\n case 6:\n v = u;\n break;\n case 7:\n q = z = u.length;\n if (128 > z)for (; 128 > q;)u += u.charAt(q % z), q++;\n od = u;\n break;\n case 8:\n break;\n case 9:\n Na = u.split(\"|\");\n 4 != Na.length && (Na = null);\n break;\n case 10:\n break;\n default:\n n.push(z)\n }\n }\n D != parseInt(K) && (E = 1);\n l = aa.location;\n l = F(l.search || l.hash);\n if (0 < l.indexOf(_[90])) {\n Ea(n.join(\", \"), F(_[90]).toUpperCase());\n return\n }\n 0 < l.indexOf(_[248]) && (null == a.vars && (a.vars = {}), a.vars.consolelog = !0, Ya = Ya & 1 | 14);\n c = null\n }\n vc = n = F(aa[y[3]]);\n try {\n throw Error(\"path\");\n } catch (J) {\n l = \"\" + J.stack, c = l.indexOf(\"://\"), 0 < c && (c += 3, h = l.indexOf(\"/\", c), l = l.slice(c, h), h = l.indexOf(\":\"), 0 < h && (l = l.slice(0, h)), vc = l)\n }\n 0 == n.indexOf(_[524]) && (n = n.slice(4));\n y = \"\" == n || _[382] == n || _[381] == n || 0 == n.indexOf(y[4]);\n b.browser.domain = y ? null : n;\n if (0 == (Ya & 2) && y)E = 3; else if (!y) {\n l = n.indexOf(\".\") + 1;\n 0 > n.indexOf(\".\", l) && (l = 0);\n y = n;\n n = n.slice(l);\n 0 == n.indexOf(_[479]) && _[109] != n && (E = 2);\n for (l = 0; l < e.length; l++)if (e[l] == n) {\n E = 2;\n break\n }\n if (0 == E && 0 < k.length)for (E = 2, l = 0; l < k.length; l++)if (n == k[l] || gd(k[l], y)) {\n E = 0;\n break\n }\n }\n if (f || g)for (g = (\".\" + f + \".\" + g).toLowerCase(), l = 0; l < w.length; l++)0 <= g.indexOf(w[l]) && (E = 1);\n if (null != x && new Date > x)Ea(_[250]), null != v && setTimeout(function () {\n L.location = v\n }, 500); else if (0 < E)Ea(_[97] + [\"\", _[251], _[222]][E - 1]); else {\n Na && (Ya &= -129, la(1, Na[0]));\n 0 == d && (f ? la(1, _[253] + f) : d = !0);\n (d || 0 == (Ya & 1)) && V.log(r);\n f = null;\n a.xml && (f = a.xml);\n a.vars && (a.vars.xml && (f = a.vars.xml), f || (f = a.vars.pano));\n 0 == (Ya & 4) && (a.vars = null);\n Ya & 16 && (m[rc[0]] = m[rc[1]] = !1);\n g = V.viewerlayer;\n Ya & 8 ? (g.get = gc(U), g.set = gc(I), g.call = hd) : (g.set = function () {\n la(2, _[180])\n }, g.get = Na ? gc(U) : g.set, g.call = gc(da.SAcall));\n g.screentosphere = p.screentosphere;\n g.spheretoscreen = p.spheretoscreen;\n g.unload = ve;\n a.initvars && Wd(a.initvars);\n da.loadpano(f, a.vars);\n if (a.onready)a.onready(g);\n return !0\n }\n }\n }\n }\n\n var _ = function () {\n // var F = mb;\n // mb = null;\n // var Ha = F.length - 3, pa, ga, sa, ha = \"\", va = \"\", Aa = 1, R = 0, ba = [], Ja = [1, 48, 55, 53, 38, 51, 52, 3];\n // sa = F.charCodeAt(4);\n // for (pa = 5; pa < Ha; pa++)ga = F.charCodeAt(pa), 92 <= ga && ga--, 34 <= ga && ga--, ga -= 32, ga = (ga + 3 * pa + 59 + Ja[pa & 7] + sa) % 93, sa = (23 * sa + ga) % 32749, ga += 32, 124 == ga ? 0 == Aa ? R ^= 1 : 1 == R ? R = 0 : (ba.push(ha), ha = \"\", Aa = 0) : (ga = String.fromCharCode(ga), 0 == R ? ha += ga : va += ga, Aa++);\n // 0 < Aa && ba.push(ha);\n // ga = 0;\n // for (Ha += 3; pa < Ha;)ga = ga << 5 | F.charCodeAt(pa++) - 53;\n // ga != sa && (ba = null);\n // mb = va;\n\n\n //sohow\n // var ba_json = window.JSON.stringify(ba);\n var ba = new Array(\"absolute\",\"hotspot\",\"bottom\",\"right\",\"mouseup\",\"default\",\"hidden\",\"mousedown\",\"pointerover\",\"pointerout\",\"mousemove\",\"function\",\"visible\",\"string\",\"action\",\"container\",\"mouseover\",\"mouseout\",\"pointer\",\"mouse\",\"translateZ(+2000000000000px)\",\" - xml parsing failed!\",\"parsererror\",\"px solid \",\"cylinder\",\"text/xml\",\"#000000\",\"moveto\",\"height\",\"plugin\",\"webgl\",\"false\",\" - wrong encryption!\",\"Invalid expression\",\"MSPointerOver\",\"MSPointerOut\",\"transparent\",\"contextmenu\",\"sans-serif\",\"cubestrip\",\"#FFFFFF\",\"iphone\",\"sphere\",\"linear\",\"mobile\",\"normal\",\"krpano\",\"color\",\"error\",\"width\",\"align\",\"-webkit-text-size-adjust\",\"visibilitychange\",\"translate3D(\",\"image.level[\",\"Courier New\",\"easeoutquad\",\"<container>\",\"loading of \",\"preserve-3d\",\"translate(\",\"].content\",\" failed!\",\"onresize\",\"pagehide\",\"position\",\"lefttop\",\"boolean\",\"</div>\",\"LOOKTO\",\"webkit\",\"border\",\"scene[\",\"blend\",\"data:\",\"image\",\"-webkit-tap-highlight-color\",\"http://www.w3.org/2000/svg\",\"] skipped flash file: \",\"webkitvisibilitychange\",\" - loading failed! (\",\"mozvisibilitychange\",\"msvisibilitychange\",\"experimental-webgl\",\"orientationchange\",\"] loading error: \",\"deg) translateZ(\",\"unknown action: \",\"uniform vec3 cc;\",\"actions overflow\",\"showlicenseinfo\",\"MSGestureChange\",\"text/javascript\",\"MSInertiaStart\",\"get:calc:data:\",\"DOMMouseScroll\",\"MSGestureStart\",\"LICENSE ERROR\",\"opacity 0.25s\",\"MSGestureEnd\",\"onmousewheel\",\"bordercolor\",\"scene.count\",\"onmousedown\",\"borderalpha\",\"borderwidth\",\") rotateZ(\",\"background\",\"mousewheel\",\"krpano.com\",\"fullscreen\",\"undefined\",\"webkit-3d\",\"onmouseup\",\"marginTop\",\"touchmove\",\"moz-webgl\",\"</krpano>\",\"touchend\",\"relative\",\"fontSize\",\"polyline\",\"-10000px\",\"offrange\",\"<krpano>\",\"rotateY(\",\"keydown\",\"plugin[\",\"krpano \",\"include\",\"onkeyup\",\"onclick\",\"padding\",\"scroll\",\"layer[\",\"DEBUG:\",\"center\",\"resize\",\"tablet\",\"&nbsp;\",\"ERROR:\",\"scale(\",\"opaque\",\"Origin\",\"object\",\" edge/\",\"iPhone\",\"Chrome\",\"cursor\",\"parent\",\"360etours.net clickcwb.com.br afu360.com realtourvision.com webvr.net webvr.cn round.me aero-scan.ru shambalaland.com littlstar.com d3uo9a4kiyu5sk.cloudfront.net youvisit.com vrvideo.com\",\"panofree freeuser figgler teameat eatusebuy no-mail chen44 .lestra. gfreidinger an37almk\",\"gl_FragColor=vec4(texture2D(sm,(tx-ct)/mix(1.0,zf,1.0-aa)+ct).rgb,aa);\",\"gl_FragColor=vec4(mix(texture2D(sm,tx).rgb,cc,2.0*(1.0-aa)),aa*2.0);\",\" - invalid name! Names need to begin with an alphabetic character!\",\"if(\\'%5\\'!=\\'NEXTLOOP\\',%1);if(%2,%4;%3;for(%1,%2,%3,%4,NEXTLOOP););\",\"A Browser with CSS 3D Transforms or WebGL support is required!\",\"abs acos asin atan ceil cos exp floor log round sin sqrt tan\",\"gl_FragColor=vec4(texture2D(sm,tx).rgb+(1.0-aa)*cc,aa);\",\"uniform sampler2D sm;varying vec2 tx;uniform float aa;\",\"kr;user;mail=;domain;file:;id;chen4490;teameat;figgler\",\"<div style=\\'padding-top:2.5px; padding-bottom:5px;\\' \",\"WebGL-Error shaderProgram: could not link shaders!\",\"uniform vec2 ap;uniform float zf;uniform float bl;\",\"if(%1,%2;delayedcall(0,asyncloop(%1,%2,%3));,%3);\",\"there is already a html element with this id: \",\"<div style=\\'padding:8px; text-align:center;\\'>\",\"-webkit-radial-gradient(circle, white, black)\",\"gl_FragColor=vec4(texture2D(sm,tx).rgb,aa);\",\"<i><b>krpano</b><br/>demo&nbsp;version</i>\",\" - invalid or unsupported xml encryption!\",\"No device compatible image available...\",\"there is no html element with this id: \",\"javascript:document.getElementById(\\'\",\"left front right back up down cube\",\"uniform vec3 fp;uniform float bl;\",\"uniform vec2 ct;uniform float zf;\",\"xx=lz=rg=ma=dm=ed=eu=ek=rd=pt=id=\",\"color:#FF0000;font-weight:bold;\",\"1px solid rgba(255,255,255,0.5)\",\"Javascript Interface disabled!\",\" - loading or parsing failed!\",\"translateZ(+1000000000000px) \",\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\",\"loading or parsing failed!\",\"WebGL-Error vertexShader: \",\"WebGL-Error pixelShader: \",\"precision mediump float;\",\"set(_busyonloaded,false)\",\"krpano embedding error: \",\" (not a cubestrip image)\",\"webkitRequestFullScreen\",\"if(%1,%2;loop(%1,%2););\",\"architecturalonlymiddle\",\"webkitRequestFullscreen\",\"(-webkit-transform-3d)\",\"preservedrawingbuffer\",\"px solid transparent;\",\" - style not found: \",\"translateZ(+1000px) \",\"<span style=\\'color:#\",\"mozRequestFullScreen\",\"px;overflow:hidden;\",\"0px 0px 8px #FFFFFF\",\"addlayer/addplugin(\",\"white-space:nowrap;\",\"<div style=\\'margin:\",\"px,0px) translateY(\",\"xml parsing failed!\",\"msRequestFullscreen\",\"-ms-overflow-style\",\"preview.striporder\",\"-webkit-box-shadow\",\"position:absolute;\",\"</td></tr></table>\",\"distortionfovlink\",\"onpreviewcomplete\",\"WebkitPerspective\",\"Microsoft.XMLHTTP\",\"<krpano></krpano>\",\"http://krpano.com\",\"onenterfullscreen\",\" - NO LOCAL USAGE\",\"requestFullscreen\",\"Internet Explorer\",\"onexitfullscreen\",\"rgba(0,0,0,0.01)\",\"access permitted\",\"fullscreenchange\",\"FullscreenChange\",\"webkitUserSelect\",\"framebufferscale\",\"px) perspective(\",\"__defineGetter__\",\"__defineSetter__\",\"backgroundalpha\",\"MSPointerCancel\",\"backgroundcolor\",\"Android Browser\",\"1px solid white\",\" <small>(build \",\"textshadowrange\",\"textshadowangle\",\"textshadowcolor\",\"textshadowalpha\",\"deg) translate(\",\"Exit Fullscreen\",\"ignoring image \",\"consolelog=true\",\"-moz-box-shadow\",\"LICENSE EXPIRED\",\" - WRONG DOMAIN\",\"WebkitBoxShadow\",\"Registered to: \",\"krpanoSWFObject\",\"backgroundColor\",\"backgroundSize\",\"color:#AA7700;\",\"pointer-events\",\"color:#007700;\",\"Microsoft Edge\",\")</small><br/>\",\"color:#333333;\",\"translateZ(0) \",\"visiblePainted\",\"onloadcomplete\",\"return false;\",\"pointerEvents\",\"stereographic\",\"deg) rotateX(\",\"#FFF 0px 0px \",\"deg) rotateZ(\",\"easeInOutSine\",\"0123456789+/=\",\" translate3D(\",\"mobile safari\",\"gesturechange\",\"scalechildren\",\"onviewchanged\",\"mozUserSelect\",\"pointercancel\",\"textfield.swf\",\" not allowed!\",\"MSPointerMove\",\"deg) rotateY(\",\"HTML5/Desktop\",\"paddingBottom\",\"onxmlcomplete\",\"WebGL-Error: \",\"windows phone\",\"MSPointerDown\",\" FATAL ERROR:\",\"MozBoxShadow\",\") translate(\",\"preview.type\",\"px) rotateX(\",\"paddingRight\",\"Amazon Silk \",\"&nbsp;</div>\",\"onviewchange\",\"gesturestart\",\"onremovepano\",\"maskchildren\",\"perspective(\",\"vlookatrange\",\"hlookatrange\",\"keephotspots\",\"actioncaller\",\"height:100%;\",\"</encrypted>\",\"removescenes\",\"image.tablet\",\"stroke-width\",\"image.mobile\",\"oninterrupt\",\"shadowalpha\",\"shadowcolor\",\"easeoutsine\",\"shadowangle\",\"easeincubic\",\"shadowrange\",\"addhotspot(\",\"preview.url\",\"keepplugins\",\"easeInCubic\",\"translateZ(\",\"stageheight\",\"touchcancel\",\"MSPointerUp\",\"paddingLeft\",\"pointermove\",\"pointerdown\",\"px) rotate(\",\"<encrypted>\",\"versioninfo\",\"perspective\",\"BlackBerry \",\"bgroundedge\",\"whiteSpace\",\"onovercrop\",\"px) scale(\",\"ondowncrop\",\"box-shadow\",\"touchstart\",\"rim tablet\",\"blackberry\",\"paddingTop\",\"fontFamily\",\"2015-08-04\",\"%FIRSTXML%\",\"1px solid \",\"stagewidth\",\"stagescale\",\"handcursor\",\"ignorekeep\",\"gestureend\",\" Simulator\",\"autoheight\",\"keepscenes\",\"LIGHTBLEND\",\"keepmoving\",\"CURRENTXML\",\"showerrors\",\"COLORBLEND\",\"distortion\",\"SLIDEBLEND\",\"textshadow\",\"FATALERROR\",\"yesontrue1\",\"onnewscene\",\"selectable\",\"Fullscreen\",\"javascript\",\"px #FFFFFF\",\"encrypted\",\"</center>\",\"\\').call(\\'\",\"autowidth\",\" (Chrome)\",\"fullrange\",\"roundedge\",\"127.0.0.1\",\"localhost\",\"framerate\",\"onkeydown\",\"Viewer...\",\"bgcapture\",\"transform\",\"boxShadow\",\"__swfpath\",\"pointerup\",\"nopreview\",\"useragent\",\"<![CDATA[\",\"].onstart\",\"textAlign\",\"fillalpha\",\"timertick\",\"fillcolor\",\"OPENBLEND\",\"keepimage\",\"distorted\",\"asyncloop\",\"autoalpha\",\"ZOOMBLEND\",\"onnewpano\",\"bgborder\",\" style=\\'\",\"textblur\",\"asyncfor\",\"wordwrap\",\"pre-line\",\"keepbase\",\"bgshadow\",\"Panorama\",\"jsborder\",\"FFF00;\\'>\",\"</span> \",\"keepview\",\"00000000\",\"WARNING:\",\"overflow\",\"HTMLPATH\",\" - WebGL\",\"__fte1__\",\"__fte2__\",\" (build \",\"distance\",\"Calling \",\"scale3D(\",\"panotour\",\"SAMSUNG \",\"1.19-pr3\",\"<center>\",\"Firefox \",\"videourl\",\"iemobile\",\"FIRSTXML\",\"jsplugin\",\"ap,zf,bl\",\"autosize\",\"0px 0px \",\"<=>=!===\",\"</small>\",\"polygon\",\"Mobile \",\"vcenter\",\"Tablet \",\"webkit/\",\"Chrome \",\"border:\",\"Version\",\"action(\",\"action[\",\"Android\",\"].value\",\"bgcolor\",\" - iOS:\",\"WARNING\",\"keepall\",\"Firefox\",\"50% 50%\",\"preview\",\"bgalpha\",\"android\",\"desktop\",\"preinit\",\"onstart\",\"bglayer\",\"trident\",\"current\",\"display\",\"enabled\",\"BASEDIR\",\"fovtype\",\"SWFPATH\",\" debug)\",\"pannini\",\"plugin:\",\"krpano.\",\"BGLAYER\",\"<small>\",\"opacity\",\"devices\",\"lighter\",\"drag2d\",\"canvas\",\"image.\",\"always\",\"logkey\",\"blend(\",\"stereo\",\"onidle\",\"stagey\",\"Webkit\",\"stagex\",\"smooth\",\"&quot;\",\"origin\",\"&apos;\",\"random\",\"flying\",\"effect\",\"zorder\",\"_blank\",\"width:\",\"points\",\"delete\",\"switch\",\"event:\",\"stroke\",\" Build\",\"alturl\",\"Tablet\",\"Gecko/\",\"style[\",\"rotate\",\"Opera \",\"Mobile\",\"lfrbud\",\"Safari\",\"CriOS/\",\"shadow\",\"number\",\"www.\",\"\");\n mb = 'a3I7aWQ9NDk5ODEzMDAzLzIwMTUtMTEtMDk7bHo9MTU5O3JnPeWkqea0peaegeedv+i9r+S7tuaKgOacr+W8gOWPkeaciemZkOWFrOWPuDttYT10ZXJhQGdlZXJlaS5jb207ZWs9Mm5vM3JuM2xlM2x0M3RwMnNyM2hlM2xwMnNlMmlpM2xnM2tpMmZwMmlzZGJZYlhQWVlZYllaTFhhYWRNTk5OTE1MTE1kTExMTUtMTEtMTmQyc3AyZ3BIM3BzZDJoazJzcDJzZjJzbDJtaDJoczNsaDJpaDNnbzNrbTJscE5NS047cmQ9SlBLR1E7Y2s9MTc2MTI7';\n\n return ba\n }();\n\n _ && _[111] != typeof krpanoJS && (new hd).init(gd)\n }", "function Action()\n{\n\tweb.url(\n\t\t{\n\t\t\t\t\t\tname : 'www.elcorteingles.es', \n\t\t\turl : 'http://www.elcorteingles.es/', \n\t\t\ttargetFrame : '', \n\t\t\tresource : 0, \n\t\t\trecContentType : 'text/html', \n\t\t\treferer : '', \n\t\t\tsnapshot : 't1.inf', \n\t\t\tmode : 'HTML', \n\t\t\textraRes : [\n\t\t\t\t{url : '/sgfm/SGFM/assets/stylesheets/fonts/opensans-regular-webfont.woff', referer : 'http://www.elcorteingles.es/sgfm/SGFM/assets/stylesheets/crs.css'},\n\t\t\t\t{url : '/sgfm/SGFM/assets/stylesheets/fonts/opensans-bold-webfont.woff', referer : 'http://www.elcorteingles.es/sgfm/SGFM/assets/stylesheets/crs.css'},\n\t\t\t\t{url : '/sgfm/SGFM/assets/stylesheets/fonts/moonshine-font.woff', referer : 'http://www.elcorteingles.es/sgfm/SGFM/assets/stylesheets/crs.css'},\n\t\t\t\t{url : '/sgfm/SGFM/assets/javascripts/library/external/dust-helpers.min.js'},\n\t\t\t\t{url : '/sgfm/SGFM/assets/stylesheets/fonts/lato-regular-webfont.woff', referer : 'http://www.elcorteingles.es/sgfm/SGFM/assets/stylesheets/crs.css'},\n\t\t\t\t{url : '/sgfm/SGFM/assets/javascripts/library/external/dust-core.min.js'},\n\t\t\t\t{url : 'http://www.googletagmanager.com/gtm.js?id=GTM-TMQVMD'},\n\t\t\t\t{url : '/sgfm/SGFM/assets/javascripts/compiled/templates.js'},\n\t\t\t\t{url : '/sgfm/SGFM/assets/javascripts/library/external/form2js.min.js'},\n\t\t\t\t{url : '/sgfm/SGFM/assets/stylesheets/images/confianza-online-icon.svg', referer : 'http://www.elcorteingles.es/sgfm/SGFM/assets/stylesheets/crs.css'}\n\t\t\t]\n\t\t}\n\t);\n\n\treturn 0;\n}", "function Pj(a,b){this.Wd=u(\"div\",\"blocklyToolboxDiv\");this.Wd.setAttribute(\"dir\",q?\"RTL\":\"LTR\");b.appendChild(this.Wd);this.Sa=new Te;a.appendChild(this.Sa.Aa());C(this.Wd,\"mousedown\",this,function(a){ae(a)||a.target==this.Wd?ee(!1):ee(!0)})}", "function ourBookmarkletCode($)\n {\n // -----------------------------------------------------------------------------------------\n // Custom code goes from here ......\n\n var stylesheetCount = document.styleSheets.length;\n\n // Start with reporting the number of stylesheets.\n var logDiv = $('<div></div>').css({\n position: 'absolute',\n top: '1em',\n left: '1em',\n padding: '1em',\n 'background-color': '#ace',\n 'z-index': 100000,\n 'font-family': 'monospace',\n 'font-size': '10pt'\n });\n\n logDiv.append($('<div></div>').text('Found ' + stylesheetCount + (stylesheetCount == 1 ? ' stylesheet' : ' stylesheets')));\n $('body').append(logDiv);\n\n // List the stylesheets.\n var theList = $('<ul></ul>').css({\n 'list-style': 'disc',\n 'padding-left': '2em'\n });\n for (var s = 0; s < stylesheetCount; s++) {\n var stylesheet = document.styleSheets[s];\n if (stylesheet.href) {\n theList.append($('<li></li>').append($('<a></a>').attr('href', stylesheet.href).text(stylesheet.href)));\n }\n else {\n theList.append($('<li></li>').text('Internal stylesheet with ' + stylesheet.cssRules.length + ' rules'));\n }\n }\n logDiv.append(theList);\n\n // ... to here.\n // -----------------------------------------------------------------------------------------\n }", "function go(path){\n var str=\"\";\n var ppp_length=path.length;\n var now_path = path.substr(5,4096);\n if(ppp_length<=8)\n str='/';\n window.document.getElementById('now_path').innerHTML = '<b>'+showText(191)+'&nbsp;'+str+now_path+'</b>';\n getContent('DirList','/cgi-bin/firmwareDir.cgi?'+path);\n parent.calcHeight('parent');\n hiddenBackgroundImage('wait_message');\n}", "function extCall(){\n\t// external_uri\n\t//var nullElement = new Element();\n\t//$('ext').load(external_uri);\n\t//var myHTMLRequest = new Request.HTML().get(external_uri);\n}", "function lt(e,t,a,r,f,o,i){if(t){var s,c=e.splitSpaces?dt(t,e.trailingSpace):t,u=e.cm.state.specialChars,l=!1;if(u.test(t)){s=document.createDocumentFragment();for(var d=0;;){u.lastIndex=d;var _=u.exec(t),p=_?_.index-d:t.length-d;if(p){var g=document.createTextNode(c.slice(d,d+p));vo&&wo<9?s.appendChild(n(\"span\",[g])):s.appendChild(g),e.map.push(e.pos,e.pos+p,g),e.col+=p,e.pos+=p}if(!_)break;d+=p+1;var h=void 0;if(\"\\t\"==_[0]){var b=e.cm.options.tabSize,y=b-e.col%b;h=s.appendChild(n(\"span\",m(y),\"cm-tab\")),h.setAttribute(\"role\",\"presentation\"),h.setAttribute(\"cm-text\",\"\\t\"),e.col+=y}else\"\\r\"==_[0]||\"\\n\"==_[0]?(h=s.appendChild(n(\"span\",\"\\r\"==_[0]?\"鈵�\":\"鈵�\",\"cm-invalidchar\")),h.setAttribute(\"cm-text\",_[0]),e.col+=1):(h=e.cm.options.specialCharPlaceholder(_[0]),h.setAttribute(\"cm-text\",_[0]),vo&&wo<9?s.appendChild(n(\"span\",[h])):s.appendChild(h),e.col+=1);e.map.push(e.pos,e.pos+1,h),e.pos++}}else e.col+=t.length,s=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,s),vo&&wo<9&&(l=!0),e.pos+=t.length;if(e.trailingSpace=32==c.charCodeAt(t.length-1),a||r||f||l||i){var v=a||\"\";r&&(v+=r),f&&(v+=f);var w=n(\"span\",[s],v,i);return o&&(w.title=o),e.content.appendChild(w)}e.content.appendChild(s)}}", "function nsis(hljs) {\n var CONSTANTS = {\n className: 'variable',\n begin: /\\$(ADMINTOOLS|APPDATA|CDBURN_AREA|CMDLINE|COMMONFILES32|COMMONFILES64|COMMONFILES|COOKIES|DESKTOP|DOCUMENTS|EXEDIR|EXEFILE|EXEPATH|FAVORITES|FONTS|HISTORY|HWNDPARENT|INSTDIR|INTERNET_CACHE|LANGUAGE|LOCALAPPDATA|MUSIC|NETHOOD|OUTDIR|PICTURES|PLUGINSDIR|PRINTHOOD|PROFILE|PROGRAMFILES32|PROGRAMFILES64|PROGRAMFILES|QUICKLAUNCH|RECENT|RESOURCES_LOCALIZED|RESOURCES|SENDTO|SMPROGRAMS|SMSTARTUP|STARTMENU|SYSDIR|TEMP|TEMPLATES|VIDEOS|WINDIR)/\n };\n\n var DEFINES = {\n // ${defines}\n className: 'variable',\n begin: /\\$+{[\\w\\.:-]+}/\n };\n\n var VARIABLES = {\n // $variables\n className: 'variable',\n begin: /\\$+\\w+/,\n illegal: /\\(\\){}/\n };\n\n var LANGUAGES = {\n // $(language_strings)\n className: 'variable',\n begin: /\\$+\\([\\w\\^\\.:-]+\\)/\n };\n\n var PARAMETERS = {\n // command parameters\n className: 'params',\n begin: '(ARCHIVE|FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_NORMAL|FILE_ATTRIBUTE_OFFLINE|FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_SYSTEM|FILE_ATTRIBUTE_TEMPORARY|HKCR|HKCU|HKDD|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_DYN_DATA|HKEY_LOCAL_MACHINE|HKEY_PERFORMANCE_DATA|HKEY_USERS|HKLM|HKPD|HKU|IDABORT|IDCANCEL|IDIGNORE|IDNO|IDOK|IDRETRY|IDYES|MB_ABORTRETRYIGNORE|MB_DEFBUTTON1|MB_DEFBUTTON2|MB_DEFBUTTON3|MB_DEFBUTTON4|MB_ICONEXCLAMATION|MB_ICONINFORMATION|MB_ICONQUESTION|MB_ICONSTOP|MB_OK|MB_OKCANCEL|MB_RETRYCANCEL|MB_RIGHT|MB_RTLREADING|MB_SETFOREGROUND|MB_TOPMOST|MB_USERICON|MB_YESNO|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SYSTEM|TEMPORARY)'\n };\n\n var COMPILER = {\n // !compiler_flags\n className: 'keyword',\n begin: /\\!(addincludedir|addplugindir|appendfile|cd|define|delfile|echo|else|endif|error|execute|finalize|getdllversion|gettlbversion|if|ifdef|ifmacrodef|ifmacrondef|ifndef|include|insertmacro|macro|macroend|makensis|packhdr|searchparse|searchreplace|system|tempfile|undef|verbose|warning)/\n };\n\n var METACHARS = {\n // $\\n, $\\r, $\\t, $$\n className: 'meta',\n begin: /\\$(\\\\[nrt]|\\$)/\n };\n\n var PLUGINS = {\n // plug::ins\n className: 'class',\n begin: /\\w+\\:\\:\\w+/\n };\n\n var STRING = {\n className: 'string',\n variants: [\n {\n begin: '\"', end: '\"'\n },\n {\n begin: '\\'', end: '\\''\n },\n {\n begin: '`', end: '`'\n }\n ],\n illegal: /\\n/,\n contains: [\n METACHARS,\n CONSTANTS,\n DEFINES,\n VARIABLES,\n LANGUAGES\n ]\n };\n\n return {\n name: 'NSIS',\n case_insensitive: false,\n keywords: {\n keyword:\n 'Abort AddBrandingImage AddSize AllowRootDirInstall AllowSkipFiles AutoCloseWindow BGFont BGGradient BrandingText BringToFront Call CallInstDLL Caption ChangeUI CheckBitmap ClearErrors CompletedText ComponentText CopyFiles CRCCheck CreateDirectory CreateFont CreateShortCut Delete DeleteINISec DeleteINIStr DeleteRegKey DeleteRegValue DetailPrint DetailsButtonText DirText DirVar DirVerify EnableWindow EnumRegKey EnumRegValue Exch Exec ExecShell ExecShellWait ExecWait ExpandEnvStrings File FileBufSize FileClose FileErrorText FileOpen FileRead FileReadByte FileReadUTF16LE FileReadWord FileWriteUTF16LE FileSeek FileWrite FileWriteByte FileWriteWord FindClose FindFirst FindNext FindWindow FlushINI GetCurInstType GetCurrentAddress GetDlgItem GetDLLVersion GetDLLVersionLocal GetErrorLevel GetFileTime GetFileTimeLocal GetFullPathName GetFunctionAddress GetInstDirError GetKnownFolderPath GetLabelAddress GetTempFileName Goto HideWindow Icon IfAbort IfErrors IfFileExists IfRebootFlag IfRtlLanguage IfShellVarContextAll IfSilent InitPluginsDir InstallButtonText InstallColors InstallDir InstallDirRegKey InstProgressFlags InstType InstTypeGetText InstTypeSetText Int64Cmp Int64CmpU Int64Fmt IntCmp IntCmpU IntFmt IntOp IntPtrCmp IntPtrCmpU IntPtrOp IsWindow LangString LicenseBkColor LicenseData LicenseForceSelection LicenseLangString LicenseText LoadAndSetImage LoadLanguageFile LockWindow LogSet LogText ManifestDPIAware ManifestLongPathAware ManifestMaxVersionTested ManifestSupportedOS MessageBox MiscButtonText Name Nop OutFile Page PageCallbacks PEAddResource PEDllCharacteristics PERemoveResource PESubsysVer Pop Push Quit ReadEnvStr ReadINIStr ReadRegDWORD ReadRegStr Reboot RegDLL Rename RequestExecutionLevel ReserveFile Return RMDir SearchPath SectionGetFlags SectionGetInstTypes SectionGetSize SectionGetText SectionIn SectionSetFlags SectionSetInstTypes SectionSetSize SectionSetText SendMessage SetAutoClose SetBrandingImage SetCompress SetCompressor SetCompressorDictSize SetCtlColors SetCurInstType SetDatablockOptimize SetDateSave SetDetailsPrint SetDetailsView SetErrorLevel SetErrors SetFileAttributes SetFont SetOutPath SetOverwrite SetRebootFlag SetRegView SetShellVarContext SetSilent ShowInstDetails ShowUninstDetails ShowWindow SilentInstall SilentUnInstall Sleep SpaceTexts StrCmp StrCmpS StrCpy StrLen SubCaption Unicode UninstallButtonText UninstallCaption UninstallIcon UninstallSubCaption UninstallText UninstPage UnRegDLL Var VIAddVersionKey VIFileVersion VIProductVersion WindowIcon WriteINIStr WriteRegBin WriteRegDWORD WriteRegExpandStr WriteRegMultiStr WriteRegNone WriteRegStr WriteUninstaller XPStyle',\n literal:\n 'admin all auto both bottom bzip2 colored components current custom directory false force hide highest ifdiff ifnewer instfiles lastused leave left license listonly lzma nevershow none normal notset off on open print right show silent silentlog smooth textonly top true try un.components un.custom un.directory un.instfiles un.license uninstConfirm user Win10 Win7 Win8 WinVista zlib'\n },\n contains: [\n hljs.HASH_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n hljs.COMMENT(\n ';',\n '$',\n {\n relevance: 0\n }\n ),\n {\n className: 'function',\n beginKeywords: 'Function PageEx Section SectionGroup', end: '$'\n },\n STRING,\n COMPILER,\n DEFINES,\n VARIABLES,\n LANGUAGES,\n PARAMETERS,\n PLUGINS,\n hljs.NUMBER_MODE\n ]\n };\n}", "function nsis(hljs) {\n var CONSTANTS = {\n className: 'variable',\n begin: /\\$(ADMINTOOLS|APPDATA|CDBURN_AREA|CMDLINE|COMMONFILES32|COMMONFILES64|COMMONFILES|COOKIES|DESKTOP|DOCUMENTS|EXEDIR|EXEFILE|EXEPATH|FAVORITES|FONTS|HISTORY|HWNDPARENT|INSTDIR|INTERNET_CACHE|LANGUAGE|LOCALAPPDATA|MUSIC|NETHOOD|OUTDIR|PICTURES|PLUGINSDIR|PRINTHOOD|PROFILE|PROGRAMFILES32|PROGRAMFILES64|PROGRAMFILES|QUICKLAUNCH|RECENT|RESOURCES_LOCALIZED|RESOURCES|SENDTO|SMPROGRAMS|SMSTARTUP|STARTMENU|SYSDIR|TEMP|TEMPLATES|VIDEOS|WINDIR)/\n };\n\n var DEFINES = {\n // ${defines}\n className: 'variable',\n begin: /\\$+{[\\w\\.:-]+}/\n };\n\n var VARIABLES = {\n // $variables\n className: 'variable',\n begin: /\\$+\\w+/,\n illegal: /\\(\\){}/\n };\n\n var LANGUAGES = {\n // $(language_strings)\n className: 'variable',\n begin: /\\$+\\([\\w\\^\\.:-]+\\)/\n };\n\n var PARAMETERS = {\n // command parameters\n className: 'params',\n begin: '(ARCHIVE|FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_NORMAL|FILE_ATTRIBUTE_OFFLINE|FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_SYSTEM|FILE_ATTRIBUTE_TEMPORARY|HKCR|HKCU|HKDD|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_DYN_DATA|HKEY_LOCAL_MACHINE|HKEY_PERFORMANCE_DATA|HKEY_USERS|HKLM|HKPD|HKU|IDABORT|IDCANCEL|IDIGNORE|IDNO|IDOK|IDRETRY|IDYES|MB_ABORTRETRYIGNORE|MB_DEFBUTTON1|MB_DEFBUTTON2|MB_DEFBUTTON3|MB_DEFBUTTON4|MB_ICONEXCLAMATION|MB_ICONINFORMATION|MB_ICONQUESTION|MB_ICONSTOP|MB_OK|MB_OKCANCEL|MB_RETRYCANCEL|MB_RIGHT|MB_RTLREADING|MB_SETFOREGROUND|MB_TOPMOST|MB_USERICON|MB_YESNO|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SYSTEM|TEMPORARY)'\n };\n\n var COMPILER = {\n // !compiler_flags\n className: 'keyword',\n begin: /\\!(addincludedir|addplugindir|appendfile|cd|define|delfile|echo|else|endif|error|execute|finalize|getdllversion|gettlbversion|if|ifdef|ifmacrodef|ifmacrondef|ifndef|include|insertmacro|macro|macroend|makensis|packhdr|searchparse|searchreplace|system|tempfile|undef|verbose|warning)/\n };\n\n var METACHARS = {\n // $\\n, $\\r, $\\t, $$\n className: 'meta',\n begin: /\\$(\\\\[nrt]|\\$)/\n };\n\n var PLUGINS = {\n // plug::ins\n className: 'class',\n begin: /\\w+\\:\\:\\w+/\n };\n\n var STRING = {\n className: 'string',\n variants: [\n {\n begin: '\"', end: '\"'\n },\n {\n begin: '\\'', end: '\\''\n },\n {\n begin: '`', end: '`'\n }\n ],\n illegal: /\\n/,\n contains: [\n METACHARS,\n CONSTANTS,\n DEFINES,\n VARIABLES,\n LANGUAGES\n ]\n };\n\n return {\n name: 'NSIS',\n case_insensitive: false,\n keywords: {\n keyword:\n 'Abort AddBrandingImage AddSize AllowRootDirInstall AllowSkipFiles AutoCloseWindow BGFont BGGradient BrandingText BringToFront Call CallInstDLL Caption ChangeUI CheckBitmap ClearErrors CompletedText ComponentText CopyFiles CRCCheck CreateDirectory CreateFont CreateShortCut Delete DeleteINISec DeleteINIStr DeleteRegKey DeleteRegValue DetailPrint DetailsButtonText DirText DirVar DirVerify EnableWindow EnumRegKey EnumRegValue Exch Exec ExecShell ExecShellWait ExecWait ExpandEnvStrings File FileBufSize FileClose FileErrorText FileOpen FileRead FileReadByte FileReadUTF16LE FileReadWord FileSeek FileWrite FileWriteByte FileWriteUTF16LE FileWriteWord FindClose FindFirst FindNext FindWindow FlushINI FunctionEnd GetCurInstType GetCurrentAddress GetDlgItem GetDLLVersion GetDLLVersionLocal GetErrorLevel GetFileTime GetFileTimeLocal GetFullPathName GetFunctionAddress GetInstDirError GetLabelAddress GetTempFileName Goto HideWindow Icon IfAbort IfErrors IfFileExists IfRebootFlag IfSilent InitPluginsDir InstallButtonText InstallColors InstallDir InstallDirRegKey InstProgressFlags InstType InstTypeGetText InstTypeSetText Int64Cmp Int64CmpU Int64Fmt IntCmp IntCmpU IntFmt IntOp IntPtrCmp IntPtrCmpU IntPtrOp IsWindow LangString LicenseBkColor LicenseData LicenseForceSelection LicenseLangString LicenseText LoadLanguageFile LockWindow LogSet LogText ManifestDPIAware ManifestSupportedOS MessageBox MiscButtonText Name Nop OutFile Page PageCallbacks PageExEnd Pop Push Quit ReadEnvStr ReadINIStr ReadRegDWORD ReadRegStr Reboot RegDLL Rename RequestExecutionLevel ReserveFile Return RMDir SearchPath SectionEnd SectionGetFlags SectionGetInstTypes SectionGetSize SectionGetText SectionGroupEnd SectionIn SectionSetFlags SectionSetInstTypes SectionSetSize SectionSetText SendMessage SetAutoClose SetBrandingImage SetCompress SetCompressor SetCompressorDictSize SetCtlColors SetCurInstType SetDatablockOptimize SetDateSave SetDetailsPrint SetDetailsView SetErrorLevel SetErrors SetFileAttributes SetFont SetOutPath SetOverwrite SetRebootFlag SetRegView SetShellVarContext SetSilent ShowInstDetails ShowUninstDetails ShowWindow SilentInstall SilentUnInstall Sleep SpaceTexts StrCmp StrCmpS StrCpy StrLen SubCaption Unicode UninstallButtonText UninstallCaption UninstallIcon UninstallSubCaption UninstallText UninstPage UnRegDLL Var VIAddVersionKey VIFileVersion VIProductVersion WindowIcon WriteINIStr WriteRegBin WriteRegDWORD WriteRegExpandStr WriteRegMultiStr WriteRegNone WriteRegStr WriteUninstaller XPStyle',\n literal:\n 'admin all auto both bottom bzip2 colored components current custom directory false force hide highest ifdiff ifnewer instfiles lastused leave left license listonly lzma nevershow none normal notset off on open print right show silent silentlog smooth textonly top true try un.components un.custom un.directory un.instfiles un.license uninstConfirm user Win10 Win7 Win8 WinVista zlib'\n },\n contains: [\n hljs.HASH_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n hljs.COMMENT(\n ';',\n '$',\n {\n relevance: 0\n }\n ),\n {\n className: 'function',\n beginKeywords: 'Function PageEx Section SectionGroup', end: '$'\n },\n STRING,\n COMPILER,\n DEFINES,\n VARIABLES,\n LANGUAGES,\n PARAMETERS,\n PLUGINS,\n hljs.NUMBER_MODE\n ]\n };\n}", "function testInstantiateTemplate_nameValues() {\r\n var template = ShadowTemplates[\"MainT\"];\r\n var dictionaryContext =\r\n [{\"Main\": {\"id\":\"1234\",\r\n \"caption\":\"<b>Caption</b>\",\r\n \"src\":\"http://images/simple.jpg\"}\r\n }];\r\n var instance = template.instantiateDom(dictionaryContext, '');\r\n document.body.insertBefore(instance, document.body.childNodes[0]);\r\n var anchorElement = document.getElementById(\"anchor\");\r\n assertEquals(\"http://servlet/#id=1234\", anchorElement.href);\r\n assertEquals(\"this is the <b>Caption</b>\", anchorElement.innerHTML);\r\n}", "function h(){if(!h.called){h.called=!0;var e=document.querySelectorAll(\"pre code\");x.forEach.call(e,p)}}", "function generateIframeSrc() {\n return [\n 'https://', host, '/frame/web/v1/auth?tx=', duoSig,\n '&parent=', encodeURIComponent(document.location.href),\n '&v=2.8'\n ].join('');\n }", "function rwc_writeLink(pid,domainName, protocol){\n rwc_server = domainName;\n rwc_protocol = protocol;\n if(rwc_ids==null)\n rwc_ids=new Array();\n rwc_ids[rwc_ids.length]=pid;\ndocument.write(\"<span id='rwc_id_\"+pid.replace(/\\@/g,\":\")+\"'></span>\");\n}", "static private protected public internal function m117() {}", "function pornAd()\n {\n alert('Hey le site xxxvidsxxx est trop bien. Viens dessus stp please');\n }", "function BOT_inspectGlobalVar() {\r\n\tvar e = document.getElementById(\"javascriptoutput\");\r\n\tvar s = \"\";\r\n\tvar v;\r\n\tfor (var i in BOT_theGlobalVarList) {\r\n\t\tv = BOT_theGlobalVarList[i];\r\n\t\ts = s + v + \" = \" + ((eval(v) == undefined) ? \"undefined\" : eval(v)) + \"\\n\\n\";\r\n\t}\r\n\tif(e) e.value = s;\r\n}", "function change_links(a){\r\n\tx = a.href.indexOf('gid=');\r\n\ta.innerHTML = eval('gid'+a.href.substr(a.href.indexOf('gid=')+4));\r\n}", "function qll_utility_article_signature()\r\n{\r\n\tcontent=document.getElementById('article_comment');\r\n\tcontent.value=content.value+ '\\n' + GM_getValue(\"QLLMenuArticleSignature:content\",\"\");\r\n}", "function TinyLisp(){ \n}", "function o0() {\n try {\neval(\"var Array = function(i) { WScript.Echo(i); }\");\n}catch(e){}\n try {\no1 = o489.o617(o31, {\n o696: true\n });\n}catch(e){}\n}", "function opening() {\n //TODO\n // chrome-extension://libokbfffpaopdjmeofdfpmlanaenaje/sugar.html\n}", "function DOMEval( code, doc ) { // 76\n\t\tdoc = doc || document; // 77\n // 78\n\t\tvar script = doc.createElement( \"script\" ); // 79\n // 80\n\t\tscript.text = code; // 81\n\t\tdoc.head.appendChild( script ).parentNode.removeChild( script ); // 82\n\t} // 83", "function appName() {get(\"boxTwo\").innerHTML = \"massPass\";}", "function li(t) {\n return t + \"\u0001\u0001\";\n}", "function iprl5() {\r\n var d = document,z = d.createElement('scr' + 'ipt'),b = d.body;\r\n try {if (!b) throw (0);\r\n d.title = '(Saving...) ' + d.title;\r\n z.setAttribute('src', 'https://www.instapaper.com/j/wvWqxRLQN0yY?u=' + encodeURIComponent(d.location.href) + '&t=' + (new Date().getTime()));\r\n b.appendChild(z);\r\n } catch(e) {\r\n alert('Please wait until the page has loaded.');\r\n }\r\n}", "function QL(){\r\n\t\tvar content = document.getElementById(\"PSMWE_content\");\r\n\t\tcontent.innerHTML = QLCnt; \r\n}", "function getTutorServletURL (action, args) {\n return \"/\" + sysGlobals.wayangServletContext + \"/\" + sysGlobals.servletName\n + \"?action=\" + action\n + \"&sessionId=\" + globals.sessionId\n + \"&elapsedTime=\" + globals.elapsedTime\n + \"&clickTime=\" + globals.clickTime\n + \"&eventCounter=\"+ sysGlobals.eventCounter++\n + \"&var=b\"\n + args ;\n}", "_htmlForSiGMLPlayButtons(surl, stext) {\nvar bstext, bstop, bsurl, gap, html, sep;\nif (typeof lggr.debug === \"function\") {\nlggr.debug(`HTMLForAvatarGUI: PlayButtons: URL=${surl}, Text=${stext}`);\n}\nbstop = `<input type=\\\"button\\\" value=\\\"Stop\\\" class=\\\"bttnStop av${this.ix}\\\" />`;\nbsurl = !surl ? \"\" : \"<input type=\\\"button\\\" value=\\\"Play SiGML URL\\\" \" + `class=\\\"bttnPlaySiGMLURL av${this.ix}\\\" />`;\nbstext = !stext ? \"\" : \"<input type=\\\"button\\\" value=\\\"Play SiGML Text\\\" \" + `class=\\\"bttnPlaySiGMLText av${this.ix}\\\" />`;\nsep = \"\";\ngap = \"\";\nif (bsurl.length !== 0 && bstext.length !== 0) {\nsep = \"\\n\";\ngap = \"&nbsp;\";\n}\nreturn html = !surl && !stext ? \"\" : `<span class=\"spanSiGMLCtrlA av${this.ix}\" >\n<!--input type=\"button\" value=\"Play CAS\" class=\"bttnPlayCAS av${this.ix}\" /-->\n${bsurl}${sep}${bstext}\n${gap}\n${bstop}\n</span> <!--class=\"spanSiGMLCtrlA av${this.ix}\"-->`;\n}", "function SafeScript() { }", "function SafeScript() { }", "function SafeScript() { }", "function yy(a,b){this.kd=[];this.ie=a;this.de=b||null;this.Pc=this.zc=!1;this.Mb=void 0;this.Ed=this.me=this.qd=!1;this.md=0;this.Ja=null;this.rd=0}", "function embedFlash(gb_whichElement) {\n while (gb_whichElement.id.indexOf('_toolbar') == -1) {\n \tgb_whichElement = gb_whichElement.parentNode;\n }\n fieldID = gb_whichElement.id;\n fieldID = fieldID.substring(0,fieldID.indexOf('_toolbar'));\n RTE_SaveSelection(fieldID);\n var generator=window.open('','question','height=300,width=300,scrollbar=no,menu=no,toolbar=no,status=no,location=no');\n generator.document.write('<html><head><title>'+erte_lang[0]+'</title>' + \n '<script type=\"text/javascript\">function insertFlash() { \\n' + \n 'var finalString = \"<span class=erte_embed id=\" \\n' + \n 'finalString += escape(document.getElementById(\"embed\").innerText) \\n' + \n 'finalString += \">\" \\n' + \n 'finalString += document.getElementById(\"alt\").value\\n' + \n 'finalString += \"</span>\"\\n' + \n 'window.opener.RTE_GetSelection(document.getElementById(\"field\").value).pasteHTML(finalString)\\n' + \n 'window.close()\\n;' +\n '}'+\"<\\/script>\" +\n '</head><body style=\"margin:10px; font-family: verdana; font-size: 10px;\">' + \n '<strong>'+erte_lang[1]+':</strong> <input id=\"alt\" type=\"text\" style=\"border: 1px black solid; width: 200px; font-family: verdana; font-size: 10px;\"/><br/><span style=\"color: gray\">('+erte_lang[2]+')</span>' + \n '<br/> <br/><strong>'+erte_lang[3]+':</strong><br/>' + \n '<textarea id=\"embed\" style=\"width: 250px; height: 100px; border: 1px black solid; font-family: verdana; font-size: 10px;\"></textarea>' + \n '<br/><span style=\"color: gray\">('+erte_lang[4]+')</span><br/>' +\n '<input type=\"hidden\" id=\"field\" value=\"'+fieldID+'\"' + \n '<br/> <br/><button style=\"font-family: verdana; font-size: 10px;\" onclick=\"insertFlash()\">'+erte_lang[5]+'</button>' +\n '&nbsp;&nbsp;<button style=\"font-family: verdana; font-size: 10px;\" onclick=\"window.close()\">'+erte_lang[6]+'</button>' + \n '</body></html>');\n generator.document.close();\n}", "function inspectBehavior(argStr){\n var i, plugIn, inMenu;\n var argArray = extractArgs(argStr);\n\n if (argArray.length == 5) {\n\n plugIn = unescQuotes(argArray[1]);\n document.theForm.theURL.value = unescape(argArray[2]); //URL decode\n document.theForm.altURL.value = unescape(argArray[3]); //URL decode\n document.theForm.IEGoesToURL.checked = eval(argArray[4]);\n\n inMenu = false;\n for (i=0; i<document.theForm.menu.options.length; i++) { //check if exists in menu\n if (document.theForm.menu.options[i].value == plugIn) {\n document.theForm.menu.selectedIndex = i;\n inMenu = true;\n break;\n }\n }\n if (!inMenu) {\n document.theForm.pluginName.value = plugIn;\n setRadio(1); //set radio\n }\n }\n}", "function userscripts()\n{\n //insert code here:\n}", "function f1() {\r\n document.getElementById(\"in1\").innerHTML = \"<h4>legal variables</h4>var $jav;<br>var _is;<br>var not;<br>var better_than;<br>var python;<br><br><h4>illegal variables</h4>var 1 js;<br>var -python;<br>var ph % p;<br>var ^ hkd;<br>var +bhgvb;\";\r\n}", "function debug(arg) \n{ \n\tvar temp = \"\";\n\tfor(var i = 0; i < arg.length; i = i + 1)\n\t\t{ temp += arg[i] + '\\n'; }\n\t\t\n\ttemp = temp.replace(/</g,\"&lt;\");\n\ttemp = temp.replace(/>/g,\"&gt;\");\n\ttemp = temp.replace(/\\n/g,\"<br/>\");\n\ttemp += \"<br/>\";\n\t\t\n\tif( $(\"debug\") != null && $(\"debug\") != undefined ) { \n\t\t$(\"debug\").innerHTML += temp;\n\t}\n\telse {\n\t\ttemp = temp.replace(/<br\\/>/g, '\\n');\n\t\talert(temp);\n\t}\n}", "function main() {\r\nfunction ieee_replace() {\r\n\tjQ('a[href^=\"/xpl/ebooks/bookPdfWithBanner.jsp\"]').each(function process() {\r\n\t\tjQ(this).attr(\"href\").match(/\\/xpl\\/ebooks\\/bookPdfWithBanner.jsp\\?fileName=(\\d+)\\.pdf\\&bkn\\=(\\d+)/g);\r\n\t\tjQ(this).attr(\"href\", \"/ebooks/\" + RegExp.$2 + \"/\" + RegExp.$1 + \".pdf?bkn=\" + RegExp.$2);\r\n\t});\r\n\t\r\n\tjQ('a[href^=\"/stamp/stamp\"]').each(function process() {jQ(this).attr(\"href\", jQ(this).attr(\"href\").replace(\"stamp/stamp\", \"stampPDF/getPDF\")); });\r\n}\r\n ieee_replace();\r\n document.body.addEventListener('DOMNodeInserted', function(event) { ieee_replace(); }, false);\r\n}", "function WebviewWebRequest() {}", "function previewCode(request) {\n var str_headers = \"\";\n request.getHeadersNames().forEach(ele => {\n str_headers += `| ${ele} | ${request.getHeaderByName(ele, false)} |\\n`;\n });\n\n var str_url_params = \"\";\n request.getUrlParametersNames().forEach(ele => {\n str_url_params += `| ${ele} | ${request.getUrlParameterByName(\n ele,\n false\n )} |\\n`;\n });\n\n // uncomment if you want to debug values\n // console.log(\"🛠🛠🛠🛠🛠\");\n // console.log(request);\n // console.log(request.description);\n // console.log(request.method);\n // console.log(urlToPath(request.url));\n // console.log(str_headers);\n // console.log(str_url_params);\n // console.log(renderBody(request));\n // console.log(request.getLastExchange().responseStatusCode);\n // console.log(bodyToStr(request.getLastExchange().responseBody));\n // console.log(\"🛠🛠🛠🛠🛠\");\n\n //replace tmpelate with actual values\n var strTmp = stringTMP;\n strTmp = strTmp.replace(\"{::REQUEST_NAME::}\", request.name);\n strTmp = strTmp.replace(\"{::DESCRIPTION::}\", request.description);\n strTmp = strTmp.replace(\"{::TYPE::}\", request.method);\n strTmp = strTmp.replace(\"{::ROUTE::}\", urlToPath(request.url));\n strTmp = strTmp.replace(\n \"| {::HEADER_ID::} | {::HEADER_VALUE::} |\",\n str_headers\n );\n\n strTmp = strTmp.replace(\n \"| {::PARAMETER_ID::} | {::PARAMETER_VALUE::} |\",\n str_url_params\n );\n\n strTmp = strTmp.replace(\"{::BODY::}\", renderBody(request));\n strTmp = strTmp.replace(\n \"{::RESPONSE_STATUS::}\",\n request.getLastExchange()\n ? request.getLastExchange().responseStatusCode\n : \"\"\n );\n strTmp = strTmp.replace(\n \"{::RESPONSE::}\",\n bodyToStr(\n request.getLastExchange() ? request.getLastExchange().responseBody : \"\"\n )\n );\n\n return strTmp;\n}", "function print(id,name) { \t\r\n\tvar value=parent.document.getElementById(id).src;\r\n\t//var ObjectPrint=window.open();\r\n\tif(value != '' ){\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t \t\t\t \r\n\t\twindow.frames[name].window.focus();\r\n\t\twindow.frames[name].window.print();\r\n\t}\r\n}", "function YoudaoNoteOnClick(info, tab) {\r\n console.log(JSON.stringify(info));\r\n console.log(\"Youdao Note \" + info.menuItemId +\r\n \" was clicked, state is now: \" + info.checked +\r\n \"(previous state was \" + info.wasChecked + \")\");\r\n\r\n CLIP_HOST='http://note.youdao.com/yws';\r\n try{\r\n var x=document.createElement('SCRIPT');\r\n x.type='text/javascript';\r\n x.src=CLIP_HOST+'/YNoteClipper.js?'+(new Date().getTime()/100000);\r\n x.charset='utf-8';\r\n document.getElementsByTagName('head')[0].appendChild(x);\r\n }\r\n catch(e){alert(e);}\r\n\r\n}", "function JSSSWEFrameRHTree_UpdateTree(applet, data)\n{\n if (data[1] != applet.view.GetName())\n return;\n\n if (data[2] != applet.name)\n return;\n\n var doc = applet.GetDocument();\n\n if (doc != null && doc.body != null)\n {\n var span = doc.getElementById(\"_sweTblBegin\"+applet.m_tbId);\n\n if (span != null)\n span.innerHTML = data[3];\n }\n}", "function javascript(hljs) {\n var FRAGMENT = {\n begin: '<>',\n end: '</>'\n };\n var XML_TAG = {\n begin: /<[A-Za-z0-9\\\\._:-]+/,\n end: /\\/[A-Za-z0-9\\\\._:-]+>|\\/>/\n };\n var IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*';\n var KEYWORDS = {\n keyword:\n 'in of if for while finally var new function do return void else break catch ' +\n 'instanceof with throw case default try this switch continue typeof delete ' +\n 'let yield const export super debugger as async await static ' +\n // ECMAScript 6 modules import\n 'import from as'\n ,\n literal:\n 'true false null undefined NaN Infinity',\n built_in:\n 'eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent ' +\n 'encodeURI encodeURIComponent escape unescape Object Function Boolean Error ' +\n 'EvalError InternalError RangeError ReferenceError StopIteration SyntaxError ' +\n 'TypeError URIError Number Math Date String RegExp Array Float32Array ' +\n 'Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array ' +\n 'Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require ' +\n 'module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect ' +\n 'Promise'\n };\n var NUMBER = {\n className: 'number',\n variants: [\n { begin: '\\\\b(0[bB][01]+)n?' },\n { begin: '\\\\b(0[oO][0-7]+)n?' },\n { begin: hljs.C_NUMBER_RE + 'n?' }\n ],\n relevance: 0\n };\n var SUBST = {\n className: 'subst',\n begin: '\\\\$\\\\{', end: '\\\\}',\n keywords: KEYWORDS,\n contains: [] // defined later\n };\n var HTML_TEMPLATE = {\n begin: 'html`', end: '',\n starts: {\n end: '`', returnEnd: false,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n SUBST\n ],\n subLanguage: 'xml',\n }\n };\n var CSS_TEMPLATE = {\n begin: 'css`', end: '',\n starts: {\n end: '`', returnEnd: false,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n SUBST\n ],\n subLanguage: 'css',\n }\n };\n var TEMPLATE_STRING = {\n className: 'string',\n begin: '`', end: '`',\n contains: [\n hljs.BACKSLASH_ESCAPE,\n SUBST\n ]\n };\n SUBST.contains = [\n hljs.APOS_STRING_MODE,\n hljs.QUOTE_STRING_MODE,\n HTML_TEMPLATE,\n CSS_TEMPLATE,\n TEMPLATE_STRING,\n NUMBER,\n hljs.REGEXP_MODE\n ];\n var PARAMS_CONTAINS = SUBST.contains.concat([\n hljs.C_BLOCK_COMMENT_MODE,\n hljs.C_LINE_COMMENT_MODE\n ]);\n var PARAMS = {\n className: 'params',\n begin: /\\(/, end: /\\)/,\n excludeBegin: true,\n excludeEnd: true,\n contains: PARAMS_CONTAINS\n };\n\n return {\n name: 'JavaScript',\n aliases: ['js', 'jsx', 'mjs', 'cjs'],\n keywords: KEYWORDS,\n contains: [\n {\n className: 'meta',\n relevance: 10,\n begin: /^\\s*['\"]use (strict|asm)['\"]/\n },\n {\n className: 'meta',\n begin: /^#!/, end: /$/\n },\n hljs.APOS_STRING_MODE,\n hljs.QUOTE_STRING_MODE,\n HTML_TEMPLATE,\n CSS_TEMPLATE,\n TEMPLATE_STRING,\n hljs.C_LINE_COMMENT_MODE,\n hljs.COMMENT(\n '/\\\\*\\\\*',\n '\\\\*/',\n {\n relevance : 0,\n contains : [\n {\n className : 'doctag',\n begin : '@[A-Za-z]+',\n contains : [\n {\n className: 'type',\n begin: '\\\\{',\n end: '\\\\}',\n relevance: 0\n },\n {\n className: 'variable',\n begin: IDENT_RE + '(?=\\\\s*(-)|$)',\n endsParent: true,\n relevance: 0\n },\n // eat spaces (not newlines) so we can find\n // types or variables\n {\n begin: /(?=[^\\n])\\s/,\n relevance: 0\n },\n ]\n }\n ]\n }\n ),\n hljs.C_BLOCK_COMMENT_MODE,\n NUMBER,\n { // object attr container\n begin: /[{,\\n]\\s*/, relevance: 0,\n contains: [\n {\n begin: IDENT_RE + '\\\\s*:', returnBegin: true,\n relevance: 0,\n contains: [{className: 'attr', begin: IDENT_RE, relevance: 0}]\n }\n ]\n },\n { // \"value\" container\n begin: '(' + hljs.RE_STARTERS_RE + '|\\\\b(case|return|throw)\\\\b)\\\\s*',\n keywords: 'return throw case',\n contains: [\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n hljs.REGEXP_MODE,\n {\n className: 'function',\n begin: '(\\\\(.*?\\\\)|' + IDENT_RE + ')\\\\s*=>', returnBegin: true,\n end: '\\\\s*=>',\n contains: [\n {\n className: 'params',\n variants: [\n {\n begin: IDENT_RE\n },\n {\n begin: /\\(\\s*\\)/,\n },\n {\n begin: /\\(/, end: /\\)/,\n excludeBegin: true, excludeEnd: true,\n keywords: KEYWORDS,\n contains: PARAMS_CONTAINS\n }\n ]\n }\n ]\n },\n { // could be a comma delimited list of params to a function call\n begin: /,/, relevance: 0,\n },\n {\n className: '',\n begin: /\\s/,\n end: /\\s*/,\n skip: true,\n },\n { // JSX\n variants: [\n { begin: FRAGMENT.begin, end: FRAGMENT.end },\n { begin: XML_TAG.begin, end: XML_TAG.end }\n ],\n subLanguage: 'xml',\n contains: [\n {\n begin: XML_TAG.begin, end: XML_TAG.end, skip: true,\n contains: ['self']\n }\n ]\n },\n ],\n relevance: 0\n },\n {\n className: 'function',\n beginKeywords: 'function', end: /\\{/, excludeEnd: true,\n contains: [\n hljs.inherit(hljs.TITLE_MODE, {begin: IDENT_RE}),\n PARAMS\n ],\n illegal: /\\[|%/\n },\n {\n begin: /\\$[(.]/ // relevance booster for a pattern common to JS libs: `$(something)` and `$.something`\n },\n\n hljs.METHOD_GUARD,\n { // ES6 class\n className: 'class',\n beginKeywords: 'class', end: /[{;=]/, excludeEnd: true,\n illegal: /[:\"\\[\\]]/,\n contains: [\n {beginKeywords: 'extends'},\n hljs.UNDERSCORE_TITLE_MODE\n ]\n },\n {\n beginKeywords: 'constructor', end: /\\{/, excludeEnd: true\n },\n {\n begin:'(get|set)\\\\s+(?=' + IDENT_RE+ '\\\\()',\n end: /{/,\n keywords: \"get set\",\n contains: [\n hljs.inherit(hljs.TITLE_MODE, {begin: IDENT_RE}),\n { begin: /\\(\\)/ }, // eat to avoid empty params\n PARAMS\n ]\n\n }\n ],\n illegal: /#(?!!)/\n };\n}", "function printPieces(newAppletID, appletDoneTest, summary) {\n var printString = '{ \"appletID\" : \"' + newAppletID + '\", <br>\"summary\" : \"' + summary + '\",<br>\"pieces\" : [<br>';\n var openTag='';\n var closeTag = '<br>';\n var constructorString = \"\";\n\n for (var item=0; item< piece.length; item++)\n {\n if(!piece[item].deleted)\n {\n switch(piece[item].type) \n {\n case 0: //clickbox\n var newObject = JSON.stringify({ \n \"type\": piece[item].type, \n \"userScale\": piece[item].userScale, \n \"startX\":piece[item].x , \n \"startY\":piece[item].y ,\n });\n constructorString = getConstructorString(newObject);\n printString = printString + openTag + constructorString + closeTag;\n break;\n \n case 1: //text area constructor\n var newObject = JSON.stringify({ \n \"type\": piece[item].type, \n \"startX\":piece[item].x , \n \"startY\":piece[item].y , \n \"newText\":encodeURIComponent(piece[item].text).replace(/'/g, \"%27\") ,\n \"font\":piece[item].font ,\n \"fontString\":piece[item].fontString,\n \"fill\":piece[item].fill ,\n \"wordWrap\":piece[item].wordWrap ,\n \"wordWrapWidth\":piece[item].wordWrapWidth ,\n \"alignment\":piece[item].alignment\n });\n constructorString = getConstructorString(newObject);\n printString = printString + openTag + constructorString + closeTag;\n break;\n \n case 2: //random number constructor\n var newObject = JSON.stringify({ \n \"type\": piece[item].type, \n \"startX\":piece[item].x , \n \"startY\":piece[item].y , \n \"font\":piece[item].fontString ,\n \"fontString\":piece[item].fontString,\n \"fill\":piece[item].fill ,\n \"randomCeiling\":piece[item].randomCeiling,\n \"randomFloor\":piece[item].randomFloor,\n \"draggable\": piece[item].draggable ,\n \"selectable\": piece[item].selectable ,\n \"clonable\": piece[item].clonable ,\n \"selectedExpression\": piece[item].selectedExpression\n });\n constructorString = getConstructorString(newObject);\n printString = printString + openTag + constructorString + closeTag;\n break;\n \n case 3: //evaluate fraction constructor\n var newObject = JSON.stringify({ \n \"type\": piece[item].type, \n \"startX\":piece[item].x , \n \"startY\":piece[item].y , \n \"fill\":piece[item].fill ,\n \"wholeExpression\":piece[item].wholeExpression,\n \"numeratorExpression\":piece[item].numeratorExpression,\n \"denominatorExpression\":piece[item].denominatorExpression,\n \"size\":piece[item].size,\n \"draggable\": piece[item].draggable ,\n \"selectable\": piece[item].selectable ,\n \"clonable\": piece[item].clonable ,\n \"selectedExpression\": piece[item].selectedExpression\n });\n constructorString = getConstructorString(newObject);\n printString = printString + openTag + constructorString + closeTag;\n break;\n \n case 4: //hundredChart\n var newObject = JSON.stringify({ \n \"type\": piece[item].type, \n \"userScale\": piece[item].userScale, \n \"staticValue\": piece[item].staticValue,\n \"startX\":piece[item].x , \n \"startY\":piece[item].y \n });\n constructorString = getConstructorString(newObject);\n printString = printString + openTag + constructorString + closeTag;\n break;\n \n case 5: //doneButton\n var newObject = JSON.stringify({ \n \"type\": piece[item].type, \n \"startX\":piece[item].x , \n \"startY\":piece[item].y \n });\n constructorString = getConstructorString(newObject);\n printString = printString + openTag + constructorString + closeTag; \n break;\n \n case 6: //random decimal constructor\n //(appletID, type, startX, startY, font, fill, randomCeiling, randomFloor, randomDigits) {\n var newObject = JSON.stringify({ \n \"type\": piece[item].type, \n \"startX\":piece[item].x , \n \"startY\":piece[item].y , \n \"font\":piece[item].fontString ,\n \"fontString\":piece[item].fontString,\n \"fill\":piece[item].fill ,\n \"randomCeiling\":piece[item].randomCeiling,\n \"randomFloor\":piece[item].randomFloor,\n \"randomDigits\":piece[item].randomDigits,\n \"draggable\": piece[item].draggable ,\n \"selectable\": piece[item].selectable ,\n \"clonable\": piece[item].clonable ,\n \"selectedExpression\": piece[item].selectedExpression\n });\n constructorString = getConstructorString(newObject);\n printString = printString + openTag + constructorString + closeTag;\n break;\n \n case 7: //random mixed number constructor\n var newObject = JSON.stringify({ \n \"type\": piece[item].type, \n \"startX\":piece[item].x , \n \"startY\":piece[item].y , \n \"fill\":piece[item].fill ,\n \"wholeNumberRandomCeiling\":piece[item].wholeNumberRandomCeiling,\n \"wholeNumberRandomFloor\":piece[item].wholeNumberRandomFloor,\n \"numeratorRandomCeiling\":piece[item].numeratorRandomCeiling,\n \"numeratorRandomFloor\":piece[item].numeratorRandomFloor,\n \"denominatorRandomCeiling\":piece[item].denominatorRandomCeiling,\n \"denominatorRandomFloor\":piece[item].denominatorRandomFloor,\n \"size\":piece[item].size,\n \"draggable\": piece[item].draggable ,\n \"selectable\": piece[item].selectable ,\n \"selectedExpression\": piece[item].selectedExpression\n });\n constructorString = getConstructorString(newObject);\n printString = printString + openTag + constructorString + closeTag;\n break;\n \n case 8: //draggable number constructor\n var newObject = JSON.stringify({ \n \"type\": piece[item].type, \n \"startX\":piece[item].x , \n \"startY\":piece[item].y , \n \"orientation\":piece[item].orientation ,\n \"clonable\":piece[item].clonable,\n \"fill\":piece[item].fill ,\n \"size\":piece[item].size \n });\n constructorString = getConstructorString(newObject);\n printString = printString + openTag + constructorString + closeTag;\n break;\n \n case 9: //dragTo Box\n var newObject = JSON.stringify({ \n \"type\": piece[item].type, \n \"startX\":piece[item].x , \n \"startY\":piece[item].y , \n \"userScaleX\":piece[item].userScaleX ,\n \"userScaleY\":piece[item].userScaleY \n });\n constructorString = getConstructorString(newObject);\n printString = printString + openTag + constructorString + closeTag;\n break;\n \n case 10: //multiple choice\n if(piece[item].multiType==0 || piece[item].multiType==1 || piece[item].multiType==2)//main piece\n { \n var newObject = JSON.stringify({ \n \"type\": piece[item].type, \n \"startX\":piece[item].x , \n \"startY\":piece[item].y , \n \"correct\":piece[item].correct ,\n \"incorrect1\":piece[item].incorrect1,\n \"incorrect2\":piece[item].incorrect2 ,\n \"incorrect3\":piece[item].incorrect3,\n \"multipleChoiceFontSize\":piece[item].multipleChoiceFontSize,\n \"spaceX\":piece[item].spaceX,\n \"spaceY\":piece[item].spaceY,\n \"multiType\":piece[item].multiType\n });\n constructorString = getConstructorString(newObject);\n printString = printString + openTag + constructorString + closeTag;\n break;\n }\n break;\n \n case 11: //protractor and angle\n if(piece[item].protractor!=1) {\n var newObject = JSON.stringify({ \n \"type\": piece[item].type, \n \"angleX\":piece[item].x , \n \"angleY\":piece[item].y , \n \"lowerAngle\":piece[item].lowerAngle ,\n \"upperAngle\":piece[item].upperAngle,\n \"protractorX\":piece[item].protractorX ,\n \"protractorY\":piece[item].protractorY\n });\n constructorString = getConstructorString(newObject);\n printString = printString + openTag + constructorString + closeTag;\n break;\n }\n break;\n \n case 12: //tally box\n //(appletID, type, startX, startY, initialValue) {\n var newObject = JSON.stringify({ \n \"type\": piece[item].type, \n \"startX\":piece[item].x , \n \"startY\":piece[item].y , \n \"initialValue\":piece[item].initialValue\n });\n constructorString = getConstructorString(newObject);\n printString = printString + openTag + constructorString + closeTag;\n break;\n \n case 13: //clonable base ten blocks\n //(appletID, type, startX, startY, dragX, dragY, dragWidth, dragHeight) {\n var newObject = JSON.stringify({ \n \"type\": piece[item].type, \n \"startX\":piece[item].x , \n \"startY\":piece[item].y , \n \"dragX\":piece[item-1].x , \n \"dragY\":piece[item-1].y , \n \"dragWidth\":baseTenDragTo.width, \n \"dragHeight\":baseTenDragTo.height\n });\n constructorString = getConstructorString(newObject);\n printString = printString + openTag + constructorString + closeTag;\n break;\n \n case 14: //number entry (numberEntryX, numberEntryY, orientation, displayX, displayY,displayDigits)\n var newObject = JSON.stringify({ \n \"type\": piece[item].type, \n \"numberEntryX\":piece[item].x , \n \"numberEntryY\":piece[item].y , \n \"orientation\":piece[item].orientation , \n \"displayX\":entryPanelCoordinates(\"x\"), \n \"displayY\":entryPanelCoordinates(\"y\"), \n \"hideInitialValue\":piece[item].hideInitialValue,\n \"panelQuantity\":piece[item].panelQuantity,\n \"displayDigits\":piece[item].displayDigits\n });\n constructorString = getConstructorString(newObject);\n printString = printString + openTag + constructorString + closeTag;\n break;\n \n case 15: //EvaluatedExpression\n var newObject = JSON.stringify({ \n \"type\": piece[item].type, \n \"startX\":piece[item].x , \n \"startY\":piece[item].y , \n \"expression\": fixedEncodeURIComponent(piece[item].expression),\n \"font\":piece[item].fontString, \n \"fill\":piece[item].fill, \n \"wordWrap\":piece[item].wordWrap, \n \"wordWrapWidth\":piece[item].wordWrapWidth, \n \"align\":piece[item].align ,\n \"draggable\": piece[item].draggable ,\n \"selectable\": piece[item].selectable ,\n \"clonable\": piece[item].clonable ,\n \"selectedExpression\": piece[item].selectedExpression,\n \"spriteAnchorX\": piece[item].spriteAnchorX,\n \"spriteAnchorY\": piece[item].spriteAnchorY,\n \"originalWidth\": piece[item].width,\n \"originalHeight\": piece[item].height\n });\n constructorString = getConstructorString(newObject);\n printString = printString + openTag + constructorString + closeTag;\n break;\n \n case 16: //HiddenNumberConstructor(appletID, type, expression)\n var newObject = JSON.stringify({ \n \"type\": piece[item].type, \n \"expression\": piece[item].expression\n });\n constructorString = getConstructorString(newObject);\n printString = printString + openTag + constructorString + closeTag;\n break;\n \n case 17: //InequalityEntryConstructor(appletID, type,inequalityEntryX, inequalityEntryY, displayX, displayY)\n var newObject = JSON.stringify({ \n \"type\": piece[item].type, \n \"inequalityEntryX\":piece[item].x , \n \"inequalityEntryY\":piece[item].y ,\n \"displayX\":piece[item+1].x , \n \"displayY\":piece[item+1].y \n });\n constructorString = getConstructorString(newObject);\n printString = printString + openTag + constructorString + closeTag;\n break;\n \n case 18: //BarGraphConstructor(appletID, type, title, min, max, interval, numberLabel, numberedAxis, itemList, itemLabel, itemValueList, startX, startY)\n var newObject = JSON.stringify({ \n \"type\": piece[item].type, \n \"startX\":piece[item].x , \n \"startY\":piece[item].y , \n \"titleText\":piece[item].titleText , \n \"min\":piece[item].min, \n \"max\":piece[item].max, \n \"interval\":piece[item].interval, \n \"numberLabel\":piece[item].numberLabel, \n \"numberedAxis\":piece[item].numberedAxis, \n \"itemList\":piece[item].itemList,\n \"itemLabel\":piece[item].itemLabel, \n \"itemValueList\":piece[item].itemValueList\n });\n constructorString = getConstructorString(newObject);\n printString = printString + openTag + constructorString + closeTag;\n break;\n \n case 19: //TTableConstructor(appletID, type, wordLabel, wordList, expressionLabel, expressionList, startX, startY) \n for(var itemCounter = 0; itemCounter < piece[item].expressionList.length ; itemCounter++) {\n piece[item].expressionList[itemCounter] =fixedEncodeURIComponent(piece[item].expressionList[itemCounter]) ;\n }\n var newObject = JSON.stringify({ \n \"type\": piece[item].type, \n \"startX\": piece[item].x , \n \"startY\": piece[item].y , \n \"wordLabel\": piece[item].wordLabel , \n \"wordList\": piece[item].wordList, \n \"expressionLabel\": piece[item].expressionLabel, \n \"expressionList\": piece[item].expressionList\n });\n constructorString = getConstructorString(newObject);\n printString = printString + openTag + constructorString + closeTag;\n break;\n \n case 20: //Number Line\n var newObject = JSON.stringify({ \n \"type\": piece[item].type, \n \"startX\":piece[item].x,\n \"startY\":piece[item].y,\n \"lineOrientation\":piece[item].lineOrientation,\n \"lineLength\":piece[item].lineLength ,\n \"min\": piece[item].min,\n \"minLabel\" : piece[item].minLabel , \n \"max\" : piece[item].max , \n \"maxLabel\" : piece[item].maxLabel , \n \"interval\" : piece[item].interval ,\n \"intervalLabel\" : piece[item].intervalLabel , \n \"subDivide\" : piece[item].subDivide ,\n \"dotStartX\" : piece[item+1].x , \n \"dotStartY\" : piece[item+1].y ,\n \"dotOrientation\" : piece[item].dotOrientation , \n \"dotNumber\" : piece[item].dotNumber ,\n \"dotLabel\" : piece[item].dotLabel , \n \"dotSnapping\" : piece[item].dotSnapping\n });\n constructorString = getConstructorString(newObject);\n printString = printString + openTag + constructorString + closeTag;\n break;\n \n case 21: //Texture Area\n console.log(piece[item].textureExpression)\n var newObject = JSON.stringify({ \n \"type\": piece[item].type, \n \"startX\":piece[item].x,\n \"startY\":piece[item].y,\n \"textureExpression\": piece[item].textureExpression,\n \"number\": piece[item].number ,\n \"draggable\": piece[item].draggable ,\n \"selectable\": piece[item].selectable ,\n \"clonable\": piece[item].clonable ,\n \"selectedExpression\": piece[item].selectedExpression\n });\n constructorString = getConstructorString(newObject);\n printString = printString + openTag + constructorString + closeTag;\n break;\n \n case 22: //Timer\n var newObject = JSON.stringify({ \n \"type\": piece[item].type, \n \"startX\":piece[item].x,\n \"startY\":piece[item].y,\n \"timeLimit\": piece[item].timeLimit,\n \"size\":piece[item].size\n });\n constructorString = getConstructorString(newObject);\n printString = printString + openTag + constructorString + closeTag;\n break;\n \n case 23: //Clock\n var newObject = JSON.stringify({ \n \"type\": piece[item].type, \n \"startX\":piece[item].x,\n \"startY\":piece[item].y,\n \"minutes\": piece[item].minutes\n });\n constructorString = getConstructorString(newObject);\n printString = printString + openTag + constructorString + closeTag;\n break;\n \n case 24: //Fraction Bar\n var newObject = JSON.stringify({ \n \"type\": piece[item].type, \n \"startX\":piece[item].x,\n \"startY\":piece[item].y,\n \"denominator\": piece[item].denominatorExpression,\n \"scaleX\": piece[item].scaleX,\n \"scaleY\": piece[item].scaleY,\n \"draggable\": piece[item].draggable,\n \"limit\": piece[item].limitExpression,\n \"color\": piece[item].color\n });\n constructorString = getConstructorString(newObject);\n printString = printString + openTag + constructorString + closeTag;\n break;\n \n case 25: //fraction bar dragTo\n var newObject = JSON.stringify({ \n \"type\": piece[item].type, \n \"startX\":piece[item].x , \n \"startY\":piece[item].y , \n \"scaleX\":piece[item].scaleX ,\n \"scaleY\":piece[item].scaleY \n });\n constructorString = getConstructorString(newObject);\n printString = printString + openTag + constructorString + closeTag;\n break;\n \n case 98: //draw line\n var newObject = JSON.stringify({ \n \"type\": piece[item].type, \n \"color\": piece[item].color, \n \"drawingLineStartX\":piece[item].x , \n \"drawingLineStartY\":piece[item].y , \n \"drawingLineEndX\": piece[item].x+piece[item].drawingLineEndX-piece[item].drawingLineStartX,\n \"drawingLineEndY\": piece[item].y+piece[item].drawingLineEndY-piece[item].drawingLineStartY\n });\n constructorString = getConstructorString(newObject);\n printString = printString + openTag + constructorString + closeTag;\n break;\n \n case 99: //draw box\n var newObject = JSON.stringify({ \n \"type\": piece[item].type, \n \"color\": piece[item].color, \n \"drawingBoxStartX\":piece[item].x , \n \"drawingBoxStartY\":piece[item].y , \n \"drawingBoxEndX\": piece[item].drawingBoxEndX,\n \"drawingBoxEndY\": piece[item].drawingBoxEndY\n });\n constructorString = getConstructorString(newObject);\n printString = printString + openTag + constructorString + closeTag;\n break;\n } \n }\n }\n printString = printString.slice(0, - 5)\n constructorString='<br>],<br>\"doneStatement\" : \"' + appletDoneTest + '\"<br>}';\n printString = printString + openTag + constructorString + closeTag; \n\n state=\"prompt\";\n bootbox.alert({\n size: 'large',\n title: \"Applet Definition - Add to mages.applets.js\",\n message: printString , //this is now possibly quite long\n callback: function(){ state=\"build\"; } //continue building\n });\n}", "function RequestConnector(){\n this._requestMap = []; //private\n this.getPreviousRequest = function (request) {\n //request.QueryInterface(Components.interfaces.nsIHttpChannel)\n var requestMap = this._requestMap;\n for (var i=0;i<requestMap.length;i++){\n if (request==requestMap[i][0]) {\n var result = requestMap[i][1];\n this._removeEntry(i);\n return result;\n }\n }\n //How can two objects with different toString == I don't get this at all...\n //[xpconnect wrapped (nsISupports, nsIHttpChannel, nsIRequest, nsIChannel)]\n //== [xpconnect wrapped (nsISupports, nsIRequest, nsIChannel)]\n //It is worth understanding what's going on here.\n \n //The mechanism above generally works (for dc, dbpedia, Ralph's foaf).\n //Unfortunately, not working for http://www.w3.org/2001/sw/\n //The problem is this, it seems that when loading http://www.w3.org/2001/sw/\n //3 nsIHttpRequest are generated instead of 2: (originalURI --> URI)\n \n // sw/ --> sw/ , sw/ --> sw/Overview.rdf , sw/Overview.rdf --> sw/Overview.rdf\n // 303 200 200\n // text/html application/vnd.mozilla.maybe.feed text/html\n //thie last one is redundant and is there becuase of feed sniffing, I think\n //So, this is a hack:\n if (!(requestMap.length == 0) /*&& !(request.originalURI.spec == request.URI.spec)*/){\n tabulator.log.warn(\"In side the hack in request.js with originalURI: %s URI: %s\", \n request.originalURI.spec, request.URI.spec);\n for (var i = requestMap.length-1;i>=0;i--){\n if (requestMap[i][0].URI.spec == request.URI.spec /*&& \n requestMap[i][1].URI.spec == request.URI.originalURI.spec*/){\n tabulator.log.warn(\"redirecting back, but this might be a failure, see request.js\"); \n var fakePrevious = requestMap[i][1];\n //requestMap[i][0] = request;\n this._removeEntry(i);\n return fakePrevious;\n }\n \n }\n }\n \n tabulator.log.debug(\"found nothing in request array\");\n return null;\n };\n this.getDisplayURI = function (request){\n //returns the URI of the first non-301 response in a sequence of redirection if there is one\n // || request.URI.spec. seeAlso <http://lists.w3.org/Archives/Public/public-awwsw/2008Jan/0030.html>9\n var displayURI = request.URI.spec;\n \n // Does there exist an elegant way to write this?\n for (var requestIter=this.getPreviousRequest(request);requestIter;requestIter=this.getPreviousRequest(requestIter))\n if (requestIter.responseStatus != 301) displayURI = requestIter.URI.spec;\n return displayURI;\n };\n this.setPreviousRequest = function (thisRequest,previousRequest) {\n tabulator.log.debug(\"recording redirctions: previoiusRequest is %s with status %s, thisRequest is %s\",\n previousRequest.URI.spec, previousRequest.responseStatus, thisRequest.URI.spec);\n this._requestMap.push([thisRequest,previousRequest]);\n };\n this.releaseRequest = function (request){\n //tabulator.log.debug(\"attemp to remove %s\", request.URI.spec);\n var requestPointer = request;\n var mapLength = this._requestMap.length;\n for (var i=mapLength-1;i>=0;i--){\n if (requestPointer==this._requestMap[i][0]) {\n requestPointer = this._requestMap[i][1];\n this._removeEntry(i);\n }\n }\n };\n this._removeEntry = function (i) {\n tabulator.log.debug(\"%s removed, the length of the requestMap is %s\", \n this._requestMap[i][1].URI.spec, this._requestMap.length-1);\n tabulator.rdf.Util.RDFArrayRemove(this._requestMap, this._requestMap[i]); \n };\n}", "function addGoogTrans() {\r\n\treturn ''; // NOT USING YET\r\n}", "static protected internal function m125() {}", "function Nj(a,b){this.Wd=Dc(\"div\",\"blocklyToolboxDiv\");this.Wd.setAttribute(\"dir\",p?\"RTL\":\"LTR\");b.appendChild(this.Wd);this.Pa=new zh;a.appendChild(this.Pa.za());w(this.Wd,\"mousedown\",this,function(a){Xc(a)||a.target==this.Wd?we(!1):we(!0)})}", "function hackFrameScroll(){\n //document.head.appendChild(\"<style>html,body{height:auto;width: auto;}body{overflow-y:auto;}</style>\");\n var s=document.createElement(\"script\");\n s.type=\"text/javascript\";\n s.src=\"/js/jquery-2.1.4.min.js\";\n document.body.appendChild(s);\n var ss =document.createElement(\"script\");\n ss.type=\"text/javascript\";\n ss.src='/js/pym.min.js';\n document.body.appendChild(ss);\n}", "function test() {\n var params = 'param=valorEnviado';\n //alert(params);\n printText(null, params);\n}" ]
[ "0.55030835", "0.55003494", "0.54429686", "0.54147685", "0.5398537", "0.53779215", "0.53097284", "0.53071123", "0.5235395", "0.52288944", "0.5213894", "0.51850426", "0.51823974", "0.5176944", "0.51632684", "0.51238483", "0.51196563", "0.5100645", "0.50905436", "0.50900596", "0.5079034", "0.5066779", "0.5061182", "0.5049976", "0.50394046", "0.5013096", "0.5005673", "0.49936575", "0.49927148", "0.49790767", "0.49701443", "0.49647874", "0.49565133", "0.49561614", "0.4952582", "0.49487156", "0.49465153", "0.493233", "0.49170217", "0.49117237", "0.4905512", "0.4880339", "0.48754472", "0.48725826", "0.48606595", "0.4856591", "0.4856298", "0.4854709", "0.482597", "0.48244655", "0.48161903", "0.4814583", "0.48092675", "0.47868764", "0.47756836", "0.47744396", "0.4768775", "0.47653395", "0.47653395", "0.4759438", "0.4757588", "0.47523147", "0.47518393", "0.47517028", "0.4751058", "0.4736947", "0.47364846", "0.47299823", "0.47297773", "0.4722574", "0.47210753", "0.47114232", "0.47083092", "0.47077885", "0.46950895", "0.4694517", "0.46901587", "0.46900275", "0.46886057", "0.46886057", "0.46886057", "0.46876794", "0.46836454", "0.4683197", "0.4682275", "0.4681683", "0.46798465", "0.46797332", "0.46795055", "0.46771437", "0.46767735", "0.4676757", "0.46760094", "0.4672672", "0.4671011", "0.46650958", "0.4662169", "0.46567604", "0.46520638", "0.4646305", "0.4642042" ]
0.0
-1
======================================== Content Functions SRC: _libCommon =====================================================================
function timeoutIfNoAction() { var timeSince = new Date().getTime() - usrLastAction.getTime(); if (usrLoginId != '' && timeSince > usrTimeOutDuration) { if (TRUSTED_DEVICE) { var params = prepParams(params, 'keep_alive', 'select'); var successf = function(rslt) { }; serverCall(params, successf, FAILF); } else { usrLogoutScheduled = true; statusMsg('Logging Out User in 1 minute'); window.setTimeout(function() { if (usrLogoutScheduled) {logOutUser();} }, 60000); } } else { window.setTimeout(timeoutIfNoAction, usrTimeOutDuration); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _____SHARED_functions_____(){}", "transient protected internal function m189() {}", "static private internal function m121() {}", "static final private internal function m106() {}", "private internal function m248() {}", "function Common() {}", "function Utils() {}", "function Utils() {}", "function Common(){}", "transient private protected internal function m182() {}", "function Utils(){}", "protected internal function m252() {}", "function DWRUtil() { }", "transient private internal function m185() {}", "static private protected internal function m118() {}", "transient private protected public internal function m181() {}", "function AeUtil() {}", "function Common() {\n\n}", "transient final protected internal function m174() {}", "function fnMyLibraryAFunction (){}", "function Util() {}", "static final private protected public internal function m102() {}", "private public function m246() {}", "static final protected internal function m110() {}", "function CCUtility() {}", "function Utils() {\n}", "static final private public function m104() {}", "static private protected public internal function m117() {}", "function FunctionUtils() {}", "static final private protected internal function m103() {}", "function WSAPI() {\n }", "static transient private protected internal function m55() {}", "static transient final protected public internal function m46() {}", "static transient final private protected internal function m40() {}", "static transient final protected internal function m47() {}", "function DCKBVCommonUtils() {\n // purely static object at the moment, nothing in the instances.\n }", "static transient private protected public internal function m54() {}", "static transient final private internal function m43() {}", "function Helper() {}", "function _____INTERNAL_log_functions_____(){}\t\t//{", "function no_overlib() { return ver3fix; }", "transient private public function m183() {}", "function Library() {\n \n}", "function RgbaBase() {\n\n}", "static transient final protected function m44() {}", "function SigV4Utils() { }", "_initialize() {\n\n }", "function Kutility() {\n\n}", "function Kutility() {\n\n}", "function FAADataHelper() {\n}", "transient final private protected internal function m167() {}", "transient final private protected public internal function m166() {}", "function SBRecordsetPHP_analyzePlatformSpecific()\r\n{\r\n\r\n\r\n}", "function AppUtils() {}", "_initCommon() {\n // common.js initialization\n if (typeof Common !== 'undefined') {\n let common = new Common();\n }\n }", "transient final private internal function m170() {}", "function ArrayUtils() {}", "function logVBCS(){\r\n console.log(\" ------> RUNNING FROM EXTERNAL LIB <------\");\r\n}", "static fromCASFile(casfile) {\n//-----------\nlggr.warn(\"fromCASFile: Not implemented\");\nreturn void 0;\n}", "function _G() {}", "function _G() {}", "static transient private public function m56() {}", "function fCommonFunctionalities () {\n\n }", "static transient private internal function m58() {}", "static transient final private protected public internal function m39() {}", "function hook_libart() {\r\n var symbols = Module.enumerateSymbolsSync(\"libart.so\");\r\n var addrGetStringUTFChars = null;\r\n var addrNewStringUTF = null;\r\n var addrFindClass = null;\r\n var addrGetMethodID = null;\r\n var addrGetStaticMethodID = null;\r\n var addrGetFieldID = null;\r\n var addrGetStaticFieldID = null;\r\n var addrRegisterNatives = null;\r\n var so_name = \"lib\"; //TODO 这里写需要过滤的so\r\n\r\n for (var i = 0; i < symbols.length; i++) {\r\n var symbol = symbols[i];\r\n if (symbol.name.indexOf(\"art\") >= 0 &&\r\n symbol.name.indexOf(\"JNI\") >= 0 &&\r\n symbol.name.indexOf(\"CheckJNI\") < 0 &&\r\n symbol.name.indexOf(\"_ZN3art3JNIILb0\") >= 0\r\n ) {\r\n if (symbol.name.indexOf(\"GetStringUTFChars\") >= 0) {\r\n addrGetStringUTFChars = symbol.address;\r\n console.log(\"GetStringUTFChars is at \", symbol.address, symbol.name);\r\n } else if (symbol.name.indexOf(\"NewStringUTF\") >= 0) {\r\n addrNewStringUTF = symbol.address;\r\n console.log(\"NewStringUTF is at \", symbol.address, symbol.name);\r\n } else if (symbol.name.indexOf(\"FindClass\") >= 0) {\r\n addrFindClass = symbol.address;\r\n console.log(\"FindClass is at \", symbol.address, symbol.name);\r\n } else if (symbol.name.indexOf(\"GetMethodID\") >= 0) {\r\n addrGetMethodID = symbol.address;\r\n console.log(\"GetMethodID is at \", symbol.address, symbol.name);\r\n } else if (symbol.name.indexOf(\"GetStaticMethodID\") >= 0) {\r\n addrGetStaticMethodID = symbol.address;\r\n console.log(\"GetStaticMethodID is at \", symbol.address, symbol.name);\r\n } else if (symbol.name.indexOf(\"GetFieldID\") >= 0) {\r\n addrGetFieldID = symbol.address;\r\n console.log(\"GetFieldID is at \", symbol.address, symbol.name);\r\n } else if (symbol.name.indexOf(\"GetStaticFieldID\") >= 0) {\r\n addrGetStaticFieldID = symbol.address;\r\n console.log(\"GetStaticFieldID is at \", symbol.address, symbol.name);\r\n } else if (symbol.name.indexOf(\"RegisterNatives\") >= 0) {\r\n addrRegisterNatives = symbol.address;\r\n console.log(\"RegisterNatives is at \", symbol.address, symbol.name);\r\n } else if (symbol.name.indexOf(\"CallStatic\") >= 0) {\r\n console.log(\"CallStatic is at \", symbol.address, symbol.name);\r\n Interceptor.attach(symbol.address, {\r\n onEnter: function (args) {\r\n var module = Process.findModuleByAddress(this.returnAddress);\r\n if (module != null && module.name.indexOf(so_name) == 0) {\r\n var java_class = args[1];\r\n var mid = args[2];\r\n var class_name = Java.vm.tryGetEnv().getClassName(java_class);\r\n if (class_name.indexOf(\"java.\") == -1 && class_name.indexOf(\"android.\") == -1) {\r\n var method_name = prettyMethod(mid, 1);\r\n console.log(\"<>CallStatic:\", DebugSymbol.fromAddress(this.returnAddress), class_name, method_name);\r\n }\r\n }\r\n },\r\n onLeave: function (retval) { }\r\n });\r\n } else if (symbol.name.indexOf(\"CallNonvirtual\") >= 0) {\r\n console.log(\"CallNonvirtual is at \", symbol.address, symbol.name);\r\n Interceptor.attach(symbol.address, {\r\n onEnter: function (args) {\r\n var module = Process.findModuleByAddress(this.returnAddress);\r\n if (module != null && module.name.indexOf(so_name) == 0) {\r\n var jobject = args[1];\r\n var jclass = args[2];\r\n var jmethodID = args[3];\r\n var obj_class_name = Java.vm.tryGetEnv().getObjectClassName(jobject);\r\n var class_name = Java.vm.tryGetEnv().getClassName(jclass);\r\n if (class_name.indexOf(\"java.\") == -1 && class_name.indexOf(\"android.\") == -1) {\r\n var method_name = prettyMethod(jmethodID, 1);\r\n console.log(\"<>CallNonvirtual:\", DebugSymbol.fromAddress(this.returnAddress), class_name, obj_class_name, method_name);\r\n }\r\n }\r\n },\r\n onLeave: function (retval) { }\r\n });\r\n } else if (symbol.name.indexOf(\"Call\") >= 0 && symbol.name.indexOf(\"Method\") >= 0) {\r\n console.log(\"Call<>Method is at \", symbol.address, symbol.name);\r\n Interceptor.attach(symbol.address, {\r\n onEnter: function (args) {\r\n var module = Process.findModuleByAddress(this.returnAddress);\r\n if (module != null && module.name.indexOf(so_name) == 0) {\r\n var java_class = args[1];\r\n var mid = args[2];\r\n var class_name = Java.vm.tryGetEnv().getObjectClassName(java_class);\r\n if (class_name.indexOf(\"java.\") == -1 && class_name.indexOf(\"android.\") == -1) {\r\n var method_name = prettyMethod(mid, 1);\r\n console.log(\"<>Call<>Method:\", DebugSymbol.fromAddress(this.returnAddress), class_name, method_name);\r\n }\r\n }\r\n },\r\n onLeave: function (retval) { }\r\n });\r\n }\r\n }\r\n }\r\n\r\n if (addrGetStringUTFChars != null) {\r\n Interceptor.attach(addrGetStringUTFChars, {\r\n onEnter: function (args) {\r\n },\r\n onLeave: function (retval) {\r\n if (retval != null) {\r\n var module = Process.findModuleByAddress(this.returnAddress);\r\n if (module != null && module.name.indexOf(so_name) == 0) {\r\n var bytes = Memory.readCString(retval);\r\n console.log(\"[GetStringUTFChars] result:\" + bytes, DebugSymbol.fromAddress(this.returnAddress));\r\n }\r\n }\r\n }\r\n });\r\n }\r\n if (addrNewStringUTF != null) {\r\n Interceptor.attach(addrNewStringUTF, {\r\n onEnter: function (args) {\r\n if (args[1] != null) {\r\n var module = Process.findModuleByAddress(this.returnAddress);\r\n if (module != null && module.name.indexOf(so_name) == 0) {\r\n var string = Memory.readCString(args[1]);\r\n console.log(\"[NewStringUTF] bytes:\" + string, DebugSymbol.fromAddress(this.returnAddress));\r\n }\r\n\r\n }\r\n },\r\n onLeave: function (retval) { }\r\n });\r\n }\r\n\r\n if (addrFindClass != null) {\r\n Interceptor.attach(addrFindClass, {\r\n onEnter: function (args) {\r\n if (args[1] != null) {\r\n var module = Process.findModuleByAddress(this.returnAddress);\r\n if (module != null && module.name.indexOf(so_name) == 0) {\r\n var name = Memory.readCString(args[1]);\r\n console.log(\"[FindClass] name:\" + name, DebugSymbol.fromAddress(this.returnAddress));\r\n }\r\n }\r\n },\r\n onLeave: function (retval) { }\r\n });\r\n }\r\n if (addrGetMethodID != null) {\r\n Interceptor.attach(addrGetMethodID, {\r\n onEnter: function (args) {\r\n if (args[2] != null) {\r\n var clazz = args[1];\r\n var class_name = Java.vm.tryGetEnv().getClassName(clazz);\r\n var module = Process.findModuleByAddress(this.returnAddress);\r\n if (module != null && module.name.indexOf(so_name) == 0) {\r\n var name = Memory.readCString(args[2]);\r\n if (args[3] != null) {\r\n var sig = Memory.readCString(args[3]);\r\n console.log(\"[GetMethodID] class_name:\" + class_name + \" name:\" + name + \", sig:\" + sig, DebugSymbol.fromAddress(this.returnAddress));\r\n } else {\r\n console.log(\"[GetMethodID] class_name:\" + class_name + \" name:\" + name, DebugSymbol.fromAddress(this.returnAddress));\r\n }\r\n }\r\n }\r\n },\r\n onLeave: function (retval) { }\r\n });\r\n }\r\n if (addrGetStaticMethodID != null) {\r\n Interceptor.attach(addrGetStaticMethodID, {\r\n onEnter: function (args) {\r\n if (args[2] != null) {\r\n var clazz = args[1];\r\n var class_name = Java.vm.tryGetEnv().getClassName(clazz);\r\n var module = Process.findModuleByAddress(this.returnAddress);\r\n if (module != null && module.name.indexOf(so_name) == 0) {\r\n var name = Memory.readCString(args[2]);\r\n if (args[3] != null) {\r\n var sig = Memory.readCString(args[3]);\r\n console.log(\"[GetStaticMethodID] class_name:\" + class_name + \" name:\" + name + \", sig:\" + sig, DebugSymbol.fromAddress(this.returnAddress));\r\n } else {\r\n console.log(\"[GetStaticMethodID] class_name:\" + class_name + \" name:\" + name, DebugSymbol.fromAddress(this.returnAddress));\r\n }\r\n }\r\n }\r\n },\r\n onLeave: function (retval) { }\r\n });\r\n }\r\n if (addrGetFieldID != null) {\r\n Interceptor.attach(addrGetFieldID, {\r\n onEnter: function (args) {\r\n if (args[2] != null) {\r\n var module = Process.findModuleByAddress(this.returnAddress);\r\n if (module != null && module.name.indexOf(so_name) == 0) {\r\n var name = Memory.readCString(args[2]);\r\n if (args[3] != null) {\r\n var sig = Memory.readCString(args[3]);\r\n console.log(\"[GetFieldID] name:\" + name + \", sig:\" + sig, DebugSymbol.fromAddress(this.returnAddress));\r\n } else {\r\n console.log(\"[GetFieldID] name:\" + name, DebugSymbol.fromAddress(this.returnAddress));\r\n }\r\n }\r\n }\r\n },\r\n onLeave: function (retval) { }\r\n });\r\n }\r\n if (addrGetStaticFieldID != null) {\r\n Interceptor.attach(addrGetStaticFieldID, {\r\n onEnter: function (args) {\r\n if (args[2] != null) {\r\n var module = Process.findModuleByAddress(this.returnAddress);\r\n if (module != null && module.name.indexOf(so_name) == 0) {\r\n var name = Memory.readCString(args[2]);\r\n if (args[3] != null) {\r\n var sig = Memory.readCString(args[3]);\r\n console.log(\"[GetStaticFieldID] name:\" + name + \", sig:\" + sig, DebugSymbol.fromAddress(this.returnAddress));\r\n } else {\r\n console.log(\"[GetStaticFieldID] name:\" + name, DebugSymbol.fromAddress(this.returnAddress));\r\n }\r\n }\r\n }\r\n },\r\n onLeave: function (retval) { }\r\n });\r\n }\r\n\r\n if (addrRegisterNatives != null) {\r\n Interceptor.attach(addrRegisterNatives, {\r\n onEnter: function (args) {\r\n console.log(\"[RegisterNatives] method_count:\", args[3], DebugSymbol.fromAddress(this.returnAddress));\r\n var env = args[0];\r\n var java_class = args[1];\r\n var class_name = Java.vm.tryGetEnv().getClassName(java_class);\r\n\r\n var methods_ptr = ptr(args[2]);\r\n\r\n var method_count = parseInt(args[3]);\r\n for (var i = 0; i < method_count; i++) {\r\n var name_ptr = Memory.readPointer(methods_ptr.add(i * Process.pointerSize * 3));\r\n var sig_ptr = Memory.readPointer(methods_ptr.add(i * Process.pointerSize * 3 + Process.pointerSize));\r\n var fnPtr_ptr = Memory.readPointer(methods_ptr.add(i * Process.pointerSize * 3 + Process.pointerSize * 2));\r\n\r\n var name = Memory.readCString(name_ptr);\r\n var sig = Memory.readCString(sig_ptr);\r\n var find_module = Process.findModuleByAddress(fnPtr_ptr);\r\n console.log(\"[RegisterNatives] java_class:\", class_name, \"name:\", name, \"sig:\", sig, \"fnPtr:\", fnPtr_ptr, \"module_name:\", find_module.name, \"module_base:\", find_module.base, \"offset:\", ptr(fnPtr_ptr).sub(find_module.base));\r\n\r\n }\r\n },\r\n onLeave: function (retval) { }\r\n });\r\n }\r\n}", "function TMP(){return;}", "function TMP(){return;}", "static protected internal function m125() {}", "function oob_system(){\n\t\ntest_find_conflict();\n}//end function oob_system", "function _init() {\n }", "function _init() {\n }", "function _init() {\n }", "function publishDefaultGlobalUtils__PRE_R3__() {}", "function publishDefaultGlobalUtils__PRE_R3__() {}", "function Utils() {\n // All of the normal singleton code goes here.\n }", "function StupidBug() {}", "function __func(){}", "function overlib() {\n\tDDK.error(\"overlib is not enabled. To enable overlib, use the DDK Configuration Dashboard: amengine.aspx?config.mn=DDK2_Config\");\n}", "function WebIdUtils () {\n}", "function MASH_FileManager() {\n\n\n}", "function overlib(){\r\nif(!(OLloaded&&OLgateOK))return;\r\nif((OLexclusivePI)&&OLisExclusive(overlib.arguments))return true;\r\nif(OLchkMseCapture)OLmouseCapture();\r\nif(over)cClick();\r\n// Load defaults to runtime.\r\nOLloadP1or2();o3_close=ol_close;o3_closeclick=ol_closeclick;o3_closetitle=ol_closetitle;\r\no3_noclose=ol_noclose;o3_mouseoff=ol_mouseoff;o3_sticky=ol_sticky;o3_closecolor=ol_closecolor;\r\no3_closefont=ol_closefont;o3_closesize=ol_closesize;o3_closefontclass=ol_closefontclass;\r\nOLsetRunTimeVar();\r\nOLfnRef=\"\";OLhover=0;o3_frame=ol_frame;\r\nif(OLns4)over=o3_frame.document.layers['overDiv'];\r\nelse if(OLie4)over=o3_frame.document.all['overDiv'];\r\nelse if(OLns6)over=o3_frame.document.getElementById(\"overDiv\");\r\nOLparseTokens('o3_',overlib.arguments);\r\nif(OLbubblePI&&o3_bubble)OLchkForBubbleEffect();\r\nif(OLdebugPI&&o3_allowdebug!=\"\")OLsetDebugCanShow(o3_allowdebug);\r\nif(OLshadowPI)OLinitShadow();\r\nif(OLiframePI)OLinitIframe();\r\nif(OLfilterPI)OLinitFilterLyr();\r\n// Prepare status line\r\nif(OLexclusivePI&&o3_exclusive&&o3_exclusivestatus!=\"\")o3_status=o3_exclusivestatus;\r\nelse if(o3_autostatus==2&&o3_cap!=\"\")o3_status=o3_cap;\r\nelse if(o3_autostatus==1&&o3_text!=\"\")o3_status=o3_text;\r\nif(o3_delay==0){return OLmain();\r\n}else{o3_delayid=setTimeout(\"OLmain()\",o3_delay);\r\n// Set status line now if specified.\r\nif(o3_status!=\"\"){self.status=o3_status;return true;}\r\nelse if(!(OLop7&&event&&event.type=='mouseover'))return false;}\r\n}", "static __initStatic4() {this.COMBO = 0.5}", "function _init() {\n }", "static transient final private protected public function m38() {}", "function o0(o1)\n{\n var o2 = -1;\n try {\nfor (var o259 = 0; o3 < o1.length; function (o502, name, o38, o781, o782, o837, o585, o838, o549) {\n try {\no839.o468();\n}catch(e){}\n // TODO we should allow people to just pass in a complete filename instead\n // of parent and name being that we just join them anyways\n var o840 = name ? o591.resolve(o591.o592(o502, name)) : o502;\n\n function o841(o842) {\n function o843(o842) {\n try {\nif (!o838) {\n try {\no474.o800(o502, name, o842, o781, o782, o549);\n}catch(e){}\n }\n}catch(e){}\n try {\nif (o837) try {\no837();\n}catch(e){}\n}catch(e){}\n try {\no334('cp ' + o840);\n}catch(e){}\n }\n var o844 = false;\n try {\nModule['preloadPlugins'].forEach(function (o845) {\n try {\nif (o844) try {\nreturn;\n}catch(e){}\n}catch(e){}\n try {\nif (o845['canHandle'](o840)) {\n try {\no845['handle'](o842, o840, o843, function () {\n try {\nif (o585) try {\no585();\n}catch(e){}\n}catch(e){}\n try {\no334('cp ' + o840);\n}catch(e){}\n });\n}catch(e){}\n try {\no844 = true;\n}catch(e){}\n }\n}catch(e){}\n });\n}catch(e){}\n try {\nif (!o844) try {\no843(o842);\n}catch(e){}\n}catch(e){}\n }\n try {\no332('cp ' + o840);\n}catch(e){}\n try {\nif (typeof o38 == 'string') {\n try {\no839.o846(o38, function (o842) {\n try {\no841(o842);\n}catch(e){}\n }, o585);\n}catch(e){}\n } else {\n try {\no841(o38);\n}catch(e){}\n }\n}catch(e){}\n })\n {\n try {\nif (o1[o3] == undefined)\n {\n try {\nif (o2 == -1)\n {\n try {\no2 = o3;\n}catch(e){}\n }\n}catch(e){}\n }\n else\n {\n try {\nif (o2 != -1)\n {\n try {\no4.o5(o2 + \"-\" + (o3-1) + \" = undefined\");\n}catch(e){}\n try {\no2 = -1;\n}catch(e){}\n }\n}catch(e){}\n try {\no4.o5(o3 + \" = \" + o1[o3]);\n}catch(e){}\n }\n}catch(e){}\n }\n}catch(e){}\n}", "function baseLodash(){}// No operation performed.", "function baseLodash(){}// No operation performed.", "function baseLodash(){}// No operation performed.", "function baseLodash(){}// No operation performed.", "function baseLodash(){}// No operation performed.", "function baseLodash(){}// No operation performed.", "function baseLodash(){}// No operation performed.", "function baseLodash(){}// No operation performed.", "function Constants() {}", "function Constants() {}", "function UHRBase() {\n\n}", "function UHRBase() {\n\n}", "function compoxUtil() {\n\t// setAdjustMetaFunc\n\tApp.prototype.setAdjustMetaFunc = setAdjustMetaFunc;\n\t// dataTable\n\tApp.prototype.addDataTable = addDataTable;\n\tApp.prototype.getDataTable = getDataTable;\n\tApp.prototype.getDataTables = getDataTables;\n\t// comp\n\tApp.prototype.createComp = createComp;\n\tApp.prototype.getComp = getComp;\n\tApp.prototype.getCompsByDataTable = getCompsByDataTable;\n\tApp.prototype.getCompsByType = getCompsByType;\n\tApp.prototype.getComps = getComps;\n\tApp.prototype.getCompsByElement = getCompsByElement;\n\tApp.prototype.showComp = showComp;\n\t// validate\n\tApp.prototype.compsValidate = compsValidate;\n\tApp.prototype.compsValidateMultiParam = compsValidateMultiParam;\n\t// cache\n\tApp.prototype.setUserCache = setUserCache;\n\tApp.prototype.getUserCache = getUserCache;\n\tApp.prototype.removeUserCache = removeUserCache;\n\tApp.prototype.setCache = setCache;\n\tApp.prototype.getCache = getCache;\n\tApp.prototype.removeCache = removeCache;\n\tApp.prototype.setSessionCache = setSessionCache;\n\tApp.prototype.getSessionCache = getSessionCache;\n\tApp.prototype.removeSessionCache = removeSessionCache;\n\t// iwebCode\n\tApp.prototype.getEnvironment = getEnvironment;\n\tApp.prototype.setClientAttribute = setClientAttribute;\n\tApp.prototype.getClientAttribute = getClientAttribute;\n\t// ajax\n\tApp.prototype.ajax = ajax;\n\t// serverEvent\n\tApp.prototype.serverEvent = serverEvent;\n\t// util\n\tApp.prototype.setEnable = setEnable;\n}", "function NetworkUtil(){ \n}", "static private public function m119() {}" ]
[ "0.7471532", "0.65764624", "0.6545635", "0.64686495", "0.645713", "0.64404064", "0.64194584", "0.64194584", "0.6417254", "0.640311", "0.6334331", "0.6240642", "0.6224469", "0.61963916", "0.61932546", "0.61741394", "0.61453396", "0.61324304", "0.611919", "0.6114764", "0.61083925", "0.60818386", "0.6070486", "0.60439867", "0.6039114", "0.6001378", "0.5993125", "0.59901786", "0.59893125", "0.5973916", "0.5954897", "0.59282136", "0.5898684", "0.58105046", "0.58025044", "0.5777345", "0.5773511", "0.5745153", "0.57401437", "0.56884694", "0.56145597", "0.5609845", "0.55922264", "0.5588655", "0.55863875", "0.5584247", "0.5561595", "0.55302733", "0.55302733", "0.55103", "0.55034846", "0.54904824", "0.5473569", "0.54686606", "0.5461679", "0.5447314", "0.54386914", "0.54282445", "0.5422433", "0.5407908", "0.5407908", "0.54012746", "0.5397016", "0.5396851", "0.53810143", "0.5356862", "0.53322524", "0.53322524", "0.5330417", "0.5307761", "0.5289541", "0.5289541", "0.5289541", "0.5282866", "0.5282866", "0.52692056", "0.5265609", "0.5263961", "0.5258169", "0.5246105", "0.5243445", "0.52389014", "0.5238531", "0.5231315", "0.5230203", "0.521672", "0.5210857", "0.5210857", "0.5210857", "0.5210857", "0.5210857", "0.5210857", "0.5210857", "0.5210857", "0.52061737", "0.52061737", "0.5201915", "0.5201915", "0.51992345", "0.51978767", "0.51970774" ]
0.0
-1
Div Access and App Layout Calls SRC: _quickGolfScoreWeb =====================================================================
function showQuickGolfScore() { retrieveQuickGolfScoreList(); standardShowContentPane('quickGolfScore', 'Quick Golf Score Entry'); if (isFormEmpty('quickGolfScoreForm')) { toggleSaveMode('quickGolfScoreForm', false); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function changeLayout() {\r\n // Remove the buddy icon\r\n if (!showBuddyIcon) {\r\n $('table.launchHead').remove();\r\n\t\tGM_addStyle('#Main {margin-top: 15px ! important; }');\r\n }\r\n\r\n // Dynamic width of homepage contents\r\n if (dynamicWidth) {\r\n GM_addStyle(\r\n '.act-data { width: 95% ! important; }\\n' +\r\n '.tt-col1 { width: 50% ! important; min-height: 200px ! important; }\\n' +\r\n '.tt-col2 { width: 47% ! important; min-height: 200px ! important; }\\n' +\r\n '#Main { margin-left: 10px ! important; margin-right: 10px !important; }\\n' +\r\n '#Main, .Header, .NavBar, div.Footer { width: 98% ! important; }\\n');\r\n }\r\n\r\n // Gray background with rounded corners\r\n if (grayBackground) {\r\n GM_addStyle(\r\n '.saj-block, .tt-module, .tt-block { ' +\r\n\t\t\t'padding: 5px 3px ! important; background-color: #f6f6f6 ! important;' +\r\n\t\t\t(roundedBorder ? '-moz-border-radius: 3px ! important;' : '') +\r\n\t\t\t'border: 1px solid #cccccc ! important; }\\n' +\r\n\t\t\t'#y-groups > .bd > div:first-child { margin-top: 0 ! important; }\\n' +\r\n '.saj-block, #y-groups { margin-bottom: 20px ! important; }\\n');\r\n\t}\r\n\r\n // Extend links from group images so that the will link in the group pool\r\n if (linkToGroupPool) {\r\n\t\threfs = $('#y-groups .bd h3.special a').attr('href');\r\n\t\tif (typeof hrefs != 'undefined') {\r\n\t\t\tpoolUrl = hrefs.replace(/.*\\/groups\\//, '');\r\n\t\t\t$('div#y-groups span.photo_container a:not([href*=in/pool])').attr('href', function() {\r\n\t\t\t\treturn this.href + 'in/pool-' + poolUrl;\r\n\t\t\t});\r\n\t\t}\r\n }\r\n\r\n // Set position of modules\r\n function getNodeKey(n) {\r\n return n.tagName + ' ' + $(n).attr('id');\r\n }\r\n \r\n if (customPositions) {\r\n var nodes = [];\r\n $('.tt-col1,.tt-col2').children().each(function (i, v) {\r\n nodes[getNodeKey(v)] = v;\r\n });\r\n \r\n function setColumn(c, nodes) {\r\n parent = $(c);\r\n var m = eval(GM_getValue('state' + c));\r\n for (i in m) {\r\n\t\t\t\tnode = nodes[m[i]];\t\t\t\t\r\n\t\t\t\tif (typeof node != 'undefined') {\r\n\t\t\t\t\tparent.append($(nodes[m[i]]));\r\n\t\t\t\t}\r\n }\r\n }\r\n \r\n setColumn('.tt-col1', nodes);\r\n setColumn('.tt-col2', nodes);\r\n }\r\n \r\n // Drag & drop modules\r\n if (dragDrop) {\r\n GM_addStyle('.placeholder { border: 2px dashed #cccccc; }\\n');\r\n function saveColumnState(c) {\r\n var m = [];\r\n $(c).children().each(function (i, v) {\r\n m[i] = getNodeKey(v);\r\n });\r\n // window.setTimeout(GM_setValue, 0, 'state' + c, m.toSource());\r\n window.setTimeout(function() { GM_setValue('state' + c, m.toSource()) }, 0);\r\n }\r\n\r\n\t\tvar sortables = $('.tt-col1, .tt-col2, #ad-block');\r\n\t\tsortables.sortable({\r\n\t\t\titems: '.tt-module, .tt-block, #ad-block, .saj-block',\r\n\t\t\tconnectWith: $('.tt-col1, .tt-col2'),\r\n\t\t\tcursor: 'move',\r\n\t\t\tforcePlaceholderSize: 'true',\r\n\t\t\tplaceholder: 'placeholder',\r\n start: function(e,ui) {\r\n ui.helper.css('width', ui.item.width());\r\n },\r\n stop: function(e, ui) {\r\n saveColumnState('.tt-col1');\r\n saveColumnState('.tt-col2');\r\n }\r\n });\r\n }\r\n \r\n // Flickr blog\r\n if (!showBlog) {\r\n $('#tt-blog').remove();\r\n }\r\n\r\n // Tips\r\n if (!showTips) {\r\n $('#tt-tips').remove();\r\n }\r\n\r\n // Images in recent activity\r\n if (!showImages) {\r\n $('#y-photostream .act-content img').remove();\r\n }\r\n\r\n // Upload link\r\n if (showUploadInMenuBar) {\r\n $('#tt-upload').remove();\r\n $('ul.site_nav_menu_buttons').eq(0).append($('<li class=\"no_menu_li\"><span><a href=\"/photos/upload/\">Upload</a></span></li>'));\r\n }\r\n}", "function finalScorePage() {\n $('header').hide();\n $('main').html(`\n <div class=\"score-page\">\n\n <div id= \"score-bar\">\n <div class=\"col-2 final-score\">Final Score ${currentScore} out of 10</div>\n <div class=\"col-2\">\n <button type=\"button\" id=\"restart-quiz-button\">Restart Quiz</button>\n </div>\n <div>\n <img src=\"http://media.tumblr.com/160d74e4cdfe7a85177d89a4fdfe9e45/tumblr_n2r7yrKSVR1rqrh0yo1_1280.jpg\" alt=\"Black and White Cast Photo\" class=\"final-img-2\">\n </div>`);\n}", "function highscorePage () {\n finalContainer.setAttribute(\"class\",\"container d-none\");\n highScoreContainer.setAttribute(\"class\",\"container\");\n init();\n}", "function main() {\n // main widget code\n\n jQuery(document).ready(function ($) {\n var rule_id = scriptTag.src.split(\"?id=\")[1];\n var site_path = scriptTag.src.split(\"?id=\")[0];\n var hostname = $('<a>').prop('href', site_path).prop('protocol') + '//' + $('<a>').prop('href', site_path).prop('host');\n var baseURI = window.location.pathname+location.search;\n\n var api_url = hostname+\"/api/check-rule-conditions/\"+rule_id;\n jQuery.getJSON(api_url, {url: baseURI}, function(result) {\n console.log(result);\n if(result.show) {\n alert(result.text)\n }\n });\n\n\n });\n }", "function run () {\n load_userinfo();\n if (url.includes(\"discuss\")) {\n load_images();\n load_scratchblockcode();\n load_bbcode();\n add_bbbuttons();\n }\n }", "function letsJQuery() {\n get_layout();\n}", "function load_banner () {\n if (url == \"https://scratch.mit.edu/\" && GM_getValue(\"pos\", \"top\") != \"none\") {//on main page\n console.log(\"loading banner\");\n let box = element(\"div\").a(\"class\", \"box\")\n .append(element(\"div\").a(\"class\", \"box-header\")\n .append(element(\"h4\").t(\"Resurgence Userscript Info\"))\n .append(element(\"h5\"))\n .append(element(\"p\")\n .append(element(\"a\").a(\"href\", \"https://github.com/Wetbikeboy2500/Resurgence\").t(\"Resurgence Github\"))\n )\n )\n .append(element(\"div\").a(\"class\", \"box-content\")\n .append(element(\"p\").t(\"Current Version: \" + currentVersion).a(\"style\", \"margin: 0;\"))\n .append(element(\"p\").a(\"style\", \"margin: 0;\").t(\"Recent Version:\").a(\"id\", \"recent_version\"))\n .append(element(\"div\").a(\"id\", \"changelog\").a(\"style\", \"position: relative; left: 60%; top: -54px; width: 40%; height: 54px; margin-bottom: -54px; border: 1px solid #D9D9D9; border-radius: 25px; background-color: white; overflow: hidden;\")\n .append(element(\"div\").a(\"style\", \"width: 100%; height: 100%; overflow-y: scroll; position: absolute; top: 0px; left: 0px;\")\n .append(element(\"button\").a(\"style\", \"display: inline-block; height: 54px; line-height: 15px; background-color: #F2F2F2; border: 1px solid #D9D9D9; border-radius: 25px; margin: auto; padding: 10px;\").t(\"Expand change log\").a(\"data-expanded\", \"false\")\n .e(\"click\", (e) => {\n let target = document.getElementById(\"changelog\");\n if (e.currentTarget.getAttribute(\"data-expanded\") == \"false\") {\n e.currentTarget.parentElement.style.height = \"\";\n e.currentTarget.parentElement.style[\"overflow-y\"] = \"\";\n const height = e.currentTarget.parentElement.getBoundingClientRect().height;\n target.style.height = height + \"px\";\n target.style[\"margin-bottom\"] = (-1 * height) + \"px\";\n e.currentTarget.setAttribute(\"data-expanded\", \"true\");\n e.currentTarget.innerHTML = \"Collapse change log\";\n } else {\n e.currentTarget.parentElement.style.height = \"100%\";\n e.currentTarget.parentElement.style[\"overflow-y\"] = \"scroll\";\n target.style.height = 54 + \"px\";\n target.style[\"margin-bottom\"] = -54 + \"px\";\n e.currentTarget.setAttribute(\"data-expanded\", \"false\");\n e.currentTarget.innerHTML = \"Expand change log\"\n }\n })\n )\n .append(element(\"ul\").a(\"style\", \"padding-right: 5px;\")\n .append(element(\"h5\").t(\"Changes in \" + currentVersion).a(\"style\", \"margin: 0px; display: inline-block\"))\n .append(element(\"li\").t(\"Countdowns to multiple holidays\"))\n .append(element(\"li\").t(\"There is now a change log you can view (if I decide to update this)\"))\n .append(element(\"li\").t(\"Recent version now displays correctly\"))\n .append(element(\"li\").t(\"Updated code to use fetch instead of xhttprequests with promises\"))\n .append(element(\"li\").t(\"Changed run order for better loading\"))\n .append(element(\"li\").t(\"Numerous changes to the code be less buggy\"))\n .append(element(\"li\").t(\"Improved feel of changelog\"))\n )\n )\n )\n );\n if (GM_getValue(\"pos\", \"top\") == \"top\") {\n document.getElementsByClassName(\"mod-splash\")[0].insertBefore(box.dom, document.getElementsByClassName(\"mod-splash\")[0].children[0]);\n } else {\n box.apthis(document.getElementsByClassName(\"mod-splash\")[0]);\n }\n\n //gets the current version of the code from the github page\n fetch(\"https://raw.githubusercontent.com/Wetbikeboy2500/Resurgence/master/ScratchFixer.user.js\")\n .then((response) => { return response.text() })\n .then((text) => {\n const version = text.substring(text.indexOf(\"@version\") + 9, text.indexOf(\"// @description\") - 1);\n let tmpVersion = Number(version);\n if (tmpVersion != currentVersion) {\n if (tmpVersion < GM_info.script.version) {\n document.getElementById(\"recent_version\").innerHTML = \"Recent Version: \" + version + \" \";\n element(\"a\").a(\"href\", \"https://raw.githubusercontent.com/Wetbikeboy2500/Resurgence/master/ScratchFixer.user.js\").t(\"Downgrade (Your version is too revolutionary)\").apthis(document.getElementById(\"recent_version\"));\n } else {\n document.getElementById(\"recent_version\").innerHTML = \"Recent Version: \" + version + \" \";\n element(\"a\").a(\"href\", \"https://raw.githubusercontent.com/Wetbikeboy2500/Resurgence/master/ScratchFixer.user.js\").t(\"Update\").apthis(document.getElementById(\"recent_version\"));\n }\n } else {\n document.getElementById(\"recent_version\").innerHTML = \"Recent Version: \" + version;\n }\n })\n .catch((e) => {\n console.warn(\"An error occured while getting the version\", e);\n });\n }\n }", "function initMain(){\n\tbuildGameButton();\n\tbuildGameStyle();\n\tbuildScoreboard();\n\t\n\tgoPage('main');\n\tloadXML('questions.xml');\n}", "function goScorePage(page) {\n var targetContainer;\n $(\".resultExtra\").show();\n $(\".scoreContent\").hide();\n $(\".submitContent\").hide();\n\n switch (page) {\n case \"submit\":\n targetContainer = $(\".submitContent\");\n break;\n\n case \"scoreboard\":\n targetContainer = $(\".scoreContent\");\n if (categoryPage) {\n loadScoreboard(gameData.category_arr[gameData.categoryNum]);\n } else {\n loadScoreboard(\"\");\n }\n break;\n\n case \"\":\n targetContainer = null;\n $(\".resultExtra\").hide();\n break;\n }\n\n if (targetContainer != null) {\n targetContainer.show();\n }\n}", "function HomeContent() {}", "function Layout()\n{\n \n}", "function cityInformation_fn() {\r\n if (!checkAlreadyShown()) {\r\n playerAllycont = document.getElementsByClass(\"ally\")[0];\r\n if (whatToShow != 0) { // If the value of this is 0, then nothing is to be displayed.\r\n var listParts = document.getElementsByClass(\"owner\")[0].innerHTML.split(\">\");\r\n listParts[2] = listParts[2].split(\"<\")[0];\r\n var playerName = listParts[2].replace(/^\\s+|\\s+$/g, ''); // trim up the Player Name\r\n var mainspan = document.createElement(\"span\");\r\n mainspan.setAttribute(\"id\", \"score_main\");\r\n var linkspan = document.getElementById('magicdiv');\r\n if (linkspan != null ) {\r\n playerAllycont.insertBefore(mainspan, linkspan);\r\n } else {\r\n playerAllycont.appendChild(mainspan);\r\n }\r\n scoreMainCont = document.getElementById('score_main');\r\n if (whatToShow in {1:'', 3:'', 5:'', 7:''}) { //Show Total Score Link\r\n if (inlineScore == false) { // Show only link\r\n if (whatToShow == 1) { // Show Total Score Link (in end of line method)\r\n scoreMainCont.innerHTML = scoreMainCont.innerHTML + \"<div style=\\\"clear: both;\\\"></div><span style=\\\"font-weight: normal; margin-top: 3px;\\\" class=\\\"textLabel\\\">Score Links:</span><form name='searchFormTotal' id='searchFormTotal' action='http://\" + gameServer + \"/index.php' method='POST'>\\n<img style=\\\"display: inline; margin: 0px; width: 16px; height: 16px; cursor: pointer;\\\" alt=\\\"View players total score\\\" title=\\\"View players total score\\\" src=\\\"http://\" + gameServer + \"/skin/layout/medallie32x32_gold.gif\\\" onclick=\\\"document.searchFormTotal.submit();\\\" />\\n<div style=\\\"display: none;\\\"><input type='hidden' name='view' value='highscore' />\\n<input type='hidden' name='highscoreType' value='score' />\\n<input type='hidden' name='searchUser' value='\" + playerName + \"' /></div></form>\";\r\n }\r\n if (whatToShow == 3 || whatToShow == 5 || whatToShow == 7) { // Show Total Score Link (float'ed so line can continue)\r\n scoreMainCont.innerHTML = scoreMainCont.innerHTML + \"<div style=\\\"clear: both;\\\"></div><span style=\\\"font-weight: normal; margin-top: 3px;\\\" class=\\\"textLabel\\\">Score Links:</span><form name='searchFormTotal' id='searchFormTotal' action='http://\" + gameServer + \"/index.php' method='POST'>\\n<img style=\\\"float:left; display: inline; margin: 0px; width: 16px; height: 16px; cursor: pointer;\\\" alt=\\\"View players total score\\\" title=\\\"View players total score\\\" src=\\\"http://\" + gameServer + \"/skin/layout/medallie32x32_gold.gif\\\" onclick=\\\"document.searchFormTotal.submit();\\\" />\\n<div style=\\\"display: none;\\\"><input type='hidden' name='view' value='highscore' />\\n<input type='hidden' name='highscoreType' value='score' />\\n<input type='hidden' name='searchUser' value='\" + playerName + \"' /></div></form>\";\r\n }\r\n } else { // Show total score inline\r\n scoreMainCont.innerHTML = scoreMainCont.innerHTML + \"<div style=\\\"clear: both;\\\"></div><span style=\\\"font-weight: normal; margin-top: 3px;\\\" class=\\\"textLabel\\\">Total Score:</span><span style=\\\"float: left; font-weight: normal; margin-top: 3px;\\\" id=\\\"bod_tot_score\\\">fetching...</span>\";\r\n if (playerName != GM_getValue(\"lastPlayerCheck\") || GM_getValue(\"totalScore\") =='undefined' || GM_getValue(\"lastCheckedTimestamp\") < (new Date().getTime() - (1000*60*10))) {\r\n requestScore(playerName, 'score', function(responseDetails){\r\n var mybox = document.createElement(\"div\");\r\n mybox.setAttribute(\"style\", \"display: none;\");\r\n document.body.appendChild(mybox);\r\n mybox.innerHTML = responseDetails.responseText\r\n var all = mybox.getElementsByTagName('*');\r\n var score = new Array();\r\n for (var e = 0; e < all.length; e++)\r\n if (all[e].className == \"score\")\r\n score[score.length] = all[e];\r\n var pname = new Array();\r\n for (var e = 0; e < all.length; e++)\r\n if (all[e].className == \"name\")\r\n pname[pname.length] = all[e];\r\n for (var e = 0; e < pname.length; e++)\r\n if (pname[e].innerHTML == playerName)\r\n var totalScore = score[e].innerHTML;\r\n document.getElementById('bod_tot_score').innerHTML = totalScore;\r\n document.body.removeChild(mybox);\r\n GM_setValue(\"totalScore\", totalScore);\r\n });\r\n GM_setValue(\"lastCheckedTimestamp\", (new Date().getTime()) + \"\");\r\n } else {\r\n document.getElementById('bod_tot_score').innerHTML = GM_getValue(\"totalScore\");\r\n }\r\n }\r\n }\r\n if (whatToShow in {2:'', 3:'', 6:'', 7:''}) { // Show Military Score Link\r\n if (inlineScore == false) { // Show only link\r\n if (whatToShow == 2) { // Military Score Link is only link\r\n scoreMainCont.innerHTML = scoreMainCont.innerHTML + \"<div style=\\\"clear: both;\\\"></div><span style=\\\"font-weight: normal; margin-top: 3px;\\\" class=\\\"textLabel\\\">Score Links:</span><form name='searchFormMil' id='searchFormMil' action='http://\" + gameServer + \"/index.php' method='POST'>\\n<img style=\\\"display: inline; margin: 0px; width: 16px; height: 16px; cursor: pointer;\\\" alt=\\\"View players military score\\\" title=\\\"View players military score\\\" src=\\\"http://\" + gameServer + \"/skin/layout/sword-icon2.gif\\\" onclick=\\\"document.searchFormMil.submit();\\\" />\\n<div style=\\\"display: none;\\\"><input type='hidden' name='view' value='highscore' />\\n<input type='hidden' name='highscoreType' value='army_score_main' />\\n<input type='hidden' name='searchUser' value='\" + playerName + \"' /></div></form>\";\r\n }\r\n if (whatToShow == 3 || whatToShow == 6 || whatToShow == 7) { // Show Military Score Link\r\n scoreMainCont.innerHTML = scoreMainCont.innerHTML + \"<form name='searchFormMil' id='searchFormMil' action='http://\" + gameServer + \"/index.php' method='POST'>\\n<img style=\\\"float: left; display: inline; margin: 0px; width: 16px; height: 16px; cursor: pointer;\\\" alt=\\\"View players military score\\\" title=\\\"View players military score\\\" src=\\\"http://\" + gameServer + \"/skin/layout/sword-icon2.gif\\\" onclick=\\\"document.searchFormMil.submit();\\\" />\\n<div style=\\\"display: none;\\\"><input type='hidden' name='view' value='highscore' />\\n<input type='hidden' name='highscoreType' value='army_score_main' />\\n<input type='hidden' name='searchUser' value='\" + playerName + \"' /></div></form>\";\r\n }\r\n } else { // Show military score inline\r\n scoreMainCont.innerHTML = scoreMainCont.innerHTML + \"<div style=\\\"clear: both;\\\"></div><span style=\\\"font-weight: normal; margin-top: 3px;\\\" class=\\\"textLabel\\\">Generales:</span><span style=\\\"float: left; font-weight: normal; margin-top: 3px;\\\" id=\\\"bod_mil_score\\\">fetching...</span>\";\r\n if (playerName != GM_getValue(\"lastPlayerCheck\") || GM_getValue(\"militaryScore\") =='undefined' || GM_getValue(\"lastCheckedTimestamp\") < (new Date().getTime() - (1000*60*10))) {\r\n requestScore(playerName, 'army_score_main', function(responseDetails){\r\n var mybox = document.createElement(\"div\");\r\n mybox.setAttribute(\"style\", \"display: none;\");\r\n document.body.appendChild(mybox);\r\n mybox.innerHTML = responseDetails.responseText\r\n var all = mybox.getElementsByTagName('*');\r\n var score = new Array();\r\n for (var e = 0; e < all.length; e++)\r\n if (all[e].className == \"score\")\r\n score[score.length] = all[e];\r\n var pname = new Array();\r\n for (var e = 0; e < all.length; e++)\r\n if (all[e].className == \"name\")\r\n pname[pname.length] = all[e];\r\n for (var e = 0; e < pname.length; e++)\r\n if (pname[e].innerHTML == playerName)\r\n var militaryScore = score[e].innerHTML;\r\n document.getElementById('bod_mil_score').innerHTML = militaryScore;\r\n document.body.removeChild(mybox);\r\n GM_setValue(\"militaryScore\", militaryScore);\r\n });\r\n GM_setValue(\"lastCheckedTimestamp\", (new Date().getTime()) + \"\");\r\n } else {\r\n document.getElementById('bod_mil_score').innerHTML = GM_getValue(\"militaryScore\");\r\n }\r\n }\r\n }\r\n if (whatToShow in {4:'', 5:'', 6:'', 7:''}) { // Show Military Score Link\r\n if (inlineScore == false) { // Show only link\r\n if (whatToShow == 4) { // Gold Score Link is only link\r\n scoreMainCont.innerHTML = scoreMainCont.innerHTML + \"<div style=\\\"clear: both;\\\"></div><span style=\\\"font-weight: normal; margin-top: 3px;\\\" class=\\\"textLabel\\\">Score Links:</span>\";\r\n } // Show Gold Score Link\r\n scoreMainCont.innerHTML = scoreMainCont.innerHTML + \"<form name='searchFormMon' id='searchFormMon' action='http://\" + gameServer + \"/index.php' method='POST'>\\n<img style=\\\"display: inline; margin: 0px; width: 16px; height: 16px; cursor: pointer;\\\" alt=\\\"View players gold score\\\" title=\\\"View players gold score\\\" src=\\\"http://\" + gameServer + \"/skin/resources/icon_gold.gif\\\" onclick=\\\"document.searchFormMon.submit();\\\" />\\n<div style=\\\"display: none;\\\"><input type='hidden' name='view' value='highscore' />\\n<input type='hidden' name='highscoreType' value='trader_score_secondary' />\\n<input type='hidden' name='searchUser' value='\" + playerName + \"' /></div></form>\";\r\n } else { // Show gold score inline\r\n scoreMainCont.innerHTML = scoreMainCont.innerHTML + \"<div style=\\\"clear: both;\\\"></div><span style=\\\"font-weight: normal; margin-top: 3px;\\\" class=\\\"textLabel\\\">Oro:</span><span style=\\\"float: left; font-weight: normal; margin-top: 3px;\\\" id=\\\"bod_mon_score\\\">fetching...</span>\";\r\n if (playerName != GM_getValue(\"lastPlayerCheck\") || GM_getValue(\"goldScore\") =='undefined' || GM_getValue(\"lastCheckedTimestamp\") < (new Date().getTime() - (1000*60*10))) {\r\n requestScore(playerName, 'trader_score_secondary', function(responseDetails){\r\n var mybox = document.createElement(\"div\");\r\n mybox.setAttribute(\"style\", \"display: none;\");\r\n document.body.appendChild(mybox);\r\n mybox.innerHTML = responseDetails.responseText\r\n var all = mybox.getElementsByTagName('*');\r\n var score = new Array();\r\n for (var e = 0; e < all.length; e++)\r\n if (all[e].className == \"score\")\r\n score[score.length] = all[e];\r\n var pname = new Array();\r\n for (var e = 0; e < all.length; e++)\r\n if (all[e].className == \"name\")\r\n pname[pname.length] = all[e];\r\n for (var e = 0; e < pname.length; e++)\r\n if (pname[e].innerHTML == playerName)\r\n var goldScore = score[e].innerHTML;\r\n document.getElementById('bod_mon_score').innerHTML = goldScore;\r\n document.body.removeChild(mybox);\r\n GM_setValue(\"goldScore\", goldScore);\r\n });\r\n GM_setValue(\"lastCheckedTimestamp\", (new Date().getTime()) + \"\");\r\n } else {\r\n document.getElementById('bod_mon_score').innerHTML = GM_getValue(\"goldScore\");\r\n }\r\n }\r\n }\r\n GM_setValue(\"lastPlayerCheck\", playerName);\r\n }\r\n playerAllycont.innerHTML = playerAllycont.innerHTML + \"<div style=\\\"clear: both;\\\"></div><div id=\\\"magicdiv\\\" style=\\\"clear: both; text-align: center;\\\"><span id=\\\"playertag\\\" title=\\\"Change score options\\\" style=\\\"cursor: pointer; text-decoration: underline;\\\">Opciones</span></div>\";\r\n document.getElementById('playertag').addEventListener('click', function() { window.location = \"http://\" + gameServer + \"/index.php?view=options\"; }, true);\r\n if (typeof GM_getValue(\"lastPlayerCheck\") == 'undefined') {\r\n GM_setValue(\"lastPlayerCheck\", playerName);\r\n }\r\n }\r\n}", "function GGTRCC_RenderPlayerStats (aPLSO)\r\n{\r\n\tvar lRet=\"\";\r\n\t\r\n\t//\r\n\t// A problem started in October 2020, where the URL 'parameters'\r\n\t// (those bits of the URL after the '&') became unavailable to the\r\n\t// _args()[\"parent\"] & document.referer variables. This meant that this \r\n\t// page would not work as expected as the \"Sumamry\", \"Batting\" & \"Bowling\"\r\n\t// tabs (which used \"&render=batting\" etc.) would not render as expected.\r\n\t//\r\n\t\r\n\t//\r\n\t// Batting & Bowling arrays\r\n\t//\r\n\tvar lXarr = GGTRCC_PlayerLTGraph_MakeBattingArray (aPLSO);\r\n\tvar lBoarr = GGTRCC_PlayerLTGraph_MakeBowlingArray (aPLSO);\r\n\t\r\n\t//\r\n\t// When did the person play first?\r\n\t// \r\n\tif (null != aPLSO.mFRG)\r\n\t{\r\n\t\tlRet += \"First recorded game for this player was on \" + aPLSO.mFRG.FullDate() + \" at \" + aPLSO.mFRG.LinkHTML() + \"<br><br>\";\r\n\t}\r\n\t\r\n\t//\r\n\t// Batting summaries\r\n\t//\r\n\tlRet += GGTRCC_RenderBattingSummary (aPLSO, lXarr);\r\n\r\n\t//\r\n\t// Bowling summaries\r\n\t//\r\n\tlRet += GGTRCC_RenderBowlingSummary (aPLSO, lBoarr);\r\n\r\n\tlRet += \"<div id='centeredmenu'></div>\";\t// Divider\r\n\r\n\t//\r\n\t// Batting details\r\n\t//\r\n\tlRet += GGTRCC_RenderBowlingDetails (aPLSO, lBoarr);\r\n\r\n\tlRet += \"<div id='centeredmenu'></div>\";\t// Divider\r\n\r\n\t//\r\n\t// Bowling details\r\n\t//\r\n\tlRet += GGTRCC_RenderBattingDetails (aPLSO, lXarr);\r\n\t\t\r\n\treturn (lRet);\r\n}", "function app(el, config, doc, charts) {\n\n\t//console.log(el)\n\n el.innerHTML = mainHTML.replace(/%assetPath%/g, config.assetPath);\n\n let q=1,\n query=window.location.search.replace(\"?\",\"\").split(\"=\");\n if(query[0]===\"q\") {\n q=+query[1];\n q=(isNaN(q)||q===0)?1:q;\n }\n\n let frameRequest = requestAnimationFrame(function checkInnerHTML(time) {\n //console.log(time)\n var b=document.querySelector(\"#NHSQuiz\");\n if(b && b.getBoundingClientRect().height) {\n cancelAnimationFrame(checkInnerHTML);\n\n if(q) {\n //d3.select(el).classed(\"embed\",true)\n iframeMessenger.enableAutoResize();\n }\n retrieveAVG(q);\n return; \n }\n frameRequest = requestAnimationFrame(checkInnerHTML);\n });\n\n \n}", "function ScreenshotUrlLayout(){\n StartConfig();\n UploadFormScreenshot[0].style.display = \"inline\";\n}", "function main() {\n window.addEventListener('load', onBodyLoad)\n\n NodeList.prototype.forEach = HTMLCollection.prototype.forEach = Array.prototype.forEach\n\n useCompanion = (location.href.indexOf('?companion') != -1) ||\n (location.href.indexOf('&companion') != -1)\n useLocalServer = (location.href.indexOf('?local') != -1) ||\n (location.href.indexOf('&local') != -1)\n\n slideEls = document.querySelectorAll('.presentation > div')\n}", "function editPage_Content(){\n\t\treturn ''+\n\t\t\t\"<div id='notation'>&#x20E2;</div>\" +\n\t\t\t\"<canvas id='glypheditcanvas' width=12 height=12 ></canvas>\" +\n\t\t\t\"<div id='toolsarea_upperleft' onmouseover='mouseovercec();'> (ノ°□°)ノ︵ ┻━┻ </div>\" +\n\t\t\t\"<div id='toolsarea_upperright'>&nbsp;</div>\" +\n\t\t\t\"<div id='toolsarea_lowerleft'>&nbsp;</div>\" +\n\t\t\tmakeFloatLogo();\n\t}", "function loadPluginView(id){\r\n loadContent(\"pluginShopView.php?objectId=\"+id,\"centerDiv\");\r\n}", "function main() {\n // Specify jQuery UI easing method\n jQuery.easing.def = 'easeInOutQuad';\n\n // Google+ DOM check\n var $gbar = $(_ID_GBAR);\n var mappingKey = '';\n if ($gbar.length)\n mappingKey = $gbar.parent().attr('class');\n if (! $gbar.length || (' ' + mappingKey + ' ').indexOf(' ' + C_GBAR + ' ') < 0) {\n error(\"Google+ has changed is layout again (DOM CSS), breaking G+me. Please report the problem to http://huyz.us/gpme-release/ and I will fix it right away.\");\n getAppDetailsFromBackground(function(theAppDetails) {\n appDetails = theAppDetails;\n injectNews(mappingKey);\n });\n }\n\n // Listen for when there's a total AJAX refresh of the stream,\n // on a regular page\n var $contentPane = $(_ID_CONTENT_PANE);\n if ($contentPane.length) {\n var contentPane = $contentPane.get(0);\n $contentPane.bind('DOMNodeInserted', function(e) {\n // This happens when a new stream is selected\n if (e.relatedNode.parentNode == contentPane) {\n // We're only interested in the insertion of entire content pane\n onContentPaneUpdated(e);\n return;\n }\n\n var id = e.target.id;\n // ':' is weak optimization attempt for comment editing\n if (id && id.charAt(0) == ':')\n return;\n\n // This happens when posts' menus get inserted.\n // Also Usability Boost's star\n //debug(\"DOMNodeInserted: id=\" + id + \" className=\" + e.target.className);\n if (e.target.className == C_MENU || e.target.className == CF_MENU || e.target.className == C_UBOOST_STAR)\n onItemDivInserted(e);\n // This happens when a new post is added, either through \"More\"\n // or a new recent post.\n // Or it's a Start G+ post\n else if (id && (id.substring(0,7) == 'update-'))\n onItemInserted(e);\n else if (settings.nav_compatSgp && id.substring(0,9) == ID_SGP_POST_PREFIX )\n onSgpItemInserted(e);\n // This happens when switching from About page to Posts page\n // on profile\n else if (e.relatedNode.id.indexOf('-posts-page') > 0)\n onContentPaneUpdated(e);\n });\n } else {\n // This can happen if we're in the settings page for example\n warn(\"main: Can't find content pane\");\n }\n\n // Listen when status change\n // WARNING: DOMSubtreeModified is deprecated and degrades performance:\n // https://developer.mozilla.org/en/Extensions/Performance_best_practices_in_extensions\n var $status = $(_ID_STATUS_FG);\n if ($status.length)\n $status.bind('DOMSubtreeModified', onStatusUpdated);\n else\n // Sometimes this happens with G+ for some reason. Happened at times when I was\n // reloading a profile page.\n debug(\"main: Can't find status node; badges won't work.\");\n\n // Listen to incoming messages from background page\n chrome.extension.onRequest.addListener(function(request, sender, sendResponse) {\n if (request.action == \"gpmeTabUpdateComplete\") {\n // Handle G+'s history state pushing when user clicks on different streams (and back)\n onTabUpdated();\n } else if (request.action == \"gpmeModeOptionUpdated\") {\n // Handle options changes\n onModeOptionUpdated(request.mode);\n } else if (request.action == \"gpmeResetAll\") {\n onResetAll();\n } else if (request.action == \"gpmeBrowserActionClick\") {\n onBrowserActionClick();\n }\n });\n\n // Listen for scrolling events\n //$(window).scroll($.throttle(500, 50, function(e) { onScroll(e); }));\n\n //injectNewFeedbackLink();\n\n // The initial update\n if (isEnabledOnThisPage()) {\n updateAllItems();\n\n // Listen to keyboard shortcuts\n $(window).keydown(onKeydown);\n\n // Set up a lscache cleanup in 5 minutes, keeping 30 days of history\n setTimeout(function() { lscache.removeOld(30 * 24 * 60, LS_HISTORY_); }, 5 * 60000);\n }\n}", "function Action()\n{\n\tweb.url(\n\t\t{\n\t\t\t\t\t\tname : 'www.elcorteingles.es', \n\t\t\turl : 'http://www.elcorteingles.es/', \n\t\t\ttargetFrame : '', \n\t\t\tresource : 0, \n\t\t\trecContentType : 'text/html', \n\t\t\treferer : '', \n\t\t\tsnapshot : 't1.inf', \n\t\t\tmode : 'HTML', \n\t\t\textraRes : [\n\t\t\t\t{url : '/sgfm/SGFM/assets/stylesheets/fonts/opensans-regular-webfont.woff', referer : 'http://www.elcorteingles.es/sgfm/SGFM/assets/stylesheets/crs.css'},\n\t\t\t\t{url : '/sgfm/SGFM/assets/stylesheets/fonts/opensans-bold-webfont.woff', referer : 'http://www.elcorteingles.es/sgfm/SGFM/assets/stylesheets/crs.css'},\n\t\t\t\t{url : '/sgfm/SGFM/assets/stylesheets/fonts/moonshine-font.woff', referer : 'http://www.elcorteingles.es/sgfm/SGFM/assets/stylesheets/crs.css'},\n\t\t\t\t{url : '/sgfm/SGFM/assets/javascripts/library/external/dust-helpers.min.js'},\n\t\t\t\t{url : '/sgfm/SGFM/assets/stylesheets/fonts/lato-regular-webfont.woff', referer : 'http://www.elcorteingles.es/sgfm/SGFM/assets/stylesheets/crs.css'},\n\t\t\t\t{url : '/sgfm/SGFM/assets/javascripts/library/external/dust-core.min.js'},\n\t\t\t\t{url : 'http://www.googletagmanager.com/gtm.js?id=GTM-TMQVMD'},\n\t\t\t\t{url : '/sgfm/SGFM/assets/javascripts/compiled/templates.js'},\n\t\t\t\t{url : '/sgfm/SGFM/assets/javascripts/library/external/form2js.min.js'},\n\t\t\t\t{url : '/sgfm/SGFM/assets/stylesheets/images/confianza-online-icon.svg', referer : 'http://www.elcorteingles.es/sgfm/SGFM/assets/stylesheets/crs.css'}\n\t\t\t]\n\t\t}\n\t);\n\n\treturn 0;\n}", "function htmlIntro() {\n \n document.writeln(\"<div class = title>Prescriber Portal</div>\");\n document.writeln(\"<div class = subtitle>Created By: GunaCode </div>\");\n /* game rules and examples */\n //button\n document.writeln(\"<button type=\\\"button\\\" class=\\\"collapsible\\\">\" + gameHeader[0] + \"</button>\")\n \n //content\n document.writeln(\"<div class=\\\"content\\\">\");\n htmlDescript(0);\n document.writeln(\"</div>\");\n \n /* header for game setup */\n //button\n document.writeln(\"<button type=\\\"button\\\" class=\\\"collapsible\\\">\" + gameHeader[1] + \"</button>\")\n // document.writeln(\"<canvas id=\\\"myChart\\\" style=\\\"width:100%;max-width:700px\\\"></canvas>\");\n // document.writeln(\"<p>\"+displayValue+\"</p>\");\n // makeChart();\n // document.writeln(\"<p>\"+displayValue+\"</p>\");\n // document.writeln(\"<p>\"+printValue+\"</p>\");\n \n \n \n //content\n document.writeln(\"<div class=\\\"content\\\">\");\n htmlDescript(1);\n document.writeln(\"</div>\");\n \n //header for game\n //htmlHeaders(2);\n collapsibleStyling();\n \n }", "function Main() {\n\tappx.Bootstrap('Canvas');\n\n\t// Setup app context\n\tappx.context['gameId'] = '';\n\tappx.context['keyOnly'] = false;\n\tappx.context['roleCaptain'] = false;\n\tappx.context['language'] = 0;\n\tappx.context['pickedColor'] = 0;\n\tappx.context['ajax'] = new XMLHttpRequest();\n\tappx.context['online'] = true;\n\tappx.context['game'] = null;\n\tappx.context['fetchHandle'] = null;\n\tappx.context['dynamicFonts'] = false;\n\n\t// Toggle default page\n\tappx.DisplayPage(ID('PageMain'));\n}", "function updateWebpage()\n {\n snackBox();\n }", "startWebcamGameWithScoreBoard(){\r\n this.session.put('game-event-type','webcam')\r\n $('#window').empty();\r\n $('#window').append(dom.getWebcamWindow());\r\n $('#human_score').append(`<label>`+this.localeModel.getCurrentLanguage('human')+`</label><label>`+this.gameModel.getHumanScore()+`</label>`);\r\n $('#computer_score').append(`<label>`+this.localeModel.getCurrentLanguage('computer')+`</label><label>`+this.gameModel.getComputerScore()+`</label>`);\r\n this.webcam.setupCAM();\r\n }", "function viewHighScore() {\n showHide(highScoreScreen, gameOverScreen);\n showHide(highScoreScreen, getQuiz);\n showHide(highScoreScreen, introEl);\n}", "function initializeWebpage() {\r\n drawGridLines();\r\n drawGridLines();\r\n initArray();\r\n populateGameGrid(gameGrid);\r\n // Add any necessary functionality you need for the Reach portion below here\r\n }", "template() {\r\n document.querySelector(\"#app\").innerHTML += /*html*/ `\r\n <section id=\"onboarding\" class=\"page onboarding-page\">\r\n <img src=\"./media/onboarding.jpg\" alt=\"Art museum\" class=\"onboarding_img\">\r\n <div id=\"onboarding-content\">\r\n <h3 class=\"onboarding_title\">EXPLORE KüNSTE</h3>\r\n <p class=\"onboarding_text\">The KüNSTE app easily allows you to browse\r\n through the exhibitions that can be found in the museum and with the\r\n help of our museum map you are able to locate a given exhibitions\r\n within minutes.</p>\r\n <div id=\"onboarding-nav\">\r\n <button class=\"skip_btn\" onclick=\"navigateTo('home')\">SKIP</button>\r\n <div id=\"progress-dots\">\r\n <span class=\"dot_active\"></span>\r\n <span class=\"dot\" onclick=\"navigateTo('onboarding2')\"></span>\r\n <span class=\"dot\" onclick=\"navigateTo('onboarding3')\"></span>\r\n </div>\r\n <img src=\"./media/arrow-big.svg\" alt=\"arrow\" class=\"onboarding_arrow\" onclick=\"navigateTo('onboarding2')\">\r\n </div>\r\n </div>\r\n </section>\r\n `;\r\n }", "function home(){\n\tapp.getView().render('vipinsider/insider_home.isml');\n}", "function Quiz4Content(windowID : int)\n{\n GUI.Label (Rect (10, 20, 1280, 720), \" \");\n \n}", "buildLayout(){\r\n this.phaseElement.id = \"rid-opacity\";\r\n\r\n this.sidebar.classList.add(\"sidebar\");\r\n \r\n this.turnImage.classList.add(\"player-img\")\r\n \r\n this.turnImageContainer.classList.add(\"player-img-container\");\r\n this.turnImageContainer.appendChild(this.turnImage);\r\n\r\n this.sidebar.append(this.turnImageContainer);\r\n\r\n this.renderPlayerImg();\r\n\r\n this.createTurnOrder();\r\n this.updateTurnOrder();\r\n\r\n this.createMap();\r\n this.sidebar.appendChild(this.btnContainer);\r\n this.gameWindowElement.append(this.sidebar);\r\n \r\n }", "function Quiz3Content(windowID : int)\n{\n GUI.Label (Rect (10, 20, 1280, 720), \" \");\n \n}", "function cust_PageLoaded() {\n\n if(_top && _top.C4){\n var res = _top.T1.records.find(\"pageId\", _course.pageID,0);\n res = _util.trim(res[0][1])\n res = res.split(\"&nbsp;\").join(\"\");\n\t _top.a_pageCount.setContent(res+\" of \"+a_nTotalPages);\n// var prg=_course.getPageNumInCourse()/_course.totalPages\n var prg= parseInt(res,10)/a_nTotalPages*100;\n f_log(prg*2)\n _top.C4.H2.sizeTo(prg*2,16,500,\"ease\")\n\n }\n if(_bottom && _bottom.C2){\n _bottom.C2.goToFrame(2)\n }\n //bottomBarState(null,null,\"1\");\n\n \n}", "function loadHomepage() {\n var title = document.createElement(\"h1\");\n var rules = document.createElement(\"div\");\n var startButton = document.createElement(\"button\");\n var highScore = document.createElement(\"div\");\n timeLeftEl = document.createElement(\"div\");\n\n topBar.innerHTML = \"\";\n firstBlock.innerHTML = \"\";\n secondBlock.innerHTML = \"\";\n // append high-score button and time left info to the top\n highScore.setAttribute(\"id\", \"high-score\")\n highScore.textContent = \"View High Scores\";\n timeLeftEl.textContent = \"Time left: \" + timeTotal + \"s\";\n topBar.appendChild(highScore);\n topBar.appendChild(timeLeftEl);\n\n // append title and rules to the first block in the main content\n title.textContent = \"Coding Quiz Challenge\";\n title.setAttribute(\"class\", \"text-center\");\n rules.innerHTML = \n '<p>Please try your best to answer the following ' + questions.length + ' code-related multiple-choice questions within ' + timeTotal + ' seconds!</p>' + \n '<p>Keep in mind that the incorrect answer will penalize your score/time by ' + timePenalty + ' points/seconds! The amount of time left is showed on the top right during the quiz. Below a question displays its question number.<p>' +\n '<p>Click the button to start the quiz when you are ready!</p>';\n rules.setAttribute(\"class\", \"text-center\");\n firstBlock.appendChild(title);\n firstBlock.appendChild(rules);\n // append start-quiz-button the second block in the main content\n startButton.textContent = \"Start Quiz\";\n startButton.setAttribute(\"id\", \"start-quiz-button\");\n startButton.setAttribute(\"class\", \"large-button\");\n secondBlock.appendChild(startButton);\n secondBlock.setAttribute(\"class\", \"justify-content-center\");\n}", "function OnWeLoad()\n{\n\n\tImg9={max:1,pos:0,grp:'10'};\n\tImg9[0]=new Image();Img9[0].src='images/square.gif';\n\tImg9[1]=new Image();Img9[1].src='images/top_construct_next-button.gif';\n\tImg11={max:1,pos:0,grp:'12'};\n\tImg11[0]=new Image();Img11[0].src='images/square.gif';\n\tImg11[1]=new Image();Img11[1].src='images/top_construct_back-button.gif';\tIDP.my=(window.parent.frames.length && parent.MyFrm)?parent.MyFrm:window;\n\tIDP[1]=(V5)?'document.getElementById(\\'e9\\').src':(IE)?'e9.src':'document.e9.src';\n\tIDP[2]=(V5)?'document.getElementById(\\'e11\\').src':(IE)?'e11.src':'document.e11.src';\n\tisOvr=1;\n}", "function onInitialFrameLoad(){\n if(contentEditCriteria.assetType == \"shared\")\n {\n // show the warning message for shared asset\n var warning = 'This is a shared Asset. Your edits will take effect on all pages that use this Asset.';\n var $topPlaceHolder = $contentFrameElem(\"#perc-content-edit-content-top-placeholder\");\n $topPlaceHolder.addClass(\"perc_shared_asset_edit_warning perc-asset-edit-info-line\");\n $topPlaceHolder.html(warning);\n $topPlaceHolder.show();\n \n // add the folder path for an existing asset\n if (assetId != undefined && assetId != '')\n {\n var pathField = '<label for=\"perc-content-edit-meta-data-item_folder_path\" >Folder path:</label> <br/>' + \n '<div id=\"perc-content-edit-meta-data-item_folder_path\" class=\"datadisplay\">' +\n contentEditCriteria.folderPath + '</div> <br/>';\n\n $contentFrameElem(\"#perc-content-edit-meta-data-top-placeholder\").html(pathField);\n $contentFrameElem(\"#perc-content-edit-metadata-panel\").show();\n //Render site impact for the asset.\n $contentFrameElem(\"#perc-site-impact-panel\").show();\n $.PercSiteImpactView.renderSiteImpact(assetId, $.PercSiteImpactView.ITEM_TYPE_ASSET, $contentFrameElem(\"#perc-site-impact-panel\"));\n }\n }\n }", "function CallAboutPage(){\n\tshowElementAbove(DOMPageContentList[1]);\n\tDIV_SgvHolder.style.overflow = \"scroll\";\n}", "function loadScorePage(){\n endPage.style.display = \"none\";\n scorePage.style.display = \"block\";\n\n}", "function loadMyContent () {\n // do your page operations here\n}", "function detailedReviewPage_elementsExtraJS() {\n // screen (detailedReviewPage) extra code\n }", "function performPage() {\r\n var movie_title = $('[class^=TitleHeader__TitleText]').text().trim();\r\n // reference\r\n if (movie_title === \"\") {\r\n movie_title = $('h3[itemprop=\"name\"]').text().trim();\r\n movie_title = movie_title.substring(movie_title.lastIndexOf(\"\\n\") + 1, -1 ).trim();\r\n }\r\n var movie_title_orig = $('[class^=OriginalTitle__OriginalTitleText]').text().trim().replace(\"Original title: \", \"\");\r\n // reference\r\n if (movie_title_orig === \"\" && $('h3[itemprop=\"name\"]').length) {\r\n movie_title_orig = $.trim($($('h3[itemprop=\"name\"]')[0].nextSibling).text());\r\n }\r\n // not found\r\n if (movie_title_orig === \"\") {\r\n movie_title_orig = movie_title;\r\n }\r\n\r\n var movie_id = document.URL.match(/\\/tt([0-9]+)\\//)[1].trim('tt');\r\n var is_tv = Boolean($('title').text().match('TV Series'));\r\n // newLayout || reference : check if 'title' has just a year in brackets, eg. \"(2009)\"\r\n var is_movie = (Boolean($('[class^=TitleBlock__TitleMetaDataContainer]').text().match('TV')) || Boolean($('li.ipl-inline-list__item').text().match('TV Special'))) ? false : Boolean($('title').text().match(/.*? \\(([0-9]*)\\)/));\r\n // newLayout || reference\r\n if (Boolean($('[class^=GenresAndPlot__Genre]').text().match('Documentary')) || Boolean($('li.ipl-inline-list__item').text().match('Documentary'))) {\r\n is_tv = false;\r\n is_movie = false;\r\n }\r\n\r\n // Start of External ratings code\r\n if (GM_config.get(\"ratings_cfg_imdb\") || GM_config.get(\"ratings_cfg_metacritic\") || GM_config.get(\"ratings_cfg_rotten\") || GM_config.get(\"ratings_cfg_letterboxd\")) {\r\n externalRatings(movie_id, movie_title, movie_title_orig);\r\n }\r\n // Call to iconSorterCount() for the icons/sites sorting.\r\n iconSorterCount(is_tv, is_movie);\r\n\r\n // Create areas to put links in\r\n addIconBar(movie_id, movie_title, movie_title_orig);\r\n perform(getLinkArea(), movie_id, movie_title, movie_title_orig, is_tv, is_movie);\r\n if (GM_config.get('load_second_bar') && !GM_config.get('load_third_bar_movie')) {\r\n getLinkAreaSecond();\r\n } else if (!GM_config.get('load_second_bar') && GM_config.get('load_third_bar_movie')) {\r\n getLinkAreaThird();\r\n } else if (GM_config.get('load_second_bar') && GM_config.get('load_third_bar_movie') && !GM_config.get('switch_bars')) {\r\n getLinkAreaSecond();\r\n getLinkAreaThird();\r\n } else if (GM_config.get('load_second_bar') && GM_config.get('load_third_bar_movie') && GM_config.get('switch_bars')) {\r\n getLinkAreaThird();\r\n getLinkAreaSecond();\r\n }\r\n}", "function init() { \t\n // Retrieve any available URL parameters and split them into an array.\t\n var urlParameters = window.location.search.substring(1).split('&');\n\n // Loop through each parameter and value pair and execute any applicable helper functions.\n $.each(urlParameters, function(i) {\n var currentParam = urlParameters[i].split('=')[0];\n var currentValue = urlParameters[i].split('=')[1];\n\t\t\t\t\n\t\t\t\tparam = currentParam;\n\t\t\t\tvalue = currentValue;\n\t\t\t\t\n\t\t\t\t\n switch(currentParam) {\n case 'theme':\n $('body').addClass('theme-' + currentValue);\n break;\n case 'rtl':\n $('html').removeClass('ltr').addClass('rtl');\n break;\n case 'instore':\n $('body').addClass('instore');\n break; \n case 'lowbandwidth':\n $('body').addClass('lowbandwidth');\n\t\t\t\t\t break; \n }\n\t\t\t\t\n\t\t\t\tif (currentParam === 'version') {\n\t\t\t\t\t$('[data-version]').each(function(i, el) {\n\t\t\t\t\t\tif ($(el).data('version') === currentValue) {\n\t\t\t\t\t\t\t$(el).removeClass('hide');\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$(el).addClass('hide');\n\t\t\t\t\t\t}\n\t\t\t\t\t});\t\n\t\t\t\t}\n\n if (currentParam === 'login') {\n var $loginTrue = $('[data-login=true]');\n var $loginFalse = $('[data-login=false]');\n if(currentValue === 'true'){\n $loginFalse.each(function(){\n $(this).addClass('hide');\n });\n $loginTrue.each(function(){\n $(this).removeClass('hide');\n });\n } else {\n $loginFalse.each(function(){\n $(this).removeClass('hide');\n });\n $loginTrue.each(function(){\n $(this).addClass('hide');\n });\n }\n\n }\t\t\n\t\t\t\t\n });\n\n // Management of video paths for PDP Wow\n if($('body').hasClass('pdp_wow')) {\n \n }\n }", "function initContent() {\n var msHide = document.querySelectorAll('.ms-hide');\n\n /**\n * Place the Yellow ribbon after the header.\n */\n $('#s4-workspace').prepend($('#DeltaPageStatusBar'));\n\n if (msHide.length > 0) {\n /**\n * Hide all right section web parts that are marked as \"hidden\".\n */\n if ($('.ms-hide').closest('.right-section')) {\n $('.right-section .ms-hide').parent().hide();\n }\n checkContentTypes();\n checkOrgChartZone();\n checkGatewayPage();\n }\n\n adjustArticleImageBlock();\n adjustWireStories();\n collapsibleList();\n customCheckboxes();\n howDoI();\n articleComments();\n startMyVMSNet();\n startUserControls();\n\n /**\n * Window Load Events.\n */\n window.addEventListener('load', function () {\n introText();\n wireStories();\n wireCatagory();\n updateMoreSearchText();\n });\n }", "function run_allclip(name_video) {\n name_video_global = name_video\n document.getElementById('app').innerHTML= page2\n document.getElementById('video').innerHTML = data_allclip[name_video].link\n document.getElementById('subtitle_1').innerHTML= data_allclip[name_video].sub_1\n document.getElementById('subtitle_2').innerHTML= data_allclip[name_video].sub_2\n document.getElementById('box_like').innerHTML= data_allclip[name_video].box_like\n document.getElementById('recommend').innerHTML= data_allclip[name_video].video_next\n}", "function refreshContent(){\n $('#gap_fluxo').load(document.URL + ' #gap_fluxo');\n $('#panel0').load(document.URL + ' #panel0');\n $('#panel1').load(document.URL + ' #panel1');\n $('#panelEspera').load(document.URL + ' #panelEspera');\n }", "function qll_module_hotchicks_sidebar()\r\n{\r\n\tif(!qll_GMSupport)\r\n\t{\treturn;\t}\r\n\t\r\n\tobject = document.createElement(\"div\");\r\n\tobject.setAttribute('class', 'QLLBoxModHotChicks');\r\n\tobject.setAttribute('id', 'QLLBoxModHotChicks');\r\n\tobject.innerHTML=\"<img class='QLLIMGLoading' src='\" + qll_loadingImg + \"'>\";\r\n\tadv=document.getElementById('eads');\r\n\tadv.parentNode.insertBefore(object,adv);\r\n\tGM_xmlhttpRequest(\r\n\t{\r\n\t\tmethod: 'GET',\r\n\t\turl: qll_serverURI + '/modules/hotchicks/request.php',\r\n\t\t\tonload:function(responseDetails)\r\n\t\t\t{\t\t\r\n\t\t\t\tvar responseText = responseDetails.responseText;\r\n\t\t\t\turi=responseText.substring(responseText.lastIndexOf(\"http\"));\r\n\t\t\t\tobj=document.getElementById('QLLBoxModHotChicks');\r\n\t\t\t\tobj.innerHTML = \"<img alt='\" + uri + \"' src='\" + uri + \"' border='0'>\";\r\n\t\t\t\t$(\"#QLLBoxModHotChicks\").click(function(){qll_fun_showDisplayBox(qll_lang[19], \"<a href='\" + uri + \"' target='_blank'><img alt='\" + uri + \"' src='\" + uri + \"' border='0'></a>\");});\r\n\t\t\t}\r\n\t});\t\t\r\n}", "function main() {\r\n $('#header > div.ads-header').remove();\r\n\r\n $('#contendor > div.iframe').remove();\r\n $('#contendor > div.banners').remove();\r\n\r\n $('#contenido > div.contenedor-banner-item').remove();\r\n\r\n $('#sidebar > div').each(function(i, e){\r\n\r\n if ($(this).text() == 'Anuncios')\r\n {\r\n $(this).next().next().remove();\r\n $(this).next().remove();\r\n $(this).remove();\r\n }\r\n\r\n });\r\n\r\n $('#footer').remove();\r\n\r\n if (location.pathname.indexOf('/peliculas') >= 0)\r\n {\r\n $('#contenido > div[style*=\"float: right;\"]').remove();\r\n $('#contenido > h2').eq(1).remove();\r\n $('#contenido > div.texto-pelicula').eq(0).remove();\r\n $('#contenido > div.texto-ver').remove();\r\n }\r\n\r\n if (location.pathname.indexOf('/modulos') >= 0)\r\n {\r\n $('div[id*=\"imagecont\"]').eq(0).remove();\r\n $('div[id*=\"embedcont\"]').eq(0).css('visibility', 'visible');\r\n }\r\n}", "function main() {\n //your widget code goes here\n jQueryBeacon(document).ready(function () {\n console.log('Realgraph Beacon Loaded');\n var currentURL = window.location.href; // Returns full URL\n pingListener(currentURL);\n getAndRenderEntitiesData(currentURL);\n\n //example load css\n //loadCss(\"http://example.com/widget.css\");\n\n //example script load\n //loadScript(\"http://example.com/anotherscript.js\", function() { /* loaded */ });\n });\n }", "function Quiz2Content(windowID : int)\n{\n GUI.Label (Rect (10, 20, 1280, 720), \" \");\n \n}", "function OnStart()\r\n{\r\n //Lock screen orientation to Portrait.\r\n app.SetOrientation( \"Portrait\" );\r\n \r\n //Create top level layouts.\r\n CreateMainLayout();\r\n CreatePanelLayout();\r\n \r\n //Create page layouts.\r\n CreateWebViewLayout();\r\n CreateSettingsLayout();\r\n\r\n //Add top level layouts to app.\r\n app.AddLayout( layMain );\r\n app.AddLayout( panel );\r\n \r\n //Load the main page.\r\n curPage = layWebView;\r\n webView.LoadUrl( curUrl );\r\n}", "function main() {\n showScore();\n nextQuestion();\n getFeedback();\n startQuiz();\n render();\n}", "function LoadCurrentPage(){\n\t// The URL determines which page is fetched, in this case by ?view=<filename>\n\tvar view = getParameterByName('view');\n\tif (view) {\n\t\tLoadDiv('main',view,false);\n\t}\n\telse {\n\t\t// Default page\n\t\tLoadDiv('main','coding',false);\n\t}\t\t\t\n}", "function main() {\n landingPageEffects();\n introSlideShow();\n}", "function viewDesktop_Master() {\n}", "function main() {\n var foo = String(window.location).split(/\\//);\n switch(foo[3]) {\n\tcase 'photos':\n\t var head = document.getElementsByTagName('head')[0];\n\t var style = document.createElement('style');\n\t style.type = 'text/css';\n\t style.innerHTML = '.photo-owner-comment { background-color: #eaeaea }';\n\t head.appendChild(style);\n break;\n case 'activity':\n \t $(\"#recent-activity\").find(\"li.act-item\").each(function (i) {\n\t\tif ($(\"div.act-thumb > p > a\",this).html() != null) {\n\t\t var user = ($(\"div.act-thumb > p > a\",this).html());\t\n\t\t $(\"div.act-data > ul.act-details > li.f-their-photo-their-comment\").each( function (n) {\n\t\t\tif ($(\"div.act-content > a\",this).html() == user) {\n\t\t\t $(this).css(\"background-color\",\"#eaeaea\");\n\t\t\t}\n\t\t });\n\t\t}\n\t });\n\t break;\n case 'groups':\n \t var uname = $(\"table tr td.Said h4 a\").html();\n \t $(\"table.TopicReply tr\").each(function (i) {\n \tif ($(\"td.Said h4 a\",this).html() == uname) {\n\t\t $(this).css(\"background-color\",\"#eaeaea\");\n\t\t}\n \t });\n\t break;\n }\n}", "function coreInitLoadPage() {\n if (typeof $(\"body\").attr(\"control\") !== \"undefined\")\n WEBUI.MAINPAGE = $(\"body\")[$(\"body\").attr(\"control\").split(\".\")[1]]();\n }", "function loadAboutScreen() {\n //add background class to body\n addBackground();\n //destroy previous page's back button, if any\n destroyBackButton();\n //empties the contents of game-display-div which is the wrapper div of the game UI\n clearDisplayDiv();\n //assigns the element with id 'game-display-div' to the file variable for further use\n gameDisplayDiv = document.getElementById(\"game-display-div\");\n //creates UI of the about screen\n createAboutScreenButtons();\n}", "function RDVariableInitialize(){\n /* Get the html file name */\n var path = window.location.pathname;\n pageName = path.split(\"/\").pop();\n\n /* Create artwork array data */\n ArtworkArray = [\n new Artwork(\"media/image/Testing.jpg\", \"待更新\", \n \"標題\", \"內容\", \"https://www.youtube.com/embed/pJ_m5lDftYc\", \"HOMEPAGE:VFX\"),\n new Artwork(\"media/image/Testing.jpg\", \"待更新\", \n \"標題\", \"內容\", \"https://www.youtube.com/embed/pJ_m5lDftYc\", \"VFX\"),\n ];\n\n /* Create profile array data */\n ProfileArray = [\n new Profile(\"media/image/profile.png\", \"奇昌\", \"平面網頁工程師\"),\n new Profile(\"media/image/profile.png\", \"君昊\", \"特效合成師\"),\n new Profile(\"media/image/profile.png\", \"文杰\", \"建模與材質設計師\"),\n new Profile(\"media/image/profile.png\", \"昱安\", \"後端工程與遊戲工程師\"),\n new Profile(\"media/image/profile.png\", \"宥宇\", \"建模師\"),\n new Profile(\"media/image/profile.png\", \"冠宇\", \"角色設計師\"),\n new Profile(\"media/image/profile.png\", \"沅叡\", \"待更新\")\n ];\n\n /* Create patterm that use for index webpage animation */\n IndexArtworkPatterm = [\n new WorkRenderPatterm(\"4:8\", \"flip-right:flip-left\"),\n new WorkRenderPatterm(\"8:4\", \"flip-left:flip-right\"),\n new WorkRenderPatterm(\"4:4:4\", \"fade-up:fade-up:fade-up\"),\n new WorkRenderPatterm(\"4:8\", \"flip-right:flip-left\"),\n new WorkRenderPatterm(\"8:4\", \"flip-left:flip-right\"),\n new WorkRenderPatterm(\"4:8\", \"flip-right:flip-left\"),\n new WorkRenderPatterm(\"12\", \"fade-up\")\n ];\n\n /* Create patterm that use for work webpage animation */\n WorkArtworkPatterm = [\n new WorkRenderPatterm(\"4:8\", \"flip-right:flip-left\"),\n new WorkRenderPatterm(\"8:4\", \"flip-left:flip-right\"),\n new WorkRenderPatterm(\"4:4:4\", \"fade-up:fade-up:fade-up\"),\n new WorkRenderPatterm(\"4:8\", \"flip-right:flip-left\"),\n new WorkRenderPatterm(\"8:4\", \"flip-left:flip-right\"),\n new WorkRenderPatterm(\"4:8\", \"flip-right:flip-left\"),\n new WorkRenderPatterm(\"12\", \"fade-up\"),\n new WorkRenderPatterm(\"4:8\", \"flip-right:flip-left\"),\n new WorkRenderPatterm(\"8:4\", \"flip-left:flip-right\"),\n new WorkRenderPatterm(\"4:4:4\", \"fade-up:fade-up:fade-up\")\n ];\n\n /* Create carousel data set for about */\n MyAboutCarousel = [\n new AboutCarousel(\"media/image/TitleImage.jpg\", \"Test1\", \"Test Text\"),\n new AboutCarousel(\"media/image/TitleImage.jpg\", \"Test2\", \"Test Text\"),\n new AboutCarousel(\"media/image/TitleImage.jpg\", \"Test3\", \"Test Text\")\n ];\n\n /* Specifie the top title image or video path and type */\n IndexHomePageFilePath = \"media/video/HomeTitle.mp4\";\n AboutPageFilePath = \"media/image/TitleImage.jpg\";\n\n /* The title backgound color */\n IndexHomePageBackground = \"#000000\";\n AboutPageBackground = \"#000000\";\n\n $(\"#RDTitle\").text(\"Result\");\n $(\"#RDDescription\").html(\"我們結合了跨領域的人才 <br > 負責的項目從遊戲、 動畫, 到特效、後製合成製作\");\n $(\"#Introducing\").find('h4').html(\"Result Design 是因興趣而聚集起來創作的工作室.\");\n}", "function homePageLoader() {\n\n pageCreator(\"home-page\");\n navBar(\"home-page\");\n restaurantLogo();\n bookTableBtn(\"home-page\");\n socialMedia();\n}", "onGooglePlusClick(eventObject) {\n let RoKAContainer = document.getElementById(\"RoKA\");\n RoKAContainer.style.display = \"none\";\n let googlePlusContainer;\n if (RoKA.Application.currentMediaService() === Service.YouTube) {\n googlePlusContainer = document.getElementById(\"watch-discussion\");\n }\n else if (RoKA.Application.currentMediaService() === Service.KissAnime) {\n googlePlusContainer = document.getElementById(\"disqus_thread\");\n }\n else if (RoKA.Application.currentMediaService() === Service.KissManga) {\n googlePlusContainer = document.getElementById(\"disqus_thread\");\n }\n googlePlusContainer.style.display = \"\";\n googlePlusContainer.style.height = \"auto\";\n let redditButton = document.getElementById(\"at_switchtoreddit\");\n redditButton.style.display = \"block\";\n }", "onGooglePlusClick(eventObject) {\n let RoKAContainer = document.getElementById(\"RoKA\");\n RoKAContainer.style.display = \"none\";\n let googlePlusContainer;\n if (RoKA.Application.currentMediaService() === Service.YouTube) {\n googlePlusContainer = document.getElementById(\"watch-discussion\");\n }\n else if (RoKA.Application.currentMediaService() === Service.KissAnime) {\n googlePlusContainer = document.getElementById(\"disqus_thread\");\n }\n else if (RoKA.Application.currentMediaService() === Service.KissManga) {\n googlePlusContainer = document.getElementById(\"disqus_thread\");\n }\n googlePlusContainer.style.display = \"\";\n googlePlusContainer.style.height = \"auto\";\n let redditButton = document.getElementById(\"at_switchtoreddit\");\n redditButton.style.display = \"block\";\n }", "onGooglePlusClick(eventObject) {\n let RoKAContainer = document.getElementById(\"RoKA\");\n RoKAContainer.style.display = \"none\";\n let googlePlusContainer;\n if (RoKA.Application.currentMediaService() === Service.YouTube) {\n googlePlusContainer = document.getElementById(\"watch-discussion\");\n }\n else if (RoKA.Application.currentMediaService() === Service.KissAnime) {\n googlePlusContainer = document.getElementById(\"disqus_thread\");\n }\n else if (RoKA.Application.currentMediaService() === Service.KissManga) {\n googlePlusContainer = document.getElementById(\"disqus_thread\");\n }\n googlePlusContainer.style.display = \"\";\n googlePlusContainer.style.height = \"auto\";\n let redditButton = document.getElementById(\"at_switchtoreddit\");\n redditButton.style.display = \"block\";\n }", "function main() {\r\n renderPage();\r\n startQuiz();\r\n submitAnswer();\r\n resumeQuiz();\r\n restartQuiz();\r\n}", "function scoreRender(){ \n scoreDiv.html(\"You got \" + score + \"/10 correct!\");\n}", "function setupGame() { console.log(\"in setupGame\");\n\n\t//console.log(\"here setupGame\");\n\n\t$(\"#startPage\").show();\n\t$(\"#content\").hide();\n\t$(\"#questionPage\").hide();\n\t$(\"#answerPage\").hide();\n\t$(\"#scorePage\").hide();\n\n}", "function screenReportingHome()\n{\n\tshowScreen(\"home\", \"Accueil\", function()\n\t{\n\t\t$.ajax(\n\t\t{\n\t\t\turl: serverUrl + \"queries.php\",\n\t\t\ttype: \"POST\",\n\t\t\tcache: false,\n\t\t\tdata:\n\t\t\t{\n\t\t\t\tfunc: \"get_score\",\n\t\t\t\tteam: teamId\n\t\t\t}\n\t\t}).done(function(data)\n\t\t{\n\t\t\tshowPrev(\"Choix des joueurs\", function()\n\t\t\t{\n\t\t\t\tscreenPlayers();\n\t\t\t});\n\n\t\t\t$(\".wrapper\").append($(\"<div></div>\").attr(\"id\", \"graph\"));\n\n\t\t\tcalculateScore(data);\n\n\t\t\t$(\"div#graph\").highcharts({\n\t\t chart: {\n\t\t zoomType: 'x',\n\t\t animation: false\n\t\t },\n\t\t title: {\n\t\t text: 'Evolution des scores',\n\t\t x: -20 //center\n\t\t },\n\t\t yAxis: {\n\t\t title: {\n\t\t text: 'Points'\n\t\t },\n\t\t plotLines: [{\n\t\t value: 0,\n\t\t width: 3,\n\t\t color: 'black'\n\t\t }]\n\t\t },\n\t\t tooltip: {\n\t\t formatter: function () {\n\t\t return 'The value for <b>' + this.x +\n\t\t '</b> is <b>' + this.y + '</b>';\n\t\t }\n\t\t },\n\t\t legend: {\n\t\t layout: 'vertical',\n\t\t align: 'right',\n\t\t verticalAlign: 'middle',\n\t\t borderWidth: 0\n\t\t },\n\t\t plotOptions: {\n\t\t series: {\n\t\t animation: false\n\t\t }\n\t\t },\n\t\t series: scoreForGraph\n\t\t },function(){\n\t\t //chart = $(\"#graph\").highcharts();\n\t\t //chart.setSize(windowWidth,windowHeight*(4/5));\n\t\t });\n\n\t\t\thideLoader();\n\t\t});\n\t});\n}", "function showResultPage() {\n // Update the score data\n document.getElementsByClassName('movesTotal')[0].textContent = moveCounter;\n document.getElementsByClassName('starCounter')[0].textContent = starCounter;\n if (starCounter === 1) {\n document.getElementsByClassName('starText')[0].textContent = 'Star!';\n } else {\n document.getElementsByClassName('starText')[0].textContent = 'Stars!';\n }\n document.getElementsByClassName('time')[0].textContent =\n document.getElementById('realtime').textContent;\n // Event listener definition for 'Play again' button\n document.getElementById('play-btn').addEventListener('click', init);\n // Hide the game and show the result page\n document.querySelector('header').classList.add(\"hide\");\n document.querySelector('.score-panel').classList.add(\"hide\");\n document.querySelector('.deck').classList.add(\"hide\");\n document.querySelector('.result').classList.remove(\"hide\");\n}", "function ugLoader () { // load the PaiWei User Guide\n\t$(\"#tabDataFrame\").load(\"./UG.php #ugDesc\", function ( rsp ) {\n\t\t$(this).find(\"table\").addClass(\"UGsteps\");\n\t\t$(this).find(\"tr\").css(\"background-color\", \"transparent\");\n\t\t$(this).find(\"img\").addClass(\"UGstepImg\");\n\t\treturn false; // so the link won't fire\n\t});\n\t$(\"#tabDataFrame\").css(\"overflow-y\", \"auto\");\n\treturn false; // so the link won't fire\n} // ugLoader()", "function initialPageLoad() {\n // Hoverplay fix for Chrome\n // Constantly track cursor position to allow chrome to keep hitting a monster when hovering on one.\n // You'd have to keep moving your cursor without this fix\n if ( settings.mouseMelee && settings.chromeFix ) {\n\n // Get cursor position from the last round\n curX = localStorage.getItem('curX');\n curY = localStorage.getItem('curY');\n localStorage.removeItem('curX');\n localStorage.removeItem('curY');\n\n // Update curX and curY whenever cursor moves\n if (window.Event) document.captureEvents(Event.MOUSEMOVE);\n document.onmousemove = function(e) {\n curX = (window.Event) ? e.pageX : event.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft);\n curY = (window.Event) ? e.pageY : event.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop);\n };\n }\n\n // Change page title to \"HV\"\n document.title = 'HV';\n\n // Insert stylesheet for Round Counter and Effect Duration\n var sheet = document.createElement('style');\n sheet.innerHTML = '#round{position:absolute;left:1080px;top:15px;width:120px;font-size:20px;font-weight:bold;z-index:10;text-align:right}.duration{width:30px;display:inline-block;text-align:center;position:relative;margin-left:-30px;top:-4px}.duration>div{background:white;border:1px solid black;padding:0 2px;display:inline-block;min-width:8px;font-weight:bold;height:13px}.hvhp{width:inherit;display:block;position:absolute;top:0;text-align:center;font-weight:bold;color:#ff0;font-size:10px;z-index:999;white-space:nowrap;text-shadow:-1px -1px #000, -1px 1px #000, 1px -1px #000, 1px 1px #000}.chbd>img{height:12px;}';\n\n // Hide Battle Log\n if (!settings.battleLog) sheet.innerHTML += '#togpane_log {display: none}';\n\n // Hide Welcome Logo\n if (settings.hideWelcome) { sheet.innerHTML += 'img.cw{display: none}.cbl:nth-of-type(1){padding-top:114px}'; }\n document.head.appendChild(sheet);\n\n /* ============== NO BLINKING ============= */\n if (settings.noBlinking) {\n (function(){\n window.addEventListener('beforescriptexecute', function(e) {\n if (/battle\\.set_infopane\\(\"Battle Time\"\\)/.test(e.target.innerHTML)) {\n e.preventDefault();\n window.removeEventListener(e.type, arguments.callee, true);\n }\n }, true);\n })();\n }\n /* ============ NO BLINKING END =========== */\n\n /* ============= ROUND COUNTER ============ */\n if (settings.roundCounter) {\n (function(){\n var logs = document.querySelector('#togpane_log tr:nth-last-child(2)').textContent;\n if (/Round/.test(logs)) {\n var round = logs.match(/Round ([\\d\\s\\/]+)/)[1];\n localStorage.setItem('rounds', round);\n } else {\n var round = localStorage.getItem('rounds') || undefined;\n }\n\n if (round !== undefined) {\n var x = document.getElementById('mainpane').appendChild(document.createElement('div'));\n x.id = 'round';\n x.innerHTML = round;\n var final = round.split('/');\n switch (final[1] - final[0]) {\n case 0:\n x.style.color = '#ff0000';\n break;\n case 1:\n x.style.color = '#ffcc99';\n break;\n }\n }\n })();\n }\n /* =========== ROUND COUNTER END ========== */\n\n}", "function showScore() {\n //creates a jQuery object listening for the playAgain click event\n //that...\n $(\"#playAgain\").click(e => {\n //sets the page value of STORE to start,\n STORE.page = \"start\"\n //and renders the start page.\n render();\n });\n}", "function main() {\n buildNavbar();\n $(\"body\").append($(\"<div>\").addClass(\"container\").attr(\"id\", \"mainContainer2\"));\n createJumboTron();\n $(\"body\").append($(\"<div>\").addClass(\"container h-100 scrollspy\").attr(\"id\", \"mainContainer\"));\n buildMoviePage();\n\n }", "function renderPage() {\n // set up any necessary events\n Main.addClickEventToElement(document.getElementById(\"homeOptP\"), function () {\n Main.changeHash(Main.pageHashes.home);\n });\n Main.addClickEventToElement(document.getElementById(\"infoOptP\"), function () {\n Main.changeHash(Main.pageHashes.info);\n });\n Main.addClickEventToElement(document.getElementById(\"quizOptP\"), function () {\n Main.changeHash(Main.pageHashes.quiz);\n });\n Main.addClickEventToElement(document.getElementById(\"econ\"), function () {\n Main.sendAnalyticsEvent(\"UX\", \"click\", \"Economy\");\n _loadPlatformSection(_platformSections.economy);\n });\n Main.addClickEventToElement(document.getElementById(\"immigration\"), function () {\n Main.sendAnalyticsEvent(\"UX\", \"click\", \"Immigration\");\n _loadPlatformSection(_platformSections.immigration);\n });\n Main.addClickEventToElement(document.getElementById(\"domSoc\"), function () {\n Main.sendAnalyticsEvent(\"UX\", \"click\", \"Domestic Policy\");\n _loadPlatformSection(_platformSections.domestic);\n });\n Main.addClickEventToElement(document.getElementById(\"foreignPol\"), function () {\n Main.sendAnalyticsEvent(\"UX\", \"click\", \"Foreign Policy\");\n _loadPlatformSection(_platformSections.foreign);\n });\n\n // show page\n Main.sendPageview(Main.analyticPageTitles.platform);\n Main.showPage(Main.pageContainers.partyPlatformContainer);\n }", "function hitlens_external() {\nvar SERVER=1;\nif(!(cpu=navigator.cpuClass)){cpu=''};\nvar rf=escape(document.referrer);\nif((rf==\"undefined\")||(rf==\"\")){rf=\"bookmark\";};\nvar frl=top.frames.length;\nvar hr=escape(location.href); \nvar je=navigator.javaEnabled()?'y':'n';\nvar ce=navigator.cookieEnabled?'y':'n';\nif(typeof(navigator.cookieEnabled)=='undefined'){ce=''};\nif(!(sl=navigator.systemLanguage)){sl=''};\nif(!(bl=navigator.browserLanguage)){bl=''}; \nif(!(ul=navigator.userLanguage)){ul=''};\nif(!(nl=navigator.language)){nl=''};\nvar shw=screen.height+'*'+screen.width;\nvar scd=screen.colorDepth;\nif(!scd){scd=screen.pixelDepth};\nvar d=new Date;\nvar tz=-d.getTimezoneOffset()/60;\nvar pg=\"\";\nif(navigator.plugins.length){\n\tfor(var i = 0; i < navigator.plugins.length; i++){\n\t\tpg += navigator.plugins[i].name+\";\";\n\t} \n\tpg=escape(pg);\n}\nvar q=hitlens_embedded()+\"&s=\"+SERVER+\"&cpu=\"+cpu+\"&rf=\"+rf+\"&frl=\"+frl+\"&hr=\"+hr+\"&je=\"+je+\"&ce=\"+ce+\"&sl=\"+sl+\"&bl=\"+bl+\"&ul=\"+ul+\"&nl=\"+nl+\"&shw=\"+shw+\"&scd=\"+scd+\"&tz=\"+tz+\"&pg=\"+pg+\"&rndm=\"+Math.random();\nvar text=\"<a href='http://www.webceo.com/'>\";\ntext=text+\"<img src='http\"+(location.href.indexOf('https:')==0?'s://www':'://track')+\".websiteceo.com/m/?\"+q+\"' width='1' height='1' border='0' align='left'>\";\ntext=text+\"</a>\";\nreturn text;\n}", "function updateScore(){\n $('#js-score').html(myGame.score);\n }", "function Home(path, layContent) {\n //Get page states.\n this.IsVisible = function() {\n return lay.IsVisible()\n }\n this.IsChanged = function() {\n return false\n }\n\n //Show or hide this page.\n this.Show = function(show) {\n\n layMain.Show();\n if (show) {\n lay.Animate(\"FadeIn\");\n } else {\n lay.Animate(\"FadeOut\");\n }\n }\n\n //Create layout for app controls.\n lay = app.CreateLayout(\"Linear\", \"FillXY,VCenter\");\n lay.SetPadding(0, 0, 0, 0.04);\n lay.Hide();\n layScroll = app.CreateScroller(1, 1);\n layContent.AddChild(layScroll);\n layScroll.AddChild(lay);\n\n //Add a logo.\n var img = app.CreateImage(\"Img/Heroes Evolved Bugs.png\", 0.25);\n lay.AddChild(img);\n\n //Create a text with formatting.\n txt = app.CreateText(text, 1, 1, \"Html,bold,Link\");\n txt.SetPadding(0.03, 0.03, 0.03, 0.03);\n txt.SetTextSize(18);\n\n lay.AddChild(txt);\n}", "function homeContentData(sourcefile){\r\n\t\r\n\tdocument.getElementById('contentdiv').innerHTML = `\r\n\t\t\t<div class='middlepanel' id=\"aboutmepanel\" style='padding-top:50px; padding-bottom:100px;'>\r\n\t\t\t\t\t<div class='myheading2' style='font-size:20px;position: relative; z-index: 200;'> \r\n\t\t\t\t\t\t<img src='../img/mypic.png' class='infopic' alt='PIC' height=150 width=150><br/>\r\n\t\t\t\t\t\t<div style='padding:45px 0 66px 0'>ROBERT J. CALAMARI JR</div> \t\t\t\t\r\n\t\t\t\t\t</div><br/>\r\n\t\t\t\t\t<div style=\"text-align:justify; font-size:15px; color: #5b5858; margin:auto;\">\r\n\t\t\t\t\t\tWelcome to my website! This website was developed by me as a way to show off everything I can do, whether it is from painting, or to my coding experiences. I have experience with <b>Javascript, HTML5, CSS3, Node.JS, MongodDB, SQL, Adobe Products (Photoshop, After Effects, Premiere, Illustrator), and GIT.</b> As well as minor experience in <b>Socket.IO, SQL, React, WordPress, and PHP.</b> I have been painting since 2015 and coding since 2014. Below are all the projects that I have been working on. If you have any questions about freelance work or anything else, please feel free to email me at <b>[email protected]</b>.\t\t\r\n\t\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class='blogpanel' id=\"blogpanel\" style='padding:100px 0 100px 0; background-color:#0505051a;'>\r\n\t\t\t\t<div class='myheading1'>Projects</br>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div >\r\n\t\t\t\t\t` + printAllProjects(sourcefile) + `\r\n\t\t\t\t</div>\r\n\t\t \t</div>\r\n\t\t\t\r\n\t\t`;\r\n\r\n\t\t// <div class='blogpanel' id=\"blogpanel\" style='padding:50px 0 50px 0; background-color:#0505051a;'>\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t// \t</div>\r\n\t\t// \t<div class='paintingpanel' style='padding:60px 0 60px 0;'>\r\n\t\t\t\t\r\n\t\t// \t</div>\r\n\t// setTimeout(function() {\r\n\t// \tstartPictureFading(vpWidth, sourcefile, allpaintings, 0);\t\r\n\t// }, 1000);\r\n}", "function metadataStaticView() {\n html= HtmlService\n .createTemplateFromFile('staticMetadata')\n .evaluate()\n .setSandboxMode(HtmlService.SandboxMode.IFRAME);\n DocumentApp.getUi().showSidebar(html);\n }", "function loadPage() {\r\n var strCode = defineAppCode();\r\n $(\"#appCodeMap\").html(strCode);\r\n if (document.location.hostname.length === 0) {\r\n \r\n $(\"#appDisplayMap\").load('html/beaches.html', function() {initApp();});\r\n } else {\r\n $(\"#appDisplayMap\").load('/static_files/WebApps/Health/SwimSafe/html/beaches.html', function() {initApp();});\r\n }\r\n\r\n}", "function goScorePage(page){\n\tvar targetContainer;\n\tscoreBoardContainer.visible = false;\n\t$('#scoreHolder').hide();\n\t\n\tswitch(page){\n\t\tcase 'submit':\n\t\t\ttargetContainer = null;\n\t\t\t$('#scoreHolder').show();\n\t\t\tresizeScore();\n\n\t\tbreak;\n\t\t\n\t\tcase 'scoreboard':\n\t\t\ttargetContainer = scoreBoardContainer;\n\t\tbreak;\n\t\t\n\t\tcase '':\n\t\t\ttargetContainer = null;\n\t\tbreak;\n\t}\n\t\n\tif(targetContainer != null){\n\t\ttargetContainer.visible = true;\n\t}\n}", "function goHomeFromExams() {\n document.getElementById('classSpecific').style.display = \"none\";\n document.getElementById('welcome-div').style.display = \"block\";\n document.getElementById('wrapper').style.display = \"grid\";\n document.getElementById('doesNotExist').style.display = \"none\";\n document.getElementById('no-exams').style.display = \"none\";\n document.getElementById('exam-wrapper').style.display = \"none\";\n\n document.body.style.backgroundImage = \"none\"\n\n var examDataHasLoaded = false;\n}", "function gameOver(){\n\t$(\".container\").attr('class','center-parent container container-content')\n\t\t.html($('<div>').attr('class','center-child')\n\t\t\t\t.append($('<h1>').html('Game Over'))\n\t\t\t\t.append($('<h3>').html(\"Score: \" + variables.videos))\n\t\t\t\t.append($('<a>').html('Again?').attr('href','index.html')));\n}", "function preparePage() {\r\n\t$J = jQuery.noConflict();\r\n var iframe,\r\n object = '#castlemania_swf',\r\n platform;\r\n\r\n if ( window.top === window.self ) {\r\n\t\r\n\t\tif ( window.location.href.indexOf('facebook') !== -1 )\r\n\t\t{\r\n\t\t\tiframe\t = '#iframe_canvas';\r\n\t\t\tplatform = 'facebook';\r\n\t\t}\r\n\t\telse if ( window.location.href.indexOf(\"google\") !== -1 ) {\r\n\t\t\tiframe\t = '#oz-gadgets-canvas-iframe-659749063556';\r\n\t\t\tplatform = 'google';\r\n\t\t}\r\n\t\telse if ( window.location.href.indexOf(\"kabam.com\") !== -1 ) {\r\n\t\t\tiframe\t = '#game_frame';\r\n\t\t\tplatform = 'kabam';\r\n\t\t}\r\n\t\r\n function setWide() { \r\n clearTimeout;\r\n if ( $J(iframe).length < 1 )\r\n\t\t\t{\r\n setTimeout(setWide, 100);\r\n return;\r\n }\r\n\t\t\t\r\n\t\t\t$J(iframe).parents().css({width:'100%',margin:'0',border:'0'});\r\n\t\t\t\r\n switch ( platform )\r\n\t\t\t{\r\n\t\t\tcase 'facebook' :\r\n\t\t\t\t$J('#rightCol').css('display', 'none');\r\n\t\t\t\t$J('#blueBar').css('position', 'relative');\r\n\t\t\t\t$J('#contentCol').css('background','transparent');\r\n\t\t\t\t$J('body').css('background', '#888 url(https://kabam1-a.akamaihd.net/wwwkabam/cdn/sites/doa/img/bg_doa.jpg)');\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'google' :\r\n\t\t\t\t$J(\".Pca\").css('display', 'none');\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'kabam' :\r\n\t\t\t\t$J(iframe).css({width:'100%',margin:'0',border:'0',backgroundColor:'transparent'});\r\n\t\t\t\tbreak;\r\n }\r\n\r\n }\r\n setWide();\r\n }\r\n\telse {\r\n\t\t\r\n\t\tplatform = document.body.className.split(' ');\r\n\t\tif (platform && platform[0]){\r\n\t\t\tplatform = platform[0].replace(/(platforms_|_game)/g,'');\r\n\t\t} else {\r\n\t\t\tplatform = 'google';\r\n\t\t}\r\n\t\r\n\t\tvar errors = 0;\r\n function setHigh() {\r\n clearTimeout;\r\n if ( $J(object).length < 1 )\r\n\t\t\t{\r\n\t\t\t\tif ( ++errors > 6 ){\r\n\t\t\t\t\terrors = 0;\r\n\t\t\t\t\twindow.location = window.location.href;\r\n\t\t\t\t}\r\n\t\t\t\tsetTimeout(setHigh, 500);\r\n return;\r\n }\r\n\t\t\t\r\n\t\t\t$J('#container').css({width:'760px',height:'860px'});\r\n\t\t\t\r\n switch (platform)\r\n\t\t\t{\r\n\t\t\tcase 'facebook' :\r\n\t\t\t\t$J('#hd > div').css('display', 'none');\r\n\t\t\t\t$J('#ft').css('display', 'none');\r\n\t\t\t\t$J('#cn').parent().append($J('#hd'));\r\n\t\t\t\t$J('body').css('background', 'transparent');\r\n\t\t\t\t$J('html').css('background', 'transparent');\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'google' :\r\n\t\t\t\t$J('#pane_hd').css('display', 'none');\r\n\t\t\t\t$J('body').css('background', 'transparent');\r\n\t\t\t\t$J('body').css('background', '#888 url(https://kabam1-a.akamaihd.net/wwwkabam/cdn/sites/doa/img/bg_doa.jpg)');\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'kabam' :\r\n\t\t\t\t$J('html').css({overflow:'hidden',backgroundColor:'transparent'});\r\n\t\t\t\tbreak;\r\n }\r\n\t\t\t\r\n\t\t\tXMAS_SNOW = new SnowStorm();\r\n\t\t\t\r\n initScript(object);\r\n }\r\n setHigh();\r\n }\r\n}", "function importInViewAndShowScore(data) {\n importInView.call(this, data);\n\n $('body').css(\"background\", \"url('img/6795655-gamer-wallpaper.jpg')\");\n table.getData();\n }", "function editScorecard(source_id) {\n document.getElementById('projectManager').style.display = 'none';\n currentDivLocation = 'scorecardUpperDiv';\n setProjectHeader(PROJECT_DATA, 'scorecardUpperDiv');\n document.getElementById('scorecardData').style.display = 'inline';\n document.getElementById('scorecardUpperDiv').style.display = 'inline';\n}", "function showMainPage(){\n\t\t\t$(\"#loginDiv\").addClass(\"analyst-login-div-hide\");\n\t\t\t$(\"#analystMainPage\").removeClass(\"analys-main-page-hide\");\n\t\t\tpopulateAllDocs();\n\t\t}", "function finalPage(){\n\nconst great = [ 'Nice job Champ!', 'http://cdn.collider.com/wp-content/uploads/2011/06/its-always-sunny-in-philadelphia-image-2.jpg', 'Dennis dancing', 'How many hours have you spent watching this show?!' ];\nconst good = [ 'Good, but you can do better!', 'https://images.static-bluray.com/reviews/8734_5.jpg', 'The gang raising their hands', 'Decent, but needs improvement' ];\nconst bad = [ 'Have you even seen the show?', 'https://pmcdeadline2.files.wordpress.com/2016/04/its-always-sunny-in-philadelphia.jpg?w=630&h=383&crop=1', 'The gang is mad', 'Please go watch a few episodes right now.' ]; \n\nlet array= [];\n\n if (STORE.score >= 6){ \n array = great; \n } \n else if (STORE.score < 6 && STORE.score >= 4) { \n array = good; \n } \n else { \n array = bad; \n }\n\nreturn `<h3>${array[0]}</h3> \n <img src=\"${array[1]}\" alt=\"${array[2]}\" class=\"images\"> \n <div class=\"cen\">\n <h4>Your score is ${STORE.score} / 7</h4> \n <p class=\"sizeMe\">${array[3]}</p> \n </div>\n <button type=\"submit\" class=\"restartButton button\">Restart</button>`;\n}", "function loadIndexPage() {\n // Create url object to check status of current workflow\n const queryString = window.location.search;\n $('.slidecontainer').hide();\n let urlParams = new URLSearchParams(queryString);\n // Select electrodes\n if (urlParams.has(\"electrodes\")) {\n openElectrodeSelect();\n }\n // Display time series graph\n if (urlParams.has(\"display\")) {\n displayData(0);\n }\n // Display current file name\n if (urlParams.has(\"filename\")) {\n const title = document.createElement('h3')\n title.innerText = urlParams.get('filename');\n document.getElementById('title').appendChild(title);\n }\n // ???????\n if (urlParams.has(\"annotations\")) {\n displayData(0);\n }\n // Set up event listeners to step through data using arrow keys\n document.getElementById('body').addEventListener('keydown', function(event) {\n event.preventDefault();\n const key = event.code;\n if (key === \"ArrowLeft\") {\n displayData(-1);\n }\n else if (key === \"ArrowRight\") {\n displayData(1);\n }\n });\n // Set up left side bar\n // TODO: FIX HOVER TO AVOID CLOSING EARLY\n $('#sidebarItems').fadeOut();\n $('#sidebarMenu').animate({'width' : '3%'});\n $('#sidebarMenu').mouseenter(function () {\n $('#sidebarMenu').animate({'width' : '13%'});\n $('#sidebarItems').fadeIn();\n\n });\n $('#sidebarMenu').mouseleave(function () {\n $('#sidebarItems').fadeOut();\n $('#sidebarMenu').animate({'width' : '3%'});\n })\n // Hide annotation menu\n // TODO: FIX STYLING\n $('#annotation-items').hide();\n $('.annotation-menu').animate({'width': '0%', 'left': '100%'});\n //Set up time select event handler\n $('#time-select').mouseup(function () {\n $.post('/select-offset', {new_value: this.value},\n function (response) {\n displayData(0);\n });\n });\n $('#color-select').hide();\n document.getElementById('time-select').oninput = function () {\n let timelabel = new Date();\n timelabel.setTime(startTime.getTime());\n timelabel.setMilliseconds(this.value);\n $('#sliderdisplay').text(timelabel.toLocaleTimeString());\n }\n $('#filter-input-lower').change(function (event) {\n const lower = parseInt($('#filter-input-lower').val());\n const upper = parseInt($('#filter-input-upper').val());\n if (lower >= upper) {\n alert(\"The filter lower bound must be greater than the upper bound\");\n return;\n }\n const query = '/filter?lower=' + lower.toString() + '&upper=' + upper.toString();\n $.post(query, function () {\n displayData(0);\n })\n });\n $('#filter-input-upper').change(function (event) {\n const lower = parseInt($('#filter-input-lower').val());\n const upper = parseInt($('#filter-input-upper').val());\n if (lower >= upper && lower > 0 && upper > 0 ) {\n alert(\"The filter lower bound must be greater than the upper bound\");\n return;\n }\n const query = '/filter?lower=' + lower.toString() + '&upper=' + upper.toString();\n $.post(query, function () {\n displayData(0);\n })\n });\n $('#duration-input').change(function (event) {\n const val = $('#duration-input').val().toString();\n const query = '/upload_duration?new-value=' + val;\n $.post(query, function () {\n $('#time_series').empty();\n displayData(0);\n })\n });\n $('#montage').change(function (event) {\n const val = $('#montage').val().toString();\n const query = '/montage?montage=' + val;\n $.post(query, function() {\n displayData(0);\n })\n });\n $('#reference-input').hide();\n $('#ml-progress').hide();\n $('#electrode_form_container').hide();\n}", "function main() {\n verb(\"BetaBoards!\")\n\n var s = style()\n\n if (isTopic()) {\n iid = getPage()\n cid = iid\n\n initEvents()\n remNextButton()\n postNums()\n floatQR()\n hideUserlists()\n\n quotePyramid(s)\n\n ignore()\n\n beepAudio()\n\n addIgnoredIds(document.querySelectorAll(\".ignored\"))\n\n var f = function(){\n pageUpdate()\n\n loop = setTimeout(f, time)\n }\n\n var bp = readify('beta-init-load', 2)\n , lp = isLastPage([0, 2, 5, 10, NaN][bp])\n\n verb(\"bp \" + bp + \", lp: \" + lp)\n\n if (lp || bp === 4) loop = setTimeout(f, time)\n\n } else if (isPage(\"post\")) {\n addPostEvent()\n\n } else if (isPage(\"msg\")) {\n try {\n addPostEvent()\n } catch(e) {\n addQuickMsgEvent()\n }\n\n } else if (isForum()) {\n hideUserlists()\n\n var f = function(){\n forumUpdate()\n\n loop = setTimeout(f, time)\n }\n\n loop = setTimeout(f, time)\n\n } else if (isHome()) {\n optionsUI()\n ignoreUI()\n\n // Hint events\n addHintEvents()\n\n }\n}", "html() {\n var htm;\n htm = \"\";\n if (UI.hasLays) {\n htm += `<div class=\"layout-logo \" id=\"${this.htmlId('Logo')}\"></div>`;\n }\n if (UI.hasLays || (this.navbs != null)) {\n htm += `<div class=\"layout-corp\" id=\"${this.htmlId('Corp')}\"></div>`;\n }\n if (UI.hasLays) {\n htm += `<div class=\"layout-find\" id=\"${this.htmlId('Find')}\"></div>`;\n }\n if (UI.hasTocs) {\n htm += `<div class=\"layout-tocs tocs\" id=\"${this.htmlId('Tocs')}\"></div>`;\n }\n htm += `<div class=\"layout-view\" id=\"${this.htmlId('View')}\"></div>`;\n if (UI.hasLays) {\n htm += `<div class=\"layout-side\" id=\"${this.htmlId('Side')}\"></div>`;\n }\n if (UI.hasLays) {\n htm += `<div class=\"layout-pref \" id=\"${this.htmlId('Pref')}\"></div>`;\n }\n if (UI.hasLays) {\n htm += `<div class=\"layout-foot\" id=\"${this.htmlId('Foot')}\"></div>`;\n }\n if (UI.hasLays) {\n htm += `<div class=\"layout-trak\" id=\"${this.htmlId('Trak')}\"></div>`;\n }\n return htm;\n }", "function init() {\n // THIS IS THE CODE THAT WILL BE EXECUTED ONCE THE WEBPAGE LOADS\n }", "function showHighScore() {\n startQuizDiv.style.display = \"none\";\n gameOver.style.display = \"none\";\n highScoreEl.style.display = \"flex\";\n highScorePageEl.style.display = \"block\";\n endGameBtn.style.display = \"flex\";\n\n generateHighScore();\n}", "function main() {\n if (debug) console.log(`Main ran in ${window.name}`)\n // Whenever this is ran, an unload event (i.e. when the user loads a whatIf report)\n // triggers the collection of data needed to do a query for course information.\n // This isn't a listener because getting listeners to work inside iframes is hard.\n function setupWhatIfDataListener() {\n $(getWindow('frSelection')).on(\"unload\", fetchWhatIfData)\n }\n\n // It's ran 10 times per second because again, listeners on iframes are hard.\n // This means the app would break if the user managed to get through the\n // DegreeWorks WhatIf form in a 10th of a second.\n setInterval(setupWhatIfDataListener, 100);\n console.log(window.name)\n if (window.name === \"frBody\") {\n addModal();\n }\n if (window.name === \"frLeft\") {\n let button = addButton(`DegweeWorks Planner`, getDegreeInfo, null, \"genPossible\")\n // addNumberField('Min courses/semester', 'minCourses', 4)\n // addNumberField('Max courses/semester', 'maxCourses', 4);\n }\n }", "static displayScore(score) {\n document.getElementById('gameScore').innerHTML = `Score: ${score}`;\n }", "function setContent(contentUrl) {\n\n $(document).ready(function () {\n\n $('#Main2-container').load(contentUrl);\n\n });\n\n //window.scrollTo(0, 0); //move the view back to the top of the window\n}", "function resultsPage(){\n let finalScore = STORE.score;\n return `\n <body>\n <h2>The results are in...</h2>\n <div class = 'score-container'>\n <span id = 'current-score'>Your final score was ${finalScore} out of 5.</span>\n </div>\n \n <button id = 'restart-button'>Restart quiz?</button> \n \n</body>\n `;\n}", "function PaginaInicial_elementsExtraJS() {\n // screen (PaginaInicial) extra code\n\n }", "function dch_showHint(homePageUrl, editionId) {\r\n\tvar hvC = new HintViewComponent(editionId);\r\n\tvar sframe = hvC.sframe;\r\n\tvar infoFrame = hvC.infoFrame;\r\n\tvar body = parent.document.getElementsByTagName(\"body\")[0];\r\n\thvC.refreshComponent(body);\r\n\t$(body).children(\"#lbulb\").bind(\"click\", function(){\r\n\t\t$(this).css({\r\n\t\t\t'width' : '42px',\r\n\t\t\t'height' : '42px'\r\n\t\t});\r\n\t\t$(body).children(\"#view_info_frame\").css({\r\n\t\t\t'display' : ''\r\n\t\t});\r\n\t});\r\n}", "function initMain(){\n\tif(!isMobile || !isTablet){\n\t\t$('#canvasHolder').show();\t\n\t}else{\n\t\tcheckMobileOrientation();\t\n\t}\n\t\n\tinitAppCanvas(stageW,stageH);\n\tbuildAppCanvas();\n\tbuildPageButton();\n\tbuildCamera();\n\t\n\tgoPage('main');\n\tresizeCanvas();\n\t\n\tloadXML('stickers.xml');\n}", "function init() {\n\n browserManager = new BrowserManager();\n screenshotsAndroid = new ScreenshotsAndroid();\n magazine = new Magazine();\n workFlowManager = new WorkFlowManager();\n buttonsManager = new ButtonsManager();\n fieldsEdit = new FieldsEdit();\n tableEdit = new TableEdit();\n workFlowEdit = new WorkFlowEdit();\n\n //View Manager\n viewManager = new ViewManager();\n\n // table\n tileManager.drawTable();\n\n // ScreenshotsAndroid\n screenshotsAndroid.init();\n\n // BrowserManager\n browserManager.init();\n\n var dimensions = tileManager.dimensions;\n\n // groups icons\n headers = new Headers(dimensions.columnWidth, dimensions.superLayerMaxHeight, dimensions.groupsQtty,\n dimensions.layersQtty, dimensions.superLayerPosition);\n\n // uncomment for testing\n //create_stats();\n\n $('#backButton').click(function() {\n\n if(viewManager.views[window.actualView])\n viewManager.views[window.actualView].backButton();\n\n });\n\n $('#container').click(onClick);\n\n //Disabled Menu\n //initMenu();\n\n setTimeout(function() { initPage(); }, 500);\n\n setTimeout(function (){\n guide.active = true;\n if(actualView === 'home'){\n guide.showHelp();\n }\n }, 15000);\n\n /*setTimeout(function() {\n var loader = new Loader();\n loader.findThemAll();\n }, 2000);*/\n\n //TWEEN.removeAll();\n}", "function main(){\n\t//Initialice with first episode\n\tvar sel_episodes = [1]\n\t//collage(); //Create a collage with all the images as initial page of the app\n\tpaintCharacters();\n\tpaintEpisodes();\n\tpaintLocations(sel_episodes);\n}", "function loadScoreboardPregame() {\n\n $.ajaxSetup({ cache: true});\n \n $.getJSON(\"http://data.nba.com/data/v2015/json/mobile_teams/nba/2016/teams/cavaliers_schedule_\" + seasontype + \".json\", \n function(data){\n\n var game = data.gscd.g;\n var status = game[gamenum].st;\n var status = game[gamenum].st;\n\n var cavsscore;\n var oppscore;\n\n if (cavsHOME == 1){\n cavsscore = game[gamenum].h[\"re\"];\n oppscore = game[gamenum].v[\"re\"];\n } else {\n cavsscore = game[gamenum].v[\"re\"];\n oppscore = game[gamenum].h[\"re\"];\n }\n\n \n document.getElementById(\"opp-score\").innerHTML=\"2-1\";\n document.getElementById(\"cavs-score\").innerHTML=\"3-0\"; \n\n });\n\n}", "function main() {\n addImage();\n hideRules();\n}" ]
[ "0.59432876", "0.57692146", "0.57540226", "0.5744127", "0.57131356", "0.5620428", "0.56040776", "0.5602493", "0.5587911", "0.55816156", "0.5559524", "0.5522513", "0.55204725", "0.55191565", "0.54750574", "0.54747313", "0.5454405", "0.5450765", "0.54461366", "0.5430118", "0.54285854", "0.54224694", "0.5414661", "0.54079455", "0.54023045", "0.5388471", "0.53801703", "0.5367527", "0.5359527", "0.53538996", "0.53509504", "0.53469056", "0.53466517", "0.5343933", "0.53420097", "0.5326701", "0.532663", "0.53256077", "0.53237695", "0.5320697", "0.53101015", "0.5306874", "0.5297421", "0.5289513", "0.5285036", "0.52806413", "0.5272167", "0.52717346", "0.52686954", "0.52668464", "0.526466", "0.52623403", "0.5259556", "0.52576715", "0.52561843", "0.52542657", "0.5253213", "0.52513206", "0.52498764", "0.52498764", "0.52498764", "0.52446365", "0.5243518", "0.5236811", "0.522814", "0.5226363", "0.52260506", "0.5225183", "0.52251816", "0.5225179", "0.5223291", "0.5221529", "0.5216279", "0.52156144", "0.52061504", "0.5201967", "0.5198011", "0.51978856", "0.51973206", "0.5192528", "0.51891047", "0.5186246", "0.51832336", "0.517843", "0.51703686", "0.5170044", "0.5162852", "0.5162067", "0.5160815", "0.51573735", "0.5157021", "0.515451", "0.51503855", "0.51462555", "0.51445025", "0.51433784", "0.5142863", "0.51421845", "0.51368344", "0.51339877", "0.51299137" ]
0.0
-1
Server Call Wrappers SRC: changePasswordDialogCommon =====================================================================
function submitChangePasswordDialogForm() { if (validateChangePasswordDialogForm()) { var params = bindForm('changePasswordDialogForm'); clearForm('changePasswordDialogForm'); submitChangePasswordDialog(params); $('#changePasswordDialog').dialog('close'); } else { briefNotify( 'Please Correct Form Validation Errors To Continue', 'WARNING' ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ChangePassword() {\n\t}", "function changePasswordCallback(result){\n switch (result.error){\n // If no error, show feedback \"password changed\"\n case API_NO_ERROR:\n info('sinfo', locale_strings['PASSWORD_CHANGED'], 4);\n $('change_password').reset();\n break;\n\n // If not logged in, show login page\n case API_NOT_LOGGEDIN:\n openLogin();\n break;\n\n // Provided actual password was wrong\n case API_WRONG_CREDENTIALS:\n info('sinfo', getErrorString(result.error), 4);\n $('cp_password').setValue(\"\");\n $('cp_password').shake();\n break;\n\n case API_INVALID_PASSWORD:\n info('sinfo', getString('NEW_PASS_INVALID') + '<br>' +\n getString('MIN_LENGTH') + ': ' + result.min + '<br>' +\n getString('MAX_LENGTH') + ': ' + result.max, 4);\n $('change_password').reset();\n $('change_password').shake();\n break;\n\n // Else show a info message\n default:\n info('sinfo', getErrorString(result.error), 4);\n $('change_password').reset();\n $('change_password').shake();\n break;\n }\n}", "function showChangePasswordDialog(passwordResetToken) {\n\tvar errorCallback = function(error, data) {\n\n\t\t// Special case when old password did not match\n\t\tif(!passwordResetToken && !error && data && data[\"resultCode\"] === \"NOT_FOUND\") {\n\t\t\ttp.dialogs.showDialog(\"errorDialog\", \"#wrong-password\");\n\t\t} else {\n\t\t\tconsole.error(error, data);\n\t\t\ttp.dialogs.showDialog(\"errorDialog\", \"#password-change-failed\")\n\t\t\t\t.on(\"ok\", function() {\n\t\t\t\t\tif(passwordResetToken) {\n\t\t\t\t\t\tdoNavigate(\"/home.html\");\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t;\n\t\t}\n\t};\n\tvar changeDispatcher = tp.dialogs.showDialog(\"changePasswordDialog\", tp.lang.getText(passwordResetToken ? \"password-change\" : \"change-password\"));\n\tif(!passwordResetToken) {\n\t\td3.select(\".password-old\").classed(\"hidden\", false);\n\t}\n\tchangeDispatcher\n\t\t.on(\"ok\", function() {\n\t\t\tvar oldPasswordElement = d3.select(\"input[name=password-old]\");\n\t\t\tvar oldPassword = oldPasswordElement.property(\"value\");\n\t\t\tvar newPasswordElement = d3.select(\"input[name=password-new]\");\n\t\t\tvar newPassword = newPasswordElement.property(\"value\");\n\t\t\tvar verifyPassword = d3.select(\"input[name=password-verify]\").property(\"value\");\n\t\t\tif(!passwordResetToken) {\n\t\t\t\tif(tp.util.isEmpty(oldPassword) || oldPassword.length < 6) {\n\t\t\t\t\ttp.dialogs.showDialog(\"errorDialog\", \"#password-too-short\")\n\t\t\t\t\t\t.on(\"ok\", function() {\n\t\t\t\t\t\t\toldPasswordElement.node().select();\n\t\t\t\t\t\t})\n\t\t\t\t\t;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(tp.util.isEmpty(newPassword) || newPassword.length < 6) {\n\t\t\t\ttp.dialogs.showDialog(\"errorDialog\", \"#password-too-short\")\n\t\t\t\t\t.on(\"ok\", function() {\n\t\t\t\t\t\tnewPasswordElement.node().select();\n\t\t\t\t\t})\n\t\t\t\t;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif(newPassword !== verifyPassword) {\n\t\t\t\ttp.dialogs.showDialog(\"errorDialog\", \"#passwords-different\")\n\t\t\t\t\t.on(\"ok\", function() {\n\t\t\t\t\t\tnewPasswordElement.node().select();\n\t\t\t\t\t})\n\t\t\t\t;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif(passwordResetToken) {\n\t\t\t\ttp.session.resetPassword(passwordResetToken, newPassword, function(error, data) {\n\t\t\t\t\tif(error) {\n\t\t\t\t\t\terrorCallback(error, data);\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttp.dialogs.showDialog(\"messageDialog\", \"#password-reset-change-successful\")\n\t\t\t\t\t\t\t.on(\"ok\", function() {\n\t\t\t\t\t\t\t\tdoNavigate(\"/home.html?signin=true\");\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});\n\t\t\t} else {\n\t\t\t\ttp.session.changePassword(oldPassword, newPassword, function(error, data) {\n\t\t\t\t\tif(error) {\n\t\t\t\t\t\terrorCallback(error, data);\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttp.dialogs.closeDialogWithMessage(changeDispatcher.target, \"messageDialog\", \"#password-change-successful\");\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn false;\n\t\t})\n\t\t.on(\"cancel\", function() {\n\t\t\ttp.dialogs.closeDialogWithMessage(changeDispatcher.target, \"messageDialog\", \"#password-no-change\");\n\t\t\treturn false;\n\t\t})\n\t;\n}", "function initialisePasswordDialog(user, passwordLink) {\n $(passwordLink).click(function (e) {\n e.preventDefault();\n\n var $form = $(bitbucket.internal.admin.users.passwordResetForm({}));\n\n var dialog = new AJS.Dialog({\n width: 433,\n id: 'change-password-dialog',\n closeOnOutsideClick: false,\n keypressListener: function keypressListener(e) {\n // AUIDialog.updateHeight() rebinds the keypressListener at every call, even if it's already bound to the event;\n // thus we need to have jQuery stops the immediate propagation of the event to prevent successive invocations.\n // For example, the sequence dialog.show().updateHeight().updateHeight() would have the handler bound three times.\n e.stopImmediatePropagation();\n if (e.keyCode === AJS.keyCode.ENTER) {\n e.preventDefault();\n $(this).find('.button-panel-submit-button').click();\n } else if (e.keyCode === AJS.keyCode.ESCAPE) {\n e.preventDefault();\n dialog.remove();\n }\n }\n });\n dialog.addHeader(AJS.escapeHtml(AJS.I18n.getText('bitbucket.web.user.change.password.dialog', user.name)));\n\n dialog.addPanel('content', $form);\n dialog.addSubmit(AJS.I18n.getText('bitbucket.web.button.save'), function (dialog) {\n var $spinner = new SubmitSpinner($(dialog.getPage(0).buttonpanel).find('.button-panel-submit-button'), 'before').show();\n\n dialog.disable(); // Prevent double submission\n var buttonPanel = dialog.getPage(0).buttonpanel;\n buttonPanel.addClass('disabled');\n\n ajax.rest({\n url: $form.attr('action'),\n type: 'PUT',\n data: _.extend({ name: user.name }, ajax.formToJSON($form)),\n statusCode: {\n '*': function _() {\n return false;\n /* this is already a popup: handle all the errors locally */\n }\n }\n }).always(function () {\n $spinner.remove();\n }).done(function () {\n dialog.remove();\n notifySuccess(AJS.I18n.getText('bitbucket.web.user.password.update.success'));\n }).fail(function (xhr, textStatus, errorThrown, data) {\n dialog.enable();\n buttonPanel.removeClass('disabled');\n\n errorUtil.setFormErrors($form, data && data.errors && data.errors[0] && data.errors[0].message ? data.errors : [{ message: AJS.I18n.getText('bitbucket.web.user.change.password.failure') }]);\n dialog.updateHeight();\n });\n });\n dialog.addCancel(AJS.I18n.getText('bitbucket.web.button.cancel'), function (dialog) {\n dialog.remove();\n });\n dialog.show();\n dialog.updateHeight();\n });\n }", "function alterPasswd(){\r\n $(\".alterPasswdDialog\").dialog(\"open\");\r\n}", "function updatePwd() {\n $.post('/userTools/updatePwd', $('#updatePwd').serialize(), function(data, status) {\n $.notify({\n title: '<strong>Success!</strong>',\n message: data.message,\n icon: '/images/kip.gif'\n },{\n icon_type: 'image',\n type: 'success',\n });\n $('#changePwd').modal('hide');\n }).fail(function(data) {\n console.log(data);\n $('#warning').html('<strong>Warning!</strong> ' + data.responseJSON.message).show();\n })\n}", "function tryChangePassword() {\n if(typeof(changing) != 'undefined' && changing) {\n alert(\"암호 변경 중입니다.\\n잠시만 기다려주세요.\");\n\n return false;\n } // Avoid duplicate trying.\n\n changing = true;\n\n var memID = window.userData.id;\n\n if($('#txt_change_pasword_current_pw').val() == \"\" || $('#txt_change_pasword_new_pw').val() == \"\" || $('#txt_change_pasword_new_pw_re').val() == \"\") {\n alert('모든 칸을 채워주세요.');\n } else if($('#txt_change_pasword_new_pw').val() != $('#txt_change_pasword_new_pw_re').val()) {\n alert('암호와 암호 확인이 일치하지 않습니다.');\n } else {\n changePassword({\n \"memID\": encodeURI(memID),\n \"existing\": $('#txt_change_pasword_current_pw').val(),\n \"newPw\": $('#txt_change_pasword_new_pw').val()\n }, function(result) {\n delete changing;\n\n if(result.success) {\n alert(\"암호가 변경되었습니다.\\n다시 로그인해주세요.\");\n\n $.get(\"http://192.168.60.100:3000/logout\",function(data){\n if(data==='logout'){\n document.location.reload();\n }\n });\n } else {\n alert(\"암호 변경에 실패했습니다.\");\n }\n });\n }\n}", "function createPasswordDialog( task, post )\n{\n var app = UiApp.createApplication();\n app.setWidth(400);\n app.setHeight(100);\n\n var labelUsername = app.createLabel('Username');\n app.add(labelUsername);\n\n var usernameField = app.createTextBox().setId('usernameField').setName(\"username\");\n app.add(usernameField);\n\n var labelPassword = app.createLabel('Password');\n app.add(labelPassword);\n\n var passwordField = app.createPasswordTextBox().setId('passwordField').setName(\"password\");\n app.add(passwordField);\n\n var taskField = app.createTextBox().setId('taskField').setName(\"task\");\n taskField.setVisible(false);\n taskField.setValue( task );\n app.add(taskField);\n\n var postField = app.createTextBox().setId('postField').setName(\"post\");\n postField.setVisible(false);\n postField.setValue( post );\n app.add(postField);\n\n var handlerOkBtn = app.createServerHandler(\"setPassword\")\n .addCallbackElement(passwordField)\n .addCallbackElement(usernameField)\n .addCallbackElement(taskField)\n .addCallbackElement(postField);\n var okBtn = app.createButton(\"OK\", handlerOkBtn);\n okBtn.setWidth(60);\n app.add(okBtn);\n\n var handlerCancelBtn = app.createServerHandler(\"closePasswordDialog\");\n var cancelBtn = app.createButton(\"Cancel\", handlerCancelBtn);\n cancelBtn.setWidth(60);\n app.add( cancelBtn );\n\n var messageLbl = app.createLabel().setId(\"warningMessageLbl\");\n messageLbl.setStyleAttribute( \"color\", \"red\" );\n app.add(messageLbl);\n\n return app;\n}", "editPassword() {\n this.openChangePasswordModal();\n }", "function change_password() {\n\tvar current_password = document.getElementById(\"current_password\").value;\n\tvar new_password = document.getElementById(\"new_password\").value;\n\tvar confirm_new_passord = document.getElementById(\"confirm_new_password\").value;\n\t\n\t// Check validity of given passwords\n\tif(new_password != confirm_new_passord) {\n\t\talert(\"Passwords do not match\");\n\t\treturn;\n\t} else if(new_password.length < 8) {\n\t\talert(\"New password is too short\");\n\t\treturn;\n\t}\n\tvar data = JSON.stringify({\n\t\tcurrent_password : current_password,\n\t\tnew_password : new_password\n\t});\n\tvar uri = getLink(\"UpdatePassword\");\n\t\n\tvar xhr = createRequest(\"POST\", uri);\n\txhr.setRequestHeader(\"Content-Type\", \"text/plain\")\n\txhr.onload = function() {\n\t\tif(xhr.status == 401) alert(\"Current password incorrect\");\n\t\telse if(xhr.status != 200) alert(\"Something went wrong on the server :/\");\n\t\telse {\n\t\t\tdocument.getElementById(\"current_password\").value = \"\";\n\t\t\tdocument.getElementById(\"new_password\").value = \"\";\n\t\t\tdocument.getElementById(\"confirm_new_password\").value = \"\";\n\t\t\talert(\"Password successfully changed!\");\n\t\t}\n\t}\n\txhr.send(data);\n\t\n}", "function change_pass(event) {\r\n $('#old_pass').val($('#old_pass').val().replace(/\\s/g, ''));\r\n $('#new_pass').val($('#new_pass').val().replace(/\\s/g, ''));\r\n $('#cnf_pass').val($('#cnf_pass').val().replace(/\\s/g, ''));\r\n if ($(\"#old_pass\").val() != \"\") {\r\n $(\"#old_pass_error\").removeClass(\"has-error\");\r\n $(\"#old_pass_msg\").text(\"\");\r\n }\r\n if ($(\"#new_pass\").val() != \"\") {\r\n $(\"#new_pass_error\").removeClass(\"has-error\");\r\n $(\"#new_pass_msg\").text(\"\");\r\n }\r\n if ($(\"#cnf_pass\").val() != \"\") {\r\n $(\"#cnf_pass_error\").removeClass(\"has-error\");\r\n $(\"#cnf_pass_msg\").text(\"\");\r\n }\r\n $(\"#changeAfterSuccessMsg\").text(\"\");\r\n if (event.which == 13) {\r\n $('#change_pass_btn').click();\r\n return false;\r\n }\r\n}//change password end", "function resetPassword(){\n $('#resetPassword').dialog({\n modal: true,\n draggable: false,\n width: 'auto',\n height: 'auto',\n buttons: {\n \"Update\": function(){\n // autenticate User\n if (cognitoUser != null) {\n cognitoUser.getSession(function(err, session) {\n if (err) {\n alert(err);\n return;\n }\n });\n }\n // end autenticate user\n let = oldPassword = $('#oldPassword').val();\n let newPassword = document.getElementById(\"newPassword\").value;\n if(newPassword === document.getElementById(\"newPasswordCheck\").value){\n cognitoUser.changePassword(oldPassword, newPassword, function(err, result){\n if(err){\n alert(err)\n return;\n }\n console.log('call result: ' + result)\n $(\"#resetPassword\").dialog('close');\n })\n }\n else{\n alert(\"New Password and retyped password does not match please try again\");\n }\n },\n \"Cancel\": function(){\n $(\"#resetPassword\").dialog('close');\n }\n }\n })\n \n}", "handleEditPasswordButtonClick() {\n this.openEditPasswordModal();\n }", "function onChangePasswordUserClick() {\n gCustomerId = $(this).data('id');\n $('#modal-update-password').modal('show');\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 postChangePassword(data, textStatus, jqXHR, param) {\n\tvar uiDiv = $('#ui');\n\tuiDiv.html('');\n\tvar div = $('<div>');\n\tuiDiv.append(div);\n\tdiv.addClass('transmissionnum');\n\tdiv.html('The password was successfully changed.');\n}", "function changePassword(currentUserInfo) {\n var promise, wizardContainerSelector = \".dm-selectPassword\";\n\n cdm.stepWizard({\n extension: \"DomainTenantExtension\",\n steps: [\n {\n template: \"selectPassword\",\n data: {\n customerId: currentUserInfo.GoDaddyShopperId\n },\n onStepActivate: function () {\n Shell.UI.Validation.setValidationContainer(wizardContainerSelector);\n }\n }\n ],\n onComplete: function () {\n if (!Shell.UI.Validation.validateContainer(wizardContainerSelector)) {\n return false;\n }\n\n currentUserInfo.GoDaddyShopperPassword = $(\"#dm-password\").val();\n currentUserInfo.GoDaddyShopperPasswordChanged = true;\n promise = global.DomainTenantExtension.Controller.updateUserInfo(currentUserInfo);\n\n global.waz.interaction.showProgress(promise, {\n initialText: \"Reseting password...\",\n successText: \"Successfully reset the password.\",\n failureText: \"Failed to reset the password.\"\n });\n\n promise.done(function () {\n global.DomainTenantExtension.Controller.invalidateUserInfoCache();\n var portalUrl = global.DomainTenantExtension.Controller.getCurrentUserInfo().GoDaddyCustomerPortalUrl;\n window.open(portalUrl, \"_blank\");\n });\n }\n }, { size: \"small\" });\n }", "function initChangePassword() {\n $('#txt_change_pasword_back').click(function() {\n hidePopup();\n });\n\n // Try sign up when click \"change\" button or press \"Enter\" key.\n $('#txt_change_pasword_square').click(function() {\n tryChangePassword();\n });\n\n enterKeyBind('#txt_change_pasword_current_pw', function() {\n tryChangePassword();\n });\n\n enterKeyBind('#txt_change_pasword_new_pw', function() {\n tryChangePassword();\n });\n\n enterKeyBind('#txt_change_pasword_new_pw_re', function() {\n tryChangePassword();\n });\n}", "settingsPasswordResults(values) {\n const { updatePasword, addNotification } = this.props; // eslint-disable-line\n const credentials = {\n oldPassword: values.oldPassword,\n newPassword: values.newPassword\n };\n\n updatePasword(credentials)\n .then((response) => {\n if (response.payload.status === 200) {\n this.setState({ registered: false});\n addNotification(strings.passwordSaveNotify, 'success', 'tc');\n }\n });\n }", "function changePassword(){\n\tlogincontroller.logincheck(name,password,(err,data)=>{\n \tif(err) throw err;\n \telse{\n \t\tconsole.log(\"\\n------------------------Change Password--------------------------------\\n\\n\")\n \t\tconsole.log(\"------------------------------------------------------------------------------\")\n\tvar oldpass = readline.question(\"Enter your old password => \");\n\tconsole.log(\"------------------------------------------------------------------------------\")\n\tvar newpass = readline.question(\"Enter your new password => \");\n\tconsole.log(\"------------------------------------------------------------------------------\\n\")\n \t\tif(oldpass === data[0].password){\n \t\t\tmailcontroller.updatepassword(data[0].emailid,newpass,(err)=>{\n \t\t\t\tif(err) throw err;\n \t\t\t\telse\n \t\t\t\t\tconsole.log(\"\\n---------Password Changed successfilly!----------\");\n \t\t\t\t\tpassword = newpass;\n \t\t\t\t\tconsole.log(\"\\n---------------------------Welcome \"+data[0].name+\"------------------------\");\n \t\t\t\t\thomeUI();\n \t\t\t})\n \t\t}else\n \t\t{\n \t\t\tconsole.log(\"\\n-----------Old Password does not match!------------------\");\n \t\t\tconsole.log(\"\\n---------------------------Welcome \"+data[0].name+\"------------------------\");\n \t\t\thomeUI();\n \t\t}\n \t}\n\t\n \t});\n}", "function changePassword() {\n $rootScope.pwdModalTitle = '修改密码';\n $rootScope.pwdModal = $modal({\n scope: $rootScope,\n templateUrl: 'partials/modal.changePassword.html?' + new Date().getTime(),\n show: true,\n backdrop: false\n });\n }", "onActionButtonTap_() {\n if (this.isEditDialog_) {\n const idsToChange = [];\n const accountId = this.entry.accountId;\n const deviceId = this.entry.deviceId;\n if (accountId !== null) {\n idsToChange.push(accountId);\n }\n if (deviceId !== null) {\n idsToChange.push(deviceId);\n }\n\n this.passwordManager_\n .changeSavedPassword(idsToChange, this.$.passwordInput.value)\n .finally(() => {\n this.close();\n });\n } else {\n this.close();\n }\n }", "function changePasswordHandler(response) {\n messageData = JSON.parse(response);\n if (messageData.success) \n\tdocument.getElementById(\"changePasswordForm\").reset();\n}", "function initChangePassword() {\n\t\t$form.find('[aria-click=\"change-password\"]').on('click', function () {\n\t\t\tvar \n\t\t\t\t$html = $('<article style=\"width: 300px; max-width: 80vw\" class=\"box box-primary\"><section class=\"box-header\"><h3 class=\"box-title\">Đổi mật khẩu</h3></section><form class=\"form box-body\"><input type=\"hidden\" name=\"user[id]\" value=\"' + $form.find('[name=\"user[id]\"]').val() + '\" /><article class=\"form-group\"><label for=\"old_password\">Mật khẩu cũ</label><input name=\"user[old_password]\" data-constraint=\"required\" class=\"form-control\" type=\"password\" id=\"user[old_password]\" /></article><article class=\"form-group\"><label for=\"password\">Mật khẩu mới</label><input name=\"user[password]\" data-constraint=\"required\" class=\"form-control\" type=\"password\" id=\"password\" /></article><article class=\"form-group\"><label for=\"repeat_password\">Nhập lại mật khẩu mới</label><input name=\"repeat_password\" data-constraint=\"required\" class=\"form-control\" type=\"password\" id=\"repeat_password\" /></article><article class=\"text-center\"><button type=\"submit\" class=\"btn btn-primary btn-flat\">' + _t.form.finish + '</button> <button type=\"button\" class=\"btn btn-default btn-flat\">' + _t.form.cancel + '</button></article></form></article>'),\n\t\t\t\t$form2 = $html.find('form');\n\n\t\t\tvar $popup = popupFull({\n\t\t\t\thtml: $html\n\t\t\t});\n\n\t\t\t$html.find('button[type=\"button\"]').on('click', function () {\n\t\t\t\t$popup.off();\n\t\t\t});\n\n\t\t\tinitForm($form2, {\n\t\t\t\tobject: 'user',\n\t\t\t\tsubmit: function () {\n\t\t\t\t\ttoggleLoadStatus(true);\n\t\t\t\t\t$.ajax({\n\t\t\t\t\t\turl: '/users/change_password',\n\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\tdata: $form2.serialize(),\n\t\t\t\t\t\tdataType: 'JSON'\n\t\t\t\t\t}).always(function () {\n\t\t\t\t\t\ttoggleLoadStatus(false);\n\t\t\t\t\t}).done(function (data) {\n\t\t\t\t\t\tif (data.status == 0) {\n\t\t\t\t\t\t\t$popup.off();\n\t\t\t\t\t\t\tpopupPrompt({\n\t\t\t\t\t\t\t\ttitle: _t.form.success_title,\n\t\t\t\t\t\t\t\ttype: 'success',\n\t\t\t\t\t\t\t\tcontent: 'Đổi mật khẩu thành công'\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tif (data.status == 5) {\n\t\t\t\t\t\t\t\tpopupPrompt({\n\t\t\t\t\t\t\t\t\ttitle: _t.form.error_title,\n\t\t\t\t\t\t\t\t\ttype: 'danger',\n\t\t\t\t\t\t\t\t\tcontent: 'Mật khẩu cũ không đúng'\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$popup.off();\n\t\t\t\t\t\t\tpopupPrompt({\n\t\t\t\t\t\t\t\ttitle: _t.form.error_title,\n\t\t\t\t\t\t\t\ttype: 'danger',\n\t\t\t\t\t\t\t\tcontent: _t.form.error_content\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}\n\t\t\t\t\t}).fail(function () {\n\t\t\t\t\t\t$popup.off();\n\t\t\t\t\t\tpopupPrompt({\n\t\t\t\t\t\t\ttitle: _t.form.error_title,\n\t\t\t\t\t\t\ttype: 'danger',\n\t\t\t\t\t\t\tcontent: _t.form.error_content\n\t\t\t\t\t\t})\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tinitCheckRepeatPassword_2();\n\n\t\t\t// Check repeat password\n\n\t\t\tfunction initCheckRepeatPassword_2() {\n\t\t\t\tvar \n\t\t\t\t\t$password = $form2.find('#password'), \n\t\t\t\t\t$repeatPassword = $form2.find('#repeat_password');\n\n\t\t\t\t$password.add($repeatPassword).on('change', function () {\n\t\t\t\t\tif ($password.val() && $repeatPassword.val()) {\n\t\t\t\t\t\tif ($password.val() === $repeatPassword.val()) {\n\t\t\t\t\t\t\t$form2.toggleValidInput($repeatPassword, true, 'same');\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$form2.toggleValidInput($repeatPassword, false, 'same');\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// / Check repeat password\n\t\t});\n\t}", "function user_account_modify() {\r\n\t$(\"#accountForm\").validate();\r\n\tjQuery.extend(jQuery.validator.messages, {\r\n\t required: \"请填写必要的信息\",\r\n\t equalTo: \"两次密码不一样\",\r\n\t accept: \"包含非法字符\",\r\n\t rangelength: jQuery.validator.format(\"长度只能在4-20个字符\")\r\n\t});\r\n\r\n\r\n\t//global cancel\r\n\t$('.dialog-cancel').click(function () {\r\n\t\t$.modal.close();\r\n\t\treturn false;\r\n\t});\r\n\t//dialog - user account\r\n\t$('#dialog-nickname').click(function () {\r\n\t\t$('#nickname-modal-content').modal();\r\n\t\treturn false;\r\n\t});\r\n\t$('#dialog-password').click(function () {\r\n\t\t$('#password-modal-content').modal();\r\n\t\treturn false;\r\n\t});\r\n}", "function changeScreenOnPass \n (\n hideScreenId, // Id of the screen that we need to hide\n showScreenId // Id of the screen that we need to show\n )\n {\n fieldStateChangeWr ('txtUserName txtPwd', '', 'txtNewPassWd txtCnfPwd', ''); \n displayOrHideFields (hideScreenId, showScreenId);\n }", "function resetPassword() {\r\n \tconsole.log(\"Inside reset password\");\r\n \t//self.user.userpassword = self.user.password;\r\n \tself.user.user_id = $(\"#id\").val();\r\n \tself.user.obsolete = $(\"#link\").val();\r\n \tdelete self.user.confpassword;\r\n \tUserService.changePassword(self.user)\r\n \t\t.then(\r\n \t\t\t\tfunction (response) {\r\n \t\t\t\t\tif(response.status == 200) {\r\n \t\t\t\t\t\tself.message = \"Password changed successfully..!\";\r\n \t\t\t\t\t\tsuccessAnimate('.success');\r\n \t\t\t\t\t\t\r\n \t\t\t\t\t\twindow.setTimeout( function(){\r\n \t\t\t\t\t\t\twindow.location.replace('/Conti/login');\r\n \t\t\t\t \t}, 5000);\r\n \t\t\t\t\t\t\r\n \t\t\t\t\t} else {\r\n \t\t\t\t\t\tself.message = \"Password is not changed..!\";\r\n \t\t\t\t\t\tsuccessAnimate('.failure');\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\tfunction (errResponse) {\r\n \t\t\t\t\tconsole.log(errResponse);\r\n \t\t\t\t}\r\n \t\t\t);\r\n }", "function PasswordComponent(dialogRef, data, resetPasswordService, errorTermsStoreService) {\n this.dialogRef = dialogRef;\n this.data = data;\n this.resetPasswordService = resetPasswordService;\n this.errorTermsStoreService = errorTermsStoreService;\n // passWordPolicyList: Array<string> = ['LENGHTHRULE', 'MIXCHARRULE'];\n // nonEmptyField: string;\n // passwordMisMatchMessage: string;\n this.validationMessage = '';\n // rules: string[];\n this.showSuccessMessage = false;\n this.showError = false;\n if (!data.okLabel) {\n data.okLabel = 'Ok';\n }\n if (!data.cancelLabel) {\n data.cancelLabel = 'Cancel';\n }\n }", "function PasswordComponent(dialogRef, data, resetPasswordService, errorTermsStoreService) {\n this.dialogRef = dialogRef;\n this.data = data;\n this.resetPasswordService = resetPasswordService;\n this.errorTermsStoreService = errorTermsStoreService;\n // passWordPolicyList: Array<string> = ['LENGHTHRULE', 'MIXCHARRULE'];\n // nonEmptyField: string;\n // passwordMisMatchMessage: string;\n this.validationMessage = '';\n // rules: string[];\n this.showSuccessMessage = false;\n this.showError = false;\n if (!data.okLabel) {\n data.okLabel = 'Ok';\n }\n if (!data.cancelLabel) {\n data.cancelLabel = 'Cancel';\n }\n }", "function updatePassword(){\n //check if the form is valid\n if(!$('#changePasswordDialog * form').valid()) return;\n \n //put the loading screen on\n loadingScreen(); \n \n //create the object to send \n var obj=new Object();\n obj.oldpass = $('#oldpass_input').val();\n obj.password = $('#newpass_input').val();\n obj.repassword = $('#renewpass_input').val();\n \n //send it via jquery and update rating\n $.ajax({\n type: \"POST\",\n url: 'https://' + window.location.hostname + '/user/changepasswordin/',\n dataType: \"json\",\n data: obj ,\n success: function(res) {\n if(res.items[0].status ==='success'){\n setSuccessToSuccess();\n //loading screen\n removeLoadingScreen();\n\n //display success failure screen\n displaySuccessFailure();\n }\n else{\n setSuccessToFailed();\n //loading screen\n removeLoadingScreen();\n\n //display success failure screen\n displaySuccessFailure();\n\n $('#error').text(res.items[0].msg);\n }\n },\n error: function(res) { \n setSuccessToFailed();\n //loading screen\n removeLoadingScreen();\n \n //display success failure screen\n displaySuccessFailure();\n \n $(\"#error\").text(\"Connection failure! Try again\");\n },\n complete: function(){\n $('#changePasswordDialog').fadeOut('normal');\n $('#glassnoloading').fadeOut('normal');\n }\n });\n}", "changePassword(event) {\n var newState = this.mergeWithCurrentState({\n password: event.target.value\n });\n\n this.emitChange(newState);\n }", "onPasswordChange(text) {\n this.props.passwordChanged(text);\n this.isValidPassword(text);\n }", "function changePassword (str, callback) {\n\t\tfunction serverCall() {\n\t\t\tvar url = _servicesConfig[\"changePassword\"][\"url\"] + str,\n\t\t\t\tsuccess = function (data, textStatus, xhr) {\n\t\t\t\t\tcallback(data, true);\n\t\t\t\t},\n\t\t\t\terror = function (xhr, ajaxOptions, thrownError) {\n\t\t\t\t\tconsole.error(\"Failed to call changePassword service\", thrownError);\n\t\t\t\t\tcallback(thrownError, false)\n\t\t\t\t};\n\t\t\treturn getAjaxRequest(url, \"GET\", \"json\", success, error);\n\t\t}\n\n\t\t_debounce(\"changePassword\", serverCall);\n\t}", "function passwordChanged(input, output) {\n\t\tif( input.value.length < 8 ) {\n\t\t\t// Master-password size smaller than minimum allowed size\n\t\t\t// Provide a masked partial confirm-code, to acknowledge the user input\n\t\t\tvar maskedCode='';\n\t\t\tswitch(Math.floor(input.value.length*4/8)) {\n\t\t\t\tcase 1: maskedCode='#'; break;\n\t\t\t\tcase 2: maskedCode='##'; break;\n\t\t\t\tcase 3: maskedCode='###'; break;\n\t\t\t}\n\t\t\toutput.value=maskedCode;\n\t\t} else {\n\t\t\toutput.value = confirmCode(input.value);\n\t\t}\n\t\tvaluesChanged();\n\t}", "function confirmPassword(p1, p2 ){ if (p1.value && p1.value !== p2.value) {\n password2Ok = 0;\n showError(p2, \"Both passwords must match.\")\n} else if (p1.value && p1.value === p2.value) {\n password2Ok = 1;\n showSuccess(p2)\n}\n}", "autocryptSetupPasswd(window, dlgMode, passwdType = \"numeric9x4\", password) {\n if (!window) {\n window = this.getBestParentWin();\n }\n\n let inputObj = {\n password: null,\n passwdType,\n dlgMode,\n };\n\n if (password) {\n inputObj.initialPasswd = password;\n }\n\n window.openDialog(\n \"chrome://openpgp/content/ui/autocryptSetupPasswd.xhtml\",\n \"\",\n \"dialog,modal,centerscreen\",\n inputObj\n );\n\n return inputObj.password;\n }", "forgotPass() \n {\n \tAlert.alert(\n\t\t 'Go To Site',\n\t\t 'Pressing this button would help you restore your password (external source)',\n\t\t [\n\t\t {text: 'OK', onPress: () => console.log('OK Pressed')},\n\t\t ],\n\t\t {cancelable: false},\n\t\t);\n }", "function dialogLogin()\r\n{\r\n document.getElementById('userInput').focus();\r\n/* document.getElementById('userInput').value='exoadmin';\r\n document.getElementById('pwdInput').value='exo@ecm';*/\r\n}", "function changePaswordType(){\r\n\r\n var newPw=dojo.byId('dojox_form__NewPWBox_0'),\r\n veryPw=dojo.byId('dojox_form__VerifyPWBox_0');\r\n if(newPw.getAttribute('type')=='password' && veryPw.getAttribute('type')=='password'){\r\n newPw.setAttribute('type','text');\r\n veryPw.setAttribute('type','text');\r\n }else{\r\n newPw.setAttribute('type','password');\r\n veryPw.setAttribute('type','password');\r\n }\r\n \r\n \r\n}", "function resetUserPwd(username) {\r\n\tvar userId = $(\"#userIdRP\").val();\r\n\tvar email = $(\"#emailRP\").text();\r\n\tif (userId == \"0\") {\r\n\t\t$.modal.alert(strings['script.trySearch']);\r\n\t} else {\r\n\t\t$.modal.confirm(strings['msg.rp.confirm'] + username + \"?\", function() {\r\n\t\t\tblockUI();\r\n\t\t\t$.ajax({\r\n\t\t\t\ttype : \"GET\",\r\n\t\t\t\turl : \"resetUserPassword.do\",\r\n\t\t\t\tdata : \"username=\" + username + \"&email=\" + email,\r\n\t\t\t\tdataType : 'json',\r\n\t\t\t\tcache : false,\r\n\t\t\t\tsuccess : function(data) {\r\n\t\t\t\t\tunblockUI();\r\n\t\t\t\t\tif (data != null && data.resetPwdFlag == \"1\") {\r\n\t\t\t\t\t\t$(\"#passwordResetStatusMsgRP\").html(\"<span>\"+strings['msg.rp.success']+\"</span>\");\r\n\t\t\t\t\t\t$(\"#statusUsernameRP\").text(username);\r\n\t\t\t\t\t\tif (data.sendEmailFlag == \"1\") {\r\n\t\t\t\t\t\t\t$(\"#statusEmailRP\").html(\"<span style=\\\"color: green\\\">\"+strings['msg.rp.email.success']+\"</span>\");\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$(\"#statusEmailRP\").html(\"<span style=\\\"color: red\\\">\"+strings['msg.rp.email.failure']+\"</span>\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$(\"#passwordResetStatusRP\").attr(\"class\", \"wizard-fieldset fields-list\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$(\"#passwordResetStatusRP\").attr(\"class\", \"wizard-fieldset fields-list hidden\");\r\n\t\t\t\t\t\t$.modal.alert(strings['script.parent.passwordResetError']);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$('#userSearchRP').val(username);\r\n\t\t\t\t},\r\n\t\t\t\terror : function(data) {\r\n\t\t\t\t\tunblockUI();\r\n\t\t\t\t\t$.modal.alert(strings['script.parent.passwordResetError']);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}, function() {\r\n\t\t\t// this function closes the confirm modal on clicking cancel button\r\n\t\t});\r\n\t}\r\n}", "function changePasswordFn(newPassword) {\n var obj = {\n id : vm.userId,\n newPassword: newPassword\n };\n\n UserService\n .resetPassword(obj)\n .then(function (res) {\n var res = res.data;\n if (res.data && res.code === \"OK\") {\n vm.passForm.newPassword = '';\n vm.passForm.confirm_password = '';\n $('#password-strength-label').text('');\n $(\"#password-strength-label\").removeClass(\"p15 btn-rounded\");\n $('.strength-meter-fill').removeAttr('data-strength');\n $scope.setFlash('s', res.message);\n }\n },\n function (err) {\n if (err.data && err.data.message) {\n $scope.setFlash('e', err.data.message);\n }\n })\n }", "function editPassword(tablePkId, prevValue){\r\n\tvar valueChgDiv = document.getElementById(\"pwdChgMainDiv\");\r\n\tvalueChgDiv.setAttribute(\"style\", \"display:block\");\t\r\n\tvar mainDiv = document.getElementById(\"divGeneralId\");\r\n\tmainDiv.setAttribute(\"style\", \"display:block\");\t\r\n\tdocument.getElementById('oldPwdChgInptId').value = \"\";\r\n\tdocument.getElementById(\"newPwdChgInptId\").value = \"\";\t\r\n\tdocument.getElementById(\"confirmPwdChgInptId\").value = \"\";\t\r\n\tdocument.getElementById(\"pwdChgOkBtnId\").setAttribute(\"onclick\", \"updatePassword(\"+tablePkId+\", '\"+prevValue+\"')\");\r\n\tdocument.getElementById(\"pwdChgCancelBtnId\").setAttribute(\"onclick\", \"CancelPassword()\");\r\n}", "onupdateConfirmPassword(event) {\n this.password = event.target.value;\n this.passwordValidationState = '';\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 }", "promptPassword(\n aDialogTitle,\n aText,\n aPasswordRealm,\n aSavePassword,\n aPassword\n ) {\n if (aSavePassword == Ci.nsIAuthPrompt.SAVE_PASSWORD_FOR_SESSION) {\n throw new Components.Exception(\n \"promptUsernameAndPassword doesn't support SAVE_PASSWORD_FOR_SESSION\",\n Cr.NS_ERROR_NOT_IMPLEMENTED\n );\n }\n\n let checkBox = { value: false };\n let checkBoxLabel = null;\n let [origin, realm, username] = this._getRealmInfo(aPasswordRealm);\n\n username = decodeURIComponent(username);\n\n // If origin is null, we can't save this login.\n if (origin) {\n let canRememberLogin =\n aSavePassword == Ci.nsIAuthPrompt.SAVE_PASSWORD_PERMANENTLY &&\n Services.logins.getLoginSavingEnabled(origin);\n\n // if checkBoxLabel is null, the checkbox won't be shown at all.\n if (canRememberLogin) {\n checkBoxLabel = this._getLocalizedString(\"rememberPassword\");\n }\n\n if (!aPassword.value) {\n // Look for existing logins.\n for (let login of Services.logins.findLogins(origin, null, realm)) {\n if (login.username == username) {\n aPassword.value = login.password;\n return true;\n }\n }\n }\n }\n\n let ok = nsIPrompt_promptPassword(\n aDialogTitle,\n aText,\n aPassword,\n checkBoxLabel,\n checkBox\n );\n\n if (ok && checkBox.value && origin && aPassword.value) {\n let newLogin = new LoginInfo(\n origin,\n null,\n realm,\n username,\n aPassword.value\n );\n\n Services.logins.addLogin(newLogin);\n }\n\n return ok;\n }", "function showChangePasswordDialog(){\n $('#changePasswordDialog').slideToggle('normal');\n $('#glassnoloading').slideToggle('normal');\n}", "function changepass(){\t\t\n\t//phoneGap and jQueryMobile do not support toast messages directly\n //so we can add this using toast.js\n new Toast({content: 'You succesfuly change your password', duration: 2000}); \t\n}", "function change(curpass, pass, passConfirm){\n if (curpass === \"\" || pass === \"\" || passConfirm === \"\"){\n setPWMessage();\n setSuccessMessage();\n setPWErrorMessage('Please fill in all fields');\n }\n else{\n // first check that old pw is correct for security\n axios.post('https://togethrgroup1.herokuapp.com/api/login', { \n UserName: username,\n Password: curpass\n })\n .then((response) => {\n console.log(response);\n if (pass != passConfirm){\n setPWMessage();\n setSuccessMessage();\n setPWErrorMessage('Passwords must match');\n }\n else {\n // hash pw\n axios.patch('https://togethrgroup1.herokuapp.com/api/editpassword', { \n id: userid,\n Password: pass\n })\n .then((response) => {\n console.log(response);\n setPWMessage();\n setPWErrorMessage();\n setSuccessMessage('Your password was updated!');\n }, (error) => {\n console.log(error);\n setPWMessage();\n setSuccessMessage();\n setPWErrorMessage('Something went wrong! Try again.');\n });\n }\n\n }, (error) => {\n console.log(error);\n setSuccessMessage();\n setPWErrorMessage();\n setPWMessage('Incorrect Password');\n });\n }\n }", "function onChangeLogin() {}", "function showNewFields() {\n Windows.Storage.ApplicationData.current.localFolder.getFileAsync(g_pwdFile).then(function (file) {\n // A password already exists, print a warning\n $('#new-msg').html('A password already exists ? Reset your password involves <b>the loss of your files</b>' +\n ' previously saved from TrustyDrive.<br><br>');\n }, function () {\n $('#new-msg').html('Choose a secure password (more than 8 characters with symbols, numbers and upper/lower case)' +\n ' is important to secure your TrustyDrive files. However, be sure to not forget it. <b>TrustyDrive does not save this' +\n ' password. If you lose it, your files cannot be recovered.<br><br>');\n });\n $('#connect-form').hide();\n $('#new-form').show();\n $('#new-error').html('');\n if ($._data($('#new-confirm').get(0), 'events') == undefined) {\n $('#new-confirm').keypress(function (e) {\n if (e.which == 13) {\n createPassword();\n }\n });\n // Define click listeners\n $('#new-confirm').click(createPassword);\n $('#connect-link').click(function () {\n showConnectFields('');\n });\n }\n}", "onPasswordChange(text) {\n this.props.passwordChange(text);\n }", "async changePassword(player) {\n const verifyCurrentPassword = await Question.ask(player, {\n question: 'Changing your password',\n message: 'Enter your current password to verify your identity',\n isPrivate: true, // display this as a password\n constraints: {\n validation: AccountDatabase.prototype.validatePassword.bind(\n this.database_, player.name),\n explanation: 'That password is incorrect. We need to validate this to make sure ' +\n 'that you\\'re really changing your own password.',\n abort: 'Sorry, we need to validate your identity!',\n }\n });\n\n if (!verifyCurrentPassword)\n return; // the user couldn't verify their current password\n\n // Give the |player| multiple attempts to pick a reasonably secure password. We don't set\n // high requirements, but we do need them to be a little bit sensible with their security.\n const password = await Question.ask(player, {\n question: 'Changing your password',\n message: 'Enter the new password that you have in mind',\n isPrivate: true, // display this as a password field\n constraints: {\n validation: AccountCommands.prototype.isSufficientlySecurePassword.bind(this),\n explanation: 'The password must be at least 8 characters long, and contain at ' +\n 'least one number, symbol or a character of different casing.',\n abort: 'Sorry, you need to have a reasonably secure password!'\n }\n });\n\n if (!password)\n return; // the user aborted out of the flow\n\n // The |player| must confirm that they indeed picked the right password, so we ask again.\n const confirmPassword = await Question.ask(player, {\n question: 'Changing your password',\n message: 'Please enter your password again to verify.',\n isPrivate: true, // display this as a password field\n constraints: {\n validation: input => input === password,\n explanation: 'You must enter exactly the same password again to make sure that ' +\n 'you didn\\'t accidentally misspell it.',\n abort: 'Sorry, you need to confirm your password!'\n }\n });\n\n if (!confirmPassword || confirmPassword !== password)\n return; // the user aborted out of the flow\n\n // Now execute the command to actually change the password in the database.\n await this.database_.changePassword(player.name, password);\n\n // Announce the change to administrators, so that the change is known by at least a few more\n // people in case the player forgets their new password immediately after. It happens.\n if (this.settings_().getValue('account/password_admin_joke')) {\n let fakePassword = null;\n switch (random(4)) {\n case 0:\n fakePassword = player.name.toLowerCase().replace(/[^a-zA-Z]/g, '');\n for (const [ before, after ] of [ ['a', 4], ['e', 3], ['i', 1], ['o', 0] ])\n fakePassword = fakePassword.replaceAll(before, after);\n\n break;\n case 1:\n fakePassword =\n player.name.toLowerCase().replace(/[^a-zA-Z]/g, '') +\n (random(1000, 9999).toString());\n break;\n case 2:\n fakePassword = '1' + player.name.toLowerCase().replace(/[^a-zA-Z]/g, '') + '1';\n break;\n case 3:\n fakePassword = ['deagle', 'sawnoff', 'gtasa', 'lvpsux', 'password'][random(5)];\n fakePassword += random(100, 999).toString();\n break;\n }\n\n this.announce_().announceToAdministrators(\n Message.ACCOUNT_ADMIN_PASSWORD_CHANGED2, player.name, player.id, fakePassword);\n } else {\n this.announce_().announceToAdministrators(\n Message.ACCOUNT_ADMIN_PASSWORD_CHANGED, player.name, player.id);\n }\n\n return alert(player, {\n title: 'Account management',\n message: `Your password has been changed.`\n });\n }", "function update_confirmation_button_status()\n {\n const is_valid_password = validate_password(),\n is_valid_repeated_password = validate_repeated_password();\n\n if (is_valid_password && is_valid_repeated_password)\n {\n domanip.enable(DOM.confirm_new_password_button);\n DOM.confirm_new_password_button.style.visibility = \"visible\";\n }\n else\n {\n domanip.disable(DOM.confirm_new_password_button);\n DOM.confirm_new_password_button.style.visibility = \"hidden\";\n }\n }", "function pword_change()\n{\n //get the fields\n password = document.change_pword_form.change_password.value\n password1 = document.change_pword_form.change_password1.value\n username = document.change_pword_form.Username.value\n\n if (password == \"\" || password1 == \"\" )\n {\n //reset the form \n document.getElementById(\"change_pword_form\").reset();\n //return the connect method\n document.getElementById('chat_res').innerHTML= \"<em id='err'>Please enter the passwords.</em>\"; \n return false;\n\n }\n else if (password != password1){\n //reset the form \n document.getElementById(\"change_pword_form\").reset();\n //return the connect method\n document.getElementById('chat_res').innerHTML= \"<em id='err'>The passwords dont match.</em>\"; \n return false;\n\n\n }\n else\n {\n //check if there is an internet connection\n if (window.navigator.onLine)\n {\n document.getElementById('chat_res').innerHTML = '<img src=\"/static/images/Loader.gif\" />';\n var xmlhttp;\n if (window.XMLHttpRequest)\n {\n xmlhttp=new XMLHttpRequest();\n }\n else\n {\n xmlhttp=new ActiveXObject(\"Microsoft.XMLHTTP\");\n \n }\n\n xmlhttp.onreadystatechange=function()\n {\n if (xmlhttp.readyState==4 && xmlhttp.status==200)\n {\n\n //reset the form\n document.getElementById('change_pword_form').reset();\n //remove the all ticks\n document.getElementById('all_ticks').style.display = 'block';\n //remove the right div\n document.getElementById('left_div').style.display = 'none';\n //return the connect method\n document.getElementById('chat_res').innerHTML=xmlhttp.responseText;\n }\n \n }\n data = \"?password=\"+password+ \"&Username=\"+username\n xmlhttp.open(\"GET\",'/change_password/'+data,true);\n xmlhttp.send();\n\n }\n //no network connection\n else\n {\n //return the connect method\n document.getElementById('chat_res').innerHTML= errorMsg; \n return false;\n }\n }\n\n}", "function updatePassword() \n {\n swal({\n title: \"Attention\",\n text: \"Are you sure you want to update your password?\",\n type: \"warning\",\n showCancelButton: true,\n confirmButtonColor: \"#DD6B55\",\n confirmButtonText: \"Yes!\",\n cancelButtonText: \"No!\"\n /*closeOnConfirm: false,\n closeOnCancel: false*/\n }).then(function(result){\n\n if (result.value) \n {\n //name vairables\n var form = $('#form-update-password'); //form\n var currentPassword = form.find('#current_password').val();\n var newPassword = form.find('#new_password').val();\n var rePassword = form.find('#re_password').val();\n var fields = form.find('input.required, select.required'); \n \n blockUI(); \n\n for(var i=0;i<fields.length;i++)\n {\n if(fields[i].value == \"\")\n {\n /*alert(fields[i].id)*/\n unblockUI();\n showSimpleMessage(\"Attention\", \"All fields are required\", \"error\");\n $('#'+fields[i].id).focus();\n return false;\n }\n }\n \n if(newPassword !== rePassword)\n {\n //user image is more than 500kb\n unblockUI();\n $(\"#new_password\").focus();\n showSimpleMessage(\"Attention\", \"Passwords don't match\", \"error\");\n return false;\n }\n else\n {\n // Create a new element input, this will be our hashed password field. \n $('<input>').attr({type: 'hidden', id: 'oldPass_hash', name: 'oldPass_hash', value: hex_sha512(currentPassword),}).appendTo(form);\n $('<input>').attr({type: 'hidden', id: 'newPass_hash', name: 'newPass_hash', value: hex_sha512(newPassword),}).appendTo(form);\n\n $.ajax({\n type: 'POST',\n url: API_URL_ROOT+'v1/change-password',\n data: form.serialize(),\n dataType:'json',\n headers:{Authorization:'Bearer '+token},\n success: function(response)\n {\n if(response.error == false)\n {\n unblockUI();\n showSimpleMessage(\"Success\", response.message, \"success\");\n form.get(0).reset();\n }\n else\n {\n unblockUI();\n showSimpleMessage(\"Attention\", response.message, \"error\");\n }\n },\n error: function(req, status, error)\n {\n unblockUI();\n showSimpleMessage(\"Attention\", \"ERROR - \"+req.status+\" : \"+req.responseText, \"error\");\n }\n }); \n }\n }\n else\n {\n showSimpleMessage('Canceled', 'Process Abborted', 'error');\n }\n }); \n }", "function comparePwd(password, confPwd)\r\n{\r\n\t if(password != confPwd)\r\n\t {\r\n\t\t alert(\"Re-type the New Password in Confirm Password field\");\r\n\t\t $('#txtConfPwd').focus();\r\n\t\t return false;\r\n\t }\r\n\t else\r\n\t {\r\n\t\t return true; \r\n\t }\r\n}", "function updatePassword(tablePkId, prevPassword){\r\n\tvar oldPassword = document.getElementById(\"oldPwdChgInptId\").value;\r\n\tvar newPassword = document.getElementById(\"newPwdChgInptId\").value;\r\n\tvar confirmPassword = document.getElementById(\"confirmPwdChgInptId\").value;\r\n\tif(validatePasswordEntries(oldPassword, newPassword, confirmPassword, prevPassword) == true) {\r\n\t\tvar newUserProf = Spine.Model.sub();\r\n\t\tnewUserProf.configure(\"/admin/facilitatorAccount/updatePasswordFacilitator\", \"valueDesc\", \"tablePkId\", \"facilitatorEmail\");\r\n\t\tnewUserProf.extend( Spine.Model.Ajax );\r\n\t\t//Populate the model with data to transfer\r\n\t\tvar modelPopulator = new newUserProf({ \r\n\t\t\tvalueDesc: encode(confirmPassword+confirmPassword),\r\n\t\t\ttablePkId: tablePkId,\r\n\t\t\tfacilitatorEmail: sessionStorage.getItem(\"jctEmail\")\r\n\t\t});\r\n\t\tmodelPopulator.save(); //POST\r\n\t\tnewUserProf.bind(\"ajaxError\", function(record, xhr, settings, error) {\r\n\t\t\talertify.alert(\"Unable to connect to the server.\");\r\n\t\t});\r\n\t\tnewUserProf.bind(\"ajaxSuccess\", function(record, xhr, settings, error) {\r\n\t\t\tvar jsonStr = JSON.stringify(xhr);\r\n\t\t\tvar obj = jQuery.parseJSON(jsonStr);\r\n\t\t\tvar statusCode = obj.statusCode;\r\n\t\t\tif(statusCode == 200) {\r\n\t\t\t\tshowUserData(obj.existingUserDataList);\r\n\t\t\t\talertify.alert(\"Password has been updated successfully.\");\r\n\t\t\t\t$('#alertify-ok').click(function() {\t\r\n\t\t\t \tsessionStorage.clear();\r\n\t\t\t \twindow.location = \"../signup-page.jsp\";\r\n\t\t\t });\r\n\t\t\t\t/*populateUserData();\r\n\t\t\t\talertify.alert(\"Password has been updated successfully.\");\r\n\t\t\t\tvar passwordLength = ((obj.userPassword).length)/2;\r\n\t\t\t\tvar stringBuilder = \"\";\r\n\t\t\t\tfor(var i=0; i<passwordLength; i++){\r\n\t\t\t\t\tstringBuilder = stringBuilder + \"*\";\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tdocument.getElementById(\"chgPwdInptId\").innerHTML = stringBuilder+\"&nbsp;&nbsp;<a href='#' onClick='editPassword(\"+obj.primaryKey+\", \"+obj.userPassword+\")' class= 'hyperlink_text' >edit</a>\";\r\n\t\t\t\tvar valueChgDiv = document.getElementById(\"pwdChgMainDiv\");\r\n\t\t\t\tvalueChgDiv.setAttribute(\"style\", \"display:none\");\t\r\n\t\t\t\tvar mainDiv = document.getElementById(\"divGeneralId\");\r\n\t\t\t\tmainDiv.setAttribute(\"style\", \"display:none\");\t*/\r\n\t\t\t} else if(statusCode == 500) {\r\n\t\t\t\t// Error Message\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}", "function changePassword(sessionKey, oldPassword, newPassword, newPasswordRepeat){\r\n\trequest = new Request;\r\n\trequest.addAction(\"requestPasswordChange\");\r\n\trequest.addSessionKey(sessionKey);\t\r\n\trequest.addParam(\"oldPassword\", oldPassword);\r\n\trequest.addParam(\"newPassword\", newPassword);\r\n\trequest.addParam(\"newPasswordRepeat\", newPasswordRepeat);\r\n\t\r\n\tvar xmlHttpReq;\r\n\tif (window.XMLHttpRequest)\r\n\t {// code for IE7+, Firefox, Chrome, Opera, Safari\r\n\t xmlhttp=new XMLHttpRequest();\r\n\t }\r\n\telse\r\n\t {// code for IE6, IE5\r\n\t xmlhttp=new ActiveXObject(\"Microsoft.XMLHTTP\");\r\n\t }\r\n\t\r\n\t//send the parameters to the servlet with POST\r\n\txmlhttp.open(\"POST\",\"../ServletAccount\" ,true);\r\n\txmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\r\n\txmlhttp.send(request.toString());\r\n\t\r\n\txmlhttp.onreadystatechange=function()\r\n\t {\r\n\t if (xmlhttp.readyState==4 && xmlhttp.status==200)\r\n\t {\r\n\t\t\tdocument.getElementById(\"submitAccountButton\").disabled=false;\r\n\r\n\t\t //TODO: parse response\r\n\t\t\t//alert( (xmlhttp.responseXML.getElementsByTagName(\"message\")[0]).childNodes[0].nodeValue);\r\n\t\t\t\r\n\t\t\t\r\n\t }\r\n\t };\t\r\n}", "function forgotPassword(method,type) {\n hideError('email');\n addFunActionLabel=\"Forgot Pasword Submit\";\n if(pageType=='not_login'){\n var email = $.trim($(\"#TenTimes-Modal #userEmailCopy\").val()); \n }else{\n var email = $.trim($(\"#TenTimes-Modal #userEmail\").val());\n }\n if(!validateEmail12345(email)){\n $(\".alert_email\").show();\n return 0;\n }\n var otpType='password';\n if(type=='N' || type=='U'){\n otpType='otp';\n }\n\n if(method == \"connect\")\n var postData = {'email':email, 'name' : receiverData.name , 'type' : otpType }\n else\n var postData = {'email':email, 'name' : email , 'type' : otpType }\n showloading();\n $.post(site_url_attend+'/user/getpassword',postData,function(response){\n hideloading();\n response=$.parseJSON(response);\n var resText=response.resText;\n var resLink=response.resLink;\n if(type=='N' || type=='U'){\n resText=response.resText_typeN;\n resLink=response.resLink_typeN;\n \n }\n \n switch(response.response) {\n case 'true':\n $('#getpassword').parent().replaceWith(function() { return \"<a style='text-decoration:none'>\" + \"<p class='text-center' style='text-decoration:none;color:#909090;'>\" + resText + \"</p>\"+$('#getpassword').get(0).outerHTML+\"</a>\"; });\n\n $('#getpassword').text(resLink);\n if(method!='signup' && method!='connect' && method!='contact_organizer_venue'){\n $('#TenTimes-Modal .partial-log').hide();\n $('#getpassword').removeAttr(\"onclick\").click(function() {\n partialLog(method,type)\n }).text(resLink).css('color','#335aa1');\n }\n break;\n case 'false':\n $(\".alert_email\").html(\"Sorry, 10times doesn't recognize that email.\");\n $(\".alert_email\").show();\n break;\n }\n }); \n}", "function resetLoginAndPassword() {\n\tsettings.set('User', {\n\t\t'SerialNo': 'null',\n\t\t'CtlUrl': 'null',\n\t\t'Mail': 'null',\n\t\t'Nick': 'null'\n\t});\n}", "changePassword(payload) {\n return axiosInstance.post(changePasswordUrl, payload);\n }", "function vpb_request_password_link()\n{\n\tvar ue_data = $(\"#ue_data\").val();\n\t\n\tif(ue_data == \"\")\n\t{\n\t\t$(\"#ue_data\").focus();\n\t\t$(\"#this_page_errors\").html('<div class=\"vwarning\">'+$(\"#empty_username_field\").val()+'</div>');\n\t\t$('html, body').animate({\n\t\t\tscrollTop: $('#ue_data').offset().top-parseInt(200)+'px'\n\t\t}, 1600);\n\t\treturn false;\n\t} else {\n\t\tvar dataString = {'ue_data': ue_data, 'page':'reset-password-validation'};\n\t\t$.ajax({\n\t\t\ttype: \"POST\",\n\t\t\turl: vpb_site_url+'forget-password',\n\t\t\tdata: dataString,\n\t\t\tcache: false,\n\t\t\tbeforeSend: function() \n\t\t\t{\n\t\t\t\t$(\"#this_page_errors\").html('');\n\t\t\t\t$(\"#disable_or_enable_this_box\").removeClass('enable_this_box');\n\t\t\t\t$(\"#disable_or_enable_this_box\").addClass('disable_this_box');\n\t\t\t\t\n\t\t\t\t$(\"#forgot_password_buttoned\").hide();\n\t\t\t\t$(\"#log_in_status\").html('<center><div align=\"center\"><img style=\"margin-top:-40px;\" src=\"'+vpb_site_url+'img/loadings.gif\" align=\"absmiddle\" alt=\"Loading\" /></div></center>');\n\t\t\t},\n\t\t\tsuccess: function(response)\n\t\t\t{\n\t\t\t\t$(\"#disable_or_enable_this_box\").removeClass('disable_this_box');\n\t\t\t\t$(\"#disable_or_enable_this_box\").addClass('enable_this_box');\n\t\t\n\t\t\t\t$(\"#log_in_status\").html('');\n\t\t\t\t$(\"#forgot_password_buttoned\").show();\n\t\t\t\t\t\n\t\t\t\tvar response_brought = response.indexOf(\"processCompletedStatus\");\n\t\t\t\t$vlog=JSON.parse(response);\n\t\t\t\tif(response_brought != -1)\n\t\t\t\t{\n\t\t\t\t\tif($vlog.processCompletedStatus==true){\n $(\"#ue_data\").val('');\n $(\"#this_page_errors\").html($vlog.response);\n return false;\n\t\t\t\t\t}else{\n setTimeout(function() {\n \twindow.alert(\"To change the password you first need to verify the account by entering the verification code which was sent to your gmail account earlier while sign up in the 'Enter the verification code ... ' field to proceed.\");\n window.location.replace(vpb_site_url+'verification');\n },500);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$(\"#this_page_errors\").html($vlog.response);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}", "function validatechangePasswordForm()\n{\n\tvar currentPassword = validatePassword(\"changePasswordForm\",\"currentPassword\",\"currentPasswordSpan\");\n\tvar equal = passwordEqual(\"changePasswordForm\",\"newPassword\",\"confirmPassword\",\"newPasswordSpan\",\"confirmPasswordSpan\");\n\tif (currentPassword & equal)\n\t {\n\t \treturn true;\n\t }\n\t return false;\n}", "updatePasswordUser() {\n let body = {\n \"id\": this.values[\"id\"],\n \"password\": this.values[\"password\"]\n };\n this.CommonService.updateUserPassword(body).subscribe((response) => {\n if (response.statusCode == 200) {\n }\n }, (error) => {\n this.CommonService.showSnackbarUnhide('Something Went Wrong, Please Try After SomeTime', ['red-growl']);\n });\n }", "function resetChangePass(massage = \"\") {\n $(\"#successMassage\").html(massage);\n $(\"#verifyMassage\").html(\"\");\n $(\"#confirmMassage\").html(\"\");\n $('#currentPassword').val(\"\");\n $('#newPassword').val(\"\");\n $('#confirmPassword').val(\"\");\n}", "function changePw () {\n var userid = $('#pwUserid').val();\n var currpw = $('#pwPassword').val();\n var newpw = $('#pwNew').val();\n var pw2 = $('#pwNew2').val();\n\n if ( newpw != pw2 ) {\n alert(\"The proposed password is not equal to the retyped password, returning.\");\n return;\n }\n\n alert('Calling changeMyPW.php');\n}", "updatePassword(business_type, newPassword, code) {\n logger.info('updatePassword() intiated');\n return new Promise(function (resolve, reject) {\n let sql = sqlObj.passwordSettings.updatepassword;\n let newPwd = hashPassword.generate(newPassword);\n let sqlQuery = format(sql, business_type, newPwd, code, utils.getGMT());\n // let sql = `update ${business_type} set password = '${hashPassword.generate(newPassword)}' where user_id = '${code}'`\n // DbInstance.executeQuery(sql).then(res => {\n db.doRead(sqlQuery).then(res => {\n logger.info('updatePassword() executed');\n resolve(res);\n }).catch(err => {\n logger.error('error while execute the query');\n reject(new Error(err));\n })\n });\n }", "function z_usersPassword(id) {\r\n var usrId = id;\r\n var pass = $(\"#newPassword\").val();\r\n var cnfmPass = $(\"#confirmPassword\").val();\r\n if ($(\"#resetPassForm\").valid()) {\r\n var data = {\r\n userId: usrId,\r\n password: pass\r\n };\r\n $.ajax({\r\n url: \"/api/updateUserCredential\",\r\n type: \"POST\",\r\n data: data,\r\n dataType: 'text',\r\n success: function (result) {\r\n console.log(result);\r\n var form = document.getElementById(\"resetPassForm\");\r\n if (result.split(\":\")[1] == \"Done\") {\r\n alertPopup('success', \"Password Updated Successfully\");\r\n } else {\r\n alertPopup('alert', \"User Not found\");\r\n }\r\n $('#z-resetPass-popup').modal(\"hide\");\r\n },\r\n error: function (result) {\r\n console.log(result);\r\n }\r\n });\r\n }\r\n}", "onupdatePassword(event) {\n this.password = event.target.value;\n this.passwordValidationState = '';\n }", "function setPassword() {\n postPassword(\n success = function () {\n console.log('Password set');\n setPermissions();\n },\n error = null,\n email,\n password);\n }", "function ps_setupPassword(ps_input1, ps_input2, ps_minLength, ps_maxLength, ps_allowSpecial, ps_allowSpace) {\r\n $(ps_input1).password({\r\n\r\n checklist: $('#checklist'), \r\n doubleType: $(ps_input2),\r\n minLength: ps_minLength,\r\n maxLength: ps_maxLength,\r\n allowSpecial: ps_allowSpecial,\r\n allowSpace: ps_allowSpace\r\n });\n\n $(ps_input1).blur(function () {\r\n if ($(this).val() != null && $(this).val().length > 0)\n $('#checklist').show();\n else\n $('#checklist').hide();\r\n }).keypress(function () {\r\n if ($(this).val() != null && $(this).val().length > 0)\n $('#checklist').show();\n else\n $('#checklist').hide();\r\n });\n\n\n //toggle password from hidden to not by changing input type\n $(\".showPW\").each(function (index, input) {\r\n var $input = $(input);\r\n $(this).next(\".btnShowPW\").click(function () {\r\n if ($input.val().length > 0) {\r\n var change = \"\";\r\n if ($(this).html() === \"Show\") {\r\n $(this).html(\"Hide\")\r\n change = \"text\";\r\n } else {\r\n $(this).html(\"Show\");\r\n change = \"password\";\r\n }\r\n var rep = $(\"<input type='\" + change + \"' />\")\r\n .attr(\"id\", $input.attr(\"id\"))\r\n .attr(\"name\", $input.attr(\"name\"))\r\n .attr('class', $input.attr('class'))\r\n .attr('placeholder', $input.attr('placeholder'))\r\n .val($input.val())\r\n .insertBefore($input);\r\n $input.remove();\r\n $input = rep;\r\n\r\n $('#checklist').empty();\r\n if ($input.attr('id') == \"txtPassword\") {\r\n $input.password({\r\n checklist: $('#checklist'),\r\n doubleType: $(ps_input2),\r\n minLength: ps_minLength,\r\n maxLength: ps_maxLength,\r\n allowSpecial: ps_allowSpecial,\r\n allowSpace: ps_allowSpace\r\n });\r\n } else {\r\n $(ps_input1).password({\r\n checklist: $('#checklist'), \r\n doubleType: $(ps_input2),\r\n minLength: ps_minLength,\r\n maxLength: ps_maxLength,\r\n allowSpecial: ps_allowSpecial,\r\n allowSpace: ps_allowSpace\r\n });\r\n }\r\n /**/\r\n }\r\n }).insertAfter($input);\r\n\r\n });\n\n //end of password section\n }", "function changePwd(inputData){\n\t$.ajax({\n\t\ttype : \"POST\",\n\t\turl : baseUrl+'userchangepassword',\n\t\tasync : false,\n\t\tcontentType : \"application/json;\",\n\t\tdata : inputData,\n\t\tsuccess :function(data){\n\t\t\tvar err = (data.errorCode);\n\n\t\t\tif (err < 0) {\n\t\t\t\t$('div.message').fadeIn();\n\t\t\t\t$('div.message').text(data.errorMessage);\n\t\t\t\t$('div.message').removeClass(\"alert-success\");\n\t\t\t\t$('div.message').addClass(\"alert-danger\");\n\t\t\t\tsetTimeout(function()\n\t\t\t\t{\n\t\t\t\t\t$('div.message').fadeOut(1000);\n\t\t\t\t}, 600);\n\t\t\t\t//alert('error');\n\t\t\t\tconsole.log(data);\n\t\t\t\tconsole.log(data.errorMessage);\n\t\t\t\t\t\t}\n\t\t\telse{\n\t\t\t\t $('div.message').fadeIn();\n\t\t\t\t $('div.message').text(data.notification);\n\t\t\t\t $('div.message').removeClass(\"alert-danger\");\n\t\t\t\t\t $('div.message').addClass(\"alert-success\");\n\t\t\t\t console.log(data.errorMessage);\n\t\t\t\t setTimeout(function()\n\t\t\t\t{\n\t\t\t\t\t$('div.message').fadeOut();\n\t\t\t\t\tlocation.reload();\n\n\t\t\t\t}, 600);\n\t\t\t\t}\n\t\t\t\tif(err==-3)\n\t\t\t\t{\n\t\t\t\t\t setTimeout(function()\n\t\t\t\t\t{\n\t\t\t\t\t\twindow.location.href = \"logout.html\";\n\t\t\t\t\t}, 500);\n\t\t\t\t}\n\t\t\t},\n\t\t\terror :function(data){\n\t\t\t\t$('div.message').fadeIn();\n\t\t\t\t$('div.message').text('Something wrong with the connection!!!Pleace check the connection and try again');\n\t\t\t\t$('div.message').removeClass(\"alert-success\");\n\t\t\t\t$('div.message').addClass(\"alert-danger\");\n\t\t\t\tsetTimeout(function()\n\t\t\t\t\t{\n\t\t\t\t\t\t$('div.message').fadeOut(1000);\n\t\t\t\t\t}, 800);\n\n\t\t\t\t// alert(\"Something went wrong\"+data);\n\t\t\tconsole.log(data);\n\t\t},\n\t\t\t});\n}", "function changePass(oldPass, newPass, callback) {\n\tsendRequest({ request: 'change password', oldPassword: oldPass, newPassword: newPass }, callback);\n}", "async changePassword(params: Object, input?: Vue) {\n\t\t\ttry {\n\t\t\t\tawait this.base('register/v1/change-password').put(params.body);\n\n\t\t\t} catch (err) {\n\t\t\t\tthis.setErrorMsgForInput(err, input);\n\t\t\t}\n\t\t}", "function writePassword() {\n var password = generatePassword();\n var passwordText = document.querySelector(\"#password\");\n\n // does not change textbox if falsey/undefined value such as when cancel is selected in first prompt\n if (password) {\n passwordText.value = password;\n }\n\n}", "function updatePassword(Connection, Data, successCall, failureCall){\n\n var sqlreq = new sqlReq(\"sp_TempAccount_UpdatePassword\", function(err, rowCount){\n if(err) {\n console.log(\"Update Error: \" + err);\n } \n });\n sqlreq.addParameter('account_ID' , sqlType.Int, Data.Account_id);\n sqlreq.addParameter('password' , sqlType.VarChar, Data.NewPassword);\n sqlreq.addParameter('salt' , sqlType.VarChar, Data.Salt);\n\n try{\n Connection.callProcedure(sqlreq);\n sqlreq.on(\"done\", function(params, returnVal, metadata) {\n console.log(params + \" - \" + returnVal + \" - \" + metadata)\n successCall();\n });\n }catch(err){\n console.log(err);\n failureCall();\n }\n\n}", "passwordReset() {\n Actions.passwordReset();\n }", "function changeOwnPasswordModal() {\n $('#modChangePassword').modal('show');\n}", "function initReset() {\n\tnew JsNameFilter(\"userId\", \"nameInput\", window['g_basePath']);\n\t\n\tif ($(\"successM\").value != '') {\n\t\tMsgBox.message('重置密码成功');\n\t}\n\t\n\t$(\"successM\").value = '';\n\taddCustomCheck('reNewPW', getMessage('js.com.warning.0012'), 'mustsame', function(value) {\n\t\tif (value != $F('newPW')) return false;\n\t\treturn true;\n\t});\n}", "function validatePasswordInput() {\n let typedPassword = document.querySelector(\n \".confirmModifications_form-password input\"\n ).value;\n if (userObject.password == typedPassword) {\n // If there is a match the user is updated in the website\n\n populateUserInfo(userObject);\n\n // The user is updated in the database\n\n put(userObject);\n document.querySelector(\".modal-confirm\").style.display = \"block\";\n closeConfirmModifications();\n } else {\n document.querySelector(\n \".confirmModifications_paragraph-alertWrongPass\"\n ).style.display = \"block\";\n }\n}", "function checkPassword() {\n\n\n\n}", "function onSaveNewPassWordClick() {\n let vNewPassword = {\n password: $('#inp-new-password').val().trim(),\n };\n if (vNewPassword.password == '') {\n $('#modal-error').modal('show');\n $('#error').text(`Cần nhập mật khẩu để thay đổi`);\n } else {\n $.ajax({\n url: `${G_BASE_URL}/admin/change-password/customers/${gCustomerId}`,\n method: `put`,\n data: JSON.stringify(vNewPassword),\n headers: {\n Authorization: `Token ${gUserToken}`,\n },\n contentType: `application/json; charset=utf-8`,\n success: (res) => {\n $('#modal-success').modal('show');\n $('#success').text(`Đã thay đổi password cho user thành công`);\n getCustomerData(3);\n $('#inp-new-password').val('');\n $('#modal-update-password').modal('hide');\n },\n error: (e) => {\n $('#modal-error').modal('show');\n $('#error').text(`Bạn không có quyền thực hiện thao tác này`);\n },\n });\n }\n }", "changePassword(account_type, applicant_id) {\n logger.info('changePassword() intiated');\n return new Promise(function (resolve, reject) {\n let sql = sqlObj.passwordSettings.getapplicantId;\n let sqlQuery = format(sql, account_type, applicant_id);\n // var sql = `SELECT password FROM ${business_type} WHERE applicant_id = ${applicant_id}`\n //DbInstance.executeQuery(sql).then(res => {\n db.doRead(sqlQuery).then(res => {\n logger.info('changePassword() executed');\n resolve(res);\n }).catch(err => {\n logger.error('error while execute the query');\n reject(new Error(err));\n })\n });\n }", "function fnc_cancelar_cambiar_password() {\n\topen_form('/Home/frm_main', gc_group_window);\n}", "processPassRep() {\n if (this.password.value !== this.passwordRepeat.value) {\n this.passwordRepeat.err = true;\n this.passwordRepeatErr.seen = true;\n this.valid = false;\n this.passwordRepeatErr.text = \"رمز عبور و تکرار آن یکسان نیستند\";\n } else {\n this.passwordRepeat.err = false;\n this.passwordRepeatErr.seen = false;\n }\n }", "function getUserForManagePassword(username) {\r\n\tblockUI();\r\n\t$.ajax({\r\n\t\ttype : \"GET\",\r\n\t\turl : \"getUserForResetPassword.do\",\r\n\t\tdata : \"username=\" + username,\r\n\t\tdataType : \"json\",\r\n\t\tcache : false,\r\n\t\tsuccess : function(data) {\r\n\t\t\tunblockUI();\r\n\t\t\tif (data) {\r\n\t\t\t\t$(\"#userSearchRpHidden\").val(username);\r\n\t\t\t\t$(\"#userIdRP\").val(data.userId);\r\n\t\t\t\t$('#userSearchRP').blur(); \r\n\r\n\t\t\t\t$(\"#firstNameRP\").text(data.firstName);\r\n\t\t\t\t$(\"#middleNameRP\").text(data.middleName);\r\n\t\t\t\t$(\"#lastNameRP\").text(data.lastName);\r\n\t\t\t\t$(\"#emailRP\").text(data.emailId);\r\n\t\t\t\t$(\"#contactNumberRP\").text(data.phoneNumber);\r\n\t\t\t\t$(\"#streetRP\").text(data.street);\r\n\t\t\t\t$(\"#cityRP\").text(data.city);\r\n\t\t\t\t$(\"#stateRP\").text(data.state);\r\n\t\t\t\t$(\"#zipRP\").text(data.zip);\r\n\t\t\t\t$(\"#countryRP\").text(data.country);\r\n\r\n\t\t\t\tif (data.pwdHintList[0]) {\r\n\t\t\t\t\t$(\"#question1RP\").text(data.pwdHintList[0].questionValue);\r\n\t\t\t\t\t$(\"#answer1RP\").text(data.pwdHintList[0].answerValue);\r\n\t\t\t\t}\r\n\t\t\t\tif (data.pwdHintList[1]) {\r\n\t\t\t\t\t$(\"#question2RP\").text(data.pwdHintList[1].questionValue);\r\n\t\t\t\t\t$(\"#answer2RP\").text(data.pwdHintList[1].answerValue);\r\n\t\t\t\t}\r\n\t\t\t\tif (data.pwdHintList[2]) {\r\n\t\t\t\t\t$(\"#question3RP\").text(data.pwdHintList[2].questionValue);\r\n\t\t\t\t\t$(\"#answer3RP\").text(data.pwdHintList[2].answerValue);\r\n\t\t\t\t}\r\n\t\t\t\tif (data.userId == 0) {\r\n\t\t\t\t\t$.modal.alert(strings['script.noUserFound']);\r\n\t\t\t\t\t$(\"#userDetailsRP\").attr(\"class\", \"wizard-fieldset fields-list hidden\");\r\n\t\t\t\t\t$(\"#securityQuestionsRP\").attr(\"class\", \"wizard-fieldset fields-list hidden\");\r\n\t\t\t\t\t$(\"#userSearchRP\").attr('readonly', false);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$(\"#userSearchRP\").attr('readonly', true);\r\n\t\t\t\t\t$(\"#userDetailsRP\").attr(\"class\", \"wizard-fieldset fields-list\");\r\n\t\t\t\t\t$(\"#securityQuestionsRP\").attr(\"class\", \"wizard-fieldset fields-list\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$.modal.alert(strings['script.noUserFound']);\r\n\t\t\t\t$(\"#userDetailsRP\").attr(\"class\", \"wizard-fieldset fields-list hidden\");\r\n\t\t\t\t$(\"#securityQuestionsRP\").attr(\"class\", \"wizard-fieldset fields-list hidden\");\r\n\t\t\t\t$(\"#userSearchRP\").attr('readonly', false);\r\n\t\t\t}\r\n\t\t},\r\n\t\terror : function(data) {\r\n\t\t\tunblockUI();\r\n\t\t\t$.modal.alert(strings['script.user.search']);\r\n\t\t},\r\n\t\tcomplete : function(data) {\r\n\t\t}\r\n\t});\r\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 password_changed(pwd_elem) {\n if($(pwd_elem).data(\"pwd_modified\") == false &&\n $(pwd_elem).data(\"pwd_orig\") == pwd_elem.value) {\n\t//This is the most straightforward case. This means that password was not modified at all.\n\t//User is using the same password that was entered by the browser.\n\t$(pwd_elem).data(\"pwd_stored\", true);\n\treturn;\n }\n if($(pwd_elem).data(\"pwd_modified\") == false &&\n $(pwd_elem).data(\"pwd_orig\") != pwd_elem.value &&\n $(pwd_elem).data(\"pwd_current\") == pwd_elem.value) {\n\t//This means that the user has actively modified the password sometime in the past.\n\t//So password stored is false.\n\t$(pwd_elem).data(\"pwd_stored\", false);\n\treturn;\n }\n if($(pwd_elem).data(\"pwd_modified\") == false &&\n $(pwd_elem).data(\"pwd_orig\") != pwd_elem.value &&\n $(pwd_elem).data(\"pwd_current\") != pwd_elem.value) {\n\t//In this case, user did edit the password, but then he changed username to some username\n\t//that also has the password stored but is not equal to default uesrname that browser enters.\n\t//Hence, the password is still stored in the browser.\n\t$(pwd_elem).data(\"pwd_stored\", true);\n\t$(pwd_elem).data(\"pwd_orig\", pwd_elem.value);\n\treturn;\n }\n if($(pwd_elem).data(\"pwd_modified\") == true) {\n\t//In this case, user did edit the password, but then he changed username to some username\n\t//that also has the password stored but is not equal to default uesrname that browser enters.\n\t//Hence, the password is still stored in the browser.\n\t$(pwd_elem).data(\"pwd_modified\", false);\n\t$(pwd_elem).data(\"pwd_stored\", false);\n\treturn;\n }\n}", "function passwordOptions(){\n // parseInt-look up and wrap prompt\n var pswdLength = prompt(\"How many characters would you like your password to be?\");\n if (isNaN(pswdLength)=== true) {\n alert(\"Length must be 8-128 characters. Please verify how long you would like your password to be.\")\n return\n }\n if (pswdLength < 8) {\n alert(\"Length must be greater than 8.\")\n return\n } \n\n if (pswdLength > 128) {\n alert(\"Length must be less than 8. \")\n return;\n } \n \n var hasRandomUpper = confirm(\"Click 'OK' if your password will include uppercase letters?\");\n var hasRandomLower = confirm(\"Click 'OK' if your password will include lowercase letters?\");\n var hasRandomNumber = confirm(\"Click 'OK' if your password will include numbers?\");\n var hasRandomSymbol = confirm(\"Click 'OK' if your password will include symbols?\");\n\n//if no parameters are selected, alert and run through prompts again.\n if (!hasRandomUpper && !hasRandomLower && !hasRandomNumber && !hasRandomSymbol) {\n alert(\"You must select at least one character type!\")\n hasRandomUpper = confirm(\"Click 'OK' if your password will include uppercase letters?\");\n hasRandomLower = confirm(\"Click 'OK' if your password will include lowercase letters?\");\n hasRandomNumber = confirm(\"Click 'OK' if your password will include numbers?\");\n hasRandomSymbol = confirm(\"Click 'OK' if your password will include symbols?\");\n }\n let passwordParameters = {\n pswdLength: pswdLength,\n hasRandomUpper: hasRandomUpper,\n hasRandomLower: hasRandomLower,\n hasRandomNumber: hasRandomNumber,\n hasRandomSymbol: hasRandomSymbol\n }\n return passwordParameters;\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 updatePassword(e) {\n e.preventDefault();\n var datos = new FormData(this);\n\n // Pasamos el validador\n if (!$(this).valid()) {\n return;\n }\n \n // Creamos el dialog\n var dialog = $(\"<div>¿Esta seguro de que desea Modificar este Usuario?</div>\");\n \n //////////////\n // DIALOG\n //////////////\n $(dialog).dialog({\n autoOpen: true,\n resizable: false, \n height: 150, \n modal: true, \n buttons: {\n \"Modificar\": function () {\n $.ajax({\n url: \"../../Controller/Gestion/updatePassword.php\",\n data: datos, \n contentType: false, \n processData: false, \n type: 'POST'\n }).done(function (data) {\n var resultado = data;\n\n getListadoUsuarios(resultado);\n\n });\n $(this).dialog(\"close\");\n },\n \n \"Cancelar\": function () {\n $(this).dialog(\"close\");\n }\n }, \n close: function(){ \n $(dialog).remove();\n }\n });\n}", "updatePassword(body) {\n return HTTP.post('users/updatePassword', body)\n }", "function resetPass() {\n\n var oldPass = document.getElementById(\"oldpass\").value;\n var newPass = document.getElementById(\"newpass\").value;\n\n var xml = createChangePasswordSoapMessage(username, password,oldPassword);\n\n var soapMessage = createLoginSoapMessage(username, password);\n $\n .ajax(\n {\n url: serverUrl,\n dataType: \"xml\",\n //dataType: 'json',\n type: \"POST\",\n async: false,\n contentType: \"text/xml;charset=utf-8\",\n headers: {\n \"SOAPAction\": \"http://tempuri.org/IService1/authenticate\"\n },\n crossDomain: true,\n data: soapMessage,\n timeout: 30000 //30 seconds timeout\n }).done(function (data) {\n if (data != null) {\n var json = xmlToJson(data);\n var jsonObject = JSON.parse(json);\n var approveCode = jsonObject[\"APPRV\"];\n if (approveCode == 0) {\n // Go To Main Page\n }\n else if (approveCode == 1) {\n\n //Go To Change Password\n }\n else {\n navigator.notification.alert(jsonObject[\"REASON\"]);\n }\n\n }\n\n }).fail(function (jqXHR, textStatus, thrownError) {\n console.log('login failed: ' + thrownError);\n var returnObject = {};\n returnObject.errorCode = 2;\n localStorage.setItem(\"errorCode\", returnObject.errorCode);\n });\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 on_website_password_update(data, sender, sendResponse) {\n websitePasswords = data;\n }", "function changePwd(){\n\tevent.preventDefault();\n\tvar formContent=new Object();\n\tformContent.old=$(\"#pwdOld\").val()\n\tformContent.new1=$(\"#pwdNew1\").val()\n\tformContent.new2=$(\"#pwdNew2\").val()\n\tif(!(formContent.old && formContent.new1 && formContent.new2)){\n\t\terrorForm(\"Compilare tutti i campi del form .\",\"#errorPwd\");\n\t\treturn;\n\t}\n\tif(formContent.new1 == formContent.new2){\n\t\t\tformContent.old=krypton(formContent.old);\n\t\t\tformContent.new1=krypton(formContent.new1);\n\t\t\tformContent.new2=krypton(formContent.new2);\n\t\t\tvar userstring = atob(cookiesMgr.get('user'))\n\t\t\tcurrent.user = userstring!==\"\"?JSON.parse(userstring):null ;\n\t\t\tif (current.user != null) {\n\t\t\t\tformContent.nome=current.user.name;\n\t\t\t\tvar d=JSON.stringify(formContent);\n\t\t\t\t$.ajax({\n\t\t\t\t\turl:'php/changePwd.php',\n\t\t\t\t\ttype:'post',\n\t\t\t\t\tdata:d,\n\t\t\t\t\tsuccess:function(data){\n\t\t\t\t\t\tvar response=new Object();\n\t\t\t\t\t\tresponse=JSON.parse(data);\n\t\t\t\t\t\tif(response.result == \"ok\"){\n\t\t\t\t\t\t\tnotify(\"Cambio password effettuato .\");\n\t\t\t\t\t\t\tresetForm(\"#pwdForm\",\"#errorPwd\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(response.result == \"false\" ){\n\t\t\t\t\t\t\terrorForm(\"Password errata\",\"#errorPwd\");\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\terror:function(e){\n\t\t\t\t\t\terrorForm(\"Server non disponibile\",\"#errorPwd\");\n\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t\t\t}\n\t}\n\telse{\n\t\terrorForm(\"Conferma password diversa\",\"#errorPwd\");\n\t\t$(\"#pwdNew2\").parent().removeClass();\n\t\t$(\"#pwdNew2\").next().remove();\n\t\t$(\"#pwdNew2\").parent().addClass(\"form-group has-warning has-feedback\");\n\t\t$(\"#pwdNew2\").after(\"<span class=\\\"glyphicon glyphicon-warning-sign form-control-feedback\\\"aria-hidden=\\\"true\\\"></span>\")\n\t}\n\n\n}", "async function password(authToken, oldPassword, newPassword) {\n // console.log(\"Password function is getting called!\");\n let responseData = {};\n\n try {\n const address = `${apiConfig.URL_SCHEME}://${apiConfig.IP}:${apiConfig.PORT}${apiConfig.EXT}/changeUser/password`;\n const payload = {\n oldPassword,\n newPassword,\n };\n const settings = {\n headers: {\n Authorization: authToken,\n },\n };\n\n const response = await axios.patch(address, payload, settings);\n\n responseData = response.data;\n } catch (error) {\n responseData = {\n success: false,\n message: 'Error contacting API server.',\n };\n }\n\n return responseData;\n}", "async resetPassword({ view, params, antl }) {\n return view.render('user.password', {\n token: params.token,\n key: params.key,\n action: 'UserController.storeResetPassword',\n header_msg: antl.formatMessage('main.change_password'),\n button_msg: antl.formatMessage('main.change_password'),\n })\n }", "function checkConfirmPassword()\r\n\t{\r\n\t\tvar newPassword=$(\"#Npass\").val();\r\n\t\tvar confirmPassword=$(\"#Cpass\").val();\r\n\t\t \r\n\t\t if(!isEmpty(confirmPassword))\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t$(\"#Cpass\").css(\"border-color\",\"red\");\r\n\t\t\t\t$(\"#CpassP\").text(\"confirm password is Required\").css(\"color\",\"red\").show();\r\n\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\tif(!passwordRegEx.test(confirmPassword))\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t$(\"#Cpass\").css(\"border-color\",\"red\");\r\n\t\t\t\t$(\"#CpassP\").text(\"Invalid confirm password Entered\").css(\"color\",\"red\").show();\r\n\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\tif(newPassword!=confirmPassword)\r\n\t\t\t{\r\n\t\t\t\r\n\t\t\t\t$(\"#Cpass,#Npass\").css(\"border-color\",\"red\");\r\n\t\t\t\t$(\"#CpassP,#NpassP\").text(\"New and confirm Password must be same\").css(\"color\",\"red\").show();\r\n\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t \r\n\t\telse\r\n\t\t\t{\r\n\t\t\t\t$(\"#Cpass\").css(\"border-color\",\"\");\r\n\t\t\t\t$(\"#CpassP\").hide();\r\n\r\n\t\t\t\treturn true;\r\n\t\t\t}\t\r\n\t}", "@action.bound\n onPasswordChange(event) {\n this.password = event.target.value;\n }" ]
[ "0.711304", "0.705767", "0.67993295", "0.6733707", "0.6629076", "0.6621782", "0.65903485", "0.6565416", "0.65533084", "0.65287584", "0.640671", "0.6403341", "0.6400127", "0.639077", "0.6365038", "0.63614184", "0.6324651", "0.6313576", "0.62969023", "0.6281232", "0.62807643", "0.62793094", "0.6278941", "0.6269248", "0.62438345", "0.6228755", "0.62269837", "0.6218491", "0.6218491", "0.62104183", "0.62093335", "0.6192174", "0.6151004", "0.61388457", "0.6138796", "0.6128846", "0.6102106", "0.60981226", "0.6097417", "0.60911393", "0.6091024", "0.6083107", "0.60733473", "0.6065636", "0.6053142", "0.6033624", "0.59942955", "0.59713054", "0.5969751", "0.59385514", "0.59360987", "0.59310603", "0.59269", "0.59164476", "0.59085304", "0.5907414", "0.5902589", "0.58991027", "0.5885242", "0.58846754", "0.5880477", "0.5879926", "0.5875501", "0.58692384", "0.5868469", "0.58616036", "0.5860361", "0.58600336", "0.5849225", "0.58480185", "0.5844757", "0.5844063", "0.5843774", "0.58421373", "0.58318007", "0.58274126", "0.5823282", "0.58210737", "0.58110213", "0.5799968", "0.5795622", "0.57910097", "0.57842803", "0.5782903", "0.5781322", "0.5779221", "0.577379", "0.5773751", "0.576893", "0.57674235", "0.5764319", "0.575939", "0.5752275", "0.57519996", "0.57499033", "0.57470435", "0.5746599", "0.5734139", "0.5732804", "0.5718825" ]
0.6696044
4
Div Access and App Layout Calls SRC: _supportRequestCommon =====================================================================
function showSupportRequest() { retrieveSupportRequestList(); standardShowContentPane('supportRequest', 'Support Request'); if (isFormEmpty('supportRequestForm')) { toggleSaveMode('supportRequestForm', false); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onRequest(context) {\n \tif (context.request.method === 'GET') \n \t{ \n\t\t\tform = DrawPage(context);\n\t\t\tform.Title = 'Taskinator Workspace';\n\t\t\t\n\t\t\t//if(runtime.getCurrentUser().id==PutNumberHere)\n\t\t\t// Folder as container is SuiteScripts > SST_NearNet_Building_List\n\t\t\tform.clientScriptFileId = 6512313; \n\t\t\t//else\n\t\t\t//\tform.clientScriptFileId = AnytherIDHere;\t\t\t\n \t\tcontext.response.writePage(form);\t\n }\n }", "function RequestLoadGeneralData() {\n\n}", "function extCall(){\n\t// external_uri\n\t//var nullElement = new Element();\n\t//$('ext').load(external_uri);\n\t//var myHTMLRequest = new Request.HTML().get(external_uri);\n}", "function init_support_requests(){\n\thideAllRequestPanel();\n\t$(\"#options-links li\").click(function() { \n\t\tvar target = $(this).attr( \"data-target\" );\n\t\t$(\"#options-links li\").removeClass('active');\n\t\t$(this).addClass('active');\n\t\thideAllRequestPanel();\n\t\t// Get Requests list from server\n\t\tvar request_type = target.split(\":\");\n\t\t//getRequestList(request_type[0],request_type[1]);\t\t\n\t});\t\n\t\n\t$(\"#new-request\").click(function() { \n\t\thideAllRequestPanel();\n\t\tinit_support_request_form();\n\t\tshowRequestPanel(\"new-request\");\n\t});\n\t\n\t$(\"#request-discard\").click(function() { \n\t\thideAllRequestPanel();\n\t\tshowRequestPanel(\"requests-list\");\n\t});\n//\tgetRequestList('all');\t\n\t//showReuestPanel(\"requests-list\");\n\t$(\"#requests-list\").click(function() { \n\t\thideAllRequestPanel();\n\t\tinit_support_request_form1();\n\t\tshowRequestPanel(\"requests-list\");\n\t});\n}", "function callPageView() {\n initVars();\n var isPathindicatorEng = \"\";\n var currentUrl = unescape(window.location.href);\n\n // Exception part\n if (getOmniInputTagValue(\"pid\") == \"no\") {\n initVars();\n return;\n }\n\n /* exception code will be used in the future...\n if ((\"fr\".indexOf(getOmniSiteCd())!=-1 && currentUrl.indexOf(\"http://\"+window.location.host+\"/fr/business/smart-printers/\") !=-1)) {\n initVars();\n return;\n }\n */\n if (getOmniInputTagValue(\"microsite\") == \"microsite\") {\n initVars();\n s.linkTrackVars = \"none\";\n s.linkTrackEvents = \"none\";\n s.pageName = getOmniSiteCd() + \":campaign\";\n var s_code = s.t(); if (s_code) document.write(s_code);\n return;\n }\n\n if (currentUrl.indexOf('/sns/login') != -1) {\n return;\n }\n\n if (currentUrl.indexOf('/_ui/desktop/static/') != -1) {\n return;\n }\n\n if (currentUrl.indexOf('support-ca.samsung.com/cyber/mysamsung/') != -1) {\n console.log(\"ca mySamsung\");\n return;\n }\n\n if (currentUrl.indexOf('/ng/') != -1) {//Store Page\n isPathindicatorEng = \"STORE\";\n } else if (currentUrl.indexOf('shop.samsung.com/br') != -1) {\n isPathindicatorEng = \"BRSTORE\";\n } else if (getOmniInputTag(\"pathindicatorENG\") != \"none\") {//Check the pathindicatorENG tag\n if (getOmniInputTag(\"pathindicatorENG\").getElementsByTagName(\"a\").item(0).innerHTML) {\n isPathindicatorEng = \"Y\"\n } else {\n isPathindicatorEng = \"N\";\n }\n } else {\n isPathindicatorEng = \"N\";\n }\n\n switch (isPathindicatorEng) {\n case \"STORE\": sendPageCodeStore(); break;\n case \"BRSTORE\": sendPageCodeStoreBr(); break;\n case \"Y\": sendPageCode(); break;\n case \"N\": sendPageCodeUrl(); break;\n }\n}", "function AdditionalInfo(divId)\n{\n\tvar divs = document.getElementsByTagName(\"div\");\n\t\tfor ( var i = 0; i < divs.length; i++ )\t{\n\t\t\tvar div = divs[i];\n\t\t\tvar id = div.id;\n\t\t\tvar className = div.className;\n\n\t\t\tif ( className == \"optionalElement\" || className == \"requiredElement\" ){\n\t\t\t\tif ( id == divId ){\n\t\t\t\t\t// show requested page\n\t\t\t\t\tif(\tdiv.style.display == \"block\"){\n\t\t\t\t\t\t// close page if already open\n\t\t\t\t\t\tdiv.style.display = \"none\";\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tdiv.style.display = \"block\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// hide other pages\n\t\t\t\t\tvar checkPin = searchArray(pinArray, div.id, 0);\n\t\t\t\t\tif (checkPin == 0){\n\t\t\t\t\t\tdiv.style.display = \"none\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t}\n}", "function initContent() {\n var msHide = document.querySelectorAll('.ms-hide');\n\n /**\n * Place the Yellow ribbon after the header.\n */\n $('#s4-workspace').prepend($('#DeltaPageStatusBar'));\n\n if (msHide.length > 0) {\n /**\n * Hide all right section web parts that are marked as \"hidden\".\n */\n if ($('.ms-hide').closest('.right-section')) {\n $('.right-section .ms-hide').parent().hide();\n }\n checkContentTypes();\n checkOrgChartZone();\n checkGatewayPage();\n }\n\n adjustArticleImageBlock();\n adjustWireStories();\n collapsibleList();\n customCheckboxes();\n howDoI();\n articleComments();\n startMyVMSNet();\n startUserControls();\n\n /**\n * Window Load Events.\n */\n window.addEventListener('load', function () {\n introText();\n wireStories();\n wireCatagory();\n updateMoreSearchText();\n });\n }", "function genServReq(){\n\tvar projectId;\n\t/*\n\t * KB 3031186 IOAN tabs don't use frames we must get project edit form \n\t * from View.openerView not from View.getOpenerView().getOpenerView()\n\t */\n\tif(valueExists(View.getOpenerView().panels.get(0).fields.get('project.project_id'))){\n\t\tprojectId = View.getOpenerView().panels.get(0).getFieldValue('project.project_id');\n\t}else if(valueExists(View.getOpenerView().getOpenerView().panels.get(0).fields.get('project.project_id'))){\n\t\tprojectId = View.getOpenerView().getOpenerView().panels.get(0).getFieldValue('project.project_id');\n\t}\n\t\n if (document.getElementById(\"generateWorkRequest\").checked == 1) {\n\t\tWorkflow.callMethod('AbMoveManagement-MoveService-genWorkRequest', controllerAbMoGroupEditAction.form_abMoGroupEditCompleteAction.getFieldValue('activity_log.activity_log_id'), projectId ,null);\n }\n}", "function getContent() {\n var helpTabUrl = 'https://api.cividesk.com/helptab/index.php';\n var getcontent = helpTabUrl + '?action=getContent';\n cj.ajax(getcontent, {\n type: 'post',\n dataType: 'json',\n data: {sid : cividesk_key, ver : civicrm_version, context: civicrm_contex },\n error: function() {\n alert('Could not retrieve data from HelpTab');\n },\n success: function(response) {\n var container = cj('.helptab-container');\n cj(\"#helptab-count\").hide();\n cj('#helptab-map-legend').animate({width: 468, padding: 12}, 1000);\n if(response.counts > 0){\n cj(\"#helptab-count\").text(response.counts).css({'margin-top':'-12px'}).show('slow');\n }\n cj.each(response.result, function(i, obj) {\n //@todo - temporary url for tracking of logging info, which will something like - 'http://api.cividesk.com/redirect.php?itemId=XXX';\n var redirectUrl = helpTabUrl + '?action=redirect&itemId=' + obj.item_id ;\n //var viewData = '<h3><a target=\"_blank\" class=\"helptab-title\" style=\"font-weight: normal;font-size: 1em;\" href=\"' + redirectUrl + '\">' + obj.title + '</a></h3><div class=\"helptab-context\">' + obj.text + '</div>';\n var helptab_iconId = '';\n if(obj.source !== null && obj.source.length > 0){\n var source = obj.source.toLowerCase();\n var helptab_iconId = \"helptab-icon-\"+source;\n }\n \n var viewData = '<h3 class=\"help-tab-title-h3\"><span class=\"helptab_iconClass\" id=\"'+ helptab_iconId +'\" title=\"'+ obj.text +'\"></span><a target=\"_blank\" class=\"helptab-title\" style=\"font-weight: normal;font-size: 1em;\" href=\"' + redirectUrl + '\">' + obj.title + '</a></h3>';\n container.append(viewData)\n });\n if (response.result.length == 0 ) {\n cj('#helptab-map-legend').empty().append('<div style=\"text-align:center;vertical-align: middle;padding-top:100px;\">Help content not available.</div>');\n }\n //cj('#total_record').html(response.total);\n \n //Implemented listing show-hide using jquery UI\n cj(\"#helptab-accordion\").accordion({\n event: \"click hoverintent\",\n heightStyle: \"content\"\n });\n\n //Js custom scroll bar\n cj('.jScrollbar4').jScrollbar();\n\n //Hide scrollbar for short records - set height as per set in css to 209\n var contentHeight = cj(\".jScrollbar_mask\").height();\n if (contentHeight < 209) {\n cj('.jScrollbar_draggable').hide();\n }\n\n //Handle click event for head tag in accordion\n cj(\".helptab-title\").on(\"click\", function(e) {\n\n e.preventDefault();\n //keep track of logging \n //setLogs(cj(this).attr('url'), cj(this).attr('href'), civicrm_contex);\n window.open(cj(this).attr('href') +'&sid='+cividesk_key +'&context='+civicrm_contex +'&ver='+ civicrm_version , '_blank');\n });\n }\n });\n}", "function includeAdapterInterface(divId, projectId, algorithmId, back_page) {\n // Populate in divId, the interface of the adapter, specified by algorihmId.\n // The interface will be automatically populated with dataTypes from projectId \n get_url = \"/flow/getadapterinterface/\"+ projectId+ \"/\" + algorithmId + '/' +back_page;\n $.ajax({ async : false,\n type: 'GET',\n url: get_url,\n success: function(r) { $(\"#\"+ divId).html(r); },\n error: function(r) { if (r) displayMessage(r,'errorMessage'); }\n });\n}", "function ajax_common_action(type,div_name,stringVar)\r\n{\t\r\n\tvar isAction=0;\r\n\tvar script_name='ajax_common_data.php';\t\r\n\t\r\n\t//photo refresh of the expert board\r\n\tif(type==\"set_reward_session\"){\r\n\t\tisAction=1;\r\n\t\t//alert(type);\r\n\t}\t\r\n\tif(isAction==1){\r\n\t\tvar url = script_name+\"?type=\"+type+\"&div_name=\"+div_name+\"&\"+stringVar;\r\n\t\t//alert(url);\r\n\t\thttp2.open(\"GET\", url , true); \r\n\t\thttp2.onreadystatechange = handleHttpResponse_ajax_common_action; \r\n\t\thttp2.send(null);\t\r\n\t}\r\n}", "function getAboutView() {\r\n var xmlhttp = getXMLHTTP();\r\n\r\n xmlhttp.onreadystatechange = function() {\r\n if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {\r\n var div = document.getElementById('custom-main-container');\r\n div.innerHTML = xmlhttp.responseText;\r\n }\r\n };\r\n xmlhttp.open('POST', '../controller/AboutController.php');\r\n xmlhttp.send();\r\n\r\n setSelectedSection(ABOUT_SECTION);\r\n}", "function getProjectInfos (poDivClickedOn){\n //var oDivProjectsOver = document.getElementById(\"projectsOver\");\n var nIdProject = poDivClickedOn.getAttribute('meta');\n\n /*if (oDivProjectsOver !== null){\n var nId = oDivProjectsOver.firstElementChild.getAttribute(\"meta\");\n console.log(\"nId = \" +nId);\n }*/\n \n if (nIdProject === '0') { return(''); }\n // define xhr object according to browser\n if (window.XMLHttpRequest){ \n var oXhr = new XMLHttpRequest(); \n } else if (window.ActiveXObject) { // for IE\n var oXhr = new ActiveXObject(\"Microsoft.XMLHTTP\");\n }\n \n // proceeding\n oXhr.open('GET','controller/ajax.php?todo=getProjectInfo&id=' +nIdProject, true);\n oXhr.send(null);\n \n // checking result\n oXhr.onreadystatechange = function() {\n if (oXhr.readyState === 4 && oXhr.status === 200){ \n displayProjectInfos(oXhr.responseText);\n }\n } \n}", "function showOnDemand(){\n\tvar panel = View.panels.get(\"requestPanel\");\n\t\n\tif(panel.getFieldValue(\"hactivity_log.wr_id\") == '' && panel.getFieldValue(\"hactivity_log.wo_id\") == ''){\n\t\talert(\"No workorder or work request for this request\");\n\t} else {\t\n\t\tif(panel.getFieldValue(\"hactivity_log.wr_id\") != ''){\t\n\t\t\tvar restriction = new Ab.view.Restriction();\n\t\t\trestriction.addClause(\"hwr.wr_id\",parseInt(panel.getFieldValue(\"hactivity_log.wr_id\")),'=');\n\t\t\tAb.view.View.openDialog(\"ab-helpdesk-request-ondemand-hwr.axvw\",restriction, false);\t\t\t\n\t\t} else if(panel.getFieldValue(\"hactivity_log.wo_id\") != '') {\n\t\t\tvar restriction = new Ab.view.Restriction();\n\t\t\trestriction.addClause(\"hwo.wo_id\",panel.getFieldValue(\"hactivity_log.wo_id\"),'=');\n\t\t\tAFM.view.View.openDialog(\"ab-helpdesk-request-ondemand-hwo.axvw\",restriction, false);\n\t\t}\n\t}\n}", "function TipoServico_elementsExtraJS() {\n // screen (TipoServico) extra code\n\n }", "function loadWorkArea(url, actionMethod, divSaveContainerName, processHandler,origObjAjax, checkModData)\r\n{\r\n\t//alert(\"processHandler \" + processHandler);\r\n _executePreProcess();\r\n var objHtmlData = null;\r\n \r\n if(checkModData!=false)\r\n {\r\n \tobjHtmlData = _getWorkAreaDefaultObj().checkForNavigation();\r\n }\r\n else\r\n {\r\n \tobjHtmlData = _getWorkAreaDefaultObj().getHTMLDataObj();\r\n } \r\n \r\n if(checkModData!=false && objHtmlData!=null && objHtmlData.hasUserModifiedData()==true)\r\n {\r\n //perform save operation\r\n\r\n\t var docviewid = _getWorkAreaDefaultObj().getHTMLAjax().getDocViewId();\r\n\t if (docviewid == 12701)\r\n\t {\r\n\t\tobjHtmlData.performSaveChanges(refreshFields);\r\n }\r\n else\r\n\t {\r\n \tobjHtmlData.performSaveChanges(_defaultWorkAreaSave);\r\n }\r\n }\r\n else\r\n {\r\n var defaultProcessHandler = _showWorkArea;\r\n if( processHandler && (typeof(processHandler)=='function'))\r\n {\r\n defaultProcessHandler = processHandler;\r\n }\r\n //alert(\"loadWorkArea : general \");\r\n _getWorkAreaObj().setDivDefaultSaveContainerName(divSaveContainerName);\r\n var objAjax = new htmlAjax();\r\n if(objAjax)\r\n {\r\n objAjax.setActionURL(url);\r\n // Tracker#: 13512\r\n // Note since this is a new instance of htmlAjax object the doc view id\r\n // will not be set and if any processHandler has been passed then that\r\n // method will not have access to the docviewid. Set the same.\r\n objAjax.setDocViewId(_getWorkAreaDefaultObj().getHTMLAjax().getDocViewId());\r\n objAjax.setActionMethod(actionMethod);\r\n //alert(\"defaultProcessHandler \" + defaultProcessHandler);\r\n objAjax.setProcessHandler(defaultProcessHandler);\r\n if ((url == 'techspecoverview.do') && (actionMethod.indexOf('smartcopy') != -1))\r\n {\r\n \tobjAjax._setChangeFlagsOnLoad(true);\r\n }\r\n if ((url == 'seasonalcaloverview.do') && (actionMethod.indexOf('smartcopy') != -1))\r\n {\r\n \tobjAjax._setChangeFlagsOnLoad(true);\r\n }\r\n //tracker#: 16026 MATERIAL SOURCING PROCESS\r\n if ((url == 'materialoverview.do') && (actionMethod.indexOf('creatematerialquote') != -1))\r\n {\r\n \tobjAjax._setChangeFlagsOnLoad(true);\r\n }\r\n //Tracker#:26533 ADD NEW PROCESS TO COPY MATERIAL QUOTE RECORD\r\n if ((url == 'materialquoteoverview.do') && (actionMethod.indexOf('copyMaterialQuote') != -1))\r\n\t\t\t{\r\n \tobjAjax._setChangeFlagsOnLoad(true);\r\n }\r\n if ((url == 'materialoverview.do') && (actionMethod.indexOf('copymaterial') != -1))\r\n {\r\n \tobjAjax._setChangeFlagsOnLoad(true);\r\n }\r\n if ((url == 'materialquoteofferresponse.do') && (actionMethod.indexOf('copyMatOfferResponse') != -1))\r\n {\r\n \tobjAjax._setChangeFlagsOnLoad(true);\r\n }\r\n \tif (origObjAjax)\r\n {\r\n // set the old htmlAjax object as an attribute so the message can display\r\n // at the correct time (see colorlib _showColorLibPage)\r\n \t\tobjAjax.attribute().setAttribute('origObjAjax', origObjAjax)\r\n }\r\n\t\t\t\r\n _getWorkAreaDefaultObj().getHTMLDataObj().addAllChangedFieldsData(objAjax);\r\n objAjax.sendRequest();\r\n }\r\n }\r\n\r\n //@2010R4\r\n AutoSuggestContainer.clearComponents();\r\n}", "function imposeSupportRequestSecurityUIRestrictions() {\n var divIdToSecure;\n divIdToSecure = '#supportRequestFormSave';\n (isUserAuthorized('UPDATE_SUPPORT_REQUEST', false)) ?\n securityshow(divIdToSecure) : securityHide(divIdToSecure);\n\n divIdToSecure = '#supportRequestFormAdd';\n (isUserAuthorized('INSERT_SUPPORT_REQUEST', false)) ?\n securityshow(divIdToSecure) : securityHide(divIdToSecure);\n\n divIdToSecure = '#supportRequestEntryDivId';\n (isUserAuthorized('UPDATE_SUPPORT_REQUEST', false) ||\n isUserAuthorized('INSERT_SUPPORT_REQUEST', false)) ?\n securityshow(divIdToSecure) : securityHide(divIdToSecure);\n if (!isUserAuthorized('INSERT_SUPPORT_REQUEST', false) &&\n !isUserAuthorized('UPDATE_SUPPORT_REQUEST', false)) {\n securityLockForm('supportRequestForm', true);\n\n }\n if (!isUserAuthorized('INSERT_SUPPORT_REQUEST', false) &&\n isFormEmpty('supportRequestForm')) {\n securityLockForm('supportRequestForm', true);\n }\n\n}", "function requestAccess() {\n\n var settings = {};\n var authRequest = {\n requestingAppId: false,\n referer: null,\n languageCode: false,\n permissionsArea: false,\n returnURL: false\n };\n authRequest.requestingAppId = requestingAppId.val();\n\n if (authRequest.requestingAppId.length < 6) {\n return alert('RequestingAppId is invalid!');\n }\n\n // Dev and advanced settings\n authRequest.languageCode = lang.val();\n if (authRequest.languageCode === 'default') { delete authRequest.languageCode; }\n\n\n authRequest.returnURL = returnURL.val();\n authRequest.oauthState = oauthState.val();\n authRequest.referer = referer.val() || null;\n\n try {\n authRequest.requestedPermissions = JSON.parse(permissionsArea.val());\n\n // Add clientData if any\n var clientData = clientDataArea.val();\n if (clientData.length > 0) {\n authRequest.clientData = JSON.parse(clientData);\n }\n\n settings.spanButtonID = 'pryvButton';\n\n settings.onStateChange = function (state) {\n logToConsole('##pryvAuthStateChange \\t ' + JSON.stringify(state));\n if (state.id === Pryv.Browser.AuthStates.AUTHORIZED) {\n apiEndpointArea.text(state.apiEndpoint);\n logToConsole('# Auth succeeded for user ' + state.apiEndpoint);\n }\n if (state.id === Pryv.Browser.AuthStates.LOGOUT) {\n logToConsole('# Logout');\n }\n };\n\n settings.authRequest = authRequest;\n\n Pryv.Browser.setupAuth(settings, serviceInfoUrlArea.val());\n } catch (e) {\n logToConsole('Error in Access params: ' + e);\n }\n}", "requestView(){\t\t\n\t\tthis.trigger('requestView');\n\t}", "function detailedReviewPage_elementsExtraJS() {\n // screen (detailedReviewPage) extra code\n }", "function TPROJECT_REQ_SPEC_MGMT(id)\n{\n var _FUNCTION_NAME_=\"TPROJECT_REQ_SPEC_MGMT\";\n var pParams = tree_getPrintPreferences();\n var action_url = fRoot+\"lib/project/project_req_spec_mgmt.php\"+\"?id=\"+id+args+\"&\"+pParams;\n\n //alert(_FUNCTION_NAME_ + \" \" +action_url);\n parent.workframe.location = action_url;\n\n}", "function PaginaInicial_elementsExtraJS() {\n // screen (PaginaInicial) extra code\n\n }", "function callOnholdContentAction() {\n var instance_id = $(\"#id_detail_content\" + form_container + \" #id_detail_instance_id\").val();\n var display_type = 'add';\n form_action_type = display_type;\n // $.post(base_plugin_url + 'code.php', , callOnholdRes, 'json');\n var ajaxParams = {\n 'action': 'onhold_form',\n 'display_type': display_type,\n 'add_form_instance_id': add_instance_id_of_content,\n 'instance_id': instance_id,\n 'login_role_id': login_role_id,\n 'heading': content_head\n };\n require(['page_module'], function (PageModule) {\n PageModule.ajaxPromise({requestType: 'POST', dataType: 'json'}, ajaxParams).then(callOnholdRes);\n });\n showFullLoader('content_loader');\n\n }", "function GetButtonFrameInformation(View)\n{\n\t__View = View;\n\t\n\tvar Static = true;\n\n\tif (TimeCard.View == 4 && TimeCard.Status != 2 && TimeCard.Status != 3)\n\t{\n\t\tStatic = false;\t\n\t}\n\t\n\tGetTimeCardView(TimeCard.View);\n\n\tvar arg = '<div style=\"width:100%\"><form name=\"frmButtonFrame\">'\n\targ += '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%;margin-left:auto;margin-right:auto\"><tr>'\n\t\t\n\t// Direct Report Select\t\n\tif (TimeCard.ManagerFlag)\n\t{\n\t\targ += '<span style=\"white-space:nowrap\"><span class=\"plaintablecellbold\" style=\"vertical-align:top;padding-right:5px\">'+getSeaPhrase(\"REPORTS\",\"TE\")+'</span>';\n\t\targ += '<select class=\"inputbox\" name=\"cmbReports\" onchange=\"parent.NewEmployeeSelected();\">';\n\t\tfor (var i=0; i<Reports.Detail.length; i++)\n\t\t{\n\t\t\tif (Employee.EmployeeNbr == Reports.Detail[i].Employee)\n\t\t\t{\n\t\t\t\targ += '<option value=\"'+Reports.Detail[i].Employee+'\" selected>';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\targ += '<option value=\"'+Reports.Detail[i].Employee+'\">';\n\t\t\t}\n\t\t\targ += Reports.Detail[i].FullName + '</option>';\n\t\t}\n\t\targ += '</select></span>';\n\t}\n\t\n\tif (TimeCard.View == 4 && ((TimeCard.Status != 2 && TimeCard.Status != 3) || TimeCard.ManagerFlag))\n\t{\n\t\t// Update Button\n\t\tif (View == \"Period\")\n\t\t{\n\t\t\tif (Static)\n\t\t\t{\n\t\t\t\targ += uiButton(getSeaPhrase(\"UPDATE_CARD\",\"TE\"),\"parent.UpdateClicked_Period();return false\",\"margin-left:5px\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\targ += uiButton(getSeaPhrase(\"UPDATE_CARD\",\"TE\"),\"parent.CheckTextChanged_Period();return false\",\"margin-left:5px\");\n\t\t\t}\n\t\t}\n\t\telse if (View == \"Exception\")\n\t\t{\n\t\t\targ += uiButton(getSeaPhrase(\"UPDATE_CARD\",\"TE\"),\"parent.UpdateClicked_Exception();return false\",\"margin-left:5px\");\n\t\t}\n\t\telse\n\t\t{\t\n\t\t\targ += uiButton(getSeaPhrase(\"UPDATE_CARD\",\"TE\"),\"parent.UpdateClicked_Daily();return false\",\"margin-left:5px\");\n\t\t}\n\t\t\n\t\t// Submit Button\n\t\tif (!TimeCard.ManagerFlag)\n\t\t{\n\t\t\tif (View == \"Period\")\n\t\t\t{\t\n\t\t\t\targ += uiButton(getSeaPhrase(\"SUBMIT_CARD_FOR_APPROVE\",\"TE\"),\"parent.SubmitClicked_Period();return false\",\"margin-left:5px\");\n\t\t\t}\n\t\t\telse if (View == \"Exception\")\n\t\t\t{\n\t\t\t\targ += uiButton(getSeaPhrase(\"SUBMIT_CARD_FOR_APPROVE\",\"TE\"),\"parent.SubmitClicked_Exception();return false\",\"margin-left:5px\");\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Delete Row Button\n\t\tif (TimeCard.Status != 2 && TimeCard.Status != 3)\n\t\t{\n\t\t\targ += uiButton(getSeaPhrase(\"DEL_DATED_INFO\",\"TE\"),\"parent.DeleteRowClicked('\"+View+\"');return false\",\"margin-left:5px\");\n\t\t}\n\t}\n\n\t// Print Button\n\tif (View == \"Period\")\n\t{\n\t\targ += uiButton(getSeaPhrase(\"PRINT_CURRENT_CARD\",\"TE\"),\"parent.PrintClicked_Period();return false\",\"margin-left:5px\");\n\t}\n\telse if (View == \"Exception\")\n\t{\n\t\targ += uiButton(getSeaPhrase(\"PRINT_CURRENT_CARD\",\"TE\"),\"parent.PrintClicked_Exception();return false\",\"margin-left:5px\");\t\n\t}\n\t\n\t// Copy Paste Buttons\n\tif (View != \"Period\" && View != \"Exception\")\n\t{\n\t\tif (TimeCard.View == 4 && TimeCard.Status != 2 && TimeCard.Status != 3)\n\t\t{\n\t\t\targ += uiButton(getSeaPhrase(\"COPY_DAY\",\"TE\"),\"parent.CopyScreen_Daily();return false\",\"margin-left:5px\");\n\t\t\targ += uiButton(getSeaPhrase(\"PASTE_DAY\",\"TE\"),\"parent.PasteScreen_Daily();return false\",\"margin-left:5px\");\t\t\n\t\t}\n\t}\n\n\t// Done Button\n\tif ((View != \"Daily\" && ScreenWidth == 800) || ScreenWidth >= 1024)\n\t{\t\n\t\targ += uiButton(getSeaPhrase(\"CLOSE_TE\",\"TE\"),\"parent.DoneClicked('\"+View+\"');return false\",\"margin-left:5px\");\t\n\t}\n\t\t\n\t// Go to Period View Button\n\tif (View == \"Daily\")\n\t{\t\n\t\targ += uiButton(getSeaPhrase(\"RETURN_PERIOD_VIEW\",\"TE\"),\"parent.BackToPeriod();return false\",\"margin-left:5px\");\t\n\t}\n\t\t\n\t// Go to Summary View Button\n\tif (TimeCard.ManagerFlag)\n\t{\n\t\tif (!NoSummaryFlag && (View != \"Daily\" && View != \"Period\" && ScreenWidth == 800) || ScreenWidth >= 1024)\n\t\t{\t\t\n\t\t\targ += uiButton(getSeaPhrase(\"GO_TO_SUMMARY_APPROVAL\",\"TE\"),\"parent.BackToSummary(this,'\"+View+\"');return false\",\"margin-left:5px\");\t\t\n\t\t}\n\t}\n\t\n\t// Status Drop Down\n\t// Only show the status select if employee is a manager and the user has not navigated from Daily Time Entry.\n\tif (TimeCard.ManagerFlag && View != \"Daily\" && prm != \"daily\")\n\t{\n \t\targ += '<span style=\"white-space:nowrap\"><span class=\"plaintablecellbold\" style=\"vertical-align:top;padding-left:5px;padding-right:5px\">'+getSeaPhrase(\"STATUS\",\"TE\")+'</span>';\n \t\t\n\t\tif (TimeCard.View != 4)\n\t\t{\n\t\t\targ += '<span class=\"plaintablecell\" style=\"vertical-align:top\">>';\n\t\t\tswitch (TimeCard.Status)\n\t\t\t{\n\t\t\t\tcase 1: arg += getSeaPhrase(\"SUBMITTED\",\"TE\"); break;\n\t\t\t\tcase 2: arg += getSeaPhrase(\"APPROVED\",\"TE\"); break;\n\t\t\t\tcase 3: arg += getSeaPhrase(\"ON_HOLD\",\"TE\"); break;\n\t\t\t\tcase 4: arg += getSeaPhrase(\"REJECTED\",\"TE\"); break;\n\t\t\t\tcase 5: arg += getSeaPhrase(\"HISTORICAL_1\",\"TE\"); break; // Entered (Historical)\n\t\t\t\tcase 6: arg += getSeaPhrase(\"HISTORICAL_2\",\"TE\"); break; // Submitted (Historical)\n\t\t\t\tcase 7: arg += getSeaPhrase(\"HISTORICAL_3\",\"TE\"); break; // Approved (Historical)\n\t\t\t\tcase 8: arg += getSeaPhrase(\"HISTORICAL_4\",\"TE\"); break; // On Hold (Historical)\n\t\t\t\tcase 9: arg += getSeaPhrase(\"HISTORICAL_5\",\"TE\"); break; // Rejected (Historical)\n\t\t\t\tdefault: arg += getSeaPhrase(\"NONE\",\"TE\"); break;\n\t\t\t}\n\t\t\targ += '</span>';\n\t\t}\n\t\telse\n\t\t{\n\t\t\targ += '<select class=\"inputbox\" name=\"cmbStatus\" onchange=\"parent.SetStatus()\">';\n\t\t\targ += (TimeCard.Status == 1)?'<option value=\"1\" selected></option>':'<option value=\"1\"></option>';\n\t\t\targ += (TimeCard.Status == 2)?'<option value=\"2\" selected>'+getSeaPhrase(\"APPROVED\",\"TE\")+'</option>':'<option value=\"2\">'+getSeaPhrase(\"APPROVED\",\"TE\")+'</option>';\n\t\t\targ += (TimeCard.Status == 3)?'<option value=\"3\" selected>'+getSeaPhrase(\"HOLD\",\"TE\")+'</option>':'<option value=\"3\">'+getSeaPhrase(\"HOLD\",\"TE\")+'</option>';\n\t\t\targ += (TimeCard.Status == 4)?'<option value=\"4\" selected>'+getSeaPhrase(\"REJECTED\",\"TE\")+'</option>':'<option value=\"4\">'+getSeaPhrase(\"REJECTED\",\"TE\")+'</option>';\n\t\t\targ += '</select>';\n\t\t}\n\t\t\n\t\targ += '</span>';\n\t}\n\t\n\targ += '</td></tr></table></form></div>';\n\treturn arg;\n}", "function indeginousTaskDetails (){\nkony.application.showLoadingScreen(null, \"Loading..\", \nconstants.LOADING_SCREEN_POSITION_ONLY_CENTER, true, true, { \nshouldShowLabelInBottom: \"false\", separatorHeight: 20} );\n// gblReqForTaskDetails=valBusRequestID.widgetInfo.data[0].lblRequestId;\n// alert(\"the selected\"+JSON.stringify(gblReqForTaskDetails));\n // Let's get the news type the user selected\n //var selectedKey = frmFoxNews.lstNewsType.selectedKey;\n //alert (\"########## Selected Key:\" + selectedKey);\n // Let's first check that the user picked a valid value\n //if (!kony.string.equalsIgnoreCase(selectedKey, \"none\")){\n // Populating the input params for the service call and invoking the service\n // We're passing in the selected key for the user's selection in the combobox\n // var inputParams = {serviceID:\"getFoxNews\",newsType:selectedKey};\n // Now we make the call to the service using our input parameters and specifying\n // the function processServiceResults as our callback when the service returns results\n // appmiddlewareinvokerasync(inputParams, processServiceResults);\n if (!mobileFabricConfigurationForIndigenousTaskDetails.isKonySDKObjectInitialized)\n {\n initializeMobileFabricForIndigenousTaskDetails();\n \n }\n else if (mobileFabricConfigurationForIndigenousTaskDetails.isKonySDKObjectInitialized)\n {\n setIndigenousTaskDetails();\n }\n }", "function webSiteInfo() {\n var featureRelId = getUrlVars()['transferId'];\n var userSiteId = getUrlVars()['touchId'];\n var featureId = getUrlVars()['mId'];\n\tvar featureName = getUrlVars()['featureName'];\n\tfeatureName = featureName.replace(/\\%20/g,' ');\n\tfeatureNameTitle(featureName);\n\t\n var url = baseUrl + 'web/web/getMenuHtml/' + featureId + '/' + featureRelId + '/' + userSiteId;\n\n var data = '';\n doAjaxCall(url, data, false, function (html) {\n if ($.isEmptyObject(html)) {\n $('#main-content').html('Sorry we have an Empty data');\n } else {\n\n var data = '<ul data-role=\"listview\" data-inset=\"false\" data-divider-theme=\"d\" id=\"aboutclass\">';\n $.each(html, function (i, item) {\n\t\t\t\n if (i == 0) { addBackground(item); }\n\t\t\t\t if (i % 2 == 0) {\n className = 'evenbg';\n } else {\n className = 'oddbg';\n }\n data += '<li src=\"' + item.url + '\"><a href=\"detail.html?id=' + i + '&transferId=' + featureRelId + '&touchId=' + userSiteId + '&mId=' + featureId + '&return_url=' + item.url + '&featureName=' + item.name + '\" class=\"'+className+'\" rel=\"external\" >';\n\t\t\t\t\tif(item.thumbnail ==''){\n\t\t\t\tdata\t+= '<img src=\"'+baseUrl+'assets/images/nobutton.png\" >';\n\t\t\t\t}else{\n\t\t\t\tdata\t+= '<img src=\"'+baseUrl+item.thumbnail+'\">';\t\n\t\t\t\t}\t\n\t\t\t\tdata += item.name + ' </a></li>';\n\t\t\t\t\n\n })\n data += '</ul>';\n $('#main-content').html(data);\n\n try {\n $(\"#aboutclass\").listview('refresh');\n } catch (e) {\n $(\"#aboutclass\").listview();\n }\n var backGroundColor=html[0].globalBackground;\n var textColor=html[0].globalTextColor;\n $('#main-content').css({ 'background-color': '#' + backGroundColor, 'color': '#' + textColor });\n \n if(isMobile.iOS()){\n \n var im=html[0].iphone5Background;\n $('#main-content').css('backgroundImage','url('+baseUrl+'/'+im+')');\n $('#main-content').css('background-size','100%');\n }else{\n var im=html[0].mobileBackground;\n $('#main-content').css('backgroundImage','url('+baseUrl+'/'+im+')');\n $('#main-content').css('background-size','100%');\n }\n }\n // for background color and images \n\n\t\t\t\n\n// end of it\n getUserAppereance();\n });\n}", "function getAboutData() {\n\n //var featureRelId = getUrlVars()['transferId'];\n var userSiteId = getUrlVars()['touchId'];\n var itemId = getUrlVars()['itemId'];\n\tvar featureName = getUrlVars()['featureName'];\n\tfeatureName = featureName.replace(/\\%20/g,' ');\n\tfeatureNameTitle(featureName);\n\t\n var menuhtml = $(\"userSiteId\").find('a').html();\n //var userSiteId = $('#userSiteId').val();\n var url = baseUrl + 'web/web/getAboutUsDescription/' + itemId;\n var data = '';\n doAjaxCall(url, data, false, function (html) {\n //console.log(html);\n $('title,.header-content h1').html(menuhtml);\n $('.header-content .back').show();\n $('#main-content').html(html[0].description);\n\t\t$('#main-content').css({ 'background-color': '#' + html[0].globalBackground, 'color': '#' + html[0].globalTextColor });\n });\n\tgetUserAppereance();\n}", "function GetButtonFrameInformation(View)\n{\n\t__View = View;\n\t\n\tvar Static = true;\n\n\tif (TimeCard.View == 4 && TimeCard.Status != 2 && TimeCard.Status != 3)\n\t{\n\t\tStatic = false;\t\n\t}\n\t\n\tGetTimeCardView(TimeCard.View);\n\n\tvar arg = '<div style=\"width:100%\"><form name=\"frmButtonFrame\">'\n\targ += '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%;margin-left:auto;margin-right:auto\"><tr>'\t\t\t\t\t\n\targ += '<td style=\"vertical-align:top;text-align:center;width:100%\">';\n\t\n\t// Direct Report Select\t\n\tif (TimeCard.ManagerFlag)\n\t{\n\t\targ += '<span style=\"white-space:nowrap\"><span class=\"plaintablecellbold\" style=\"vertical-align:top;padding-right:5px\">'+getSeaPhrase(\"REPORTS\",\"TE\")+'</span>';\n\t\targ += '<select class=\"inputbox\" name=\"cmbReports\" onchange=\"parent.NewEmployeeSelected();\">';\n\t\tfor (var i=0; i<Reports.Detail.length; i++)\n\t\t{\n\t\t\tif (Employee.EmployeeNbr == Reports.Detail[i].Employee)\n\t\t\t{\n\t\t\t\targ += '<option value=\"'+Reports.Detail[i].Employee+'\" selected>';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\targ += '<option value=\"'+Reports.Detail[i].Employee+'\">';\n\t\t\t}\n\t\t\targ += Reports.Detail[i].FullName + '</option>';\n\t\t}\n\t\targ += '</select></span>';\n\t}\t\n\t\n\tif (TimeCard.View == 4 && ((TimeCard.Status != 2 && TimeCard.Status != 3) || TimeCard.ManagerFlag))\n\t{\n\t\t// Update Button\n\t\tif (View == \"Period\")\n\t\t{\n\t\t\tif (Static)\n\t\t\t{\n\t\t\t\targ += uiButton(getSeaPhrase(\"UPDATE_CARD\",\"TE\"),\"parent.UpdateClicked_Period();return false\",\"margin-left:5px\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\targ += uiButton(getSeaPhrase(\"UPDATE_CARD\",\"TE\"),\"parent.CheckTextChanged_Period();return false\",\"margin-left:5px\");\n\t\t\t}\n\t\t}\n\t\telse if (View == \"Exception\")\n\t\t{\n\t\t\targ += uiButton(getSeaPhrase(\"UPDATE_CARD\",\"TE\"),\"parent.UpdateClicked_Exception();return false\",\"margin-left:5px\");\n\t\t}\n\t\telse\n\t\t{\t\n\t\t\targ += uiButton(getSeaPhrase(\"UPDATE_CARD\",\"TE\"),\"parent.UpdateClicked_Daily();return false\",\"margin-left:5px\");\n\t\t}\n\t\t\n\t\t// Submit Button\n\t\tif (!TimeCard.ManagerFlag)\n\t\t{\n\t\t\tif (View == \"Period\")\n\t\t\t{\t\n\t\t\t\targ += uiButton(getSeaPhrase(\"SUBMIT_CARD_FOR_APPROVE\",\"TE\"),\"parent.SubmitClicked_Period();return false\",\"margin-left:5px\");\n\t\t\t}\n\t\t\telse if (View == \"Exception\")\n\t\t\t{\n\t\t\t\targ += uiButton(getSeaPhrase(\"SUBMIT_CARD_FOR_APPROVE\",\"TE\"),\"parent.SubmitClicked_Exception();return false\",\"margin-left:5px\");\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Delete Row Button\n\t\tif (TimeCard.Status != 2 && TimeCard.Status != 3)\n\t\t{\n\t\t\targ += uiButton(getSeaPhrase(\"DEL_DATED_INFO\",\"TE\"),\"parent.DeleteRowClicked('\"+View+\"');return false\",\"margin-left:5px\");\n\t\t}\n\t}\n\n\t// Print Button\n\tif (View == \"Period\")\n\t{\n\t\targ += uiButton(getSeaPhrase(\"PRINT_CURRENT_CARD\",\"TE\"),\"parent.PrintClicked_Period();return false\",\"margin-left:5px\");\n\t}\n\telse if (View == \"Exception\")\n\t{\n\t\targ += uiButton(getSeaPhrase(\"PRINT_CURRENT_CARD\",\"TE\"),\"parent.PrintClicked_Exception();return false\",\"margin-left:5px\");\t\n\t}\n\t\n\t// Copy Paste Buttons\n\tif (View != \"Period\" && View != \"Exception\")\n\t{\n\t\tif (TimeCard.View == 4 && TimeCard.Status != 2 && TimeCard.Status != 3)\n\t\t{\n\t\t\targ += uiButton(getSeaPhrase(\"COPY_DAY\",\"TE\"),\"parent.CopyScreen_Daily();return false\",\"margin-left:5px\");\n\t\t\targ += uiButton(getSeaPhrase(\"PASTE_DAY\",\"TE\"),\"parent.PasteScreen_Daily();return false\",\"margin-left:5px\");\t\t\n\t\t}\n\t}\n\n\t// Done Button\n\tif ((View != \"Daily\" && ScreenWidth == 800) || ScreenWidth >= 1024)\n\t{\t\n\t\targ += uiButton(getSeaPhrase(\"CLOSE_TE\",\"TE\"),\"parent.DoneClicked('\"+View+\"');return false\",\"margin-left:5px\");\t\n\t}\n\t\t\n\t// Go to Period View Button\n\tif (View == \"Daily\")\n\t{\t\n\t\targ += uiButton(getSeaPhrase(\"RETURN_PERIOD_VIEW\",\"TE\"),\"parent.BackToPeriod();return false\",\"margin-left:5px\");\t\n\t}\n\t\t\n\t// Go to Summary View Button\n\tif (TimeCard.ManagerFlag)\n\t{\n\t\tif (!NoSummaryFlag && (View != \"Daily\" && View != \"Period\" && ScreenWidth == 800) || ScreenWidth >= 1024)\n\t\t{\t\t\n\t\t\targ += uiButton(getSeaPhrase(\"GO_TO_SUMMARY_APPROVAL\",\"TE\"),\"parent.BackToSummary(this,'\"+View+\"');return false\",\"margin-left:5px\");\t\t\n\t\t}\n\t}\n\t\n\t// Status Drop Down\n\t// Only show the status select if employee is a manager and the user has not navigated from Daily Time Entry.\n\tif (TimeCard.ManagerFlag && View != \"Daily\" && prm != \"daily\")\n\t{\n \t\targ += '<span style=\"white-space:nowrap\"><span class=\"plaintablecellbold\" style=\"vertical-align:top;padding-left:5px;padding-right:5px\">'+getSeaPhrase(\"STATUS\",\"TE\")+'</span>';\n \t\t\n\t\tif (TimeCard.View != 4)\n\t\t{\n\t\t\targ += '<span class=\"plaintablecell\" style=\"vertical-align:top\">';\n\t\t\tswitch (TimeCard.Status)\n\t\t\t{\n\t\t\t\tcase 1: arg += getSeaPhrase(\"SUBMITTED\",\"TE\"); break;\n\t\t\t\tcase 2: arg += getSeaPhrase(\"APPROVED\",\"TE\"); break;\n\t\t\t\tcase 3: arg += getSeaPhrase(\"ON_HOLD\",\"TE\"); break;\n\t\t\t\tcase 4: arg += getSeaPhrase(\"REJECTED\",\"TE\"); break;\n\t\t\t\tcase 5: arg += getSeaPhrase(\"HISTORICAL_1\",\"TE\"); break; // Entered (Historical)\n\t\t\t\tcase 6: arg += getSeaPhrase(\"HISTORICAL_2\",\"TE\"); break; // Submitted (Historical)\n\t\t\t\tcase 7: arg += getSeaPhrase(\"HISTORICAL_3\",\"TE\"); break; // Approved (Historical)\n\t\t\t\tcase 8: arg += getSeaPhrase(\"HISTORICAL_4\",\"TE\"); break; // On Hold (Historical)\n\t\t\t\tcase 9: arg += getSeaPhrase(\"HISTORICAL_5\",\"TE\"); break; // Rejected (Historical)\n\t\t\t\tdefault: arg += getSeaPhrase(\"NONE\",\"TE\"); break;\n\t\t\t}\n\t\t\targ += '</span>';\n\t\t}\n\t\telse\n\t\t{\n\t\t\targ += '<select class=\"inputbox\" name=\"cmbStatus\" onchange=\"parent.SetStatus()\">';\n\t\t\targ += (TimeCard.Status == 1)?'<option value=\"1\" selected></option>':'<option value=\"1\"></option>';\n\t\t\targ += (TimeCard.Status == 2)?'<option value=\"2\" selected>'+getSeaPhrase(\"APPROVED\",\"TE\")+'</option>':'<option value=\"2\">'+getSeaPhrase(\"APPROVED\",\"TE\")+'</option>';\n\t\t\targ += (TimeCard.Status == 3)?'<option value=\"3\" selected>'+getSeaPhrase(\"HOLD\",\"TE\")+'</option>':'<option value=\"3\">'+getSeaPhrase(\"HOLD\",\"TE\")+'</option>';\n\t\t\targ += (TimeCard.Status == 4)?'<option value=\"4\" selected>'+getSeaPhrase(\"REJECTED\",\"TE\")+'</option>':'<option value=\"4\">'+getSeaPhrase(\"REJECTED\",\"TE\")+'</option>';\n\t\t\targ += '</select>';\n\t\t}\n\t\t\n\t\targ += '</span>';\n\t}\n\t\n\targ += '</td></tr></table></form></div>';\n\treturn arg;\n}", "function resolveContainerURL() {\n var resultURL = 'http://ctr-qas.mheducation.com/flow/flowjs.html?name=container&login=3';\n\n // TODO : get and pass the necessary input parameters\n resultURL += \"&skipLogin=true\";\n\n resultURL += \"&userId=\" + $('#in_instructor_id').val();\n resultURL += \"&sessionId=\" + $('#in_session_id').val();\n\n resultURL += \"&sectionId=\" + $('#in_section_id').val(); \n\n return resultURL;\n }", "function infoTab1Info(html) {\n var featureRelId = getUrlVars()['transferId'];\n var userSiteId = getUrlVars()['touchId'];\n var featureId = getUrlVars()['mId'];\n\tvar featureName = getUrlVars()['featureName'];\n\tfeatureName = featureName.replace(/\\%20/g,' ');\n\tfeatureNameTitle(featureName);\n\t\n var url = baseUrl + 'web/web/getMenuHtml/' + featureId + '/' + featureRelId + '/' + userSiteId;\n\n var data = '';\n doAjaxCall(url, data, false, function (html) {\n if ($.isEmptyObject(html)) {\n $('#main-content').html('Sorry we have an info Tab data');\n } else {\n var backGroundColor, textColor, description;\n $.each(html, function (i, item) {\n backGroundColor = item.globalBackground;\n textColor = item.globalTextColor;\n description = item.description;\n })\n if (description == '') {\n $('#main-content').html('Sorry We Have An Empty Data');\n } else {\n $('#main-content').html(description);\n }\n $('#main-content').css({ 'background-color': '#' + backGroundColor, 'color': '#' + textColor });\n }\n getUserAppereance();\n });\n\n}", "function ajaxCommon(phpFileName, outPutStage){\n\t\t\t //if(navigator.onLine){\n \t\t\t\t\t//alert(\"Loading\");\n\t\t\t\t\tvar xmlhttp = new XMLHttpRequest();\n \t\t\txmlhttp.onreadystatechange = function() {\n \t\t\tif (this.readyState === 4 && this.status == 200) {\n \t\t\t\tdocument.getElementById(outPutStage).innerHTML = this.responseText;\n\t\t\t\t\t\t//alert(\"loading complete\");\n \t\t\t\t}\n \t\t\t};\n \t\t\txmlhttp.open(\"GET\", phpFileName, true);//generating get method link\n \t\t\txmlhttp.send();\n \t\t\t\t//}\n\t\t\t//else {\n \t\t\t\t//alert('offline');\n \t\t\t\t//}\n\t\t\t\n}", "function TestSupport() {\n this.wadlDoc = null;\n this.wadlURL = '';\n this.wadlErr = 'MSG_TEST_RESBEANS_wadlErr';\n this.currentValidUrl = '';\n this.breadCrumbs = [];\n this.currentMethod = '';\n this.currentMimeType = '';\n this.topUrls = [];\n this.paramNumber = 1;\n this.bcCount = 0;\n this.currMonitorText = null;\n this.childrenContent = '';\n this.currentXmlHttpReq = '';\n this.tcStr = '';\n this.tcCount = 0;\n this.prettyContent = '';\n this.colSize = \"86\";\n this.rowSize = \"20\";\n this.iframeWidth = \"530\";\n this.iframeHeight = \"400\";\n this.allcat = [];\n this.projectName = '';\n \n this.expand = new Image();\n this.expand.src = \"expand.gif\";\n this.collapse = new Image();\n this.collapse.src = \"collapse.gif\";\n this.og = new Image();\n this.og.src = \"og.gif\";\n this.cg = new Image();\n this.cg.src = \"cg.gif\";\n\n this.viewIds = [\n { \"id\" : \"table\" , \"name\":\"MSG_TEST_RESBEANS_TabularView\", \"type\":\"tableContent\"}, \n { \"id\" : \"raw\" , \"name\":\"MSG_TEST_RESBEANS_RawView\", \"type\":\"rawContent\"}, \n { \"id\" : \"structure\" , \"name\":\"MSG_TEST_RESBEANS_SubResources\", \"type\":\"structureInfo\"},\n { \"id\" : \"header\" , \"name\":\"MSG_TEST_RESBEANS_Headers\", \"type\":\"headerInfo\"},\n { \"id\" : \"monitor\" , \"name\":\"MSG_TEST_RESBEANS_Monitor\", \"type\":\"monitorContent\"}];\n \n this.xhr = new XHR();\n this.wdr = new WADLParser();\n}", "function fnViewAllOS() {\n\t$('#mainContainer').html('<div id=\"ViewOSPage\"></div>');\n\tsetLoadImage('ViewOSPage');\n\tsendHTMLAjaxRequest(false, 'getView/getViewOSPage.html', null, fnDisplayContent, null,'ViewOSPage');\n}", "function IndexInit(LangResources) {\n\n\n\n function EnableDateFilterRequests() {\n if ($('.check-range-date').is(':checked')) {\n $('#checkdate').val('true');\n $('#txt_RequestStartDate').prop(\"disabled\", false);\n $('#txt_RequestEndDate').prop(\"disabled\", false);\n } else {\n $('#checkdate').val('false');\n $('#txt_RequestStartDate').prop(\"disabled\", true);\n $('#txt_RequestEndDate').prop(\"disabled\", true);\n }\n }\n\n var StatusToSelect = $(\"#SelectedDefaultStatus\").val().split(\",\");\n\n $('#txt_RequestNumber').maxlength();\n $('#txt_Responsible').maxlength();\n function ShowHidePagesRequests(activepage, PublicPrivateSeparator) {\n $('.custompager_' + PublicPrivateSeparator).hide();\n var PageCount = $('#PageCount_' + PublicPrivateSeparator).val();\n\n $('#custom_page_' + PublicPrivateSeparator + '_1').show();\n var rango_ini = activepage - 5;\n for (var i = activepage; i > rango_ini; i--) {\n $('#custom_page_' + PublicPrivateSeparator + '_' + i).show();\n }\n if (rango_ini > 1) {\n $('<li class=\"temp_li\"><a >...</a></li>').insertAfter('#custom_page_' + PublicPrivateSeparator + '_1');\n }\n\n var rango_fin = activepage + 5;\n for (var i = activepage; i < rango_fin; i++) {\n $('#custom_page_' + PublicPrivateSeparator + '_' + i).show();\n }\n if (rango_fin < PageCount) {\n $('<li class=\"temp_li\"><a >...</a></li>').insertBefore('#custom_page_' + PublicPrivateSeparator + '_' + PageCount);\n }\n $('#custom_page_' + PublicPrivateSeparator + '_' + PageCount).show();\n\n $('.custompager_' + PublicPrivateSeparator).removeClass(\"active\");\n $('#custom_page_' + PublicPrivateSeparator + '_' + activepage).addClass(\"active\");\n }\n function ChangeStatus(NewStatus, RequestResponsibleID) {\n var RequestIDs = [];\n var SingleRequestID = $(\"#Mo_AssRes_RequestID\").val();\n if (SingleRequestID != null && SingleRequestID != \"\" && SingleRequestID != \"0\") {\n RequestIDs.push($(\"#Mo_AssRes_RequestID\").val());\n } else {\n $(\".chk_all_request:checked\").each(function () {\n RequestIDs.push($(this).data(\"requestid\"));\n });\n }\n\n ShowProgressBar();\n $.post(\"/KioskRequestAdministrator/ChangeStatusRequest\", {\n RequestIDs: RequestIDs.join(),\n NewStatus: NewStatus,\n RequestResponsibleID: RequestResponsibleID,\n Comments: $('#txta_Comment').val()\n }).done(function (data) {\n notification(\"\", data.ErrorMessage, data.notifyType);\n\n if (data.ErrorCode == 0) {\n if (NewStatus == \"Assigned\") {\n $(\"#mo_AssignRequest\").modal(\"toggle\");\n } else {\n $(\"#mo_RequestStatusChange\").modal(\"toggle\");\n }\n\n SearchRequestData();\n }\n\n }).fail(function (xhr, textStatus, error) {\n notification(\"\", error.message, \"error\");\n }).always(function () {\n HideProgressBar();\n });\n\n }\n function ValidateSelectedRequisitions() {\n var RequestIDs = [];\n var ReturnValue = true;\n\n $(\".chk_all_request:checked\").each(function () {\n RequestIDs.push($(this).data(\"requestid\"));\n });\n if (RequestIDs.length == 0) {\n ReturnValue = false;\n }\n\n return ReturnValue;\n }\n function SearchRequestData() {\n //variables\n var RequestTypeIDs = $(\"#ddl_RequestTypes\").val();\n var RequestStatusIDs = $(\"#ddl_RequestStatus\").val();\n var DepartmentIDs = $(\"#ddl_RequestDepartment\").val();\n var StartDate = $(\"#txt_RequestStartDate\").val();\n var EndDate = $(\"#txt_RequestEndDate\").val();\n var RequestResponsible = $(\"#txt_Responsible\").val();\n var FacilityIDs = $(\"#ddl_UserFacilities\").val();\n var ShiftIDs = $(\"#ddl_ShiftsList\").val();\n\n //validaciones\n if (!($(\"#checkbox-filter-date\").is(\":checked\"))) {\n StartDate = null;\n EndDate = null;\n }\n if (RequestTypeIDs != null) {\n RequestTypeIDs = $(\"#ddl_RequestTypes\").val().join();\n }\n if (RequestStatusIDs != null) {\n RequestStatusIDs = $(\"#ddl_RequestStatus\").val().join();\n }\n\n if (DepartmentIDs != null) {\n DepartmentIDs = $(\"#ddl_RequestDepartment\").val();\n }\n\n if (FacilityIDs != null) {\n FacilityIDs = $(\"#ddl_UserFacilities\").val().join(',');\n }\n\n if (FacilityIDs == null) {\n FacilityIDs = \"\";\n }\n\n if (ShiftIDs != null) {\n ShiftIDs = $(\"#ddl_ShiftsList\").val().join(',');\n }\n\n if (ShiftIDs == null) {\n ShiftIDs = \"\";\n }\n\n ShowProgressBar();\n $.get(\"/KioskRequestAdministrator/SearchRequestData\", {\n RequestNumber: $(\"#txt_RequestNumber\").val(),\n RequestTypeIDs: RequestTypeIDs,\n RequestStatusIDs: RequestStatusIDs,\n StartDate: StartDate,\n EndDate: EndDate,\n DepartmentIDs: DepartmentIDs,\n EmployeeInfo: $(\"#txt_RequestEmployee\").val(),\n RequestDescription: $(\"#txt_RequestDescription\").val(),\n RequestResponsible: RequestResponsible,\n FacilityIDs: FacilityIDs,\n ShiftIDs: ShiftIDs\n }).done(function (data) {\n $('#div_RequestList').html(data);\n RegisterPluginDataTable(100);\n\n $(\".request_row\").each(function () {\n if ($(this).data(\"requestnumber\") == $(\"#txt_RequestNumber\").val()) {\n $(this).find(\".details-control\").click();\n }\n });\n }).fail(function (xhr, textStatus, error) {\n notification(\"\", error.message, \"error\");\n }).always(function () {\n HideProgressBar();\n });\n }\n\n function PrepareMultipleList(selector, SpecialOptionsToSelect) {\n var PrepareMultipleSelected = \"\";\n if (SpecialOptionsToSelect == \"All\") {\n $(selector + \" option\").each(function (k, v) {\n $(this).attr(\"selected\", true);\n $(this).addClass(\"selected\");\n $(this).selectpicker(\"refresh\");\n PrepareMultipleSelected += \", \" + $(this).text();\n });\n } else {\n //Para que esta parte funcione, se uso una lista normal para usar el ValueID de los catalogos\n $(selector + \" option\").each(function (k, v) {\n if (SpecialOptionsToSelect.includes($(this).data(\"valueid\"))) {\n $(this).attr(\"selected\", true);\n $(this).addClass(\"selected\");\n $(this).selectpicker(\"refresh\");\n PrepareMultipleSelected += \", \" + $(this).text();\n }\n });\n }\n PrepareMultipleSelected = PrepareMultipleSelected.substr(2, PrepareMultipleSelected.length);\n $(selector).attr(\"title\", PrepareMultipleSelected);\n $(selector).selectpicker(\"refresh\");\n }\n function RequestStatusChange(StatusName, RequestNumber, AlertText, StatusTypeChange, RequestID) {\n var IsValid = false;\n if (RequestNumber != null) {\n IsValid = true\n } else {\n IsValid = ValidateSelectedRequisitions();\n }\n\n if (IsValid) {\n var RequestNumbers = \"\";\n if (RequestNumber == null) {\n $(\".chk_all_request:checked\").each(function () {\n RequestNumbers += \", \" + $(this).closest(\"tr\").data(\"requestnumber\");\n });\n RequestNumbers = RequestNumbers.substring(2, RequestNumbers.length);\n } else {\n RequestNumbers = RequestNumber\n }\n\n ShowProgressBar();\n $.get(\"/KioskRequestAdministrator/GetRequestStatusChangeModal\", {\n StatusTypeChange: StatusTypeChange,\n RequestID: RequestID\n }).done(function (data) {\n $(\"#root_modal\").html(data);\n $(\"#mo_RequestStatusChange\").modal(\"show\");\n\n $(\"#ttl_StatusChangeTitle\").text(StatusName);\n $(\"#span_RequestNumbers\").text(RequestNumbers);\n\n $(\"#span_AlertText\").text(AlertText);\n\n HideProgressBar();\n }).fail(function (xhr, textStatus, error) {\n notification(\"\", error.message, \"error\");\n }).always(function () {\n HideProgressBar();\n });\n } else {\n notification(\"\", LangResources.msg_RequisitionMandatory, \"_ntf\");\n }\n }\n\n //Date Picker\n $('.datepicker-demo').datepicker({\n autoclose: true,\n format: 'yyyy-mm-dd',\n language: LangResources.culture\n });\n //Initialize\n $(\"select\").selectpicker();\n $(\"#ddl_UserFacilities\").selectpicker('selectAll');\n $(\"#ddl_ShiftsList\").selectpicker('selectAll');\n //ShowHidePagesRequests(1, \"public\");\n $(\"#tab_PublicRequestsList\").addClass(\"active\");\n $(\".customdatepicker\").datepicker({ format: 'yyyy-mm-dd' });\n $(\"#checkbox-filter-date\").iCheck();\n PrepareMultipleList(\"#ddl_RequestTypes\", \"All\");\n PrepareMultipleList(\"#ddl_RequestStatus\", StatusToSelect);\n EnableDateFilterRequests();\n $(\"#request_count\").text($(\".notification_count\").length);\n\n if ($(\"#PostedRequestNumber\").val() != null) {\n $(\"#txt_RequestNumber\").val($(\"#PostedRequestNumber\").val());\n $(\"#pnlRequestFilters\").css(\"display\", \"none\");\n }\n SearchRequestData();\n\n //Events\n $(document).on(\"ifChanged\", \".check-range-date\", function (e) {\n e.stopImmediatePropagation();\n EnableDateFilterRequests();\n });\n\n $(document).on(\"click\", \"#btn_RequestSearch\", function (e) {\n e.stopImmediatePropagation();\n SearchRequestData();\n });\n\n $(document).on(\"click\", \".view-request\", function (e) {\n e.stopImmediatePropagation();\n ShowProgressBar();\n $.get(\"/KioskRequestAdministrator/GetViewRequestModal\", {\n RequestID: $(this).data(\"requestid\")\n }).done(function (data) {\n $(\"#root_modal\").html(data);\n $(\"#mo_RequestView\").modal(\"show\");\n HideProgressBar();\n }).fail(function (xhr, textStatus, error) {\n notification(\"\", error.message, \"error\");\n }).always(function () {\n HideProgressBar();\n });\n });\n\n $(document).on(\"change\", \".RequestFilters\", function (e) {\n e.stopImmediatePropagation();\n $(\"#div_RequestList\").html(\"\");\n });\n\n $(document).on(\"keydown\", \".RequestFilters\", function (e) {\n e.stopImmediatePropagation();\n $(\"#div_RequestList\").html(\"\");\n });\n\n $(document).on(\"change\", \".chk_all_requests\", function (e) {\n e.stopImmediatePropagation();\n if ($(this).is(\":checked\")) {\n $(\".chk_all_request\").prop('checked', true);\n } else {\n $(\".chk_all_request\").prop('checked', false);\n }\n });\n\n\n //Begin: Eventos para cambios de status por lotes\n\n $(document).on(\"click\", \"#btn_AssignRequest\", function (e) {\n e.stopImmediatePropagation();\n\n if (ValidateSelectedRequisitions()) {\n var RequestIDs = \"\"\n $(\".chk_all_request:checked\").each(function () {\n RequestIDs += \", \" + $(this).data(\"requestnumber\");\n });\n RequestIDs = RequestIDs.substr(2, RequestIDs.length);\n\n ShowProgressBar();\n $.get(\"/KioskRequestAdministrator/GetAssignResponsibleModal\", {\n\n }).done(function (data) {\n $(\"#root_modal\").html(data);\n $(\"#ddl_ResponsiblesList\").selectpicker();\n $(\"#mo_AssignRequest\").modal(\"show\");\n //$(\"#txt_AssignResponsible\").focus();\n $(\"#span_RequestNumbers\").text(RequestIDs);\n //AutoCompleteDrop();\n HideProgressBar();\n }).fail(function (xhr, textStatus, error) {\n notification(\"\", error.message, \"error\");\n }).always(function () {\n HideProgressBar();\n });\n } else {\n notification(\"\", LangResources.msg_RequisitionMandatory, \"_ntf\");\n }\n\n });\n\n $(document).on(\"click\", \"#btn_MarkDoneRequest\", function (e) {\n e.stopImmediatePropagation();\n RequestStatusChange(LangResources.lbl_MarkDone, null, null, \"MarkDone\");\n });\n\n $(document).on(\"click\", \"#btn_CancelRequest\", function (e) {\n e.stopImmediatePropagation();\n RequestStatusChange(LangResources.lbl_CancelRequest, null, LangResources.lbl_CancelRequestAlertText, \"Cancel\");\n });\n\n $(document).on(\"click\", \"#btn_CloseRequest\", function (e) {\n e.stopImmediatePropagation();\n RequestStatusChange(LangResources.btn_CloseRequest, null, null, \"Close\");\n });\n\n $(document).on(\"click\", \"#btn_RejectRequest\", function (e) {\n e.stopImmediatePropagation();\n RequestStatusChange(LangResources.lbl_RejectRequest, null, LangResources.lbl_RejectRequestAlertText, \"Reject\");\n });\n\n $(document).on(\"click\", \"#btn_ReopenRequest\", function (e) {\n e.stopImmediatePropagation();\n RequestStatusChange(LangResources.lbl_ReOpenRequest, null, LangResources.lbl_ReOpenRequestAlertText, \"ReOpen\");\n });\n\n $(document).on(\"click\", \"#btn_SaveAssignResponsible\", function (e) {\n e.stopImmediatePropagation();\n SetConfirmBoxAction(function () {\n var idAsigned = $(\"#txt_AssignResponsible option:selected\").val();\n ChangeStatus(\"Assigned\", idAsigned);\n }, LangResources.msg_ConfirmMarkRequestAssign);\n });\n\n //End: Eventos para cambios de status por lotes\n\n\n\n\n //Guardar cambios de estado en requisiciones\n $(document).on(\"click\", \"#btn_SaveRequisitionNewStatus\", function (e) {\n e.stopImmediatePropagation();\n var WarningMessage = $(this).data(\"warningmessage\");\n var StatusType = $(this).data(\"statustype\");\n\n SetConfirmBoxAction(function () {\n ChangeStatus(StatusType, \"\");\n }, WarningMessage);\n });\n\n //Paginado\n $(document).on(\"click\", \".custompager\", function (e) {\n e.stopImmediatePropagation();\n SearchRequestData();\n });\n\n\n\n //Begin: Eventos para cambios de status individuales\n\n $(document).on(\"click\", \"#btn_CloseSinglePublicRequestView\", function (e) {\n e.stopImmediatePropagation();\n $(\"#mo_RequestView\").modal(\"toggle\");\n });\n\n $(document).on(\"click\", \".btn_TblAssignResponsible\", function (e) {\n e.stopImmediatePropagation();\n var RequestID = $(this).data(\"requestid\");\n var RequestNumber = $(this).closest(\"tr\").data(\"requestnumber\");\n\n ShowProgressBar();\n $.get(\"/KioskRequestAdministrator/GetAssignResponsibleModal\", {\n RequestID: RequestID\n }).done(function (data) {\n\n $(\"#root_modal\").html(data);\n $(\"#ddl_ResponsiblesList\").selectpicker();\n $(\"#mo_AssignRequest\").modal(\"show\");\n\n //$(\"#txt_AssignResponsible\").focus();\n $(\"#Mo_AssRes_RequestID\").val(RequestID);\n $(\"#span_RequestNumbers\").text(RequestNumber);\n //AutoCompleteDrop();\n //document.getElementsByName(\"Mo_AssRes_RequestID\")[0].value = RequestID\n\n HideProgressBar();\n }).fail(function (xhr, textStatus, error) {\n notification(\"\", error.message, \"error\");\n }).always(function () {\n HideProgressBar();\n });\n });\n\n $(document).on(\"click\", \".btn_TblCancelRequest\", function (e) {\n e.stopImmediatePropagation();\n var RequestNumber = $(this).closest(\"tr\").data(\"requestnumber\");\n var RequestID = $(this).closest(\"tr\").data(\"requestid\");\n RequestStatusChange(LangResources.lbl_CancelRequest, RequestNumber, LangResources.lbl_CancelRequestAlertText, \"Cancel\", RequestID);\n });\n\n $(document).on(\"click\", \".btn_TblRejectRequest\", function (e) {\n e.stopImmediatePropagation();\n var RequestNumber = $(this).closest(\"tr\").data(\"requestnumber\");\n var RequestID = $(this).closest(\"tr\").data(\"requestid\");\n RequestStatusChange(LangResources.lbl_RejectRequest, RequestNumber, LangResources.lbl_RejectRequestAlertText, \"Reject\", RequestID);\n });\n\n $(document).on(\"click\", \".btn_TblMarkDoneRequest\", function (e) {\n e.stopImmediatePropagation();\n var RequestNumber = $(this).closest(\"tr\").data(\"requestnumber\");\n var RequestID = $(this).closest(\"tr\").data(\"requestid\");\n RequestStatusChange(LangResources.lbl_MarkDone, RequestNumber, null, \"MarkDone\", RequestID);\n\n });\n\n $(document).on(\"click\", \".btn_TblReOpen\", function (e) {\n e.stopImmediatePropagation();\n var RequestNumber = $(this).closest(\"tr\").data(\"requestnumber\");\n var RequestID = $(this).closest(\"tr\").data(\"requestid\");\n RequestStatusChange(LangResources.lbl_ReOpenRequest, RequestNumber, LangResources.lbl_ReOpenRequestAlertText, \"ReOpen\", RequestID);\n\n });\n\n $(document).on(\"click\", \".btn_TblClose\", function (e) {\n e.stopImmediatePropagation();\n var RequestNumber = $(this).closest(\"tr\").data(\"requestnumber\");\n var RequestID = $(this).closest(\"tr\").data(\"requestid\");\n RequestStatusChange(LangResources.lbl_CloseRequest, RequestNumber, LangResources.lbl_RejectRequestAlertText, \"Close\", RequestID);\n\n });\n //End: Eventos para cambios de status individuales\n\n\n\n $(\"#ddl_RequestStatus\").change(function () {\n if ($(\"#ddl_RequestStatus option:selected\").length == 0) {\n $(\"#ddl_RequestStatus\").attr(\"title\", \"\");\n $(\"#ddl_RequestStatus\").selectpicker(\"refresh\");\n }\n });\n\n $(\"#ddl_RequestTypes\").change(function () {\n if ($(\"#ddl_RequestTypes option:selected\").length == 0) {\n $(\"#ddl_RequestTypes\").attr(\"title\", \"\");\n $(\"#ddl_RequestTypes\").selectpicker(\"refresh\");\n }\n });\n\n\n\n //expandir detalles con plugin DataTable\n $(document).on('click', 'td.details-control', function (e) {\n e.stopImmediatePropagation();\n\n var tr = $(this).closest('tr');\n\n if (tr.hasClass(\"shown\")) {\n $('div.slider', tr.next()).slideUp(function () {\n tr.next().remove();\n tr.removeClass('shown');\n });\n } else {\n\n var RequestID = tr.data(\"requestid\");\n\n ShowProgressBar();\n // abrir detalles y devolver detalles de una llamada ajax\n $.get(\"/HR/KioskRequestAdministrator/GetRequestLog\", {\n RequestID\n }).done(function (data) {\n tr.after('');\n tr.after('<tr><td colspan=\"13\" class=\"padding-0\">' + data + '</td></tr>');\n tr.addClass('shown');\n $('div.slider', tr.next()).slideDown();\n HideProgressBar();\n });\n }\n });\n\n $(document).on('click', \".btn-read-notify\", function (e) {\n e.stopImmediatePropagation();\n var button = $(this);\n var RequestNotificationIDs = \"\";\n $(\".notification_count\").each(function () {\n RequestNotificationIDs += \", \" + $(this).data(\"requestnotificationid\");\n });\n\n RequestNotificationIDs = RequestNotificationIDs.substr(2, RequestNotificationIDs.length);\n $.post(\"/KioskRequestAdministrator/SetUserNotificationsReaded\", {\n RequestNotificationIDs: RequestNotificationIDs\n }).done(function (data) {\n $(\"#request_count\").text(\"0\");\n }).fail(function (xhr, textStatus, error) {\n notification(\"\", error.message, \"error\");\n }).always(function () {\n //HideProgressBar();\n });\n });\n\n $(document).on(\"click\", \"#btnSearchUser\", function (e) {\n e.stopImmediatePropagation();\n ShowProgressBar();\n $.get('/HR/KioskRequestAdministrator/SearchADUsers', {\n UserText: $('#txtSearchUser').val()\n }).done(function (data) {\n $(\"#div_ResponsiblesResultTable\").html(data.View);\n }).fail(function (xhr, textStatus, error) {\n notification(\"\", error.message, \"error\");\n }).always(function () {\n HideProgressBar();\n });\n });\n\n $(document).on('click', '.addUserAccount', function (e) {\n e.stopImmediatePropagation();\n var info = $(this);\n var User = {\n UserAccountID: info.data(\"useraccountid\"),\n FirstName: info.data(\"firstname\"),\n eMail: info.data(\"email\")\n }\n\n ShowProgressBar();\n $.post('/HR/KioskRequestAdministrator/AddResponsibleAccount', {\n User: User\n }).done(function (data) {\n notification(\"\", data.ErrorMessage, data.notifyType);\n\n if (data.ErrorCode == 0) {\n LoadResponsibles(data.ID);\n }\n }).fail(function (xhr, textStatus, error) {\n notification(\"\", error.message, \"error\");\n }).always(function () {\n HideProgressBar();\n });\n });\n\n\n function AutoCompleteDrop() {\n ShowProgressBar();\n\n $.get(\"/KioskRequestAdministrator/FilterResponsible\", {\n SearchUserInfo: $(\"#txt_AssignResponsible\").val()\n }).done(function (data) {\n console.log(data);\n $(\"#txt_AssignResponsible\").empty();\n $.each(data.ResponsiblesList, function (k, v) {\n $(\"#txt_AssignResponsible\").append(\n \"<option id=\" + v.ID + \" value=\" + v.ID + \" data-name=\" + v.FullName + \" data-empnumber=\" + v.EmployeeNumber + \" data-department=\" + v.DepartmentName + \">\" + v.FullName + \"</option>\"\n );\n idSelectedAsign = v.ID;\n //$(\"#datalist-responsibles\").append($(\"<option>\").attr('value', v.FullName).attr(\"data-id\", v.UserID));\n\n });\n $(\"#txt_AssignResponsible\").selectpicker();\n }).fail(function (xhr, textStatus, error) {\n notification(\"\", error.message, \"error\");\n }).always(function () {\n HideProgressBar();\n });\n\n }\n\n function LoadResponsibles(IDToSelect) {\n $.get(\"/KioskRequestAdministrator/GetRequestResponsibles\", {\n UserText: null\n }).done(function (data) {\n $(\"#txt_AssignResponsible\").empty();\n $.each(data.RequestResponsiblesList, function (k, v) {\n $(\"#txt_AssignResponsible\").append('<option value=\"' + v.ID + '\">' + v.FullName + '</option>')\n });\n\n if (IDToSelect != null) {\n $(\"#txt_AssignResponsible\").val(IDToSelect);\n $(\"#txt_AssignResponsible\").selectpicker(\"refresh\");\n }\n LoadUserInfo();\n $(\"#mo_AddNewUser\").modal(\"toggle\");\n });\n }\n\n function LoadUserInfo() {\n var option = $(\"#txt_AssignResponsible option:selected\");\n var Department = option.data(\"department\");\n var EmpNumber = option.data(\"employeenumber\");\n\n $(\"#Mo_ResponsibleName\").text(option.text());\n if (Department != null && Department != \"\") {\n $(\"#Mo_ResponsibleDepartment\").text(Department);\n }\n if (EmpNumber != null && EmpNumber != \"\") {\n $(\"#Mo_ResponsibleNum\").text(EmpNumber);\n }\n }\n\n $(document).on(\"keyup\", \"#txt_Responsible\", function (e) {\n e.stopImmediatePropagation();\n var long = $(\"#txt_Responsible\").val().length;\n if (long > 1) {\n $.get(\"/KioskRequestAdministrator/GetRequestResponsibles\", {\n UserText: $(\"#txt_Responsible\").val()\n }).done(function (data) {\n $(\"#dtl_RequestResponsibles\").empty();\n $.each(data.RequestResponsiblesList, function (k, v) {\n $(\"#dtl_RequestResponsibles\").append('<option>' + v.FullName + '</option>')\n });\n }).fail(function (xhr, textStatus, error) {\n notification(\"\", error.message, \"error\");\n });\n }\n });\n\n $(document).on(\"keydown\", \"#txt_RequestNumber,#txt_Responsible\", function (e) {\n e.stopImmediatePropagation();\n if (e.keyCode == 13) {\n return false;\n }\n })\n\n $(document).on(\"keyup\", \"#txt_RequestNumber\", function (e) {\n e.stopImmediatePropagation();\n var long = $(\"#txt_RequestNumber\").val().length;\n if (long > 1) {\n $.get(\"/KioskRequestAdministrator/GetRequestNumbers\", {\n RequestNumber: $(\"#txt_RequestNumber\").val()\n }).done(function (data) {\n $(\"#dtl_RequestNumbers\").empty();\n $.each(data.RequestNumbersList, function (k, v) {\n $(\"#dtl_RequestNumbers\").append('<option>' + v.RequestNumber + '</option>')\n });\n }).fail(function (xhr, textStatus, error) {\n notification(\"\", error.message, \"error\");\n });\n }\n });\n\n $(document).on(\"shown.bs.modal\", \"#mo_AssignRequest\", function (e) {\n $(\"#txta_Comment\").focus();\n $(\"#txta_Comment\").maxlength();\n $(\"#txt_AssignResponsible\").selectpicker();\n });\n\n //Add a New User\n $(document).on('change', '#txt_AssignResponsible', function (e) {\n e.stopImmediatePropagation();\n var option = $('#txt_AssignResponsible option:selected').val();\n if (option == \"new\") {\n ShowProgressBar();\n $.get(\"/KioskRequestAdministrator/GetAddUserModal\").done(function (data) {\n $(\"#div_add_new_user\").html(data);\n $(\".select\").selectpicker();\n $(\"#mo_AddNewUser\").modal(\"show\");\n $('#txt_AssignResponsible').val(0);\n $('#txt_AssignResponsible').selectpicker(\"refresh\");\n\n }).fail(function (xhr, textStatus, error) {\n notification(\"\", error.message, \"error\");\n }).always(function () {\n HideProgressBar();\n });\n } else {\n LoadUserInfo();\n }\n });\n\n $(document).on(\"click\", \"#btn_CloseAddUserModal\", function (e) {\n $(\"#mo_AddNewUser\").modal(\"toggle\");\n });\n\n $(document).on(\"click\", \"#btn_AddUser\", function (e) {\n var ProfileField = $('#ProfileID').val();\n var ProfileArrayID = \"\";\n\n if (ProfileField != null) {\n for (var i = 0; i < ProfileField.length; i++) {\n ProfileArrayID = ProfileField[i] + \",\" + ProfileArrayID;\n }\n }\n\n ShowProgressBar();\n $.post(\"/Users/Create\", {\n UserAccountID: $(\"#UserAccountID\").val(),\n eMail: $(\"#eMail\").val(),\n EmployeeNumber: $(\"#EmployeeNumber\").val(),\n FirstName: $(\"#FirstName\").val(),\n LastName: $(\"#LastName\").val(),\n ProfileID: $(\"#ProfileID\").val(),\n DepartmentID: $(\"#DepartmentID\").val(),\n ShiftID: $(\"#ShiftID\").val(),\n DefaultCultureID: $(\"#DefaultCultureID\").val(),\n ProfileArrayID: ProfileArrayID\n }).done(function (data) {\n if (data.ErrorCode == 0) {\n LoadResponsibles(data.ID);\n }\n }).fail(function (xhr, textStatus, error) {\n notification(\"\", error.message, \"error\");\n }).always(function () {\n HideProgressBar();\n });\n });\n\n}", "function BaixarOrdemInternet_elementsExtraJS() {\n // screen (BaixarOrdemInternet) extra code\n\n }", "function actualPlan()\r\n{\r\n\tvar url = \"actual\";\r\n\tvar htmlAreaObj = _getWorkAreaDefaultObj();\r\n\tvar objAjax = htmlAreaObj.getHTMLAjax();\r\n\tvar objHTMLData = htmlAreaObj.getHTMLDataObj();\r\n\r\n\tsectionName = objAjax.getDivSectionId();\r\n\t//alert(\"sectionName \" + sectionName);\r\n\tif(objAjax && objHTMLData)\r\n\t{\r\n\t if(!isValidRecord(true))\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tbShowMsg = true;\r\n\t Main.loadWorkArea(\"techspecevents.do\", url);\t \r\n\t}\r\n}", "function showMainDiv() {\n\tvar requestDiv = document.getElementById('requestDiv');\n\tvar mainDiv = document.getElementById('mainDiv');\n\trequestDiv.style.display = 'none';\n\tmainDiv.style.display = 'block';\n}", "function mobile_newlayout() {\r\n\r\n /* get url string */\r\n var urlarr = url.split('/');\r\n // console.log(urlarr);\r\n /* check if url have mobile and have 4 element data then redirect to the string link */\r\n if ((urlarr[3].match(\"mobile\") !== null) && (urlarr.length == 4)) {\r\n location.href = \"/commerce/buyside/commerce_manager.jsp?bm_cm_process_id=36244034&from_hp=true&_bm_trail_refresh_=true\";\r\n return false;\r\n }\r\n\r\n /* get title text */\r\n pagetitle = $('title').text().toLowerCase();\r\n console.log(pagetitle);\r\n\r\n /*\r\n $('.tab-link').bind(\"tap\", function() {\r\n console.log($(this));\r\n });*/\r\n /* if if pagetitle is empty then call functoon mobile_newlayout() */\r\n\r\n /* comment this function for showing page without checkin page title */\r\n /*if (pagetitle == '') {\r\n setTimeout(function() {\r\n mobile_newlayout();\r\n }, 2000);\r\n\r\n return;\r\n }*/\r\n\r\n /* hide element if jg-overlay */\r\n $('#jg-overlay').hide();\r\n\r\n /*\r\n Start : 4 Mei 2017\r\n Task : Debug order page + create filter page mobile with URL.\r\n Page : Global mobile page\r\n File Location : $BASE_PATH$/image/javascript/js-ezrx.js\r\n Layout : Mobile\r\n\r\n if pagetile not null call default function\r\n */\r\n\r\n $('html').addClass('jg-mobilelayout');\r\n if (pagetitle != '') {\r\n\r\n /* add class jg-mobilelayout */\r\n if (pagetitle == 'login') {\r\n /* if pagetitle login then call function mobile_loginpage */\r\n // mobile_loginpage();\r\n // transform_loginpage();\r\n } else {\r\n /* if pagetitle commerce then call transform_mainlayout and transform_orderspage */\r\n clearStorageOrderItem();\r\n if (pagetitle == 'commerce management') {\r\n console.log('commerce management');\r\n localStorage.removeItem(\"frequentlyAccessedCustomers_t\"); \r\n $('html').addClass('jg-mobilelayout');\r\n transform_mainlayout();\r\n transform_orderspage();\r\n mobile_commerce_management();\r\n mobile_modifyMenu();\r\n $(\".topMenuModified\").css(\"float\", \"none\");\r\n $(\".jg-item-mainmenu\").css(\"width\", \"70px\");\r\n $(\".jg-box-topbar\").append(\"<div style='float:right; font-size: 14px; padding: 20px;' >\" + window._BM_USER_LOGIN + \"</div>\");\r\n if(getQueryVariableUrl(\"flag\") == \"rightnow\"){\r\n window.sessionStorage.setItem(\"flag\", \"rightnow\");\r\n }\r\n\r\n var flag = window.sessionStorage.getItem(\"flag\");\r\n if(flag == \"rightnow\"){\r\n dss_view();\r\n }\r\n\r\n /*\r\n Start : 12 Juli 2018\r\n Task : New Order & Copy Order action to be hidden For Credit Control Rep.\r\n Page : Commerce Management\r\n File Location : $BASE_PATH$/image/javascript/js-ezrx.js\r\n Layout : Mobile\r\n */\r\n\r\n var hideMenuForCreditControlUser = function(){\r\n if ($(\"table[onclick*='newTransaction']\").length == 0) {\r\n $(\".jg-linkbtn.new_order\").hide();\r\n $(\".jg-linkbtn.copy_order\").hide();\r\n } \r\n }\r\n hideMenuForCreditControlUser();\r\n\r\n /*\r\n Start : 12 Juli 2018\r\n Task : New Order & Copy Order action to be hidden For Credit Control Rep.\r\n Page : Commerce Management\r\n File Location : $BASE_PATH$/image/javascript/js-ezrx.js\r\n Layout : Mobile\r\n */\r\n\r\n } else if (pagetitle == \"zuellig pharma products\" || pagetitle == \"zuellig pharma order processData\") {\r\n console.log('zuellig pharma products');\r\n } else if (pagetitle == 'zuellig pharma order process') {\r\n console.log('zuellig pharma order process');\r\n } else if (pagetitle == \"my profile\"){\r\n /* \r\n Created By :- Created By Zainal Arifin, Date : 08-03-2018\r\n Task :- Restyling Profile Page\r\n Page :- Profile Page\r\n File Location :- $BASE_PATH$/javascript/js-ezrx.js\r\n Layout :- Desktop\r\n */\r\n // Remove Width 100% on class .jg-mobilelayout .form-input\r\n $(\".jg-mobilelayout .form-input\").attr(\"style\", \"width:auto!important;\");\r\n // Give Padding\r\n $(\"table.dashed-table\").find(\"td\").map(function(index, data){\r\n $(data).css(\"padding\", \"5px 15px 5px 20px\");\r\n });\r\n // Give 100% width in every Input and Select\r\n $(\"input.form-input, select.form-input\").css(\"width\", \"100%\");\r\n // give text align center for checkbox label\r\n $(\"input[type='checkbox'].form-input\").parent().css(\"text-align\",\"center\");\r\n\r\n /* \r\n Created By :- Created By Zainal Arifin, Date : 08-03-2018\r\n Task :- Restyling Profile Page\r\n Page :- Profile Page\r\n File Location :- $BASE_PATH$/javascript/js-ezrx.js\r\n Layout :- Desktop\r\n */\r\n } else if (pagetitle == \"change password\"){\r\n /* \r\n Created By :- Created By Zainal Arifin, Date : 27 April 2018\r\n Task :- SG-40 Change Password for mobile\r\n Page :- Model Configuration\r\n File Location :- $BASE_PATH$/javascript/js-ezrx-tw.js\r\n Layout :- Desktop\r\n */\r\n\r\n console.log(\"change password script\");\r\n\r\n var readyChangePasswordPage = function(){\r\n setTimeout(function(){\r\n if (isLoadingDone()) {\r\n $(\"h1.ui-title\").css({ \"background\": \"#00575d\", \"color\": \"#ffffff\" });\r\n $(\"#main-content\").attr(\"style\", \"margin-top: 70px!important\");\r\n $(\"#change-pw-form\").css(\"height\", \"550px\");\r\n $(\"#errors\").after($(\"<div id='error_js' style='width: 41%;margin: auto auto 10px;' ></div>\"));\r\n $(\"#submit\").attr(\"style\", \"background: #005E63!important;color: #ffffff;padding: 5px 10px;font-size: 20px;\");\r\n var html_password_restriction = '<fieldset style=\"margin-left: 5px;margin-top: 100px;position:relative;border-top-width: 2px;border-right-width: 2px;border-bottom-width: 2px;border-left-width: 2px;border-top-style: groove;border-right-style: groove;border-bottom-style: groove;border-left-style: groove;padding: 10px;\">\\\r\n <legend class=\"form-label\" style=\"font-weight: bold;\" >&nbsp;Password Restrictions&nbsp;</legend>\\\r\n Password must be between 8 to 30 characters long and it should start with a letter. Password must have at least one upper case letter, at least one number and at least one special character.\\\r\n </fieldset>';\r\n $(\"#submit\").after(html_password_restriction);\r\n\r\n $(\"#change-pw-form\").on(\"submit\", function (e) {\r\n // e.preventDefault();\r\n var oldPassword = $(\"input[name='_oldPassword']\").val();\r\n var newPassword = $(\"input[name='_newPassword']\").val();\r\n var newPassword2 = $(\"input[name='_retypedPassword']\").val();\r\n var divError = $(\"#error_js\");\r\n $(divError).html(\"\");\r\n if (newPassword.length > 0 && oldPassword.length > 0) {\r\n\r\n if (newPassword == newPassword2) {\r\n if (newPassword.length >= 8 && newPassword.length <= 30) {\r\n if (/^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[!@#$%^&*()-_=+])[A-Za-z\\d!@#$%^&*()-_=+]{8,30}$/.test(newPassword) == false) {\r\n console.log(\"Password must have at least one upper case letter, at least one number and at least one special character.\");\r\n $(divError).append(\"<div class='error'>Password must have at least one upper case letter, at least one number and at least one special character.</div>\");\r\n } else {\r\n console.log(\"Submitted to system\");\r\n return true;\r\n }\r\n } else {\r\n console.log(\"Password must be between 8 and 30 characters.\");\r\n $(divError).append(\"<div class='error'>Password must be between 8 and 30 characters.</div>\");\r\n }\r\n }\r\n\r\n /* if (newPassword != newPassword2) {\r\n console.log(\"New Password and Retype New Password not match\");\r\n $(divError).append(\"<div class='error'>New Password and Retype New Password not match</div>\");\r\n } else {\r\n \r\n } */\r\n }\r\n e.preventDefault();\r\n });\r\n } else {\r\n readyChangePasswordPage();\r\n }\r\n }, 500);\r\n }\r\n\r\n readyChangePasswordPage();\r\n\r\n /* \r\n Created By :- Created By Zainal Arifin, Date : 27 April 2018\r\n Task :- SG-40 Change Password for mobile\r\n Page :- Model Configuration\r\n File Location :- $BASE_PATH$/javascript/js-ezrx-tw.js\r\n Layout :- Desktop\r\n */\r\n }\r\n\r\n mobile_adjustcontenttop();\r\n }\r\n\r\n } else {\r\n /* if oagetitle is null call custom filter from URL */\r\n /* create filterPage get last string of URL */\r\n var filterPage = urlarr[urlarr.length - 1];\r\n /* if filterPage contains with commerce */\r\n console.log('filterPage', filterPage);\r\n if ($(\"#line-item-grid\").length > 0 && filterPage.search(\"copy_processing.jsp\") == -1 ){\r\n filterPage = \"commerce\";\r\n\t\t\t}\r\n\t\t\tif($(\"#materialArrayset\").length > 0){\r\n\t\t\t\tfilterPage = \"config\";\r\n\t\t\t}\r\n\r\n if (filterPage.search(\"commerce\") != -1) {\r\n //[new] order & material page\r\n // var checkVariable = filterPage.split(\"?\");\r\n if ($(\"#tab-draftOrder\").exists()) {\r\n //[new] order\r\n console.log(\"New order\");\r\n \r\n var customer_selection = function(){\r\n mobile_orderpage();\r\n mobile_customerSearch();\r\n if ($('#frequentlyAccessedCustomers_t').length) {\r\n var customerDetails = $(\"#frequentlyAccessedCustomers_t\").val().replace(/~/gi, \"\");\r\n console.log(\"frequentlyAccessedCustomers_t is\", (customerDetails.length > 0) ? \"Not Empty\" : \"Empty\", \"The data is : \" + customerDetails); \r\n if (customerDetails.length > 0) {\r\n window.localStorage.setItem(\"frequentlyAccessedCustomers_t\", customerDetails);\r\n } else {\r\n customerDetails = (window.localStorage.getItem(\"frequentlyAccessedCustomers_t\") != null ? window.localStorage.getItem(\"frequentlyAccessedCustomers_t\") : \"\"); \r\n }\r\n $(\"#frequentlyAccessedCustomers_t\").val(\"\");\r\n if (customerDetails.length == 0) {\r\n return true;\r\n } else {\r\n mobile_topCustomerList(customerDetails);\r\n mobile_toggleTopCustomer();\r\n }\r\n }\r\n }\r\n\r\n $(\"body\").on(\"click touchend\",\"#tab-draftOrder\",function(e){\r\n function draftOrder(){\r\n setTimeout(function(){\r\n if( $(\".ui-loader.ui-corner-all\").css(\"display\") == \"none\" ){\r\n customer_selection();\r\n }else{\r\n draftOrder();\r\n }\r\n }, 1000);\r\n }\r\n draftOrder();\r\n });\r\n \r\n customer_selection();\r\n\r\n //VMLSINOZP-61 start\r\n //console.log('VMLSINOZP-61',1);\r\n //setTimeout(function(){\r\n console.log('VMLSINOZP-61',1);\r\n var _61 = setInterval(function(){\r\n console.log('VMLSINOZP-61',2);\r\n if(document.readyState === 'complete') {\r\n console.log('VMLSINOZP-61',3);\r\n //save_to_newuser();\r\n //document.addEventListener(\"DOMContentLoaded\", function(){\r\n console.log('VMLSINOZP-61',4);\r\n newCustId = sessionStorage.getItem('selectedCustShipID');\r\n console.log('newCustId',newCustId);\r\n clearInterval(_61);\r\n if(newCustId != \"null\" && newCustId != null){\r\n console.log('VMLSINOZP-61',5);\r\n //document.cookie = \"selectedCustShipID=\"+null;\r\n sessionStorage.setItem('selectedCustShipID', null);\r\n $(\"#selectedCustomerDetail\").val(newCustId);\r\n $(\"#customerMasterString_t\").val(\"\");\r\n setTimeout(function(){\r\n if($('#sticky-actions button.action-type-modify[data-properties*=\"36246153\"]').length>0){\r\n $('#sticky-actions button.action-type-modify[data-properties*=\"36246153\"]').click();\r\n console.log('VMLSINOZP-61','6-1');\r\n\r\n } else if($('#popup-moreBtns-popup ul.popup-list li:first-child').length>0) {\r\n $('#popup-moreBtns-popup ul.popup-list li:first-child').click();\r\n console.log('VMLSINOZP-61','6-2');\r\n\r\n }\r\n },1500);\r\n\r\n }\r\n //});\r\n }\r\n },500);\r\n function save_to_newuser(){\r\n newCustId = sessionStorage.getItem('selectedCustShipID');\r\n console.log('newCustId',newCustId);\r\n clearInterval(_61);\r\n if(newCustId !=\"null\" && newCustId != null ){\r\n console.log('VMLSINOZP-61',5);\r\n //document.cookie = \"selectedCustShipID=\"+null;\r\n sessionStorage.setItem('selectedCustShipID', null);\r\n $(\"#selectedCustomerDetail\").val(newCustId);\r\n $(\"#customerMasterString_t\").val(\"\");\r\n setTimeout(function(){\r\n if($('#sticky-actions button.action-type-modify[data-properties*=\"36246153\"]').length>0){\r\n $('#sticky-actions button.action-type-modify[data-properties*=\"36246153\"]').click();\r\n console.log('VMLSINOZP-61','6-1');\r\n\r\n } else if($('#popup-moreBtns-popup ul.popup-list li:first-child').length>0) {\r\n $('#popup-moreBtns-popup ul.popup-list li:first-child').click();\r\n console.log('VMLSINOZP-61','6-2');\r\n\r\n }\r\n },1000);\r\n\r\n }\r\n }\r\n //},1500);\r\n //VMLSINOZP-61 end\r\n\r\n } else {\r\n console.log(\"material page\");\r\n // material page.\r\n mobile_materialpage();\r\n mobile_materialSearch();\r\n\r\n\r\n var OverrideBonusQty = setInterval(findOverrideBonusQty, 1000);\r\n\r\n function findOverrideBonusQty() {\r\n\r\n if ($('.cell-overrideBonusQty .ui-flipswitch').length > 0) {\r\n $('.cell-overrideBonusQty .ui-flipswitch').each(function() {\r\n var $this = $(this);\r\n mobile_bonusQtyOverride($this);\r\n });\r\n\r\n $('.cell-overrideBonusQty .ui-flipswitch').on('click', function() {\r\n var $this = $(this);\r\n mobile_bonusQtyOverride($this);\r\n });\r\n clearInterval(OverrideBonusQty);\r\n }\r\n };\r\n\r\n\r\n\r\n mobile_actionButtonFavItem();\r\n }\r\n } else if (filterPage.search(\"config\") != -1) {\r\n console.log(' ====>>>> config page');\r\n\t\t\t\t\r\n\t\t\t\t/* replace messages on top table shopping cart */\r\n\t\t\t\t//$(\"#attribute-showDetailedView\").html(\"<div id='detailMessages' style=color:darkred;float:left;width:100%;margin-top:-10px;margin-bottom:10px;'>Please swipe to see additional details in the shopping cart</div>\");\r\n\t\t\t\t\r\n\t\t\t\t//$(\"#detailMessages\").css({\"color:darkred;float:left;width:100%;margin-top:4px;margin-bottom:4px;\"});\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n //* quantity color change on focus START*//\r\n textColorQty();\r\n\r\n //* quantity color change on focus END*//\r\n //**//\r\n // material page.\r\n setTimeout(function(){\t\t\t\t\t\r\n\t\t\t\t\ttextColorQty();\r\n\t\t\t\t\t// material page.\r\n\t\t\t\t\tmobile_materialpage();\r\n\t\t\t\t\tmobile_materialSearch();\r\n\t\t\t\t\tmobile_adjust_tooltip();\r\n\t\t\t\t\tmobile_pricingChange();\r\n\t\t\t\t\tmobile_onChangeUpdateMsg();\r\n\t\t\t\t\tmobile_shoppingCart_msg();\r\n\t\t\t\t\t//mobile_hide_unwanted_arrow();\r\n\t\t\t\t\t// mobile_customerSearch();\r\n\t\t\t\t}, 2000);\r\n\t\t\t\t\r\n\t\t\t\t$(\"body\").on(\"click touchend\",\".pagination .ui-radio\",function(e){\r\n\t\t\t\t\twaitUntilTableDataLoad();\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\t//checking with timeOut 500ms if load data table is done.\r\n function waitUntilTableDataLoad(){\r\n setTimeout(function(){\r\n if($('#jg-overlay').css(\"display\") == \"none\"){\r\n \r\n\t\t\t\t\t\t\ttextColorQty();\r\n\t\t\t\t\t\t\tmobile_qty_outofstock_color();\r\n\t\t\t\t\t\t\tmobile_adjust_tooltip();\r\n\t\t\t\t\t\t\tmobile_pricingChange();\r\n\t\t\t\t\t\t\tmobile_onChangeUpdateMsg();\r\n //re-assign listen touch pagination on mobile\r\n // listen_touch_pagination();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t/*setTimeout(function(){\r\n\t\t\t\t\t\t\t //re-styling when table changes page\r\n \t\t\t\t\t\t\tif($(\"#showDetailedView\").val() == \"false\" ){\r\n \t\t\t\t\t\t\t\t\r\n hide_detail_coloumn();\r\n \t\t\t\t\t\t\t}\r\n\r\n style_shoppingcart_table();\r\n\r\n\t\t\t\t\t\t\t}, 1000);*/\r\n }else{\r\n //recursive checking table has load data\r\n waitUntilTableDataLoad();\r\n }\r\n }, 1000);\r\n }\r\n \r\n /* function listen_touch_pagination(){\r\n //listen shopping chart changing page.\r\n console.log(\"Start listen touch pagination\");\r\n\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\t$(\".pagination\").find(\".ui-radio\").off();\r\n\t\t\t\t\t\t$(\".pagination\").find(\".ui-radio\").bind(\"click touchstart touchend\", function(){\r\n\t\t\t\t\t\t\tconsole.log(\"Change Page on table 1\");\r\n\t\t\t\t\t\t\twaitUntilTableDataLoad();\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}, 500);\r\n }\r\n\r\n var waitUntilPageLoad = function(){\r\n setTimeout(function(){\r\n \r\n if($('#jg-overlay').css(\"display\") == \"none\"){\r\n style_shoppingcart_table();\r\n setTimeout(function(){\r\n listen_touch_pagination();\r\n }, 500);\r\n }else{\r\n waitUntilPageLoad();\r\n }\r\n\r\n }, 500);\r\n }*/\r\n\t\t\t\t\r\n\t\t\t\t$(window).on(\"orientationchange\", function(){\r\n\t\t\t\t\twaitUntilTableDataLoad();\r\n\t\t\t\t});\r\n\r\n //waitUntilPageLoad();\r\n\r\n $(\"body\").on(\"click touchend\", \".button-save\", function(e) {\r\n e.preventDefault();\r\n console.log(\" ===>>> clicked on button-save\");\r\n var _needUpdate = $(\"input[name=_needUpdate]\").val();\r\n console.log(\" ===>>> clicked on button-save --> \", _needUpdate);\r\n if (_needUpdate == \"yes\") {\r\n $(\".updateMsg\").show();\r\n return false;\r\n } else {\r\n $(\".updateMsg\").hide();\r\n }\r\n });\r\n mobile_deleteLineItem();\r\n // Check if select any Item have bonus\r\n\r\n var OverrideBonusQty = setInterval(findOverrideBonusQty, 1000);\r\n\r\n function findOverrideBonusQty() {\r\n\r\n if ($('.cell-overrideBonusQty .ui-flipswitch').length > 0) {\r\n $('.cell-overrideBonusQty .ui-flipswitch').each(function() {\r\n var $this = $(this);\r\n mobile_bonusQtyOverride($this);\r\n });\r\n\r\n $('.cell-overrideBonusQty .ui-flipswitch').on('click', function() {\r\n var $this = $(this);\r\n mobile_bonusQtyOverride($this);\r\n });\r\n clearInterval(OverrideBonusQty);\r\n }\r\n };\r\n\r\n $('.sidebar-handle').on('click', function() {\r\n mobile_checkItemOnCart();\r\n });\r\n mobile_actionButtonFavItem();\r\n mobile_checkItemOnCart();\r\n mobile_qty_outofstock_color();\r\n mobile_overRidePriceRed();\r\n\r\n /*\r\n End : 27 Dec 2017\r\n Task : https://jira.uhub.biz/browse/VMLSINOZP-70 [[Desktop/Tablet]Auto Collapse of All Materials is not workin]\r\n Page : Material page / product page\r\n File Location : $BASE_PATH$/image/javascript/js-ezrx.js\r\n Layout : Mobile\r\n */\r\n var allMaterialState = localStorage.getItem('allMaterialsTabState');\r\n var allTopTenFavState = localStorage.getItem('topTenFavTab');\r\n var allFavCustItemState = localStorage.getItem('custFavItemTab');\r\n var allrecomItemState = localStorage.getItem('recomItemTab');\r\n\r\n console.log('allMaterialState', allMaterialState, 'allTopTenFavState', allTopTenFavState, 'allFavCustItemState', allFavCustItemState );\r\n\r\n if (allTopTenFavState == 'collapsed') {\r\n $('#attribute-pastOrders').parent().parent().addClass('ui-collapsible-content-collapsed');\r\n $('#attribute-pastOrders').parent().parent().prev().addClass('ui-collapsible-heading-collapsed');\r\n $('#attribute-pastOrders').parent().parent().prev().children().removeClass('ui-icon-minus').addClass('ui-icon-plus');\r\n $('#attribute-pastOrders').parent().parent().parent().addClass('ui-collapsible-collapsed');\r\n } else {\r\n $('#attribute-pastOrders').parent().parent().removeClass('ui-collapsible-content-collapsed');\r\n $('#attribute-pastOrders').parent().parent().prev().removeClass('ui-collapsible-heading-collapsed');\r\n $('#attribute-pastOrders').parent().parent().prev().children().removeClass('ui-icon-plus').addClass('ui-icon-minus');\r\n $('#attribute-pastOrders').parent().parent().parent().removeClass('ui-collapsible-collapsed');\r\n }\r\n\r\n if (allrecomItemState == 'collapsed') {\r\n $('#attribute-currentUserCompanyName').parent().parent().addClass('ui-collapsible-content-collapsed');\r\n $('#attribute-currentUserCompanyName').parent().parent().prev().addClass('ui-collapsible-heading-collapsed');\r\n $('#attribute-currentUserCompanyName').parent().parent().prev().children().removeClass('ui-icon-minus').addClass('ui-icon-plus');\r\n $('#attribute-currentUserCompanyName').parent().parent().parent().addClass('ui-collapsible-collapsed');\r\n } else {\r\n $('#attribute-currentUserCompanyName').parent().parent().removeClass('ui-collapsible-content-collapsed');\r\n $('#attribute-currentUserCompanyName').parent().parent().prev().removeClass('ui-collapsible-heading-collapsed');\r\n $('#attribute-currentUserCompanyName').parent().parent().prev().children().removeClass('ui-icon-plus').addClass('ui-icon-minus');\r\n $('#attribute-currentUserCompanyName').parent().parent().parent().removeClass('ui-collapsible-collapsed');\r\n }\r\n\r\n if (allFavCustItemState == 'collapsed') {\r\n $('#attribute-currentCustFav').parent().parent().addClass('ui-collapsible-content-collapsed');\r\n $('#attribute-currentCustFav').parent().parent().prev().addClass('ui-collapsible-heading-collapsed');\r\n $('#attribute-currentCustFav').parent().parent().prev().children().removeClass('ui-icon-minus').addClass('ui-icon-plus');\r\n $('#attribute-currentCustFav').parent().parent().parent().addClass('ui-collapsible-collapsed');\r\n } else {\r\n $('#attribute-currentCustFav').parent().parent().removeClass('ui-collapsible-content-collapsed');\r\n $('#attribute-currentCustFav').parent().parent().prev().removeClass('ui-collapsible-heading-collapsed');\r\n $('#attribute-currentCustFav').parent().parent().prev().children().removeClass('ui-icon-plus').addClass('ui-icon-minus');\r\n $('#attribute-currentCustFav').parent().parent().parent().removeClass('ui-collapsible-collapsed');\r\n }\r\n\t\t\t\t//commented by suresh as the all materials should be expanded always for mobile version\r\n\t\t\t\t// uncommented by pratap as per sakthi requirement that for mobile also it will colapse \r\n if (allMaterialState ==='collapsed') {\r\n console.log('collapse material', $('#attribute-materialSearch').parent().parent());\r\n $('#attribute-materialSearch').parent().parent().addClass('ui-collapsible-content-collapsed');\r\n $('#attribute-materialSearch').parent().parent().prev().addClass('ui-collapsible-heading-collapsed');\r\n $('#attribute-materialSearch').parent().parent().prev().children().removeClass('ui-icon-minus').addClass('ui-icon-plus');\r\n $('#attribute-materialSearch').parent().parent().parent().addClass('ui-collapsible-collapsed');\r\n } else {\r\n $('#attribute-materialSearch').parent().parent().removeClass('ui-collapsible-content-collapsed');\r\n $('#attribute-materialSearch').parent().parent().prev().removeClass('ui-collapsible-heading-collapsed');\r\n $('#attribute-materialSearch').parent().parent().prev().children().removeClass('ui-icon-plus').addClass('ui-icon-minus');\r\n $('#attribute-materialSearch').parent().parent().parent().removeClass('ui-collapsible-collapsed');\r\n }\r\n\t\t\t\t//end\r\n /*if ($('.jg-mobilelayout #error-messages ul.constraint-messages').is(':visible')) {\r\n $(\"#config footer\").append(\"<div id='duplicatefooter'><button class='updateButton'>Update</button><button class='saveButton'>Save</button></div>\");\r\n }\r\n $(\"body\").on(\"click touchend\", \"#duplicatefooter .updateButton\", function(e) {\r\n\r\n console.log(\"clicked on custom create transaction\");\r\n e.preventDefault();\r\n if ($(\"#button-bar .button-update\").length != 0) {\r\n $(\"#button-bar .button-update\").trigger('click');\r\n } else {\r\n console.log(\"clicked on custom create transaction1\");\r\n $(\"#popup-moreBtns-popup .popup-nested-inner ul li\").each(function() {\r\n\r\n var liButtonText = $(this).find(\"a\").text().trim();\r\n console.log(\"clicked on custom create transaction==\" + liButtonText);\r\n if (liButtonText == \"Update\") {\r\n console.log(\"clicked on Update\");\r\n $(this).find(\"a\").trigger(\"tap\");\r\n }\r\n });\r\n\r\n //$(\"#popup-moreBtns-popup\").find(\".button-update\").trigger('touchend');\r\n /*$(\"#popup-moreBtns-popup .button-update\").trigger('tap');\r\n console.log(\"clicked on custom create transaction21\");\r\n $(\"#popup-moreBtns-popup .button-update\").trigger('click');\r\n console.log(\"clicked on custom create transaction2\");\r\n */\r\n /*}\r\n });*/\r\n\r\n\r\n /*$(\"#customUpdate\").on('click touchend', function(){\r\n console.log(\"customUpdate customUpdate customUpdate\");\r\n $(\"#popup-moreBtns-popup\").find(\".button-update\").trigger('tap');\r\n $(\"div#popup-moreBtns ul.popup-list li a.button-update\").trigger(\"tap\");\r\n $(\"div#popup-moreBtns ul.popup-list li a.button-update\").trigger(\"click\");\r\n });\r\n $(\"#customCancel\").on('click touchend', function(){\r\n console.log(\"customCancelcustomCancelcustomCancel\");\r\n $(\".button-invoke-return\").trigger(\"click\");\r\n $(\".button-invoke-return\").trigger(\"tap\");\r\n });*/\r\n\r\n /* VMLSINOZP-50 BOF */\r\n /* var remove_constrained_msg = setInterval(mobile_constrained_msg, 1000);\r\n function mobile_constrained_msg(){\r\n\r\n console.error('.constrained class applied');\r\n\r\n if($('.jg-mobilelayout #error-messages ul.constraint-messages').is(':visible')){\r\n console.warn('remove constraint msg');\r\n\r\n var btnHtml = '<button class=\"button-update ui-btn ui-btn-inline\">Update</button>';\r\n\r\n if($('div#popup-moreBtns ul.popup-list li a.button-invoke-return').length>0){\r\n btnHtml+='<button class=\"invocation-button button-invoke-return ui-btn ui-btn-inline cancelButton\">Cancel</button> ';\r\n } else {\r\n btnHtml+='<button class=\"button-cancel ui-btn ui-btn-inline cancelButton\">Cancel</button>';\r\n }\r\n\r\n if(btnHtml.length!==0){\r\n $('.jg-mobilelayout footer #button-bar').html(btnHtml).undelegate();\r\n //$( \"body\" ).undelegate( \"#button-bar\", \"scroll\");\r\n }\r\n\r\n clearInterval(remove_constrained_msg);\r\n }\r\n\r\n\r\n }\r\n $(\"body\").on(\"click touchend tap\",\"#button-bar .cancelButton\",function(e){\r\n if($('div#popup-moreBtns ul.popup-list li a.button-invoke-return').length>0){\r\n console.warn('clicked 1');\r\n\r\n\r\n }else{\r\n console.warn('clicked 2');\r\n\r\n }\r\n });\r\n\r\n\r\n\r\n setTimeout(function(){\r\n console.log('remove_constrained_msg - settimeout');\r\n clearInterval(remove_constrained_msg);\r\n },15000);*/\r\n\r\n /* VMLSINOZP-50 EOF */\r\n }\r\n /* if filterPage contains with copy_processing.jsp */\r\n else if (filterPage.search(\"copy_processing.jsp\") != -1) {\r\n //[copy] order\r\n mobile_orderpage();\r\n mobile_materialSearch();\r\n mobile_actionButtonFavItem();\r\n mobile_redirect_materialpage();\r\n\r\n /* if filterPage contains with document.jsp */\r\n } else if (filterPage.search(\"document.jsp\") != -1) {\r\n //[process] order\r\n console.log(\"Proses Order page\");\r\n\r\n var customer_selection = function(){\r\n mobile_orderpage();\r\n mobile_customerSearch();\r\n\r\n if ($('#frequentlyAccessedCustomers_t').length > 0) {\r\n var customerDetails = $(\"#frequentlyAccessedCustomers_t\").val().replace(/~/gi, \"\");\r\n console.log(\"frequentlyAccessedCustomers_t is\", (customerDetails.length > 0) ? \"Not Empty\" : \"Empty\", \"The data is : \" + customerDetails); \r\n if (customerDetails.length > 0) {\r\n localStorage.setItem(\"frequentlyAccessedCustomers_t\", customerDetails);\r\n } else {\r\n customerDetails = (localStorage.getItem(\"frequentlyAccessedCustomers_t\") != null ? localStorage.getItem(\"frequentlyAccessedCustomers_t\") : \"\"); \r\n }\r\n $(\"#frequentlyAccessedCustomers_t\").val(\"\");\r\n if (customerDetails.length == 0) {\r\n return true;\r\n } else {\r\n mobile_topCustomerList(customerDetails);\r\n mobile_toggleTopCustomer();\r\n }\r\n }\r\n }\r\n\r\n $(\"body\").on(\"click touchend\",\"#tab-draftOrder\",function(e){\r\n function draftOrder(){\r\n setTimeout(function(){\r\n if( $(\".ui-loader.ui-corner-all\").css(\"display\") == \"none\" ){\r\n customer_selection();\r\n }else{\r\n draftOrder();\r\n }\r\n }, 1000);\r\n }\r\n draftOrder();\r\n });\r\n \r\n customer_selection();\r\n \r\n /* if filterPage contains with commerce_manager.jsp */\r\n } else if (filterPage.search(\"commerce_manager.jsp\") != -1) {\r\n //Commerce Management\r\n console.log(\"Commerce page\");\r\n localStorage.removeItem(\"frequentlyAccessedCustomers_t\");\r\n incompleteOrder();\r\n\r\n /* if filterPage contains with edit_profile.jsp */\r\n } else if (filterPage.search(\"edit_profile.jsp\") != -1) {\r\n //Profile\r\n console.log(\"Profile page\");\r\n } else if (filterPage.search(\"change-password\") != -1){\r\n /* \r\n Created By :- Created By Zainal Arifin, Date : 27 April 2018\r\n Task :- SG-40 Change Password for mobile\r\n Page :- Model Configuration\r\n File Location :- $BASE_PATH$/javascript/js-ezrx-tw.js\r\n Layout :- Desktop\r\n */\r\n\r\n console.log(\"change password script\");\r\n\r\n var readyChangePasswordPage = function () {\r\n setTimeout(function () {\r\n if (isLoadingDone()) {\r\n $(\"h1.ui-title\").css({ \"background\": \"#00575d\", \"color\": \"#ffffff\" });\r\n $(\"#main-content\").attr(\"style\", \"margin-top: 70px!important\");\r\n $(\"#change-pw-form\").css(\"height\", \"550px\");\r\n $(\"#errors\").after($(\"<div id='error_js' style='width: 41%;margin: auto auto 10px;' ></div>\"));\r\n $(\"#submit\").attr(\"style\", \"background: #005E63!important;color: #ffffff;padding: 5px 10px;font-size: 20px;\");\r\n\r\n var html_password_restriction = '<fieldset style=\"margin-left: 5px;margin-top: 100px;position:relative;border-top-width: 2px;border-right-width: 2px;border-bottom-width: 2px;border-left-width: 2px;border-top-style: groove;border-right-style: groove;border-bottom-style: groove;border-left-style: groove;padding: 10px;\">\\\r\n <legend class=\"form-label\" style=\"font-weight: bold;\" >&nbsp;Password Restrictions&nbsp;</legend>\\\r\n Password must be between 8 to 30 characters long and it should start with a letter. Password must have at least one upper case letter, at least one number and at least one special character.\\\r\n </fieldset>';\r\n $(\"#submit\").after(html_password_restriction);\r\n\r\n $(\"#change-pw-form\").on(\"submit\", function (e) {\r\n // e.preventDefault();\r\n var oldPassword = $(\"input[name='_oldPassword']\").val();\r\n var newPassword = $(\"input[name='_newPassword']\").val();\r\n var newPassword2 = $(\"input[name='_retypedPassword']\").val();\r\n var divError = $(\"#error_js\");\r\n $(divError).html(\"\");\r\n if (newPassword.length > 0 && oldPassword.length > 0) {\r\n\r\n if (newPassword == newPassword2) {\r\n if (newPassword.length >= 8 && newPassword.length <= 30) {\r\n if (/^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[!@#$%^&*()-_=+])[A-Za-z\\d!@#$%^&*()-_=+]{8,30}$/.test(newPassword) == false) { \r\n console.log(\"Password must have at least one upper case letter, at least one number and at least one special character.\");\r\n $(divError).append(\"<div class='error'>Password must have at least one upper case letter, at least one number and at least one special character.</div>\");\r\n } else {\r\n console.log(\"Submitted to system\");\r\n return true;\r\n }\r\n } else {\r\n console.log(\"Password must be between 8 and 30 characters.\");\r\n $(divError).append(\"<div class='error'>Password must be between 8 and 30 characters.</div>\");\r\n }\r\n }\r\n\r\n /* if (newPassword != newPassword2) {\r\n console.log(\"New Password and Retype New Password not match\");\r\n $(divError).append(\"<div class='error'>New Password and Retype New Password not match</div>\");\r\n } else {\r\n \r\n } */\r\n }\r\n e.preventDefault();\r\n });\r\n } else {\r\n readyChangePasswordPage();\r\n }\r\n }, 500);\r\n }\r\n\r\n readyChangePasswordPage();\r\n\r\n /* \r\n Created By :- Created By Zainal Arifin, Date : 27 April 2018\r\n Task :- SG-40 Change Password for mobile\r\n Page :- Model Configuration\r\n File Location :- $BASE_PATH$/javascript/js-ezrx-tw.js\r\n Layout :- Desktop\r\n */\r\n }\r\n\r\n }\r\n /*\r\n End : 4 Mei 2017\r\n Task : Debug order page + create filter page mobile with URL.\r\n Page : Global mobile page\r\n File Location : $BASE_PATH$/image/javascript/js-ezrx.js\r\n Layout : Mobile\r\n */\r\n }", "function REQ_MGMT(id)\n{\n var _FUNCTION_NAME_=\"REQ_MGMT\";\n var pParams = tree_getPrintPreferences();\n var action_url = fRoot+req_manager_url+\"?item=requirement&requirement_id=\"+id+args+\"&\"+pParams;\n\n //alert(_FUNCTION_NAME_ + \" \" +action_url);\n parent.workframe.location = action_url;\n\n}", "function _handleSuperPage() {\n // Attach XHR handler to send product data\n easy.events.on(easy.EVENT_JQUERY_READY, function ($) {\n $(document).ajaxSuccess(function (event, jqxhr, settings) {\n easy.addExceptionHandling(function () {\n if (settings.url.match(/^\\/Variant\\/GetProductAsync/)) {\n var productId = settings.url.match(/\\?code\\=(\\d{7})\\_/).pop();\n _parseProduct(productId, document.querySelector('#quickShopModal'));\n }\n }, {\n code: easy.ERROR_SITE_PRODUCT_ATTRIBUTE\n })();\n });\n });\n }", "function fnGetEditOS() {\n\t$('#mainContainer').html('<div id=\"EditOSPage\"></div>');\n\tsetLoadImage('EditOSPage');\n\tsendHTMLAjaxRequest(false, 'getView/getEditOSPage.html', null, fnDisplayContent, null,'EditOSPage');\n}", "function displayToppingOptions(contentDiv){\n // creates a post request, which is defined in the src/index.js file to call \"addItem.js\"\n console.log(contentDiv);\n}", "function createMainView() {\n $mainpageContent = $('<div class=\"vis-gl-main-wrap\">');\n\n // get User Element Column ID\n var paramStr = VIS.context.getWindowContext($self.windowNo, \"AD_Column_ID\", true);\n if (paramStr == \"\") {\n VIS.ADialog.error(\"VIS_DimensionColNotSelected\", true, \"\", \"\");\n return false;\n }\n\n // get User Element Column Name\n var columnName = VIS.dataContext.getJSONRecord(\"GlJournall/ColumnName\", paramStr);\n\n // Row 1\n $formWrap = $('<div class=\"vis-gl-form-wrap\">');\n $formDataRow = $('<div class=\"vis-gl-form-row\">');\n\n $formData = $('<div class=\"vis-gl-form-col\">');\n $lblUserElement = $('<label>' + VIS.Msg.translate(ctx, columnName) + '</label>');\n $formData.append($lblUserElement);\n\n $formDataR = $('<div class=\"vis-gl-form-col2\">');\n var valueInfo = VIS.MLookupFactory.getMLookUp(ctx, $self.windowNo, VIS.Utility.Util.getValueOfString(paramStr), VIS.DisplayType.Search);\n $infoUserElement = new VIS.Controls.VTextBoxButton(columnName, false, false, true, VIS.DisplayType.Search, valueInfo);\n $formDataR.append($('<div>').append($infoUserElement).append($infoUserElement.getControl()).append($infoUserElement.getBtn(0)));\n\n $formDataRow.append($formData).append($formDataR);\n $formWrap.append($formDataRow);\n\n //Action \n $actionPanel = $('<div class=\"VIS_buttons-wrap .vis-gl-buttons-wrap\">');\n\n $buttons = $('<div class=\"pull-right\">');\n $btnOk = $('<span class=\"btn vis-gl-buttons-wrap-span\">' + VIS.Msg.translate(ctx, \"VIS_OK\") + '</span>');\n $btnCancel = $('<span class=\"btn vis-gl-buttons-wrap-span\">' + VIS.Msg.translate(ctx, \"Cancel\") + '</span>');\n $buttons.append($btnOk).append($btnCancel);\n $actionPanel.append($buttons);\n $mainpageContent.append($formWrap).append($actionPanel);\n $root.append($mainpageContent).append($bsyDiv);\n }", "function exhibitorSetMeetingCallBack(exhibitorId) {\n if(page_type=='thankyou_new'){\n $(\"#connect-\"+exhibitorId+\".exhibitorConnect\").removeClass(\"btn-orange fa-check\").addClass(\"btn-default disabled\");\n $(\"#connect-\"+exhibitorId+\".exhibitorConnect\").html(\"<i class='fa fa-check text-success' style='font-size:12px;'></i> Request Sent\");\n }else{\n $(\"#connect-\"+exhibitorId+\".exhibitorConnect\").html(\"<i class='fa fa-check text-success'></i> Request Sent\");\n $(\"#connect-\"+exhibitorId+\".exhibitorConnect\").removeClass(\"btn-orange\").addClass(\"btn-default disabled\");\n }\n if($(\"#connect-\"+exhibitorId+\".exhibitorConnect\").text().trim()==\"Request Sent\" && pageType==\"about\")\n $(\"#connect-\"+exhibitorId+\".exhibitorConnect\").next().css('margin-left','14%');\n\n $(\"#connect-\"+exhibitorId+\".exhibitorConnect\").css({'opacity': '1','color': '#333'});\n}", "function test_request_filter_on_request_page() {}", "function apiEventHandler() {\r\n\t\r\n\r\n// handle href clicks\r\n\t\t\t\t\t\t\t$(document).ready(function(){ \r\n\t\t\t\t\t\t\t\t$(\"#appHandler a, #navcrumbs a\").click(function() {\r\n\t\t\t\t\t\t\t\t\tvar URLlocation = $(this).attr('href');\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\t// ie backwards compatibility\r\n\t\t\t\t\t\t\t\t\tif (/msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent) == true) {\r\n\t\t\t\t\t\t\t\t\t\tvar position = URLlocation.indexOf('/app/');\r\n\t\t\t\t\t\t\t\t\t\tif (position != -1) {\r\n\t\t\t\t\t\t\t\t\t\t\tURLlocation = URLlocation.substr(position + 5, URLlocation.length);\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\r\n\t\t\t\t\t\t\t\t\tvar URLtarget = $(this).attr('target');\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t// if we want to open another window\r\n\t\t\t\t\t\t\t\t\tif (URLtarget == '_blank') {\r\n\t\t\t\t\t\t\t\t\t\t// do nothing\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t// if we want a dialog box (openBox)\r\n\t\t\t\t\t\t\t\t\tif (URLtarget == 'dialog') {\r\n\t\t\t\t\t\t\t\t\t\tvar dialogWidth = $(this).attr('width');\r\n\t\t\t\t\t\t\t\t\t\tvar shadow = $(this).attr('shadow');\r\n\t\t\t\t\t\t\t\t\t\tif (shadow != 1) {\r\n\t\t\t\t\t\t\t\t\t\t\tshadow = 0;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\topenBox(\"appLoad.cc?cid=\" + classID + \"&id=\" + currentApp + \"&appType=\" + appType + \"&page=\" + cleanData(URLlocation), dialogWidth, shadow);\r\n\t\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t// if we want a dialog box (openBox)\r\n\t\t\t\t\t\t\t\t\t} else if (URLtarget == 'external') {\r\n\t\t\t\t\t\t\t\t\t\twindow.location = 'class-fs.cc?cid=' + classID + '&id=' + currentApp + '&page=' + URLlocation;\r\n\t\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t// if we want an embed box\r\n\t\t\t\t\t\t\t\t\t} else if (URLtarget == 'embed') {\r\n\t\t\t\t\t\t\t\t\t\topenEmbed('class-fs.cc?cid=' + classID + '&id=' + currentApp + '&page=' + URLlocation);\r\n\t\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t// regular app page swap\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t// make sure it's not a javascript command\r\n\t\t\t\t\t\t\t\t\t\tif (URLlocation.indexOf('javascript:', 0) == -1) {\r\n\t\t\t\t\t\t\t\t\t\t\tif (URLlocation.indexOf('http://', 0) == -1 && URLlocation.indexOf('https://', 0) == -1) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tchangePage(currentApp, URLlocation);\r\n\t\t\t\t\t\t\t\t\t\t\t\tparent.location.hash = currentApp + '_' + URLlocation;\r\n\t\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\twindow.location = URLlocation\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\treturn false;\t\r\n\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\t\r\n\t\t\t\t\t\t\t\t\t} // target blank else\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// handle form submissions\r\n\t\t\t\t\t\t\t\t$(\"#appHandler form\").submit(function(){\r\n \t\t\t\t\t\t\tdataString = $(this).serialize();\r\n \t\t\t\t\t\t\t\r\n \t\t\t\t\t\t\tdataString = dataString.replace(/=/g,\"(*)\");\r\n \t\t\t\t\t\t\tdataString = dataString.replace(/&/g,\"[*]\");\r\n \t\t\t\t\t\t\t\r\n \t\t\t\t\t\t\taction = $(this).attr(\"action\").replace(/=/g,\"(*)\");\r\n \t\t\t\t\t\t\taction = $(this).attr(\"action\").replace(/&/g,\"[*]\");\r\n \t\t\t\t\t\t\t\r\n \t\t\t\t\t\t\t$.ajax({\r\n \t\t\t\t\t\t\t\ttype: \"POST\",\r\n \t\t\t\t\t\t\t\turl: 'appPost.php?type=' + $(this).attr(\"method\") + '&action=' + escape(action) + '&appID=' + currentApp + '&classID=' + classID + '&appType=' + appType + '&data=' + escape(dataString),\r\n \t\t\t\t\t\t\t\tsuccess: function(data) {\r\n \t\t\t\t\t\t\t\t\t// handler in here\r\n \t\t\t\t\t\t\t\t\tvar redirectTag = data.search(\"<cc:redirect>\");\r\n \t\t\t\t\t\t\t\t\tvar inlineTag = data.search(\"<cc:inline>\");\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t// if redirect\r\n\t\t\t\t\t\t\t\t\t\t\tif (redirectTag >= 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tvar redirectEnd = data.search(\"</cc:redirect>\");\r\n\t\t\t\t\t\t\t\t\t\t\t\tvar redirURL = data.substring(redirectTag + 13,redirectEnd);\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\t\tchangePage(currentApp, redirURL);\r\n\t\t\t\t\t\t\t\t\t\t\t// if inline\t\r\n\t\t\t\t\t\t\t\t\t\t\t} else if (inlineTag >= 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tvar inlineEnd = data.search(\"</cc:inline>\");\r\n\t\t\t\t\t\t\t\t\t\t\t\tvar inlineContent = data.substring(inlineTag + 11,inlineEnd);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$(\"#class_main\").html($(\"#class_main\").html() + inlineContent);\r\n\t\t\t\t\t\t\t\t\t\t\t// no tag, display contents\r\n\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t$(\"#class_main\").html(data);\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\t}\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\tapiEventHandler();\r\n\t\t\t\t\t\t\t\t\t\t// success end\r\n \t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t//success end\r\n\t\t\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\treturn false; \r\n\r\n \t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t// onload\t\t\r\n\t\t\t\t\t\t\t});\t\r\n\t\r\n\t\r\n}", "function CallAboutPage(){\n\tshowElementAbove(DOMPageContentList[1]);\n\tDIV_SgvHolder.style.overflow = \"scroll\";\n}", "function ajaxAppInfo()\n{\n\t$(\"[data-app-info]\").each(function(index)\n\t{\n\t\tvar $dataGrabber = $(this);\n\t\t$dataGrabber.html('<i class=\"fa fa-refresh fa-spin\"></i>');\n\n\t\tvar $dataUrl = $(this).data('url');\n\t\tvar $dataSegment = $(this).data('segment');\n\t\t// var $piwikDayRange = $('#piwikDayRange input[name=\"piwikDays\"]:radio:checked').val();\n\n\t\t$.get($dataUrl, { segment: $dataSegment } )\n\t\t.done(function(data)\n\t\t{\n\t\t\t$dataGrabber.html(data);\n\t\t});\n\t});\n\n\t$(document).on(\"click\", \"[data-app-info]\", function(e)\n\t{\n\t\tajaxAppInfo();\n\t});\n}", "function calbackWrapper() {\r\n if (http_request.readyState == 4) {\r\n if (http_request.status == 200)\r\n callback(http_request);\r\n else\r\n alert(\"您所请求的页面有异常。\");\r\n }\r\n }", "function calbackWrapper() {\r\n if (http_request.readyState == 4) {\r\n if (http_request.status == 200)\r\n callback(http_request);\r\n else\r\n alert(\"您所请求的页面有异常。\");\r\n }\r\n }", "function Request()\n{\t\t \n\t//region PRESERVE ExtraMethods For Request\n\t//endregion\n //region Contants\t\n var ACT_ADD = 10;\n var ACT_UPDATE = 11;\n var ACT_DELETE = 12;\n var ACT_CHANGE_PAGE = 13;\n var ACT_SHOW_EDIT = 14;\n var ACT_GET = 15;\n var _strPage = \"admin_request.php\";\n \n \n //endregion \n \n //region Public Functions\n \n this.btnSave_OnClick = btnSave_OnClick;\n function btnSave_OnClick() {\n core.disableControl(\"btnOK\", true);\n var isValid = true;\n\n\t\tvar requesID = core.trim(core.getObject(\"txtRequesID\").val());\n\t\tcore.ValidateInputTextBox('txtRequesID','');\n\t\tif(requesID == ''){\n\t\t\tcore.ValidateInputTextBox('txtRequesID','RequesID is required', isValid);\n\t\t\tisValid = false;\n\t\t}else if (requesID.length > 20) {\n\t\t\tcore.ValidateInputTextBox('txtRequesID','RequesID must be less than 20', isValid);\n\t\t\tisValid = false;\n\t\t}\n\n\t\tvar contentRequest = core.trim(core.getObject(\"txtContentRequest\").val());\n\t\tcore.ValidateInputTextBox('txtContentRequest','');\n\t\tif(contentRequest == ''){\n\t\t\tcore.ValidateInputTextBox('txtContentRequest','ContentRequest is required', isValid);\n\t\t\tisValid = false;\n\t\t}\n\t\tvar requestedBy = core.trim(core.getObject(\"txtRequestedBy\").val());\n\t\tcore.ValidateInputTextBox('txtRequestedBy','');\n\t\tif(requestedBy == ''){\n\t\t\tcore.ValidateInputTextBox('txtRequestedBy','RequestedBy is required', isValid);\n\t\t\tisValid = false;\n\t\t}else if (requestedBy.length > 20) {\n\t\t\tcore.ValidateInputTextBox('txtRequestedBy','RequestedBy must be less than 20', isValid);\n\t\t\tisValid = false;\n\t\t}\n\n\t\tvar requestedDate = core.trim(core.getObject(\"txtRequestedDate\").val());\n\t\tcore.ValidateInputTextBox('txtRequestedDate','');\n\t\tif(requestedDate == ''){\n\t\t\tcore.ValidateInputTextBox('txtRequestedDate','RequestedDate is required', isValid);\n\t\t\tisValid = false;\n\t\t}else if (core.ValidateDateTime(requestedDate) == false) {\n\t\t\tcore.getObject('txtRequestedDate')[0].focus();\n\t\t\tstrError += '<p>RequestedDate is invalid!</p>';\n\t\t}\n\n\t\tvar contentRespone = core.trim(core.getObject(\"txtContentRespone\").val());\n\t\tcore.ValidateInputTextBox('txtContentRespone','');\n\t\tif(contentRespone == ''){\n\t\t\tcore.ValidateInputTextBox('txtContentRespone','ContentRespone is required', isValid);\n\t\t\tisValid = false;\n\t\t}\n\t\tvar responedBy = core.trim(core.getObject(\"txtResponedBy\").val());\n\t\tcore.ValidateInputTextBox('txtResponedBy','');\n\t\tif(responedBy == ''){\n\t\t\tcore.ValidateInputTextBox('txtResponedBy','ResponedBy is required', isValid);\n\t\t\tisValid = false;\n\t\t}else if (responedBy.length > 20) {\n\t\t\tcore.ValidateInputTextBox('txtResponedBy','ResponedBy must be less than 20', isValid);\n\t\t\tisValid = false;\n\t\t}\n\n\t\tvar responedDate = core.trim(core.getObject(\"txtResponedDate\").val());\n\t\tcore.ValidateInputTextBox('txtResponedDate','');\n\t\tif(responedDate == ''){\n\t\t\tcore.ValidateInputTextBox('txtResponedDate','ResponedDate is required', isValid);\n\t\t\tisValid = false;\n\t\t}else if (core.ValidateDateTime(responedDate) == false) {\n\t\t\tcore.getObject('txtResponedDate')[0].focus();\n\t\t\tstrError += '<p>ResponedDate is invalid!</p>';\n\t\t}\n\n\t\tvar isApproved = core.trim(core.getObject(\"txtIsApproved\").val());\n\t\tcore.ValidateInputTextBox('txtIsApproved','');\n\t\tif(isApproved == ''){\n\t\t\tcore.ValidateInputTextBox('txtIsApproved','IsApproved is required', isValid);\n\t\t\tisValid = false;\n\t\t}\n\t \n if (isValid == false) {\n core.disableControl(\"btnOK\", false);\n return;\n }\n \n if (core.getObject(\"adddocmode\")[0].value == ADD_MODE) {\n insertNew();\n }\n else {\n edit();\n }\n }\n \n this.edit = edit;\n function edit() {\n\n\t\tvar requesID = core.trim(core.getObject(\"txtRequesID\").val());\n\t\tvar contentRequest = core.trim(core.getObject(\"txtContentRequest\").val());\n\t\tvar requestedBy = core.trim(core.getObject(\"txtRequestedBy\").val());\n\t\tvar requestedDate = core.trim(core.getObject(\"txtRequestedDate\").val());\n\t\tvar contentRespone = core.trim(core.getObject(\"txtContentRespone\").val());\n\t\tvar responedBy = core.trim(core.getObject(\"txtResponedBy\").val());\n\t\tvar responedDate = core.trim(core.getObject(\"txtResponedDate\").val());\n\t\tvar isApproved = core.trim(core.getObject(\"txtIsApproved\").val());\n\t \n strRequest = \"?isAJ=1&act=\" + ACT_UPDATE + \n '&RequesID='+ core.urlencode(requesID)+\n\t\t\t'&ContentRequest='+ core.urlencode(contentRequest)+\n\t\t\t'&RequestedBy='+ core.urlencode(requestedBy)+\n\t\t\t'&RequestedDate='+ core.urlencode(requestedDate)+\n\t\t\t'&ContentRespone='+ core.urlencode(contentRespone)+\n\t\t\t'&ResponedBy='+ core.urlencode(responedBy)+\n\t\t\t'&ResponedDate='+ core.urlencode(responedDate)+\n\t\t\t'&IsApproved='+ core.urlencode(isApproved)+\t\t;\n \n var ajax = new Ajax();\n ajax.SendRequestToServerWithCustomMsg(_strPage, strRequest, edit_OnCallBack, true, MSG_AJAX_FETCHING_VN);\n }\n\n function edit_OnCallBack(xmlHTTPRequest) {\n core.disableControl(\"btnOK\", false);\n if (xmlHTTPRequest.readyState == 4) {\n if (xmlHTTPRequest.status == 200) {\n var strRespond = core.parserXML(xmlHTTPRequest.responseText);\n if (!core.headerProcessingArr(strRespond[0], Array(true, true, false))) {\n // ph?i kh?i t?o l?i d? tr?nh d?ng popdiv addFavourite\n //var popDiv = new PopDiv();\n //popDiv.init();\n popDiv.alert(MSG_RES_OPERATION_FAIL, SYSTEM_TITLE_ERROR, 1);\n return;\n }\n if (parseInt(strRespond[1]['rs']) == 1) {\n showInfoBar('success', strRespond[1][\"inf\"]);\n showAddMode();\n changePage(_strPage, ACT_CHANGE_PAGE, core.getObject(\"txtPage\").val());\n }\n else {\n //var popDiv = new PopDiv();\n //popDiv.init();\n top.popDiv.childPop.alert(strRespond[1][\"inf\"], SYSTEM_TITLE_ERROR, 1);\n }\n }\n }\n }\n \n this.insertNew = insertNew;\n function insertNew() {\n\n\t\tvar requesID = core.trim(core.getObject(\"txtRequesID\").val());\n\t\tvar contentRequest = core.trim(core.getObject(\"txtContentRequest\").val());\n\t\tvar requestedBy = core.trim(core.getObject(\"txtRequestedBy\").val());\n\t\tvar requestedDate = core.trim(core.getObject(\"txtRequestedDate\").val());\n\t\tvar contentRespone = core.trim(core.getObject(\"txtContentRespone\").val());\n\t\tvar responedBy = core.trim(core.getObject(\"txtResponedBy\").val());\n\t\tvar responedDate = core.trim(core.getObject(\"txtResponedDate\").val());\n\t\tvar isApproved = core.trim(core.getObject(\"txtIsApproved\").val());\n\t \n strRequest = \"?isAJ=1&act=\" + ACT_ADD + \n '&RequesID='+ core.urlencode(requesID)+\n\t\t\t'&ContentRequest='+ core.urlencode(contentRequest)+\n\t\t\t'&RequestedBy='+ core.urlencode(requestedBy)+\n\t\t\t'&RequestedDate='+ core.urlencode(requestedDate)+\n\t\t\t'&ContentRespone='+ core.urlencode(contentRespone)+\n\t\t\t'&ResponedBy='+ core.urlencode(responedBy)+\n\t\t\t'&ResponedDate='+ core.urlencode(responedDate)+\n\t\t\t'&IsApproved='+ core.urlencode(isApproved)+\t\t;\n \n var ajax = new Ajax();\n ajax.SendRequestToServerWithCustomMsg(_strPage, strRequest, insertNew_OnCallBack, true, MSG_AJAX_FETCHING_VN);\n }\n\n function insertNew_OnCallBack(xmlHTTPRequest) {\n core.disableControl(\"btnOK\", false);\n if (xmlHTTPRequest.readyState == 4) {\n if (xmlHTTPRequest.status == 200) {\n var strRespond = core.parserXML(xmlHTTPRequest.responseText);\n if (!core.headerProcessingArr(strRespond[0], Array(true, true, false))) {\n // ph?i kh?i t?o l?i d? tr?nh d?ng popdiv addFavourite\n //var popDiv = new PopDiv();\n //popDiv.init();\n popDiv.alert(MSG_RES_OPERATION_FAIL, SYSTEM_TITLE_ERROR, 1);\n return;\n }\n if (parseInt(strRespond[1]['rs']) == 1) {\n showInfoBar('success', strRespond[1][\"inf\"]);\n showAddMode();\n changePage(_strPage, ACT_CHANGE_PAGE, 1);\n }\n else {\n //var popDiv = new PopDiv();\n //popDiv.init();\n top.popDiv.childPop.alert(strRespond[1][\"inf\"], SYSTEM_TITLE_ERROR, 1);\n }\n }\n }\n }\n \n var _cacheURL_pdoc;\n this.deleteObj = deleteObj;\n function deleteObj(id, name) {\n //curRow = currentRowId;\n popDiv.alert('Do you want to delete ' + name + ' ?', SYSTEM_TITLE_ERROR, 2, \"_objRequest.delete_OK()\", \"_objRequest.delete_Cancel()\");\n\n var keyword = '';\n if (typeof core.getObject(\"txtGet\") != 'undefined') {\n keyword = core.getObject(\"txtGet\").val();\n }\n \n _cacheURL_pdoc = _strPage + \"?isAJ=1&act=\" + ACT_DELETE + \"&id=\" + docid + \"&p=\" + core.getObject(\"txtPage\")[0].value + \"&kw=\" + keyword;\n }\n this.delete_Cancel = delete_Cancel;\n function delete_Cancel() {\n //core.getObject(\"adddocmode\")[0].value = ADD_MODE;\n }\n this.delete_OK = delete_OK;\n function delete_OK() {\n // Prepare AJAX to remove selected doc from favorite list\n var ajax = new Ajax(METHOD_GET);\n ajax.SendRequestToServerWithCustomMsg(_cacheURL_pdoc, null, delete_OnCallBack, true, MSG_AJAX_FETCHING_VN);\n }\n function delete_OnCallBack(xmlHTTPRequest) {\n\n if (xmlHTTPRequest.readyState == 4) {\n if (xmlHTTPRequest.status == 200) {\n var strRespond = core.parserXML(xmlHTTPRequest.responseText);\n\n if (!core.headerProcessingArr(strRespond[0], Array(true, true, false))) {\n popDiv.alert(MSG_RES_OPERATION_FAIL, SYSTEM_TITLE_ERROR, 1);\n return;\n }\n if (parseInt(strRespond[1]['rs']) == 1) {\n parent.window.showInfoBar('success', strRespond[1][\"inf\"]);\n core.getObject(\"txtPage\")[0].value = strRespond[1][\"p\"];\n popDiv.hide();\n core.getObject(\"list-content\")[0].innerHTML = strRespond[1]['list'];\n }\n else //if(parseInt(strRespond[3]) == -1)\n {\n popDiv.alert(MSG_RES_OPERATION_FAIL, SYSTEM_TITLE_ERROR, 1);\n }\n }\n }\n }\n \n this.showEdit = showEdit;\n function showEdit(strID) {\n showAddMode();\n strRequest = \"?isAJ=1&act=\" + ACT_SHOW_EDIT + \"&id=\" + strID; ;\n var ajax = new Ajax(METHOD_GET);\n ajax.SendRequestToServerWithCustomMsg(_strPage + strRequest, null, showEdit_OnCallBack, true, MSG_AJAX_FETCHING_VN);\n\n }\n function showEdit_OnCallBack(xmlHTTPRequest) {\n\n if (xmlHTTPRequest.readyState == 4) {\n if (xmlHTTPRequest.status == 200) {\n var strRespond = core.parserXML(xmlHTTPRequest.responseText);\n if (!core.headerProcessingArr(strRespond[0], Array(true, true, false))) {\n popDiv.alert(MSG_RES_OPERATION_FAIL, SYSTEM_TITLE_ERROR, 1);\n return;\n }\n if (parseInt(strRespond[1]['rs']) == 1) {\n showInfoBar('success', MSG_RES_OPERATION_SUCCESS);\n //alert(strRespond[1]['sens']);\n // Add Doc && clear field\n\t\t\t\t\tcore.getObject('txtRequesID').val(RequesID);\n\t\t\t\t\tcore.getObject('txtContentRequest').val(ContentRequest);\n\t\t\t\t\tcore.getObject('txtRequestedBy').val(RequestedBy);\n\t\t\t\t\tcore.getObject('txtRequestedDate').val(RequestedDate);\n\t\t\t\t\tcore.getObject('txtContentRespone').val(ContentRespone);\n\t\t\t\t\tcore.getObject('txtResponedBy').val(ResponedBy);\n\t\t\t\t\tcore.getObject('txtResponedDate').val(ResponedDate);\n\t\t\t\t\tcore.getObject('txtIsApproved').val(IsApproved);\n core.getObject(\"adddocmode\")[0].value = EDIT_MODE;\n core.getObject(\"status-add\")[0].innerHTML = 'Edit mode';\n }\n else // Duplicate\n {\n popDiv.alert(MSG_RES_OPERATION_FAIL, SYSTEM_TITLE_ERROR, 1);\n }\n }\n }\n }\n \n this.showAddMode = showAddMode;\n function showAddMode() {\n core.getObject(\"adddocmode\")[0].value = ADD_MODE;\n core.getObject(\"status-add\")[0].innerHTML = 'Add mode';\n\t\tcore.getObject('txtRequesID').val('');\n\t\tcore.getObject('txtContentRequest').val('');\n\t\tcore.getObject('txtRequestedBy').val('');\n\t\tcore.getObject('txtRequestedDate').val('');\n\t\tcore.getObject('txtContentRespone').val('');\n\t\tcore.getObject('txtResponedBy').val('');\n\t\tcore.getObject('txtResponedDate').val('');\n\t\tcore.getObject('txtIsApproved').val('');\n }\n //endregion \n}", "function loadMainView() {\n let body = document.getElementsByTagName('body')[0];\n let root = webComponents.getComponentByName('adminui-root', 'root');\n let components = webComponents.components;\n webComponents.loadGroup(components.sidebar, root.sidebarTarget, context);\n webComponents.loadGroup(components.topbar, root.topbarTarget, context);\n webComponents.loadGroup(components.dashboard_page, root.contentTarget, context);\n webComponents.loadGroup(components.logout_modal, body, context);\n }", "function loadMainView() {\n let body = document.getElementsByTagName('body')[0];\n let root = webComponents.getComponentByName('adminui-root', 'root');\n let components = webComponents.components;\n webComponents.loadGroup(components.sidebar, root.sidebarTarget, context);\n webComponents.loadGroup(components.topbar, root.topbarTarget, context);\n webComponents.loadGroup(components.dashboard_page, root.contentTarget, context);\n webComponents.loadGroup(components.logout_modal, body, context);\n }", "function OrderStatus_elementsExtraJS() {\n // screen (OrderStatus) extra code\n\n /* googlemap_17 */\n\n $(\"[name = 'googlemap_17']\").wrap(\"<div/>\");\n $(\"[name = 'googlemap_17']\").parent().css(\"margin-left\", $(\"[name = 'googlemap_17']\").css(\"margin-left\"));\n $(\"[name = 'googlemap_17']\").parent().css(\"margin-right\", $(\"[name = 'googlemap_17']\").css(\"margin-right\"));\n $(\"[name = 'googlemap_17']\").css(\"margin-left\", '0');\n $(\"[name = 'googlemap_17']\").css(\"margin-right\", '0');\n\n var googlemap_17_options = {\n markerSourceName: \"googlemap_17_markers\",\n latitude: \"21.414582\",\n longitude: \"39.885446\",\n address: \"Mina mecca\",\n zoom: 10,\n showLocationMarker: false\n }\n\n Apperyio.__registerComponent('googlemap_17', new Apperyio.ApperyMapComponent(\"googlemap_17\", googlemap_17_options));\n $(\"[name='googlemap_17_markers'] [apperytype='marker']\").attr(\"reRender\", \"googlemap_17\");\n\n function __update_googlemap_17(event, ui) {\n if (($('#OrderStatus_googlemap_17', ui.toPage).length > 0) && (Apperyio('googlemap_17') != undefined) && (Apperyio('googlemap_17').isInitialized)) {\n Apperyio('googlemap_17').refresh();\n }\n }\n $(\":mobile-pagecontainer\").off(\"pagecontainershow.OrderStatus_mobilecontainer\", __update_googlemap_17).on(\"pagecontainershow.OrderStatus_mobilecontainer\", __update_googlemap_17);\n\n }", "function viewDesktop_Master() {\n}", "function showBusinessInventory() \n{\n\t//alert('inside showBusinessInventory');\n\tvar divId = 'businessInventory';\n\tvar val1 = \"fetch=dashboard\";\n\tmakeAJAXCall(divId,'fetchDashboard.jsp',val1);\n}", "onGooglePlusClick(eventObject) {\n let RoKAContainer = document.getElementById(\"RoKA\");\n RoKAContainer.style.display = \"none\";\n let googlePlusContainer;\n if (RoKA.Application.currentMediaService() === Service.YouTube) {\n googlePlusContainer = document.getElementById(\"watch-discussion\");\n }\n else if (RoKA.Application.currentMediaService() === Service.KissAnime) {\n googlePlusContainer = document.getElementById(\"disqus_thread\");\n }\n else if (RoKA.Application.currentMediaService() === Service.KissManga) {\n googlePlusContainer = document.getElementById(\"disqus_thread\");\n }\n googlePlusContainer.style.display = \"\";\n googlePlusContainer.style.height = \"auto\";\n let redditButton = document.getElementById(\"at_switchtoreddit\");\n redditButton.style.display = \"block\";\n }", "onGooglePlusClick(eventObject) {\n let RoKAContainer = document.getElementById(\"RoKA\");\n RoKAContainer.style.display = \"none\";\n let googlePlusContainer;\n if (RoKA.Application.currentMediaService() === Service.YouTube) {\n googlePlusContainer = document.getElementById(\"watch-discussion\");\n }\n else if (RoKA.Application.currentMediaService() === Service.KissAnime) {\n googlePlusContainer = document.getElementById(\"disqus_thread\");\n }\n else if (RoKA.Application.currentMediaService() === Service.KissManga) {\n googlePlusContainer = document.getElementById(\"disqus_thread\");\n }\n googlePlusContainer.style.display = \"\";\n googlePlusContainer.style.height = \"auto\";\n let redditButton = document.getElementById(\"at_switchtoreddit\");\n redditButton.style.display = \"block\";\n }", "onGooglePlusClick(eventObject) {\n let RoKAContainer = document.getElementById(\"RoKA\");\n RoKAContainer.style.display = \"none\";\n let googlePlusContainer;\n if (RoKA.Application.currentMediaService() === Service.YouTube) {\n googlePlusContainer = document.getElementById(\"watch-discussion\");\n }\n else if (RoKA.Application.currentMediaService() === Service.KissAnime) {\n googlePlusContainer = document.getElementById(\"disqus_thread\");\n }\n else if (RoKA.Application.currentMediaService() === Service.KissManga) {\n googlePlusContainer = document.getElementById(\"disqus_thread\");\n }\n googlePlusContainer.style.display = \"\";\n googlePlusContainer.style.height = \"auto\";\n let redditButton = document.getElementById(\"at_switchtoreddit\");\n redditButton.style.display = \"block\";\n }", "function showAuthnViewBasedOnHint() {\n var pageContent = \"\";\n switch (hintToShowPage) {\n case \"SHOW_LOGIN\":\n pageContent = '<form onsubmit=\"return false;\"><div class=\"form-group\"><input class=\"form-control\" name=\"User Name:\" id=\"username\" ,=\"\" placeholder=\"User Name:\" type=\"text\"></div><div class=\"form-group\"><input class=\"form-control\" name=\"Password:\" id=\"password\" ,=\"\" placeholder=\"Password:\" type=\"password\"></div><div><input type=\"submit\" class=\"btn btn-primary btn-block animated fadeIn\" value=\"Go\" style=\"background-color:#163670; border: 2px solid white; border-radius:6px; margin-right:10px; margin-bottom:15px;\" onclick=\"continueAuthentication()\"></div></form>'\n $(\"#showLogin\").html(pageContent);\n $(\"#login\").collapse(\"show\");\n $(\"#qr\").collapse(\"hide\");\n $(\"#consent\").collapse(\"hide\");\n $(\"#errorpage\").collapse(\"hide\");\n break;\n case \"COLLECT_DEVICE_INFO\":\n \tcollectDeviceInfo();\n break;\n case \"SHOW_DEVICE_REGISTRATION\":\n $(\"#qrCode\").html(\"\");\n pageContent = '<form onsubmit=\"return false;\"><center><div><h4 class=\"title\"></h4></div></center><center><div class=\"wrapper text-center\"><div class=\"btn-group\"><button class=\"btn btn-primary btn-block animated fadeIn\" onclick=\"registerDevice();\" style=\"background-color:#163670; border: 2px solid white; border-radius:6px; margin-right:10px; margin-bottom:15px;\">Register device</button></div></div></center></form>'\n $(\"#qrCode\").html(pageContent);\n $(\"#qr\").collapse(\"show\");\n $(\"#login\").collapse(\"hide\");\n $(\"#consent\").collapse(\"hide\");\n $(\"#errorpage\").collapse(\"hide\");\n break;\n case \"SHOW_QR\":\n $(\"#qrCode\").html(\"\");\n getQRCode(QR_SHAREDSECRET);\n pageContent = '<form onsubmit=\"return false;\"><center><div><h4 class=\"title\"></h4></div></center><center><div><h4 class=\"title\"></h4></div></center><center><div class=\"wrapper text-center\"><div class=\"btn-group\"><button class=\"btn btn-primary btn-block animated fadeIn\" onclick=\"verifyQRSharedSecret();\" style=\"background-color:#163670; border: 2px solid white; border-radius:6px; margin-right:10px; margin-bottom:15px;\">Login using verification code</button></div></div></center></form>'\n $(\"#loginUsingCode\").html(pageContent);\n $(\"#qr\").collapse(\"show\");\n $(\"#login\").collapse(\"hide\");\n $(\"#consent\").collapse(\"hide\");\n $(\"#errorpage\").collapse(\"hide\");\n break;\n case \"SHOW_OTP\":\n $(\"#qrCode\").html(\"\");\n $(\"#loginUsingCode\").html('');\n pageContent = '<form onsubmit=\"return false;\"><div class=\"form-group\"><input class=\"form-control\" name=\"One Time Password\" id=\"otp\" ,=\"\" placeholder=\"One Time Password\" type=\"text\"></div><center><div><h4 class=\"title\"></h4></div></center><div><input type=\"checkbox\" id=\"trustDevice\">Trust this device</div><center><div class=\"wrapper text-center\"><div class=\"btn-group\"><button class=\"btn btn-primary\" onclick=\"verifyOTP();\" style=\"background-color:#163670; border: 2px solid white; border-radius:6px; margin-right:10px; margin-bottom:15px;\">Submit</button></div></div></center></form>'\n $(\"#qrCode\").html(pageContent);\n $(\"#qr\").collapse(\"show\");\n $(\"#login\").collapse(\"hide\");\n $(\"#consent\").collapse(\"hide\");\n $(\"#errorpage\").collapse(\"hide\");\n \tbreak;\n case \"SHOW_SERVER_OTP\":\n $(\"#qrCode\").html(\"\");\n $(\"#loginUsingCode\").html('');\n\t\t\tif(INVALID_OTP === \"invalid_otp\"){\n\t\t\t\tpageContent = '<center><p><font color=\"red\">Please enter valid OTP.</font></p><center><form onsubmit=\"return false;\"><div class=\"form-group\"><input class=\"form-control\" name=\"One Time Password\" id=\"otp\" ,=\"\" placeholder=\"One Time Password\" type=\"text\"></div><center><div><h4 class=\"title\"></h4></div></center><div><input type=\"checkbox\" id=\"trustDevice\">Trust this device</div><center><div class=\"wrapper text-center\"><div class=\"btn-group\"><button class=\"btn btn-primary\" onclick=\"verifyServerOTP();\" style=\"background-color:#163670; border: 2px solid white; border-radius:6px; margin-right:10px; margin-bottom:15px;\">Submit</button></div><div class=\"btn-group\"><button class=\"btn btn-primary\" onclick=\"getServerOTP();\" style=\"background-color:#163670; border: 2px solid white; border-radius:6px; margin-right:10px; margin-bottom:15px;\">Resend OTP</button></div></div></center></form>'\n\t\t\t} else {\n\t\t\t\tpageContent = '<form onsubmit=\"return false;\"><div class=\"form-group\"><input class=\"form-control\" name=\"One Time Password\" id=\"otp\" ,=\"\" placeholder=\"One Time Password\" type=\"text\"></div><center><div><h4 class=\"title\"></h4></div></center><div><input type=\"checkbox\" id=\"trustDevice\">Trust this device</div><center><div class=\"wrapper text-center\"><div class=\"btn-group\"><button class=\"btn btn-primary\" onclick=\"verifyServerOTP();\" style=\"background-color:#163670; border: 2px solid white; border-radius:6px; margin-right:10px; margin-bottom:15px;\">Submit</button></div><div class=\"btn-group\"><button class=\"btn btn-primary\" onclick=\"getServerOTP();\" style=\"background-color:#163670; border: 2px solid white; border-radius:6px; margin-right:10px; margin-bottom:15px;\">Resend OTP</button></div></div></center></form>'\n\t\t\t}\n $(\"#qrCode\").html(pageContent);\n $(\"#qr\").collapse(\"show\");\n $(\"#login\").collapse(\"hide\");\n $(\"#consent\").collapse(\"hide\");\n $(\"#errorpage\").collapse(\"hide\");\n \tbreak;\n case \"CALL_AUTHORIZE\":\n showConsentForAuthz();\n break;\n case \"ERROR\":\n if(ERROR_CODE === \"UNAUTHORIZED\"){\n pageContent = \"<center><div><h4>Login/password/OTP is invalid. Refresh the page to retry.</h4></div></center>\";\n }else if (ERROR_CODE === \"invalid_request\"){\n pageContent = \"<center><div><h4>Missing or invalid parameters. Refresh the page to re-login.</h4></div></center>\";\n }else if(ERROR_CODE === \"internal error\"){\n if(ERROR_DESCRIPTION != \"internal server error\") {\n pageContent = \"<center><div><h4>\"+ERROR_DESCRIPTION+\"</h4></div></center>\";\n } else {\n pageContent = \"<center><div><h4>Something went wrong at server side. Refresh the page to retry.</h4></div></center>\";\n }\n }else{\n pageContent = \"<center><div><h4>Login failed. Refresh the page to retry.</h4></div></center>\";\n }\n $(\"#showError\").html(pageContent);\n $(\"#errorpage\").collapse(\"show\");\n $(\"#login\").collapse(\"hide\");\n $(\"#qr\").collapse(\"hide\");\n $(\"#login\").collapse(\"hide\");\n $(\"#consent\").collapse(\"hide\");\n break;\n default:\n console.log(\"ERROR: Unsupported hint\");\n break;\n }\n}", "function onLoad(){\n getRequest(\"/display-current\", displayData);\n}", "getApplicationDiv() {\n return this.applicationDiv;\n }", "function _colorlibMainPopUp(obj)\r\n{\r\n\tif(!isValidRecord(true))\r\n\t{\r\n\t\treturn;\r\n\t}\r\n\r\n\tobjAjax = new htmlAjax();\r\n objAjax.setActionURL(\"threadedcomments.do\");\r\n objAjax.setActionMethod(\"viewcomments\");\r\n objAjax.setProcessHandler(\"colorLibCommentResponse\");\r\n objAjax.parameter().add(\"parentViewId\", 2900);\r\n objAjax.sendRequest();\r\n}", "function getonlinelink1() {\n var featureRelId = getUrlVars()['transferId'];\n var userSiteId = getUrlVars()['touchId'];\n var featureId = getUrlVars()['mId'];\n\tvar featureName = getUrlVars()['featureName'];\n\tfeatureName = featureName.replace(/\\%20/g,' ');\n\tfeatureNameTitle(featureName);\n\t\n var id = getUrlVars()['id'];\n\n //var src= getUrlVars()['return_url'];\n //alert(\"src=\"+src);\n var url = baseUrl + 'web/web/getMenuHtml/' + featureId + '/' + featureRelId + '/' + userSiteId;\n\n var data = '';\n doAjaxCall(url, data, false, function (html) {\n var menuhtml = $(id).find('a').html();\n if ($.isEmptyObject(html)) {\n $('#main-content').html('Sorry we have an Empty data');\n } else {\n\n $.each(html, function (i, item) {\n console.log(item); \n var src = item.url;\n var h = $(window).height(); //window height\n var t = 53; // trim hiehgt of scroll\n var ih = h - t; // exact height of iframe\n var data = '<iframe src=\"' + src + '\" frameborder=\"0\" style=\"height:'+ih+'px\" width=\"100%\" scrolling=\"yes\" allowtransparency=\"yes\">';\n data += '<iframe>';\n // $('title,.header-content h1').html(menuhtml);\n $('.header-content .back').show();\n $('#main-content').html(data);\n $('#main-content').css('padding','0px');\n\n })\n }\n\t\tgetUserAppereance();\n });\n}", "function loadpage() {\n var pageurl = window.location.href;\n\n //On page load, the content of all the 4 product types is disabled\n var elements = document.getElementsByClassName(\"productCont\");\n for (var x = 0; x < elements.length; x++) {\n elements[x].style.display = \"none\";\n }\n\n //Below line reads the product type selected by the user in dashboard page \n var product = getParameterByName('producttype', window.location.href.toLowerCase());\n if (pageurl.toLowerCase().indexOf(\"?producttype=\") > 0) {\n\n //If the user clicks Accept.js product type in the dashboard page, the following code gets executed.\n if (product == \"acceptjs\") {\n\n //The product type selected by the user in the dashboard page is assigned to the activeCont variable which is used for future reference\n activeCont = \"acceptjs\";\n\n //Below function checks if customer ID is passed in the request URL \n checkForCustomerIdInUrl(pageurl)\n }\n\n //If the user clicks Accept.js UI product type in the dashboard page, the following code gets executed\n else if (product == \"acceptui\") {\n\n //The product type selected by the user in the dashboard page is assigned to the activeCont variable which is used for future reference\n activeCont = \"acceptui\";\n\n //Below function checks if customer ID is passed in the request URL \n checkForCustomerIdInUrl(pageurl)\n }\n\n //If the user clicks Accept Hosted product type in the dashboard page, the following code gets executed.\n else if (product == \"accepthosted\") {\n activeCont = \"accepthosted\";\n\n //Below logic is to check if there are more than one parameter passed in the URL \n if (pageurl.toLowerCase().indexOf(\"&\") > 0) {\n \n //Customer ID is an optional parameter for Accept Hosted product type\n //Below code gets executed when the user passes customer id in the request URL\n if (pageurl.toLowerCase().indexOf(\"&customerid=\") > 0) {\n var id = getParameterByName('customerid', window.location.href.toLowerCase());\n\n //Validation of customer id will be done by using the below function\n var result = ValidateCustomer(id);\n\n //If the customer id is a valid id, then AcceptHosted function gets executed\n if (result.valid)\n {\n AcceptHosted(id);\n }\n else {\n\n //If the invalid customer id declared in the URL, then user gets redirected to the error message section\n var elements = document.getElementsByClassName(\"productCont\");\n\n //The content of all the 4 product types is disabled on the page\n for (var x = 0; x < elements.length; x++) {\n elements[x].style.display = \"none\";\n }\n document.getElementById(\"invalidPage\").innerHTML = \"\";\n document.getElementById(\"invalidPage\").innerHTML = \"Customer not Found\";\n document.getElementById(\"invalidProduct\").style.display = \"block\";\n }\n }\n //Below code gets executed when the user passes when there are more than one parameters (other than customer id) which are invalid in the request URL\n else {\n\n //Below code gets executed when user passes invalid parameters in the URL \n var elements = document.getElementsByClassName(\"productCont\");\n for (var x = 0; x < elements.length; x++) {\n elements[x].style.display = \"none\";\n }\n document.getElementById(\"invalidPage\").innerHTML = \"\";\n document.getElementById(\"invalidPage\").innerHTML = \"Product Type not Found\";\n document.getElementById(\"invalidProduct\").style.display = \"block\";\n\n }\n }\n else {\n\n //When customer id parameter is not passed in the URL, AcceptHosted function gets executed\n AcceptHosted('');\n }\n }\n\n //If the user clicks Accept Customer product type in the dashboard page, the following code gets executed.\n else if (product == \"acceptcustomer\") {\n activeCont = \"acceptcustomer\";\n\n //Below line populates the customer id textbox with a valid customer id\n document.getElementById(\"txtCustomerId\").value = globalVars.ValidCustomer;\n \n //Below code gets executed when the user passes customer id in the request URL\n if (pageurl.toLowerCase().indexOf(\"&customerid=\") > 0) {\n\n document.getElementById(\"acceptCustomer\").style.display = \"none\";\n\n //Below line gets the customer id declared in the url by the user\n var id = getParameterByName('customerid', window.location.href.toLowerCase());\n\n //Below function checks if the customer id is already validated or not\n //Customer id validaton occurs on click of continue button in dashboard and on accept customer page load\n //In order to avoid multiple validation requests to API, storing the validation status in the session storage\n var customerIdValidationStatus = sessionStorage.getItem('isValidated');\n\n //If customer id is not validated\n if (customerIdValidationStatus != \"true\") {\n\n //Validation of customer id will be done by using the below function\n var result = ValidateCustomer(id);\n\n //If the customer id is a valid id, then AcceptCustomer function gets executed\n if (result.valid)\n {\n AcceptCustomer(id);\n }\n else {\n\n //If the invalid customer id declared in the URL, then user gets redirected to the error message section\n var elements = document.getElementsByClassName(\"productCont\");\n for (var x = 0; x < elements.length; x++) {\n elements[x].style.display = \"none\";\n }\n document.getElementById(\"invalidPage\").innerHTML = \"\";\n document.getElementById(\"invalidPage\").innerHTML = \"Customer not Found\";\n document.getElementById(\"invalidProduct\").style.display = \"block\";\n }\n\n }\n //If customer id is already validated in dashboard page\n else {\n AcceptCustomer(id);\n sessionStorage.setItem('isValidated', 'false');\n }\n }\n else {\n\n //If customer id is not provided in the URL, a pop up to enter customer id is displayed.\n document.getElementById(\"acceptCustomer\").style.display = \"block\";\n }\n }\n else {\n\n //Below code gets executed when user passes invalid product type parameters in the URL \n document.getElementById(\"invalidPage\").innerHTML = \"\";\n document.getElementById(\"invalidPage\").innerHTML = \"Product Type not Found\";\n document.getElementById(\"invalidProduct\").style.display = \"block\";\n }\n }\n else {\n\n //Below code gets executed when user passes invalid product type parameters in the URL \n if (document.getElementById(\"invalidPage\") != null) {\n document.getElementById(\"invalidPage\").innerHTML = \"\";\n document.getElementById(\"invalidPage\").innerHTML = \"Product Type not Found\";\n document.getElementById(\"invalidProduct\").style.display = \"block\";\n }\n }\n}", "function showSCMain()\r\n{\r\n // Tracker#:12621 ISSUES ON BLANK RECORD OF TECH SPEC\r\n // Check for valid record to execute process.\r\n if(!isValidRecord(true))\r\n {\r\n return;\r\n }\r\n \r\n\tvar htmlAreaObj = _getWorkAreaDefaultObj();\r\n\tvar objAjax = htmlAreaObj.getHTMLAjax(); \t\r\n var objHTMLData = htmlAreaObj.getHTMLDataObj();\r\n\t//alert(objHTMLData);\r\n\tif(objHTMLData && objHTMLData.hasUserModifiedData() && objHTMLData.isDataModified())\r\n {\r\n var htmlErrors = objAjax.error();\r\n htmlErrors.addError(\"confirmInfo\", szMsg_Changes, false);\t\r\n messagingDiv(htmlErrors, \"saveTechSpec()\", \"continueShowSCMain()\");\r\n }\r\n else\r\n {\t \t\r\n \tcontinueShowSCMain();\r\n } \r\n}", "function getItscInformation(controlId) {\n $('#'+controlId).html('<div class=\"text-center txt-center-center\"><img style=\"width: 6%;\" src=\"'+URL+'/img/loader-white1.gif\" ></div>');\n $.ajax({\n type: \"POST\", \n url: URL + '/proxy',\n dataType: \"json\",\n data: { method: 'getItscInformation',csrf_token_id:csrf_token_val},\n success: function (data) {\n $('#'+controlId).html(data.result); \n (function($){\n $(\".agent-portlet-body\").mCustomScrollbar({\n theme:\"inset-2-dark\"\n });\n\n })(jQuery); \n }\n });\n\n}", "function LoadDocUploadSection(obj, processId) {\n $(\"#DocUploadList\").html(obj.HtmlForCisInProgress);\n if (obj.HtmlForHTransferInProgress != \"\") {\n $(\"#DocUploadList\").html(obj.HtmlForHTransferInProgress);\n }\n $('#DocUploadList').css('display', 'block');\n $('#dNoData').css('display', 'none');\n $('#List_View').css('display', 'none');\n $('#content_book').css('display', 'none');\n $('#thumbnailview').css('display', 'none');\n $('#list').css('display', 'none');\n $('#book').css('display', 'none');\n $('#thumb').css('display', 'none');\n $(\"#NextTask\").html('');\n $(\"#TotalCount\").text('');\n $(\"#PendingCount\").text('');\n $(\"#CompletedCount\").text('');\n $(\"#pplCount\").html('');\n $('.icons_nh').css('display', 'none');\n\n if (processId != 1 && processId != 2) {\n if (preJoiningCompletionStatus == 1 && postJoiningCompletionStatus == 1) {\n $('#div_menu_prejoin .activity_completion_status').attr('src', '../../Images/prejoining_greytick.png');\n $('#div_menu_postjoin .activity_completion_status').attr('src', '../../Images/prejoining_greytick.png');\n }\n else if (preJoiningCompletionStatus == 0 && postJoiningCompletionStatus == 1) {\n $('#div_menu_prejoin .activity_completion_status').attr('src', '../../Images/ico_tabBlack.png');\n $('#div_menu_postjoin .activity_completion_status').attr('src', '../../Images/prejoining_greytick.png');\n }\n else if (preJoiningCompletionStatus == 1 && postJoiningCompletionStatus == 0) {\n $('#div_menu_prejoin .activity_completion_status').attr('src', '../../Images/prejoining_greytick.png');\n $('#div_menu_postjoin .activity_completion_status').attr('src', '../../Images/ico_tabBlack.png');\n }\n $('#div_menu_uploads .activity_completion_status').attr('src', '../../Images/ico_alert2.gif');\n\n ActivateMenu($('#div_menu_uploads'));\n DeactivateMenu($('#div_menu_prejoin'));\n DeactivateMenu($('#div_menu_postjoin'));\n activeMenuFlag = 0;\n }\n}", "function PageUpdate(){\n\t// enable opaque mask with loading bar and info tasks bellow\n\t// find all ajax calls within page\n\t//make server requests and update loading bar on each\n}", "function createCommunityDivForPanel(response,flag,extClass){\r\n console.log(response);\r\n var badge = '';\r\n var badge2 = '';\r\n var panelForwarded = 'discussion';\r\n var numberUser = '';\r\n try{\r\n if(flag==0 || flag==2){\r\n\r\n var panelComImage = response.image;\r\n var panelComId = response._id;\r\n var panelComName = response.name;\r\n\r\n if(flag==2)\r\n {\r\n numberUser = 'Request('+response.request.length+')';\r\n numberUser = \"<a class='comnametxt-user' href='/community/manageCommunity/\"+panelComId+\"'>\"+numberUser+\"</a>\";\r\n badge = '<label class=\"label label-success\" style=\"cursor:pointer !important;\"><i class=\"fa fa-cogs\"></i></label>';\r\n }else{\r\n numberUser = 'Members('+response.user.length + response.admin.length+')';\r\n numberUser = \"<a class='comnametxt-user' href='/community/communitymembers/\"+panelComId+\"'>\"+numberUser+\"</a>\";\r\n badge = '<label class=\"label label-success\" style=\"cursor:pointer !important;\"><i class=\"fa fa-cogs\"></i></label>';\r\n }\r\n }else if(flag==1){\r\n var panelComImage = response.image;\r\n var panelComId = response._id;\r\n var panelComName = response.name;\r\n panelForwarded = 'communityprofile';\r\n numberUser = 'Members('+response.request.length+')';\r\n numberUser = \"<a class='comnametxt-user' style='text-decoration:none;color:black;cursor:context-menu'>\"+numberUser+\"</a>\";\r\n badge = '<label class=\"label label-danger\" style=\"cursor:pointer !important;\"><i class=\"fa fa-times\"></i></label>';\r\n badge2 = '<label class=\"label label-danger\">Pending</label>&nbsp;&nbsp;&nbsp;';\r\n }else if(flag==3){\r\n var panelComImage = response.image;\r\n var panelComId = response._id;\r\n var panelComName = response.name;\r\n panelForwarded = 'communityprofile';\r\n numberUser = 'Members('+response.request.length+')';\r\n numberUser = \"<a class='comnametxt-user' style='text-decoration:none;color:black;cursor:context-menu'>\"+numberUser+\"</a>\";\r\n badge = '<label class=\"label label-success\" style=\"cursor:pointer !important;\"><i class=\"fa fa-times\"></i></label>';\r\n badge2 = '<label class=\"label label-success\">Invitation</label>&nbsp;&nbsp;&nbsp;';\r\n }\r\n code=\"<div class='col-sm-12 col-xs-12 \"+extClass+\" community-div' style='margin-top:5px;' id='can\"+panelComId+\"'>\";\r\n code +=\"<div class='col-sm-1 col-xs-3' style='padding:10px;z-index:1'>\";\r\n code +=\"<a href='/community/\"+panelForwarded+\"/\"+panelComId+\"'><img src='/Upload/CommunityProfile/\"+panelComImage+\"' class='cpic'></a>\";\r\n code +=\"</div>\";\r\n code +=\"<div class='col-sm-10 col-xs-7' style='padding-top:25px;padding-bottom:5px;overflow:scroll'>\";\r\n code +=\" <p style='margin:0'><a class='comnametxt' href='/community/\"+panelForwarded+\"/\"+panelComId+\"'>\"+badge2+panelComName+\"</a>&nbsp;&nbsp;&nbsp;\"+numberUser+\"</p>\";\r\n code +=\"</div>\";\r\n code +=\"<div class='col-sm-1 col-xs-2' style='padding:0'>\";\r\n if(flag==1)\r\n {\r\n code +=\"<a class='community-short-btn' onclick='cancelRequest(\\\"\"+panelComId+\"\\\")' style='float:right'>\";\r\n code +=badge+\"</a>\";\r\n } else if(flag==2)\r\n {\r\n code +=\"<a class='community-short-btn' href='/community/manageCommunity/\"+panelComId+\"' style='float:rignt'>\";\r\n code +=badge+\"</a>\";\r\n }else if(flag==3)\r\n {\r\n code +=\"<a class='fa fa-check' onclick='acceptInvitation(\\\"\"+panelComId+\"\\\")' style='float:right'>\";\r\n code +=badge+\"</a>\";\r\n }\r\n code +=\"</div>\";\r\n code +=\"</div>\";\r\n anyCommunity = true;\r\n }catch(err){\r\n code = '';\r\n }\r\n return code;\r\n}", "function ajaxpage(url, containerid) {\r\n//\talert('hello');\r\n\tvar page_request = false;\r\n\tif (window.XMLHttpRequest) // if Mozilla, Safari etc\r\n\t\tpage_request = new XMLHttpRequest();\r\n\telse if (window.ActiveXObject){ // if IE\r\n\t\ttry {\r\n\t\t\tpage_request = new ActiveXObject(\"Msxml2.XMLHTTP\");\r\n\t\t} \r\n\t\tcatch (e){\r\n\t\t\ttry{\r\n\t\t\t\tpage_request = new ActiveXObject(\"Microsoft.XMLHTTP\");\r\n\t\t\t}\r\n\t\t\tcatch (e){}\r\n\t\t}\r\n\t}\r\n\telse\r\n\t\treturn false;\r\n\r\n//\tpage_request.onreadystatechange=function() {\r\n//\t\tloadpage(page_request, containerid)\r\n//\t}\r\n\r\n\r\n\t//I added this condition for making only ajax requests without showing the result on a certain DIV section\r\n\tif (containerid!=null)\r\n\t{\r\n\t\tpage_request.onreadystatechange=function() {\r\n\t\t\tloadpage(page_request, containerid)\r\n\t\t}\r\n\t}\r\n\r\n\tif (bustcachevar) //if bust caching of external page\r\n\t\tbustcacheparameter=(url.indexOf(\"?\")!=-1)? \"&\"+new Date().getTime() : \"?\"+new Date().getTime();\r\n\tpage_request.open('GET', url+bustcacheparameter, true);\r\n\tpage_request.send(null);\r\n}", "function ShowServiceRequestDetails(mapPoint, attributes, title) {\n // alert(title);\n map.infoWindow.hide();\n if (!isMobileDevice) {\n // dojo.byId('divCreateRequestContainer').style.display = \"none\";\n // dojo.byId('divServiceRequestContent').style.display = \"none\";\n }\n selectedMapPoint = mapPoint;\n // for (var i in attributes) {\n // if (!attributes[i]) {\n // attributes[i] = \"\";\n // }\n // }\n\n //selectedRequestStatus = attributes.STATUS;\n //map.getLayer(tempGraphicsLayerId).clear();\n map.infoWindow.resize(225, 120);\n //var screenPoint;\n //(isMobileDevice) ? map.centerAt(mapPoint) : map.setExtent(GetBrowserMapExtent(mapPoint));\n\n setTimeout(function () {\n screenPoint = map.toScreen(mapPoint);\n screenPoint.y = map.height - screenPoint.y;\n // if (isMobileDevice)\n // screenPoint = map.toScreen(mapPoint);\n // else {\n // screenPoint = map.toScreen(mapPoint);\n // screenPoint.y = map.height - screenPoint.y;\n // }\n map.infoWindow.show(screenPoint);\n //alert(title + \" new\");\n map.infoWindow.setTitle(title);\n // dojo.connect(map.infoWindow.imgDetailsInstance(), \"onclick\", function () {\n // map.infoWindow.hide();\n // if (isMobileDevice) {\n // selectedMapPoint = null;\n // map.infoWindow.hide();\n // ShowServiceRequestContainer();\n // }\n // else {\n // map.infoWindow.resize(300, 300);\n // screenPoint = map.toScreen(mapPoint);\n // screenPoint.y = map.height - screenPoint.y;\n // map.infoWindow.reSetLocation(screenPoint);\n // dojo.byId('divServiceRequestContent').style.display = \"block\";\n // }\n // ServiceRequestDetails(attributes);\n // });\n\n // map.infoWindow.resize(225, 120);\n // dojo.byId('divServiceRequestContent').style.display = \"block\";\n //ServiceRequestDetails(attributes);\n map.infoWindow.setContent(attributes);\n }, 0);\n}", "function adm_ajax_load()\n{\n\tadm_core = document.getElementById('adm_core');\n\tvar request = new XMLHttpRequest;\n\trequest.open('GET', 'sc_adm_content.php', true);\n\trequest.onload = function()\n\t{\n\t\tif (request.status >= 200 && request.status < 400)\n\t\t{\n\t\t\tvar resp = request.responseText;\n\t\t\tadm_core.innerHTML = resp;\n\t\t}\n\t};\n\trequest.send();\n}", "function showELCALCRowDetails()\r\n{\r\n var url =\"view&_nRow=\" + _nColLibRow;\r\n loadWorkArea(\"viewelcandalc.do\", url);\r\n}", "function navigationUniversal(divPanel, divName) {\r\n loadXMLDoc();\r\n xmlhttp.onreadystatechange = function () {\r\n if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {\r\n document.getElementById(\"main_ajax_loading_div\").style.visibility = \"hidden\";\r\n document.getElementById(\"addstockform\").innerHTML = xmlhttp.responseText;\r\n } else {\r\n document.getElementById(\"main_ajax_loading_div\").style.visibility = \"visible\";\r\n }\r\n };\r\n xmlhttp.open(\"POST\", \"include/php/stock/omAddNewForm.php?divPanel\" + divPanel + \"&divName\" + divName, true);\r\n xmlhttp.send();\r\n}", "function init_support_data() {\n if (supportid === '') {\n return;\n }\n\n if (!$('body').hasClass('small-table')) {\n toggle_small_view('.table-supports', '#support');\n }\n\n $.post(admin_url + 'supports/get_support_data/', {\n supportid: supportid\n }).success(function (response) {\n $('#support').html(response);\n reload_support_attachments();\n reload_assignees_select();\n init_supports_checklist_items();\n\n if (is_mobile()) {\n $('html, body').animate({\n scrollTop: $('#support').offset().top + 150\n }, 600);\n }\n });\n}", "function adaptContent() {\n if (desktopSite()) {\n // Position form submission status banner at top of container div\n $(\"#submitStatus\").css(\"top\", \"\");\n $(\"#submitStatus\").css(\"position\", \"absolute\");\n // Dark GitHub logo\n $(\"#githubDesktop\").css(\"display\", \"inline\");\n $(\"#githubMobile\").css(\"display\", \"none\");\n } else {\n // Position banner towards top of screen while in div, when above position at top of div\n if ($(window).scrollTop() + 40 > $(\"#contact\").offset().top) {\n $(\"#submitStatus\").css(\"top\", \"40px\");\n $(\"#submitStatus\").css(\"position\", \"fixed\");\n } else {\n $(\"#submitStatus\").css(\"top\", \"0px\");\n $(\"#submitStatus\").css(\"position\", \"relative\");\n }\n // Light GitHub logo\n $(\"#githubMobile\").css(\"display\", \"inline\");\n $(\"#githubDesktop\").css(\"display\", \"none\");\n }\n}", "function dealers_page_elementsExtraJS() {\n // screen (dealers_page) extra code\n\n }", "function DevicePreviewUtils() {\n 'use strict';\n \n this.createAjaxOptions = function (type, host, location, query) {\n var formedUrl = host + location,\n key,\n uri = new URI(formedUrl),\n options;\n \n \n for (key in query) {\n if (query.hasOwnProperty(key)) {\n uri.addSearch(key, query[key]);\n }\n }\n \n options = {\n 'type': type,\n 'url': uri.toString()\n };\n \n return options;\n };\n \n this.doAjaxGetRequest = function (host, location, query, successCallback, errorCallback) {\n var ajaxOptions = this.createAjaxOptions('GET', host, location, query);\n $.ajax(ajaxOptions).fail(function (jqXHR, textStatus, errorThrown) {\n // We got an error trying to run the work not sure what to do here\n console.log(\"call Failed!! \" + textStatus);\n errorCallback.call(jqXHR, errorThrown);\n }).done(function (data, textStatus, jqXHR) {\n console.log(\"call succeeded!!\");\n console.log(textStatus);\n successCallback.call(jqXHR, jqXHR.responseText);\n });\n };\n \n this.getAccessMethod = function () {\n var uri = new URI(window.location);\n return uri.search(true).m || '';\n };\n \n this.getDwSocketAppUrl = function () {\n return window.preview.config.DW_SERVER_PROTOCOL + '://' +\n window.preview.config.DW_SERVER_HOST +\n (window.preview.config.DW_SERVER_PORT ? ':' + window.preview.config.DW_SERVER_PORT : '');\n };\n \n this.convertPathArrayToString = function (pathArray) {\n if (!pathArray) {\n return '';\n }\n \n var path = '',\n index = 0;\n for (index = 0; index < pathArray.length; ++index) {\n var editedPath = pathArray[index];\n if (editedPath && editedPath.indexOf('DP_CLIENT_SOCKET_ID') !== -1) {\n editedPath = editedPath.replace('DP_CLIENT_SOCKET_ID', URI.encode(window.preview.socketApp.getSocket().id));\n }\n \n path += this.getDwSocketAppUrl() + editedPath;\n }\n return path;\n };\n}", "function ajaxRequest(ssActionUrl, ssData, ssUpdatedDivId, ssLoaderDivId)\n{\n $.ajax({\n url: ssActionUrl,\n type: \"POST\",\n data: ssData,\n beforeSend: function() {\n $(\"#\" + ssLoaderDivId).show();\n },\n success: function() {\n $(\"#\" + ssLoaderDivId).hide();\n $(\"#\" + ssUpdatedDivId).hide();\n },\n error: function() {\n $(\"#\" + ssLoaderDivId).hide();\n $(\"#\" + ssUpdatedDivId).show();\n }\n });\n return true;\n}", "function WebviewWebRequest() {}", "_handleRequestViewer(options)\n {\n var ajaxOptions = {\n url: options.resource.get('url') + 'acquire/',\n type: 'POST',\n dataType: 'json',\n success: (response) => this._handleSuccessAcquire(response)\n };\n $.ajax(ajaxOptions);\n }", "decideWichWindow(servioBtn)\r\n {\r\n let self = this\r\n\r\n console.log('START FROM LOADing DEAL FIELDS',this.deal);\r\n\r\n BX.ajax.runAction('ourcompany:servio.nmspc.handler.dealFields', {\r\n data: {\r\n DEAL_ID: this.deal.id, //в php принимаемый параметр должен иметь то же имя\r\n }\r\n })\r\n .then(\r\n (ajaxResult) => {\r\n\r\n console.log('Result Promice DEAL',ajaxResult);\r\n\r\n // повторяем то, что уже есть выше\r\n self.deal.reserveId = ajaxResult.data.UF_CRM_HMS_RESERVE_ID || 0;\r\n self.deal.reserveConfirmFileId = ajaxResult.data.UF_CRM_HMS_RESERVE_CONFIRM_FILE_ID;\r\n self.deal.reserveConfirmFile = ajaxResult.data.UF_CRM_HMS_RESERVE_CONFIRM_FILE;\r\n\r\n if(self.deal.id > 0 && self.deal.reserveId === 0)\r\n {\r\n //здесь popup с формой\r\n self.loadFormV6()\r\n }\r\n else if(self.deal.id > 0 && self.deal.reserveId > 0)\r\n {\r\n //здесь popup с полученным по id данными резерва\r\n self.loadServioPopupWithReserervationV4()\r\n }\r\n else\r\n {\r\n //иначе форма без возможности резерва\r\n self.loadFormV6()\r\n console.log('ШТА?');\r\n\r\n servioBtn.classList.remove('ui-btn-danger')\r\n servioBtn.classList.add('ui-btn-success')\r\n }\r\n })\r\n .catch(\r\n (ajaxResult) => {\r\n console.log('Errors: ', ajaxResult.errors);\r\n\r\n let title = ''\r\n for(let err of ajaxResult.errors)\r\n {\r\n title += err.message\r\n }\r\n console.log('EEEE',title);\r\n servioBtn.classList.remove('ui-btn-success')\r\n servioBtn.classList.add('ui-btn-danger')\r\n servioBtn.title = title\r\n }\r\n );\r\n\r\n }", "function ajaxDescProject(e) {\n \n}", "function loadWidget() {\n var div = document.getElementById('arqsiWidget');\n div.innerHTML =''; \n if (div.tagName == 'DIV') { \n sendCategoriasRequest(); \n buildMenuStrip();\n }\n}", "function loadHeaderTool(formName, recordGroupTypeId, recordId) {\n if (AddToListForm == true || UpdateRecordForm == true || EmailForm == true) {\n ShowProgress(null);\n $.ajax({\n async: false,\n dataType: \"html\",\n type: \"GET\",\n url: \"/ControlRequestServer/ControlRequestServerForm.aspx?control_name=\" + formName + \"&record_group_type_id=\" + recordGroupTypeId + \"&record_id=\" + recordId,\n success: function(data) {\n $(\"#divHeaderTools\").after(data);\n $(\".atl\").show();\n $(\".eaf\").show();\n $(\".ucc\").show();\n HideProgress(null);\n },\n error: function(xmlHttpRequest, status, errorThrown) {\n alert(xmlHttpRequest.Message);\n redirectOnTimeout(xmlHttpRequest.responseText);\n }\n });\n }\n // reset session timer\n resetTimer();\n AddToListForm = false;\n UpdateRecordForm = false;\n EmailForm = false;\n}", "function loadstd(resource,feedbackdiv,params) /////x-fetch page name e.g. allnews.php, >>> y-parameters e.g. ?id=x&category=c\n {\n \n fields=params;\n $.ajax({\n method:'GET',\n url:resource,\n data:fields,\n beforeSend:function()\n {\n $(\"#processing\").show();\n },\n \n complete:function ()\n {\n $(\"#processing\").hide(); \n },\n success: function(feedback)\n {\n $(feedbackdiv).html(feedback); \n \n }\n \n \n });\n }", "function FetchFieldsCaption(documentBody, strCulture, strFormID)\n{\n var requestURL = document.getElementById(\"txtHApplicationURL\").value + \"Forms/GlobalForms/GlobalPage.aspx?QSN=LFC&Culture=\" + strCulture+\"&FormID=\"+ strFormID;\n //DocumentBody = documentBody;\n XmlHttpSubmit(requestURL, FetchFieldsCaption_CallBack);\n}", "function addCommonAjaxData(data){\r\n\t\t\r\n\t\tdata[\"addontype\"] = g_addonsType;\r\n\t\tdata[\"manager_name\"] = g_manager.getManagerName();\r\n\t\t\r\n\t\tvar passData = g_manager.getManagerPassData();\r\n\t\tif(passData)\r\n\t\t\tdata[\"manager_passdata\"] = passData;\r\n\t\t\r\n\t\t\r\n\t\treturn(data);\r\n\t}", "function view_message(element)\n{\n var msgid = element.getParent().get('id').substr(7);\n\n var req = new Request.HTML({ url: api_request_path(\"queues\", \"view\", basepath),\n method: 'post',\n onRequest: function() {\n $('movespin').fade('in');\n },\n onSuccess: function(respTree, respElems, respHTML) {\n var err = respHTML.match(/^<div id=\"apierror\"/);\n\n if(err) {\n $('errboxmsg').set('html', respHTML);\n errbox.open();\n\n // No error, content should be form.\n } else {\n element.removeClass(\"new\");\n\n // Need to remove the new from the checkbox, too\n var check = element.getParent().getElementsByClassName('selctrl-opt');\n if(check && check[0]) {\n check[0].removeClass(\"new\");\n }\n\n var msgid = element.getParent().get('id').substr(7);\n\n var buttons = [ { title: messages['promote'], color: 'blue', event: function() { popbox.close(); promote_message(msgid); } },\n { title: messages['email'] , color: 'blue', event: function() { email_creator(msgid); } },\n { title: messages['reject'] , color: 'red' , event: function() { popbox.close(); reject_messages([msgid]); } },\n { title: messages['delete'] , color: 'red' , event: function() { popbox.close(); delete_messages([msgid]); } },\n { title: messages['cancel'] , color: 'blue', event: function() { popbox.close(); popbox.footer.empty(); } }\n ];\n\n $('poptitle').set('text', messages['view']);\n $('popbody').empty().set('html', respHTML);\n popbox.setButtons(buttons);\n new Element(\"img\", {'id': 'popspinner',\n 'src': spinner_url,\n width: 16,\n height: 16,\n 'class': 'workspin'}).inject(popbox.footer, 'top');\n popbox.open();\n }\n $('movespin').fade('out');\n refresh_queuelist();\n }\n });\n req.post({'id': msgid});\n}", "function LoadDiv(Sessionid)\n{\n \n\tvar url = requestURL + 'Order_' + Sessionid; \n\t \n\txmlHttp = GetXmlHttpObject(stateChangeHandlerGetDetailOrder);\n\txmlHttp_Get(xmlHttp, url);\n \n\n}", "function TermsServices_elementsExtraJS() {\n // screen (TermsServices) extra code\n\n }", "function partialPage(ops) {\n //var ops = {\n // context, subPage, setUrl, subContainer\n //}\n\n function init() {\n var subPage = ops.subPage;\n var subContainer = ops.subContainer;\n\n\n var loadMainPage = !$(subContainer).is(\"*\") || subPage == \"null\";\n var paramsStr = serialize(ops.params.toHash());\n\n /** check if main id was chagnged*/\n var lastParams = lastPage.split(\"?\")[1];\n var reloadPage = lastParams && splitAndLeave(lastParams, '=', true) != splitAndLeave(paramsStr, '=', true);\n\n /** if only layout loaded || this is not the right page || samepage diffrent main id\n redirect to main page url.*/\n if (loadMainPage || reloadPage) {\n subPage = \"main\";\n subContainer = null;\n\n }\n else {\n $(\".SiteSideMenu\").removeClass(\"selected\");\n $(\".SiteSideMenu[data-id=\" + subPage + \"]\").addClass(\"selected\");\n\n }\n\n var url = ops.setUrl(subPage) + \"?\" + paramsStr;\n\n changeUrl(ops.context, url, subContainer, function success() {\n if (loadMainPage || reloadPage) {\n\n /** if doesnt know sub menu id in advenced (example: \"machinePointId\") get from loaded menu*/\n if (ops.subPage == \"null\") {\n var refurishUrl = location.href.replace(\"null\", $(\".SiteSideMenu.selected\").data(\"id\"));\n /** loaded refbrsh with jobId and notreufbrihrtId*/\n if (ops.params.JobRefubrishPartID!==undefined && ops.params.JobRefubrishPartID == \"0\")\n refurishUrl = refurishUrl.replace(\"/0/\", \"/\" + $(\"#Parts\").val()+ \"/\" );\n\n return location.replace(refurishUrl);\n }\n\n init();\n }\n\n });\n }\n\n init();\n\n }", "function GetDeviceIP(){\n showBackgroundImage('wait_message');\n getContent('','/cgi-bin/setup.cgi?GetDeviceIP','function:ShowGetDeviceIP');\n}", "function _appendAllContainerDataToRequest(objHTMLAjax, divName)\r\n {\r\n var objCnt = getElemnt(this._mDivContainerName);\r\n\r\n if(typeof(divName)!='undefined')\r\n {\r\n objCnt = getElemnt(divName);\r\n }\r\n\r\n if(objCnt)\r\n {\r\n //todo\r\n _appendControlInfoToRequest(objHTMLAjax, objCnt, \"INPUT\");\r\n _appendControlInfoToRequest(objHTMLAjax, objCnt, \"SELECT\");\r\n _appendControlInfoToRequest(objHTMLAjax, objCnt, \"TEXTAREA\");\r\n }\r\n }", "function adminGetJobAd(outputDiv, mode){\r\n\t\r\n\t$.fn.smartLightBox.openDivlb(\"home-frame\",'load','loading...');\r\n\r\n\tvar strSessionKey = $(\"#sessionKey\").val();\r\n\t\r\n\tvar filter = $(\"#filter\").text();\r\n\t\r\n\tvar index = $(\"#browseIndex\").val();\r\n\tif(index < 0)\r\n\t\tindex = 0;\r\n\t\r\n\tif(mode == \"first\")\r\n\t\tindex = 0;\r\n\telse if(mode == \"next\")\r\n\t\tindex = parseInt(index)+15; //update index\r\n\telse if(mode == \"prev\")\r\n\t\tindex = parseInt(index)-15;\t \r\n\t\r\n\trequest = new Request;\r\n\trequest.addAction(\"adminGetJobAd\");\r\n\trequest.addParam(\"startingIndex\", index);\r\n\trequest.addParam(\"sessionKey\", strSessionKey);\r\n\trequest.addParam(\"filter\", filter);\r\n\r\n\t\r\n\tif (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari\r\n\t xmlhttp=new XMLHttpRequest();\r\n\t}\r\n\telse{// code for IE6, IE5\r\n\t xmlhttp=new ActiveXObject(\"Microsoft.XMLHTTP\");\r\n\t}\r\n\txmlhttp.onreadystatechange=function(){\r\n\t\t if (xmlhttp.readyState==4 && xmlhttp.status==200){\r\n\t\t\t \r\n\t\t\t buildAdminJobAdTb(\"jobAd\", outputDiv);//uibot\r\n\t\t\t \r\n\t\t\t\tvar xmlObj = $(\"jobAd\",xmlhttp.responseXML);\r\n\r\n\t\t\t\tif(xmlObj.length < 15 && index >= 15){//if this is the last page of results\r\n\t\t\t\t\t$(\"#prevButton\").attr(\"disabled\", false);\r\n\t\t\t\t\t$(\"#nextButton\").attr(\"disabled\", true);\r\n\t\t\t\t}\r\n\t\t\t\telse if(xmlObj.length < 15 && index < 15){ // if result size < 15 on first page\r\n\t\t\t\t\t$(\"#prevButton\").attr(\"disabled\", true);\r\n\t\t\t\t\t$(\"#nextButton\").attr(\"disabled\", true);\r\n\t\t\t\t}\r\n\t\t\t\telse if(index < 15){ // if first page\r\n\t\t\t\t\t$(\"#prevButton\").attr(\"disabled\", true);\r\n\t\t\t\t\t$(\"#nextButton\").attr(\"disabled\", false);\r\n\t\t\t\t}\r\n\t\t\t\telse{ // middle pages\r\n\t\t\t\t\t$(\"#prevButton\").attr(\"disabled\", false);\r\n\t\t\t\t\t$(\"#nextButton\").attr(\"disabled\", false);\r\n\t\t\t\t}\r\n\t\t\t $(\"#browseIndex\").val(index ); //increase index by 15\r\n\t\t }\r\n\t\t};\t \r\n\t//send the parameters to the servlet with POST\r\n\txmlhttp.open(\"POST\",\"../ServletAdmin\" ,true);\r\n\txmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\r\n\txmlhttp.send(request.toString());\r\n\t\r\n}", "function showRequestDiv() {\n\tvar requestDiv = document.getElementById('requestDiv');\n\tvar mainDiv = document.getElementById('mainDiv');\n\trequestDiv.style.display = 'block';\n\tmainDiv.style.display = 'none';\n\n\tvar requestButton = document.getElementById('requestPermissionsButton');\n\trequestButton.addEventListener('click', function(ev) {\n\t\tchrome.permissions.request(USBPermissions, function(result) {\n\t\t\tif (result) {\n\t\t\t\tchangeState(state.disconnected);\n\t\t\t} else {\n\t\t\t\tshowMainDiv();\n\t\t\t\terrorln('App was not granted the \"usbDevices\" persionssion');\n\t\t\t}\n\t\t});\n\t});\n}", "function page_getItems(request) {\r\n\r\n\r\n\r\n return _PROCESSFORM;\r\n}", "function menuTabInfo() {\n\n var featureRelId = getUrlVars()['transferId'];\n var userSiteId = getUrlVars()['touchId'];\n var featureId = getUrlVars()['mId'];\n\tvar featureName = getUrlVars()['featureName'];\n\tfeatureName = featureName.replace(/\\%20/g,' ');\n\tfeatureNameTitle(featureName);\n var url = baseUrl + 'web/web/getMenuHtml/' + featureId + '/' + featureRelId + '/' + userSiteId;\n\tvar globalBackground,globalTextColor;\n var data = '';\n doAjaxCall(url, data, false, function (html) {\n\t\tconsole.log(html);\n if ($.isEmptyObject(html)) {\n $('#main-content').html('Sorry we have an Empty data');\n } else {\n\n var data = '<ul data-role=\"listview\" data-inset=\"false\" data-divider-theme=\"d\" id=\"aboutclass\">';\n $.each(html, function (i, item) {\n\t\t\t\tdata += '<li data-role=\"list-divider\">' + item.section + '</li>';\n data += '<li><a href=\"menuDescription.html?id=' + item.menuId + '&transferId=' + featureRelId + '&touchId=' + userSiteId + '&mId=' + featureId + '&featureName=' + item.name + '\" rel=\"external\" >' ;\n\t\t\tif(item.thumbnail !='' && item.thumbnail!= null){\n\t\t\t\tdata += '<img src=\"'+baseUrl+item.thumbnail+'\">';\n\t\t\t\t}else{\n\t\t\t\tdata += '<img src=\"'+baseUrl+'assets/images/app_icon_114px.png\">';\n\t\t\t\t}\n\t\t\tdata += item.name + '<p class=\"ui-li-aside\"><strong>' + item.price + '</strong></p></a></li>';\t\t\n })\n data += '</ul>';\n $('#main-content').html(data);\n try {\n $(\"#aboutclass\").listview('refresh');\n } catch (e) {\n $(\"#aboutclass\").listview();\n }\n\n }\n getUserAppereance();\n });\n}", "function ajaxCommonGetFromNet(phpFileName, outPutStage){\n\t\t\t if(navigator.onLine){\n\t\t\t\t\tdocument.getElementById(\"mainModal\").innerHTML = \"<center><img src='load.gif' ><h1 style='color:black' class='lImg'>Loading...Please wait</h1></center>\";\n \t\t\t\t\tshowModal();\n\t\t\t\t\t\n\t\t\t\t\tvar xmlhttp = new XMLHttpRequest();\n \t\t\txmlhttp.onreadystatechange = function() {\n \t\t\tif (this.readyState === 4 && this.status == 200) {\n \t\t\t\tdocument.getElementById(outPutStage).innerHTML = this.responseText;\n\t\t\t\t\t\thideModal();\n \t\t\t\t}\n \t\t\t};\n \t\t\txmlhttp.open(\"GET\", phpFileName, true);//generating get method link\n \t\t\txmlhttp.send();\n\t\t\t }\n\t\t\telse {\n \t\t\t\tdocument.getElementById(\"mainModal\").innerHTML = \"<span class='close' onClick='hideModal()'>×</span><img src='noNet.png'><h1 style='color:black'>There is no Internet connection</h1>\";\n \t\t\t\t\tshowModal();\n \t\t\t\t}\n\t\t\t\n}" ]
[ "0.5925586", "0.5689611", "0.5610953", "0.54993784", "0.54674304", "0.5432253", "0.53773105", "0.5366764", "0.53481644", "0.53452724", "0.5335805", "0.5326828", "0.53225416", "0.53152746", "0.5305735", "0.52938116", "0.5292513", "0.5280812", "0.5278606", "0.5267955", "0.5263417", "0.52327937", "0.52311635", "0.5211706", "0.5200754", "0.520063", "0.51796144", "0.5173111", "0.5164726", "0.5164561", "0.51625746", "0.51491123", "0.51471573", "0.5122066", "0.5116643", "0.5113786", "0.51105285", "0.51074976", "0.5105383", "0.5102606", "0.510089", "0.50991696", "0.50990105", "0.50859296", "0.5081162", "0.50746894", "0.50722295", "0.50670093", "0.50541294", "0.50541294", "0.5044884", "0.5043169", "0.5043169", "0.50384665", "0.50356764", "0.5029676", "0.5025722", "0.5025722", "0.5025722", "0.5023706", "0.50217795", "0.50207907", "0.5002678", "0.49964064", "0.49955547", "0.4988675", "0.49877366", "0.49776062", "0.49775764", "0.49763715", "0.49754667", "0.49718153", "0.49697986", "0.49635226", "0.49623454", "0.49604425", "0.49530104", "0.49494663", "0.49446756", "0.494383", "0.4941296", "0.4934205", "0.49338832", "0.4933353", "0.4930489", "0.49264082", "0.49211973", "0.49206576", "0.49178657", "0.49172774", "0.4914331", "0.49133927", "0.4913179", "0.49114788", "0.49102235", "0.49089015", "0.49086666", "0.49067396", "0.490638", "0.4904862" ]
0.58486456
1
page specific functions SRC: _supportRequestCommon =====================================================================
function imposeSupportRequestSecurityUIRestrictions() { var divIdToSecure; divIdToSecure = '#supportRequestFormSave'; (isUserAuthorized('UPDATE_SUPPORT_REQUEST', false)) ? securityshow(divIdToSecure) : securityHide(divIdToSecure); divIdToSecure = '#supportRequestFormAdd'; (isUserAuthorized('INSERT_SUPPORT_REQUEST', false)) ? securityshow(divIdToSecure) : securityHide(divIdToSecure); divIdToSecure = '#supportRequestEntryDivId'; (isUserAuthorized('UPDATE_SUPPORT_REQUEST', false) || isUserAuthorized('INSERT_SUPPORT_REQUEST', false)) ? securityshow(divIdToSecure) : securityHide(divIdToSecure); if (!isUserAuthorized('INSERT_SUPPORT_REQUEST', false) && !isUserAuthorized('UPDATE_SUPPORT_REQUEST', false)) { securityLockForm('supportRequestForm', true); } if (!isUserAuthorized('INSERT_SUPPORT_REQUEST', false) && isFormEmpty('supportRequestForm')) { securityLockForm('supportRequestForm', true); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function test_request_filter_on_request_page() {}", "function init_support_requests(){\n\thideAllRequestPanel();\n\t$(\"#options-links li\").click(function() { \n\t\tvar target = $(this).attr( \"data-target\" );\n\t\t$(\"#options-links li\").removeClass('active');\n\t\t$(this).addClass('active');\n\t\thideAllRequestPanel();\n\t\t// Get Requests list from server\n\t\tvar request_type = target.split(\":\");\n\t\t//getRequestList(request_type[0],request_type[1]);\t\t\n\t});\t\n\t\n\t$(\"#new-request\").click(function() { \n\t\thideAllRequestPanel();\n\t\tinit_support_request_form();\n\t\tshowRequestPanel(\"new-request\");\n\t});\n\t\n\t$(\"#request-discard\").click(function() { \n\t\thideAllRequestPanel();\n\t\tshowRequestPanel(\"requests-list\");\n\t});\n//\tgetRequestList('all');\t\n\t//showReuestPanel(\"requests-list\");\n\t$(\"#requests-list\").click(function() { \n\t\thideAllRequestPanel();\n\t\tinit_support_request_form1();\n\t\tshowRequestPanel(\"requests-list\");\n\t});\n}", "function page_getItems(request) {\r\n\r\n\r\n\r\n return _PROCESSFORM;\r\n}", "function Request()\n{\t\t \n\t//region PRESERVE ExtraMethods For Request\n\t//endregion\n //region Contants\t\n var ACT_ADD = 10;\n var ACT_UPDATE = 11;\n var ACT_DELETE = 12;\n var ACT_CHANGE_PAGE = 13;\n var ACT_SHOW_EDIT = 14;\n var ACT_GET = 15;\n var _strPage = \"admin_request.php\";\n \n \n //endregion \n \n //region Public Functions\n \n this.btnSave_OnClick = btnSave_OnClick;\n function btnSave_OnClick() {\n core.disableControl(\"btnOK\", true);\n var isValid = true;\n\n\t\tvar requesID = core.trim(core.getObject(\"txtRequesID\").val());\n\t\tcore.ValidateInputTextBox('txtRequesID','');\n\t\tif(requesID == ''){\n\t\t\tcore.ValidateInputTextBox('txtRequesID','RequesID is required', isValid);\n\t\t\tisValid = false;\n\t\t}else if (requesID.length > 20) {\n\t\t\tcore.ValidateInputTextBox('txtRequesID','RequesID must be less than 20', isValid);\n\t\t\tisValid = false;\n\t\t}\n\n\t\tvar contentRequest = core.trim(core.getObject(\"txtContentRequest\").val());\n\t\tcore.ValidateInputTextBox('txtContentRequest','');\n\t\tif(contentRequest == ''){\n\t\t\tcore.ValidateInputTextBox('txtContentRequest','ContentRequest is required', isValid);\n\t\t\tisValid = false;\n\t\t}\n\t\tvar requestedBy = core.trim(core.getObject(\"txtRequestedBy\").val());\n\t\tcore.ValidateInputTextBox('txtRequestedBy','');\n\t\tif(requestedBy == ''){\n\t\t\tcore.ValidateInputTextBox('txtRequestedBy','RequestedBy is required', isValid);\n\t\t\tisValid = false;\n\t\t}else if (requestedBy.length > 20) {\n\t\t\tcore.ValidateInputTextBox('txtRequestedBy','RequestedBy must be less than 20', isValid);\n\t\t\tisValid = false;\n\t\t}\n\n\t\tvar requestedDate = core.trim(core.getObject(\"txtRequestedDate\").val());\n\t\tcore.ValidateInputTextBox('txtRequestedDate','');\n\t\tif(requestedDate == ''){\n\t\t\tcore.ValidateInputTextBox('txtRequestedDate','RequestedDate is required', isValid);\n\t\t\tisValid = false;\n\t\t}else if (core.ValidateDateTime(requestedDate) == false) {\n\t\t\tcore.getObject('txtRequestedDate')[0].focus();\n\t\t\tstrError += '<p>RequestedDate is invalid!</p>';\n\t\t}\n\n\t\tvar contentRespone = core.trim(core.getObject(\"txtContentRespone\").val());\n\t\tcore.ValidateInputTextBox('txtContentRespone','');\n\t\tif(contentRespone == ''){\n\t\t\tcore.ValidateInputTextBox('txtContentRespone','ContentRespone is required', isValid);\n\t\t\tisValid = false;\n\t\t}\n\t\tvar responedBy = core.trim(core.getObject(\"txtResponedBy\").val());\n\t\tcore.ValidateInputTextBox('txtResponedBy','');\n\t\tif(responedBy == ''){\n\t\t\tcore.ValidateInputTextBox('txtResponedBy','ResponedBy is required', isValid);\n\t\t\tisValid = false;\n\t\t}else if (responedBy.length > 20) {\n\t\t\tcore.ValidateInputTextBox('txtResponedBy','ResponedBy must be less than 20', isValid);\n\t\t\tisValid = false;\n\t\t}\n\n\t\tvar responedDate = core.trim(core.getObject(\"txtResponedDate\").val());\n\t\tcore.ValidateInputTextBox('txtResponedDate','');\n\t\tif(responedDate == ''){\n\t\t\tcore.ValidateInputTextBox('txtResponedDate','ResponedDate is required', isValid);\n\t\t\tisValid = false;\n\t\t}else if (core.ValidateDateTime(responedDate) == false) {\n\t\t\tcore.getObject('txtResponedDate')[0].focus();\n\t\t\tstrError += '<p>ResponedDate is invalid!</p>';\n\t\t}\n\n\t\tvar isApproved = core.trim(core.getObject(\"txtIsApproved\").val());\n\t\tcore.ValidateInputTextBox('txtIsApproved','');\n\t\tif(isApproved == ''){\n\t\t\tcore.ValidateInputTextBox('txtIsApproved','IsApproved is required', isValid);\n\t\t\tisValid = false;\n\t\t}\n\t \n if (isValid == false) {\n core.disableControl(\"btnOK\", false);\n return;\n }\n \n if (core.getObject(\"adddocmode\")[0].value == ADD_MODE) {\n insertNew();\n }\n else {\n edit();\n }\n }\n \n this.edit = edit;\n function edit() {\n\n\t\tvar requesID = core.trim(core.getObject(\"txtRequesID\").val());\n\t\tvar contentRequest = core.trim(core.getObject(\"txtContentRequest\").val());\n\t\tvar requestedBy = core.trim(core.getObject(\"txtRequestedBy\").val());\n\t\tvar requestedDate = core.trim(core.getObject(\"txtRequestedDate\").val());\n\t\tvar contentRespone = core.trim(core.getObject(\"txtContentRespone\").val());\n\t\tvar responedBy = core.trim(core.getObject(\"txtResponedBy\").val());\n\t\tvar responedDate = core.trim(core.getObject(\"txtResponedDate\").val());\n\t\tvar isApproved = core.trim(core.getObject(\"txtIsApproved\").val());\n\t \n strRequest = \"?isAJ=1&act=\" + ACT_UPDATE + \n '&RequesID='+ core.urlencode(requesID)+\n\t\t\t'&ContentRequest='+ core.urlencode(contentRequest)+\n\t\t\t'&RequestedBy='+ core.urlencode(requestedBy)+\n\t\t\t'&RequestedDate='+ core.urlencode(requestedDate)+\n\t\t\t'&ContentRespone='+ core.urlencode(contentRespone)+\n\t\t\t'&ResponedBy='+ core.urlencode(responedBy)+\n\t\t\t'&ResponedDate='+ core.urlencode(responedDate)+\n\t\t\t'&IsApproved='+ core.urlencode(isApproved)+\t\t;\n \n var ajax = new Ajax();\n ajax.SendRequestToServerWithCustomMsg(_strPage, strRequest, edit_OnCallBack, true, MSG_AJAX_FETCHING_VN);\n }\n\n function edit_OnCallBack(xmlHTTPRequest) {\n core.disableControl(\"btnOK\", false);\n if (xmlHTTPRequest.readyState == 4) {\n if (xmlHTTPRequest.status == 200) {\n var strRespond = core.parserXML(xmlHTTPRequest.responseText);\n if (!core.headerProcessingArr(strRespond[0], Array(true, true, false))) {\n // ph?i kh?i t?o l?i d? tr?nh d?ng popdiv addFavourite\n //var popDiv = new PopDiv();\n //popDiv.init();\n popDiv.alert(MSG_RES_OPERATION_FAIL, SYSTEM_TITLE_ERROR, 1);\n return;\n }\n if (parseInt(strRespond[1]['rs']) == 1) {\n showInfoBar('success', strRespond[1][\"inf\"]);\n showAddMode();\n changePage(_strPage, ACT_CHANGE_PAGE, core.getObject(\"txtPage\").val());\n }\n else {\n //var popDiv = new PopDiv();\n //popDiv.init();\n top.popDiv.childPop.alert(strRespond[1][\"inf\"], SYSTEM_TITLE_ERROR, 1);\n }\n }\n }\n }\n \n this.insertNew = insertNew;\n function insertNew() {\n\n\t\tvar requesID = core.trim(core.getObject(\"txtRequesID\").val());\n\t\tvar contentRequest = core.trim(core.getObject(\"txtContentRequest\").val());\n\t\tvar requestedBy = core.trim(core.getObject(\"txtRequestedBy\").val());\n\t\tvar requestedDate = core.trim(core.getObject(\"txtRequestedDate\").val());\n\t\tvar contentRespone = core.trim(core.getObject(\"txtContentRespone\").val());\n\t\tvar responedBy = core.trim(core.getObject(\"txtResponedBy\").val());\n\t\tvar responedDate = core.trim(core.getObject(\"txtResponedDate\").val());\n\t\tvar isApproved = core.trim(core.getObject(\"txtIsApproved\").val());\n\t \n strRequest = \"?isAJ=1&act=\" + ACT_ADD + \n '&RequesID='+ core.urlencode(requesID)+\n\t\t\t'&ContentRequest='+ core.urlencode(contentRequest)+\n\t\t\t'&RequestedBy='+ core.urlencode(requestedBy)+\n\t\t\t'&RequestedDate='+ core.urlencode(requestedDate)+\n\t\t\t'&ContentRespone='+ core.urlencode(contentRespone)+\n\t\t\t'&ResponedBy='+ core.urlencode(responedBy)+\n\t\t\t'&ResponedDate='+ core.urlencode(responedDate)+\n\t\t\t'&IsApproved='+ core.urlencode(isApproved)+\t\t;\n \n var ajax = new Ajax();\n ajax.SendRequestToServerWithCustomMsg(_strPage, strRequest, insertNew_OnCallBack, true, MSG_AJAX_FETCHING_VN);\n }\n\n function insertNew_OnCallBack(xmlHTTPRequest) {\n core.disableControl(\"btnOK\", false);\n if (xmlHTTPRequest.readyState == 4) {\n if (xmlHTTPRequest.status == 200) {\n var strRespond = core.parserXML(xmlHTTPRequest.responseText);\n if (!core.headerProcessingArr(strRespond[0], Array(true, true, false))) {\n // ph?i kh?i t?o l?i d? tr?nh d?ng popdiv addFavourite\n //var popDiv = new PopDiv();\n //popDiv.init();\n popDiv.alert(MSG_RES_OPERATION_FAIL, SYSTEM_TITLE_ERROR, 1);\n return;\n }\n if (parseInt(strRespond[1]['rs']) == 1) {\n showInfoBar('success', strRespond[1][\"inf\"]);\n showAddMode();\n changePage(_strPage, ACT_CHANGE_PAGE, 1);\n }\n else {\n //var popDiv = new PopDiv();\n //popDiv.init();\n top.popDiv.childPop.alert(strRespond[1][\"inf\"], SYSTEM_TITLE_ERROR, 1);\n }\n }\n }\n }\n \n var _cacheURL_pdoc;\n this.deleteObj = deleteObj;\n function deleteObj(id, name) {\n //curRow = currentRowId;\n popDiv.alert('Do you want to delete ' + name + ' ?', SYSTEM_TITLE_ERROR, 2, \"_objRequest.delete_OK()\", \"_objRequest.delete_Cancel()\");\n\n var keyword = '';\n if (typeof core.getObject(\"txtGet\") != 'undefined') {\n keyword = core.getObject(\"txtGet\").val();\n }\n \n _cacheURL_pdoc = _strPage + \"?isAJ=1&act=\" + ACT_DELETE + \"&id=\" + docid + \"&p=\" + core.getObject(\"txtPage\")[0].value + \"&kw=\" + keyword;\n }\n this.delete_Cancel = delete_Cancel;\n function delete_Cancel() {\n //core.getObject(\"adddocmode\")[0].value = ADD_MODE;\n }\n this.delete_OK = delete_OK;\n function delete_OK() {\n // Prepare AJAX to remove selected doc from favorite list\n var ajax = new Ajax(METHOD_GET);\n ajax.SendRequestToServerWithCustomMsg(_cacheURL_pdoc, null, delete_OnCallBack, true, MSG_AJAX_FETCHING_VN);\n }\n function delete_OnCallBack(xmlHTTPRequest) {\n\n if (xmlHTTPRequest.readyState == 4) {\n if (xmlHTTPRequest.status == 200) {\n var strRespond = core.parserXML(xmlHTTPRequest.responseText);\n\n if (!core.headerProcessingArr(strRespond[0], Array(true, true, false))) {\n popDiv.alert(MSG_RES_OPERATION_FAIL, SYSTEM_TITLE_ERROR, 1);\n return;\n }\n if (parseInt(strRespond[1]['rs']) == 1) {\n parent.window.showInfoBar('success', strRespond[1][\"inf\"]);\n core.getObject(\"txtPage\")[0].value = strRespond[1][\"p\"];\n popDiv.hide();\n core.getObject(\"list-content\")[0].innerHTML = strRespond[1]['list'];\n }\n else //if(parseInt(strRespond[3]) == -1)\n {\n popDiv.alert(MSG_RES_OPERATION_FAIL, SYSTEM_TITLE_ERROR, 1);\n }\n }\n }\n }\n \n this.showEdit = showEdit;\n function showEdit(strID) {\n showAddMode();\n strRequest = \"?isAJ=1&act=\" + ACT_SHOW_EDIT + \"&id=\" + strID; ;\n var ajax = new Ajax(METHOD_GET);\n ajax.SendRequestToServerWithCustomMsg(_strPage + strRequest, null, showEdit_OnCallBack, true, MSG_AJAX_FETCHING_VN);\n\n }\n function showEdit_OnCallBack(xmlHTTPRequest) {\n\n if (xmlHTTPRequest.readyState == 4) {\n if (xmlHTTPRequest.status == 200) {\n var strRespond = core.parserXML(xmlHTTPRequest.responseText);\n if (!core.headerProcessingArr(strRespond[0], Array(true, true, false))) {\n popDiv.alert(MSG_RES_OPERATION_FAIL, SYSTEM_TITLE_ERROR, 1);\n return;\n }\n if (parseInt(strRespond[1]['rs']) == 1) {\n showInfoBar('success', MSG_RES_OPERATION_SUCCESS);\n //alert(strRespond[1]['sens']);\n // Add Doc && clear field\n\t\t\t\t\tcore.getObject('txtRequesID').val(RequesID);\n\t\t\t\t\tcore.getObject('txtContentRequest').val(ContentRequest);\n\t\t\t\t\tcore.getObject('txtRequestedBy').val(RequestedBy);\n\t\t\t\t\tcore.getObject('txtRequestedDate').val(RequestedDate);\n\t\t\t\t\tcore.getObject('txtContentRespone').val(ContentRespone);\n\t\t\t\t\tcore.getObject('txtResponedBy').val(ResponedBy);\n\t\t\t\t\tcore.getObject('txtResponedDate').val(ResponedDate);\n\t\t\t\t\tcore.getObject('txtIsApproved').val(IsApproved);\n core.getObject(\"adddocmode\")[0].value = EDIT_MODE;\n core.getObject(\"status-add\")[0].innerHTML = 'Edit mode';\n }\n else // Duplicate\n {\n popDiv.alert(MSG_RES_OPERATION_FAIL, SYSTEM_TITLE_ERROR, 1);\n }\n }\n }\n }\n \n this.showAddMode = showAddMode;\n function showAddMode() {\n core.getObject(\"adddocmode\")[0].value = ADD_MODE;\n core.getObject(\"status-add\")[0].innerHTML = 'Add mode';\n\t\tcore.getObject('txtRequesID').val('');\n\t\tcore.getObject('txtContentRequest').val('');\n\t\tcore.getObject('txtRequestedBy').val('');\n\t\tcore.getObject('txtRequestedDate').val('');\n\t\tcore.getObject('txtContentRespone').val('');\n\t\tcore.getObject('txtResponedBy').val('');\n\t\tcore.getObject('txtResponedDate').val('');\n\t\tcore.getObject('txtIsApproved').val('');\n }\n //endregion \n}", "function RequestLoadGeneralData() {\n\n}", "function _page1_page() {\n}", "function IndexInit(LangResources) {\n\n\n\n function EnableDateFilterRequests() {\n if ($('.check-range-date').is(':checked')) {\n $('#checkdate').val('true');\n $('#txt_RequestStartDate').prop(\"disabled\", false);\n $('#txt_RequestEndDate').prop(\"disabled\", false);\n } else {\n $('#checkdate').val('false');\n $('#txt_RequestStartDate').prop(\"disabled\", true);\n $('#txt_RequestEndDate').prop(\"disabled\", true);\n }\n }\n\n var StatusToSelect = $(\"#SelectedDefaultStatus\").val().split(\",\");\n\n $('#txt_RequestNumber').maxlength();\n $('#txt_Responsible').maxlength();\n function ShowHidePagesRequests(activepage, PublicPrivateSeparator) {\n $('.custompager_' + PublicPrivateSeparator).hide();\n var PageCount = $('#PageCount_' + PublicPrivateSeparator).val();\n\n $('#custom_page_' + PublicPrivateSeparator + '_1').show();\n var rango_ini = activepage - 5;\n for (var i = activepage; i > rango_ini; i--) {\n $('#custom_page_' + PublicPrivateSeparator + '_' + i).show();\n }\n if (rango_ini > 1) {\n $('<li class=\"temp_li\"><a >...</a></li>').insertAfter('#custom_page_' + PublicPrivateSeparator + '_1');\n }\n\n var rango_fin = activepage + 5;\n for (var i = activepage; i < rango_fin; i++) {\n $('#custom_page_' + PublicPrivateSeparator + '_' + i).show();\n }\n if (rango_fin < PageCount) {\n $('<li class=\"temp_li\"><a >...</a></li>').insertBefore('#custom_page_' + PublicPrivateSeparator + '_' + PageCount);\n }\n $('#custom_page_' + PublicPrivateSeparator + '_' + PageCount).show();\n\n $('.custompager_' + PublicPrivateSeparator).removeClass(\"active\");\n $('#custom_page_' + PublicPrivateSeparator + '_' + activepage).addClass(\"active\");\n }\n function ChangeStatus(NewStatus, RequestResponsibleID) {\n var RequestIDs = [];\n var SingleRequestID = $(\"#Mo_AssRes_RequestID\").val();\n if (SingleRequestID != null && SingleRequestID != \"\" && SingleRequestID != \"0\") {\n RequestIDs.push($(\"#Mo_AssRes_RequestID\").val());\n } else {\n $(\".chk_all_request:checked\").each(function () {\n RequestIDs.push($(this).data(\"requestid\"));\n });\n }\n\n ShowProgressBar();\n $.post(\"/KioskRequestAdministrator/ChangeStatusRequest\", {\n RequestIDs: RequestIDs.join(),\n NewStatus: NewStatus,\n RequestResponsibleID: RequestResponsibleID,\n Comments: $('#txta_Comment').val()\n }).done(function (data) {\n notification(\"\", data.ErrorMessage, data.notifyType);\n\n if (data.ErrorCode == 0) {\n if (NewStatus == \"Assigned\") {\n $(\"#mo_AssignRequest\").modal(\"toggle\");\n } else {\n $(\"#mo_RequestStatusChange\").modal(\"toggle\");\n }\n\n SearchRequestData();\n }\n\n }).fail(function (xhr, textStatus, error) {\n notification(\"\", error.message, \"error\");\n }).always(function () {\n HideProgressBar();\n });\n\n }\n function ValidateSelectedRequisitions() {\n var RequestIDs = [];\n var ReturnValue = true;\n\n $(\".chk_all_request:checked\").each(function () {\n RequestIDs.push($(this).data(\"requestid\"));\n });\n if (RequestIDs.length == 0) {\n ReturnValue = false;\n }\n\n return ReturnValue;\n }\n function SearchRequestData() {\n //variables\n var RequestTypeIDs = $(\"#ddl_RequestTypes\").val();\n var RequestStatusIDs = $(\"#ddl_RequestStatus\").val();\n var DepartmentIDs = $(\"#ddl_RequestDepartment\").val();\n var StartDate = $(\"#txt_RequestStartDate\").val();\n var EndDate = $(\"#txt_RequestEndDate\").val();\n var RequestResponsible = $(\"#txt_Responsible\").val();\n var FacilityIDs = $(\"#ddl_UserFacilities\").val();\n var ShiftIDs = $(\"#ddl_ShiftsList\").val();\n\n //validaciones\n if (!($(\"#checkbox-filter-date\").is(\":checked\"))) {\n StartDate = null;\n EndDate = null;\n }\n if (RequestTypeIDs != null) {\n RequestTypeIDs = $(\"#ddl_RequestTypes\").val().join();\n }\n if (RequestStatusIDs != null) {\n RequestStatusIDs = $(\"#ddl_RequestStatus\").val().join();\n }\n\n if (DepartmentIDs != null) {\n DepartmentIDs = $(\"#ddl_RequestDepartment\").val();\n }\n\n if (FacilityIDs != null) {\n FacilityIDs = $(\"#ddl_UserFacilities\").val().join(',');\n }\n\n if (FacilityIDs == null) {\n FacilityIDs = \"\";\n }\n\n if (ShiftIDs != null) {\n ShiftIDs = $(\"#ddl_ShiftsList\").val().join(',');\n }\n\n if (ShiftIDs == null) {\n ShiftIDs = \"\";\n }\n\n ShowProgressBar();\n $.get(\"/KioskRequestAdministrator/SearchRequestData\", {\n RequestNumber: $(\"#txt_RequestNumber\").val(),\n RequestTypeIDs: RequestTypeIDs,\n RequestStatusIDs: RequestStatusIDs,\n StartDate: StartDate,\n EndDate: EndDate,\n DepartmentIDs: DepartmentIDs,\n EmployeeInfo: $(\"#txt_RequestEmployee\").val(),\n RequestDescription: $(\"#txt_RequestDescription\").val(),\n RequestResponsible: RequestResponsible,\n FacilityIDs: FacilityIDs,\n ShiftIDs: ShiftIDs\n }).done(function (data) {\n $('#div_RequestList').html(data);\n RegisterPluginDataTable(100);\n\n $(\".request_row\").each(function () {\n if ($(this).data(\"requestnumber\") == $(\"#txt_RequestNumber\").val()) {\n $(this).find(\".details-control\").click();\n }\n });\n }).fail(function (xhr, textStatus, error) {\n notification(\"\", error.message, \"error\");\n }).always(function () {\n HideProgressBar();\n });\n }\n\n function PrepareMultipleList(selector, SpecialOptionsToSelect) {\n var PrepareMultipleSelected = \"\";\n if (SpecialOptionsToSelect == \"All\") {\n $(selector + \" option\").each(function (k, v) {\n $(this).attr(\"selected\", true);\n $(this).addClass(\"selected\");\n $(this).selectpicker(\"refresh\");\n PrepareMultipleSelected += \", \" + $(this).text();\n });\n } else {\n //Para que esta parte funcione, se uso una lista normal para usar el ValueID de los catalogos\n $(selector + \" option\").each(function (k, v) {\n if (SpecialOptionsToSelect.includes($(this).data(\"valueid\"))) {\n $(this).attr(\"selected\", true);\n $(this).addClass(\"selected\");\n $(this).selectpicker(\"refresh\");\n PrepareMultipleSelected += \", \" + $(this).text();\n }\n });\n }\n PrepareMultipleSelected = PrepareMultipleSelected.substr(2, PrepareMultipleSelected.length);\n $(selector).attr(\"title\", PrepareMultipleSelected);\n $(selector).selectpicker(\"refresh\");\n }\n function RequestStatusChange(StatusName, RequestNumber, AlertText, StatusTypeChange, RequestID) {\n var IsValid = false;\n if (RequestNumber != null) {\n IsValid = true\n } else {\n IsValid = ValidateSelectedRequisitions();\n }\n\n if (IsValid) {\n var RequestNumbers = \"\";\n if (RequestNumber == null) {\n $(\".chk_all_request:checked\").each(function () {\n RequestNumbers += \", \" + $(this).closest(\"tr\").data(\"requestnumber\");\n });\n RequestNumbers = RequestNumbers.substring(2, RequestNumbers.length);\n } else {\n RequestNumbers = RequestNumber\n }\n\n ShowProgressBar();\n $.get(\"/KioskRequestAdministrator/GetRequestStatusChangeModal\", {\n StatusTypeChange: StatusTypeChange,\n RequestID: RequestID\n }).done(function (data) {\n $(\"#root_modal\").html(data);\n $(\"#mo_RequestStatusChange\").modal(\"show\");\n\n $(\"#ttl_StatusChangeTitle\").text(StatusName);\n $(\"#span_RequestNumbers\").text(RequestNumbers);\n\n $(\"#span_AlertText\").text(AlertText);\n\n HideProgressBar();\n }).fail(function (xhr, textStatus, error) {\n notification(\"\", error.message, \"error\");\n }).always(function () {\n HideProgressBar();\n });\n } else {\n notification(\"\", LangResources.msg_RequisitionMandatory, \"_ntf\");\n }\n }\n\n //Date Picker\n $('.datepicker-demo').datepicker({\n autoclose: true,\n format: 'yyyy-mm-dd',\n language: LangResources.culture\n });\n //Initialize\n $(\"select\").selectpicker();\n $(\"#ddl_UserFacilities\").selectpicker('selectAll');\n $(\"#ddl_ShiftsList\").selectpicker('selectAll');\n //ShowHidePagesRequests(1, \"public\");\n $(\"#tab_PublicRequestsList\").addClass(\"active\");\n $(\".customdatepicker\").datepicker({ format: 'yyyy-mm-dd' });\n $(\"#checkbox-filter-date\").iCheck();\n PrepareMultipleList(\"#ddl_RequestTypes\", \"All\");\n PrepareMultipleList(\"#ddl_RequestStatus\", StatusToSelect);\n EnableDateFilterRequests();\n $(\"#request_count\").text($(\".notification_count\").length);\n\n if ($(\"#PostedRequestNumber\").val() != null) {\n $(\"#txt_RequestNumber\").val($(\"#PostedRequestNumber\").val());\n $(\"#pnlRequestFilters\").css(\"display\", \"none\");\n }\n SearchRequestData();\n\n //Events\n $(document).on(\"ifChanged\", \".check-range-date\", function (e) {\n e.stopImmediatePropagation();\n EnableDateFilterRequests();\n });\n\n $(document).on(\"click\", \"#btn_RequestSearch\", function (e) {\n e.stopImmediatePropagation();\n SearchRequestData();\n });\n\n $(document).on(\"click\", \".view-request\", function (e) {\n e.stopImmediatePropagation();\n ShowProgressBar();\n $.get(\"/KioskRequestAdministrator/GetViewRequestModal\", {\n RequestID: $(this).data(\"requestid\")\n }).done(function (data) {\n $(\"#root_modal\").html(data);\n $(\"#mo_RequestView\").modal(\"show\");\n HideProgressBar();\n }).fail(function (xhr, textStatus, error) {\n notification(\"\", error.message, \"error\");\n }).always(function () {\n HideProgressBar();\n });\n });\n\n $(document).on(\"change\", \".RequestFilters\", function (e) {\n e.stopImmediatePropagation();\n $(\"#div_RequestList\").html(\"\");\n });\n\n $(document).on(\"keydown\", \".RequestFilters\", function (e) {\n e.stopImmediatePropagation();\n $(\"#div_RequestList\").html(\"\");\n });\n\n $(document).on(\"change\", \".chk_all_requests\", function (e) {\n e.stopImmediatePropagation();\n if ($(this).is(\":checked\")) {\n $(\".chk_all_request\").prop('checked', true);\n } else {\n $(\".chk_all_request\").prop('checked', false);\n }\n });\n\n\n //Begin: Eventos para cambios de status por lotes\n\n $(document).on(\"click\", \"#btn_AssignRequest\", function (e) {\n e.stopImmediatePropagation();\n\n if (ValidateSelectedRequisitions()) {\n var RequestIDs = \"\"\n $(\".chk_all_request:checked\").each(function () {\n RequestIDs += \", \" + $(this).data(\"requestnumber\");\n });\n RequestIDs = RequestIDs.substr(2, RequestIDs.length);\n\n ShowProgressBar();\n $.get(\"/KioskRequestAdministrator/GetAssignResponsibleModal\", {\n\n }).done(function (data) {\n $(\"#root_modal\").html(data);\n $(\"#ddl_ResponsiblesList\").selectpicker();\n $(\"#mo_AssignRequest\").modal(\"show\");\n //$(\"#txt_AssignResponsible\").focus();\n $(\"#span_RequestNumbers\").text(RequestIDs);\n //AutoCompleteDrop();\n HideProgressBar();\n }).fail(function (xhr, textStatus, error) {\n notification(\"\", error.message, \"error\");\n }).always(function () {\n HideProgressBar();\n });\n } else {\n notification(\"\", LangResources.msg_RequisitionMandatory, \"_ntf\");\n }\n\n });\n\n $(document).on(\"click\", \"#btn_MarkDoneRequest\", function (e) {\n e.stopImmediatePropagation();\n RequestStatusChange(LangResources.lbl_MarkDone, null, null, \"MarkDone\");\n });\n\n $(document).on(\"click\", \"#btn_CancelRequest\", function (e) {\n e.stopImmediatePropagation();\n RequestStatusChange(LangResources.lbl_CancelRequest, null, LangResources.lbl_CancelRequestAlertText, \"Cancel\");\n });\n\n $(document).on(\"click\", \"#btn_CloseRequest\", function (e) {\n e.stopImmediatePropagation();\n RequestStatusChange(LangResources.btn_CloseRequest, null, null, \"Close\");\n });\n\n $(document).on(\"click\", \"#btn_RejectRequest\", function (e) {\n e.stopImmediatePropagation();\n RequestStatusChange(LangResources.lbl_RejectRequest, null, LangResources.lbl_RejectRequestAlertText, \"Reject\");\n });\n\n $(document).on(\"click\", \"#btn_ReopenRequest\", function (e) {\n e.stopImmediatePropagation();\n RequestStatusChange(LangResources.lbl_ReOpenRequest, null, LangResources.lbl_ReOpenRequestAlertText, \"ReOpen\");\n });\n\n $(document).on(\"click\", \"#btn_SaveAssignResponsible\", function (e) {\n e.stopImmediatePropagation();\n SetConfirmBoxAction(function () {\n var idAsigned = $(\"#txt_AssignResponsible option:selected\").val();\n ChangeStatus(\"Assigned\", idAsigned);\n }, LangResources.msg_ConfirmMarkRequestAssign);\n });\n\n //End: Eventos para cambios de status por lotes\n\n\n\n\n //Guardar cambios de estado en requisiciones\n $(document).on(\"click\", \"#btn_SaveRequisitionNewStatus\", function (e) {\n e.stopImmediatePropagation();\n var WarningMessage = $(this).data(\"warningmessage\");\n var StatusType = $(this).data(\"statustype\");\n\n SetConfirmBoxAction(function () {\n ChangeStatus(StatusType, \"\");\n }, WarningMessage);\n });\n\n //Paginado\n $(document).on(\"click\", \".custompager\", function (e) {\n e.stopImmediatePropagation();\n SearchRequestData();\n });\n\n\n\n //Begin: Eventos para cambios de status individuales\n\n $(document).on(\"click\", \"#btn_CloseSinglePublicRequestView\", function (e) {\n e.stopImmediatePropagation();\n $(\"#mo_RequestView\").modal(\"toggle\");\n });\n\n $(document).on(\"click\", \".btn_TblAssignResponsible\", function (e) {\n e.stopImmediatePropagation();\n var RequestID = $(this).data(\"requestid\");\n var RequestNumber = $(this).closest(\"tr\").data(\"requestnumber\");\n\n ShowProgressBar();\n $.get(\"/KioskRequestAdministrator/GetAssignResponsibleModal\", {\n RequestID: RequestID\n }).done(function (data) {\n\n $(\"#root_modal\").html(data);\n $(\"#ddl_ResponsiblesList\").selectpicker();\n $(\"#mo_AssignRequest\").modal(\"show\");\n\n //$(\"#txt_AssignResponsible\").focus();\n $(\"#Mo_AssRes_RequestID\").val(RequestID);\n $(\"#span_RequestNumbers\").text(RequestNumber);\n //AutoCompleteDrop();\n //document.getElementsByName(\"Mo_AssRes_RequestID\")[0].value = RequestID\n\n HideProgressBar();\n }).fail(function (xhr, textStatus, error) {\n notification(\"\", error.message, \"error\");\n }).always(function () {\n HideProgressBar();\n });\n });\n\n $(document).on(\"click\", \".btn_TblCancelRequest\", function (e) {\n e.stopImmediatePropagation();\n var RequestNumber = $(this).closest(\"tr\").data(\"requestnumber\");\n var RequestID = $(this).closest(\"tr\").data(\"requestid\");\n RequestStatusChange(LangResources.lbl_CancelRequest, RequestNumber, LangResources.lbl_CancelRequestAlertText, \"Cancel\", RequestID);\n });\n\n $(document).on(\"click\", \".btn_TblRejectRequest\", function (e) {\n e.stopImmediatePropagation();\n var RequestNumber = $(this).closest(\"tr\").data(\"requestnumber\");\n var RequestID = $(this).closest(\"tr\").data(\"requestid\");\n RequestStatusChange(LangResources.lbl_RejectRequest, RequestNumber, LangResources.lbl_RejectRequestAlertText, \"Reject\", RequestID);\n });\n\n $(document).on(\"click\", \".btn_TblMarkDoneRequest\", function (e) {\n e.stopImmediatePropagation();\n var RequestNumber = $(this).closest(\"tr\").data(\"requestnumber\");\n var RequestID = $(this).closest(\"tr\").data(\"requestid\");\n RequestStatusChange(LangResources.lbl_MarkDone, RequestNumber, null, \"MarkDone\", RequestID);\n\n });\n\n $(document).on(\"click\", \".btn_TblReOpen\", function (e) {\n e.stopImmediatePropagation();\n var RequestNumber = $(this).closest(\"tr\").data(\"requestnumber\");\n var RequestID = $(this).closest(\"tr\").data(\"requestid\");\n RequestStatusChange(LangResources.lbl_ReOpenRequest, RequestNumber, LangResources.lbl_ReOpenRequestAlertText, \"ReOpen\", RequestID);\n\n });\n\n $(document).on(\"click\", \".btn_TblClose\", function (e) {\n e.stopImmediatePropagation();\n var RequestNumber = $(this).closest(\"tr\").data(\"requestnumber\");\n var RequestID = $(this).closest(\"tr\").data(\"requestid\");\n RequestStatusChange(LangResources.lbl_CloseRequest, RequestNumber, LangResources.lbl_RejectRequestAlertText, \"Close\", RequestID);\n\n });\n //End: Eventos para cambios de status individuales\n\n\n\n $(\"#ddl_RequestStatus\").change(function () {\n if ($(\"#ddl_RequestStatus option:selected\").length == 0) {\n $(\"#ddl_RequestStatus\").attr(\"title\", \"\");\n $(\"#ddl_RequestStatus\").selectpicker(\"refresh\");\n }\n });\n\n $(\"#ddl_RequestTypes\").change(function () {\n if ($(\"#ddl_RequestTypes option:selected\").length == 0) {\n $(\"#ddl_RequestTypes\").attr(\"title\", \"\");\n $(\"#ddl_RequestTypes\").selectpicker(\"refresh\");\n }\n });\n\n\n\n //expandir detalles con plugin DataTable\n $(document).on('click', 'td.details-control', function (e) {\n e.stopImmediatePropagation();\n\n var tr = $(this).closest('tr');\n\n if (tr.hasClass(\"shown\")) {\n $('div.slider', tr.next()).slideUp(function () {\n tr.next().remove();\n tr.removeClass('shown');\n });\n } else {\n\n var RequestID = tr.data(\"requestid\");\n\n ShowProgressBar();\n // abrir detalles y devolver detalles de una llamada ajax\n $.get(\"/HR/KioskRequestAdministrator/GetRequestLog\", {\n RequestID\n }).done(function (data) {\n tr.after('');\n tr.after('<tr><td colspan=\"13\" class=\"padding-0\">' + data + '</td></tr>');\n tr.addClass('shown');\n $('div.slider', tr.next()).slideDown();\n HideProgressBar();\n });\n }\n });\n\n $(document).on('click', \".btn-read-notify\", function (e) {\n e.stopImmediatePropagation();\n var button = $(this);\n var RequestNotificationIDs = \"\";\n $(\".notification_count\").each(function () {\n RequestNotificationIDs += \", \" + $(this).data(\"requestnotificationid\");\n });\n\n RequestNotificationIDs = RequestNotificationIDs.substr(2, RequestNotificationIDs.length);\n $.post(\"/KioskRequestAdministrator/SetUserNotificationsReaded\", {\n RequestNotificationIDs: RequestNotificationIDs\n }).done(function (data) {\n $(\"#request_count\").text(\"0\");\n }).fail(function (xhr, textStatus, error) {\n notification(\"\", error.message, \"error\");\n }).always(function () {\n //HideProgressBar();\n });\n });\n\n $(document).on(\"click\", \"#btnSearchUser\", function (e) {\n e.stopImmediatePropagation();\n ShowProgressBar();\n $.get('/HR/KioskRequestAdministrator/SearchADUsers', {\n UserText: $('#txtSearchUser').val()\n }).done(function (data) {\n $(\"#div_ResponsiblesResultTable\").html(data.View);\n }).fail(function (xhr, textStatus, error) {\n notification(\"\", error.message, \"error\");\n }).always(function () {\n HideProgressBar();\n });\n });\n\n $(document).on('click', '.addUserAccount', function (e) {\n e.stopImmediatePropagation();\n var info = $(this);\n var User = {\n UserAccountID: info.data(\"useraccountid\"),\n FirstName: info.data(\"firstname\"),\n eMail: info.data(\"email\")\n }\n\n ShowProgressBar();\n $.post('/HR/KioskRequestAdministrator/AddResponsibleAccount', {\n User: User\n }).done(function (data) {\n notification(\"\", data.ErrorMessage, data.notifyType);\n\n if (data.ErrorCode == 0) {\n LoadResponsibles(data.ID);\n }\n }).fail(function (xhr, textStatus, error) {\n notification(\"\", error.message, \"error\");\n }).always(function () {\n HideProgressBar();\n });\n });\n\n\n function AutoCompleteDrop() {\n ShowProgressBar();\n\n $.get(\"/KioskRequestAdministrator/FilterResponsible\", {\n SearchUserInfo: $(\"#txt_AssignResponsible\").val()\n }).done(function (data) {\n console.log(data);\n $(\"#txt_AssignResponsible\").empty();\n $.each(data.ResponsiblesList, function (k, v) {\n $(\"#txt_AssignResponsible\").append(\n \"<option id=\" + v.ID + \" value=\" + v.ID + \" data-name=\" + v.FullName + \" data-empnumber=\" + v.EmployeeNumber + \" data-department=\" + v.DepartmentName + \">\" + v.FullName + \"</option>\"\n );\n idSelectedAsign = v.ID;\n //$(\"#datalist-responsibles\").append($(\"<option>\").attr('value', v.FullName).attr(\"data-id\", v.UserID));\n\n });\n $(\"#txt_AssignResponsible\").selectpicker();\n }).fail(function (xhr, textStatus, error) {\n notification(\"\", error.message, \"error\");\n }).always(function () {\n HideProgressBar();\n });\n\n }\n\n function LoadResponsibles(IDToSelect) {\n $.get(\"/KioskRequestAdministrator/GetRequestResponsibles\", {\n UserText: null\n }).done(function (data) {\n $(\"#txt_AssignResponsible\").empty();\n $.each(data.RequestResponsiblesList, function (k, v) {\n $(\"#txt_AssignResponsible\").append('<option value=\"' + v.ID + '\">' + v.FullName + '</option>')\n });\n\n if (IDToSelect != null) {\n $(\"#txt_AssignResponsible\").val(IDToSelect);\n $(\"#txt_AssignResponsible\").selectpicker(\"refresh\");\n }\n LoadUserInfo();\n $(\"#mo_AddNewUser\").modal(\"toggle\");\n });\n }\n\n function LoadUserInfo() {\n var option = $(\"#txt_AssignResponsible option:selected\");\n var Department = option.data(\"department\");\n var EmpNumber = option.data(\"employeenumber\");\n\n $(\"#Mo_ResponsibleName\").text(option.text());\n if (Department != null && Department != \"\") {\n $(\"#Mo_ResponsibleDepartment\").text(Department);\n }\n if (EmpNumber != null && EmpNumber != \"\") {\n $(\"#Mo_ResponsibleNum\").text(EmpNumber);\n }\n }\n\n $(document).on(\"keyup\", \"#txt_Responsible\", function (e) {\n e.stopImmediatePropagation();\n var long = $(\"#txt_Responsible\").val().length;\n if (long > 1) {\n $.get(\"/KioskRequestAdministrator/GetRequestResponsibles\", {\n UserText: $(\"#txt_Responsible\").val()\n }).done(function (data) {\n $(\"#dtl_RequestResponsibles\").empty();\n $.each(data.RequestResponsiblesList, function (k, v) {\n $(\"#dtl_RequestResponsibles\").append('<option>' + v.FullName + '</option>')\n });\n }).fail(function (xhr, textStatus, error) {\n notification(\"\", error.message, \"error\");\n });\n }\n });\n\n $(document).on(\"keydown\", \"#txt_RequestNumber,#txt_Responsible\", function (e) {\n e.stopImmediatePropagation();\n if (e.keyCode == 13) {\n return false;\n }\n })\n\n $(document).on(\"keyup\", \"#txt_RequestNumber\", function (e) {\n e.stopImmediatePropagation();\n var long = $(\"#txt_RequestNumber\").val().length;\n if (long > 1) {\n $.get(\"/KioskRequestAdministrator/GetRequestNumbers\", {\n RequestNumber: $(\"#txt_RequestNumber\").val()\n }).done(function (data) {\n $(\"#dtl_RequestNumbers\").empty();\n $.each(data.RequestNumbersList, function (k, v) {\n $(\"#dtl_RequestNumbers\").append('<option>' + v.RequestNumber + '</option>')\n });\n }).fail(function (xhr, textStatus, error) {\n notification(\"\", error.message, \"error\");\n });\n }\n });\n\n $(document).on(\"shown.bs.modal\", \"#mo_AssignRequest\", function (e) {\n $(\"#txta_Comment\").focus();\n $(\"#txta_Comment\").maxlength();\n $(\"#txt_AssignResponsible\").selectpicker();\n });\n\n //Add a New User\n $(document).on('change', '#txt_AssignResponsible', function (e) {\n e.stopImmediatePropagation();\n var option = $('#txt_AssignResponsible option:selected').val();\n if (option == \"new\") {\n ShowProgressBar();\n $.get(\"/KioskRequestAdministrator/GetAddUserModal\").done(function (data) {\n $(\"#div_add_new_user\").html(data);\n $(\".select\").selectpicker();\n $(\"#mo_AddNewUser\").modal(\"show\");\n $('#txt_AssignResponsible').val(0);\n $('#txt_AssignResponsible').selectpicker(\"refresh\");\n\n }).fail(function (xhr, textStatus, error) {\n notification(\"\", error.message, \"error\");\n }).always(function () {\n HideProgressBar();\n });\n } else {\n LoadUserInfo();\n }\n });\n\n $(document).on(\"click\", \"#btn_CloseAddUserModal\", function (e) {\n $(\"#mo_AddNewUser\").modal(\"toggle\");\n });\n\n $(document).on(\"click\", \"#btn_AddUser\", function (e) {\n var ProfileField = $('#ProfileID').val();\n var ProfileArrayID = \"\";\n\n if (ProfileField != null) {\n for (var i = 0; i < ProfileField.length; i++) {\n ProfileArrayID = ProfileField[i] + \",\" + ProfileArrayID;\n }\n }\n\n ShowProgressBar();\n $.post(\"/Users/Create\", {\n UserAccountID: $(\"#UserAccountID\").val(),\n eMail: $(\"#eMail\").val(),\n EmployeeNumber: $(\"#EmployeeNumber\").val(),\n FirstName: $(\"#FirstName\").val(),\n LastName: $(\"#LastName\").val(),\n ProfileID: $(\"#ProfileID\").val(),\n DepartmentID: $(\"#DepartmentID\").val(),\n ShiftID: $(\"#ShiftID\").val(),\n DefaultCultureID: $(\"#DefaultCultureID\").val(),\n ProfileArrayID: ProfileArrayID\n }).done(function (data) {\n if (data.ErrorCode == 0) {\n LoadResponsibles(data.ID);\n }\n }).fail(function (xhr, textStatus, error) {\n notification(\"\", error.message, \"error\");\n }).always(function () {\n HideProgressBar();\n });\n });\n\n}", "function callPageView() {\n initVars();\n var isPathindicatorEng = \"\";\n var currentUrl = unescape(window.location.href);\n\n // Exception part\n if (getOmniInputTagValue(\"pid\") == \"no\") {\n initVars();\n return;\n }\n\n /* exception code will be used in the future...\n if ((\"fr\".indexOf(getOmniSiteCd())!=-1 && currentUrl.indexOf(\"http://\"+window.location.host+\"/fr/business/smart-printers/\") !=-1)) {\n initVars();\n return;\n }\n */\n if (getOmniInputTagValue(\"microsite\") == \"microsite\") {\n initVars();\n s.linkTrackVars = \"none\";\n s.linkTrackEvents = \"none\";\n s.pageName = getOmniSiteCd() + \":campaign\";\n var s_code = s.t(); if (s_code) document.write(s_code);\n return;\n }\n\n if (currentUrl.indexOf('/sns/login') != -1) {\n return;\n }\n\n if (currentUrl.indexOf('/_ui/desktop/static/') != -1) {\n return;\n }\n\n if (currentUrl.indexOf('support-ca.samsung.com/cyber/mysamsung/') != -1) {\n console.log(\"ca mySamsung\");\n return;\n }\n\n if (currentUrl.indexOf('/ng/') != -1) {//Store Page\n isPathindicatorEng = \"STORE\";\n } else if (currentUrl.indexOf('shop.samsung.com/br') != -1) {\n isPathindicatorEng = \"BRSTORE\";\n } else if (getOmniInputTag(\"pathindicatorENG\") != \"none\") {//Check the pathindicatorENG tag\n if (getOmniInputTag(\"pathindicatorENG\").getElementsByTagName(\"a\").item(0).innerHTML) {\n isPathindicatorEng = \"Y\"\n } else {\n isPathindicatorEng = \"N\";\n }\n } else {\n isPathindicatorEng = \"N\";\n }\n\n switch (isPathindicatorEng) {\n case \"STORE\": sendPageCodeStore(); break;\n case \"BRSTORE\": sendPageCodeStoreBr(); break;\n case \"Y\": sendPageCode(); break;\n case \"N\": sendPageCodeUrl(); break;\n }\n}", "function showSupportRequest() {\n retrieveSupportRequestList();\n standardShowContentPane('supportRequest', 'Support Request');\n if (isFormEmpty('supportRequestForm')) {\n toggleSaveMode('supportRequestForm', false);\n }\n\n}", "function checkReqFields() {\n \n}", "function nlobjRequest() {\n}", "function readParameters(req){\n var request_parameters = {};\n\n var page_formats = [\"Letter\", \"Legal\", \"Tabloid\",\"Ledger\",\"A0\",\"A1\",\"A2\",\"A3\",\"A4\",\"A5\",\"A6\"];\n\n if (req.query.url && \"\" != req.query.url) {\n request_parameters.url = req.query.url;\n }\n\n if (req.query.username && null != req.query.username) {\n request_parameters.username = req.query.username;\n }\n\n if (req.query.password && null != req.query.password) {\n request_parameters.password = req.query.password;\n }\n\n if (req.query.scale && !isNaN(parseFloat(req.query.scale))) {\n request_parameters.scale = parseFloat(req.query.scale);\n }\n\n if (req.query.printBackground && 1 === parseInt(req.query.printBackground)) {\n request_parameters.printBackground = true;\n }\n\n if (req.query.landscape && 1 == parseInt(req.query.landscape)) {\n request_parameters.landscape = true;\n }\n\n if (req.query.format && page_formats.indexOf(req.query.format) > -1) {\n request_parameters.format = req.query.format;\n }\n\n if (req.query.delay && parseInt(req.query.delay) > 0) {\n request_parameters.delay = parseInt(req.query.delay);\n }\n\n if (req.query.pageRanges && \"\" != req.query.pageRanges) {\n request_parameters.pageRanges = req.query.pageRanges;\n }\n\n if (req.query.headerTemplate && \"\" != req.query.headerTemplate) {\n request_parameters.headerTemplate = req.query.headerTemplate;\n }\n\n if (req.query.footerTemplate && \"\" != req.query.footerTemplate) {\n request_parameters.footerTemplate = req.query.footerTemplate;\n }\n\n if (request_parameters.headerTemplate || request_parameters.footerTemplate) {\n request_parameters.displayHeaderFooter = true;\n }\n\n if (req.query.margin) {\n request_parameters.margin = {}\n\n if (req.query.margin[\"top\"]) {\n request_parameters.margin.top = req.query.margin[\"top\"]\n }\n\n if (req.query.margin[\"bottom\"]) {\n request_parameters.margin.bottom = req.query.margin[\"bottom\"]\n }\n\n if (req.query.margin[\"left\"]) {\n request_parameters.margin.left = req.query.margin[\"left\"]\n }\n\n if (req.query.margin[\"right\"]) {\n request_parameters.margin.right = req.query.margin[\"right\"]\n }\n }\n\n return Object.assign({}, default_parameters, request_parameters);\n}", "function userinfo_requester_routines() {\n\n}", "getRequestInfoUtils() {\n return {\n createResponse$: this.createResponse$.bind(this),\n findById: this.findById.bind(this),\n isCollectionIdNumeric: this.isCollectionIdNumeric.bind(this),\n getConfig: () => this.config,\n getDb: () => this.db,\n getJsonBody: this.getJsonBody.bind(this),\n getLocation: this.getLocation.bind(this),\n getPassThruBackend: this.getPassThruBackend.bind(this),\n parseRequestUrl: this.parseRequestUrl.bind(this),\n };\n }", "function getExtraDetails()\n{\n\tif (window.ActiveXObject) \n\t\t{\n\t\t\n\t\txmlHttp4 = new ActiveXObject(\"Microsoft.XMLHTTP\");\n\t\t}\n\telse if (window.XMLHttpRequest) \n\t\t{\n\t\t\n\t\txmlHttp4 = new XMLHttpRequest();\n\t\t}\n\nxmlHttp4.onreadystatechange = showExtraDetail;\nxmlHttp4.open(\"POST\",\"getIndexPageInfo.do?param=ExtraDetails\", true);\nxmlHttp4.send(null);\n}", "setupRequest(request_body) {\n throw new Error('setupRequest - not implemented');\n }", "function eUtil() {\n\n //Get URL Parameters by name\n function getUrlParam(name){\n if(name=(new RegExp('[?&]'+encodeURIComponent(name)+'=([^&]*)')).exec(location.search))\n return decodeURIComponent(name[1]);\n }\n\n}", "function pageRelatedFeatures(){\n switch(data.page){\n case \"Home\": loadHomePage(); break;\n case \"Shop\": loadShopPage(); break;\n case \"Contact\": loadContactPage(); break;\n }\n}", "function selectRequestHelper() {\n\tselectedRequest = this.id;\n\tselectedRequestName = this.dataset.requestName;\n\tselectRequest(selectedRequest, selectedRequestName);\n}", "function acceptRequest(data) {\n var response = JSON.parse(data);\n if (response.hasOwnProperty('error')) {\n alert(response.error);\n return;\n } else if (window.location.pathname === \"/profile\") {\n ajaxFunctions.ajaxRequest('GET', appUrl + \"/profile/api/\" + profId, getBooks);\n } else {\n ajaxFunctions.ajaxRequest('GET', appUrl + \"/books/api/\", getAllBooks);\n }\n }", "function authorizationRequest(request, ownPage){ \n $.ajax( {\n url:ip + '/proc/authr',\n type:'POST',\n data:request, \n dataType:'json',\n \n success:function(data){\n if(data.status == '0'){ \n //$.mobile.showPageLoadingMsg();\n getAuthorizationList(ownPage);\n $.mobile.loadingMessage = 'Cargando...';\n }else{\n $.mobile.changePage(ip + \"/entorno.html#e-general\");\n }\n \n },\n error:function(data){\n getError(); \n }\n });\n \n}", "function customSelectRequirementCommon(){\n\tvar extraRes = \" and regrequirement.regreq_type in ('License', 'Permit') \";\n\tif(abCompSelectRequirementController.isPermitsAndLicenses){\n\t\tselectRequirementCommon('abCompSelectRequirementConsole', 'regrequirement','multiple',extraRes);\n\t}else{\n\t\tselectRequirementCommon('abCompSelectRequirementConsole', 'regrequirement','multiple');\n\t}\n}", "function solveRequest() {\n\n }", "function genServReq(){\n\tvar projectId;\n\t/*\n\t * KB 3031186 IOAN tabs don't use frames we must get project edit form \n\t * from View.openerView not from View.getOpenerView().getOpenerView()\n\t */\n\tif(valueExists(View.getOpenerView().panels.get(0).fields.get('project.project_id'))){\n\t\tprojectId = View.getOpenerView().panels.get(0).getFieldValue('project.project_id');\n\t}else if(valueExists(View.getOpenerView().getOpenerView().panels.get(0).fields.get('project.project_id'))){\n\t\tprojectId = View.getOpenerView().getOpenerView().panels.get(0).getFieldValue('project.project_id');\n\t}\n\t\n if (document.getElementById(\"generateWorkRequest\").checked == 1) {\n\t\tWorkflow.callMethod('AbMoveManagement-MoveService-genWorkRequest', controllerAbMoGroupEditAction.form_abMoGroupEditCompleteAction.getFieldValue('activity_log.activity_log_id'), projectId ,null);\n }\n}", "function RequestTypeContainer(){\n\n}", "function _____SHARED_functions_____(){}", "static get eachReq () {\n return false\n }", "async DispatchAccountEnquiry(records, context) {\r\n //Get the specific request type for Account Enquiry\r\n let enquiryType = records.account_enquiry_type;\r\n if (enquiryType == undefined) {\r\n let res = {\r\n \"data\" : {\r\n \"message\": \"Please select account enquiry type\",\r\n \"code\": \"99\"\r\n }\r\n };\r\n return res;\r\n }\r\n \r\n switch (enquiryType) {\r\n case \"account_freeze\":\r\n return await accountEnquiry.accountFreeze(records);\r\n\r\n case \"account_lien\":\r\n return await accountEnquiry.accountLien(records);\r\n\r\n case \"account_status\":\r\n return await accountEnquiry.accountStatus(records);\r\n\r\n case \"account_update\":\r\n return await accountEnquiry.accountUpdate(records);\r\n\r\n case \"account_bvn\":\r\n return await accountEnquiry.accountBVN(records);\r\n\r\n case \"balance_enquiry\":\r\n return await accountEnquiry.accountBalanceEnquiry(records);\r\n\r\n case \"reversal_check\":\r\n return await accountEnquiry.accountReversalCheck(records);\r\n }\r\n }", "function processRetrieve(param) {\n\n var args = {\n target: [\n { type: \"FORM\", id: \"frmOption\" }\n ]\n };\n if (gw_com_module.objValidate(args) == false) return false;\n\n var args = {\n source: {\n type: \"FORM\", id: \"frmOption\",\n element: [\n { name: \"dept_area\", argument: \"arg_dept_area\" },\n { name: \"yyyy\", argument: \"arg_yyyy\" },\n { name: \"rev\", argument: \"arg_rev\" },\n { name: \"item_no\", argument: \"arg_item_no\" },\n { name: \"item_nm\", argument: \"arg_item_nm\" }\n ],\n argument: [\n { name: \"arg_supp_cd\", value: gw_com_module.v_Session.USR_ID }\n ],\n remark: [\n { element: [{ name: \"dept_area\" }] },\n { element: [{ name: \"yyyy\" }] },\n { element: [{ name: \"rev\" }] },\n { element: [{ name: \"item_no\" }] },\n { element: [{ name: \"item_nm\" }] }\n ]\n },\n target: [\n { type: \"FORM\", id: \"frmData_MAIN\" }\n ]\n };\n //----------\n $.blockUI();\n //----------\n var param = {\n type: args.source.type,\n targetid: args.source.id,\n row: args.source.row,\n element: args.source.element,\n argument: args.source.argument\n };\n var data = gw_com_module.elementtoARG(param);\n args.param = data.query;\n var param = {\n type: args.source.type,\n id: args.source.id,\n row: args.source.row,\n remark: args.source.remark\n };\n var remark = gw_com_module.elementtoRemark(param);\n args.remark = remark;\n if (args.source.hide)\n $(\"#\" + args.source.id).hide();\n\n var args = {\n request: \"PAGE\",\n name: \"SRM_2510_SUPP_P_1\",\n async: false,\n param: args,\n url: \"../Service/svc_Data_Retrieve_JSONs.aspx\" +\n \"?QRY_ID=SRM_2510_SUPP_P_1\" +\n \"&QRY_COLS=nm,val\" +\n \"&CRUD=R\" +\n \"&arg_data_tp=H\" + args.param,\n handler_success: function (data) {\n\n v_global.logic.header = data;\n v_global.logic.header2 = new Array();\n $.each(data, function () {\n if (this.DATA[0] == \"req_date\") {\n v_global.logic.header2.push(\"req_qty_\" + this.DATA[1]);\n v_global.logic.header2.push(\"plan_qty_\" + this.DATA[1]);\n } else {\n v_global.logic.header2.push(this.DATA[0]);\n }\n });\n getData(this.param);\n\n }\n };\n //----------\n gw_com_module.callRequest(args);\n //----------\n $.unblockUI();\n //----------\n\n}", "function updatePaginationHelper(requestedPage, response) {\n //Valid page\n if (requestedPage >= 1) {\n //Next and previous page handling by returned URL(if aplicable)\n if (vm.actions['LIST'].pagination['next']\n && vm.actions['LIST'].pagination['previous']) {\n vm.paginationHelper['nextPage'] = response[vm.actions['LIST'].pagination['next']];\n vm.paginationHelper['previousPage'] = response[vm.actions['LIST'].pagination['previous']];\n }\n //URL building pagination handling\n else {\n //Helper queries cleaning\n vm.paginationHelper['nextPageQueries'] = [];\n vm.paginationHelper['previousPageQueries'] = [];\n\n //Requested next page\n if (requestedPage > vm.paginationHelper['actualPage']) {\n vm.paginationHelper['actualPage']++;\n }\n //Requested previous page\n if (requestedPage < vm.paginationHelper['actualPage']) {\n vm.paginationHelper['actualPage']--;\n }\n\n //Next page handling\n if (vm.paginationHelper['actualPage'] < vm.paginationHelper['totalPages']) {\n vm.paginationHelper['nextPageQueries'].push('limit=' + vm.actions['LIST'].pagination['pageSize']);\n vm.paginationHelper['nextPageQueries'].push('offset=' + (vm.paginationHelper['actualPage'] * vm.actions['LIST'].pagination['pageSize']));\n //vm.paginationHelper['nextPage'] = vm.url\n // + '?limit=' + vm.actions['LIST'].pagination['pageSize']\n // + '&offset=' + (vm.paginationHelper['actualPage'] * vm.actions['LIST'].pagination['pageSize']);\n }\n //Previous page handling\n if (vm.paginationHelper['actualPage'] >= 2) {\n vm.paginationHelper['previousPageQueries'].push('limit=' + vm.actions['LIST'].pagination['pageSize']);\n vm.paginationHelper['previousPageQueries'].push('offset=' + ((vm.paginationHelper['actualPage'] - 2) * vm.actions['LIST'].pagination['pageSize']));\n\n //vm.paginationHelper['previousPage'] = vm.url\n // + '?limit=' + vm.actions['LIST'].pagination['pageSize']\n // + '&offset=' + ((vm.paginationHelper['actualPage'] - 2) * vm.actions['LIST'].pagination['pageSize']);\n }\n }\n }\n else {\n //Invalid page\n $log.error(\"@CatalogManager controller, @updatePaginationHelper function, requestedPage parameter is not valid, must be greater or equal to 1\");\n }\n }", "function TS_getRequest(reqUrl,reqCallback,p1,p2,p3,p4,p5,p6,ajax) {\n\ttry {\n\t if (!ajax){\n\t\t var ajax = \"0\";\n\t\t};\n\t\t//flag ( \"TS_getRequest():: Started! reqUrl: \" + reqUrl );\n\t\t//TS_debug(\"GET REQUEST: \"+reqUrl);\n\t\tGM_xmlhttpRequest({\n\t\t\tmethod: \"GET\",\n\t\t\turl: reqUrl,\n\t\t\theaders: (ajax == \"1\")? {\n\t\t\t\t\t'Accept': 'text/javascript, text/html, application/xml, text/xml, */*',\n\t\t\t\t\t'Content-type': 'application/x-www-form-urlencoded; charset=utf-8',\n\t\t\t\t\t\"X-Request\" : \"JSON\",\n\t\t\t\t } : {'Content-type':'application/x-www-form-urlencoded'},\n\t\t\tonload: function(responseDetails) {\n\t\t\t\tif (ajax != \"1\"){\n\t\t\t\t var aElem = document.createElement(\"div\");\n\t\t\t\t aElem.innerHTML = responseDetails.responseText;\n\t\t\t\t //flag ( \"TS_postRequest():: aElem.innerHTML: \" + aElem.innerHTML );\n\t\t\t\t}else {\n\t\t\t\t var aElem = JSON.parse(responseDetails.responseText);\n\t\t\t\t};\n\t\t\t\tif ( ajax != \"1\" && gatherStats(aElem.innerHTML) ) {\n\t\t\t\t\t// attempt reloading page, captcha ll be found there too and script will stop.\n\t\t\t\t\twindow.location.replace(myhost + \"/spieler.php\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (ajax != \"1\"){ \n\t\t\t\t\t refreshPageInfo(aElem);\n\t\t\t\t\t};\n\t\t\t\t\treqCallback(aElem,p1,p2,p3,p4,p5,p6);\n\t\t\t\t}\n\t\t\t},\n\t\t\tonerror: function(responseDetails) {\n\t\t\t\tvar aElem = document.createElement(\"div\");\n\t\t\t\taElem.innerHTML = responseDetails.responseText;\n\t\t\t\tif ( gatherStats(aElem.innerHTML) ) {\n\t\t\t\t\t// attempt reloading page, captcha ll be found there too and script will stop.\n\t\t\t\t\twindow.location.replace(myhost + \"/spieler.php\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tvar msg = \"TS_getRequest():: Get Request to server failed! reqUrl: \" + reqUrl;\n\t\t\t\t\tprintStackTrace( \"TS_getRequest():: Error! aElem.innerHTML: \" + aElem.innerHTML );\n\t\t\t\t\tthrowLogicError ( msg );\n\t\t\t\t\t//reqCallback(aElem,p1,p2,p3,p4,p5,p6);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\tcatch ( err ) {\n\t\tprintStackTrace();\n\t\tvar msg = \"<b>TS_getRequest():: Something went wrong, error: \" + err.name + \", Error Message: \" + err.message + \"</b>\";\n\t\tplaySound ( msg );\n\t\tprintErrorMSG(msg);\n\t\tthrow err;\n\t}\n}", "function processReqRefreshQuohdrList() {\n\tif (req.readyState == 4) {\n strResponse = req.responseText;\t \n switch (req.status) {\t \n // Page-not-found error\n case 404:\n alert('Error: Not Found. The requested URL ' + \n strURL + ' could not be found.');\n break;\n // Display results in a full window for server-side errors\n case 500:\t\t\t \n handleErrFullPage(strResponse);\t\t\t\t\t\t \n break;\n default:\n // Call JS alert for custom error or debug messages\n if (strResponse.indexOf('Error:') > -1 || \n strResponse.indexOf('Debug:') > -1) {\n alert(strResponse);\n }\n // Call the desired result function\n else {\n \t\t\t\t\t\t\tbuildRefreshQuohdrList();\t\t\t\t\t\t\t\t\t\t\t \n }\n break;\n }\n }\t\n}", "function custom(page,scope,id)\r\n{\r\n show_loading();\r\n\r\n active_page = page;\r\n active_id = id;\r\n active_scope = scope;\r\n\r\n $.ajax({\r\n type: \"POST\",\r\n url: pf_url + '/' + pf_admin + '/functions/' + page + '.php',\r\n data: 'id=' + id + '&scope=' + scope,\r\n success: function (theResponse) {\r\n if (debug) { console.log(theResponse); }\r\n var returned = theResponse.split('+++');\r\n if (returned['0'] == '1') {\r\n show_popup(returned['1'],returned['2']);\r\n } else {\r\n handle_error(returned['1']);\r\n }\r\n },\r\n error: function(error, txt) {\r\n handle_error(error.status);\r\n }\r\n });\r\n\r\n return false;\r\n}", "function waGLocalActions(pv_page,pv_action,pv_details) {\n\tvar strPrefix=\"\";\n\tvar makeCall=true;\n\t\n\tif(pv_action) \t{ pv_action=pv_action.toLowerCase(); } else { pv_action=\"\"; }\n\tif(pv_page) \t{ pv_page=pv_page.toLowerCase(); } else { pv_page=\"\"; }\n\tif(pv_details) \t{ pv_details=pv_details.toLowerCase(); } else { pv_details=\"\"; }\n\tif(wa.category) { wa.category=wa.category.toLowerCase(); }\n\tif(wa.region) \t{ \n\t\tif(wa.region.indexOf('/')==0) {wa.region=wa.region.substr(1);} //remove leading \"/\", if present\n\t\twa.region=wa.region.toLowerCase();\n\t}\n\tif(wa.merchant) { wa.merchant=wa.merchant.toLowerCase(); }\n\t\n\tswitch(pv_action) {\n\t\tcase \"pageload\":\n\t\t\tmakeCall=false;\n\t\t\tswitch(pv_page) {\n\t\t\t\tcase \"cat\":\t\ts.prop18=strPrefix+pv_page+\":\"+wa.category;break;\n\t\t\t\tcase \"merch\":\ts.prop18=strPrefix+pv_page+\":\"+wa.merchant;break;\n\t\t\t\tcase \"reg\":\t\ts.prop18=strPrefix+pv_page+\":\"+wa.region;break;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"signup\"://do not break this section; fall into \"compare\" below...\n\t\t\ts.prop21=\"glocal_\"+pv_page+\"_\"+pv_details+\"_\"+pv_action;\n\t\t\ts.eVar21=\"D=c21\";\n\t\tcase \"compare\":\n\t\t\ts.prop19=strPrefix+pv_page;\n\t\t\ts.prop19=s.prop19+\":\"+pv_action;\n\t\t\ts.prop19=s.prop19+\"_\"+pv_details;\n\t\t\t\t\t\n\t\t\tswitch(pv_page) {\n\t\t\t\tcase \"cat\":\n\t\t\t\t\tif(!isVarEmpty(wa.category))\t{ s.prop19=s.prop19+\"_\"+wa.category; }\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"merch\":\n\t\t\t\t\tif(!isVarEmpty(wa.merchant))\t{ s.prop19=s.prop19+\"_\"+wa.merchant; }\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"reg\":\n\t\t\t\t\tif(!isVarEmpty(wa.region))\t\t{ s.prop19=s.prop19+\"_\"+wa.region; }\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n\t\t\ts.prop19=strPrefix+pv_page;\n\t\t\ts.prop19=s.prop19+\":\"+pv_action;\n\t\t\ts.prop19=s.prop19+\"_\"+pv_details;\n\t\t\tbreak;\n\t}\n\n\tif(makeCall) { //call not made on pageload\n\t\tif(pv_action==\"signup\") { \n\t\t\tpv_action=\"glocal-scid\"; \t\t\n\t\t\ts.usePlugins=false; //disable do_plugins to prevent c21 from being overwritten\n\t\t} else {\n\t\t\tpv_action=\"glocal\";\n\t\t}\n\t\twaLinkClick(this,pv_action,'link');\n\t\ts.usePlugins=true; //re-enable do_plugins\n\t\ts.prop19=s.prop21=\"\";\n\t}\n}", "function main()\r{\r\tif(isNeedToValidateReqDocument(capIDModel,processCode, stepNum, processID, taskStatus))\r\t{\t\r\t\tisRequiredDocument();\r\t}\r}", "function loadpage() {\n var pageurl = window.location.href;\n\n //On page load, the content of all the 4 product types is disabled\n var elements = document.getElementsByClassName(\"productCont\");\n for (var x = 0; x < elements.length; x++) {\n elements[x].style.display = \"none\";\n }\n\n //Below line reads the product type selected by the user in dashboard page \n var product = getParameterByName('producttype', window.location.href.toLowerCase());\n if (pageurl.toLowerCase().indexOf(\"?producttype=\") > 0) {\n\n //If the user clicks Accept.js product type in the dashboard page, the following code gets executed.\n if (product == \"acceptjs\") {\n\n //The product type selected by the user in the dashboard page is assigned to the activeCont variable which is used for future reference\n activeCont = \"acceptjs\";\n\n //Below function checks if customer ID is passed in the request URL \n checkForCustomerIdInUrl(pageurl)\n }\n\n //If the user clicks Accept.js UI product type in the dashboard page, the following code gets executed\n else if (product == \"acceptui\") {\n\n //The product type selected by the user in the dashboard page is assigned to the activeCont variable which is used for future reference\n activeCont = \"acceptui\";\n\n //Below function checks if customer ID is passed in the request URL \n checkForCustomerIdInUrl(pageurl)\n }\n\n //If the user clicks Accept Hosted product type in the dashboard page, the following code gets executed.\n else if (product == \"accepthosted\") {\n activeCont = \"accepthosted\";\n\n //Below logic is to check if there are more than one parameter passed in the URL \n if (pageurl.toLowerCase().indexOf(\"&\") > 0) {\n \n //Customer ID is an optional parameter for Accept Hosted product type\n //Below code gets executed when the user passes customer id in the request URL\n if (pageurl.toLowerCase().indexOf(\"&customerid=\") > 0) {\n var id = getParameterByName('customerid', window.location.href.toLowerCase());\n\n //Validation of customer id will be done by using the below function\n var result = ValidateCustomer(id);\n\n //If the customer id is a valid id, then AcceptHosted function gets executed\n if (result.valid)\n {\n AcceptHosted(id);\n }\n else {\n\n //If the invalid customer id declared in the URL, then user gets redirected to the error message section\n var elements = document.getElementsByClassName(\"productCont\");\n\n //The content of all the 4 product types is disabled on the page\n for (var x = 0; x < elements.length; x++) {\n elements[x].style.display = \"none\";\n }\n document.getElementById(\"invalidPage\").innerHTML = \"\";\n document.getElementById(\"invalidPage\").innerHTML = \"Customer not Found\";\n document.getElementById(\"invalidProduct\").style.display = \"block\";\n }\n }\n //Below code gets executed when the user passes when there are more than one parameters (other than customer id) which are invalid in the request URL\n else {\n\n //Below code gets executed when user passes invalid parameters in the URL \n var elements = document.getElementsByClassName(\"productCont\");\n for (var x = 0; x < elements.length; x++) {\n elements[x].style.display = \"none\";\n }\n document.getElementById(\"invalidPage\").innerHTML = \"\";\n document.getElementById(\"invalidPage\").innerHTML = \"Product Type not Found\";\n document.getElementById(\"invalidProduct\").style.display = \"block\";\n\n }\n }\n else {\n\n //When customer id parameter is not passed in the URL, AcceptHosted function gets executed\n AcceptHosted('');\n }\n }\n\n //If the user clicks Accept Customer product type in the dashboard page, the following code gets executed.\n else if (product == \"acceptcustomer\") {\n activeCont = \"acceptcustomer\";\n\n //Below line populates the customer id textbox with a valid customer id\n document.getElementById(\"txtCustomerId\").value = globalVars.ValidCustomer;\n \n //Below code gets executed when the user passes customer id in the request URL\n if (pageurl.toLowerCase().indexOf(\"&customerid=\") > 0) {\n\n document.getElementById(\"acceptCustomer\").style.display = \"none\";\n\n //Below line gets the customer id declared in the url by the user\n var id = getParameterByName('customerid', window.location.href.toLowerCase());\n\n //Below function checks if the customer id is already validated or not\n //Customer id validaton occurs on click of continue button in dashboard and on accept customer page load\n //In order to avoid multiple validation requests to API, storing the validation status in the session storage\n var customerIdValidationStatus = sessionStorage.getItem('isValidated');\n\n //If customer id is not validated\n if (customerIdValidationStatus != \"true\") {\n\n //Validation of customer id will be done by using the below function\n var result = ValidateCustomer(id);\n\n //If the customer id is a valid id, then AcceptCustomer function gets executed\n if (result.valid)\n {\n AcceptCustomer(id);\n }\n else {\n\n //If the invalid customer id declared in the URL, then user gets redirected to the error message section\n var elements = document.getElementsByClassName(\"productCont\");\n for (var x = 0; x < elements.length; x++) {\n elements[x].style.display = \"none\";\n }\n document.getElementById(\"invalidPage\").innerHTML = \"\";\n document.getElementById(\"invalidPage\").innerHTML = \"Customer not Found\";\n document.getElementById(\"invalidProduct\").style.display = \"block\";\n }\n\n }\n //If customer id is already validated in dashboard page\n else {\n AcceptCustomer(id);\n sessionStorage.setItem('isValidated', 'false');\n }\n }\n else {\n\n //If customer id is not provided in the URL, a pop up to enter customer id is displayed.\n document.getElementById(\"acceptCustomer\").style.display = \"block\";\n }\n }\n else {\n\n //Below code gets executed when user passes invalid product type parameters in the URL \n document.getElementById(\"invalidPage\").innerHTML = \"\";\n document.getElementById(\"invalidPage\").innerHTML = \"Product Type not Found\";\n document.getElementById(\"invalidProduct\").style.display = \"block\";\n }\n }\n else {\n\n //Below code gets executed when user passes invalid product type parameters in the URL \n if (document.getElementById(\"invalidPage\") != null) {\n document.getElementById(\"invalidPage\").innerHTML = \"\";\n document.getElementById(\"invalidPage\").innerHTML = \"Product Type not Found\";\n document.getElementById(\"invalidProduct\").style.display = \"block\";\n }\n }\n}", "function membDetails4(param){\n//alert(\"param.value :\"+param.value);\n\t\t\tvar url = null;\n\t\t\tif(param.value.length==0 || param.value.indexOf(\" \")==0)\n\t\t\t{\n\t\t\tclearFields4();\n\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\turl = \"annualAjax.do?method=memberDetail&memberId=\"+escape(param.value);\n\t\t\tif (window.ActiveXObject){ \n\t\t\t\treq = new ActiveXObject(\"Microsoft.XMLHTTP\"); \n\t\t\t} \n\t\t\telse if (window.XMLHttpRequest){ \n\t\t\t\treq = new XMLHttpRequest(); \n\t\t\t} \n\t\t\t\n\t\t\treq.onreadystatechange = membRequest4; \n\t\t\treq.open(\"GET\", url, true);\n\t\t\treq.send(null); \n}", "function onRequest(context) {\n \tif (context.request.method === 'GET') \n \t{ \n\t\t\tform = DrawPage(context);\n\t\t\tform.Title = 'Taskinator Workspace';\n\t\t\t\n\t\t\t//if(runtime.getCurrentUser().id==PutNumberHere)\n\t\t\t// Folder as container is SuiteScripts > SST_NearNet_Building_List\n\t\t\tform.clientScriptFileId = 6512313; \n\t\t\t//else\n\t\t\t//\tform.clientScriptFileId = AnytherIDHere;\t\t\t\n \t\tcontext.response.writePage(form);\t\n }\n }", "function _handleSuperPage() {\n // Attach XHR handler to send product data\n easy.events.on(easy.EVENT_JQUERY_READY, function ($) {\n $(document).ajaxSuccess(function (event, jqxhr, settings) {\n easy.addExceptionHandling(function () {\n if (settings.url.match(/^\\/Variant\\/GetProductAsync/)) {\n var productId = settings.url.match(/\\?code\\=(\\d{7})\\_/).pop();\n _parseProduct(productId, document.querySelector('#quickShopModal'));\n }\n }, {\n code: easy.ERROR_SITE_PRODUCT_ATTRIBUTE\n })();\n });\n });\n }", "function RequestLoadPersonalData() {\n\n}", "function WhatPage(){\n if (window.location.href.includes(\"hackforums.net/member.php?action=profile&uid=\")){\n RunOnEveryPage();\n RunOnProfile();\n return;\n }\n if (window.location.href.includes(\"hackforums.net/managegroup.php?gid=\")){\n RunOnEveryPage();\n HighlightUser();\n return;\n }\n else{\n RunOnEveryPage();\n return;\n }\n}", "function checkForCustomerIdInUrl(pageurl)\n{\n //Accept.js and Accept.js UI accepts only product type\n //If the user passes customer id to Accept.js or Accept.js UI product type, then user gets redirected to the error message section\n if (pageurl.toLowerCase().indexOf(\"&customerid=\") > 0) {\n\n //The content of all the 4 product types is disabled on the page\n var elements = document.getElementsByClassName(\"productCont\");\n for (var x = 0; x < elements.length; x++) {\n elements[x].style.display = \"none\";\n }\n\n //Below code gets executed on invalid page request by the user\n document.getElementById(\"invalidPage\").innerHTML = \"\";\n document.getElementById(\"invalidPage\").innerHTML = \"Product Type not Found\";\n document.getElementById(\"invalidProduct\").style.display = \"block\";\n }\n else {\n\n //If the user selects Accept.js UI product type in the dashboard page\n if(activeCont == \"acceptui\")\n {\n document.getElementById(\"acceptui\").style.display = \"block\";\n AcceptUI();\n }\n //If the user selects Accept.js product type in the dashboard page\n else\n {\n document.getElementById(\"acceptjs\").style.display = \"block\";\n\n //By default credit card radio button is selected for accept js \n document.getElementById(\"rdCard\").click();\n }\n }\n}", "function getParams(request, response)\r\n{\r\n\ttry\r\n\t{\r\n\t\tcustBrandParam = request.getParameter('custparam_brand');\t\t\r\n\t\tcustomer = request.getParameter('custparam_cust');\r\n\r\n\t\t//Set errorDisplay display\r\n\t\terrorDisplay = 'hidden';\r\n\t}\r\n\tcatch (e)\r\n\t{\r\n\t\terrorHandler('checkCustomerBrand', e);\r\n\t}\r\n}", "function GET(){\n \n}", "function getAccountsByPriority(resText,oTable,tableBody,record,delimiter) {\r\n //alert(\"getAccountsByPriority1\");\r\n isTeamLead = document.getElementById(\"isTeamLead\").value;\r\n isUserManager = document.getElementById(\"isUserManager\").value;\r\n // alert(\"restext-->\"+resText);\r\n var tableId = document.getElementById(\"tblUpdateForAccountsListByPriority\");\r\n ClrTable(tableId);\r\n var teamMemberId = document.getElementById(\"teamMemberId\").value;\r\n //alert(\"teamMemberId-->\"+teamMemberId);\r\n //dueStartDate = replaceDateSplits(dueStartDate);\r\n if(teamMemberId == \"\")\r\n {\r\n alert(\"please select team member\"); \r\n return false;\r\n }\r\n else\r\n {\r\n /*var req = newXMLHttpRequest();\r\n req.onreadystatechange = readyStateHandlerPriority(req, displayAccountsByPriority);\r\n var url = CONTENXT_PATH+\"/accountsByPriority.action?teamMemberId=\"+teamMemberId;\r\n req.open(\"GET\",url,\"true\");\r\n req.setRequestHeader(\"Content-Type\",\"application/x-www-form-urlencoded\");\r\n req.send(null);*/\r\n \r\n \r\n var url = CONTENXT_PATH+\"/accountsByPriority.action?teamMemberId=\"+teamMemberId+\"&teamName=\"+resText;\r\n //var url = CONTENXT_PATH+\"/getEmployeeDetails.action?customerName=\"+ escape(test); \r\n //var req = initRequest(url);\r\n var req = newXMLHttpRequest();\r\n req.onreadystatechange = function() {\r\n if (req.readyState == 4) {\r\n if (req.status == 200) { \r\n document.getElementById(\"loadActMessagePriority\").style.display = 'none';\r\n displayAccountsByPriority(req.responseText,resText); \r\n } \r\n }else {\r\n document.getElementById(\"loadActMessagePriority\").style.display = 'block';\r\n // alert(\"HTTP error ---\"+req.status+\" : \"+req.statusText);\r\n }\r\n };\r\n req.open(\"GET\", url, true);\r\n req.send(null);\r\n \r\n \r\n //---\r\n }\r\n}", "function membDetails3(param){\n//alert(\"param.value :\"+param.value);\n\t\t\tvar url = null;\n\t\t\tif(param.value.length==0 || param.value.indexOf(\" \")==0)\n\t\t\t{\n\t\t\t\tclearFields3();\n\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\turl = \"annualAjax.do?method=memberDetail&memberId=\"+escape(param.value);\n\t\t\tif (window.ActiveXObject){ \n\t\t\t\treq = new ActiveXObject(\"Microsoft.XMLHTTP\"); \n\t\t\t} \n\t\t\telse if (window.XMLHttpRequest){ \n\t\t\t\treq = new XMLHttpRequest(); \n\t\t\t} \n\t\t\t\n\t\t\treq.onreadystatechange = membRequest3; \n\t\t\treq.open(\"GET\", url, true);\n\t\t\treq.send(null); \n}", "function paramCheck() {\n\t\tvar e = getParameterByName( \"version\" );\n\t\tif ( \"\" == e || \"standard\" == e ) {\n\t\t\tgtm_pageName = gtm_pageNameVariationStandard;\n\t\t}\n\t\tif ( \"wireless\" == e ) {\n\t\t\tgtm_pageName = gtm_pageNameVariationWireless;\n\t\t}\n\t\tif ( \"upgrade\" == e ) {\n\t\t\tgtm_pageName = gtm_pageNameVariationUpgrade;\n\t\t}\n\t}", "function checkSnapinQueueStatus(snapInObject) {\n var returnValue;\n //FY21-0803: Story #8842192 check for HES/EMC products[START]\n function httpGetBusinessHrAgentAvailability(theUrl) {\n try {\n var xmlHttp = new XMLHttpRequest();\n xmlHttp.onreadystatechange = function () {\n if (xmlHttp.readyState == 4 && xmlHttp.status == 200)\n returnValue = xmlHttp.responseText;\n }\n xmlHttp.open(\"GET\", theUrl, false); // true for asynchronous \n xmlHttp.setRequestHeader('HTTP_X_REQUESTED_WITH', 'XMLHttpRequest');//FY21-0702 eSupport call Changes\n xmlHttp.setRequestHeader(\"Content-Type\", \"application/json; charset=utf-8\"); //FY21-0702 eSupport call Changes\n xmlHttp.send(null);\n return returnValue;\n } catch (e) {\n console.log(\"Error in: \" + e);\n }\n }\n function httpGetAgentAvailability(theUrl) {\n try {\n var xmlHttp = new XMLHttpRequest();\n xmlHttp.onreadystatechange = function () {\n if (xmlHttp.readyState == 4 && xmlHttp.status == 200)\n\t\t\t\t\treturnValue = xmlHttp.responseText;\n }\n xmlHttp.open(\"GET\", theUrl, false); // true for asynchronous \n xmlHttp.setRequestHeader('HTTP_X_REQUESTED_WITH', 'XMLHttpRequest');//FY21-0702 eSupport call Changes\n xmlHttp.setRequestHeader(\"Content-Type\", \"application/text; charset=utf-8\"); //FY21-0702 eSupport call Changes\n xmlHttp.send(null);\n\t\t\treturn returnValue;\n } catch (e) {\n console.log(\"Error in: \" + e);\n }\n }\n \n if (snapInObject.checkQueueStatusInBizHoursUrl && snapInObject.hoursOfOperation && snapInObject.timeZone && (snapInObject.checkQueueStatusInBizHoursUrl != \"\" || snapInObject.checkQueueStatusInBizHoursUrl != null || snapInObject.checkQueueStatusInBizHoursUrl != undifined) && (snapInObject.hoursOfOperation != \"\" || snapInObject.hoursOfOperation != null || snapInObject.hoursOfOperation != undifined) && (snapInObject.timeZone != \"\" || snapInObject.timeZone != null || snapInObject.timeZone != undifined)) { \n return httpGetBusinessHrAgentAvailability(snapInObject.checkQueueStatusInBizHoursUrl + \"?chatHours=\" + escape(snapInObject.hoursOfOperation) + \"&timeZone=\" + escape(snapInObject.timeZone) + \"&buttonId=\" + snapInObject.buttonId);\n }\n //FY21-1201: Story #9475073: HES_Second Check for Business Hours and Agent Availability [START]\n else if(snapInObject.checkQueueStatusInBizHoursUrl && (snapInObject.checkQueueStatusInBizHoursUrl != \"\" || snapInObject.checkQueueStatusInBizHoursUrl != null || snapInObject.checkQueueStatusInBizHoursUrl != undifined)) { \n return httpGetBusinessHrAgentAvailability(snapInObject.checkQueueStatusInBizHoursUrl + \"?buttonId=\" + snapInObject.buttonId);\n }\n //FY21-1201: Story #9475073: HES_Second Check for Business Hours and Agent Availability [END]\n else if(\"checkBtnAvailabilityUrl\" in snapInObject && snapInObject.checkBtnAvailabilityUrl && snapInObject.checkBtnAvailabilityUrl != \"\"){\n var btnAvailabilityResVal = httpGetAgentAvailability(snapInObject.checkBtnAvailabilityUrl+snapInObject.buttonId);\n if (btnAvailabilityResVal){\n return 1;\n }else{\n return 4;\n }\n }\n //FY21-0803: Story #8842192 check for HES/EMC products[END]\n else\n return 1;\n}", "function request() { return { type: generalCheckupConstants.GENERAL_CHECKUP_DATA_REQUEST } }", "function useRequest() {\n if (request.status !== 200 && request.status !== 0) {\n // If you see this warning, the issue may be that you are using locateFile or memoryInitializerPrefixURL, and defining them in JS. That\n // means that the HTML file doesn't know about them, and when it tries to create the mem init request early, does it to the wrong place.\n // Look in your browser's devtools network console to see what's going on.\n console.warn('a problem seems to have happened with Module.memoryInitializerRequest, status: ' + request.status + ', retrying ' + memoryInitializer);\n doBrowserLoad();\n return;\n }\n applyMemoryInitializer(request.response);\n }", "function getPage( url, pageElement, waitMessage, callBack ) {\n\t\tvar timer = new Date();\n\t\tvar t_start = timer.getTime();\n\t\t//debugEvent(url, \"get\");\n\n // DON'T DISTURB CONTENT UNLESS NESSISARY\n if ( waitMessage != \"\" ) { document.getElementById(pageElement).innerHTML = waitMessage; }\n\n// WE USE A JAVASCRIPT FEATURE HERE CALLED \"INNER FUNCTIONS\"\n// USING THESE MEANS THE LOCAL VARIABLES RETAIN THEIR VALUES AFTER THE OUTER FUNCTION\n// HAS RETURNED. THIS IS USEFUL FOR THREAD SAFETY, SO\n// REASSIGNING THE ONREADYSTATECHANGE FUNCTION DOESN'T STOMP OVER EARLIER REQUESTS.\n\tfunction ajaxBindCallback(){\n\t\tif(ajaxRequest.readyState == 0) { window.status = \"Waiting...\"; }\n\t\tif(ajaxRequest.readyState == 1) { window.status = \"Loading Page...\"; }\n\t\tif(ajaxRequest.readyState == 2) { window.status = \"Data Received...\";}\n\t\tif(ajaxRequest.readyState == 3) { window.status = \"Interactive...\"; }\n\t\tif(ajaxRequest.readyState == 4) {\n\t\t\twindow.status = \"Transaction Complete...\";\n\n // STOP TIMER AND FIND DIFFERENCE\n // MUST CREATE NEW TIMER INSTANCE :)\n var timer2 = new Date();\n var t_end = timer2.getTime();\n var t_diff = t_end - t_start;\n\n // TEST HTTP STATUS CODE - DISPLAY IN DUBUGGER AND STATUS\n switch (ajaxRequest.status.toString()) {\n case \"200\" :\n window.status = \"Page Loaded Sucessfully\";\n document.getElementById(pageElement).innerHTML = ajaxRequest.responseText;\n debugEvent(url, \"got\", ajaxRequest.responseText, t_diff);\n break;\n case \"403\" :\n window.status = \"Forbidden...\";\n debugEvent(url, \"error_403\", ajaxRequest.responseText, t_diff);\n break;\n case \"404\" :\n window.status = \"File Not Found...\";\n debugEvent(url, \"error_404\", ajaxRequest.responseText, t_diff);\n break;\n case \"500\" :\n window.status = \"File Not Found...\";\n debugEvent(url, \"error_500\", ajaxRequest.responseText, t_diff);\n break;\n default :\n window.status = \"Unknown Ajax Error...\"+ajaxRequest.status.toString();\n }\n\t\t\t}\n\t}\n\tvar ajaxRequest = null;\n\t// BIND OUR CALLBACK THEN HIT THE SERVER...\n\tif (window.XMLHttpRequest) {\n\t\tajaxRequest = new XMLHttpRequest();\n\t\tajaxRequest.onreadystatechange = ajaxBindCallback;\n\t\tajaxRequest.open(\"GET\", url, true);\n\t\tajaxRequest.send(null);\n\t} else if (window.ActiveXObject) {\n\t\tajaxRequest = new ActiveXObject(\"Microsoft.XMLHTTP\");\n\t\tif (ajaxRequest) {\n\t\t\tajaxRequest.onreadystatechange = ajaxBindCallback;\n\t\t\tajaxRequest.open(\"GET\", url, true);\n\t\t\tajaxRequest.send();\n\t\t\t}\n\t\t}\n\tif (callBack != null ) { eval(callBack+'()'); }\n}", "function postRequest() {\n // TODO\n}", "function extCall(){\n\t// external_uri\n\t//var nullElement = new Element();\n\t//$('ext').load(external_uri);\n\t//var myHTMLRequest = new Request.HTML().get(external_uri);\n}", "function FlexTable_stacks_in_4026_page20_Resp() {\n\n\tvar mobile = FlexTable_stacks_in_4026_page20_isMobile();\n\tif ((1 != 1) || (1 != 1)) {\n\t\tFlexTable_stacks_in_4026_page20_Search(false);\n\t\t} else {\n\t\tif (mobile) {\n\t\t\tif (1 == 1) {\n\t\t\t\tFlexTable_stacks_in_4026_page20_Search(false);\n\t\t\t\t} else {\n\t\t\t\tFlexTable_stacks_in_4026_page20_Search(true);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\tFlexTable_stacks_in_4026_page20_Search(true);\n\t\t\t}\n\t\t}\n\n\tif (\"hscroll\" == \"record\") {\n\t\tif (mobile) {\n\t\t\tFlexTable_stacks_in_4026_page20_Pager(true);\n\t\t\tFlexTable_stacks_in_4026_page20_GoRotated(true);\n\t\t\t} else {\n\t\t\tif (1 != 1) {\n\t\t\t\tFlexTable_stacks_in_4026_page20_Pager(false);\n\t\t\t\t} else {\n\t\t\t\tFlexTable_stacks_in_4026_page20_Pager(true);\n\t\t\t\t}\n\t\t\tFlexTable_stacks_in_4026_page20_GoRotated(false);\n\t\t\t}\n\t\t} else {\n\t\tif (1 == 1) {\n\t\t\tFlexTable_stacks_in_4026_page20_Pager(true);\n\t\t\tFlexTable_stacks_in_4026_page20_MakePager(window.FlexTable_stacks_in_4026_page20_PageNumber);\n\t\t\tFlexTable_stacks_in_4026_page20_SetPage(window.FlexTable_stacks_in_4026_page20_PageNumber);\n\t\t\t} else {\n\t\t\tFlexTable_stacks_in_4026_page20_Pager(false);\n\t\t\t}\n\t\t}\n\t}", "function getData(requestUrl) {\n \n\n}", "function acceptRequestFromListing(event){\n\t$(\".message_box\").remove();\n\tvar profileID=event.id;\n\tvar acceptId=event.rel;\n\tjQuery.ajax({\n\t\tasync: false,\n url: \"/\" + PROJECT_NAME + \"profile/accept-request\",\n type: \"POST\",\n dataType: \"json\",\n data: \"accept_request=\"+acceptId+\"&profileID=\"+profileID,\n success: function(jsonData) {\n \t$(\"#cancel-request-icon-text-\"+profileID).remove();\n \tif(jsonData.requestStatus==\"already canceled\"){\n \t\t// for gridview..\n\t \t$(\"#user-status_\"+profileID).empty();\n\t \tvar html = '';\n \t\thtml+='<a id=\"'+profileID+'\" class=\"cursor-style invite_'+profileID+' invitation-request\" title=\"Invite to Link\" href=\"javascript:;\" onclick=\"inviteToLink(this)\">';\n \t//html+='<img src=\"'+IMAGE_PATH+'/invitation-request-icon.png\" alt=\"Invite to Link\"/>';\n \thtml+='</a>';\n \t$(\"#user-status_\"+profileID).html(html);\n \t// for user popup\n \t$(\"#statusIcon-\"+profileID).empty();\n \tvar html2 = '';\n \thtml2+='<img src=\"'+IMAGE_PATH+'/small-invitation-request-icon.png\" alt=\"Invite to Link\"/>';\n \t$(\"#statusIcon-\"+profileID).html(html2);\n \t// for user popup title\n \t$(\"#statusTitle-\"+profileID).empty();\n \tvar html3 = '';\n \thtml3+='<a rel=\"'+jsonData+'\" id=\"'+profileID+'\" class=\"text-grey2-link cursor-style invite_'+profileID+' invitation-request\" title=\"Invite to Link\" href=\"javascript:;\" onclick=\"inviteToLink(this)\">Invite to Link</a>';\n \t$(\"#statusTitle-\"+profileID).html(html3);\n\t \t// hide textarea...\n\t \t$(\".quickview-mid_\"+profileID).slideUp();\n\t \tshowDefaultMsg( \"Link request already cancelled by \"+jsonData.uname, 1 );\n \t}\n \telse{\n \t\t$(\"#user-status_\"+profileID).empty();\n \t\t// for gridview..\n \t\tvar html = '';\n \t\thtml+='<a class=\"cursor-style compose-mail\" title=\"Send Mail\" href=\"'+PROJECT_URL+PROJECT_NAME+'mail/compose#to_user:'+profileID+'\">';\n \t\t//html+='<img src=\"'+IMAGE_PATH+'/mail-icon2.png\" alt=\"Send Mail\"/>';\n \t\thtml+='</a>';\n \t\t$(\"#user-status_\"+profileID).html(html);\n \t\t$(\"#statusIcon-\"+profileID).empty();\n \t\t// for user popup\n \t\tvar html2 = '';\n \t\thtml2+='<img src=\"'+IMAGE_PATH+'/small-unlink-icon.png\" alt=\"Unlink\"/>';\n \t\t$(\"#statusIcon-\"+profileID).html(html2);\n \t\t$(\"#statusTitle-\"+profileID).empty();\n \t\t// for user popup title\n \t\tvar html3 = '';\n \t\thtml3+='<a id=\"delete_'+jsonData+'\" class=\"text-grey2-link\" id=\"'+profileID+'\" title=\"Unlink\" href=\"javascript:;\" onclick=\"unLink('+jsonData+','+profileID+')\">Unlink</a>';\n \t\t$(\"#statusTitle-\"+profileID).html(html3);\n \t\t$(\".quickview-mid_\"+profileID).slideDown();\n \t\tshowDefaultMsg( \"You have accepted the link request.\", 1 ); \t\t\n \t}\n\t\t},\n error: function(xhr, ajaxOptions, thrownError) {\n \talert(\"Server Error.\");\n\t\t}\n });\n}", "function init_support_data() {\n if (supportid === '') {\n return;\n }\n\n if (!$('body').hasClass('small-table')) {\n toggle_small_view('.table-supports', '#support');\n }\n\n $.post(admin_url + 'supports/get_support_data/', {\n supportid: supportid\n }).success(function (response) {\n $('#support').html(response);\n reload_support_attachments();\n reload_assignees_select();\n init_supports_checklist_items();\n\n if (is_mobile()) {\n $('html, body').animate({\n scrollTop: $('#support').offset().top + 150\n }, 600);\n }\n });\n}", "function pageSupportedInit() {\n let found = false; \n // Two templates for gofundme \n if (/^https:\\/\\/(.*\\.)?gofundme.com/.test(location.href)) {\n // Old main domain template\n // New main domain template\n // charity subdomain template\n $appendToButton =\n document.querySelector(\".js-xl-donate-button\") ||\n document.querySelector('[data-element-id=\"btn_share\"]') ||\n document.querySelector('.js-sm-up-container .js-donate-now');\n found = true;\n } else if (/^https:\\/\\/(www\\.)?patreon.com/.test(location.href)) {\n $appendToButton = document.querySelector(\".sc-fzoLsD.etpOIT\");\n found = true;\n } else if (/^https:\\/\\/(www\\.)?linkedin.com/.test(location.href)) {\n linkedInButton(document.querySelector(\".pv-s-profile-actions__overflow\"));\n } else if (/^https:\\/\\/github.com/.test(location.href)) {\n $appendToButton = document.querySelector('[aria-label=\"Select assignees\"]');\n found = true;\n } else if (/^https:\\/\\/(www\\.)?kickstarter.com/.test(location.href)) {\n // kickStarters\n $appendToButton = document.querySelector(\".NS_projects__rewards_list ol\");\n found = true;\n } else if (/^https:\\/\\/(www\\.)?stackoverflow.com/.test(location.href)) {\n // stackoverflow\n bountyButton(document.querySelector(\".question .comments-link\"));\n } else if (document.querySelector(\".ProfileSidebar .PhotoRail\")) {\n $appendToButton = document.querySelector( \".ProfileSidebar .PhotoRail\");\n found = true;\n } else if(/^https:\\/\\/(www\\.)?twitter.com/.test(location.href) && document.querySelector('header > div > div > div > div > div + div + div')) {\n $appendToButton = document.querySelector('header > div > div > div > div > div + div + div');\n found = true; \n } else if (/^https:\\/\\/(www\\.)?facebook.com.*/.test(location.href)) {\n // facebook \n // pagerefresh doesn't work due to how the site was made, we have to monitor it when we land on this page\n // we will give it about 20s to find the right element, or when it's found, remove the monitoring.\n slowPageTimer('#profile_timeline_tiles_unit_pagelets');\n } else if (/^https:\\/\\/(www\\.)?ebay.com/.test(location.href) && document.getElementById(\"RightSummaryPanel\")) {\n // ebay\n $appendToButton = document.querySelector(\"#RightSummaryPanel\").lastChild;\n found = true;\n } else if (/^https:\\/\\/(www\\.)?youtube.com/.test(location.href)) {\n // youtube pledge allowed, don't inject box yet\n found = true;\n } else if ( /^https:\\/\\/(www\\.)?fiverr.com/.test(location.href) ){\n // fiverr\n $appendToButton = document.querySelector( \".contact-seller.display-contact-seller\");\n document.querySelector('.sidebar.poly-sticky').style.position = \"static\";\n found = true;\n } else if (/^https:\\/\\/(www\\.)?t.me/.test(location.href)) {\n $appendToButton = document.querySelector(\".tgme_page\").lastChild;\n found = true;\n } else if(/^https:\\/\\/(www\\.)?blockchain.com\\/(btc|eth)\\/address\\//.test(location.href)) {\n $appendToButton = document.querySelector('.fieq4h-0.eGdsW:nth-child(3) > div .fieq4h-0.eGdsW .ild1xh-1.dBgUTl') || \n document.querySelector('.fieq4h-0.eGdsW:nth-child(3) > div .fieq4h-0.eGdsW .ahwase-1.dZEFco');\n found = true;\n } else if (/^https:\\/\\/(www.)?xmrchain.net\\/search\\?value=/.test(location.href)) { \n $appendToButton = document.querySelector('body div:nth-child(2) h4');\n found = true; \n } else if (/^https:\\/\\/(www\\.)?ardor.tools\\/account\\//.test(location.href)) { \n // account for slow load(angular app? loading animation) \n slowPageTimer('#accountTable')\n }\n\n return found;\n }", "function main(){\n\t\t//check ob die url/seite die richtige ist\n//\t\tif(checkRightLocation()) {\n\n\t\tcleanPage();\n\t\taddFavoriteTitle();\n\t\taddEmptyTable();\n\t\taddHeader();\n\t\tvar favoritesCall = Utils.getFavorites(addFavorites);\t\t\t\n\t\t\t\t\t\t\n\t//\t} else {\n\t//\t\talert(wrongPageErrorMessage);\n\t//\t}\n\t}", "function FlexTable_stacks_in_4029_page20_Resp() {\n\n\tvar mobile = FlexTable_stacks_in_4029_page20_isMobile();\n\tif ((0 != 1) || (0 != 1)) {\n\t\tFlexTable_stacks_in_4029_page20_Search(false);\n\t\t} else {\n\t\tif (mobile) {\n\t\t\tif (1 == 1) {\n\t\t\t\tFlexTable_stacks_in_4029_page20_Search(false);\n\t\t\t\t} else {\n\t\t\t\tFlexTable_stacks_in_4029_page20_Search(true);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\tFlexTable_stacks_in_4029_page20_Search(true);\n\t\t\t}\n\t\t}\n\n\tif (\"hscroll\" == \"record\") {\n\t\tif (mobile) {\n\t\t\tFlexTable_stacks_in_4029_page20_Pager(true);\n\t\t\tFlexTable_stacks_in_4029_page20_GoRotated(true);\n\t\t\t} else {\n\t\t\tif (0 != 1) {\n\t\t\t\tFlexTable_stacks_in_4029_page20_Pager(false);\n\t\t\t\t} else {\n\t\t\t\tFlexTable_stacks_in_4029_page20_Pager(true);\n\t\t\t\t}\n\t\t\tFlexTable_stacks_in_4029_page20_GoRotated(false);\n\t\t\t}\n\t\t} else {\n\t\tif (0 == 1) {\n\t\t\tFlexTable_stacks_in_4029_page20_Pager(true);\n\t\t\tFlexTable_stacks_in_4029_page20_MakePager(window.FlexTable_stacks_in_4029_page20_PageNumber);\n\t\t\tFlexTable_stacks_in_4029_page20_SetPage(window.FlexTable_stacks_in_4029_page20_PageNumber);\n\t\t\t} else {\n\t\t\tFlexTable_stacks_in_4029_page20_Pager(false);\n\t\t\t}\n\t\t}\n\t}", "function BOT_grepRequestComponents() {\r\n\tvar x,rel;\r\n\t\r\n\tBOT_theReqPerformative\t= null;\r\n\tBOT_theReqTopic\t\t\t= null;\r\n\tBOT_theReqAttribute\t\t= null;\r\n\tBOT_theReqAction\t\t= null;\r\n\tBOT_theReqValue\t\t\t= null;\r\n\tBOT_theReqStresser\t\t= null;\r\n\tBOT_theReqText\t\t\t= null; \r\n\tBOT_theReqFeeling\t\t= null; \r\n\tBOT_theReqJudgement\t\t= null; \r\n\t\r\n\tx = BOT_greplemTagElement(\"PER\"); BOT_theReqPerformative = x;\r\n\tx = BOT_greplemTagElement(\"REF\"); if(x) BOT_theReqTopic = x;\r\n\t\r\n\tx = BOT_greplemTagElement(\"KEY\"); \r\n\tif(x) BOT_theReqAttribute = x; \r\n\telse { x = BOT_greplemTagElement(\"KYS\"); if(x) BOT_theReqAttribute = x } // list\r\n\tx = BOT_greplemTagElement(\"REL\"); if(x) BOT_theReqRelation = x;\r\n\tx = BOT_greplemTagElement(\"ACT\"); if(x) BOT_theReqAction = x; \r\n\tx = BOT_greplemTagElement(\"VAL\"); if(x) BOT_theReqValue = x; \r\n\tx = BOT_greplemTagElement(\"STR\"); if(x) BOT_theReqStresser = x; \r\n\tx = BOT_greplemTagElement(\"TXT\"); if(x) BOT_theReqText = x; \r\n\tx = BOT_greplemTagElement(\"EQU\"); if(x) BOT_theReqEqual = x; \r\n\tx = BOT_greplemTagElement(\"FEE\"); if(x) BOT_theReqFeeling = x; \r\n\tx = BOT_greplemTagElement(\"JUD\"); if(x) BOT_theReqJudgement = x; \r\n\r\n\tif(!BOT_theReqPerformative) BOT_theReqPerformative = BOT_theReqAction ? \"x\" : \"g\"; // always a performative\r\n\r\n\tif(BOT_theReqPerformative) \tBOT_traceString += \"REQ perf \" + BOT_theReqPerformative + \"\\n\";\r\n\tif(BOT_theReqTopic) \t\tBOT_traceString += \"REQ topic \" + BOT_theReqTopic + \"\\n\";\r\n\tif(BOT_theReqAttribute) \tBOT_traceString += \"REQ attr \" + BOT_theReqAttribute + \"\\n\";\r\n\tif(BOT_theReqRelation) \t\tBOT_traceString += \"REQ rel \" + BOT_theReqRelation + \"\\n\";\r\n\tif(BOT_theReqAction) \t\tBOT_traceString += \"REQ action \" + BOT_theReqAction + \"\\n\";\r\n\tif(BOT_theReqValue) \t\tBOT_traceString += \"REQ value \" + BOT_theReqValue + \"\\n\";\r\n\tif(BOT_theReqStresser)\t\tBOT_traceString += \"REQ stress \" + BOT_theReqStresser + \"\\n\";\r\n\tif(BOT_theReqText)\t\t\tBOT_traceString += \"REQ text \" + BOT_theReqText + \"\\n\"; \r\n\tif(BOT_theReqEqual)\t\t\tBOT_traceString += \"REQ Equal \" + BOT_theReqEqual + \"\\n\"; \r\n\tif(BOT_theReqFeeling)\t\tBOT_traceString += \"REQ Feeling \" + BOT_theReqFeeling + \"\\n\"; \r\n\tif(BOT_theReqJudgement)\t\tBOT_traceString += \"REQ Judge \" + BOT_theReqJudgement + \"\\n\"; \r\n\r\n\t// current topic management\r\n\tif(!BOT_theReqTopic) {\r\n\t\tif(BOT_theReqPerformative == \"f\") {\r\n\t\t\tBOT_theReqTopic = BOT_theUserTopicId; \r\n\t\t\tBOT_traceString += \"FEEL topic \" + BOT_theReqTopic + \"\\n\";\r\n\t\t\t}\r\n\t\telse if (BOT_theReqPerformative == \"w\") BOT_theReqTopic = BOT_theLastTopic; \r\n\t\telse {\r\n\t\t\tvar thebottopicid = (eval(BOT_theBotId)).topicId; // back to current bot \r\n\t\t\tBOT_theReqTopic = thebottopicid; // BOT_theLastTopic ? BOT_theLastTopic : BOT_theTopicId;\r\n\t\t\tBOT_traceString += \"LAST topic \" + BOT_theReqTopic + \"\\n\";\r\n\t\t\t// relation to another topic\r\n\t\t\tif(BOT_theReqRelation) {\r\n\t\t\t\trel = BOT_get(BOT_theReqTopic, BOT_theReqRelation,\"VAL\");\r\n\t\t\t\tif(BOT_member(BOT_topicIdList,rel)) {\r\n\t\t\t\t\tBOT_theReqTopic = rel;\r\n\t\t\t\t\tBOT_traceString += \"NEW topic \" + BOT_theReqTopic + \"\\n\";\r\n\t\t\t\t}\r\n\t\t\t }\r\n\t\t}\r\n\t}\r\n\telse BOT_theTopicId = BOT_theReqTopic; // updates current topic\r\n\r\n}", "_prepHeaders() {\n const prepMethods = {\n POST: (request) => {\n request.data = this._encodePostData(request.data);\n request.xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\n },\n GET: (request) => {\n let str = Object.keys(request.data).map(key => `${key}=${request.data[key]}`).join(\"&\");\n request.url = str.length > 0 ? `${request.url}?${str}` : request.url;\n }\n };\n prepMethods[this.requestType]?.(this);\n }", "function getQARpt() {\n var url = global + '/QATurnOver/GetPhysicalData/';\n var data = { Page: dailyrptPage };\n $.ajax({\n url: url,\n data: JSON.stringify(data),\n type: 'POST',\n cache: false,\n contentType: 'application/json; charset=utf-8',\n beforeSend: function () {\n\n },\n complete: function () {\n\n },\n success: function (data) {\n if (data.length == 0) {\n $.notify(\"No data to load.\", \"warn\");\n // xpage = xpage;\n }\n else {\n // window[xdetails](data, xpage);\n //xdetails(data, xpage);\n }\n // window[qtodatamapping](data, qtoPage);\n qadailyrpt(data, dailyrptPage);\n },\n error: function () {\n alert(\"Loading information failed\");\n }\n });\n}", "function give_pages(url, titlee) {\r\n //var result1 = check_permission(url);\r\n //alert(result1);\r\n var per = document.getElementById('per').innerHTML;\r\n \r\n if (url === \"add_muli_exports.php\") {\r\n //document.getElementById('bet').style.display='block';\r\n $(document).ready(function() {\r\n $('#expand').click(function() {\r\n $('#qty_title').slideDown();\r\n $('#pqty').slideDown();\r\n });\r\n });\r\n }\r\n document.getElementById(\"report_content\").innerHTML = \"\";\r\n document.getElementById(\"report_title\").innerHTML = \"\";\r\n\r\n if (url === 'show_all_export.php' || url === 'show_all_waiting.php' || url === 'show_all_fatora.php' || url === 'show_all_import.php' || url === 'show_all_history.php' || url === 'shb.php' || url === 'add_multi_exports.php') {\r\n $(document).ready(function() {\r\n $('.col-lg-3').hide()\r\n $('#col_large').addClass('col-lg-12')\r\n $('#col_large').addClass('col-xl-12')\r\n $('#accordionSidebar').addClass('toggled')\r\n })\r\n } else {\r\n $('.col-lg-3').show()\r\n $('#col_large').removeClass('col-lg-12')\r\n $('#col_large').removeClass('col-xl-12')\r\n $('#accordionSidebar').removeClass('toggled')\r\n }\r\n\r\n var xhttp = new XMLHttpRequest()\r\n xhttp.onreadystatechange = function() {\r\n if (this.readyState == 4 && this.status == 200) {\r\n document.getElementById('titley').innerHTML = titlee\r\n document.getElementById('contenty').innerHTML = this.responseText\r\n $(document).ready(function() {\r\n $('.drop_value2').html(' ')\r\n $('#down_from_top2').fadeOut()\r\n })\r\n } else {\r\n $(document).ready(function() {\r\n $('.drop_value2').html(\"<span style='color:red;'> <img src='img/ajax-loader.gif'/> </span>\")\r\n $('#down_from_top2').fadeIn()\r\n })\r\n }\r\n }\r\n\r\n xhttp.open('POST', url, true)\r\n xhttp.setRequestHeader('Content-type', 'application/x-www-form-urlencoded')\r\n xhttp.send()\r\n}", "function membDetails2(param){\n//alert(\"param.value :\"+param.value);\n\t\t\tvar url = null;\n\t\t\tif(param.value.length==0 || param.value.indexOf(\" \")==0)\n\t\t\t{\n\t\t\t\tclearFields2();\n\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\turl = \"annualAjax.do?method=memberDetail&memberId=\"+escape(param.value);\n\t\t\tif (window.ActiveXObject){ \n\t\t\t\treq = new ActiveXObject(\"Microsoft.XMLHTTP\"); \n\t\t\t} \n\t\t\telse if (window.XMLHttpRequest){ \n\t\t\t\treq = new XMLHttpRequest(); \n\t\t\t} \n\t\t\t\n\t\t\treq.onreadystatechange = membRequest2; \n\t\t\treq.open(\"GET\", url, true);\n\t\t\treq.send(null); \n}", "function main() {\n\n\t\t//Check the Method\n\t\tif ($.request.method === $.net.http.GET) {\n\t\t\t$.response.status = 200;\n\t\t\t$.response.setBody(JSON.stringify({\n\t\t\t\tmessage: \"API Called\",\n\t\t\t\tresult: \"GET is not supported, perform a POST to add Entries\"\n\t\t\t}));\n\t\t} else {\n\t\t\t//Perform Table Entry to be created in Table\n\t\t\ttry {\n\t\t\t\tif (gvGuid) {\n\t\t\t\t\t_createEntries();\n\t\t\t\t}\n\t\t\t} catch (errorObj) {\n\t\t\t\tgvTableUpdate = \"Error during table insert:\" + errorObj.message;\n\t\t\t}\n\n\t\t\t$.response.status = 200;\n\t\t\t$.response.setBody(JSON.stringify({\n\t\t\t\tmessage: \"API Called\",\n\t\t\t\tTableUpdateStatus: gvTableUpdate\n\t\t\t}));\n\t\t}\n\t}", "function FlexTable_stacks_in_1474_page20_Resp() {\n\n\tvar mobile = FlexTable_stacks_in_1474_page20_isMobile();\n\tif ((1 != 1) || (1 != 1)) {\n\t\tFlexTable_stacks_in_1474_page20_Search(false);\n\t\t} else {\n\t\tif (mobile) {\n\t\t\tif (1 == 1) {\n\t\t\t\tFlexTable_stacks_in_1474_page20_Search(false);\n\t\t\t\t} else {\n\t\t\t\tFlexTable_stacks_in_1474_page20_Search(true);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\tFlexTable_stacks_in_1474_page20_Search(true);\n\t\t\t}\n\t\t}\n\n\tif (\"hscroll\" == \"record\") {\n\t\tif (mobile) {\n\t\t\tFlexTable_stacks_in_1474_page20_Pager(true);\n\t\t\tFlexTable_stacks_in_1474_page20_GoRotated(true);\n\t\t\t} else {\n\t\t\tif (1 != 1) {\n\t\t\t\tFlexTable_stacks_in_1474_page20_Pager(false);\n\t\t\t\t} else {\n\t\t\t\tFlexTable_stacks_in_1474_page20_Pager(true);\n\t\t\t\t}\n\t\t\tFlexTable_stacks_in_1474_page20_GoRotated(false);\n\t\t\t}\n\t\t} else {\n\t\tif (1 == 1) {\n\t\t\tFlexTable_stacks_in_1474_page20_Pager(true);\n\t\t\tFlexTable_stacks_in_1474_page20_MakePager(window.FlexTable_stacks_in_1474_page20_PageNumber);\n\t\t\tFlexTable_stacks_in_1474_page20_SetPage(window.FlexTable_stacks_in_1474_page20_PageNumber);\n\t\t\t} else {\n\t\t\tFlexTable_stacks_in_1474_page20_Pager(false);\n\t\t\t}\n\t\t}\n\t}", "function getRequisitionDetails(){\r\n\tparent.document.searchResultsForm.action = parent.requisitionActionURL;\r\n\tparent.document.searchResultsForm.processorName.value = 'OrderProcessor';\r\n\tparent.document.searchResultsForm.processorAction.value = 'searchRequisition';\r\n\tparent.document.searchResultsForm.isOrderSumPage.value = 'true';\r\n\tif(status ==\"Not Received\" && tubeExpCount == 0){\r\n\t\tparent.document.searchResultsForm.loadPage.value = \"reqDetailSourcePage\";\r\n\t}\r\n\telse {\r\n\t\tparent.document.searchResultsForm.loadPage.value = \"reqDetailPage\";\r\n\t}\r\n\tparent.document.searchResultsForm.reqNumber.value = requisitionVal;\r\n\tparent.document.searchResultsForm.submit();\r\n}", "function TPROJECT_REQ_SPEC_MGMT(id)\n{\n var _FUNCTION_NAME_=\"TPROJECT_REQ_SPEC_MGMT\";\n var pParams = tree_getPrintPreferences();\n var action_url = fRoot+\"lib/project/project_req_spec_mgmt.php\"+\"?id=\"+id+args+\"&\"+pParams;\n\n //alert(_FUNCTION_NAME_ + \" \" +action_url);\n parent.workframe.location = action_url;\n\n}", "function loadCCPage(pageNo) {\n\tvar postParams = \"infoTypeId=\"+activeHorizontalTabInfoID+\"&pageNo=\" + pageNo;\n\tvar infoArr = {};\n\tinfoArr[\"action\"] = \"pagination\";\n\n\t\t\t/**\n\t* search code for this section using keyword \"allInOneRespone\"\n\t*/\n\t/*\n\t\t\t\tif(typeOfApi=='allInOneResponse')\n\t{\n\t\thideCommonLoader();\n\t\tloadCCPageResponse(responseAllInOneResponse);\n\t}\n\telse\n\t*/\n\t\tsendProcessCCRequest(postParams,infoArr);\n\n\treturn false;\n}", "function donation_Offers_Requests(request_type,user){\n\tuser = user || \"\"\n\tvar tag = request_type == \"donation\"?\"user_donation_request_tag\":\"user_offer_application_tag\";\n\tvar data={};\n\tconsole.log(user.trim());\n\t// if user is empty\n\tif(!user.trim()){\n\t\tdata = {\"tag\":tag};\n\t}else if(user.trim()){\t\t\t\n\t\tdata = {\"tag\":tag,\"user_id\":user};\n\t}\n\n\t$.ajax({\n\t\turl: \"donation-request\",\n\t\tdata: data,\n\t\tdataType: \"json\",\n\t\ttype: \"GET\"\n\t})\n\t.done(function(result,responseText,xhr){\n\t\tif(result.length > 0){\n\n\t\t\tif(request_type == \"donation\"){\t\n\t\t\t\t$(\"#user_timeline\").load(\"includes/donation_display.jsp\", function(){\t\t\t\n\t\t\t\t \n\t\t\t\t\tresult.forEach(function(request){ \n\t\t\t\t\t\tvar complete = \"\";\n\t\t\t\t\t\tif(request.complete == \"t\"){\n\t\t\t\t\t\t\tcomplete = \"Full Donation Made\";\n\t\t\t\t\t\t}else if(request.complete == \"f\"){\n\t\t\t\t\t\t\tcomplete = \"Donation Not Met\";\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar oneRequest = \"<tr>\"+\n\t\t\t\t\t\t\t\t\t\t\t\"<td>\"+request.request_summary+\"</td>\"+\n\t\t\t\t\t\t\t\t\t\t\t\"<td>\"+request.details+\"</td>\"+\n\t\t\t\t\t\t\t\t\t\t\t\"<td>\"+request.donation_request_amount+\"</td>\"+\n\t\t\t\t\t\t\t\t\t\t\t\"<td>\"+request.donation_already_made+\"</td>\"+\n\t\t\t\t\t\t\t\t\t\t\t\"<td>\"+request.donation_request_date+\"</td>\"+\n\t\t\t\t\t\t\t\t\t\t\t\"<td>\"+request.expected_funding_date+\"</td>\"+\n\t\t\t\t\t\t\t\t\t\t\t\"<td>\"+ complete+\"</td>\"+ \n\t\t\t\t\t\t\t\t\t\t\t\"<td><a>Contribute</a></td>\"+ \n\t\t\t\t\t\t\t\t\t\t\"</tr>\";\n\t\t\t\t\t\t$(\"#user_requests\").append(oneRequest);\n\t\t\t\t\t});\t\t\n\n\t\t\t\t});\n\t\t\t}else if(request_type==\"offer\"){\n\t\t\t\t$(\"#user_timeline\").load(\"includes/offer_display.jsp\", function(){\t\t\t\n\t\t\t\t \n\t\t\t\t\tresult.forEach(function(request){ \n\t\t\t\t\t\tvar complete = \"\";\n\t\t\t\t\t\tif(request.complete == \"t\"){\n\t\t\t\t\t\t\tcomplete = \"Full Donation Made\";\n\t\t\t\t\t\t}else if(request.complete == \"f\"){\n\t\t\t\t\t\t\tcomplete = \"Donation Not Met\";\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar oneRequest = \"<tr>\"+\n\t\t\t\t\t\t\t\t\t\t\t\"<td>\"+request.offer_summary+\"</td>\"+\n\t\t\t\t\t\t\t\t\t\t\t\"<td>\"+request.offer_details+\"</td>\"+\n\t\t\t\t\t\t\t\t\t\t\t\"<td>\"+request.offer_amount+\"</td>\"+ \n\t\t\t\t\t\t\t\t\t\t\t\"<td>\"+request.offer_date+\"</td>\"+\n\t\t\t\t\t\t\t\t\t\t\t\"<td>\"+request.offer_expire_date+\"</td>\"+ \n\t\t\t\t\t\t\t\t\t\t\t\"<td><a>Apply</a></td>\"+ \n\t\t\t\t\t\t\t\t\t\t\"</tr>\";\n\t\t\t\t\t\t$(\"#user_requests\").append(oneRequest);\n\t\t\t\t\t});\t\t\n\n\t\t\t\t});\n\t\t\t}\n\t\t}else{\n\t\t\t$(\"#user_timeline\").html(\"<div class='text-center alert alert-info'>No Records Found</div>\");\n\t\t}\n\t})\n\t.fail(function(xhr){\n\t\tuserFeedback(xhr);\n\t});\t\n}", "function callDoc( action, session, proj, link, page, obj , xtra, sup) {\n\tvar hpos = window.screenX;\n\tvar vpos = window.screenY;\n\tdisableAcceptButton();\n\tgetRef();\n\tvar position = \"top=\" + vpos + \",left=\" + hpos ;\n\tvar xaction = \"?action=\" + action;\n\tvar xsession= \"&sess=\" + session_;\n\tvar xproj = \"&project=\" + project_ ;\n\tvar xlink\t= \"&link=\" + link;\n\tvar xpage\t= \"&page=\" + page;\n\tvar xobj\t= \"&obj=\" + obj;\n\tgetRef();\n\tvar xvers\t= \"&v=\" + version_;\n\tif ( xtra != undefined ) {\n\t\txsel = \"&sel=\"+ xtra;\n\t}\n\telse{\n\t\txsel = \"\";\n\t}\n\txsup = \"\";\n\t\n\tvar url =\t\"plusdoc.php\" + xaction + xsession + xproj + \n\t\t\t\t\txlink + xpage + xobj + xsel + xsup + xvers;\n\tvar atrib = \"toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,\"+\n\t\t\t\t\"scrollbars=yes,resizable=no,dependent=yes,\" + position;\n\twindow.location.href=url;\n} // callDoc() -------------------------------------------------------------", "function cm_engine_request(_xid, _cname){\n\tvar _nid = _xid;\n\tif(typeof(_xid)=='string') _nid = stdlib.importxid(_xid);\n\n//DEBUG stdlib.logit(\"Request start \"+_nid);\n\n\t// obter componente\n\tvar _component = cm_getcomponent(_nid, _cname);\n\tif('object' != typeof(_component)){\n//DEBUG stdlib.logit(\"REQUEST FAILURE \"+_nid);\n\n\t\t_component.errno = 1001;\n\t\treturn 1;\n\t}\n\n\t// testar ancoragem do componente\n\tif(!cm_anchored(_component)){\n//DEBUG stdlib.logit(\"Request anchored failure on \"+_nid);\n\n\t\t_component.xstatus = 11;\t// sem ancora\n\t\t_component.errno = 1002;\n\t\treturn 2;\n\t}\n\n//DEBUG stdlib.logit(\"cm_engine_request(\"+_xid+\", \"+_cname+\") called\");\n\n\t// instalar propriedades ausentes\n\tvar _std = cm_engine_std();\n\tfor(var _idx in _std) if('undefined' == typeof(_component[_idx])) _component[_idx] = _std[_idx];\n\t\n// CRITICAS\n\n\t// resolver conflito entre datatype e loadmethod\n\t// _component.datatype\n\tvar _mt = '';\n\tif('string' == typeof(_component['loadmethod']) && _component.loadmethod != '') _mt = _component['loadmethod'];\n\tif('string' == typeof(_component['datatype']) && _component.datatype != '') _mt = _component['datatype'];\n\t_component.loadmethod = _component.datatype = _mt;\n\n\t// metodo http\n\tif(_component.method!='POST' && _component.method != 'post' && _component.method != 'p' && _component.method != 'P')\n\t\t_component.method = 'GET';\n\n//DEBUG stdlib.logit(\"XID=\"+_xid+\" repeat=\"+_component.repeat+\" interval=\"+_component.interval);\n\n\t// interromper motor caso esteja ativo\n\tif('object'==typeof(_component.xhttp)) try{ _component.xhttp.abort(); } catch(e){}\n\t_component.xhttp = false;\n\n\t// invocar evento onplay, capaz de abortar a requisicao\n\tif('function' == typeof(_component['onplay']) ){\n\t\tvar _op = _component.onplay(_nid);\n\t\tvar _tof = typeof(_op);\n\t\tif('boolean'==_tof && !_op){\n//DEBUG stdlib.logit(\"Request onplay failure on \"+_nid);\n\n\t\t\t_component.errno = 1003;\n\t\t\treturn 3;\n\t\t}\n\t\t// onplay retornou objeto, agregar a propriedade tdata\n\t\tif(_tof == 'object') _component.tdata = stdlib.unlink(_op);\n\t}\n\n\t// marcar tempo da requisicao inicial\n\tif(!_component.starttime) _component.starttime = stdlib.utime();\n\n\t// numero de sequencia da requisicao\n\t_component.seqid++;\n\n\t// destruir sistema de cronometros de timeout/repeat\n\tcm_engine_untimer(_nid, _cname);\n\n\t// criar MOTOR\n\t_component.xhttp = false;\n\t_component.xhttp = stdlib.newAjax();\n\t_component.xhttp.xstatus = 0;\n\tif(!_component.xhttp){\n\t\t_component.errno = 1004;\n\t\treturn 4;\n\t}\n\n// controle de cache -c-c-c-c-c-c-c-c-c-c-c-c-c-c-c-c-c-c-c-c-c-c-c-c-c-c-c-c-c-c-c-c-c-c-c-c-c-c-c-c-c-c\n\tif(!_component.cache){\n\t\t// cache desativado, otimo!, enviar sempre chave baseada em tempo\n\t\t// para impedir que o navegador consiga armazenar no cache\n\t\t_component.cache_id = stdlib.microtime();\n\t}else{\n\t\t// cache ativo..., perigoso, mas fazer o que né...\n\t\t// id inicial\n\t\tif(!_component.cache_id) _component.cache_id = stdlib.microtime();\n\n\t\t// caso expiracao determinada, calcular id para caso expirado\n\t\tif(_component.cachetime){\n\t\t\t// expiracao ativa...\n\t\t\tif(!_component.cache_expire){\n\t\t\t\t// sem expiracao marcada, primeira vez, apenas preencher timestamp de expiracao\n\t\t\t\t_component.cache_expire = stdlib.time() + _component.cachetime;\n\n\t\t\t}else{\n\t\t\t\t// tempo de expiracao ja marcado, verificar se expirou\n\t\t\t\tif(_component.cache_expire <= stdlib.time()){\n\t\t\t\t\t// expirou, renovar id e data de expiracao\n\t\t\t\t\t_component.cache_id = stdlib.microtime();\n\t\t\t\t\t_component.cache_expire = stdlib.time() + _component.cachetime;\n\t\t\t\t//}else{\n\t\t\t\t// nao expirou ainda\n\t\t\t\t}\n\t\t\t}\n\t\t\t_component.cache_id = stdlib.microtime();\n\t\t//}else{\n\t\t// sem cachetime, manter id eternamente!!!\n\t\t}\n\t}\n\n/* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- */\n\n\t// sequencia de query-string (independe de metodo)\n\tvar _get_vars = {};\n\tvar _data_vars = {};\n\n\t// anexar id de cache\n\t_get_vars.nocache = _component.cache_id;\n\n\t// enviar seqid apenas se cache desativado, senao vai impedir o funcionamento do cache\n\tif(!_component.cache) _get_vars.seqid = _component.seqid;\n\n\t// sid e nid\n\t_get_vars.nid = _nid;\n\t_get_vars.sid = _component.sid;\n\n\t// domid e anchor\n\tif(_component.domid!='') _get_vars.domid = _component.domid;\n\tif(_component.anchor!='') _get_vars.anchor = _component.anchor;\n\n\t// nome do componente e nome do agente\n\t_get_vars.agent = _component.agent;\n\n\t// copiar data e tdata para _data_vars\n\tif(_component.data) for(var _dx in _component.data) _data_vars[_dx] = _component.data[_dx];\n\tif(_component.edata) for(var _dx in _component.edata) _data_vars[_dx] = _component.edata[_dx];\n\tif(_component.tdata) for(var _dx in _component.tdata) _data_vars[_dx] = _component.tdata[_dx];\n\n\t// fechar strings\n\t// obj2uri = encodeURIComponent\n\t// obj2qs = escape\n\t//- var _get_string = stdlib.obj2qs(_get_vars);\n\t//- var _data_string = stdlib.obj2qs(_data_vars);\n\tvar _get_string = stdlib.obj2uri(_get_vars);\n\tvar _data_string = stdlib.obj2uri(_data_vars);\n\n\t// enviar tudo na URL se o metodo for GET\n\tif(_component.method == 'GET') _get_string += '&' + _data_string;\n\n\t// montar URL do pedido\n\tvar _url = _component.url;\n\n\tif(_url==''){\n\t\t_component.errno = 1006;\n\t\treturn 6;\n\t}\n\n\t/* construir .request_string */\n\tif((_url.indexOf('?',0)===-1?false:true)){\n\t\t/* possui '?' , colocar &nocache=nnnnnn */\n\t\t_url = _url + \"&\" + _get_string;\n\t}else{\n\t\t/* NAO possui '?' , colocar ?nocache=nnnnnn */\n\t\t_url = _url + \"?\" + _get_string;\n\t}\n//DEBUG stdlib.logit(\"URL=[\"+_url+\"]\");\n\n\t// armazenar para informacoes\n\t// ambos os metodos - GET e POST\n\t_component.query_string = _url;\n\n\t// metodo POST\n\t_component.post_string = '';\n\tif(_component.method == 'POST') _component.post_string = _data_string;\n\n\t// disparar state change zero\n\t// caso funcao do usuario desative a execucao com um FALSE, aborta continuacao\n\tif('function' == typeof(_component['onstatuschange']) ){\n\t\tvar _op = _component.onstatuschange(_nid);\n\t\tif('boolean'==typeof(_op) && !_op){\n//DEBUG stdlib.logit(\"Request onstatuschange failure on \"+_nid);\n\n\t\t\t_component.xhttp.xstatus = 6;\n\t\t\t_component.errno = 1005;\n\t\t\treturn 5;\n\t\t}\n\t}\n\n/* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- */\n\n\t// Criar funcao de camada / retorno\n\tvar _callback_str = '_callback_fnc = function(){ cm_engine_xhr_reply('+_nid+', \"'+_cname+'\"); }';\n\t_callback_fnc = eval(_callback_str);\n\t_component.xhttp.onreadystatechange=_callback_fnc;\n\n\t// dar partida / ignicão\n\t_component.xhttp.open(_component.method, _url, _component.async);\n\n\t// registrar cabecalhos\n\tif('object' == typeof(_component.headers)){\n\t\tstdlib.setHeaders(_component.xhttp, _component.headers);\n\t}\n\n// --------------------------------------------\n\n\t// enviar cabecalho de tipo\n\tvar _contentType = '';\n\tvar _ct = (_component.contentType);\n\tvar _cs = (_component.charset);\n\tif(_ct!=''||_cs!=''){\n\t\t_contentType = (_ct=='' ? 'application/x-www-form-urlencoded' : _ct);\n\t\tif(_cs!='') _contentType += '; charset='+stdlib.strtoupper(_cs);\n\t}\n\tif(_contentType)\n\t\ttry{ _component.xhttp.setRequestHeader(\"Content-type\", _contentType); }catch(e){}\n\t//stdlib.logit(\"ContentType=[\"+_contentType+\"]\");\n\n// --------------------------------------------\n\t// disparar motor contra o servidor\n\tif(_component.method=='POST'){\n\t\t// enviar cabecalho de tipo\n\t\t//-if(_component.contentType!='')\n\t\t//-\ttry{ _component.xhttp.setRequestHeader(\"Content-type\", _component.contentType); }catch(e){}\n\t\t\n\t\t// enviar em modo POST\n\t\ttry{ _component.xhttp.send(_data_string); }\n\t\tcatch(e){\n\t\t\t// erro no send\n\t\t\t_component.errno = 70;\n\t\t\t_component.stats.err++;\n\t\t\tif(stdlib.isfunction(_component.onerror)) _component.onerror(_nid, 70, 'xhttp.send.post.try_error');\n\t\t}\n\t}else{\n\t\t// enviar tudo na string via GET\n\t\t// o imbecil do internet explorer nao suporta false com parametro de send()\n\t\ttry{ _component.xhttp.send(null); }\n\t\tcatch(e){\n\t\t\t// erro no send\n\t\t\t_component.errno = 71;\n\t\t\t_component.stats.err++;\n\t\t\tif(stdlib.isfunction(_component.onerror)) _component.onerror(_nid, 71, 'xhttp.send.get.try_error');\n\t\t}\n\t}\n\n\t// contador de requisicoes enviadas\n\t_component.stats.request++;\n\t_component.playtime = stdlib.microtime();\n\n\t// iniciar contador de timeout\n\tcm_engine_timeout(_nid, _cname, 1);\n\n\t_component.errno = 0;\n\n//DEBUG stdlib.logit(\"Request SENDED TO SERVER on \"+_nid+\" seqid=\"+_component.seqid);\n\n\treturn(true);\n}", "function funcSearchTeachers() {\n\tadditionalParams();\n}", "function request_list_get(sc) {\n\t\tvar\n\t\t\trequest_list = new Array;\n\t\t\tdocument.getElementById(\"sc_count\").innerHTML=\"0\";\n\n\t\tif (window.opener) {\n\t\t\t\n\t\t\t// SiteCatalyst Images\n\t\t\tif (window.opener.document.images) {\n\t\t\t\tfor (var image_num = 0;image_num < window.opener.document.images.length;image_num++) {\n\t\t\t\t\tvar\n\t\t\t\t\t\tsrc = window.opener.document.images[image_num].src;\n\t\t\t\t\tif (src.indexOf('/b/ss/') >= 0) {\n\t\t\t\t\t\tif(sc){\n\t\t\t\t\t\t\tvar request = new Object;\n\t\t\t\t\t\t\trequest.code = 'sc';\n\t\t\t\t\t\t\trequest.method = 'SiteCatalyst Image';\n\t\t\t\t\t\t\trequest.url = src;\n\t\t\t\t\t\t\trequest_list[request_list.length] = request;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdocument.getElementById(\"sc_count\").innerHTML++;\n\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Global Image Objects\n\t\t\tfor (var window_member in window.opener) {\n\t\t\t\tif ((window_member.substring(0,4) == 's_i_') && (window.opener[window_member].src)) {\n\t\t\t\t\tvar\n\t\t\t\t\t\tsrc = window.opener[window_member].src;\n\t\t\t\t\tif (src.indexOf('/b/ss/') >= 0) {\n\t\t\t\t\t\tif(sc){\n\t\t\t\t\t\t\tvar request = new Object;\n\t\t\t\t\t\t\trequest.code = 'sc';\n\t\t\t\t\t\t\trequest.method = 'SiteCatalyst Image';\n\t\t\t\t\t\t\trequest.url = src;\n\t\t\t\t\t\t\trequest_list[request_list.length] = request;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdocument.getElementById(\"sc_count\").innerHTML++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t \n\t\treturn request_list;\n\t}", "function REQ_MGMT(id)\n{\n var _FUNCTION_NAME_=\"REQ_MGMT\";\n var pParams = tree_getPrintPreferences();\n var action_url = fRoot+req_manager_url+\"?item=requirement&requirement_id=\"+id+args+\"&\"+pParams;\n\n //alert(_FUNCTION_NAME_ + \" \" +action_url);\n parent.workframe.location = action_url;\n\n}", "function initRequest(url) {\n \n //window.alert(\"initRequest(\" + url + \") is called\");\n //console.log(\"initRequest(%s) is called\", url);\n \n if (window.XMLHttpRequest) {\n req = new XMLHttpRequest(); \n } else if (window.ActiveXObject) {\n isIE = true;\n req = new ActiveXObject(\"Microsoft.XMLHTTP\");\n }\n }", "function useRequest() {\nvar request = Module['memoryInitializerRequest'];\nvar response = request.response;\nif (request.status !== 200 && request.status !== 0) {\nvar data = tryParseAsDataURI(Module['memoryInitializerRequestURL']);\nif (data) {\nresponse = data.buffer;\n} else {\n// If you see this warning, the issue may be that you are using locateFile or memoryInitializerPrefixURL, and defining them in JS. That\n// means that the HTML file doesn't know about them, and when it tries to create the mem init request early, does it to the wrong place.\n// Look in your browser's devtools network console to see what's going on.\nconsole.warn('a problem seems to have happened with Module.memoryInitializerRequest, status: ' + request.status + ', retrying ' + memoryInitializer);\ndoBrowserLoad();\nreturn;\n}\n}\napplyMemoryInitializer(response);\n}", "requestContent(){\n throw \"Not implemented\";\n }", "function FlexTable_stacks_in_1508_page20_Resp() {\n\n\tvar mobile = FlexTable_stacks_in_1508_page20_isMobile();\n\tif ((0 != 1) || (0 != 1)) {\n\t\tFlexTable_stacks_in_1508_page20_Search(false);\n\t\t} else {\n\t\tif (mobile) {\n\t\t\tif (1 == 1) {\n\t\t\t\tFlexTable_stacks_in_1508_page20_Search(false);\n\t\t\t\t} else {\n\t\t\t\tFlexTable_stacks_in_1508_page20_Search(true);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\tFlexTable_stacks_in_1508_page20_Search(true);\n\t\t\t}\n\t\t}\n\n\tif (\"hscroll\" == \"record\") {\n\t\tif (mobile) {\n\t\t\tFlexTable_stacks_in_1508_page20_Pager(true);\n\t\t\tFlexTable_stacks_in_1508_page20_GoRotated(true);\n\t\t\t} else {\n\t\t\tif (0 != 1) {\n\t\t\t\tFlexTable_stacks_in_1508_page20_Pager(false);\n\t\t\t\t} else {\n\t\t\t\tFlexTable_stacks_in_1508_page20_Pager(true);\n\t\t\t\t}\n\t\t\tFlexTable_stacks_in_1508_page20_GoRotated(false);\n\t\t\t}\n\t\t} else {\n\t\tif (0 == 1) {\n\t\t\tFlexTable_stacks_in_1508_page20_Pager(true);\n\t\t\tFlexTable_stacks_in_1508_page20_MakePager(window.FlexTable_stacks_in_1508_page20_PageNumber);\n\t\t\tFlexTable_stacks_in_1508_page20_SetPage(window.FlexTable_stacks_in_1508_page20_PageNumber);\n\t\t\t} else {\n\t\t\tFlexTable_stacks_in_1508_page20_Pager(false);\n\t\t\t}\n\t\t}\n\t}", "function FlexTable_stacks_in_4027_page20_Resp() {\n\n\tvar mobile = FlexTable_stacks_in_4027_page20_isMobile();\n\tif ((0 != 1) || (0 != 1)) {\n\t\tFlexTable_stacks_in_4027_page20_Search(false);\n\t\t} else {\n\t\tif (mobile) {\n\t\t\tif (1 == 1) {\n\t\t\t\tFlexTable_stacks_in_4027_page20_Search(false);\n\t\t\t\t} else {\n\t\t\t\tFlexTable_stacks_in_4027_page20_Search(true);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\tFlexTable_stacks_in_4027_page20_Search(true);\n\t\t\t}\n\t\t}\n\n\tif (\"hscroll\" == \"record\") {\n\t\tif (mobile) {\n\t\t\tFlexTable_stacks_in_4027_page20_Pager(true);\n\t\t\tFlexTable_stacks_in_4027_page20_GoRotated(true);\n\t\t\t} else {\n\t\t\tif (0 != 1) {\n\t\t\t\tFlexTable_stacks_in_4027_page20_Pager(false);\n\t\t\t\t} else {\n\t\t\t\tFlexTable_stacks_in_4027_page20_Pager(true);\n\t\t\t\t}\n\t\t\tFlexTable_stacks_in_4027_page20_GoRotated(false);\n\t\t\t}\n\t\t} else {\n\t\tif (0 == 1) {\n\t\t\tFlexTable_stacks_in_4027_page20_Pager(true);\n\t\t\tFlexTable_stacks_in_4027_page20_MakePager(window.FlexTable_stacks_in_4027_page20_PageNumber);\n\t\t\tFlexTable_stacks_in_4027_page20_SetPage(window.FlexTable_stacks_in_4027_page20_PageNumber);\n\t\t\t} else {\n\t\t\tFlexTable_stacks_in_4027_page20_Pager(false);\n\t\t\t}\n\t\t}\n\t}", "function _process(ctype, cwho, cdata, url) {\n\n var data = '';\n var baseurl = window.location.protocol + \"//\" + (window.location.host + \"/\" + window.location.pathname).replace('//', '/') + '/';\n /* configured to allow for requests to different resources for load balance option * default * baseurl */\n console.log('using default baseurl :' + baseurl);\n \n switch (ctype) {\n\n case ('get'):\n getdata(baseurl + cpath, callrequest, 'url', cwho);\n break;\n \n case ('post'):\n switch (cwho) {\n \n case ('_invoice'): /* contact us widget */\n postform(url, callrequest, cdata, cwho);\n break;\n\n }\n break;\n }\n\n baseurl = null;\n callrequest(data);\n data = null;\n}", "function FlexTable_stacks_in_2848_page20_Resp() {\n\n\tvar mobile = FlexTable_stacks_in_2848_page20_isMobile();\n\tif ((0 != 1) || (0 != 1)) {\n\t\tFlexTable_stacks_in_2848_page20_Search(false);\n\t\t} else {\n\t\tif (mobile) {\n\t\t\tif (1 == 1) {\n\t\t\t\tFlexTable_stacks_in_2848_page20_Search(false);\n\t\t\t\t} else {\n\t\t\t\tFlexTable_stacks_in_2848_page20_Search(true);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\tFlexTable_stacks_in_2848_page20_Search(true);\n\t\t\t}\n\t\t}\n\n\tif (\"hscroll\" == \"record\") {\n\t\tif (mobile) {\n\t\t\tFlexTable_stacks_in_2848_page20_Pager(true);\n\t\t\tFlexTable_stacks_in_2848_page20_GoRotated(true);\n\t\t\t} else {\n\t\t\tif (0 != 1) {\n\t\t\t\tFlexTable_stacks_in_2848_page20_Pager(false);\n\t\t\t\t} else {\n\t\t\t\tFlexTable_stacks_in_2848_page20_Pager(true);\n\t\t\t\t}\n\t\t\tFlexTable_stacks_in_2848_page20_GoRotated(false);\n\t\t\t}\n\t\t} else {\n\t\tif (0 == 1) {\n\t\t\tFlexTable_stacks_in_2848_page20_Pager(true);\n\t\t\tFlexTable_stacks_in_2848_page20_MakePager(window.FlexTable_stacks_in_2848_page20_PageNumber);\n\t\t\tFlexTable_stacks_in_2848_page20_SetPage(window.FlexTable_stacks_in_2848_page20_PageNumber);\n\t\t\t} else {\n\t\t\tFlexTable_stacks_in_2848_page20_Pager(false);\n\t\t\t}\n\t\t}\n\t}", "function initialPages($) {\n\t\t$('.select2').select2();\n\t\tdisabledInput();\n\t\tentityHandler();\n\t\texpiryDateRange('#expiry');\n\t\textendEXpiryDatePicker('#extend_expiry');\n\t\tclickConfirmExtend();\n\t\tclickConfirmTerminate();\n\t\tclickConfirmChangeStatus();\n\t\tclickConfirmChangeGroup();\n\t\tclickConfirmChangePassword();\n\t\tclickConfirmResetPassword();\n\t\tclickModalCloseBtnDone();\n\t}", "function processResponse(){\n //\n }", "function renderReqPage(page, data, favorites, interests) {\n switch (page) {\n case 'splash':\n // Disables mosaic rendering ofr better performance\n // return renderMosaic(data);\n break;\n case 'user/register':\n return renderUserPage('register');\n break;\n case 'user/login':\n return renderUserPage('login');\n break;\n case 'results':\n return renderResults(data, favorites, interests);\n break;\n case 'favorites':\n return renderFavorites(data);\n break;\n case 'detail':\n return renderDetail(data, favorites);\n break;\n }\n}", "function process_page() {\r\n\tconst loadPage = function(page) {\r\n\t\tconst main = $('#mdl-layout__content');\r\n\t\tmain.html(page);\r\n\t\tprocess_accordions(main);\r\n\t\tprocess_links(main);\r\n\t\tprocess_code_lines();\r\n\t\tcomponentHandler.upgradeDom();\r\n\t\t$(\".app-loading\").fadeOut();\r\n\t}\r\n\t\r\n\tswitch (window.location.hash) {\r\n\t\tcase '':\r\n\t\tcase '#apis':\r\n\t\t\t$(\"#apis\").addClass(\"is-active\");\r\n\t\t\t$(\"#guides\").removeClass(\"is-active\");\r\n\t\t\tloadPage(compileTemplate('apis'));\r\n\t\t\tbreak;\r\n\t\tcase '#guides':\r\n\t\t\t$(\"#apis\").removeClass(\"is-active\");\r\n\t\t\t$(\"#guides\").addClass(\"is-active\");\r\n\t\t\tloadPage(compileTemplate('guides'));\r\n\t\t\tbreak;\r\n\t\tdefault:\t\r\n\t\t\tconst hash = unescape(window.location.hash.substring(1));\r\n\t\t\tconst item = MEMBERS.find(it => it.signature == hash);\r\n\t\t\tif (item) {\r\n\t\t\t\tloadPage(compileTemplate('default', item));\r\n\t\t\t} else {\r\n\t\t\t\tconst guide = GUIDES[hash];\r\n\t\t\t\tif (guide) {\r\n\t\t\t\t\tif (!guide.processed) {\r\n\t\t\t\t\t\tguide.content = process_comment(undefined, guide.content);\r\n\t\t\t\t\t\tguide.processed = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tloadPage(Handlebars.compile(guide.content)());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tloadPage(compileTemplate('error'));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t}\r\n}", "function qll_module_ajax()\r\n{\r\n\r\n\taddJS('http://www.erepublik.com/js/jquery-1.3.2.min.js','head');\r\n\taddJS('http://www.erepublik.com/js/jquery.history.plugin.js','head');\r\n\taddJS('http://www.erepublik.com/js/exchange/filters.js','head');\r\n\taddJS('http://www.erepublik.com/js/exchange/historyList.js','head');\r\n\taddJS('http://www.erepublik.com/js/exchange/currency.js','head');\r\n\taddJS('http://www.erepublik.com/js/exchange/listOffers.js','head');\r\n\r\n\taddJS('http://economy.erepublik.com/js/uncompressed.jquery.dd.js','head');\r\n\taddJS('http://economy.erepublik.com/js/jquery.tools.min.js','head');\r\n\taddJS('http://economy.erepublik.com/js/ui.core.js','head');\r\n\taddJS('http://economy.erepublik.com/js/ui.slider.js','head');\r\n\taddJS('http://economy.erepublik.com/js/jquery.blockUI.js','head');\r\n\taddJS('http://economy.erepublik.com/js/Market/marketplace.js','head');\r\n\taddJS('http://economy.erepublik.com/js/numberChecks.js','head');\r\n\taddCSS('http://www.erepublik.com/css/cmp/marketplace.css','head');\r\n\r\n\t//$(\"#content a\").each(function(){\r\n\t$(\"a\").each(function(){\r\n\t\tif($(this).attr(\"href\") == \"#\")\r\n\t\t\treturn;\r\n\t\t$(this).click(function(event){\r\n\t\t\tevent.preventDefault()\r\n\t\t\tqll_module_ajax_perform($(this).attr(\"href\"))\r\n\t\t});\r\n\t\t\r\n\t});\r\n}", "function processPageInputs() {\n\tlet page_inputs = getValueFromAppState('page_inputs');\n\tif (page_inputs === null) {\n\t\tloadUserRoleLandingPage(\"anonymous\");\n\t\treturn;\n\t}\n\tif (page_inputs.length > 0) {\n\t\turl_input_parameters = new URLSearchParams(page_inputs);\n\t} else {\n\t\tloadUserRoleLandingPage(\"anonymous\");\n\t\treturn;\n\t}\n\tlet page_component = dx_page_manager.getMobilePageAlternate(url_input_parameters.get(\"view\"));\n\tlet view = \"pages/\"+page_component;\n\tupdateAppState(\"CurrentPage\",view);\n\tif ((typeof url_input_parameters.get(\"view\") === \"undefined\") || (url_input_parameters.get(\"view\") == null)) {\n\t\tthrow new Error(\"Invalid component name provided. Click here to visit the setup page: \"+getServerRootPath()+\"divblox/\");\n\t} else {\n\t\taddPageToRootHistory(page_component);\n\t\tloadComponent(view,null,'body',{\"uid\":page_uid},false);\n\t}\n\tif (debug_mode) {\n\t\tdxPostExternal(getServerRootPath()+\"divblox/config/framework/check_divblox_admin_logged_in.php\",{},\n\t\t\tfunction(data) {\n\t\t\t\tlet data_obj = JSON.parse(data);\n\t\t\t\tif (data_obj.Result == \"Success\") {\n\t\t\t\t\tlet admin_links_html = '<a target=\"_blank\" href=\"'+getServerRootPath()+'divblox/\" ' +\n\t\t\t\t\t\t'style=\"position: fixed;bottom: 10px;right: 10px;\">' +\n\t\t\t\t\t\t'<img src=\"'+getRootPath()+'divblox/assets/images/divblox_logo.svg\" style=\"max-height:30px;\"/></a>' +\n\t\t\t\t\t\t'<a target=\"_blank\" href=\"'+getRootPath()+'component_builder.php?component='+view+'\" ' +\n\t\t\t\t\t\t'class=\"btn btn-outline-primary btn-sm\" style=\"position: fixed;bottom: 10px;right: 105px;font-family: -apple-system, BlinkMacSystemFont, \\'Segoe UI\\',' +\n\t\t\t\t\t\t' Roboto, \\'Helvetica Neue\\', Arial, \\'Noto Sans\\', sans-serif, \\'Apple Color Emoji\\', \\'Segoe UI Emoji\\',' +\n\t\t\t\t\t\t' \\'Segoe UI Symbol\\', \\'Noto Color Emoji\\'; font-size:14px;\"><i class=\"fa fa-wrench\"' +\n\t\t\t\t\t\t' aria-hidden=\"true\"></i> Component Builder</a>';\n\t\t\t\t\t$('body').append(admin_links_html);\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction(data) {});\n\t}\n}", "function main() {\n\t\t//Check the Method\n\t\tif ($.request.method === $.net.http.POST) {\n\t\t\tif (gvMethod === \"MAP\") {\n\t\t\t\t//Perform The Mapping between In and Out\n\t\t\t\ttry {\n\t\t\t\t\t_mapInToOut();\n\t\t\t\t} catch (errorObj) {\n\t\t\t\t\tgvStatus = \"Error during mapping IN to OUT:\" + errorObj.message;\n\t\t\t\t\t$.response.status = 200;\n\t\t\t\t\t$.response.setBody(JSON.stringify({\n\t\t\t\t\t\tmessage: \"API Called\",\n\t\t\t\t\t\tresult: gvErrorMessage,\n\t\t\t\t\t\tstatus: gvStatus,\n\t\t\t\t\t\ttableUpdates: gvTableUpdate\n\t\t\t\t\t}));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// \t\t} else if ($.request.method === $.net.http.GET) {\n\t\t// \t\t\t//Read Entries from the Table\n\t\t// \t\t\ttry {\n\t\t// \t\t\t\t_getEntries();\n\t\t// \t\t\t} catch (errorObj) {\n\t\t// \t\t\t\t$.response.status = 200;\n\t\t// \t\t\t\t$.response.setBody(JSON.stringify({\n\t\t// \t\t\t\t\tmessage: \"API Called\",\n\t\t// \t\t\t\t\tresult: gvErrorMessage\n\t\t// \t\t\t\t}));\n\t\t// \t\t\t}\n\t\t// \t\t}\n\t}", "function _common_fileDownload(pr_seq,category,target_seq,of_no)\n{\n\tExt.Ajax.request({\n\t\turl : \"./index.php/FileDownload/file_download_chk\",\n\t\tparams :{\n\t\t\tpr_seq : pr_seq,\n\t\t\tcategory : category,\n\t\t\ttarget_seq : target_seq,\n\t\t\tof_no : of_no\n\t\t},\n\t\tmethod: 'POST',\n\t\tsuccess: function ( result, request ) {\n\t\t\tvar file_info = Ext.decode(result.responseText);\n\t\t\tif(file_info.success == true){\n\t\t\t\tvar file_url = './index.php/FileDownload/file_download?pr_seq='+pr_seq+'&category='+category+'&target_seq='+target_seq+'&of_no='+of_no;\n\t\t\t\twindow.open (file_url,'hiddenframe','');\n\t\t\t}else{\n\t\t\t\tswitch(file_info.msg){\n\t\t\t\t\tcase \"no_file\":\n\t\t\t\t\t\tExt.Msg.alert(\"OTM\",\"Not File\");\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"no_access\":\n\t\t\t\t\t\tExt.Msg.alert(\"OTM\",\"Not Access\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tfailure: function ( result, request ) {\n\t\t\talert(\"fail\");\n\t\t}\n\t});\n}", "function load_report_page() {\n page = 'user_help';\n load_page();\n}", "function PartialResponse() { }", "function PartialResponse() { }", "function PartialResponse() { }", "function FlexTable_stacks_in_3586_page20_Resp() {\n\n\tvar mobile = FlexTable_stacks_in_3586_page20_isMobile();\n\tif ((0 != 1) || (0 != 1)) {\n\t\tFlexTable_stacks_in_3586_page20_Search(false);\n\t\t} else {\n\t\tif (mobile) {\n\t\t\tif (1 == 1) {\n\t\t\t\tFlexTable_stacks_in_3586_page20_Search(false);\n\t\t\t\t} else {\n\t\t\t\tFlexTable_stacks_in_3586_page20_Search(true);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\tFlexTable_stacks_in_3586_page20_Search(true);\n\t\t\t}\n\t\t}\n\n\tif (\"hscroll\" == \"record\") {\n\t\tif (mobile) {\n\t\t\tFlexTable_stacks_in_3586_page20_Pager(true);\n\t\t\tFlexTable_stacks_in_3586_page20_GoRotated(true);\n\t\t\t} else {\n\t\t\tif (0 != 1) {\n\t\t\t\tFlexTable_stacks_in_3586_page20_Pager(false);\n\t\t\t\t} else {\n\t\t\t\tFlexTable_stacks_in_3586_page20_Pager(true);\n\t\t\t\t}\n\t\t\tFlexTable_stacks_in_3586_page20_GoRotated(false);\n\t\t\t}\n\t\t} else {\n\t\tif (0 == 1) {\n\t\t\tFlexTable_stacks_in_3586_page20_Pager(true);\n\t\t\tFlexTable_stacks_in_3586_page20_MakePager(window.FlexTable_stacks_in_3586_page20_PageNumber);\n\t\t\tFlexTable_stacks_in_3586_page20_SetPage(window.FlexTable_stacks_in_3586_page20_PageNumber);\n\t\t\t} else {\n\t\t\tFlexTable_stacks_in_3586_page20_Pager(false);\n\t\t\t}\n\t\t}\n\t}", "function bcInitCprnPrintRequest() {\r\n\tpromFetchAll(vWork.db.work.handle, 'tapr').then(function (taprAry) {\r\n\t\tvWork.al.tapr = taprAry;\r\n\r\n\t\tpromFetchAllIdx(vWork.db.work.handle, 'tcdt', 'print_order').then(function (tcdtAry) {\r\n\t\t\tvWork.al.tcdt = tcdtAry.filter(function (o) { return o.sell_qty > 0});\r\n\r\n\t\t\tpromFetchRec(vWork.db.dnld.handle, 'rhdr', vDynm.re.rhdr.route_id).then(function (rhdrAry) {\r\n\t\t\t\tvDynm.re.rhdr = rhdrAry;\r\n\r\n\t\t\t\tpromFetchAll(vWork.db.work.handle, 'tchd').then(function (tchdAry) {\r\n\t\t\t\t\tvWork.al.tchd = tchdAry;\r\n\r\n\t\t\t\t\tif (vWork.al.tcdt.length > 0) {\r\n\t\t\t\t\t\tcprnPrePrintInit();\r\n\t\t\t\t\t\tprntXactHdrsScan();\r\n\t\t\t\t\t\tprntXactHdrsDisp(204900);\r\n\t\t\t\t\t\tprntXactSetVals();\r\n\t\t\t\t\t\tcprnDispPickList();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tboxChange(4902);\r\n\t\t\t\t\t}\r\n\t\t\t }).catch(function (error) {\r\n\t\t\t\t\tconsole.log(error);\r\n\t\t\t });\r\n\t\t }).catch(function (error) {\r\n\t\t\t\tconsole.log(error);\r\n\t\t });\r\n\t }).catch(function (error) {\r\n\t\t\tconsole.log(error);\r\n\t });\r\n }).catch(function (error) {\r\n\t\tconsole.log(error);\r\n });\r\n\r\n\tcprnBuildMethSel('i_csdnPayMethSel');\r\n\tcprnPrntReqScrInit();\r\n}", "function processRequest(error, response, body) {\n if (error) {\n console.error(error); // Something went wrong with the request\n return;\n }\n\n // Calls the processMenuJSON function sending the response body and arr array containing the past menus\n if (!processMenuJSON(JSON.parse(body), arr)) {\n // if the helper function returned false, there are still more pages to get from the server so the getMenus function is called recursively\n getMenus(id, page + 1, arr, processMenusCallback);\n } else {\n // If the helper function returned true then the arr array contains all of the menus from all of the pages and we can call the processMenusCallback to process the menus\n processMenusCallback(arr);\n }\n }", "function onPageRequest(req, res) {\n //Path mapping to function for REST API\n var RESTReq = parseREST(req);\n\n if (RESTReq.action == \"default\") {\n httpResp(res, \"BIPed REST API 0.1\");\n } else if (RESTReq.action == \"hello\") {\n httpResp(res, \"Hello World\")\n } else if (RESTReq.action == \"wstest\") {\n res.writeHead(200, { 'Content-Type': 'text/html' });\n res.end(page);\n } else if (RESTReq.action == \"ledOn\") {\n digitalWrite(D0, false);\n httpResp(res, \"Red Led On\");\n } else if (RESTReq.action == \"ledOff\") {\n digitalWrite(D0, true);\n httpResp(res, \"Red Led Off\");\n } else if (RESTReq.action == \"wifi\") {\n httpResp(res, JSON.stringify(wifi.getStatus()) + JSON.stringify(wifi.getIP()));\n } else if (RESTReq.action == \"write\") {\n digitalWrite(RESTReq.port, RESTReq.value);\n httpResp(res, JSON.stringify(RESTReq));\n } else if (RESTReq.action == \"servo\") {\n if (RESTReq.value == \"test\") {\n testServo(RESTReq.port);\n } else if (RESTReq.value > 0) {\n move(RESTReq.port, RESTReq.value / 100);\n } else {\n move(RESTReq.port, 0);\n }\n httpResp(res, JSON.stringify(RESTReq));\n } else {\n res.writeHead(404, { 'Content-Type': 'text/plain' });\n res.end(JSON.stringify(RESTReq));\n }\n}", "function ajax_legacy() {\n /* + when */\n jQuery.ajax\n (\n jQuery.extend\n (\n true , {} ,\n settings.ajax ,\n callbacks ,\n {\n url : url ,\n beforeSend : function () {\n XMLHttpRequest = arguments[ 0 ] ;\n \n XMLHttpRequest.setRequestHeader( settings.nss.requestHeader , 'true' ) ;\n XMLHttpRequest.setRequestHeader( settings.nss.requestHeader + '-Area' , settings.area ) ;\n XMLHttpRequest.setRequestHeader( settings.nss.requestHeader + '-CSS' , settings.load.css ) ;\n XMLHttpRequest.setRequestHeader( settings.nss.requestHeader + '-Script' , settings.load.script ) ;\n \n fire( settings.callbacks.ajax.beforeSend , context , [ event , settings.parameter , XMLHttpRequest ] , settings.callbacks.async ) ;\n } ,\n success : function () {\n data = arguments[ 0 ] ;\n dataType = arguments[ 1 ] ;\n XMLHttpRequest = arguments[ 2 ] ;\n \n fire( settings.callbacks.ajax.success , context , [ event , settings.parameter , data , dataType , XMLHttpRequest ] , settings.callbacks.async ) ;\n \n update() ;\n } ,\n error : function () {\n XMLHttpRequest = arguments[ 0 ] ;\n textStatus = arguments[ 1 ] ;\n errorThrown = arguments[ 2 ] ;\n \n /* validate */ var validate = plugin_data[ settings.id ] && plugin_data[ settings.id ].validate ? plugin_data[ settings.id ].validate.clone( { name : 'jquery.pjax.js - drive()' } ) : validate ;\n /* validate */ validate && validate.start() ;\n /* validate */ validate && validate.test( '++', 1, [ url, win.location.href ], 'ajax_legacy()' ) ;\n /* validate */ validate && validate.test( '++', 1, [ XMLHttpRequest, textStatus, errorThrown ], 'ajax error' ) ;\n fire( settings.callbacks.ajax.error , context , [ event , settings.parameter , XMLHttpRequest , textStatus , errorThrown ] , settings.callbacks.async ) ;\n if ( settings.fallback ) { return typeof settings.fallback === 'function' ? settings.fallback( event ) : fallback( event , validate ) ; } ;\n /* validate */ validate && validate.end() ;\n }\n }\n )\n )\n /* - when */\n }" ]
[ "0.65674484", "0.59379715", "0.58753777", "0.58440727", "0.58253276", "0.57646555", "0.5758129", "0.5674644", "0.56234187", "0.55583334", "0.55120695", "0.5510181", "0.54953355", "0.5470429", "0.54345524", "0.54170644", "0.53994197", "0.5377799", "0.5375204", "0.5361053", "0.5324908", "0.5319024", "0.53021854", "0.52987087", "0.5266147", "0.52577806", "0.5240794", "0.52328", "0.5228415", "0.5228253", "0.52037174", "0.5199612", "0.51948583", "0.5194832", "0.5193151", "0.5191882", "0.51900023", "0.5185389", "0.51845187", "0.51801664", "0.5172384", "0.51602846", "0.51576924", "0.5154648", "0.51399446", "0.5136489", "0.51172656", "0.5112082", "0.5104405", "0.50911325", "0.5085193", "0.5081919", "0.5078962", "0.50750524", "0.5071653", "0.5068572", "0.50571483", "0.50533843", "0.50524974", "0.50480354", "0.50476867", "0.503788", "0.5036323", "0.50330865", "0.5028602", "0.5027255", "0.50178784", "0.50141406", "0.5009909", "0.5005749", "0.50048244", "0.5000527", "0.5000178", "0.49968466", "0.4995276", "0.49921498", "0.49916944", "0.49888363", "0.49881053", "0.4988022", "0.4986545", "0.49864388", "0.49860018", "0.49853736", "0.49819776", "0.49808627", "0.49796483", "0.49764085", "0.49760884", "0.4972987", "0.4967972", "0.49646646", "0.49640408", "0.49640408", "0.49640408", "0.4962204", "0.49604085", "0.4960013", "0.49587658", "0.49561948" ]
0.5553456
10
call this function on page load
function setupCheckboxes() { $('input[type=checkbox]').each(function() { $(this).after('<i></i>'); if($(this).is(':checked') ) $(this).next().removeClass().addClass('fas fa-check-square'); else $(this).next().removeClass().addClass('far fa-square'); }); $('input[type=checkbox]').change(function() { $(this).next().toggleClass('fas').toggleClass('far').toggleClass('fa-check-square').toggleClass('fa-square'); }); $('input[type=checkbox]').focus(function() { $(this).next().css('background-color','hsl(160, 50%, 80%)'); }); $('input[type=checkbox]').focusout(function() { $(this).next().css('background-color',''); }); $('input[type=checkbox]').css('cursor', 'pointer'); $('label input[type=checkbox]').css('cursor', 'pointer'); $('input[type=checkbox]').css('opacity', '0'); $('input[type=checkbox]').css('margin-top', '5px'); $('input[type=checkbox]').css('position', 'absolute'); // update display if they change the checkbox value programmatically // even if they use code like: // $('#myCheckbox').prop('checked', true); // instead of // $('#myCheckbox').change(); $.propHooks.checked = { set: function (el, value) { if (el.checked !== value) { el.checked = value; $(el).trigger('change'); } } }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init() {\n // THIS IS THE CODE THAT WILL BE EXECUTED ONCE THE WEBPAGE LOADS\n }", "function onPageLoaded() {\n}", "function onPageLoad() {\n\n}", "function documentReadyFunction() {\n onPageLoadOrResize();\n onPageLoad();\n }", "function alwaysRunOnload () {\n\t\n\t}", "function onPageLoad()\n\t{\n\t\t//Set page size\n\t\tSetSize();\n\t\tloadPreferences();\n\t}", "function onLoaded()\n\t{\n\t\twindow.initExhibitorsList();\n\t\twindow.initFloorPlans();\n\t\twindow.initConciege();\n\t\twindow.initAmenities();\n\t\twindow.initVisas();\n\t}", "function startatLoad(){\r\n\tloadNavbar(function(){\r\n\t\tgetPT1000XMLData(function(){\r\n\t\t\tshowPT1000values();\r\n\t\t});\r\n\t});\r\n}", "onPageReady () {}", "function init() {\n\t\t$(document).on('pageBeforeInit', function (e) {\n\t\t\tvar page = e.detail.page;\n\t\t\tload(page.name, page.query);\n\t\t});\n }", "function onPageInit(e){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t}", "function qodeOnWindowLoad() {\n\t qodeInitNewsShortcodesPagination().init();\n }", "function onPageInit(e){\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}", "function pageLoad(){\n\t\tconsole.log(\"init hello\");\n\t\tgetDates()\n\t}", "function pageReady() {\n legacySupport();\n initSliders();\n }", "function edgtfOnDocumentReady() {\n edgtfHeaderBehaviour();\n edgtfSideArea();\n edgtfSideAreaScroll();\n edgtfFullscreenMenu();\n edgtfInitMobileNavigation();\n edgtfMobileHeaderBehavior();\n edgtfSetDropDownMenuPosition();\n edgtfDropDownMenu(); \n edgtfSearch();\n }", "function onPageInit(e){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}", "function initPage() {\n\tset_hidden_elements();\n}", "onload() {\n this.init();\n }", "function loaded() {\n\taddElements();\n\tosScroll();\n\t// initiate tabs\n\t$('#tabs').tab();\n\t// set event listeners\n\tsetOneTimeEventListeners();\n\t//updateChecked();\n}", "function initOnDomReady() {}", "function init()\n {\n $(document).on(\"loaded:everything\", runAll);\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 onPageInit(e){\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}", "function onPageInit(e){\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}", "function eltdfOnWindowLoad() {\n\t eltdfWooCommerceStickySidebar().init();\n\t eltdfInitButtonLoading();\n eltdfInitProductListMasonryShortcode();\n }", "function eltdfOnWindowLoad() {\n eltdfDropDownMenu();\n eltdfSetDropDownMenuPosition();\n eltdfInitDividedHeaderMenu();\n }", "function pageReady() {\n svg4everybody();\n initScrollMonitor();\n initModals();\n }", "function page_loaded() {\n post_load_setup();\n}", "function init() {\n if ($('.scheduled-page').length > 0) {\n setPageUrl();\n bindEvents();\n renderSwitcher();\n renderActions();\n switchPage(scheduled.currentView);\n }\n }", "function pageFullyLoaded () {}", "function initPage(){\r\n\t\t//add head class\r\n\t\t$(\"#headGeneralInformationLi\").addClass(\"active\");\r\n\t\tgetSeries();\r\n\t\t$(\"#divLeft,#divHead,#divFoot\").addClass(\"notPrintable\");\r\n\t\t$(\"#startTime\").val(window.byd.DateUtil.lastWorkDate());\r\n\r\n\t\tajaxQueryReplacementCost(\"monthly\");\r\n \tajaxQueryReplacementCost(\"yearly\");\r\n \tajaxQueryCostDistribute();\r\n\t\tresetAll();\r\n\t}", "function on_page_load() {\n // Initialize On-scroll Animations\n AOS.init({\n anchorPlacement: 'top-left',\n duration: 600,\n easing: \"ease-in-out\",\n once: true,\n mirror: false,\n disable: 'mobile'\n });\n }", "function onLoad()\n{}", "function pageLoad() {\n setControlValues();\n processHashInstruction();\n\n if (Common.isIE) Common.fixToMaxItemWidth('settings-header', 16, false);\n\n document.getElementById('theme').addEventListener('change', themeSelectChange);\n document.getElementById('defaults').addEventListener('click', defaultsClick);\n document.getElementById('save').addEventListener('click', saveClick);\n document.getElementById('cancel').addEventListener('click', cancelClick);\n\n document.getElementById('offline').style\n .display = (navigator.onLine ? 'none' : 'block');\n window.addEventListener('offline', appOffline);\n window.addEventListener('online', appOnline);\n}", "function initPage() {\n $.get('/api/headlines?saved=true').done((data) => {\n articleContainer.empty();\n\n if (data && data.length > 0) {\n renderArticles(data);\n\n // Activate tooltips for the action buttons.\n $('[data-toggle=\"tooltip\"]').tooltip();\n } else {\n renderEmpty();\n }\n });\n }", "function init() {\n if ($('.detail-page').length > 0) {\n renderLoader();\n setArticleParams();\n getArticle();\n bindEvents();\n }\n }", "function startatLoad(){\r\n\tloadNavbar(function(){\r\n\t\tsetSelectMenuesValues(function(){\r\n\t\t\t\tgetXMLData(function(){\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t});\r\n}", "function initPage(){\r\n\t\t//add head class\r\n\t\t$(\"#headAssemblyLi\").addClass(\"active\");\r\n\t\t$(\"#leftCarQueryLi\").addClass(\"active\");\r\n\t\tgetSeries();\r\n\t\tfillLineSelect();\r\n\t\t$(\"#carTag\").hide();\r\n\t\t$(\"#resultTable\").hide();\r\n\t\t$(\"#tabTestLine\").hide();\r\n\t}", "function initPage() {\n $.get('/api/headlines?saved=false').done((data) => {\n articleContainer.empty();\n if (data && data.length > 0) {\n renderArticles(data);\n\n // Activate tooltips for the action buttons.\n $('[data-toggle=\"tooltip\"]').tooltip();\n } else {\n renderEmpty();\n }\n });\n }", "function qodeOnWindowLoad() {\n qodeInitElementorCoverBoxes();\n }", "function onPageInit(e){\n\t\t\t\t\n\t\t\t\t//update geo location info\n\t\t\t\tApp.utils.getGeolocation();\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}", "function qodeOnWindowLoad() {\n qodeInitElementorCardsSlider();\n }", "function initializePage() {\r\n colorList();\r\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 initPageLoadCall() {\n if(options.page_paths != {} && options.call_page_tags) {\n var page = options.page_paths[path()];\n if(page !== undefined) {\n fireTag(\"view\", {\n \"page_type\": \"marketing\",\n \"page_name\": page\n });\n }\n }\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 onloadHandler(){\n console.info(\"Nick Cage is ready!\");\n // where the magic happens\n replaceAllElements();\n }", "function initPage(){\r\n\t\t//add head class\r\n\t\t$(\"#headEfficiencyLi\").addClass(\"active\");\r\n\t\t$(\"#leftNodeSelectLi\").addClass(\"active\");\r\n\t\t\r\n\t\ttoggleVinHint(true);\r\n\r\n\t\t//hide alert\r\n\t\t$(\"#messageAlert\").hide();\r\n\r\n\t\t$(\"#tableList tbody\").text(\"\");\r\n\t\t//set default queue time and get queue\r\n\t\t// $(\"#startTime\").val(window.byd.DateUtil.todayBeginTime);\r\n\t\t$(\"#startTime\").val(byd.DateUtil.firstDayOfTheMonth);\r\n\t\t$(\"#endTime\").val(byd.DateUtil.todayEndTime);\r\n\t\tajaxGetDoneList();\r\n\t\tajaxGetPrintList();\r\n\r\n\t\tresetPage();\r\n\t\tif($(\"#currentNode\").val() == \"subEngine\") {\r\n\t\t\t$(\"#formBarCode\").show();\r\n\t\t}\r\n\r\n\t}", "function onLoad() {\n document.documentElement.removeAttribute('viewBox');\n readFrames();\n sozi.events.fire('documentready');\n }", "function startOnLoad() {\n}", "function startOnLoad() {\n}", "function onLoad() {\n document.documentElement.removeAttribute(\"viewBox\");\n readFrames();\n sozi.events.fire(\"documentready\");\n }", "function initializePage() {\n\tconsole.log(\"initializePage\");\n\tclearInputs();\n\ttoggleInterest();\n}", "function oninitialized() {\n\t // focus once ready\n\t this.once(this.options.mode + ' ready', bind(this.focusInput, this));\n\t\n\t // resolve view\n\t if ('signin' === this.options.mode) {\n\t // if user in AD ip range\n\t if (this.$ssoData && this.$ssoData.connection) {\n\t return this._kerberosPanel(this.options, callback);\n\t }\n\t\n\t // if user logged in show logged in experience\n\t if (this.options._shouldShowLastLogin()) {\n\t return this._loggedinPanel(this.options, callback);\n\t }\n\t\n\t // otherwise, just show signin\n\t this._signinPanel();\n\t }\n\t\n\t if ('signup' === this.options.mode) {\n\t this._signupPanel();\n\t }\n\t\n\t if ('reset' === this.options.mode) {\n\t this._resetPanel(this.options, callback);\n\t }\n\t\n\t }", "function pageOnLoad(){\n render(datasetInit);\n render(convertedDataSet1992);\n }", "function qodeOnWindowLoad() {\r\n qodeInitelementorListingSimpleSearch();\r\n }", "function eltdfOnDocumentReady() {\n eltdfInitQuantityButtons();\n eltdfInitSelect2();\n\t eltdfInitPaginationFunctionality();\n\t eltdfReinitWooStickySidebarOnTabClick();\n eltdfInitSingleProductLightbox();\n\t eltdfInitSingleProductImageSwitchLogic();\n eltdfInitProductListCarousel();\n }", "function setLoadlist() {\n getWindowHeight(); //get window height\n getWindowWidth(); //get window width\n setParallaxContainerDimensions(); //set parallax container height & width\n setParallaxImgDimensions(); //set parallax image element height & width\n getParallaxInfo(); //get parallax container and element information\n getWindowScrollPos(); //get current window scroll position\n\n if (typeof _onReady === 'function') {\n _onReady.call();\n }\n\n setParallaxScroll();\n }", "function onInit() {\n Event.onDOMReady(onDOMReady, this.cfg.getProperty(\"container\"), this);\n }", "function initializePage() {\n handleGlobalEvent();\n handleSideBar();\n handleMessageBar();\n handleCollapsibleController();\n handleResetButton();\n handleDisabledSubmit();\n handleAjaxError();\n handleAjaxSetup();\n }", "function onPageLoad() {\n $('button[data-button-cerca]').click(ricercaConciliazione.bind(undefined, false));\n $(\"#buttonNuovaConciliazione\").click(apriCollapseNuovaConciliazione);\n $('#inserimento_buttonSalva').click(gestisciConciliazione.bind(undefined, 'inserimento', 'gestioneConciliazionePerTitolo_inserisci.do'));\n $('#aggiornamento_buttonSalva').click(gestisciConciliazione.bind(undefined, 'aggiornamento', 'gestioneConciliazionePerTitolo_aggiornamento.do'));\n\n definisciRadioEntrataSpesa();\n definisciCaricamentoSelectViaAjax();\n definisciPulsantiAnnullamento();\n definisciRicercaGuidataConto();\n\n $(document).on('contoCaricato', gestioneContoCaricato);\n }", "function onPageReady() {\n $scope.showRequiredFields = 'false';\n $scope.free = \"true\";\n $scope.page = \"details\";\n\n // Set initial values for form\n window.scrollTo(0, 0);\n }", "function onLoad() {\n\tdocument.controls.reset();\n\tinit_controls();\n\n\twriteLastVisitDate();\n\tsaveCurrentDate();\n\n\thideshowLiNoprint(document.getElementById('quelle_header'),'quelle','quellen');\n}", "function pageLoad(){\n $jQ('body').zIndex(); // jQuery UI Check\n window.onbeforeunload=function(){return '';}; // Hack to prevent any page.reload\n startCSSInfo();\n hackUserAgent();\n hackRemoveAnimations();\n hackDisableSubmit();\n hackActions();\n setNumScripts();\n setTimeStatus();\n setSystemColors();\n setVisibility();\n setUserActions();\n setAllVisibleElementsInfo();\n hackFrameScroll();\n}", "function qodefOnWindowLoad() {\n qodefInitProductListMasonryShortcode();\n }", "function afterLoading(){\n\t\t\tupdatePageInfo();\n\t\t}", "function onInit() {\r\n\r\n Event.onDOMReady(onDOMReady, this.cfg.getProperty(\"container\"), this);\r\n\r\n }", "function pageOnload()\r\n \t{\r\n \t subscribeJSMarkets(); \t \r\n \t subscribeJSSignal('jssignal');\r\n \t \r\n \t if(loadMarketInfo != \"\")\r\n \t { \r\n \t \tvar loadMarketInfos = loadMarketInfo.split(\",\");\r\n \t \t\r\n \t \tif(loadMarketInfos.length == 11)\r\n \t \t{\r\n \t \t\taddFlashChart(document.getElementById(loadMarketInfos[0]),loadMarketInfos[1],loadMarketInfos[2],loadMarketInfos[8],loadMarketInfos[9],loadMarketInfos[3],loadMarketInfos[4],loadMarketInfos[5],loadMarketInfos[6],1,loadMarketInfos[7],loadMarketInfos[10]);\r\n \t \t}\r\n \t }\r\n \t}", "function initialPages($) {\n\t\t$('.select2').select2();\n\t\tdisabledInput();\n\t\tentityHandler();\n\t\texpiryDateRange('#expiry');\n\t\textendEXpiryDatePicker('#extend_expiry');\n\t\tclickConfirmExtend();\n\t\tclickConfirmTerminate();\n\t\tclickConfirmChangeStatus();\n\t\tclickConfirmChangeGroup();\n\t\tclickConfirmChangePassword();\n\t\tclickConfirmResetPassword();\n\t\tclickModalCloseBtnDone();\n\t}", "function initialLoad() {\n $('ul.sf-menu').superfish({\n delay: 500,\n animation: {opacity:'show',height:'show'},\n speed: 'slow',\n autoArrows: true,\n dropShadows: false\n });\n $('.toolTipCls').tooltip();\n ITL.view.datePicker($(\".datepicker\"));\n }", "function fnOnload(){\n\tsortRows();\n\tsearchRows();\n}", "function pageInitalize(){\n\n articleContainer.empty();//Empties article container.//\n $.get(\"/api/headlines?saved=false\").then(function(data){//Runs AJAX request for unsaved\n if (data && data.length) {//Renders found headlines to the page.//\n renderArticles(data);\n }else{\n renderEmpty();//Renders no articles message.//\n }\n });\n }", "function initialPages($) {\n\t\t$('.select2').select2();\n\t\tdatePicker('#expiry');\n\t\tfileInput('#avatar');\n\t\tselectRole();\n\t\tselectEntity();\n\t\tformSubmit();\n\t\t\n\t}", "function page_shown(e) {\n if (e.persisted) post_load_setup();\n}", "function eltdfOnWindowLoad() {\n\n }", "function alwaysRunOnload () {\n\t\t// Placeholder/Future use.\n\t}", "function onPageLoad() {\r\n genNavBar();\r\n}", "function qodeOnWindowLoad() {\n qodeInitElementorAdvancedImageGalleryMasonry();\n }", "function initPage() {\n\n initHeader();\n\n initForm();\n\n initDatalist();\n}", "function init(){\n console.debug('Document Load and Ready');\n console.trace('init');\n initGallery();\n \n pintarLista( );\n pintarNoticias();\n limpiarSelectores();\n resetBotones();\n \n}", "function pageDocReady () {\n\n}", "function onPageLoad() {\r\n\t// although jQuery already has an on page load, \r\n\t// this function was added for sake of organization.\r\n\tvar trigger = \"load\";\r\n}", "function init() {\n documentReady(documentLoaded);\n}", "function initialDisplay() {\n \tcountLinks();\n \tgetDropDowns();\n \tgetList(\"id\");\n }", "function initPage()\n\t{\n\t\tinitGlobalVars();\n\t\tinitDOM();\n\t\tinitEvents();\n\t}", "async onPageLoad() {\n\n }", "function initialPages($) {\n\t\t$('.select2').select2();\n\t\tdatePicker('#date_range');\n\t\tonChangeLoanTypeHandler();\n\t\tdateRangeHandler();\n\t}", "function onBodyLoad() {\n document.querySelector('.presentation').classList.add('visible')\n\n // Set up\n getSlideNumberFromUrlFragment()\n showSlide(true, true)\n onSlideEnter(slideEls[currentSlideNumber], true)\n\n // Slide manipulation\n hyphenateSlides()\n setUpBetterPunctuation()\n\n document.body.addEventListener('keydown', onKeyDown)\n document.body.focus()\n}", "function mkdfOnWindowLoad() {\n\t\tuncoveringFooter();\n\t}", "function onPageLoad() {\n\tif (loginDataReady) {\n\t\tupdateBootStatus(\"halt:org.webshell.shell:processLoginData:ready\");\n\t\tprocessLoginData();\n\t} else {\n\t\tupdateBootStatus(\"halt:org.webshell.shell:processLoginData:notready\");\n\t\tpageLoadedQuickSoProcessDataImmediately = true;\n\t}\n}", "function handlePageLoad() {\n // Add a listener to be triggered when we scroll through the pages\n window.addEventListener('hashchange', function() {\n debug('Hash change detected: ' + location.hash + ' State: ' + document.readyState);\n processUserList();\n }, false);\n\n queryUserId();\n queryReviveSkill();\n }", "function coreInitLoadPage() {\n if (typeof $(\"body\").attr(\"control\") !== \"undefined\")\n WEBUI.MAINPAGE = $(\"body\")[$(\"body\").attr(\"control\").split(\".\")[1]]();\n }", "function onPageLoad() {\n // winResize();\n // winScroll();\n }", "function pagesOnload(){\n var start_hash=location.hash;\n if(!start_hash){ /* the url has no hash . run the callback function of the first page */\n var callback = $(\".fullPage\").eq(0).attr(\"inView\");\n strTofunc(callback);\n\t\t return false;\n }\n /* if the url has hash , locate to the page */\n locateToHash(start_hash);\n }", "function mkdfOnWindowLoad() {\n\n }", "function INIT() {\n //--Check is Page Accessible\n $rootScope.CheckIsPageAccessible(\"Admin\", \"Location Quick Links\", \"View Countries\");\n //\n $scope.UserId = $rootScope.LoginUserDetail.UserId;\n GetCountryList();\n }", "function initialize() {\n $.get(\"views/AdminHomePage.html\")\n .done(setup)\n .fail(error);\n }", "function onStart() {\n // loads manifests, scouts, schedule, etc.\n loadImportantFiles();\n // goes to the home page\n switchPages(\"home\", undefined, undefined, 0);\n // determines a list of teams\n determineTeams();\n // uses list of teams to create \"Teams\" page\n insertTeams();\n // sorts \"Teams\" table once files are loaded\n window.setTimeout(sortTable, 200);\n // loads scouting data\n loadData();\n // sets up \"Team\" page for data to be inputted\n setupData();\n // \"Picklist\" page starts with one picklist\n createPicklist();\n // decides whether or not to display sensitive info\n displaySensitiveInfo();\n // hides the \"Team\" page carousel\n $(\"#myCarousel\").hide();\n // puts scouts on Scouts page\n populateScouts();\n // sets up the rankings table\n addRankingsToPage();\n}", "function initializePage() {\n\t$('.project a').click(addProjectDetails);\n\n\t$('#colorBtn').click(randomizeColors);\n\n\t$('.spotify .handle').hover(function() {\n\t\tshowSpotify($(this).parent());\n\t});\n}", "function edgtfOnDocumentReady() {\n\t edgtfSearchSlideFromHB();\n }" ]
[ "0.74014395", "0.72967666", "0.7242379", "0.71442395", "0.7123803", "0.7103647", "0.7079569", "0.7076129", "0.70610845", "0.7025726", "0.701841", "0.7008091", "0.700402", "0.6986577", "0.69697005", "0.6962277", "0.69620925", "0.69608456", "0.6923495", "0.6918835", "0.69182026", "0.69113034", "0.6900416", "0.68954325", "0.68954325", "0.6890257", "0.6883779", "0.6882838", "0.68653125", "0.6860526", "0.6857827", "0.6847047", "0.6843683", "0.68362355", "0.6813975", "0.6812662", "0.6809234", "0.68089795", "0.6799519", "0.6799307", "0.67993045", "0.6774793", "0.6756345", "0.67409784", "0.67306954", "0.6714937", "0.6708586", "0.6702445", "0.66831154", "0.6675733", "0.6669434", "0.6669434", "0.66636604", "0.66633487", "0.6659631", "0.6655968", "0.6627033", "0.6620321", "0.6613977", "0.6612077", "0.6605876", "0.6597776", "0.65861315", "0.65725034", "0.6568048", "0.6563627", "0.65605223", "0.6555756", "0.65426016", "0.6537517", "0.6536485", "0.651864", "0.65152025", "0.6509061", "0.6507192", "0.6498495", "0.64919645", "0.6490823", "0.64841205", "0.6475629", "0.64752364", "0.6472085", "0.646904", "0.64651203", "0.6457902", "0.6455233", "0.64546174", "0.6452559", "0.6451288", "0.6444995", "0.6441309", "0.6437106", "0.64367044", "0.64338183", "0.64327246", "0.6428253", "0.64253664", "0.6420834", "0.64171225", "0.6408754", "0.6408016" ]
0.0
-1
manually update checkboxes if checked property is changed some other way
function updateCheckboxes() { $('input[type=checkbox').each(function() { if($(this).is(':checked') ) $(this).next().removeClass().addClass('fas fa-check-square'); else $(this).next().removeClass().addClass('far fa-square'); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateCheckboxes() {\n for (const id of this.compareList.keys()) {\n this._checkCheckbox(id);\n }\n }", "checkChanged(indx){\n //update checkbox status when checkboxes are checked... \n this.props.selectionChanged(indx);\n }", "updateChecked(state, checked) {\r\n state.checked = checked;\r\n }", "function syncronizeCheckboxes(clicked, pri, pub) {\n pri.checked = false;\n pub.checked = false;\n clicked.checked = true;\n }", "function unit_chkboxchange(status) {\r\n\tfor (i in trackerunitchk) {\r\n\t\t$(trackerunitchk[i]).checked = status;\r\n\t}\r\n}", "_changeCheckStateInGroup(elements, changeType) {\n const that = this;\n\n for (let i = 0; i < elements.length; i++) {\n elements[i]._isUpdating = true;\n\n if (elements[i] === that) {\n that.checked = true;\n that.$.fireEvent('change', { 'value': true, 'oldValue': false, 'changeType': changeType });\n }\n else if (elements[i].checked) {\n elements[i].checked = false;\n }\n\n elements[i]._isUpdating = false;\n }\n }", "_changeCheckStateInGroup(elements, changeType) {\n const that = this;\n\n for (let i = 0; i < elements.length; i++) {\n elements[i]._isUpdating = true;\n\n if (elements[i] === that) {\n that.checked = true;\n that.$.fireEvent('change', { 'value': true, 'oldValue': false, 'changeType': changeType });\n }\n else if (elements[i].checked) {\n elements[i].checked = false;\n }\n\n elements[i]._isUpdating = false;\n }\n }", "_changeCheckState(optionalValue) {\n const that = this;\n let oldValue = that.checked;\n\n if ((oldValue === null) && (optionalValue !== undefined)) {\n that.$.fireEvent('change', { 'value': optionalValue, 'oldValue': null });\n that.checked = optionalValue;\n that._updateThumbPosition();\n return;\n }\n\n if (that.checked === null) {\n that.checked = true;\n }\n else {\n that.checked = !that.checked;\n }\n\n that._updateThumbPosition();\n\n that.$.fireEvent('change', { 'value': that.checked, 'oldValue': oldValue });\n that._updateHidenInputNameAndValue();\n }", "updateCheckedSetting() {\n\t\tthis.switchControl.$input.prop( 'checked', this.currentValues.inset );\n\t}", "checked (newVal, oldVal) {\n this.computedLocalChecked = newVal\n }", "handleCheckboxes(){\n\n for(let cb of this.checkboxes){\n\n if(cb.selected){\n cb.element.classList.add(SELECTED_CLASS);\n }\n else{\n cb.element.classList.remove(SELECTED_CLASS);\n }\n\n cb.element.checked = cb.selected;\n }\n }", "onCheckChange(idx) {\n return () => {\n const items = this.state.items.concat();\n items[idx].checked = !items[idx].checked;\n this.setState({ items });\n }\n }", "function updateCheckBoxes() {\n const checkboxes = [];\n\n checkboxes.push(document.querySelector('#inspiration'));\n\n checkboxes.push(document.querySelector('#dss1'));\n checkboxes.push(document.querySelector('#dss2'));\n checkboxes.push(document.querySelector('#dss3'));\n\n checkboxes.push(document.querySelector('#dsf1'));\n checkboxes.push(document.querySelector('#dsf2'));\n checkboxes.push(document.querySelector('#dsf3'));\n\n checkboxes.forEach((ele) => {\n if (ele.value === 'true') {\n ele.setAttribute('checked', 'checked');\n } else {\n ele.removeAttribute('checked');\n }\n });\n}", "function updateCheckboxes(){\n\t$(\"table.benchmarks input\").each(function(i,obj){\n\t\t$(obj).attr('checked',(checked_benchmarks.indexOf(obj.value)!=-1));\n\t});\n}", "function setupCheckboxes() {\n\t$('input[type=checkbox]').each(function() {\n\t\t$(this).after('<i></i>');\n\t\tif($(this).is(':checked') )\n\t\t\t$(this).next().removeClass().addClass('fas fa-check-square');\n\t\telse\n\t\t\t$(this).next().removeClass().addClass('far fa-square');\n\t});\n\t$('input[type=checkbox]').change(function() {\n\t\t$(this).next().toggleClass('fas').toggleClass('far').toggleClass('fa-check-square').toggleClass('fa-square');\n\t});\n\t$('input[type=checkbox]').focus(function() {\n\t\t$(this).next().css('background-color','hsl(160, 50%, 80%)');\n\t});\n\t$('input[type=checkbox]').focusout(function() {\n\t\t$(this).next().css('background-color','');\n\t});\n\t$('input[type=checkbox]').css('cursor', 'pointer');\n\t$('label input[type=checkbox]').css('cursor', 'pointer');\n\t$('input[type=checkbox]').css('opacity', '0');\n\t$('input[type=checkbox]').css('margin-top', '5px');\n\t$('input[type=checkbox]').css('position', 'absolute');\n\n\t// update display if they change the checkbox value programmatically\n\t// even if they use code like:\n\t// $('#myCheckbox').prop('checked', true);\n\t// instead of\n\t// $('#myCheckbox').change();\n\t$.propHooks.checked = {\n\t\tset: function (el, value) {\n\t\t\tif (el.checked !== value) {\n\t\t\t\tel.checked = value;\n\t\t\t\t$(el).trigger('change');\n\t\t\t}\n\t\t}\n\t};\n}", "checkboxChanged() {\n this.setState({ isChecked: !this.state.isChecked });\n this.props.handleTogglePlaylistCheckbox(this.props.playlistID);\n }", "function onCheckboxChanged(event) {\n if (document.getElementById(\"cb1\").checked &&\n document.getElementById(\"cb2\").checked &&\n document.getElementById(\"cb3\").checked) {\n subject.notifyObservers();\n }\n}", "_changeCheckState(changeType) {\n const that = this;\n\n let oldValue = null;\n\n if (that.checked === null) {\n that.checked = true;\n }\n else {\n oldValue = that.checked;\n that.checked = !that.checked;\n }\n\n that._handleTextSelection();\n\n that.$.fireEvent('change', { 'value': that.checked, 'oldValue': oldValue, changeType: changeType });\n }", "function applyCheckbox(box)\n{\n\tif (box.checked)\n\t{\n\t\tuncheckedCount--\n\t\tupdateUnchecked()\n\t}\n\telse\n\t{\t\n\t\tuncheckedCount++\n\t\tupdateUnchecked()\n\t}\n}", "checkboxEvent(name, checkedValue) {\n\n let updatedDecisionCards = {};\n Object.keys(this.state.decision_cards).forEach((v, i) => {\n if (v === name) {\n this.updateFinaleOutputWhenCheckboxIsChecked(name, i, checkedValue);\n updatedDecisionCards[name] = (checkedValue);\n }\n else {\n updatedDecisionCards[v] = this.state.decision_cards[v]\n }\n });\n\n this.updateDecisionCardsAndCheckedStorageWhenCheckboxIsChecked(updatedDecisionCards)\n\n }", "function setChecked(newArr, oldArr) {\n scope.checked = contains(newArr, value);\n }", "change(event) {\n if (this.noCheckboxesSelected) {\n this.selectAllTarget.checked = false\n this.selectAllTarget.indeterminate = false\n\n } else if (this.allCheckboxesSelected) {\n this.selectAllTarget.checked = true\n this.selectAllTarget.indeterminate = false\n\n } else {\n this.selectAllTarget.indeterminate = true\n }\n }", "function setChecked(newArr, oldArr) {\n if (checklistBeforeChange && (checklistBeforeChange(scope) === false)) {\n setValueInesChecklistModel(getChecklistValue(), ngModelGetter(scope));\n return;\n }\n ngModelGetter.assign(scope, contains(newArr, getChecklistValue(), comparator));\n }", "function update_status(context){\n let group = $(context).attr('data-check-selector-group');\n let checked = 0;\n let unchecked = 0;\n\n console.log('Checkbox Changed!');\n\n // check state of all checkboxes in the group\n $(`input[type=\"checkbox\"][data-check-selector-group=\"${group}\"]`).each(function(index){\n if($(this).prop('checked')) {\n checked += 1;\n } else {\n unchecked += 1;\n }\n });\n\n if( checked <= unchecked ) {\n select(group);\n } else {\n unselect(group);\n }\n }", "function change_opponenet_check_boxes(is_checked)\n{\n for (var ii = 0; ii < opponents.length; ii++)\n {\n checkbox = document.getElementById(\"opp_check_box_\" + opponents[ii]);\n checkbox.checked = is_checked;\n }\n redraw_head_to_head(slider.value);\n}", "function setChecked(newArr, oldArr) {\n if (checklistBeforeChange && (checklistBeforeChange(scope) === false)) {\n setValueInChecklistModel(getChecklistValue(), ngModelGetter(scope));\n return;\n }\n ngModelGetter.assign(scope, contains(newArr, getChecklistValue(), comparator));\n }", "function handle_checkboxes(){\n\t\t$.each($(\".anthrohack_checkbox\"), function(i, _box){\n\t\t\tvar id = \"#\" + $(_box).attr(\"id\") + \"_hidden\";\n\t\t\t$(_box).change(function(){\n\t\t\t\tif($(_box).prop(\"checked\")){\n\t\t\t\t\t$(id).val(\"on\").trigger('change');\n\t\t\t\t}else{\n\t\t\t\t\t$(id).val(\"off\").trigger('change');\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}", "onChange(id){\n\t var tempArray = this.state.isChecked.slice();\n\t tempArray[id] = !tempArray[id];\n\t this.setState({isChecked: tempArray});\n\t}", "function setChecked(newArr, oldArr) {\n if (\n checklistBeforeChange &&\n checklistBeforeChange(scope) === false\n ) {\n setValueInesChecklistModel(\n getChecklistValue(),\n ngModelGetter(scope)\n );\n return;\n }\n ngModelGetter.assign(\n scope,\n contains(newArr, getChecklistValue(), comparator)\n );\n }", "handleCheck() {\n this.checked = !this.checked;\n }", "function update(obj) {\r\n\t\tvar group = \".tpf__entry input:checkbox[name='\" + obj.attr(\"name\") + \"']\";\r\n\t\t$(group).attr(\"checked\", false);\r\n\t\ttry {\r\n\t\t\tcomponentHandler.upgradeDom();\r\n\t\t\t$(group).each(function (index) {\r\n\t\t\t\tconsole.log(index + \": \" + $(this).attr('id'));\r\n\t\t\t\tdocument.querySelector('.tpf__entry .mdl-js-checkbox.' + $(this).attr('id')).MaterialCheckbox.uncheck();\r\n\t\t\t});\r\n\r\n\t\t\tdocument.querySelector('.tpf__entry .mdl-js-checkbox.' + obj.attr(\"id\")).MaterialCheckbox.check();\r\n\t\t} catch (e) {\r\n\t\t\tconsole.log(\"Material UI checkbox failed : \" + e);\r\n\t\t}\r\n\t}", "onCheckboxChange(){\n this.onCheckboxChanged();\n }", "function cbChange(obj) {\nvar instate=(obj.checked);\n var cbs = document.getElementsByClassName(\"cb\");\n for (var i = 0; i < cbs.length; i++) {\n cbs[i].checked = false;\n }\n if(instate)obj.checked = true;\n}", "checkAll() {\n this.toggleCheckedAll(true);\n }", "handleCheckboxChange(e) {\n\n\n if (e.detail.checked) {\n\n if (this.selectedList.find(element => element.value == e.target.value) == null) {\n this.selectedList = [\n ...this.selectedList,\n {\n label: e.target.label,\n value: e.target.value,\n selected: e.detail.checked\n }\n ]\n }\n } else // unchecked \n {\n this.selectedList = this.selectedList.filter(\n item => item.value != e.target.value\n );\n }\n\n this.displayList.map(element => {\n\n if (element.value == e.target.value) {\n\n element.selected = e.detail.checked;\n\n }\n\n });\n\n }", "function updateMultiChk(id) {\r\n\tvar obj = document.getElementById(id),\r\n\t\tsize = document.getElementById(id+'_size').value,\r\n\t\ttmpStr='',tmpList = [];\r\n\t\r\n\tfor(var i=0;i<size;i++) {\r\n\t\ttmpList[i] = document.getElementById(id+i).checked;\r\n\t}\r\n\t\r\n\tfor(i in tmpList) {\r\n\t\tif(tmpList[i]==true) {\r\n\t\t\ttmpStr += '1';\r\n\t\t} else {\r\n\t\t\ttmpStr += '0';\r\n\t\t}\r\n\t}\r\n\t\r\n\tobj.value = tmpStr;\r\n}", "function checkboxInputChange(e) { //cambia il valore della checkbox\n setChecked((prevChecked) => !prevChecked);\n console.log(checked);\n }", "function setChecked(newArr, oldArr) {\n if (checklistBeforeChange && (checklistBeforeChange(scope) === false)) {\n setValueInChecklistModel(value, scope[attrs.ngModel]);\n return;\n }\n scope[attrs.ngModel] = contains(newArr, value, comparator);\n }", "checkAllEvent(checkedValue) {\n let updatedDecisionCards = {};\n Object.keys(this.state.decision_cards).forEach((dc, i) => {\n this.updateFinaleOutputWhenCheckboxIsChecked(dc, i, checkedValue);\n updatedDecisionCards[dc] = (checkedValue);\n });\n this.updateDecisionCardsAndCheckedStorageWhenCheckboxIsChecked(updatedDecisionCards)\n }", "function setChecked(newArr, oldArr) {\n if (checklistBeforeChange && (checklistBeforeChange(scope) === false)) {\n setValueInChecklistModel(value, scope[attrs.ngModel]);\n return;\n }\n scope[attrs.ngModel] = contains(newArr, value, comparator);\n }", "checkboxEvent(name, checkedValue) {\n let updatedComponent = {};\n let currLayoutHeight = 0;\n let currLayoutY = 0;\n Object.keys(this.state.vis_components).forEach((v, i) => {\n if (v === name) {\n let newLayoutHeightAndY = this.updateFinaleOutputWhenCheckboxIsCheckedAndReturnLayoutWidthAndY(\n name, i, checkedValue, currLayoutHeight, currLayoutY);\n // extract previously used width and y-coordinate which are used to position the next component\n // below the current component\n currLayoutHeight = newLayoutHeightAndY[0];\n currLayoutY = newLayoutHeightAndY[1];\n updatedComponent[name] = (checkedValue);\n }\n else {\n updatedComponent[v] = this.state.vis_components[v]\n }\n });\n\n this.updateComponentsAndCheckedStorageWhenCheckboxIsChecked(updatedComponent)\n }", "componentDidUpdate() {\n this.checkbox.indeterminate = this.props.indeterminate;\n this.checkbox.checked = this.props.checked;\n }", "function updateQuestions() {\n for (var i = 0; i < sortingCheckboxes.length; i++) {\n sortingCheckboxes[i].checked = false;\n }\n}", "function checkBoxUpdate(sliderId, boxId, checkBoxId){\n var checkbox = document.getElementById(checkBoxId);\n var slider = document.getElementById(sliderId);\n var box = document.getElementById(boxId);\n\n if (checkbox.checked == true) {\n slider.value = 1;\n box.value = 1;\n }\n else{\n slider.value = 0;\n box.value = 0;\n }\n}", "function process_checkboxes(items,namespace) {\n $(':checkbox').each(function () {\n // enable checkboxes\n $(this).prop('disabled', false);\n\n // set checkbox value attribute\n if ($(this).val() === 'on') {\n // Find first sibling with a value or data-value attribute\n const sib = $(this).siblings('span[data-value],a[value],span[value],a[data-value]');\n let v = sib.attr('data-value');\n if (typeof v === 'undefined') {\n v = sib.attr('value');\n }\n\n if (typeof v === 'undefined') {\n // Fall back to the href of a link element\n v = $(this).siblings('a').attr('href');\n }\n\n if (typeof v === 'undefined') {\n v = 'skip';\n }\n\n $(this).val(v);\n }\n\n // apply stored settings\n if (items[$(this).val()]) {\n $(this).prop('checked', true);\n } else {\n $(this).prop('checked', false);\n }\n\n // create function to update on click\n $(this).click(function () {\n const v = $(this).val()\n if (v !== 'skip') {\n if ($(this).prop('checked')) {\n items[v] = true;\n $(':checkbox[value=\"' + v + '\"]').prop('checked', true);\n } else {\n items[v] = false;\n $(':checkbox[value=\"' + v + '\"]').prop('checked', false);\n }\n try {\n CarnapServerAPI.putAssignmentState(namespace,items);\n } catch {\n console.log('Unable to access CarnapServerAPI');\n }\n }\n });\n });\n}", "function CheckBox_UpdateProperties(listProperties)\n{\n\t//basic processing properties?\n\tvar listBasicProperties = new Array();\n\n\t//markers\n\tvar bCaptionDone = false;\n\n\t//loop through the properties\n\tfor (var i = 0, c = listProperties.length; i < c; i++)\n\t{\n\t\t//switch on property\n\t\tswitch (listProperties[i])\n\t\t{\n\t\t\tcase __NEMESIS_PROPERTY_CHECKED:\n\t\t\tcase __NEMESIS_PROPERTY_ENABLED:\n\t\t\tcase __NEMESIS_PROPERTY_WIDTH:\n\t\t\tcase __NEMESIS_PROPERTY_HEIGHT:\n\t\t\tcase __NEMESIS_PROPERTY_CAPTION:\n\t\t\tcase __NEMESIS_PROPERTY_FONT:\n\t\t\tcase __NEMESIS_PROPERTY_ALIGN:\n\t\t\tcase __NEMESIS_PROPERTY_OWNERDRAW_IMAGES:\n\t\t\t\t//caption not yet handled\n\t\t\t\tif (!bCaptionDone)\n\t\t\t\t{\n\t\t\t\t\t//no longer has user data\n\t\t\t\t\tthis.InterpreterObject.HasUserInput = false;\n\t\t\t\t\t//update the images\n\t\t\t\t\tCheckBox_UpdateImages(this, this.InterpreterObject);\n\t\t\t\t\t//update the state\n\t\t\t\t\tCheckBox_UpdateState(this, this.InterpreterObject);\n\t\t\t\t\t//update object position for borders \n\t\t\t\t\tBasic_UpdatePosition(this, this.InterpreterObject, this.InterpreterObject.DataObject.Class);\n\t\t\t\t\t//trigger update of the caption\n\t\t\t\t\tCheckBox_UpdateCaption(this, this.InterpreterObject);\n\t\t\t\t\t//done\n\t\t\t\t\tbCaptionDone = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t//will need basic\n\t\t\t\tlistBasicProperties.push(listProperties[i]);\n\t\t\t\tbreak;\n\t\t}\n\t}\n\t//needs basic processing?\n\tif (listBasicProperties.length > 0)\n\t{\n\t\t//call basic\n\t\tBasic_UpdateProperties(this.InterpreterObject, listBasicProperties);\n\t}\n}", "triggerSelected() {\n let cachedValues = this.cachedValues\n let self = this\n let values = new Array()\n this.iterateChecks((index, line, box, span) => {\n if (box.prop(\"checked\")) {\n // Update the \"selected\" property\n cachedValues[index][1] = true\n values.push(cachedValues[index])\n }\n })\n this.model.SetSelected(values)\n super.triggerSelected()\n }", "handleCheckboxes(){\n\n for(let cb of this.checkboxes){\n\n if(cb.selected){\n cb.element.classList.add(SELECTED_CLASS);\n }\n else{\n cb.element.classList.remove(SELECTED_CLASS);\n }\n }\n }", "function updateCheckUncheck() {\n checkedState = !checkedState;\n if (checkedState) {\n browser.menus.update(\"check-uncheck\", {\n title: browser.i18n.getMessage(\"menuItemUncheckMe\"),\n });\n } else {\n browser.menus.update(\"check-uncheck\", {\n title: browser.i18n.getMessage(\"menuItemCheckMe\"),\n });\n }\n}", "checkedChanged(prev, next) {\n if (typeof next === \"boolean\") {\n this.ariaChecked = next ? \"true\" : \"false\";\n return;\n }\n\n this.ariaChecked = undefined;\n }", "function updateCheckbox(data){\n if (data > 0) {\n $(\"#editNegativeSupport\").prop('checked', true);\n } \n}", "function checkChange() {\n if (document.getElementById('ewcheckbox').checked) setModification();\n else resetModification();\n}", "function checkedAll(field){\n\t\t\tfor(i=0; i< field.length; i++)\n\t\t\t\tfield[i].checked = true;\n\t\t}", "checkAllEvent(checkedValue) {\n let updatedComponents = {};\n let currLayoutHeight = 0;\n let currLayoutY = 0;\n Object.keys(this.state.vis_components).forEach((comp, i) => {\n let newLayoutHeightAndY = this.updateFinaleOutputWhenCheckboxIsCheckedAndReturnLayoutWidthAndY(\n comp, i, checkedValue, currLayoutHeight, currLayoutY);\n // extract previously used width and y-coordinate which are used to position the next component\n // below the current component\n currLayoutHeight = newLayoutHeightAndY[0];\n currLayoutY = newLayoutHeightAndY[1];\n\n updatedComponents[comp] = (checkedValue);\n });\n this.updateComponentsAndCheckedStorageWhenCheckboxIsChecked(updatedComponents)\n }", "function checkboxWatch(checkBox, checkBoxes) {\n $(\"#\"+checkBox).change(function() {\n uncheckAllBoxes(checkBoxes);\n localStorage.setItem(\"checkedBox\", checkBox);\n $(\"#\"+checkBox).prop(\"checked\", true);\n updateOAuthTokensInDOM(checkBox);\n });\n}", "function onClickCheckbox(index) {\n const checked = beverages[index].Checked;\n beverages[index].Checked = !checked;\n calculateTotalPrice();\n}", "set checked(v) {\n this.input.checked = v;\n }", "function checkBox(e){\n\t\t\t\t$(this).toggleClass(\"on\");\n\t\t\t\t$(this).trigger(\"change\");\n\t\t\t}", "function checkBox(e){\n\t\t\t\t$(this).toggleClass(\"on\");\n\t\t\t\t$(this).trigger(\"change\");\n\t\t\t}", "handleCheckbox(elem) {\n\n this.filtering[elem.id] = elem.checked;\n\n this.dashboard.updateChart()\n }", "function setCheckboxValue(pos) {\n if (vm.tableData[pos][\"check\"]) {\n vm.borrowerNumber++;\n } else {\n var el = $('#select-all').get(0);\n if (el && el.checked && ('indeterminate' in el)) {\n // Set visual state of \"Select all\" control \n // as 'indeterminate'\n el.indeterminate = true;\n }\n vm.borrowerNumber--;\n }\n }", "function checkBox(checkbox){\r\n\t\tcheckbox.checked=true;\r\n\t\ttriggerEvent(checkbox);\r\n}", "onCheckWeft(event) {\n for (var item of this.ItemsWeft) {\n item.Select = event.detail.target.checked;\n }\n }", "function selectCheckboxes(fm, v)\r\n\t{\r\n\t for (var i=0;i<fm.elements.length;i++) {\r\n\t var e = fm.elements[i];\r\n\t\t if (e.name.indexOf('active') < 0 &&\r\n\t\t e.type == 'checkbox')\r\n e.checked = v;\r\n\t }\r\n\t}", "setCheckboxes(data) {\n // inputs to run through and check or uncheck\n const inputIds = [\n 'open_now',\n 'price-1',\n 'price-2',\n 'price-3',\n 'price-4',\n 'hot_and_new',\n 'reservation',\n 'cashback',\n 'deals',\n 'wheelchair_accessible',\n 'open_to_all',\n 'gender_neutral_restrooms',\n ];\n\n // For inputIds array if data object has the input id as a key\n // make that input checked, otherwise un-check.\n inputIds.forEach(id => {\n if (data[id]) $(`#${id}`).prop('checked', true);\n else $(`#${id}`).prop('checked', false);\n });\n }", "function setCheckboxValues() {\n includeLowercase = lowerCaseCheckbox.checked;\n includeUppercase = uppercaseCheckbox.checked;\n includeNumeric = numericCheckbox.checked;\n includeSpecial = specialCheckbox.checked;\n}", "function toggleTickAllRows(e){\n e.preventDefault();\n var status = this.checked;\n console.log(status);\n\n $(\".checkbox input\").each(function(){\n this.checked = status;\n });\n }", "function check_the_boxes(main_check_box, check_box_array)\n {\n\n $(main_check_box).change(function()\n {\n if ($(main_check_box).is(\":checked\"))\n {\n for (i=0; i < check_box_array.length; i++)\n {\n check_box = check_box_array[i];\n $(check_box).map(function()\n {\n $(this).prop(\"checked\",true)\n });\n }\n }\n else\n {\n for (i=0; i < check_box_array.length; i++)\n {\n check_box = check_box_array[i];\n $(check_box).map(function()\n {\n $(this).prop(\"checked\",false)\n });\n }\n $(\"#check_all_checkbox\").prop(\"checked\",false)\n }\n });\n }", "function checkChecked(event){\n if(event.target.checked==true){\n checked--;\n updateCheckedCount();\n }else{\n checked++;\n updateCheckedCount();\n } \n}", "function addCheckBoxListener(){\n\n $(\"input:checkbox\").on('click', function() {\n\n var $box = $(this);\n if ($box.is(\":checked\") ) {\n\n var group = \"input:checkbox[name='\" + $box.attr(\"name\") + \"']\";\n\n if($box.attr(\"name\") != 'topping'){\n $(group).prop(\"checked\", false);\n }\n $box.prop(\"checked\", true);\n \n } else {\n $box.prop(\"checked\", false);\n }\n updatePrice();\n });\n\n}", "function updateCheckboxState() {\n var $this = $(\"#expandable\");\n if ($this.is(':checked')) {\n explainEditor.setDisplayType(CONFIG.EXPLAINER_IDENTIFIER,\"Expandable\")\n } else {\n explainEditor.setDisplayType(CONFIG.EXPLAINER_IDENTIFIER,\"Flat\")\n }\n updateWordCountWarningDisplay();\n}", "set checked(isChecked) {\n var _a, _b;\n const oldValue = this._checked;\n if (isChecked === oldValue) {\n return;\n }\n this._checked = isChecked;\n if (this.formElement) {\n this.formElement.checked = isChecked;\n }\n (_a = this._selectionController) === null || _a === void 0 ? void 0 : _a.update(this);\n if (isChecked === false) {\n // Remove focus ring when unchecked on other radio programmatically.\n // Blur on input since this determines the focus style.\n (_b = this.formElement) === null || _b === void 0 ? void 0 : _b.blur();\n }\n this.requestUpdate('checked', oldValue);\n // useful when unchecks self and wrapping element needs to synchronize\n // TODO(b/168543810): Remove triggering event on programmatic API call.\n this.dispatchEvent(new Event('checked', { bubbles: true, composed: true }));\n }", "setToscheckbox() {\n\n if (config.debug==true) { console.log(\"in BecomeOwnerApp/setToscheckbox\"); }\n\n if (this.state.toschecked)\n {\n //unchecked\n this.setState({toschecked: false});\n\n }\n else\n {\n //checked\n this.setState({toschecked: true});\n this.setState({ forgottochecktos: false });\n }\n }", "function updateCheckBoxParentsStates($this)\n\t\t\t{\n\t\t\t\tvar parents = findCheckBoxParents($this);\n\t\t\t\tfor(i in parents){\n\t\t\t\t\tvar parent=parents[i];\n\t\t\t\t\tvar children=parent.nextAll(\"ul\").find(\"input:\"+options.inputType);\n\t\t\t\t\tvar allChecked=true;\n\t\t\t\t\tvar allNotChecked=true;\n\t\t\t\t\tchildren.each(function(ind){\n\t\t\t\t\t\tif(children.eq(ind).attr(\"checked\")==\"checked\"||children.eq(ind).attr(\"checked\")==true){\n\t\t\t\t\t\t\tallNotChecked=false;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tallChecked=false;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tif(allChecked){\n\t\t\t\t\t\tparent.attr(\"checked\",true);\n\t\t\t\t\t\t\tif(parent.next().is(\"img\")){\n\t\t\t\t\t\t\t\tparent.css(\"display\",\"inline\").next(\"img\").remove();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}else if(allNotChecked){\n\t\t\t\t\t\tparent.attr(\"checked\",false);\n\t\t\t\t\t\t\tif(parent.next().is(\"img\")){\n\t\t\t\t\t\t\t\tparent.css(\"display\",\"inline\").next(\"img\").remove();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tparent.attr(\"checked\",false);\n\t\t\t\t\t\tif(!parent.next().is(\"img\")){\n\t\t\t\t\t\t\tparent.css(\"display\",\"none\").after(\"<img src='\"+options.partCheckedImageSrc+\"' class='partChecked' />\")\n\t\t\t\t\t\t\t\t.next(\"img\").click(function(){\n\t\t\t\t\t\t\t\t\tparent.click();\n\t\t\t\t\t\t\t\t\tif(parent.attr(\"checked\")==\"checked\"||parent.attr(\"checked\")==true){\n\t\t\t\t\t\t\t\t\t\tparent.css(\"display\",\"inline\").next(\"img\").remove();\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\tparent.css(\"display\",\"none\").after(\"<img src='\"+options.partCheckedImageSrc+\"' class='partChecked' />\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tupdateCheckBoxStates(parent);\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//css(\"background\",\"url(./images/partChecked.jpg)\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t}", "function checkedAll()\n\t{\n\t \t var pollchecks = document.getElementsByTagName(\"INPUT\");\n\t\t var _return = false;\t \n\t\t for (var i = 0; i < pollchecks.length; i++)\n\t\t {\t\t\t\n\t\t\tif(pollchecks[i].type == \"checkbox\")\n\t\t\t{\n\t\t\t\t pollchecks[i].checked = true ;\n\t\t\t\t\n\t\t\t}\n\t\t }\n\t\t \n\t}", "_toggleChecked(isChecked) {\n if (this.disabled) return\n\n this.checked = !isChecked\n this._updateTextFieldsStyle()\n }", "_markForCheck() {\n // When group value changes, the button will not be notified. Use `markForCheck` to explicit\n // update radio button's status\n this._changeDetector.markForCheck();\n }", "updateToggles() {\n let keys = Object.keys(this.config_);\n for (let i = 0; i < keys.length; i++) {\n let el = document.getElementById(keys[i]);\n if (!!el) {\n el.checked = this.config_[keys[i]];\n }\n }\n}", "handleCheckAllChange() {\n console.log(\"test\");\n if (this.checkedRatings.length !== 6) {\n this.checkedRatings = [\"5\", \"4\", \"3\", \"2\", \"1\", \"All Ratings\"];\n } else this.checkedRatings = [];\n }", "function updateCheckBox(id, connectors, constraints) {\n var enabled, connector, checked;\n var diagram = $(\"#diagram\").ejDiagram(\"instance\");\n enabled = connectors[0].constraints & constraints ? true : false;\n if (connectors.length == 1) $(\"#\" + id).ejCheckBox({ enabled: enabled });\n else {\n for (var i = 1; i < connectors.length; i++) {\n connector = connectors[i];\n if (diagram.getObjectType(connector) == \"connector\") {\n if ((connector.constraints & constraints ? true : false) != enabled) {\n $(\"#\" + id).ejCheckBox({ enabled: false });\n checked = true;\n break;\n }\n }\n }\n }\n if (!checked) {\n $(\"#\" + id).ejCheckBox({ enabled: true });\n $(\"#\" + id).ejCheckBox({ checked: enabled });\n }\n}", "function setSelected()\n {\n ($('.all_products').is(\":checked\") ? $('.products_checkbox').prop(\"checked\", true) : $('.products_checkbox').prop(\"checked\", false))\n }", "function setCheckBoxValues() {\n // finding the popup element\n var popUp = document.getElementById(\"popUpTime\");\n var checkBoxes = popUp.getElementsByClassName('fancy-checkbox');\n // iterating through all the checkboxes and setting the checkstatus to true if the value is stored in the array\n for (i = 0; i < checkBoxes.length; i++) {\n checkBoxes[i].childNodes[1].checked = checkBoxStatus[i];\n }\n}", "function toggleChecked(status) {\n jQuery(\".checkbox\").each( function() {\n jQuery(this).attr(\"checked\",status);\n });\n}", "function connectCheckboxesAndCheckboxies () {\n $$(CHECKBOXY_SELECTOR).each (function (checkboxy) {\n var checkbox = $(CHECKBOX_ID_PREFIX + checkboxy.id.split (CHECKBOXY_SEPARATOR) [1]);\n checkboxy.observe (\"keyup\", function () {\n \n checkbox.checked = checkboxy .up (\"tr\") .select (\".checkboxy\") .any (function (c) {\n return c.value != c.defaultValue;\n });\n \n //checkbox.checked = checkboxy.value != checkboxy.defaultValue;\n setSubmitsFromCheckboxes();\n });\n checkbox.observe (\"click\", function () {\n if (! checkbox.checked) {\n checkboxy.value = checkboxy.defaultValue;\n checkboxy.fieldType.validate (checkboxy);\n }\n });\n });\n}", "function updateChecked(event) {\n\n updateStatsUI();\n\n let data = {\n \"doneCheck\": event.target.checked,\n \"toDoText\": event.target.parentElement.firstChild.nextSibling.innerText\n };\n $.ajax({\n type: 'PUT',\n data: JSON.stringify(data),\n contentType: 'application/json',\n url: 'http://localhost:3000/api/update-checked'\n });\n\n}", "handleSelectChecked(event) {\n\nconsole.log('update value3',event.target.checked);\n let elemName = event.target.name;\n let index = event.target.dataset.index;\n this.bFormEdited = true;\n //checkbox is selected for \"Selection\" checkbox\n if (elemName === \"selected\") {\n this.dataTransferTo[index].sSelectedRecord = event.target.checked;\n }\n //checkbox is selected for \"OverRide\" checkbox\n else if (elemName === \"override\") {\n this.dataTransferTo[index].bOverRide = event.target.checked;\n }\n }", "function selectCBs() {\n d3.selectAll('.type-checkbox')\n .property('checked', true);\n update();\n d3.select('.kasiosCheckbox')\n .property('checked', true)\n kasios_update();\n}", "onItemCheck(e, item) {\n let tempList = this.state.List;\n tempList.map((user) => {\n if (user.id === item.id) {\n user.selected = e.target.checked;\n }\n return user;\n });\n\n //To Control Master Checkbox State\n const totalItems = this.state.List.length;\n const totalCheckedItems = tempList.filter((e) => e.selected).length;\n\n // Update State\n this.setState({\n MasterChecked: totalItems === totalCheckedItems,\n List: tempList,\n SelectedList: this.state.List.filter((e) => e.selected),\n });\n }", "function checkAllDepartmentBoxes() {\n $(\"#legend input[type='checkbox']\").attr(\"checked\", \"checked\").trigger(\"change\");\n}", "function setCertainCheckboxes(){\r\n $(\"#testlist INPUT[type='checkbox']\").prop('checked',false);\r\n $.each(selectedTestList,function(key,val) {\r\n $('#testlist input:checkbox[value='+val+']').prop('checked',true);\r\n });\r\n}", "onCheckWarp(event) {\n for (var item of this.ItemsWarp) {\n item.Select = event.detail.target.checked;\n }\n }", "function helper_checkboxChecked(id) {\n \n const index = (id.substring(id.indexOf('m')+1)-1);\n const chkbox = document.getElementById(id);\n const items = userList.items;\n let originalCheck = items[index][1], currentCheck = false;\n \n if (chkbox.checked) { currentCheck = true; } \n else if (!chkbox.checked) { currentCheck = false; }\n \n if (originalCheck !== currentCheck) {\n document.getElementById('saveList').disabled = false;\n edited = true;\n }\n \n return edited;\n }", "function updateOptionsState() {\n if (ctrl.groups) {\n lodash.forEach(ctrl.optionList, function (group, key) {\n var viewValue = lodash.get(ctrl.ngModelCtrl.$viewValue, key, []);\n\n lodash.forEach(group.options, function (option) {\n option.checked = group.allItemsChecked ? true : lodash.includes(viewValue, option.value);\n });\n\n var checkedItems = lodash.filter(group.options, 'checked');\n\n group.allItemsChecked = checkedItems.length === group.options.length;\n lodash.set(ctrl.optionList, key + '.itemsChecked', checkedItems.length);\n });\n } else {\n lodash.forEach(ctrl.optionList, function (option) {\n option.checked = lodash.includes(ctrl.ngModelCtrl.$viewValue, option.value);\n });\n }\n }", "function check(checked = true) {\r\n const cbs = document.querySelectorAll('input[name=\"row-check\"]');\r\n cbs.forEach((cb) => {\r\n cb.checked = checked;\r\n });\r\n}", "function updateSelectAllCheckbox () {\n var unselectedRows = $(element).find('.select-row:not(:checked)');\n\n if (unselectedRows.length == 0) {\n selectAllCheckbox.prop('checked', true);\n } else {\n selectAllCheckbox.prop('checked', false)\n }\n }", "function parentCheckChange(item) {\n for (var i in item.children) {\n item.children[i].checked = item.checked;\n if (item.children[i].children) {\n parentCheckChange(item.children[i]);\n }\n }\n }", "function checkboxChecked(){\n if ($('input[type=checkbox]', this).is(':checked')) { \n $(this).addClass('checked');\n } else {\n $(this).removeClass('checked');\n }\n }", "handleCheckboxChange(event) {\n const { selectedDocIds } = this.state;\n if (event.target.checked === true) {\n //populate selecteddocids\n selectedDocIds.add(event.target.id);\n } else {\n //remove selecteddocids\n selectedDocIds.delete(event.target.id);\n }\n this.setState({ selectedDocIds: selectedDocIds });\n }", "function single_checkbox_change(selector)\n {\n for (i=0; i < selector.length; i++)\n {\n $(selector[i]).change(function()\n {\n $(\"#check_all_checkbox\").prop(\"checked\",false)\n });\n }\n }", "function loadChecked() {\n\tvar html = '';\n\tfor (var i = 0; i < selected.length; i++) {\n\t\tvar checkbox = document.getElementById(selected[i]);\n\t\t\thtml += '<input type=\"checkbox\" checked name=\"chooses\" value=\"'\n\t\t\t\t\t+ selected[i] + '\">';\n\t\t$('#' + selected[i]).prop('checked', true);\n\t}\n\t$('#addcheckbox').html(html);\n\n\t// set check all\n\tif (isCheckAll()) {\n\t\t$('#inputSelectAll').prop('checked', true);\n\t}\n}" ]
[ "0.7975897", "0.76959556", "0.7561912", "0.7350959", "0.7347982", "0.7310954", "0.7310954", "0.72847956", "0.72246754", "0.71308136", "0.7103185", "0.7090293", "0.7086325", "0.7085157", "0.7069243", "0.6993052", "0.6981249", "0.6978817", "0.6972909", "0.6961727", "0.6935424", "0.6928774", "0.6926166", "0.69054055", "0.6895913", "0.6847008", "0.68466526", "0.68139595", "0.68100536", "0.6778422", "0.67697024", "0.6756599", "0.6745936", "0.6744544", "0.67285234", "0.6720341", "0.67041504", "0.6696845", "0.66735244", "0.666799", "0.6647979", "0.66409194", "0.66349244", "0.662857", "0.66255903", "0.6621077", "0.66175973", "0.6607629", "0.65996397", "0.65971357", "0.6592406", "0.65733904", "0.6558093", "0.65253764", "0.65073824", "0.64944303", "0.6478868", "0.6465902", "0.6465902", "0.6453918", "0.6436708", "0.64292896", "0.6417641", "0.64086276", "0.6407711", "0.6400019", "0.63941085", "0.63933456", "0.63812375", "0.637664", "0.6376398", "0.6370492", "0.63629144", "0.636085", "0.6360825", "0.6343939", "0.63388383", "0.6336116", "0.6305341", "0.63033116", "0.6302354", "0.6300583", "0.6297946", "0.62965333", "0.62933886", "0.62882483", "0.62841696", "0.62833315", "0.62822956", "0.62800497", "0.6279455", "0.62721914", "0.6264284", "0.62544787", "0.6248219", "0.62411827", "0.62390167", "0.62361217", "0.62346804", "0.6225401" ]
0.7303407
7
bracketRegex is used to specify which type of bracket to scan should be a regexp, e.g. /[[\]]/ Note: If "where" is on an open bracket, then this bracket is ignored. Returns false when no bracket was found, null when it reached maxScanLines and gave up
function scanForBracket(cm,where,dir,style,config){for(var maxScanLen=config&&config.maxScanLineLength||1e4,maxScanLines=config&&config.maxScanLines||1e3,stack=[],re=config&&config.bracketRegex?config.bracketRegex:/[(){}[\]]/,lineEnd=dir>0?Math.min(where.line+maxScanLines,cm.lastLine()+1):Math.max(cm.firstLine()-1,where.line-maxScanLines),lineNo=where.line;lineNo!=lineEnd;lineNo+=dir){var line=cm.getLine(lineNo);if(line){var pos=dir>0?0:line.length-1,end=dir>0?line.length:-1;if(!(line.length>maxScanLen))for(lineNo==where.line&&(pos=where.ch-(dir<0?1:0));pos!=end;pos+=dir){var ch=line.charAt(pos);if(re.test(ch)&&(void 0===style||cm.getTokenTypeAt(Pos(lineNo,pos+1))==style)){var match=matching[ch];if(">"==match.charAt(1)==dir>0)stack.push(ch);else{if(!stack.length)return{pos:Pos(lineNo,pos),ch:ch};stack.pop()}}}}}return lineNo-dir!=(dir>0?cm.lastLine():cm.firstLine())&&null}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function scanForBracket(cm, where, dir, style, config) {\n var maxScanLen = (config && config.maxScanLineLength) || 10000;\n var maxScanLines = (config && config.maxScanLines) || 1000;\n\n var stack = [];\n var re = config && config.bracketRegex ? config.bracketRegex : /[(){}[\\]]/;\n var lineEnd = dir > 0 ? Math.min(where.line + maxScanLines, cm.lastLine() + 1)\n : Math.max(cm.firstLine() - 1, where.line - maxScanLines);\n for (var lineNo = where.line; lineNo != lineEnd; lineNo += dir) {\n var line = cm.getLine(lineNo);\n if (!line) continue;\n var pos = dir > 0 ? 0 : line.length - 1, end = dir > 0 ? line.length : -1;\n if (line.length > maxScanLen) continue;\n if (lineNo == where.line) pos = where.ch - (dir < 0 ? 1 : 0);\n for (; pos != end; pos += dir) {\n var ch = line.charAt(pos);\n if (re.test(ch) && (style === undefined || cm.getTokenTypeAt(Pos(lineNo, pos + 1)) == style)) {\n var match = matching[ch];\n if ((match.charAt(1) == \">\") == (dir > 0)) stack.push(ch);\n else if (!stack.length) return {pos: Pos(lineNo, pos), ch: ch};\n else stack.pop();\n }\n }\n }\n return lineNo - dir == (dir > 0 ? cm.lastLine() : cm.firstLine()) ? false : null;\n }", "function scanForBracket(cm, where, dir, style, config) {\n var maxScanLen = (config && config.maxScanLineLength) || 10000;\n var maxScanLines = (config && config.maxScanLines) || 1000;\n\n var stack = [];\n var re = config && config.bracketRegex ? config.bracketRegex : /[(){}[\\]]/;\n var lineEnd = dir > 0 ? Math.min(where.line + maxScanLines, cm.lastLine() + 1)\n : Math.max(cm.firstLine() - 1, where.line - maxScanLines);\n for (var lineNo = where.line; lineNo != lineEnd; lineNo += dir) {\n var line = cm.getLine(lineNo);\n if (!line) continue;\n var pos = dir > 0 ? 0 : line.length - 1, end = dir > 0 ? line.length : -1;\n if (line.length > maxScanLen) continue;\n if (lineNo == where.line) pos = where.ch - (dir < 0 ? 1 : 0);\n for (; pos != end; pos += dir) {\n var ch = line.charAt(pos);\n if (re.test(ch) && (style === undefined || cm.getTokenTypeAt(Pos(lineNo, pos + 1)) == style)) {\n var match = matching[ch];\n if ((match.charAt(1) == \">\") == (dir > 0)) stack.push(ch);\n else if (!stack.length) return {pos: Pos(lineNo, pos), ch: ch};\n else stack.pop();\n }\n }\n }\n return lineNo - dir == (dir > 0 ? cm.lastLine() : cm.firstLine()) ? false : null;\n }", "function scanForBracket(cm, where, dir, style, config) {\n var maxScanLen = (config && config.maxScanLineLength) || 10000;\n var maxScanLines = (config && config.maxScanLines) || 1000;\n\n var stack = [];\n var re = config && config.bracketRegex ? config.bracketRegex : /[(){}[\\]]/;\n var lineEnd = dir > 0 ? Math.min(where.line + maxScanLines, cm.lastLine() + 1)\n : Math.max(cm.firstLine() - 1, where.line - maxScanLines);\n for (var lineNo = where.line; lineNo != lineEnd; lineNo += dir) {\n var line = cm.getLine(lineNo);\n if (!line) continue;\n var pos = dir > 0 ? 0 : line.length - 1, end = dir > 0 ? line.length : -1;\n if (line.length > maxScanLen) continue;\n if (lineNo == where.line) pos = where.ch - (dir < 0 ? 1 : 0);\n for (; pos != end; pos += dir) {\n var ch = line.charAt(pos);\n if (re.test(ch) && (style === undefined || cm.getTokenTypeAt(Pos(lineNo, pos + 1)) == style)) {\n var match = matching[ch];\n if ((match.charAt(1) == \">\") == (dir > 0)) stack.push(ch);\n else if (!stack.length) return {pos: Pos(lineNo, pos), ch: ch};\n else stack.pop();\n }\n }\n }\n return lineNo - dir == (dir > 0 ? cm.lastLine() : cm.firstLine()) ? false : null;\n }", "function scanForBracket(cm, where, dir, style, config) {\n var maxScanLen = config && config.maxScanLineLength || 10000;\n var maxScanLines = config && config.maxScanLines || 1000;\n var stack = [];\n var re = bracketRegex(config);\n var lineEnd = dir > 0 ? Math.min(where.line + maxScanLines, cm.lastLine() + 1) : Math.max(cm.firstLine() - 1, where.line - maxScanLines);\n\n for (var lineNo = where.line; lineNo != lineEnd; lineNo += dir) {\n var line = cm.getLine(lineNo);\n if (!line) continue;\n var pos = dir > 0 ? 0 : line.length - 1,\n end = dir > 0 ? line.length : -1;\n if (line.length > maxScanLen) continue;\n if (lineNo == where.line) pos = where.ch - (dir < 0 ? 1 : 0);\n\n for (; pos != end; pos += dir) {\n var ch = line.charAt(pos);\n\n if (re.test(ch) && (style === undefined || cm.getTokenTypeAt(Pos(lineNo, pos + 1)) == style)) {\n var match = matching[ch];\n if (match && match.charAt(1) == \">\" == dir > 0) stack.push(ch);else if (!stack.length) return {\n pos: Pos(lineNo, pos),\n ch: ch\n };else stack.pop();\n }\n }\n }\n\n return lineNo - dir == (dir > 0 ? cm.lastLine() : cm.firstLine()) ? false : null;\n }", "function scanForBracket(cm, where, dir, style, config) {\n\t\t var maxScanLen = (config && config.maxScanLineLength) || 10000;\n\t\t var maxScanLines = (config && config.maxScanLines) || 1000;\n\n\t\t var stack = [];\n\t\t var re = bracketRegex(config);\n\t\t var lineEnd = dir > 0 ? Math.min(where.line + maxScanLines, cm.lastLine() + 1)\n\t\t : Math.max(cm.firstLine() - 1, where.line - maxScanLines);\n\t\t for (var lineNo = where.line; lineNo != lineEnd; lineNo += dir) {\n\t\t var line = cm.getLine(lineNo);\n\t\t if (!line) continue;\n\t\t var pos = dir > 0 ? 0 : line.length - 1, end = dir > 0 ? line.length : -1;\n\t\t if (line.length > maxScanLen) continue;\n\t\t if (lineNo == where.line) pos = where.ch - (dir < 0 ? 1 : 0);\n\t\t for (; pos != end; pos += dir) {\n\t\t var ch = line.charAt(pos);\n\t\t if (re.test(ch) && (style === undefined ||\n\t\t (cm.getTokenTypeAt(Pos(lineNo, pos + 1)) || \"\") == (style || \"\"))) {\n\t\t var match = matching[ch];\n\t\t if (match && (match.charAt(1) == \">\") == (dir > 0)) stack.push(ch);\n\t\t else if (!stack.length) return {pos: Pos(lineNo, pos), ch: ch};\n\t\t else stack.pop();\n\t\t }\n\t\t }\n\t\t }\n\t\t return lineNo - dir == (dir > 0 ? cm.lastLine() : cm.firstLine()) ? false : null;\n\t\t }", "function scanForBracket(cm, where, dir, style, config) {\n var maxScanLen = (config && config.maxScanLineLength) || 10000;\n var maxScanLines = (config && config.maxScanLines) || 1000;\n\n var stack = [];\n var re = bracketRegex(config)\n var lineEnd = dir > 0 ? Math.min(where.line + maxScanLines, cm.lastLine() + 1)\n : Math.max(cm.firstLine() - 1, where.line - maxScanLines);\n for (var lineNo = where.line; lineNo != lineEnd; lineNo += dir) {\n var line = cm.getLine(lineNo);\n if (!line) continue;\n var pos = dir > 0 ? 0 : line.length - 1, end = dir > 0 ? line.length : -1;\n if (line.length > maxScanLen) continue;\n if (lineNo == where.line) pos = where.ch - (dir < 0 ? 1 : 0);\n for (; pos != end; pos += dir) {\n var ch = line.charAt(pos);\n if (re.test(ch) && (style === undefined || cm.getTokenTypeAt(Pos(lineNo, pos + 1)) == style)) {\n var match = matching[ch];\n if ((match.charAt(1) == \">\") == (dir > 0)) stack.push(ch);\n else if (!stack.length) return {pos: Pos(lineNo, pos), ch: ch};\n else stack.pop();\n }\n }\n }\n return lineNo - dir == (dir > 0 ? cm.lastLine() : cm.firstLine()) ? false : null;\n }", "function scanForBracket(cm, where, dir, style, config) {\n var maxScanLen = (config && config.maxScanLineLength) || 10000;\n var maxScanLines = (config && config.maxScanLines) || 1000;\n\n var stack = [];\n var re = bracketRegex(config)\n var lineEnd = dir > 0 ? Math.min(where.line + maxScanLines, cm.lastLine() + 1)\n : Math.max(cm.firstLine() - 1, where.line - maxScanLines);\n for (var lineNo = where.line; lineNo != lineEnd; lineNo += dir) {\n var line = cm.getLine(lineNo);\n if (!line) continue;\n var pos = dir > 0 ? 0 : line.length - 1, end = dir > 0 ? line.length : -1;\n if (line.length > maxScanLen) continue;\n if (lineNo == where.line) pos = where.ch - (dir < 0 ? 1 : 0);\n for (; pos != end; pos += dir) {\n var ch = line.charAt(pos);\n if (re.test(ch) && (style === undefined ||\n (cm.getTokenTypeAt(Pos(lineNo, pos + 1)) || \"\") == (style || \"\"))) {\n var match = matching[ch];\n if (match && (match.charAt(1) == \">\") == (dir > 0)) stack.push(ch);\n else if (!stack.length) return {pos: Pos(lineNo, pos), ch: ch};\n else stack.pop();\n }\n }\n }\n return lineNo - dir == (dir > 0 ? cm.lastLine() : cm.firstLine()) ? false : null;\n }", "function scanForBracket(cm, where, dir, style, config) {\n var maxScanLen = (config && config.maxScanLineLength) || 10000;\n var maxScanLines = (config && config.maxScanLines) || 1000;\n\n var stack = [];\n var re = bracketRegex(config);\n var lineEnd = dir > 0 ? Math.min(where.line + maxScanLines, cm.lastLine() + 1)\n : Math.max(cm.firstLine() - 1, where.line - maxScanLines);\n for (var lineNo = where.line; lineNo != lineEnd; lineNo += dir) {\n var line = cm.getLine(lineNo);\n if (!line) continue;\n var pos = dir > 0 ? 0 : line.length - 1, end = dir > 0 ? line.length : -1;\n if (line.length > maxScanLen) continue;\n if (lineNo == where.line) pos = where.ch - (dir < 0 ? 1 : 0);\n for (; pos != end; pos += dir) {\n var ch = line.charAt(pos);\n if (re.test(ch) && (style === undefined ||\n (cm.getTokenTypeAt(Pos(lineNo, pos + 1)) || \"\") == (style || \"\"))) {\n var match = matching[ch];\n if (match && (match.charAt(1) == \">\") == (dir > 0)) stack.push(ch);\n else if (!stack.length) return {pos: Pos(lineNo, pos), ch: ch};\n else stack.pop();\n }\n }\n }\n return lineNo - dir == (dir > 0 ? cm.lastLine() : cm.firstLine()) ? false : null;\n }", "function test(bracket, ph) {\n\t\t\t\t\tif (typeof bracket == 'string') {\n\t\t\t\t\t\tif (bracket.includes(ph)) placeholder.roll();\n\t\t\t\t\t} else if (bracket.test(ph)) {\n\t\t\t\t\t\tplaceholder.roll();\n\t\t\t\t\t}\n\t\t\t\t}", "matchBrackets() {\n const inputLength = this.inputExpression.length;\n for (let i = 0; i < inputLength; i++) {\n const char = this.inputExpression.charAt(i);\n switch (char) {\n case \"(\":\n case \"[\":\n case \"{\":\n this.stack.push(char);\n break;\n case \"]\":\n case \")\":\n case \"}\":\n if (!this.stack.isEmpty()) {\n const tmpChar = this.stack.pop();\n if (\n (tmpChar !== \"{\" && char == \"}\") ||\n (tmpChar !== \"[\" && char == \"]\") ||\n (tmpChar !== \"(\" && char == \")\")\n ) {\n this.isExpressionValid = false;\n this.errorCode = ErrorConstant.NO_MATCHING_OPENING_BRACKETS(\n char,\n this.inputExpression\n );\n }\n } else {\n this.isExpressionValid = false;\n this.errorCode = ErrorConstant.EXTRA_CLOSING_BRACKETS(\n char,\n this.inputExpression\n );\n }\n break;\n }\n // break the loop on the first mistake.\n if (!this.isExpressionValid) {\n break;\n }\n }\n if (this.isExpressionValid) {\n // There is still possibility that extra brackets being present here.\n if (!this.stack.isEmpty()) {\n this.isExpressionValid = false;\n this.errorCode = ErrorConstant.EXTRA_OPENING_BRACKETS(\n this.inputExpression\n );\n }\n }\n }", "function BracketMatch() {\n\n this.findMatchingBracket = function(position) {\n if (position.column == 0) return null;\n\n var charBeforeCursor = this.getLine(position.row).charAt(position.column-1);\n if (charBeforeCursor == \"\") return null;\n\n var match = charBeforeCursor.match(/([\\(\\[\\{])|([\\)\\]\\}])/);\n if (!match) {\n return null;\n }\n\n if (match[1]) {\n return this.$findClosingBracket(match[1], position);\n } else {\n return this.$findOpeningBracket(match[2], position);\n }\n };\n\n this.$brackets = {\n \")\": \"(\",\n \"(\": \")\",\n \"]\": \"[\",\n \"[\": \"]\",\n \"{\": \"}\",\n \"}\": \"{\"\n };\n\n this.$findOpeningBracket = function(bracket, position) {\n var openBracket = this.$brackets[bracket];\n var depth = 1;\n\n var iterator = new TokenIterator(this, position.row, position.column);\n var token = iterator.getCurrentToken();\n if (!token) return null;\n \n // token.type contains a period-delimited list of token identifiers\n // (e.g.: \"constant.numeric\" or \"paren.lparen\"). Create a pattern that\n // matches any token containing the same identifiers or a subset. In\n // addition, if token.type includes \"rparen\", then also match \"lparen\".\n // So if type.token is \"paren.rparen\", then typeRe will match \"lparen.paren\".\n var typeRe = new RegExp(\"(\\\\.?\" +\n token.type.replace(\".\", \"|\").replace(\"rparen\", \"lparen|rparen\") + \")+\");\n \n // Start searching in token, just before the character at position.column\n var valueIndex = position.column - iterator.getCurrentTokenColumn() - 2;\n var value = token.value;\n \n while (true) {\n \n while (valueIndex >= 0) {\n var chr = value.charAt(valueIndex);\n if (chr == openBracket) {\n depth -= 1;\n if (depth == 0) {\n return {row: iterator.getCurrentTokenRow(),\n column: valueIndex + iterator.getCurrentTokenColumn()};\n }\n }\n else if (chr == bracket) {\n depth += 1;\n }\n valueIndex -= 1;\n }\n\n // Scan backward through the document, looking for the next token\n // whose type matches typeRe\n do {\n token = iterator.stepBackward();\n } while (token && !typeRe.test(token.type));\n\n if (token == null)\n break;\n \n value = token.value;\n valueIndex = value.length - 1;\n }\n \n return null;\n };\n\n this.$findClosingBracket = function(bracket, position) {\n var closingBracket = this.$brackets[bracket];\n var depth = 1;\n\n var iterator = new TokenIterator(this, position.row, position.column);\n var token = iterator.getCurrentToken();\n if (!token) return null;\n\n // token.type contains a period-delimited list of token identifiers\n // (e.g.: \"constant.numeric\" or \"paren.lparen\"). Create a pattern that\n // matches any token containing the same identifiers or a subset. In\n // addition, if token.type includes \"lparen\", then also match \"rparen\".\n // So if type.token is \"lparen.paren\", then typeRe will match \"paren.rparen\".\n var typeRe = new RegExp(\"(\\\\.?\" +\n token.type.replace(\".\", \"|\").replace(\"lparen\", \"lparen|rparen\") + \")+\");\n\n // Start searching in token, after the character at position.column\n var valueIndex = position.column - iterator.getCurrentTokenColumn();\n\n while (true) {\n\n var value = token.value;\n var valueLength = value.length;\n while (valueIndex < valueLength) {\n var chr = value.charAt(valueIndex);\n if (chr == closingBracket) {\n depth -= 1;\n if (depth == 0) {\n return {row: iterator.getCurrentTokenRow(),\n column: valueIndex + iterator.getCurrentTokenColumn()};\n }\n }\n else if (chr == bracket) {\n depth += 1;\n }\n valueIndex += 1;\n }\n\n // Scan forward through the document, looking for the next token\n // whose type matches typeRe\n do {\n token = iterator.stepForward();\n } while (token && !typeRe.test(token.type));\n\n if (token == null)\n break;\n\n valueIndex = 0;\n }\n \n return null;\n };\n}", "function input_bracket(bracket_type){\n console.log(\"Handling a bracket\");\n calculator.curr_display += bracket_type;\n calculator.curr_num = \"\";\n\n // so im not doing multiple true assertments if unneccessary\n if(calculator.bracket_used === false){\n calculator.bracket_used = true;\n }\n}", "function isBracketValid(Look) {\n try {\n var Bracket = new Array();\n for (var i = 0; i < Look.length; i++) {\n if (Look[i] == \"(\" || Look[i] == \")\") {\n Bracket.push(Look[i]);\n }\n }\n if (Bracket.length % 2 != 0) throw \"odd Brackets\";\n var count1 = 0, count2 = 0;\n for (i = 0; i < Bracket.length; i++) {\n if (Bracket[i] != \"(\") {\n ++count1;\n }\n if (Bracket[i] != \")\") {\n ++count2;\n }\n }\n if (count2 != count1) throw \"Brackets dispair\";\n return true;\n }\n catch(Error) {\n alert(Error);\n ClearAll();\n }\n}", "function jumpToOpeningBracket() {\n\t\t\t\n\t\t\tvar depth = 1;\n\t\t\tvar closingBracketPosition = pointerAddress;\n\t\t\tpointerAddress -= 1;\n\t\t\twhile(pointerAddress >= 0) {\t\t\t\t\t\n\t\t\t\tswitch(instructions[pointerAddress]) {\n\t\t\t\t\tcase \"]\":\n\t\t\t\t\t\tdepth += 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"[\":\n\t\t\t\t\t\tdepth -= 1;\n\t\t\t\t\t\tif(depth == 0) {\n\t\t\t\t\t\t\tpointerAddress += 1;\t\t\t\t\t\t\t\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\t\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tpointerAddress -= 1;\n\t\t\t}\t\t\t\t\n\t\t\tdie(\n\t\t\t\t'Fatal error: unmatched bracket at instruction ' + \n\t\t\t\tclosingBracketPosition\n\t\t\t);\n\t\t}", "function jumpToClosingBracket() {\t\t\t\n\t\t\tvar depth = 1;\n\t\t\tvar openingBracketPosition = pointerAddress;\n\t\t\tpointerAddress += 1;\n\t\t\twhile(pointerAddress < instructions.length) {\t\t\t\t\t\n\t\t\t\tswitch(instructions[pointerAddress]) {\n\t\t\t\t\tcase \"[\":\n\t\t\t\t\t\tdepth += 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"]\":\n\t\t\t\t\t\tdepth -= 1;\n\t\t\t\t\t\tif(depth == 0) {\n\t\t\t\t\t\t\tpointerAddress += 1;\t\t\t\t\t\t\t\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\t\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tpointerAddress += 1;\n\t\t\t}\t\t\t\t\n\t\t\tdie(\n\t\t\t\t'Fatal error: unmatched bracket at instruction ' + \n\t\t\t\topeningBracketPosition\n\t\t\t);\n\t\t}", "static validateBrackets (stringDefinition = ''){\n let leftBraceCount = (stringDefinition.match ('{') || []).length;\n let rightBraceCount = (stringDefinition.match ('}') || []).length;\n let leftParenCount = (stringDefinition.match ('(') || []).length;\n let rightParenCount = (stringDefinition.match (')') || []).length;\n let leftBoxBracketCount = (stringDefinition.match ('[') || []).length;\n let rightBoxBracketCount = (stringDefinition.match (']') || []).length;\n\n // If there are any braces, parentheses, or box brackets without pair, throw an error\n if (leftBraceCount != rightBraceCount ||\n leftParenCount != rightParenCount ||\n leftBoxBracketCount != rightBoxBracketCount) {\n\n let errorMessage = 'Not all brackets are closed';\n if (leftBraceCount != rightBraceCount) {\n errorMessage += `\\n\\tThere are ${leftBraceCount} '{' and ${rightBraceCount} '}'`;\n }\n if (leftParenCount != rightParenCount) {\n errorMessage += `\\n\\tThere are ${leftParenCount} '(' and ${rightParenCount} ')'`;\n }\n if (leftBoxBracketCount != rightBoxBracketCount) {\n errorMessage += `\\n\\tThere are ${leftBoxBracketCount} '[' and ${leftBoxBracketCount} ']'`;\n }\n throw new Error (errorMessage);\n }\n\n }", "function bracketsAllowed(str) {\n let open_bracket_idx = str.search(\"\\\\(\");\n let closed_bracket_idx = str.search(\"\\\\)\");\n if (open_bracket_idx == -1 || closed_bracket_idx == -1) {\n return true;\n }\n if (closed_bracket_idx - open_bracket_idx == 4) {\n return true;\n }\n return false;\n}", "static demo() {\n let bracketMatch = new BracketMatch(`{a+(c+d)-b}`);\n bracketMatch.matchBrackets();\n bracketMatch.displayResult();\n\n bracketMatch.setExpression(`{a+9-(c+d-e+[a+b)}`); //un-even closing\n bracketMatch.matchBrackets();\n bracketMatch.displayResult();\n\n bracketMatch.setExpression(`{a+9-(c+d-e+[a+b])}}`); //extra closing\n bracketMatch.matchBrackets();\n bracketMatch.displayResult();\n\n bracketMatch.setExpression(`{{a+9-(c+d-e+[a+b])}`); //extra opening\n bracketMatch.matchBrackets();\n bracketMatch.displayResult();\n }", "function validBraces (str){\n\tconsole.log(str);\n\tvar open = [];\n\t\n\tfor(var i = 0; i < str.length; i++){\t\n\t\tif(/[\\(\\{\\[]/g.test(str[i])){\n\t\t\topen.push(str[i]);\n\t\t}\t\n\t\t\n\t\tif(str[i] === ')'){ \n\t\t\t (open[open.length - 1] === '(' && open.length > 0) ? \n\t\t\t\t open.pop() : return false;\n\t\t}\n\t\n\t\tif(str[i] === ']'){ \n\t\t\t (open[open.length - 1] === '[' && open.length > 0) ? \n\t\t\t\t open.pop() : return false;\n\t\t}\n\t\n\t\tif(str[i] === '}'){ \n\t\t\t (open[open.length - 1] === '{' && open.length > 0) ? \n\t\t\t\t open.pop() : return false;\n\t\t}\t\n\t\t\n\t\tconsole.log(open, 'open after if tests')\n\n\t\t\n\t}\n\n\tif(open.length === 0){\n\t\treturn true;\n\t}\n\t\n\treturn false;\n}", "function areBracketsOk(arr){\r\n let nOpen=0;\r\n let nClose=0;\r\n\r\n for (var i=0;i<arr.length;i++){\r\n if (arr[i]=='(') nOpen+=1;\r\n\r\n if (arr[i]==')') nClose+=1;\r\n\r\n if (nClose>nOpen){\r\n console.log('Opening bracket is missing');\r\n return 0;\r\n }\r\n if(i>0 && arr[i-1]=='(' && arr[i]==')'){\r\n console.log('Empty brackets detected');\r\n return 0;\r\n }\r\n\r\n if(i>0 &&(arr[i-1])==')' && (numbers.indexOf(arr[i]))!=-1){\r\n console.log('impossible to have a number after a closing bracket');\r\n return 0;\r\n }\r\n\r\n if(i>0 &&(arr[i])=='(' && (numbers.indexOf(arr[i-1]))!=-1){\r\n console.log('impossible to have a number before an opening bracket');\r\n return 0;\r\n }\r\n }\r\n return (nOpen==nClose)?1:0;\r\n}", "function isValidBrackets(expression) {\n var leftBracket = 0,\n index;\n\n for (index in expression) {\n if (expression[index] === '(') {\n leftBracket += 1;\n } else if (expression[index] === ')') {\n if (leftBracket === 0) {\n return 'incorrect';\n } else {\n leftBracket -= 1;\n }\n }\n }\n\n if (leftBracket === 0) {\n return 'correct';\n } else {\n return 'incorrect';\n }\n}", "function skipBracket() {\n\t\twhile (thisToken && thisToken != ')') {\n\t\t\tif (getRangOperation(thisToken) == 0)\n\t\t\t\tgetToken();\n\t\t\tif (!thisToken)\n\t\t\t\treturn;\n\t\t\texecut();\n\t\t}\n\t\tremoveNewLine();\n\n\t}", "function checkBraces(string) {\n\tconst stack = new Stack();\n\n\t/* if (string.length % 2 !== 0) {\n\t return false;\n\t} */\n\tfor (const brace of string) {\n\t\tif (brace === \"(\") {\n\t\t\tstack.push(brace);\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (brace === \")\") {\n\t\t\tif (stack.isEmpty) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tstack.pop();\n\t\t}\n\t}\n\treturn stack.isEmpty;\n}", "function hasBalancedBrackets(s) {\n var openingBrackets = []; \n var chr;\n var closingBracket = /[\\)\\]\\}]/;\n var pairs = {\n '(': ')'\n , '{': '}'\n , '[': ']'\n };\n\n for (var i = 0; i < s.length; i++) {\n chr = s[i];\n if (pairs[chr]) {\n openingBrackets.push(chr); \n }\n if (chr.match(closingBracket)) { \n if (pairs[openingBrackets.pop()] !== chr) {\n return false;\n }\n }\n }\n\n return openingBrackets.length ? false : true;\n}", "function validBraces(braces) {\n\tvar matches = { '(': ')', '{': '}', '[': ']' };\n\tvar stack = [];\n\tvar currentChar;\n\n\tfor (var i = 0; i < braces.length; i++) {\n\t\tcurrentChar = braces[i];\n\n\t\tif (matches[currentChar]) {\n\t\t\t// opening braces\n\t\t\tstack.push(currentChar);\n\t\t} else {\n\t\t\t// closing braces\n\t\t\tif (currentChar !== matches[stack.pop()]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn stack.length === 0; // any unclosed braces left?\n}", "function bracket()\r\n{\r\nvar p=\"\";\r\nfor(var c=0;c<form.display.value.length;c++)\r\n{\r\n if(form.display.value[c]==\"(\" || form.display.value[c]==\")\")\r\n {\r\n p=p+form.display.value[c];\r\n }\r\n}\r\nvar z=isMatchingBrackets(p);\r\nreturn z;\r\n}", "function validBraces(braces){\n var matches = { '(':')', '{':'}', '[':']' };\n var stack = [];\n var currentChar;\n\n for (var i=0; i<braces.length; i++) {\n currentChar = braces[i];\n\n if (matches[currentChar]) { // opening braces\n stack.push(currentChar);\n } else { // closing braces\n if (currentChar !== matches[stack.pop()]) {\n return false;\n }\n }\n }\n\n return stack.length === 0; // any unclosed braces left?\n}", "function containsBrackets(str) {\n return !!~str.search(/\\(|\\)/);\n}", "function match(regex, expr) {\n // This is the finished implementation\n // return (new RegExp(`^${regex}$`)).test(expr)\n if (!isValidRegex(regex)) {\n throw new Error(\"hey, bad regex yo\");\n }\n if (regex.length === 0) {\n return expr === \"\";\n }\n if (regex.length === 1) {\n return expr.length === 1;\n }\n var hasWildcards = false;\n var minLength = 0;\n var segments = [];\n var phrase = \"\";\n for (var i = 0; i < regex.length; i++) {\n if (regex.charAt(i) === \"*\") {\n if (phrase.length >= 2) {\n minLength += phrase.length - 1;\n segments.push({ s: phrase.substring(0, phrase.length - 1) });\n }\n segments.push({ s: phrase.charAt(phrase.length - 1), isRepeated: true });\n hasWildcards = true;\n phrase = \"\";\n }\n else {\n phrase += regex.charAt(i);\n }\n }\n if (phrase.length > 0) {\n segments.push({ s: phrase });\n minLength += phrase.length;\n }\n // TODO: This can probably be more integrated into matchSegements, \n // since the check is only done once. It would probably be useful\n // near the tail end of segment matching. Might have to be very \n // integrated into the data structure we pass into matchSegments\n // though. \n if (expr.length < minLength) {\n return false;\n }\n // console.log(`test: ${matchSegments([{s: \"a\", isRepeated: true}], 'a')}`)\n return matchSegments(segments, expr);\n}", "function validBraces(braces) {\n\tvar parts = { '{': '}', '[': ']', '(': ')' };\n\n\tvar stack = [];\n\n\tfor (var i = 0; i < braces.length; i++) {\n\t\tvar brace = braces[i];\n\n\t\tif (brace in parts) {\n\t\t\tstack.push(brace);\n\t\t} else {\n\t\t\tif (!stack || parts[stack.pop()] != brace) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn !stack.length;\n}", "function validBraces(braces) {\n\tvar close = { ')': '(', '}': '{', ']': '[' };\n\tvar operands = [];\n\tfor (let s of braces.split('')) {\n\t\tif (!close[s]) operands.push(s);\n\t\telse if (operands.pop() !== close[s]) return false;\n\t}\n\treturn operands.length === 0;\n}", "function matchingP(math) {\n let stack = new Stack;\n\n let map = {\n '(' : ')'\n };\n\n for (let i = 0; i < math.length; i++) {\n // If character is an opening brace add it to a stack\n if(math[i] === '('){\n stack.push(math[i]);\n } \n // If that character is a closing brace, pop from the stack, which will also reduce the length of the stack each time a closing bracket is encountered.\n else {\n let last = stack.pop();\n //If the popped element from the stack, which is the last opening brace doesn’t match the corresponding closing brace in the map, then return false\n if (math[i] !== map[last]) {\n return false\n };\n }\n };\n // By the completion of the for loop after checking all the brackets of the str, at the end, if the stack is not empty then fail\n if (stack.length !== 0) {return false};\n\n return true;\n}", "regexToken() {\r\n\t\t\t\tvar body, closed, comment, commentIndex, commentOpts, commentTokens, comments, delimiter, end, flags, fullMatch, index, leadingWhitespace, match, matchedComment, origin, prev, ref, ref1, regex, tokens;\r\n\t\t\t\tswitch (false) {\r\n\t\t\t\t\tcase !(match = REGEX_ILLEGAL.exec(this.chunk)):\r\n\t\t\t\t\t\tthis.error(`regular expressions cannot begin with ${match[2]}`, {\r\n\t\t\t\t\t\t\toffset: match.index + match[1].length\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase !(match = this.matchWithInterpolations(HEREGEX, '///')):\r\n\t\t\t\t\t\t({tokens, index} = match);\r\n\t\t\t\t\t\tcomments = [];\r\n\t\t\t\t\t\twhile (matchedComment = HEREGEX_COMMENT.exec(this.chunk.slice(0, index))) {\r\n\t\t\t\t\t\t\t({\r\n\t\t\t\t\t\t\t\tindex: commentIndex\r\n\t\t\t\t\t\t\t} = matchedComment);\r\n\t\t\t\t\t\t\t[fullMatch, leadingWhitespace, comment] = matchedComment;\r\n\t\t\t\t\t\t\tcomments.push({\r\n\t\t\t\t\t\t\t\tcomment,\r\n\t\t\t\t\t\t\t\toffsetInChunk: commentIndex + leadingWhitespace.length\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcommentTokens = flatten((function() {\r\n\t\t\t\t\t\t\tvar j, len, results;\r\n\t\t\t\t\t\t\tresults = [];\r\n\t\t\t\t\t\t\tfor (j = 0, len = comments.length; j < len; j++) {\r\n\t\t\t\t\t\t\t\tcommentOpts = comments[j];\r\n\t\t\t\t\t\t\t\tresults.push(this.commentToken(commentOpts.comment, Object.assign(commentOpts, {\r\n\t\t\t\t\t\t\t\t\theregex: true,\r\n\t\t\t\t\t\t\t\t\treturnCommentTokens: true\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\treturn results;\r\n\t\t\t\t\t\t}).call(this));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase !(match = REGEX.exec(this.chunk)):\r\n\t\t\t\t\t\t[regex, body, closed] = match;\r\n\t\t\t\t\t\tthis.validateEscapes(body, {\r\n\t\t\t\t\t\t\tisRegex: true,\r\n\t\t\t\t\t\t\toffsetInChunk: 1\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tindex = regex.length;\r\n\t\t\t\t\t\tprev = this.prev();\r\n\t\t\t\t\t\tif (prev) {\r\n\t\t\t\t\t\t\tif (prev.spaced && (ref = prev[0], indexOf.call(CALLABLE, ref) >= 0)) {\r\n\t\t\t\t\t\t\t\tif (!closed || POSSIBLY_DIVISION.test(regex)) {\r\n\t\t\t\t\t\t\t\t\treturn 0;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} else if (ref1 = prev[0], indexOf.call(NOT_REGEX, ref1) >= 0) {\r\n\t\t\t\t\t\t\t\treturn 0;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (!closed) {\r\n\t\t\t\t\t\t\tthis.error('missing / (unclosed regex)');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\treturn 0;\r\n\t\t\t\t}\r\n\t\t\t\t[flags] = REGEX_FLAGS.exec(this.chunk.slice(index));\r\n\t\t\t\tend = index + flags.length;\r\n\t\t\t\torigin = this.makeToken('REGEX', null, {\r\n\t\t\t\t\tlength: end\r\n\t\t\t\t});\r\n\t\t\t\tswitch (false) {\r\n\t\t\t\t\tcase !!VALID_FLAGS.test(flags):\r\n\t\t\t\t\t\tthis.error(`invalid regular expression flags ${flags}`, {\r\n\t\t\t\t\t\t\toffset: index,\r\n\t\t\t\t\t\t\tlength: flags.length\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase !(regex || tokens.length === 1):\r\n\t\t\t\t\t\tdelimiter = body ? '/' : '///';\r\n\t\t\t\t\t\tif (body == null) {\r\n\t\t\t\t\t\t\tbody = tokens[0][1];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tthis.validateUnicodeCodePointEscapes(body, {delimiter});\r\n\t\t\t\t\t\tthis.token('REGEX', `/${body}/${flags}`, {\r\n\t\t\t\t\t\t\tlength: end,\r\n\t\t\t\t\t\t\torigin,\r\n\t\t\t\t\t\t\tdata: {delimiter}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tthis.token('REGEX_START', '(', {\r\n\t\t\t\t\t\t\tlength: 0,\r\n\t\t\t\t\t\t\torigin,\r\n\t\t\t\t\t\t\tgenerated: true\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tthis.token('IDENTIFIER', 'RegExp', {\r\n\t\t\t\t\t\t\tlength: 0,\r\n\t\t\t\t\t\t\tgenerated: true\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tthis.token('CALL_START', '(', {\r\n\t\t\t\t\t\t\tlength: 0,\r\n\t\t\t\t\t\t\tgenerated: true\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tthis.mergeInterpolationTokens(tokens, {\r\n\t\t\t\t\t\t\tdouble: true,\r\n\t\t\t\t\t\t\theregex: {flags},\r\n\t\t\t\t\t\t\tendOffset: end - flags.length,\r\n\t\t\t\t\t\t\tquote: '///'\r\n\t\t\t\t\t\t}, (str) => {\r\n\t\t\t\t\t\t\treturn this.validateUnicodeCodePointEscapes(str, {delimiter});\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tif (flags) {\r\n\t\t\t\t\t\t\tthis.token(',', ',', {\r\n\t\t\t\t\t\t\t\toffset: index - 1,\r\n\t\t\t\t\t\t\t\tlength: 0,\r\n\t\t\t\t\t\t\t\tgenerated: true\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\tthis.token('STRING', '\"' + flags + '\"', {\r\n\t\t\t\t\t\t\t\toffset: index,\r\n\t\t\t\t\t\t\t\tlength: flags.length\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tthis.token(')', ')', {\r\n\t\t\t\t\t\t\toffset: end,\r\n\t\t\t\t\t\t\tlength: 0,\r\n\t\t\t\t\t\t\tgenerated: true\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tthis.token('REGEX_END', ')', {\r\n\t\t\t\t\t\t\toffset: end,\r\n\t\t\t\t\t\t\tlength: 0,\r\n\t\t\t\t\t\t\tgenerated: true\r\n\t\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\t// Explicitly attach any heregex comments to the REGEX/REGEX_END token.\r\n\t\t\t\tif (commentTokens != null ? commentTokens.length : void 0) {\r\n\t\t\t\t\taddTokenData(this.tokens[this.tokens.length - 1], {\r\n\t\t\t\t\t\theregexCommentTokens: commentTokens\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\treturn end;\r\n\t\t\t}", "function place_decoy_in_bracket(bracket, decoy){\n if (bracket.is_decoy){\n return match_c(bracket, decoy);\n }else{\n return place_in_lighter_branch(bracket, decoy); \n }\n }", "function validBraces (str){\n\tvar open = [];\n var unbalanced = false;\n\t\n\tfor(var i = 0; i < str.length; i++){\t\n\t\tif(/[\\(\\{\\[]/g.test(str[i])){\n\t\t\topen.push(str[i]);\n\t\t}\t\n\t\t\n\t\tif(str[i] === ')'){ \n\t\t\t (open[open.length - 1] === '(' && open.length > 0) ? \n\t\t\t\t open.pop() : unbalanced = true;\n\t\t}\n\t\n\t\tif(str[i] === ']'){ \n\t\t\t (open[open.length - 1] === '[' && open.length > 0) ? \n\t\t\t\t open.pop() : unbalanced = true;\n\t\t}\n\t\n\t\tif(str[i] === '}'){ \n\t\t\t (open[open.length - 1] === '{' && open.length > 0) ? \n\t\t\t\t open.pop() : unbalanced = true;\n\t\t}\t\n\t\t\n\t}\n\n\tif(open.length === 0 && !unbalanced){\n\t\treturn true;\n\t}\n\t\n\treturn false;\n}", "function isInBrackets (text) {\n return text.charAt(0) === '[' && text.charAt(text.length - 1) === ']'\n}", "function validBraces(braces) {\n\tlet re = /\\(\\)|\\{\\}|\\[\\]/;\n\treturn re.test(braces) ? validBraces(braces.replace(re, '')) : '' === braces;\n}", "function checkBrackets(value){\n var isCorrect = true;\n var leftBrackets = 0;\n var rightBrackets = 0;\n var brackets = value.split(/[^()]/).filter(Boolean);\n for (var i = 0; i < brackets.length; i++) {\n var bracket = brackets[i];\n if (bracket == '(') {\n leftBrackets++;\n } else {\n rightBrackets++;\n }\n }\n if (brackets[0] == \")\") {\n isCorrect = false;\n }\n if (leftBrackets != rightBrackets) {\n isCorrect = false;\n }\n if (isCorrect) {\n return \"correct\";\n } else {\n return \"incorrect\";\n }\n}", "function indexInRegEx(idx, regExData) {\n // regExData - the output provided by parseRegEx;\n let mid, low = 0, high = regExData.length - 1;\n while (low <= high) {\n mid = Math.round((low + high) / 2);\n const a = regExData[mid];\n if (idx >= a.start) {\n if (idx <= a.end) {\n return true;\n }\n low = mid + 1;\n } else {\n high = mid - 1;\n }\n }\n return false;\n}", "function searchBackwards() {\n if (tokenizeInput[caretToToken] === \")\" || tokenizeInput[caretToToken] === \"]\") {\n var bracketIndex =0;\n var diff = 0;\n for (var i=caretToToken-1; i>=0; --i) {\n if (tokenizeInput[i] === \")\" || tokenizeInput[i] === \"]\")\n diff++;\n else if (tokenizeInput[i] === \"(\" || tokenizeInput[i] === \"[\")\n diff--;\n if (diff<0) {\n bracketIndex=i;\n i=-1; //exit loop\n }\n }\n return bracketIndex;\n } else {\n return caretToToken;\n }\n }", "function bracketMatching(config = {}) {\n return [bracketMatchingConfig.of(config), bracketMatchingUnique];\n}", "function balancedBrackets(string) {\n // string of all of opening brackets, check if char is opening bracket\n const openingBrackets = '([{'\n // string of all closing brackets \n const closingBrackets = ')]}'\n // hash table that maps all closing brackets to all opening brackets \n const matchingBrackets = {')': '(', ']': '[', '}': '{'}\n // stack is empty array \n const stack = []\n for (const char of string) {\n if (openingBrackets.includes(char)) {\n stack.push(char)\n } else if (closingBrackets.includes(char)) {\n if (stack.length == 0) {\n // no possible opening brackets to match \n return false\n }\n // if last value of stack is matching then we pop it\n if (stack[stack.length - 1] === matchingBrackets[char]) {\n stack.pop()\n } else {\n // otherwis it's not a matching bracket and we return false \n return false\n }\n }\n }\n // if the stack is empty we are good, if not the string is unbalanced \n return stack.length === 0 \n}", "function isRBrac(currToken){\n \tif(currToken.search(T_RBrac) != -1){\n \t\tvar tokenid = new newToken(currToken, \"Right Bracket\", currLineNum);\n \t\ttokenHole.push(tokenid.desc, tokenid.type, tokenid.currLineNum);\n\t\ttokenParse.push([tokenid.desc, tokenid.type, tokenid.currLineNum]);\n \t\tconsole.log(\"Found Token: \" + tokenHole[1] + \" \" + tokenHole[0]);\n\t\tdocument.getElementById(\"outputText\").value += \"Lexer: \" + tokenHole[1] + \" --> \" + tokenHole[0] + \"\\n\";\n\t\tamIToken = true;\n\t\ttokenHole = [];\n\t}\n\t\telse{\n\n\t\t}\n}//ends function", "function validBraces(braces) {\n\twhile (/\\(\\)|\\{\\}|\\[\\]/.test(braces)) {\n\t\tbraces = braces.replace(/\\(\\)|\\{\\}|\\[\\]/, '');\n\t}\n\treturn braces.length > 0 ? false : true;\n}", "function balancedBrackets(string) {\n const openingBrackets = '([{';\n const closingBrackets = ')]}';\n const matchingBrackets = {')': '(', ']': '[', '}': '{'};\n const stack = [];\n for (const char of string) {\n if (openingBrackets.includes(char)) {\n stack.push(char);\n } else if (closingBrackets.includes(char)) {\n if (stack.length == 0) {\n return false;\n }\n if (stack[stack.length - 1] === matchingBrackets[char]) {\n stack.pop();\n } else {\n return false;\n }\n }\n }\n return stack.length === 0;\n}", "function findEndpoint(tex, currentIndex) {\n var bracketDepth = 0;\n\n for (var i = currentIndex, len = tex.length; i < len; i++) {\n var c = tex[i];\n\n if (c === \"{\") {\n bracketDepth++;\n } else if (c === \"}\") {\n bracketDepth--;\n }\n\n if (bracketDepth < 0) {\n return i;\n }\n } // If we never see unbalanced curly brackets, default to the\n // entire string\n\n\n return tex.length;\n}", "checkOpenBrace (attempt = false) {\n const token = this.getToken();\n if(this.lexerClass.OPEN_BRACE !== token.type){\n if (!attempt) {\n throw SyntaxErrorFactory.token_missing_one('[', token);\n } else {\n return false;\n }\n }\n return true;\n }", "IsInComment (ss, nn)\r\n { let ii=-1, bb=0;\r\n do { ii=ss.indexOf(\"{\",ii+1); bb++; }\r\n while ((ii>=0)&&(ii<nn));\r\n ii=-1;\r\n do { ii=ss.indexOf(\"}\",ii+1); bb--; }\r\n while ((ii>=0)&&(ii<nn));\r\n return(bb);\r\n }", "function matchCond() {\n\t\tvar pattern = /^(while|if)/;\n\t\tvar x = lexString.match(pattern);\n\t\tif(x !== null){\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "function balancedParens(input) {\n var parentheses = \"[]{}()\",\n array = [];\n var character; \n var bracePosition;\n\n for(var i = 0; character = input[i]; i++) {\n bracePosition = parentheses.indexOf(character);\n\n if(bracePosition === -1) {\n continue;\n }\n\n if(bracePosition % 2 === 0) {\n array.push(bracePosition + 1); \n } else {\n if(array.length === 0 || array.pop() !== bracePosition) {\n return false;\n }\n }\n }\n\n return array.length === 0;\n}", "function matchSymbol() {\n\t\tvar pattern = /^[{}\\(\\)]/;\n\t\tvar x = lexString.match(pattern);\n\t\tif(x !== null) {\n\t\t\treturn true;\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "function validBraces(braces) {\n\tlet pattern = /\\[\\]|\\(\\)|\\{\\}/;\n\twhile (pattern.test(braces)) {\n\t\tbraces = braces.replace(pattern, '');\n\t}\n\tif (braces === '') {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "function testIfElseIndentationNoBraces(v)\n{\n /**\n * comment\n */\n if (v.isNull() == true) return fun(v);\n\n if (v.isNull() == true)\n return false;\n\n if (v.isNull() == true)\n return false;\n else\n {\n if (v.endsWith(\"(\"))\n return false;\n else if (v.endsWith(\")\"))\n return true;\n else if (v.endsWith(\"\\\"\"))\n return true;\n else if (v.endsWith(\"\\\\\"))\n return true;\n else if (v.endsWith('('))\n return false;\n else if (v.endsWith(')'))\n return true;\n else if (v.endsWith('\\''))\n return true;\n else if (v.endsWith('\\\\'))\n return true;\n else\n return false;\n\n if (v.endsWith(\"baz\"))\n return false;\n return true;\n }\n}", "function checkForEnd(element){ \n\tif((element.match(/\\{/) === null) && (element.match(/[(]/) === null)){\n\t\treturn true;\n\t}\n}", "function peek(tok) {\n if (typeof(tok) === 'string') {\n return input.charAt(i) === tok;\n } else {\n return !!tok.test(chunks[j]);\n }\n }", "function getBounds(substr,flag){\n if(flag == undefined)flag = 0;\n console.log(\"getBounds\");\n if(substr.charAt(i) != \"^\" && substr.charAt(i) != \"_\"){\n //this means there are no bounds to detect. return blank stuff\n //just here to allow for speed improvements\n console.log(\" no bounds detected\");\n return([\"\",\"\",0]); \n }\n\n //i can remove one of these once i decide on a convention instituted by mathwquill\n //i should probably keep both around because some books or external clients might have different conventions\n\n var upper = \"\";\n var lower = \"\";\n var i = 0;\n\n //get the upper bound if it leads\n if(substr.charAt(i) == \"^\"){\n console.log(\" starting with upper\");\n i++;\n if(substr.charAt(i) == \"{\"){\n inner = matchParen(substr.substring(i),\"{\",flag);\n console.log(\" upper bound inner latex: \"+inner[0]);\n upper = inner[0];\n i+= inner[1];\n }\n else{\n upper = substr.charAt(i);\n i++;\n }\n //the lower bound is assumed to follow\n console.log(\" looking for lower bound in substr: \"+substr.substring(i));\n if(substr.charAt(i) == \"_\"){\n console.log(\" found lower bound\");\n i++;\n if(substr.charAt(i) == \"{\"){\n inner = matchParen(substr.substring(i),\"{\",flag);\n console.log(\" lower bound inner latex: \"+inner[0]);\n lower = inner[0];\n i+= inner[1];\n }\n else{\n console.log(\" lower bound inner latex: \"+substr.charAt(i));\n lower = substr.charAt(i);\n i++;\n }\n }\n\n }\n //get the lower bound if it leads\n else if(substr.charAt(i) == \"_\"){\n console.log(\" starting with lower\");\n i++;\n if(substr.charAt(i) == \"{\"){\n inner = matchParen(substr.substring(i),\"{\",flag);\n console.log(\" lower bound inner latex: \"+inner[0]);\n lower = inner[0];\n i+= inner[1];\n }\n else{\n console.log(\" lower bound inner latex: \"+substr.charAt(i));\n lower = substr.charAt(i);\n i++;\n }\n //then get the upper bound is assumed to follow\n console.log(\" looking for upper bound\");\n if(substr.charAt(i) == \"^\"){\n console.log(\" upper bound found\");\n i++;\n if(substr.charAt(i) == \"{\"){\n inner = matchParen(substr.substring(i),\"{\",flag);\n console.log(\" upper bound inner latex: \"+inner[0]);\n upper = inner[0];\n i+= inner[1];\n }\n else{\n console.log(\"upper bound inner latex: \"+substr.charAt(i));\n upper = substr.charAt(i);\n i++;\n }\n }\n }\n return([upper,lower,i]);\n}", "function validParen(string) {\n\n let openCount = 0;\n let closeCount = 0;\n\n if (string.length === 0) return true;\n\n for (let idx = 0; idx < string.length; idx++) {\n \n if (closeCount > openCount) return false\n\n if (string[idx] === \"(\") {\n openCount++\n }\n else if (string[idx] === \")\") {\n rightCount++\n }\n }\n \n if (closeCount === openCount) return true\n\n}", "function regex (temp) {\n try {\n temp = RegExp.apply(null, entt(temp, true).match(rREGEX).slice(1));\n return (rBLANK !== temp.toString() ? temp : false);\n } catch (err) {\n return false;\n }\n }", "function bracketLevel(bia, bracketPoss){\n // bia[3] = the opening brackets position in the text\n // bia[4] = the closing brackets position in the text\n // bia[5] = the opening/closing brackets position in the bracketPoss array\n // for each entry to the left of this that has an ending bracket which ends to the right of bia[5],\n // add 1 to the bracket level.\n bLevel = 0;\n\n for(var i = bia[5]; i >= 0; i--){\n if(bracketPoss[i][0] <= bia[3] && bracketPoss[i][1] >= bia[4]){\n bLevel++;\n }\n }\n\n return bLevel;\n}", "function getLengthBtwnBrackets(startIndex, openB, closeB) {\n var endIndex = indexOf2nd(startIndex, openB, closeB);\n if (endIndex === -1) synthaxError = true;\n return endIndex - startIndex;\n }", "jumpToMatching(select, expand) {\n var cursor = this.getCursorPosition();\n var iterator = new TokenIterator(this.session, cursor.row, cursor.column);\n var prevToken = iterator.getCurrentToken();\n var tokenCount = 0;\n if (prevToken && prevToken.type.indexOf('tag-name') !== -1) {\n prevToken = iterator.stepBackward();\n }\n var token = prevToken || iterator.stepForward();\n\n if (!token) return;\n\n //get next closing tag or bracket\n var matchType;\n var found = false;\n var depth = {};\n var i = cursor.column - token.start;\n var bracketType;\n var brackets = {\n \")\": \"(\",\n \"(\": \"(\",\n \"]\": \"[\",\n \"[\": \"[\",\n \"{\": \"{\",\n \"}\": \"{\"\n };\n\n do {\n if (token.value.match(/[{}()\\[\\]]/g)) {\n for (; i < token.value.length && !found; i++) {\n if (!brackets[token.value[i]]) {\n continue;\n }\n\n bracketType = brackets[token.value[i]] + '.' + token.type.replace(\"rparen\", \"lparen\");\n\n if (isNaN(depth[bracketType])) {\n depth[bracketType] = 0;\n }\n\n switch (token.value[i]) {\n case '(':\n case '[':\n case '{':\n depth[bracketType]++;\n break;\n case ')':\n case ']':\n case '}':\n depth[bracketType]--;\n\n if (depth[bracketType] === -1) {\n matchType = 'bracket';\n found = true;\n }\n break;\n }\n }\n }\n else if (token.type.indexOf('tag-name') !== -1) {\n if (isNaN(depth[token.value])) {\n depth[token.value] = 0;\n }\n\n if (prevToken.value === '<' && tokenCount > 1) {\n depth[token.value]++;\n }\n else if (prevToken.value === '</') {\n depth[token.value]--;\n }\n\n if (depth[token.value] === -1) {\n matchType = 'tag';\n found = true;\n }\n }\n\n if (!found) {\n prevToken = token;\n tokenCount++;\n token = iterator.stepForward();\n i = 0;\n }\n } while (token && !found);\n\n //no match found\n if (!matchType) return;\n\n var range, pos;\n if (matchType === 'bracket') {\n range = this.session.getBracketRange(cursor);\n if (!range) {\n range = new Range(iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn() + i - 1,\n iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn() + i - 1\n );\n pos = range.start;\n if (expand || pos.row === cursor.row && Math.abs(pos.column - cursor.column)\n < 2) range = this.session.getBracketRange(pos);\n }\n }\n else if (matchType === 'tag') {\n if (!token || token.type.indexOf('tag-name') === -1) return;\n range = new Range(iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn() - 2,\n iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn() - 2\n );\n\n //find matching tag\n if (range.compare(cursor.row, cursor.column) === 0) {\n var tagsRanges = this.session.getMatchingTags(cursor);\n if (tagsRanges) {\n if (tagsRanges.openTag.contains(cursor.row, cursor.column)) {\n range = tagsRanges.closeTag;\n pos = range.start;\n }\n else {\n range = tagsRanges.openTag;\n if (tagsRanges.closeTag.start.row === cursor.row && tagsRanges.closeTag.start.column\n === cursor.column) pos = range.end; else pos = range.start;\n }\n }\n }\n\n //we found it\n pos = pos || range.start;\n }\n\n pos = range && range.cursor || pos;\n if (pos) {\n if (select) {\n if (range && expand) {\n this.selection.setRange(range);\n }\n else if (range && range.isEqual(this.getSelectionRange())) {\n this.clearSelection();\n }\n else {\n this.selection.selectTo(pos.row, pos.column);\n }\n }\n else {\n this.selection.moveTo(pos.row, pos.column);\n }\n }\n }", "function readRegexp() {\n var content = \"\", escaped, inClass, start = tokPos;\n for (; ;) {\n if (tokPos >= inputLen) raise(start, \"Unterminated regular expression\");\n var ch = input.charAt(tokPos);\n if (newline.test(ch)) raise(start, \"Unterminated regular expression\");\n if (!escaped) {\n if (ch === \"[\") inClass = true;\n else if (ch === \"]\" && inClass) inClass = false;\n else if (ch === \"/\" && !inClass) break;\n escaped = ch === \"\\\\\";\n } else escaped = false;\n ++tokPos;\n }\n var content = input.slice(start, tokPos);\n ++tokPos;\n // Need to use `readWord1` because '\\uXXXX' sequences are allowed\n // here (don't ask).\n var mods = readWord1();\n if (mods && !/^[gmsiy]*$/.test(mods)) raise(start, \"Invalid regexp flag\");\n return finishToken(_regexp, new RegExp(content, mods));\n }", "isTag(tag, lineMatchIndex, line) {\n let prevChar = line.charAt(lineMatchIndex - 1)\n let nextChar = line.charAt(lineMatchIndex + tag.length)\n\n if ((nextChar == ':' || nextChar == ']' || (this._config._whitespaceTagging && (nextChar == ' ' || nextChar == \"\\t\"))) && (prevChar !== '_')) {\n return true\n } else {\n return false\n }\n }", "function isOperatorValid(Look) {\n try {\n if (isBasicOperator(Look[0]) || isBasicOperator(Look[Look.length-2])) throw \"Operator can not be at the beginning or at the last\";\n var OperatorSub = new Array();\n for (var i = 0; i < Look.length; i++) {\n if (isBasicOperator(Look[i])) {\n OperatorSub.push(i);\n }\n }\n for (var j = 0; j < OperatorSub.length; j++) {\n if (j > 0) {\n if (OperatorSub[j] - OperatorSub[j-1] == 1) throw \"Operator can not be close to each other\";\n }\n }\n for (i = 0; i < Look.length; i++) {\n if ((Look[i] == \"(\" && isBasicOperator(Look[i+1]))) {\n throw \"Operator are wrong with Bracket\";\n }\n if (i > 0) {\n if ((Look[i] == \")\" && isBasicOperator(Look[i-1]))||(Look[i] == \")\" &&Look[i+1] == \".\")) {\n throw \"Operator are wrong with Bracket\";\n }\n if (Look[i] == \"(\" && Look[i-1] == \".\") {\n throw \"Operator error with dot\";\n }\n }\n }\n return true;\n }\n catch(Error) {\n alert(Error);\n ClearAll();\n }\n}", "function matchBrackets(state, pos, dir, config = {}) {\n let maxScanDistance = config.maxScanDistance || DefaultScanDist, brackets = config.brackets || DefaultBrackets;\n let tree = syntaxTree(state), node = tree.resolveInner(pos, dir);\n for (let cur = node; cur; cur = cur.parent) {\n let matches = matchingNodes(cur.type, dir, brackets);\n if (matches && cur.from < cur.to) {\n let handle = findHandle(cur);\n if (handle && (dir > 0 ? pos >= handle.from && pos < handle.to : pos > handle.from && pos <= handle.to))\n return matchMarkedBrackets(state, pos, dir, cur, handle, matches, brackets);\n }\n }\n return matchPlainBrackets(state, pos, dir, tree, node.type, maxScanDistance, brackets);\n}", "looksObjectish(j) {\r\n\t\t\t\t\tvar end, index;\r\n\t\t\t\t\tif (this.indexOfTag(j, '@', null, ':') !== -1 || this.indexOfTag(j, null, ':') !== -1) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tindex = this.indexOfTag(j, EXPRESSION_START);\r\n\t\t\t\t\tif (index !== -1) {\r\n\t\t\t\t\t\tend = null;\r\n\t\t\t\t\t\tthis.detectEnd(index + 1, (function(token) {\r\n\t\t\t\t\t\t\tvar ref;\r\n\t\t\t\t\t\t\treturn ref = token[0], indexOf.call(EXPRESSION_END, ref) >= 0;\r\n\t\t\t\t\t\t}), (function(token, i) {\r\n\t\t\t\t\t\t\treturn end = i;\r\n\t\t\t\t\t\t}));\r\n\t\t\t\t\t\tif (this.tag(end + 1) === ':') {\r\n\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}", "function validBraces(braces) {\n\twhile (/\\(\\)|\\[\\]|\\{\\}/g.test(braces)) {\n\t\tbraces = braces.replace(/\\(\\)|\\[\\]|\\{\\}/g, '');\n\t}\n\treturn !braces.length;\n}", "function main() {\n var t = parseInt(readLine());\n for(var a0 = 0; a0 < t; a0++){\n var expression = readLine();\n var ex = expression.split('');\n var memo = [];\n var len = ex.length;\n for(var i = 0; i < len; i++) {\n var found = false;\n if(ex[i] === '(' || ex[i] === '{' || ex[i] === '[') {\n memo.push(ex[i]);\n } else {\n var last = memo.pop();\n if((ex[i] === ')' && last !== '(') \n || (ex[i] === '}' && last !== '{') \n || (ex[i] === ']' && last !== '[')) {\n found = true;\n break;\n }\n }\n }\n if(!found && memo.length === 0) {\n console.log('YES');\n } else {\n console.log('NO');\n }\n }\n\n}", "function pushQBlock(_pos, _lastIndex, slash) { //eslint-disable-line\n if (slash) {\n _lastIndex = skipRegex(str, _pos)\n }\n // do not save empty strings or non-regex slashes\n if (tmpl && _lastIndex > _pos + 2) {\n mark = '\\u2057' + qblocks.length + '~'\n qblocks.push(str.slice(_pos, _lastIndex))\n prevStr += str.slice(start, _pos) + mark\n start = _lastIndex\n }\n return _lastIndex\n }", "static match_here(regexp, text) {\n var cur, next;\n [cur, next] = [regexp[0], regexp[1]];\n if (regexp.length === 0) {\n return true;\n }\n if (next === '*') {\n return Util.match_star(cur, regexp.slice(2), text);\n }\n if (cur === '$' && !next) {\n return text.length === 0;\n }\n if (text && (cur === '.' || cur === text[0])) {\n return Util.match_here(regexp.slice(1), text.slice(1));\n }\n return false;\n }", "function isAbbreviationValid(syntax, abbreviation) {\n if (!abbreviation) {\n return false;\n }\n if (isStyleSheet(syntax)) {\n // Fix for https://github.com/Microsoft/vscode/issues/1623 in new emmet\n if (abbreviation.endsWith(':')) {\n return false;\n }\n return cssAbbreviationRegex.test(abbreviation);\n }\n if (abbreviation.startsWith('!')) {\n return !/[^!]/.test(abbreviation);\n }\n // Its common for users to type (sometextinsidebrackets), this should not be treated as an abbreviation\n if (/^[a-z,A-Z,\\d,-,:,\\(,\\),\\.,\\$]*$/.test(abbreviation) && /\\(/.test(abbreviation) && /\\)/.test(abbreviation)) {\n return false;\n }\n return (htmlAbbreviationStartRegex.test(abbreviation) && htmlAbbreviationRegex.test(abbreviation));\n}", "function parensValid(input){\n let closing = 0;\n let opening = 0;\n\n for (let i = 0; i < input.length; i++) {\n const ele = input[i];\n if (closing > opening) {\n return false\n }\n if (ele === '(') {\n opening++\n }\n else if (ele === ')') {\n closing++\n }\n }\n\n return closing === opening\n}", "function bracketedAligned(context) {\n let tree = context.node;\n let openToken = tree.childAfter(tree.from), last = tree.lastChild;\n if (!openToken)\n return null;\n let sim = context.options.simulateBreak;\n let openLine = context.state.doc.lineAt(openToken.from);\n let lineEnd = sim == null || sim <= openLine.from ? openLine.to : Math.min(openLine.to, sim);\n for (let pos = openToken.to;;) {\n let next = tree.childAfter(pos);\n if (!next || next == last)\n return null;\n if (!next.type.isSkipped)\n return next.from < lineEnd ? openToken : null;\n pos = next.to;\n }\n}", "static match_here(regexp, text) {\n var cur, next;\n cur = \"\";\n next = \"\";\n [cur, next] = [regexp[0], regexp[1]];\n if (regexp.length === 0) {\n return true;\n }\n if (next === '*') {\n return Util.match_star(cur, regexp.slice(2), text);\n }\n if (cur === '$' && !next) {\n return text.length === 0;\n }\n if (text && (cur === '.' || cur === text[0])) {\n return Util.match_here(regexp.slice(1), text.slice(1));\n }\n return false;\n }", "function checkString(str){\n let bracketStack = [];\n let bracketDict = {\n '{':'}',\n '[':']',\n '(':')',\n }\n \n function closesLastBracket(current){\n if(bracketStack.length === 0) return false;\n\n let expectedLast = bracketDict[bracketStack[bracketStack.length - 1]];\n return expectedLast === current;\n }\n \n let valid = true;\n for(let i = 0; i < str.length; i++){\n switch(str[i]){\n case '{':\n case '[':\n case '(':\n bracketStack.push(str[i]);\n break;\n case '}':\n case ']':\n case ')':\n if(!closesLastBracket(str[i]))\n valid = false;\n else\n bracketStack.pop();\n break;\n }\n }\n \n if(bracketStack.length > 0) valid = false;\n\n return valid;\n}", "function findEndIf(txt) {\r\n let re = /{{IF ([\\s\\S]*?)}}|{{ENDIF}}|{{ELSE}}/;\r\n let depth = 0, loc = 0, cap = null, ifCondition = null;\r\n let ifBlock = [], elseBlock = [];\r\n if (debug) console.log(`findEndIf(${txt})`);\r\n\r\n while(loc < txt.length) {\r\n cap = re.exec(txt.slice(loc));\r\n\r\n if (cap) {\r\n loc += cap.index + cap[0].length;\r\n if (debug) console.log(`Captured text: \"${cap[0]}\"; Location to ${loc}.`);\r\n } else {\r\n if (debug) console.log('Nothing captured...');\r\n }\r\n \r\n if (cap && cap[0].startsWith('{{IF')) {\r\n depth += 1;\r\n if (depth == 1) {\r\n ifBlock.push(loc);\r\n ifCondition = cap[1];\r\n }\r\n\r\n } else if (cap && cap[0] === '{{ENDIF}}') {\r\n depth -= 1;\r\n if (depth === 0) {\r\n (elseBlock.length == 0 ? ifBlock : elseBlock).push(loc - cap[0].length);\r\n return [\r\n ifCondition,\r\n txt.slice(ifBlock[0], ifBlock[1]),\r\n elseBlock.length == 0 ? '\"\"' : txt.slice(elseBlock[0],elseBlock[1]),\r\n loc\r\n ]\r\n }\r\n\r\n } else if (cap && cap[0] === '{{ELSE}}' && depth === 1) {\r\n ifBlock.push(loc - cap[0].length);\r\n elseBlock.push(loc);\r\n\r\n } else {\r\n throw new Error('Failed to find matching {{ENDIF}}')\r\n }\r\n\r\n if (debug) console.log(`Depth = ${depth}`);\r\n\r\n }\r\n throw new Error('Failed to find matching {{ENDIF}}')\r\n }", "_stateCdataSectionBracket(cp) {\n if (cp === CODE_POINTS.RIGHT_SQUARE_BRACKET) {\n this.state = State.CDATA_SECTION_END;\n }\n else {\n this._emitChars(']');\n this.state = State.CDATA_SECTION;\n this._stateCdataSection(cp);\n }\n }", "function validParentheses(parens) {\n\n let length = parens.length;\n let position = 0;\n\n //grab the first and last element of the string \n //if they are a pair \"()\" or \")(\", then get the next elements from the beginning and end by incrementing the position counter\n while (parens[position] + parens[length - 1 - position] === '()' || parens[position] + parens[length - 1 - position] === ')(') {\n position++;\n }\n\n //if we checked all positions then we always found pairs\n if (position === length) {\n return true;\n } else {\n return false;\n }\n}", "[CDATA_SECTION_BRACKET_STATE](cp) {\n if (cp === $.RIGHT_SQUARE_BRACKET) {\n this.state = CDATA_SECTION_END_STATE;\n } else {\n this._emitChars(']');\n this._reconsumeInState(CDATA_SECTION_STATE);\n }\n }", "[CDATA_SECTION_BRACKET_STATE](cp) {\n if (cp === $.RIGHT_SQUARE_BRACKET) {\n this.state = CDATA_SECTION_END_STATE;\n } else {\n this._emitChars(']');\n this._reconsumeInState(CDATA_SECTION_STATE);\n }\n }", "[CDATA_SECTION_BRACKET_STATE](cp) {\n if (cp === $.RIGHT_SQUARE_BRACKET) {\n this.state = CDATA_SECTION_END_STATE;\n } else {\n this._emitChars(']');\n this._reconsumeInState(CDATA_SECTION_STATE);\n }\n }", "[CDATA_SECTION_BRACKET_STATE](cp) {\n if (cp === $$5.RIGHT_SQUARE_BRACKET) {\n this.state = CDATA_SECTION_END_STATE;\n } else {\n this._emitChars(']');\n this._reconsumeInState(CDATA_SECTION_STATE);\n }\n }", "function checkBasicInput(objectBracketString, inputValue) {\n\n const inputObj = regrexObj[objectBracketString];\n\n if(regrexObj.emptyString.test(inputValue)) {\n\n $(inputObj.selector).text(inputObj.emptyStringText);\n\n } else if(!inputObj.regrex.test(inputValue)) {\n\n $(inputObj.selector).text(inputObj.invalidRegrex);\n\n } else {\n\n $(inputObj.selector).empty();\n\n return true;\n }\n return false;\n}", "function validParentheses(parens){\n let stack = 0;\n for (let char of parens.split(\"\")) {\n if (char === \")\" && stack === 0) {return false;}\n else if (char === \")\") {stack--;}\n else {stack++;}\n }\n return stack === 0;\n}", "function balancedBrackets(str) {\n let stack = [];\n for (let char of str) {\n if (char == \"(\") {\n stack.push(char);\n } else if (char == \")\") {\n if (stack.length == 0) {\n return false;\n }\n stack.pop();\n }\n }\n return stack.length == 0;\n}", "function isMatch(splitQuery, grammar_entry) {\n if (splitQuery.length == 0) {\n return true;\n }\n else {\n let firstEl = splitQuery[0];\n let rest = splitQuery.slice(1);\n\n let grammar_point = grammar_entry.grammar_point;\n let grammar_alt_def = grammar_entry.alt_def;\n let grammar_meaning = grammar_entry.meaning;\n\n if (polyIncluded(firstEl, grammar_point, grammar_alt_def, grammar_meaning)) {\n return true && isMatch(rest, grammar_entry)\n }\n else {\n return false && isMatch(rest, grammar_entry)\n }\n }\n}", "consumeComment(token) {\n const comment = token.data[0];\n for (const conditional of parseConditionalComment(comment, token.location)) {\n this.trigger(\"conditional\", {\n condition: conditional.expression,\n location: conditional.location,\n });\n }\n }", "function tokenizeOpenedParenthesis(state) {\n var nextSymbolCode = state.css.charCodeAt(state.pos + 1);\n var tokensCount = state.tokens.length;\n var prevTokenCssPart = tokensCount ? state.tokens[tokensCount - 1][1] : '';\n\n if (prevTokenCssPart === 'url' && nextSymbolCode !== _globals.singleQuote && nextSymbolCode !== _globals.doubleQuote && nextSymbolCode !== _globals.space && nextSymbolCode !== _globals.newline && nextSymbolCode !== _globals.tab && nextSymbolCode !== _globals.feed && nextSymbolCode !== _globals.carriageReturn) {\n state.nextPos = state.pos;\n\n do {\n state.escaped = false;\n state.nextPos = state.css.indexOf(')', state.nextPos + 1);\n\n if (state.nextPos === -1) {\n (0, _unclosed2.default)(state, 'bracket');\n }\n\n state.escapePos = state.nextPos;\n\n while (state.css.charCodeAt(state.escapePos - 1) === _globals.backslash) {\n state.escapePos -= 1;\n state.escaped = !state.escaped;\n }\n } while (state.escaped);\n\n state.tokens.push(['brackets', state.css.slice(state.pos, state.nextPos + 1), state.line, state.pos - state.offset, state.line, state.nextPos - state.offset]);\n state.pos = state.nextPos;\n } else {\n state.nextPos = findClosedParenthesisPosition(state.css, state.length, state.pos);\n state.cssPart = state.css.slice(state.pos, state.nextPos + 1);\n\n var foundParam = state.cssPart.indexOf('@') >= 0;\n var foundString = /['\"]/.test(state.cssPart);\n\n if (state.cssPart.length === 0 || state.cssPart === '...' || foundParam && !foundString) {\n // we're dealing with a mixin param block\n if (state.nextPos === -1) {\n (0, _unclosed2.default)(state, 'bracket');\n }\n\n state.tokens.push([state.symbol, state.symbol, state.line, state.pos - state.offset]);\n } else {\n var badBracket = _globals.badBracketPattern.test(state.cssPart);\n\n if (state.nextPos === -1 || badBracket) {\n state.tokens.push([state.symbol, state.symbol, state.line, state.pos - state.offset]);\n } else {\n state.tokens.push(['brackets', state.cssPart, state.line, state.pos - state.offset, state.line, state.nextPos - state.offset]);\n state.pos = state.nextPos;\n }\n }\n }\n}", "function foundNestedPseudoClass() {\n var openParen = 0;\n for (var i = pos + 1; i < source_text.length; i++) {\n var ch = source_text.charAt(i);\n if (ch === \"{\") {\n return true;\n } else if (ch === '(') {\n // pseudoclasses can contain ()\n openParen += 1;\n } else if (ch === ')') {\n if (openParen === 0) {\n return false;\n }\n openParen -= 1;\n } else if (ch === \";\" || ch === \"}\") {\n return false;\n }\n }\n return false;\n }", "function matchPara(expression){\n const stack = new Stack;\n for (let i=0;i<expression.length;i++){\n if (expression[i] === '(' || expression[i] === '[' || expression[i] === '{'){\n stack.push(\n {\n data: expression[i],\n index: i\n }\n );\n }\n if (expression[i] === ')' || expression[i] === ']' || expression[i] === '}'){\n if (isEmpty(stack)){\n let character = '';\n if (expression[i] === ')'){\n character = '(';\n }else if (expression[i] === '}'){\n character = '{';\n }else if (expression[i] === ']'){\n character = '[';\n }\n return `missing a ${character} at ${i}`;\n }\n else{\n stack.pop();\n }\n }\n }\n if (!isEmpty(stack)){\n \n const node = stack.pop();\n let character = '';\n if (node.data === '('){\n character = ')';\n }else if (node.data === '{'){\n character = '}';\n }else if (node.data === '['){\n character = ']';\n }\n return `missing a ${character} at ${node.index}`;\n }\n return 'valid paraentheses';\n}", "function isInsideComment(sourceFile, token, position) {\n // The position has to be: 1. in the leading trivia (before token.getStart()), and 2. within a comment\n return position <= token.getStart(sourceFile) &&\n (isInsideCommentRange(ts.getTrailingCommentRanges(sourceFile.text, token.getFullStart())) ||\n isInsideCommentRange(ts.getLeadingCommentRanges(sourceFile.text, token.getFullStart())));\n function isInsideCommentRange(comments) {\n return ts.forEach(comments, function (comment) {\n // either we are 1. completely inside the comment, or 2. at the end of the comment\n if (comment.pos < position && position < comment.end) {\n return true;\n }\n else if (position === comment.end) {\n var text = sourceFile.text;\n var width = comment.end - comment.pos;\n // is single line comment or just /*\n if (width <= 2 || text.charCodeAt(comment.pos + 1) === 47 /* slash */) {\n return true;\n }\n else {\n // is unterminated multi-line comment\n return !(text.charCodeAt(comment.end - 1) === 47 /* slash */ &&\n text.charCodeAt(comment.end - 2) === 42 /* asterisk */);\n }\n }\n return false;\n });\n }\n }", "function matchParens(str, openParenIndex) {\n var stack = [];\n var esc = false;\n for (var i = openParenIndex || 0; i < str.length; i++) {\n var c = str[i];\n\n if (c === '\\\\') {\n if (!esc)\n esc = true;\n continue;\n } else if (c === '(' && !esc) {\n stack.push(1);\n } else if (c === ')' && !esc) {\n stack.pop();\n if (stack.length === 0)\n return i;\n }\n\n esc = false;\n }\n\n var ndx = str.length - 1;\n if (str.charAt(ndx) !== ')')\n throw new Error(str + ' has unbalanced parentheses');\n\n return ndx;\n}", "_grammarRegex() {\n if (this._peekTerm()) {\n let term = this._grammarTerm();\n if (this._acceptInput('|')) {\n if (this._peekRegex()) {\n return Nfa.buildUnion(term, this._grammarRegex());\n }\n } else {\n return term;\n }\n }\n\n throw new 'Exception placeholder';\n }", "function validBraces(str) {\n\tvar prev = '';\n\twhile (str.length != prev.length) {\n\t\tprev = str;\n\t\tstr = str.replace('()', '').replace('[]', '').replace('{}', '');\n\t}\n\treturn str.length === 0;\n}", "function valid_paranthesis(str) {\n\tconst stack = [];\n\tconst valid = {\n\t\t')': '(',\n\t\t']': '[',\n\t\t'}': '{',\n\t};\n\tfor (let i = 1; i < str.length; i++) {\n\t\tif ('({['.includes(str[i])) {\n\t\t\tstack.push(str[i]);\n\t\t} else if (valid[str[i]] == stack[stack.length - 1]) {\n\t\t\tstack.pop();\n\t\t}\n\t}\n\treturn stack.length == 0 ? true : false;\n}", "static balancedParenthesis(string) {\n const openParenthesesStack = new Stack();\n for (let letter of string) {\n if (letter === '(') {\n openParenthesesStack.push(letter);\n } else if (letter === ')') {\n // if there is a closing parantheses for no previous opening one return false\n if (openParenthesesStack.isEmpty()) return false;\n // if the stack isn't empty pop one of the opening parantheeses\n openParenthesesStack.pop();\n }\n }\n return openParenthesesStack.isEmpty();\n }", "function advanceSlash() {\n var regex, previous, check;\n\n function testKeyword(value) {\n return value && (value.length > 1) && (value[0] >= 'a') && (value[0] <= 'z');\n }\n\n previous = extra.tokenValues[extra.tokens.length - 1];\n regex = (previous !== null);\n\n switch (previous) {\n case 'this':\n case ']':\n regex = false;\n break;\n\n case ')':\n check = extra.tokenValues[extra.openParenToken - 1];\n regex = (check === 'if' || check === 'while' || check === 'for' || check === 'with');\n break;\n\n case '}':\n // Dividing a function by anything makes little sense,\n // but we have to check for that.\n regex = false;\n if (testKeyword(extra.tokenValues[extra.openCurlyToken - 3])) {\n // Anonymous function, e.g. function(){} /42\n check = extra.tokenValues[extra.openCurlyToken - 4];\n regex = check ? (FnExprTokens.indexOf(check) < 0) : false;\n } else if (testKeyword(extra.tokenValues[extra.openCurlyToken - 4])) {\n // Named function, e.g. function f(){} /42/\n check = extra.tokenValues[extra.openCurlyToken - 5];\n regex = check ? (FnExprTokens.indexOf(check) < 0) : true;\n }\n }\n\n return regex ? collectRegex() : scanPunctuator();\n }", "function parensValid(input) {\n var openParen = 0\n var closedParen = 0\n for (var i = 0; i < input.length; i++) {\n if (input[i] == ')' && openParen == 0) {\n return false;\n }\n else if (input[i] == '(') {\n openParen++\n }\n else if (input[i] == ')' && openParen > closedParen) {\n closedParen++\n }\n }\n if (openParen == closedParen) {\n return true;\n }\n return false;\n}", "function IsRegexMatched(thisObj, sPattern, sErrorMsg, bDisplayAsterisk, iTabID) {\n\n var c = (thisObj instanceof jQuery) ? thisObj : $('#' + thisObj);\n if (c.length == 0) return true;\n\n ResetError(c);\n\n var re = new RegExp(sPattern);\n if (!c.val().match(re)) {\n AddMsgInQueue(c, sErrorMsg, bDisplayAsterisk, iTabID);\n return false;\n }\n else {\n return true;\n }\n}", "function parensValid(string){\n // For this algorithm, we're going to use an array to keep track of our opening parentheses\n let check = [];\n\n // Now let's loop through the string we were given\n for(let i = 0; i < string.length; i++) {\n\n // We'll check if each character is an opening parentheses\n if(string[i] == \"(\") {\n // if it is, let's push it into our check array\n check.push(string[i]);\n }\n // Otherwise, let's check 2 things. 1) if the character is a closing parentheses and\n // 2) if the check array has any previously found open parentheses\n\n // If we have not found any open parentheses before, then a closing parentheses means \n // we have an invalid parentheses configuration\n else if (string[i] == \")\" && check.length == 0) {\n // And so, we exit out of everything and call it a day.\n return false;\n }\n // If we HAVE found an open parentheses before, than we have a valid open and close pair,\n // so we can remove the previous open parentheses from our check array.\n else if (string[i] == \")\" && check.length > 0 ) {\n check.pop();\n }\n }\n\n // If, after iterating through the entire string, we STILL have something in our check array, that means\n // we have open parentheses that were never closed!\n if(check.length > 0) {\n // So we say no!\n return false;\n }\n // If that check array is, in fact, empty, then we have a valid parentheses configuration\n else {\n // Hurray!\n return true;\n }\n}" ]
[ "0.6263195", "0.6263195", "0.62033737", "0.6127634", "0.61057466", "0.6090401", "0.60674477", "0.6061399", "0.5991664", "0.5839983", "0.58044076", "0.56190467", "0.54611206", "0.54331553", "0.5268002", "0.52239686", "0.50594854", "0.49665856", "0.49522534", "0.48941374", "0.4843926", "0.48380056", "0.48081872", "0.47892314", "0.47688043", "0.47383514", "0.4738257", "0.47189912", "0.46953532", "0.46746552", "0.46745804", "0.46520436", "0.46337482", "0.4632592", "0.46319452", "0.4611452", "0.46030623", "0.46002737", "0.45951793", "0.45923182", "0.45855585", "0.45406908", "0.45396933", "0.45132616", "0.45110512", "0.45072046", "0.44839153", "0.44607005", "0.44546792", "0.44441053", "0.44431943", "0.43873373", "0.4381059", "0.43806657", "0.43781194", "0.43757668", "0.43619815", "0.43601295", "0.43246236", "0.43245947", "0.43233722", "0.43064007", "0.43050125", "0.42855665", "0.42700893", "0.4267657", "0.42617172", "0.4257476", "0.4242229", "0.42355427", "0.42325538", "0.42305332", "0.42277277", "0.42174366", "0.41839042", "0.4166986", "0.41588113", "0.41576025", "0.41553727", "0.41553727", "0.41553727", "0.41490665", "0.4145071", "0.41450432", "0.41429123", "0.4142798", "0.41288847", "0.41256648", "0.40974796", "0.40925992", "0.40792054", "0.40645388", "0.40611094", "0.40502936", "0.4047311", "0.40465137", "0.40441644", "0.403722", "0.40362543", "0.40347677" ]
0.6583798
0
End of Express setup bits Get the soundcloud id from the soudncloud url I have already built a simple web service for this.
function getSoundcloudIDFromURL(url, callback) { var url = "https://api.soundcloud.com/resolve.json?client_id="+config.soundcloud.id+"&url="+url; request({url:url, json:true}, function (error, response, data) { if (!error && response.statusCode == 200) { callback(data.id); } }) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSoundcloudIDfromURL(url,callback) {\n\tvar url = \"https://api.soundcloud.com/resolve.json?client_id=\"+config.soundcloud.id+\"&url=\"+url;\n\trequest({url:url,json:true},function(error,response,data) {\n\t\tif(!error && response.statusCode == 200) {\n\t\t\tcallback(data.id);\n\t\t}\n\t})\n}", "function getSoundcloudInfos(url) {\n\tconst scurl = decodeURI(url.split(/value=\"/)[1].split(/[\"]/)[0]);\n\treturn {\n\t\turl: scurl,\n\t\tid: scurl.split(/tracks\\//)[1].split(/[&\"]/)[0]\n\t};\n}", "function soundCloudApiUrl(url, soundcloudApiKey) {\n\t\tvar useSandBox = false;\n\t\tvar domain = useSandBox ? 'sandbox-soundcloud.com' : 'soundcloud.com'\n\t\treturn (/api\\./.test(url) ? url + '?' : 'http://api.' + domain +'/resolve?url=' + url + '&') + 'format=json&consumer_key=' + soundcloudApiKey +'&callback=?';\n\t}", "function callSoundcloudAPI(input)\n\t{\n\t\tSC.initialize({\n\t\t\t\n\t\t\tclient_id: '03e4633e2d85874a921380e47cac705d'\n\n\t\t});\n\n\t\t// find all sounds of buskers licensed under 'creative commons share alike'\n\t\tSC.get('/tracks',\n\t\t{\n\t\t\t// Search for user query\n\t\t\tq: input\n\n\t\t}).then(function(tracks)\n\t\t{\n\t\t \t// Put needed data into an object\n\t\t\tloadDataToObject(tracks);\n\n\t\t\t// Display data from objects\n\t\t\tdisplayData();\n\n\t\t});\n\t}", "function callAPI(query) {\r\n\t$.get(\"https://api.soundcloud.com/tracks?client_id=b3179c0738764e846066975c2571aebb\",\r\n\t\t{'q': query,\r\n\t\t'limit': '200'},\r\n\t\tfunction(data) {\r\n\t\t\t// PUT IN YOUR CODE HERE TO PROCESS THE SOUNDCLOUD API'S RESPONSE OBJECT\r\n\t\t\t// HINT: CREATE A SEPARATE FUNCTION AND CALL IT HERE\r\n\t\t},'json'\r\n\t);\r\n}", "function fetchSoundcloudUrl (soundcloudUrl) {\n soundcloudUrl = `${soundcloudUrl}&client_id=${CLIENT_ID}&app_version=1553260698&app_locale=en`\n https.get(soundcloudUrl, (res) => {\n if (res.statusCode !== 200) {\n console.error(`Could not complete request to ${soundcloudUrl}`)\n finished += 1\n } else {\n res.setEncoding('utf8')\n let rawData = ''\n // Now read the response data until the end. Mostly copy-pasted from\n // https://nodejs.org/api/http.html#http_http_get_options_callback\n res.on('data', (chunk) => { rawData += chunk })\n res.on('end', () => {\n try {\n // Parse the JSON data to get the followers\n const parsedData = JSON.parse(rawData)\n const artistsFollowed = parsedData.collection\n const nextHref = parsedData.next_href\n // For each artist followed, get their page URL, then increment the\n // artist count by 1\n artistsFollowed.forEach((artist) => {\n const artistUrl = artist.permalink_url\n if (artistUrl in artistCounts) {\n artistCounts[artistUrl] += 1\n } else {\n artistCounts[artistUrl] = 1\n }\n })\n if (nextHref) {\n // Follow pagination link to the page of the collection\n fetchSoundcloudUrl(nextHref)\n } else {\n // If we have finished processing all accounts, log the results\n finished += 1\n if (finished === followerIds.size) {\n logResults()\n }\n }\n } catch (e) {\n finished += 1\n console.error(e.message)\n }\n })\n }\n })\n}", "function callAPI(query) {\r\n\t$.get(\"https://api.soundcloud.com/tracks?client_id=b3179c0738764e846066975c2571aebb\",\r\n\t\t{'q': query,\r\n\t\t'limit': '200'},\r\n\t\tfunction(data) {\r\n parseSearchResult(data);\r\n\t\t},'json'\r\n\t);\r\n}", "function spotifyAPI(){\n\tvar Spotify = require(\"node-spotify-api\");\n\n\tvar spotify = new Spotify(keys.spotify);\n\n\tif (argument){\n\t\tspotify.search({ \n\t\t\ttype: 'track', \n\t\t\tquery: argument \n\t\t}, function(error, data) {\n \t\t\tif (!error) {\n \t\t\t\tconsole.log(\"----------------\");\n \t\t\t\tconsole.log(\"Artist Name: \" + data.tracks.artists.name); \n \t\t\t\tconsole.log(\"Song Name: \" + data.tracks.name);\n \t\t\t\tconsole.log(\"Album Name: \" + data.tracks.album.name);\n \t\t\t\tconsole.log(\"Song Preview Link :\" + data.body.tracks.external_urls);\n \t\t}\n \t});\t\n\t}\n else {\n \tspotify.search({ \n\t\t\ttype: 'track', \n\t\t\tquery: 'The Sign' \n\t\t}, function(error, data) {\n \t\t\tif (!error) {\n \t\t\t\tconsole.log(\"----------------\");\n \t\t\t\tconsole.log(\"Artist Name: \" + data.tracks.artists.name); \n \t\t\t\tconsole.log(\"Song Name: \" + data.tracks.name);\n \t\t\t\tconsole.log(\"Album Name: \" + data.tracks.album.name);\n \t\t\t\tconsole.log(\"Song Preview Link :\" + data.body.tracks.external_urls);\n \t\t}\n \t});\t\t\n }\t\n}", "function getAudio(device_id) {\n $.ajax({\n url: \"https://api.spotify.com/v1/me/player/play?device_id=\" + device_id,\n type: \"PUT\",\n data: '{\"uris\": [\"spotify:track:' + track + '\"]}',\n beforeSend: function (xhr) {\n xhr.setRequestHeader('Authorization', 'Bearer ' + _token)\n },\n success: function (data) {\n /*console.log(data)*/\n }\n })\n }", "function createSoundcloudQuery(tags) {\n\n var out = \"http://api.soundcloud.com/search?q=\";\n for (var j = 0; j < tags.length && j < 2; j++) {\n out += tags[j]\n if (j !== tags.length - 1) {\n out += \"%20\";\n }\n }\n out += \"&client_id=a2b378fe2c15350323249b3ab162e4bf\";\n return out.replace(/ /g, \"%20\");\n}", "function SoundCloudResolver() {\n var resolverTemplate = 'http://api.soundcloud.com/resolve.json?client_id='+SC_CLIENT_ID+'&url=';\n \n this.resolve = function(url, callbackFn) {\n console.info(\"Resolving\", url);\n $loadButton.text('Loading');\n $.ajax({\n url : resolverTemplate + url\n , success : function(data, textStatus, jsXHR) {\n try {\n console.info(data);\n // show attribution \n $soundCloudArtist.attr('href', data.permalink_url);\n $soundCloudArtist.find('img').attr('src', data.artwork_url);\n $soundCloudArtist.addClass('active');\n $soundCloudAttribution.addClass('slide-left');\n // start the player \n callbackFn.call(callbackFn.this, data.stream_url + '?client_id='+SC_CLIENT_ID);\n } catch(ex) {\n alert(\"Unable to fetch sound cloud data :/\");\n console.error(ex);\n }\n }, error : function() {\n alert(\"Unable to fetch sound cloud data :/\");\n console.error(arguments);\n $loadButton.text('Load');\n }\n });\n };\n }", "function loadAudioFromSC(input) {\r\n SC.initialize({client_id: SC_CLIENT_ID});\r\n SC.get(\"https://api.soundcloud.com/resolve\", { url: input, client_id: SC_CLIENT_ID },\r\n function(sound) {\r\n scData = sound;\r\n audio.src = sound.stream_url + '?client_id=' + SC_CLIENT_ID;\n pausePlay.innerHTML = \"Pause\";\n });\r\n}", "function callAPI(query) {\r\n\t// function to create a loop that calls parseSoundCloudAPI\r\n\r\n\t// ————————————————————————\r\n\t// PERSONAL NOTES\r\n\t// $.get(URL,data,function(data,status,xhr),dataType)\r\n\t// URL= specifies URL you wish to request – https://api.soundcloud.com/tracks?client_id=b3179c0738764e846066975c2571aebb \r\n\t// data= specifies data to send to the server along w request – {'q': query, 'limit': '200'} – basic query with 200 limit response\r\n\t// function= function(data){ ... } – specifies a function to run if the request succeeds\r\n\t// dataType= specifies the data type expected of the server response, JSON returns a JS object\r\n\t// ————————————————————————\r\n\r\n\t$.get(\"https://api.soundcloud.com/tracks?client_id=b3179c0738764e846066975c2571aebb\",\r\n\t\t{'q': query,\r\n\t\t'limit': '200'},\r\n\t\t// this is the data returned\r\n\t\tfunction(data) {\r\n\t\t\t// PUT IN YOUR CODE HERE TO PROCESS THE SOUNDCLOUD API'S RESPONSE OBJECT\r\n\t\t\t// HINT: CREATE A SEPARATE FUNCTION AND CALL IT HERE\r\n\t\t\tconsole.log(data)\r\n\t\t\tsearch = data;\r\n\t\t\tfor (i=0; i < 20; i++) {\r\n\t\t\t\tparseSoundCloudAPI(data[i]);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tpopulatePage()\r\n\t\t},'json'\r\n\t);\r\n}", "function resolveURL(userTrackURL) {\n console.log(userTrackURL);\n var apiCall = new XMLHttpRequest();\n client_id1 = \"&client_id=\" + clientAPIKey;\n var apiResolve = \"https://api.soundcloud.com/resolve?url=\" + userTrackURL + client_id1;\n console.log(apiResolve);\n apiCall.open(\"GET\", apiResolve, true);\n apiCall.onload = function() {\n var response1 = JSON.parse(apiCall.responseText);\n var linkObj = function() {\n this.permLink = response1.permalink_url;\n this.apiLink = response1.uri;\n }\n var linkJSON = new linkObj();\n var linkString = JSON.stringify(linkJSON);\n chrome.runtime.sendMessage(linkString);\n $('#loaded').html(\"Loaded! Press play.\");\n }\n apiCall.send(); \n }", "function getUTUBEID(url) {\n\tid_start = url.indexOf('/v') + 3;\n\turl = url.slice(id_start);\n\tid_end = url.indexOf('&');\n\tif (id_end == -1) {\n\t\t// no query paramters\n\t} else {\n\t\turl = url.slice(0, id_end);\n\t}\n\treturn url;\n}", "function getUTUBEID(url) {\n\tid_start = url.indexOf('/v') + 3;\n\turl = url.slice(id_start);\n\tid_end = url.indexOf('&');\n\tif (id_end == -1) {\n\t\t// no query paramters\n\t} else {\n\t\turl = url.slice(0, id_end);\n\t}\n\treturn url;\n}", "function playNow (currentSet, url){\n\n\tvar track_url\n\n\t//if passing just the url, means there is already something playing \n\tif(url){\n\t\t\ttrack_url = url.soundcloudUrl\n\t\t}else{\n\t\t\t// We need to get the Track Id from soundcloud (do not mistake with Set ID on the set database) \n\t\t\ttrack_url = currentSet.lineup.soundcloudUrl;\n\t}\n\n\n\t$.get('http://api.soundcloud.com/resolve.json?url='+track_url+'&client_id=95761a6a9b70583b71e0f8436edc8db3', function (result) {\n\t\t \tconsole.log(\"THIS IS THE RESULT ---->\");\n\t\t \tconsole.log(result);\n\t\t \tvar track_id = result.id;\n\n\t\t\tSC.stream('/tracks/'+track_id, function(sound){\n\t\t\t\t// Save this sound element in a object or somewhere in the page. If the element exists, \n\t\t\t\t//stop it first, delete it, attach the coming element to the object and play the new one\n\t\t\t\t if (window.currentSong){\n\t\t\t\t \twindow.currentSong.pause();\n\t\t\t\t \twindow.currentSong = null;\n\t\t\t\t }\n\t\t\t\t window.currentSong = sound;\n\t\t\t\t\twindow.currentSong.play();\n\t\t\t\t\tconsole.log(\"Track playing-->\" + track_id);\n\n\n\t\t\t\t\t//Toggle play pause\n\t\t\t\t\t$('#pause-play').click(function(e) {\n\t\t\t e.preventDefault();\n\t\t\t window.currentSong.pause();\n\t\t\t $('#play-pause').show();\n \t\t\t\t$('#pause-play').hide();\n\t\t\t });\n\n\t\t\t $('#play-pause').click(function(e) {\n\t\t\t e.preventDefault();\n\t\t\t window.currentSong.play();\n\t\t\t $('#play-pause').hide();\n \t\t\t\t$('#pause-play').show();\n\t\t\t });\n\n\n\t\t\t});\n\t\t});\n\n\n}", "function play(device_id) {\n $.ajax({\n url: \"https://api.spotify.com/v1/play/device_id?\" + device_id,\n type: \"curl -X PUT https://api.spotify.com/v1/me/player/play?\",\n data: '{\"uris\": [\"spotify:track:2YpeDb67231RjR0MgVLzsG]}',\n beforeSend: function(xhr){xhr.setRequestHeader('Authorization', 'Bearer ' + _token );},\n success: function(data) { \n console.log(data)\n\n }\n });\n }", "function callAPI(query) {\n\t$.get(\"https://api.soundcloud.com/tracks?client_id=b3179c0738764e846066975c2571aebb\",\n\t\t{'q': query,\n\t\t'limit': '20'},\n\t\tfunction(data) {\n\n\t\t\tresetTable('searchBody')\n\t\t\t$.each(data, function(i, v) {\n\t\t\t\tvar artwork = '_css/artwork.jpg'\n\t\t\t\tif (v.artwork_url != null){\n\t\t\t\t\tartwork = v.artwork_url;\n\t\t\t\t} \n\t\t\t\tvar title = v.title;\n\t\t\t\tvar artist = v.artist;\n\t\t\t\tvar artist = v.user.username;\n\t\t\t\tvar url = v.permalink_url;\n\t\t\t\taddSong(artwork, title, url, artist);\n\t\t\t\t// console.log(data);\n\t\t\t});\n\t\t},'json'\n\t);\n}", "function mySpotify(functionParameters) {\n\tvar spotify = new Spotify({\n \t\tid: \"0888876dd4e746b69a275d3c58cd021c\",\n \t\tsecret: \"4afc6e98cbf6417996aa4beb038144c3\"\n});\n \tif(functionParameters < 1) {\n \t\tfunctionParameters = \"The Sign Ace of Base\";\n \t}\nspotify.search({ type: 'track', query: functionParameters }, function(err, data) {\n if (err) {\n \tconsole.log('Error occurred: ' + err);\n return;\n } else {\n \tvar songData = data.tracks.items[0];\n \tvar songResult = console.log(songData.artists[0].name)\n \t\tconsole.log(songData.name)\n \t\tconsole.log(songData.preview_url)\n \t\tconsole.log(songData.album.name)\n \t}\n \n// console.log(data); \n});\n}", "scTrack(url, props) {\n return scRequest(`/resolve?url=${url}`)\n .then(raw => {\n if (raw.kind === 'track' && raw.streamable) {\n return Item.fromApi(ITEM_TYPE.SOUNDCLOUD, merge(raw, props));\n }\n throw 'Soundcloud url is not streamable or isnt a track';\n });\n }", "function getSpotify(){\t\n\t\n\tvar params = {\n\t\ttype: 'track',\n\t\tquery: userInput,\n\t\tlimit: 1\n\t}\n\n// If no song is provided then your program will default to \"The Sign\" by Ace of Base\n\tif (userInput === undefined){\n\t\tparams.query = \"Ace of Base The Sign\";\n\t}\n\n\tspotify.search(params, function(error, data) {\n\t\tif (error) {\n\t \t\treturn console.log('Error occurred: ' + err);\n\t\t}\n\t \tvar track = data.tracks.items[0]\n\t\tconsole.log(\"Artist name(s): \" + track.artists[0].name); \n\t\tconsole.log(\"Song name: \" + track.name); \n\t\tconsole.log(\"Preview link: \" + track.preview_url); \n\t\tconsole.log(\"Album name: \" + track.album.name); \n\t});\n}", "function ddg_spice_guidebox_getid (api_result)\n{\n \"use strict\";\n\n if (!api_result.results) return;\n\n // Prevent jQuery from appending \"_={timestamp}\" in our url.\n $.ajaxSetup({\n cache: true\n });\n\n var script = $('[src*=\"/js/spice/guidebox/getid/\"]')[0],\n source = decodeURIComponent($(script).attr(\"src\")),\n matched = source.match(/\\/js\\/spice\\/guidebox\\/getid\\/([a-zA-Z0-9\\s]+)/),\n query = matched[1];\n\n var metadata = {};\n metadata.res_type = api_result.results.result[0].type;\n metadata.res_title = api_result.results.result[0].title;\n metadata.more = api_result.results.result[0].url;\n metadata.query = query;\n ddg_spice_guidebox_getid.metadata = metadata;\n\n\n if (metadata.res_type === \"series\"){\n ddg_spice_guidebox_getid.metadata.searched = api_result.results.result;\n $.getScript(\"/js/spice/guidebox/lastshows/\"+ api_result.results.result[0].type + \"/\" + api_result.results.result[0].id);\n }/* else {\n ddg_spice_guidebox_getid.render(api_result);\n }*/\n}", "function callAPI(query) {\r\n\tconsole.log('Calling API with query: ' + query);\r\n\t$.get(\"https://api.soundcloud.com/tracks?client_id=b3179c0738764e846066975c2571aebb\",\r\n\t\t {'q': query,\r\n\t\t 'limit': '20'},\r\n\t\t function(data) {\r\n\t\t// PUT IN YOUR CODE HERE TO PROCESS THE SOUNDCLOUD API'S RESPONSE OBJECT\r\n\t\t// HINT: CREATE A SEPARATE FUNCTION AND CALL IT HERE\r\n\t\tresetTable('search-table');\r\n\t\tfor (var i = 0; i < 20; i++) {\r\n\t\t\t$('#search-table > tbody').append(genTrackRow(data[i]));\r\n\t\t}\r\n\t\tif (data.length == 0) {\r\n\t\t\t$('#search-table-header').text('No Results found for: \"' + query + '\"');\r\n\t\t} else {\r\n\t\t\t$('#search-table-header').text('Search Results for: \"' + query + '\"');\r\n\t\t}\r\n\t},'json'\r\n\t\t );\r\n}", "function getId(callback) {\n $.ajax({\n type: 'GET',\n url: 'https://api.spotify.com/v1/me/',\n headers: {'Authorization': 'Bearer ' + access_token},\n success: function(data) {\n callback(data);\n }\n });\n}", "function findSong(){\r\n\"https://rest.bandsintown.com/artists/\" + artist + \"/events?app_id=codingbootcamp\"\r\n\r\n\r\n\r\n// query \r\n\r\n\r\n// axios call\r\n \r\n// get the info and\r\n\r\n// console log \r\n\r\n}", "function getSpotify(song='The Sign', artist='Ace of Base') {\n\t// console.log(\"Spotify function ran\");\n\t// console.log(\"spotifyClient: \", spotifyClient);\n\n\tspotifyClient.search({type: 'track', query: song, artist: artist, limit: 1})\n\t\t.then(function(data) {\n\t\t\tvar firstItem=data.tracks.items[0];\n\t\t console.log(\"\\n\\n\" + \"SPOTIFY SONG RESULTS\".black.bgMagenta);\t\t\t\n\t\t\t// console.log (JSON.stringify(firstItem, null, 2));\n\t\t\tconsole.log(`Artist ${firstItem.album.artists[0].name.underline} | Song name ${firstItem.name} | Album name is ${firstItem.album.name}`);\n\t\t\tconsole.log(`Preview url ${firstItem.preview_url}`.white);\n\n\t\t}, function(err) {\n\t\t\tconsole.log('Sorry, I had a problem. ', err);\n\t\t});\n}", "function get_from_server(url, callback) {\n var request = kiwiServer.request(\"GET\", url , {\"host\": SERVER_ADDR});\n var result= \"\";\n request.addListener('response', function (response) {\n response.setBodyEncoding(\"utf8\");\n response.addListener(\"data\", function (chunk) {\n result += chunk;\n });\n response.addListener(\"end\", function (chunk) {\n callback(null, result, response);\n });\n });\n request.close();\n}", "function get_loudspeaker_name() {\n var myREQ = new XMLHttpRequest();\n myREQ.open(method=\"GET\", url=\"php/functions.php?command=get_loudspeaker_name\", async=false);\n myREQ.send();\n return (myREQ.responseText);\n}", "function lookupSpecificSong() {\n\n // Calls Spotify API to retrieve a specific track, The Sign, Ace of Base\n spotify.lookup({type: 'track', id }, function(err, data) {\n if (err) {\n logOutput.error(err);\n return\n }\n\n // Prints the artist, track name, preview url and album name\n logOutput(\"Artist: \" + data.artists[0].name);\n logOutput(\"Song: \" + data.name);\n logOutput(\"Spotify Preview URL: \" + data.preview_url);\n logOutput(\"Album Name: \" + data.album.name);\n });\n}", "function getCCDA(url,uid,callback){\n var options = {\n host: api_domain,\n path: url+'?api_key='+api_key+'&uid='+uid,\n port: api_port\n}\n//Get the bindaas api\nvar request = http.request(options, function (res) {\n var data = '';\n res.on('data', function (chunk) {\n data += chunk;\n });\n res.on('end', function () {\n callback(data);\n });\n });\n request.on('error', function (e) {\n console.log(e.message);\n console.log(\"please check that your bindaas API is succesfully set up\");\n });\n request.end();\n}", "function parseSidUrl(baseUrl, urlExt) {\n sidPos = baseUrl.indexOf('/?SID=');\n sid = '';\n urlExt = (urlExt != undefined) ? urlExt : '';\n\n if(sidPos > -1) {\n sid = '?' + baseUrl.substring(sidPos + 2);\n baseUrl = baseUrl.substring(0, sidPos + 1);\n }\n\n return baseUrl+urlExt+sid;\n}", "function SPgetListItemswithid(documentId,DocumentlistName, siteurl,success,failure)\r\n{\r\n\t//debugger;\r\n\t$.ajax({\r\n url: siteurl + \"/_api/web/lists/getbytitle('\" +DocumentlistName+ \"')/items?$select=SPCompliance,SPLegal,SPBrand,AXPBrand,loginuserread,reviewerread,Created,Modified,Author/Name,EncodedAbsUrl,IntendedAudience,TargetMarket,AudienceSize,FromAddress,RplyToAddress,CompleteSubjectLine,EmailMarketing,SPComplianceComments,SPLegalcomments,SPBrandcomments&$expand=Author&$filter=Id eq'\"+documentId+\"'\",\r\n method: \"GET\",\r\n headers: { \"Accept\": \"application/json; odata=verbose\" },\r\n success: function (data) {\r\n success(data.d.results); \r\n },\r\n error: function (data) {\r\n debugger;\r\n failure(data);\r\n \r\n }\r\n });\r\n}", "function parseSidUrl(baseUrl, urlExt) {\n var sidPos = baseUrl.indexOf('/?SID=');\n var sid = '';\n urlExt = (urlExt != undefined) ? urlExt : '';\n\n if(sidPos > -1) {\n sid = '?' + baseUrl.substring(sidPos + 2);\n baseUrl = baseUrl.substring(0, sidPos + 1);\n }\n\n return baseUrl+urlExt+sid;\n}", "function parseSidUrl(baseUrl, urlExt) {\n var sidPos = baseUrl.indexOf('/?SID=');\n var sid = '';\n urlExt = (urlExt != undefined) ? urlExt : '';\n\n if(sidPos > -1) {\n sid = '?' + baseUrl.substring(sidPos + 2);\n baseUrl = baseUrl.substring(0, sidPos + 1);\n }\n\n return baseUrl+urlExt+sid;\n}", "function parseSidUrl(baseUrl, urlExt) {\n var sidPos = baseUrl.indexOf('/?SID=');\n var sid = '';\n urlExt = (urlExt != undefined) ? urlExt : '';\n\n if(sidPos > -1) {\n sid = '?' + baseUrl.substring(sidPos + 2);\n baseUrl = baseUrl.substring(0, sidPos + 1);\n }\n\n return baseUrl+urlExt+sid;\n}", "function spotifySong() {\n\n\t// it will execute user input of argv[3] or it will execute the sign if there is no argv[3]\n\tvar songData = process.argv[3] || \"The Sign Ace of Base\";\n\n\tspotify.search({ type: 'track', query: songData }, function(err, data) {\n \tif (err) {\n \tconsole.log('Error occurred: ' + err);\n \t// return;\n \t}\n \t// console.log(data);\n \t// console.log(data.tracks.items);\n\n \tfor (var i = 0; i < 1; i++){\n\n \t\t// artist's name\n \t\tconsole.log(\"\");\n \t\tconsole.log('Artists\\' Name:');\n \t\tdata.tracks.items[i].artists.forEach(function(el){\n \t\t\tconsole.log(el.name);\n \t\t});\n\n \t\t// song name\n \t\tconsole.log(\"\");\n \t\tconsole.log('Song Name:');\n \t\tconsole.log(data.tracks.items[i].name);\n\n \t\t// this is name of album\n \t\tconsole.log(\"\");\n \t\tconsole.log('Album Name: ' + data.tracks.items[i].album.name);\n\n \t\t// track 30 seconds preview url\n \t\tconsole.log(\"\");\n \t\tconsole.log('Preview of the song:');\n \t\tconsole.log(data.tracks.items[i].preview_url);\n\n \t\t// album image url\n \t\tconsole.log(\"\");\n \t\tconsole.log('Album URL:');\n \t\tconsole.log(data.tracks.items[i].album.external_urls.spotify);\n\n\n \t}\n\n });\n}", "function spotifyThisSong(value) {\n if (value == null) {\n value = \"The Sign\";\n }\n spotify.search({\n type: 'track',\n query: value\n }, function (err, data) {\n if (err) {\n return outputAndLog('Error occurred: ' + err);\n }\n var artist = data.tracks.items[0].album.artists[0].name;\n outputAndLog(\"Artist: \" + artist);\n var song = data.tracks.items[0].name;\n outputAndLog(\"Song: \" + song);\n var link = data.tracks.items[0].external_urls.spotify;\n outputAndLog(\"Link: \" + link);\n var album = data.tracks.items[0].album.name;\n outputAndLog(\"Album: \" + album);\n\n });\n\n}", "function lookupSpecificSong() {\n\n//sets spotify equal to the key info to call the spotify API\nvar spotify = new Spotify(SpotifyKeys.spotify);\n\n//searches the spotify API by track name \nspotify\n .request( 'https://api.spotify.com/v1/tracks/3DYVWvPh3kGwPasp7yjahc' )\n .then(function(response) {\n //Console.logs the response from the Spotify API for Artist, Song title, URL, and Album name\n logOutput(\"Command: spotify-this-song \" + response.name);\n logOutput(\"Artist: \" + response.artists[0].name);\n logOutput(\"Song: \" + response.name);\n logOutput(\"Spotify preview URL: \" + response.preview_url);\n logOutput(\"Album name: \" + response.album.name);\n logOutput(\"------------\");\n })\n .catch(function(err) {\n //console.logs any caught errors\n console.log(err);\n logOutput(err);\n });\n}", "function parseSidUrl(baseUrl, urlExt) {\n var sidPos = baseUrl.indexOf('/?SID=');\n var sid = '';\n urlExt = (urlExt != undefined) ? urlExt : '';\n\n if (sidPos > -1) {\n sid = '?' + baseUrl.substring(sidPos + 2);\n baseUrl = baseUrl.substring(0, sidPos + 1);\n }\n\n return baseUrl + urlExt + sid;\n}", "function getPresentationId (presUrl) {\n var presIdTmp = presUrl.substring(presUrl.indexOf(\"prezi.com/\") + 10);\n return presIdTmp.substring(0, presIdTmp.indexOf('/'));\n}", "function api_getsid(ctx, user, passwordkey, hash) {\n ctx.callback = api_getsid2;\n ctx.passwordkey = passwordkey;\n api_req({\n a: 'us',\n user: user,\n uh: hash\n }, ctx);\n}", "function spotify(song) {\n\n//this song is a default if user did not request the song\nsong = \"The Sign by Ace of Base\"\nif (parameter ==\"\"){\n parameter = song;\n}\n\n//send request to spotify queryURL\nvar spotify = require ('spotify');\n\n//run the request to spotify with specific song the user entered\nspotify.search({ type: 'track', query: parameter }, function(err, data) {\n if ( err ) {\n //console.log('Error occurred: ' + err);\n return;\n }\n\n\n //loop through all the data requested\n //for (var i=0; i<11; i++) {\n\n //console.log(JSON.stringify(data, null, 2));\n //log all necessary information of the song user requested\n ////console.log(\"----------------------------------------------------------------\");\n ////console.log(\"Artist: \" + data.tracks.items[i].artists[0].name);\n ////console.log(\"Song Name: \" + data.tracks.items[i].name);\n ////console.log(\"Spotify Link: \" + data.tracks.items[i].external_urls.spotify);\n ////console.log(\"Album Name: \" + data.tracks.items[i].album.name);\n ////console.log(\"----------------------------------------------------------------\");\n // };\n });\n}", "function get_catalog_id() {\n var url = new URL(window.location.href);\n var catalog_id = url.searchParams.get(\"catalogId\");\n return catalog_id;\n}", "function spotifySearch() {\n\n console.log(\"initializing funciton\");\n var spotify = new Spotify(keys.spotify);\n\n if(!value) {\n value = \"The Sign by Ace of Base\";\n }\n\n \n\n spotify.search({ type: 'track', query: value }, function(error, data, response) {\n if (error) {\n\n console.log('Error occurred: ' + error);\n return;\n }\n var songInfo = data.tracks.items[0];\n var songData =\n \"\\r\\n Artist: \" + songInfo.artists[0].name +\n \"\\r\\n Song Title: \" + songInfo.name +\n \"\\r\\n Song Preview: \" + songInfo.preview_url ;\n\n console.log(songData);\n }); \n \n }", "function voice(id) {\n\n // checking if the user is on a podcast page\n if (window.location.href.includes('podcast')) {\n var url = window.location.href + 'voiceadd/' + id;\n // console.log('☸️ this is the url: ' + url);\n $.ajax({\n url: url,\n dataType: 'json',\n success: function (data) {\n console.log('☸️ server says:');\n console.log(data);\n },\n error: function (err) {\n console.log('❗️ something went wrong..');\n console.log(err);\n }\n });\n }\n else {\n console.log('❗️ please navigate to a podcast page.');\n }\n\n}", "async function getSongsapi() {\n let songs = await fetch(\"https://shazam.p.rapidapi.com/songs/list-artist-top-tracks?id=xxxxxxxx&locale=en-US\", {\n \"method\": \"GET\",\n \"headers\": {\n \"x-rapidapi-key\": \"xxxxxxxxxxxxxxxxx\",\n \"x-rapidapi-host\": \"shazam.p.rapidapi.com\"\n }\n });\n let songsJson = await songs.json();\n let tracks = songsJson.tracks;\n let count = tracks.length - 1;\n displaySongs(tracks, count, true);\n\n}", "function get_syllabus(request, response) {\n \n \tvar syllabus_id = request.url.match(get_syllabus_req_regex)[1];\n \t\n \t// If _id is present, convert it to object\n \tvar id;\n\tif (typeof syllabus_id !== 'undefined') {\n\t\tid = new mongo.ObjectID(syllabus_id)\n\t}\n\tutility.update_status(\"looking for:\");\n\tutility.update_status(id);\n\t\n\tvar message;\n\t\n\tvar collection = config.db.collection('syllabi').findOne({_id:id}, function(err, doc) {\n\t\t\t\t\n\t\tif (err) {\n\t\t\n\t\t\tutility.update_status(\"Error reading syllabi from database: \" + err);\n\t\t\n\t\t} else if (doc == null ) {\n\t\t\n\t\t\tutility.update_status(\"Did not find a match for syllabus ID: \" + syllabus_id);\n\t\t\n\t\t} else {\n\t\t\n\t\t\tutility.update_status(\"Successfully found syllabus id \" + syllabus_id + \" in database\");\n\t\t\tsend_json_message(response, doc);\n\t\t}\n\t});\n}", "async function generateAshortId() {\n let idService = new IdService(process.env.MICRO_API_TOKEN);\n let rsp = await idService.generate({\n type: \"shortid\",\n });\n console.log(rsp);\n}", "function lookupSpecificSong() {\n\n\t// Calls Spotify API to retrieve a specific track, The Sign, Ace of Base.\n\n\tvar songDetails = {\n\t\ttype: \"track\",\n\t\tid: \"\"\n\t};\n\n\tspotify.lookup(songDetails, function (err, data) {\n\n\t\tif (err) {\n\n\t\t\tlogOutput(err);\n\n\t\t\treturn;\n\n\t\t}\n\n\t\t// Prints the artist, track name, preview url, and album name.\n\n\t\tlogOutput(\"Artist: \" + data.artists[0].name);\n\n\t\tlogOutput(\"Song: \" + data.name);\n\n\t\tlogOutput(\"Spotify Preview URL: \" + data.preview_url);\n\n\t\tlogOutput(\"Album Name: \" + data.album.name);\n\n\t});\n\n}", "function playSong(spotify_uri) {\n const device = $(\"#device-dropdown\").val();\n //console.log(\"device id: \" + device);\n //console.log(\"access_token: \" + access_token);\n\n const play = $.ajax({\n url: 'https://api.spotify.com/v1/me/player/play?device_id=' + encodeURIComponent(device),\n type: 'PUT',\n headers: {\n 'Content-Type': 'application/json',\n 'Authorization': 'Bearer ' + access_token\n },\n data: JSON.stringify({\n context_uri: spotify_uri\n }),\n success: function (data) {\n console.log(\"successfully played song\");\n console.log(data);\n },\n error: function (request, status, error) {\n console.log(\"Status: \" + status + \", repsonse: \" + request.responseText);\n }\n });\n}", "function songfind() {\n\nvar spotify = new Spotify(\n keys.spotify\n);\n var songTitle = process.argv.slice(2);\nspotify.search({ type: 'track', query: songTitle, limit: 1 }, function(err, data) {\n if (err) {\n return console.log('Error occurred: ' + err);\n }\n\n // console.log(\"Artist: \" + \"\");\n console.log(\"Song: \" + data.tracks.items[0].name);\n console.log(\"Spotify URL: \" + data.tracks.items[0].preview_url);\n console.log(\"Album Name:\" + data.tracks.items[0].album.name)\n\t\n})}", "function extractIdFromUri( uri ) {\n if ( !uri ) {\n return;\n }\n\n var matches = uri.match( rPlayerUri );\n return matches ? matches[0].substr(30) : \"\";\n }", "function get(_url, _callback) {\n\t$.get(_url + (_url.indexOf('?') > -1 ? '&' : '?') + 'signed_request=' + CastleAge.signed_request, _callback);\n}", "function spotifythissong(name) {\n var spotify = require('node-spotify-api');\n var spotify = new spotify({\n id: keys.spotify.id,\n secret: keys.spotify.secret\n });\n\n spotify.search({ type: 'track', query: 'All the small things', artists: \"artist\" }, function (err, data) {\n if (err) {\n\n return console.log('there is an error' + err);\n }\n console.log(data.tracks.items[0]);\n\n\n });//End of the spotify function\n}", "function spot() {\n\tvar Spotify = require('node-spotify-api');\n\n\tvar spotify = new Spotify(keys.spotifyKeys);\n\n\tif (process.argv[3] === undefined) {\n\t\tprocess.argv[3] = 'The Sign Ace of Base'\n\t};\n\n\tspotify.search({ type: 'track', query: process.argv[3] }, function(err, data) {\n if (err) {\n return console.log('Error occurred: ' + err);\n }\n\n\tvar artistName = data.tracks.items[0].artists[0].name;\n\tvar songName = data.tracks.items[0].name;\n\tvar link = data.tracks.items[0].href;\n\tvar album = data.tracks.items[0].album.name;\n\t \n\tconsole.log(\"Artist Name:\", artistName); \n\tconsole.log(\"Song Name:\", songName);\n\tconsole.log(\"Song Link:\", link);\n\tconsole.log(\"Album Name:\", album);\n});\n\n}", "function Action()\n{\n\tweb.url(\n\t\t{\n\t\t\tname : 'dd.xml', \n\t\t\turl : 'http://192.168.0.22:37616/dd.xml', \n\t\t\tresource : 1, \n\t\t\trecContentType : 'application/xml', \n\t\t\treferer : '', \n\t\t\tsnapshot : 't23.inf'\n\t\t}\n\t);\n\n\tweb.url(\n\t\t{\n\t\t\tname : 'dd.xml_2', \n\t\t\turl : 'http://192.168.0.43:8060/dial/dd.xml', \n\t\t\tresource : 0, \n\t\t\trecContentType : 'text/xml', \n\t\t\treferer : '', \n\t\t\tsnapshot : 't24.inf', \n\t\t\tmode : 'HTML', \n\t\t\textraRes : [\n\t\t\t\t{url : 'http://192.168.0.38:8008/ssdp/device-desc.xml', referer : ''}\n\t\t\t]\n\t\t}\n\t);\n\n\tweb.setSocketsOption('SSL_VERSION', '2&3');\n\n\t// Possible OAUTH authorization was detected. It is recommended to correlate the authorization parameters.\n\tlr.thinkTime(5);\n\tweb.customRequest(\n\t\t{\n\t\t\tname : 'token', \n\t\t\turl : 'https://www.googleapis.com/oauth2/v4/token', \n\t\t\tmethod : 'POST', \n\t\t\tresource : 0, \n\t\t\trecContentType : 'application/json', \n\t\t\treferer : '', \n\t\t\tsnapshot : 't25.inf', \n\t\t\tmode : 'HTML', \n\t\t\tbody : 'client_id=77185425430.apps.googleusercontent.com&client_secret=OTJgUOQcT7lO7GsGZq2G4IlT&grant_type=refresh_token&refresh_token=1//0gn8Vfq1TXqA1CgYIARAAGBASNwF-L9IriNk8rl1QSND-iNc4nO_b0j5D46FnShXD209P8CjIDLfT-xfYzUUj6KUNMTMPyDyEsDE'\n\t\t}\n\t);\n\n\tweb.addCookie('LSOLH=|_SVI_Ch9BN2lTVmNmZkNURVR3TEM4U1VQdkI1WUZqbUpvR0JjEMWwuuDX7ugCGBAiP01BRURIZl9xakpDb2xuZWxDRDBMSWtuZEpwdmxNVXdIdnEyMXcycU54QktIRWhaeWZnLXJfSlpFS3lJQmhMMA_:|26451679:8129; DOMAIN=accounts.google.com');\n\n\tweb.addCookie('SEARCH_SAMESITE=CgQIrZAB; DOMAIN=accounts.google.com');\n\n\tweb.addCookie('ACCOUNT_CHOOSER=AFx_qI76SMzCk8KuZNc2GoZyS62UO2MgZNj623Hh3Jb6N9_VCWr-6IOxAgSd4mrqSj9Xz674CXAonblKr2klMoiIB7PxQyQ0JfcfOlvF-MJB9hdm6t857yNzKhkVHX4cktCU1HfndNYaDVYL12Gp1pctOpcHK1CvXsgAtpMDKdYFevxZPXOzauWcyR6kF3u_y-ccvBPYSAhVuVmmGxjGY97a3Kx9AEq1sg; DOMAIN=accounts.google.com');\n\n\tweb.addCookie('OGPC=19018621-1:19019710-1:19019903-1:19019990-1:19020037-1:; DOMAIN=accounts.google.com');\n\n\tweb.addCookie('SID=1AdpJEmRkjuvcFPyokYAoRFgLJOCR7zP3jDUQ-E5CvFj3HOfI0RU350EGoie-Wh_kANBUA.; DOMAIN=accounts.google.com');\n\n\tweb.addCookie('__Secure-3PSID=1AdpJEmRkjuvcFPyokYAoRFgLJOCR7zP3jDUQ-E5CvFj3HOf9yYwYLpdTXU5gFkz7VnRCQ.; DOMAIN=accounts.google.com');\n\n\tweb.addCookie('HSID=AxsCq0UEQOedosZkK; DOMAIN=accounts.google.com');\n\n\tweb.addCookie('SSID=As4SYfcrexlNv_Ra1; DOMAIN=accounts.google.com');\n\n\tweb.addCookie('APISID=VMjAkefyvlfZlqAe/AXj4FpGLTEvj5cgU0; DOMAIN=accounts.google.com');\n\n\tweb.addCookie('SAPISID=ieKIFJSgZYuHeBGP/ALI0UdrDs9q_-U-2e; DOMAIN=accounts.google.com');\n\n\tweb.addCookie('__Secure-3PAPISID=ieKIFJSgZYuHeBGP/ALI0UdrDs9q_-U-2e; DOMAIN=accounts.google.com');\n\n\tweb.addCookie('ANID=AHWqTUmosKig2Z69CfKLyq8y9PCr9PV0pQUwSTarmGOd8UH0j31RTdtSJyD6YKwN; DOMAIN=accounts.google.com');\n\n\tweb.addCookie('LSID=doritos|lso|o.calendar.google.com|o.groups.google.com|o.mail.google.com|o.myaccount.google.com|o.smartlock.google.com|s.AU|s.blogger|s.youtube|ss:1AdpJJnX8nrHNeELnbxWABZpiTEK6KDnZ4-20REIF2HkWU7tGooIe4CgkotuG5O95N2vgw.; DOMAIN=accounts.google.com');\n\n\tweb.addCookie('__Host-3PLSID=doritos|lso|o.calendar.google.com|o.groups.google.com|o.mail.google.com|o.myaccount.google.com|o.smartlock.google.com|s.AU|s.blogger|s.youtube|ss:1AdpJJnX8nrHNeELnbxWABZpiTEK6KDnZ4-20REIF2HkWU7tzMUacTOtT2vnpl58LgifkA.; DOMAIN=accounts.google.com');\n\n\tweb.addCookie('__Host-GAPS=1:lh2mlqXJu2DrL1RbnU1SZ5x2TqDPlduN3Aw4fRRofGa-cqPApsXM4ozyLiPM771imvalslEASGllqkVCgLCwckCeO0XiEw:UmJ7gXRAvPQwMhCs; DOMAIN=accounts.google.com');\n\n\tweb.addCookie('NID=204=BrusSTImAJYr3ud0lW2CeZlWx0m79MZxLcjAHbJ7Kv8LxYvgJQMWyZ9uPhiP-Nr2HBJ7j2-OOJ84DS9LevHTFaSro0OIB58_tzvZ7C4dAIxXV4zjhU1boCrteKx9gv5S8xMLWdfQ1DnO6GoKqFAzFF7825Q393KDrUAusqYLfcZSNCFmIovumJj16HwwKrHx2HB8feqKoYzXwXIOH8bOpleXi1KDkb7tsp2N2cl70hV177XMAQkF2z9q3KH302vXwi1j09CZoHz4U94z_OTgpZ1XYlortdubtFhwCAFyJaNOvXLgaLDomz2RZ-Sy-vMU-ACOOzJJTuDT5GtmOS-SJNIb5x0hUrsQaHOkliumYvOBFEByD5N_-WloGDacLDORhPACg2MdCxc6NwGGQ1c; DOMAIN=accounts.google.com');\n\n\tweb.addCookie('1P_JAR=2020-09-13-11; DOMAIN=accounts.google.com');\n\n\tweb.addCookie('SIDCC=AJi4QfHCdNNu4e3v6Zc84CAPOUxZ3rs2qvFNvqPjLzzCQgRIbwmZwYUQzMmEjEDM39zVOPDyHFs; DOMAIN=accounts.google.com');\n\n\tweb.addCookie('__Secure-3PSIDCC=AJi4QfF9gGvWSlYRYT5Xk7MxPfypDmszLQ_NaObgZw2qy-EQ2eTO4-mwjbokRuF2UxhNTz92Sjg; DOMAIN=accounts.google.com');\n\n\tweb.customRequest(\n\t\t{\n\t\t\tname : 'ListAccounts', \n\t\t\turl : 'https://accounts.google.com/ListAccounts?gpsia=1&source=ChromiumBrowser&json=standard', \n\t\t\tmethod : 'POST', \n\t\t\tresource : 0, \n\t\t\trecContentType : 'application/json', \n\t\t\treferer : '', \n\t\t\tsnapshot : 't26.inf', \n\t\t\tmode : 'HTML', \n\t\t\tbody : ' '\n\t\t}\n\t);\n\n\tweb.url(\n\t\t{\n\t\t\tname : 'seed', \n\t\t\turl : 'https://clientservices.googleapis.com/chrome-variations/seed?osname=win&channel=stable&milestone=85', \n\t\t\tresource : 0, \n\t\t\treferer : '', \n\t\t\tsnapshot : 't27.inf', \n\t\t\tmode : 'HTML'\n\t\t}\n\t);\n\n\tweb.customRequest(\n\t\t{\n\t\t\tname : 'token_2', \n\t\t\turl : 'https://www.googleapis.com/oauth2/v4/token', \n\t\t\tmethod : 'POST', \n\t\t\tresource : 0, \n\t\t\trecContentType : 'application/json', \n\t\t\treferer : '', \n\t\t\tsnapshot : 't28.inf', \n\t\t\tmode : 'HTML', \n\t\t\tbody : 'client_id=77185425430.apps.googleusercontent.com&client_secret=OTJgUOQcT7lO7GsGZq2G4IlT&grant_type=refresh_token&refresh_token=1//0gn8Vfq1TXqA1CgYIARAAGBASNwF-L9IriNk8rl1QSND-iNc4nO_b0j5D46FnShXD209P8CjIDLfT-xfYzUUj6KUNMTMPyDyEsDE&scope=https://www.googleapis.com/auth/chromesync'\n\t\t}\n\t);\n\n\treturn 0;\n}", "function getAdventureIdFromURL(search) {\n // TODO: MODULE_ADVENTURE_DETAILS\n // 1. Get the Adventure Id from the URL\n console.log(search);\n const id = search.split(\"=\")[1];\n console.log(id);\n return id;\n\n // Place holder for functionality to work in the Stubs\n //return null;\n}", "function restSongSelection(req, res){\n /*\n console.log(\"==== Got Rest Call For Song ====\".blue) \n console.log(\"Artist: \".yellow +(req.query.artist).yellow) \n console.log(\"Song: \".yellow +(req.query.song).yellow);\n console.log(\"================================\".blue);\n */\n //spotifyController.addSongToPlayList(req.query.artist,req.query.song);\n res.send(spotifyController.addSongToPlayList(req.query.artist,req.query.song)); // return something to make the browser happy\n}", "getDeviceID(): Promise<string> {\n return HyperTrack.getDeviceID();\n }", "function _getSipConfig(){var remoteAudioElement=document.getElementById('remoteAudio'),// audio node on index.html\nmodel=UIModel.getInstance(),softphoneSettings=model.softphoneSettings,config={media:{remote:{audio:remoteAudioElement}},ua:{displayName:utils.escapeSoftphoneUsername(softphoneSettings.displayName),authorizationUser:utils.escapeSoftphoneUsername(softphoneSettings.authorizationUser),password:softphoneSettings.sipPassword,uri:softphoneSettings.uri,wsServers:softphoneSettings.wsServers,traceSip:true,registerExpires:60,userAgentString:navigator.userAgent}};return config;}", "function getSong(track) {\n // If there is no track listed display the default of \"The Sign, by Ace of Base\"\n if (track === \"\" || track === undefined || track === null) {\n var defaultTrack = \"The Sign\";\n spotify.search({ type: \"track\", query: defaultTrack, limit: 10 }, function (err, response) {\n if (err) {\n return console.log('It seems you have an error:: ' + err);\n }\n //the default was displaying The Sign by Ty Dolla Sign so I just hard coded the default\n console.log('---------------------------------------------\\nArtist: \"' + \"Ace of Base\" +\n '\"\\nTrack: \"' + \"The Sign\" +\n '\"\\nAlbum: \"' + \"The Sign (US Album) [Remastered]\" +\n '\"\\nLink: \"' + \"https://p.scdn.co/mp3-preview/4c463359f67dd3546db7294d236dd0ae991882ff?cid=731f3e4c779047e89b0f836152cd61cc\" + '\"\\n');\n });\n }\n else {\n //run if a track is listed\n spotify.search({ type: \"track\", query: track, limit: 3 }, function (err, response) {\n if (err) {\n return console.log('It seems you have an error:: ' + err);\n }\n for (i = 0; i < response.tracks.items.length; i+=1) {\n // if there is no preview default a link\n if (response.tracks.items[i].preview_url === null) {\n console.log('---------------------------------------------\\nArtist: \"' + response.tracks.items[i].album.artists[0].name +\n '\"\\nTrack: \"' + response.tracks.items[i].name +\n '\"\\nAlbum: \"' + response.tracks.items[i].album.name +\n '\"\\nLink: \"' + response.tracks.items[i].album.external_urls.spotify + '');\n }\n else {\n console.log('---------------------------------------------\\nArtist: \"' + response.tracks.items[i].album.artists[0].name +\n '\"\\nTrack: \"' + response.tracks.items[i].name +\n '\"\\nAlbum: \"' + response.tracks.items[i].album.name +\n '\"\\nLink: \"' + response.tracks.items[i].preview_url + '\"');\n }\n }\n });\n }\n}", "function getIDPUrl(){\n return \"https://accounts.sap.com/saml2/idp/sso/accounts.sap.com\";\n}", "function spotifyThisSong(songName) {\n\n // Default set as \"The Sign\" by Ace of Base if user doesn't specify a song.\n if (songName == \"\") {\n songName = \"The Sign\";\n };\n // URL for this one is defined inside \"node-spotify-api\". Therefore it only needs arguments as shown below.\n spotify.search({ type: 'track', query: songName, limit: 10 })\n .then(function (response) {\n\n var spotifyResponse = response.tracks\n\n if (songName == \"The Sign\") {\n return (console.log(\"-----------------------------\" + \"\\n\",\n \"Song Title: \" + spotifyResponse.items[8].name + \"\\n\",\n \"Album: \" + spotifyResponse.items[8].album.name + \"\\n\",\n \"Artist/s: \" + spotifyResponse.items[8].artists[0].name + \"\\n\",\n \"Preview URL: \" + spotifyResponse.items[8].external_urls.spotify + \"\\n\",\n \"-----------------------------\"));\n\n }\n for (var i = 0; i < spotifyResponse.items.length; i++) {\n console.log(\"-----------------------------\");\n console.log(\"Song Title: \" + spotifyResponse.items[i].name);\n console.log(\"Album: \" + spotifyResponse.items[i].album.name);\n console.log(\"Artist/s: \" + spotifyResponse.items[i].artists[0].name);\n console.log(\"Preview URL: \" + spotifyResponse.items[i].external_urls.spotify);\n console.log(\"-----------------------------\");\n }\n })\n .catch(function (err) {\n console.log(err);\n });\n}", "function getUserSpotifyId(){\n // Check for a hash symbol in the URL (A successful login will bring the user to a URL with the Access Token encoded as a hash)\n if(window.location.hash != \"\"){\n // Collect the Access Token from the URL\n var cropToGetToken = window.location.hash;\n cropToGetToken = cropToGetToken.split(\"#access_token=\");\n cropToGetToken = cropToGetToken[1];\n cropToGetToken = cropToGetToken.split(\"&\");\n cropToGetToken = cropToGetToken[0];\n\n // Collect the access token from the cropped window hash\n spotifyAccessToken = cropToGetToken;\n\n // AJAX Call to get the User Information (using the Access Token)\n $.ajax({\n url: 'https://api.spotify.com/v1/me',\n headers: {\n 'Authorization': 'Bearer ' + spotifyAccessToken\n },\n success: function(userInfoResponse) {\n // console.log(userInfoResponse)\n\n // Collect the User's Spotify Id\n userSpotifyId = userInfoResponse.id;\n // Collect the User's Playlists\n // ***Maybe add a call to the getUserPlaylistIDs() here, if we do, then we need to intialize userPlaylistObjects at the top of the page\n }\n });\n }\n }", "function findAlbum(specificId){\n\t\t$.ajax({\n\t\t\ttype:\"GET\", //Get this info from the server.\n\t\t url: 'https://api.spotify.com/v1/artists/5K4W6rqBFWDnAN6FQUkS6x/albums',\n\t\t success: getAlbum,\n\t\t error: errorGettingAlbum,\n\t\t dataType: \"json\"\n\t });\n\t}", "function extractIdFromUrl( url ) {\n if ( !url ) {\n return;\n }\n\n var matches = url.match( rWebUrl );\n return matches ? matches[0].substr(10) : \"\";\n }", "function searchTracks() {\n let searchResults = trackInput.value;\n\n fetch('https://api.soundcloud.com/tracks/?client_id=86b6a66bb2d863f5d64dd8a91cd8de94&q=' + searchResults).then(function(response) {\n if (response.status != 200) {\n console.log('Looks like there was a problem. Status Code' + response.status);\n return;\n }\n\n response.json().then(function(data) {\n let track = data;\n console.log(track);\n\n\n\n let searchedFor = document.createElement('div');\n\n searchedFor.id = 'searchedFor';\n document.body.appendChild(searchedFor);\n document.getElementById('searched').appendChild(searchedFor);\n searchedFor.className = 'searchedFor';\n searchedFor.innerHTML = \"Recent Searches\" +\": \"+ searchResults;\n\n\n\n var clientId = \"/?client_id=86b6a66bb2d863f5d64dd8a91cd8de94\";\n function renderTracks() {\n\n return `\n ${track.map(track =>\n `<div class=\"box\">\n <div class=\"blankImage\"></div>\n <div src=\"${track.stream_url}\"></div>\n <button id=\"albumBtn\" class=\"albumButton\"><img id=\"${track.stream_url}${clientId}\" src=\"${track.artwork_url}\"></img></button>\n <div id=\"songTitle\" class=\"title\">${track.title}</div>\n </div>`\n )}\n `\n }\n\n let markup = `${renderTracks()}`;\n document.getElementById('bands').innerHTML = markup;\n\n var playThis = document.getElementsByClassName('albumButton');\n var playInDocument = document.getElementById('bands').addEventListener('click', function (event) {\n event.target = playThis;\n let playTrack = `<audio src=\"${event.target.id}\" id=\"audio\" controls=\"controls\"></audio>`\n \n return document.getElementById('playAudioHere').innerHTML = playTrack\n\n\n })\n\n\n })\n })\n}", "function song(s) {\n if (s) {\n var songName = s;\n } else {\n var songName = 'the sign';\n }\n spotify.search({ type: 'track', query: songName, limit: 6 }, function(err, data) {\n if (err) {\n return console.log('error: ' + err);\n }\n // log data about the song passed as an argument or 'The Sign' as default\n if (songName === s) {\n console.log('artist: ' + data.tracks.items[0].artists[0].name); \n console.log('song: ' + data.tracks.items[0].name);\n console.log('album: ' + data.tracks.items[0].album.name);\n console.log('listen: ' + data.tracks.items[0].external_urls.spotify);\n } else {\n console.log('artist: ' + data.tracks.items[5].artists[0].name); \n console.log('song: ' + data.tracks.items[5].name);\n console.log('album: ' + data.tracks.items[5].album.name);\n console.log('listen: ' + data.tracks.items[5].external_urls.spotify);\n }\n });\n}", "function playDevice(dID) {\n console.log('play!');\n var request = new XMLHttpRequest();\n\n request.open(\"PUT\", \"https://api.spotify.com/v1/me/player/play?device_id=\" + dID, true);\n // use this if sending json data\n // request.setRequestHeader(\"Accept\",\"application/json\");\n // request.setRequestHeader(\"Content-Type\",\"application/json\");\n request.setRequestHeader(\"Authorization\", \"Bearer \" + fullAccessToken);\n request.onload = function () {\n var data = JSON.parse(this.response);\n if (request.status >= 200 && request.status < 400) {\n console.log(data);\n \n } else {\n alert('An error occurred while attempting to play your device.');\n }\n }\n request.send();\n}", "function getVenueId(response){\n let songkickRes = JSON.parse(response.data.slice([1], response.data.length - 2));\n let venueData = songkickRes.resultsPage.results;\n if(venueData.venue){\n venueId = venueData.venue[0].id;\n console.log('veueId: ' + venueId);\n return venueId;\n } else {\n respond();\n }\n\n }", "function getapi(){\n\tif (window.location.protocol != \"https:\"){\n\t\treturn \"http://wev.se/etc/api\";\n\t} else{\n\t\treturn \"https://wev.se/etc/api\";\n\t}\n}", "function spotifyThisSong() {\n\t// takes in user input for song name\n\tvar song = input;\n\n\t// if no song is provded, the program will default to \"or nah\" by ty dolla $ign\n\tif (input === \"\"){\n\t\tsong = \"The Sign\";\n\t}\n\n\t// this takes in the song request and searches for it using spotify\n\tspotify.search({type: \"track\", query: song}, function(err, data) {\n\t\tif (err) {\n\t\t\tconsole.log(\"Error: \" + err);\n\t\t\treturn;\n\t\t}\n\t\telse {\n\t\t\tvar songData = \"\";\n\t\t\tvar songReturn = data.tracks.items[0];\n\n\t\t\tvar artist = \"\\n\" + \"Artist: \" + songReturn.artists[0].name + \"\\n\";\n\t\t\tsongData += artist;\n\n\t\t\tvar name = \"\\n\" + \"Song Name: \" + songReturn.name + \"\\n\";\n\t\t\tsongData += name;\n\n\t\t\tvar preview = \"\\n\" + \"Preview Link: \" + songReturn.preview_url + \"\\n\";\n\t\t\tsongData += preview;\n\n\t\t\tvar albumName = \"\\n\" + \"Album: \" + songReturn.album.name + \"\\n\";\n\t\t\tsongData += albumName;\n\n\t\t\tconsole.log(\"\\n\" + \"Spotify:\");\n\t\t\tconsole.log(songData);\n\t\t\tdataLog(songData);\n\t\t}\n\t});\n}", "function makeURL(domain, userApiKey) {\r\n var base = \"https://api.shodan.io/shodan/host/search?key=\";\r\n var url = base + userApiKey + '&query=hostname:' + domain;\r\n console.log(url);\r\n return url;\r\n}", "function spotifyRequest() {\n\n var spotify = new Spotify(keys.spotify);\n\n spotify.search({ type: 'track', query: song }, function (err, data) {\n if (err) {\n return console.log('Error occurred: ' + err);\n }\n\n console.log(\"*************this is parse**********\")\n // console.log(JSON.parse(data));\n console.log(\"*************this is stringify**********\")\n // console.log(JSON.stringify(data, null, 2));\n data.tracks.items.forEach(function (element) {\n console.log(\"*************Song's Name**********\")\n console.log(element.name);\n\n console.log(\"*************Artists Name**********\")\n element.artists.forEach(function (element) {\n console.log(element.name + \" \")\n\n })\n\n console.log(\"*************Song's URL**********\")\n console.log(element.external_urls.spotify + \"\\n----------\");\n\n })\n\n });\n}", "function getAdventureIdFromURL(search) {\n // TODO: MODULE_ADVENTURE_DETAILS\n // 1. Get the Adventure Id from the URL\n\n\n // Place holder for functionality to work in the Stubs\n return null;\n}", "function prepareSoundCloud(ifr) {\n\n\t if (ifr.data('player')==undefined && typeof SC != \"undefined\") {\n\t\t var frameID = \"sciframe\"+Math.round(Math.random()*100000+1);\n\t\t try{\n\n\t\t\tifr.attr('id',frameID);\n\t\t\tvar player = SC.Widget(frameID);\n\n\t\t\tplayer.bind(SC.Widget.Events.PLAY,function() {\n\n\t\t\t\t\tstopAllVideos(true,false,ifr.attr('id'));\n\t\t\t\t\tifr.addClass(\"isplaying\");\n\t\t\t\t\tifr.removeClass(\"isinpause\");\n\n\t\t\t\t});\n\t\t\tplayer.bind(SC.Widget.Events.PAUSE,function() {\n\t\t\t\t\tforceVideoInPause(ifr);\n\t\t\t\t\tifr.removeClass(\"isplaying\");\n\n\t\t\t});\n\t\t\tplayer.bind(SC.Widget.Events.FINISH,function() {\n\t\t\t\t\tforceVideoInPause(ifr);\n\t\t\t\t\tifr.removeClass(\"isplaying\");\n\n\t\t\t});\n\t\t\tifr.data('player',player);\n\t\t\tifr.addClass(\"haslistener\").addClass(\"esg-soundcloud\");\n\n\t\t } catch(e) { return false}\n\t} else {\n\t\tvar player = ifr.data('player');\n\t\tif (player!=undefined) {\n\n\t\t\tif (typeof player.getVolume==\"function\") {\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\treturn false;\n\t}\n\n}", "function searchSpotify(query) {\n $.ajax({\n url: \"https://api.spotify.com/v1/search\" + \"?type=album,artist,track,playlist\" + \"&limit=8\" + \"&q=\" + query,\n type: \"GET\",\n dataType: \"json\",\n headers: {\n \"Authorization\": \"Bearer \" + accessToken\n },\n success: function success(result) {\n searchSpotifyResponse(result);\n },\n error: function error(_error) {\n alert(\"An error occured while searching.\");\n console.log(_error);\n }\n });\n} // Play a track", "function getMeSpotify(songName) {\n let spotify = new Spotify(keys.spotify);\n // If there is no song name, set the song to The Sign, from Ace of Base\n if (!songName) {\n songName = \"The Sign\";\n }\n spotify.search({ type: 'track', query: songName }, function (err, data) {\n if (err) {\n console.log('Error occurred: ' + err);\n return;\n } else {\n output =\n \"================= LIRI FOUND THIS FOR YOU...==================\" +\n space + \"Song Name: \" + \"'\" + songName.toUpperCase() + \"'\" +\n space + \"Album Name: \" + data.tracks.items[0].album.name +\n space + \"Artist Name: \" + data.tracks.items[0].album.artists[0].name +\n space + \"URL: \" + data.tracks.items[0].album.external_urls.spotify;\n console.log(output);\n writeToLog(output);\n }\n });\n\n}", "function getVideoId() {\n\t// Get the URL without any query parameters or anchors\n\tlet url = window.location.href;\n\tif(DEBUG) console.log(`Netflix SRT subs URL: ${url}`);\n\n\tmatch = /netflix\\.[a-z]+\\/watch\\/([0-9]+)/i.exec(url);\n\tif(match !== null && match.length > 1) {\n\t\tlet videoId = match[1];\n\t\tif(DEBUG) console.log(`Netflix SRT subs detected this page to be a video (id = ${videoId})`);\n\t\treturn videoId;\n\t}\n\telse {\n\t\treturn null;\n\t}\n}", "function do_login(){\n //console.log(\"what?\")\n SC.initialize({\n client_id: 'ba3b87fec8ae6c8a3b2192aeb474d414',\n redirect_uri: 'http://localhost:8000/callback.html'\n });\n //initiate auth popup\n SC.connect(function() {\n //console.log(\"connected\")\n SC.get('/me', function(me) { \n alert('Hello, ' + me.username); \n });\n });\n getGenre(); \n}", "function V1(url) {\n return new Promise((resolve, reject) => {\n try {\n shoutcast.getShoutcastV1Station(url, function(error, station) {\n resolve(station);\n });\n } catch (err) {\n reject(err);\n }\n });\n }", "function deviceid () {\n console.log('token: ' + token)\n $.ajax({\n url: `https://api.spotify.com/v1/me/player/devices`,\n type: 'GET',\n headers: {\n 'Authorization': 'Bearer ' + token,\n 'Accept': 'application/json',\n 'Content-Type': 'application/json'\n },\n success: function (response) {\n try {\n let deviceId = response.devices[0].id\n console.log('Device id stored ' + deviceId)\n let now = new Date()\n now.setTime(now.getTime() + 10 * 3600 * 1000)\n document.cookie = `deviceId = ${deviceId}; expires=${now.toUTCString()}; path = /`\n } catch (err) {\n window.alert('Please Open Spotify on Your Web or Device!')\n }\n },\n error: function (response) {\n window.alert('Please Open Spotify on Your Web or Device!')\n }\n })\n}", "function getTrack(){\n $.ajax({\n method: \"GET\",\n url: spotify_api,\n data: $(\"form\").serialize(),\n success: onSucess,\n error: onError\n });\n }", "function getSpotify(b){\n\n // Test to see if Spotify works\n // console.log(\"Spotify works!\");\n\n // Paste the sample code from npm\n spotify.search({ type: 'track', query: b }, function(err, data) {\n\n if ( err ) {\n \n console.log('Error occurred: ' + err);\n \n return;\n \n }\n\n // console.log(\"The raw data: \" + JSON.stringify(data, null, 3));\n \n for(var i = 0; i < data.tracks.items.length; i++) {\n\n // Do something with 'data' \n console.log(\"=================================================================\");\n\n console.log(\"Potential Song Origin ~ \" + i);\n \n for(var j = 0; j < data.tracks.items[i].artists.length; j++) {\n\n console.log(\"Artist involved: \" + data.tracks.items[i].artists[j].name);\n \n }\n\n console.log(\"Album Name: \" + data.tracks.items[i].album.name);\n\n console.log(\"Song Name: \" + value);\n\n console.log(\"=================================================================\");\n\n console.log(\"\");\n\n console.log(\"\");\n\n }\n\n checkConfirm();\n \n });\n\n}", "function getTalkId() {\n var talkId = window.location.href.replace('http://localhost:3000/talk/', '');\n return talkId;\n}", "function getSongInfo(arg2) {\n var Spotify = require(\"node-spotify-api\");\n var track = arg2;\n var spotify = new Spotify({\n id: dot.parsed.SPOTIFY_ID,\n secret: dot.parsed.SPOTIFY_SECRET\n });\n\n spotify\n .search({ type: \"track\", query: track, limit: 1 })\n .then(function(response) {\n console.log(response);\n var response = response.tracks.items[0];\n var musicData = [\n divider,\n \"Album Name: \" + response.album.name,\n \"Song Name: \" + response.name,\n \"Artist Name: \" + response.artists[0].name,\n \"Preview Link: \" + response.external_urls.spotify,\n divider\n ].join(\"\\n\\n\");\n console.log(musicData);\n })\n .catch(function(error) {\n console.log(error);\n getSongInfo(\"The Sign Ace of Base\");\n });\n}", "function spotifySong(songName) {\n if (songName === undefined) {\n songName = \"The Sign\";\n }\n\n spotify.search(\n {\n type: 'track',\n query: songName\n },\n function (err, data) {\n if (err) {\n return console.log(\"Error occurred: \" + err);\n }\n\n for (var i = 0; i < data.tracks.items.length; i++) {\n var songs = data.tracks.items[i];\n console.log(i);\n console.log(\"artist(s): \" + songs.artists[0].name);\n console.log(\"song name: \" + songs.name);\n console.log(\"album: \" + songs.album.name);\n if (songs.artists.preview_url) {\n console.log(\"preview song: \" + songs.artists.preview_url);\n } else {\n console.log(\"Sorry preview song not available\");\n \n }\n console.log(\"-----------------------------------\");\n }\n });\n}", "function spotify(song) {\n var spotify = new Spotify(keys.spotify);\n spotify.search({ type: 'track', query: song }, function (err, data) {\n if (err) {\n return console.log('Error occurred: ' + err);\n }\n console.log(\"Artist: \" + data.tracks.items[0].artists[0].name);\n console.log(\"Song name: \" + data.tracks.items[0].name);\n console.log(\"Preview link: \" + data.tracks.items[0].external_urls.spotify);\n console.log(\"Album: \" + data.tracks.items[0].album.name);\n });\n}", "function getArtistInfo(artist) {\r\n\r\n console.log(artist);\r\n // var performer = $(artist).attr('artists-name');\r\n // console.log(\"this is\" + performer);\r\n var apiUrl = 'https://itunes.apple.com/search?term=' + artist +\r\n \"&media=music&country=US&limit=1\";\r\n\r\n $.ajax({\r\n url: apiUrl,\r\n method: 'GET',\r\n dataType: 'json'\r\n }).done(function(response) {\r\n console.log(response)\r\n\r\n previewUrl = response.results[0].previewUrl;\r\n console.log(previewUrl)\r\n \r\n }) //AJAX\r\n} //function get artist info", "function retrieveSong(song) {\n // var song = userEntry[3]; // This has to be commented out in order for do-what-it-says to work... hmmmmmmmm probably a simple fix, but stuck.\n console.log(\"trying to retrieve song info...\")\n var songQuery = [];\n //\n for (i = 3; i < userEntry.length; i++) {\n songQuery.push(userEntry[i]);\n }\n \n var song = songQuery.join(\"+\");\n console.log(song);\n\n // search = song\n\n var spotify = new Spotify(myKeys.spotify);\n\n spotify.search({type: 'track', query: song}, function(err, data) {\n if (err) {\n console.log(\"Looks like an error... try a different SONG? || \" + err)\n }\n\n else {\n \n var songInfo = data.tracks.items[0]\n \n // Prints the artist(s), track name, preview url, and album name.\n console.log(\"Artist(s): \" + songInfo.album.artists[0].name); \n console.log(\"Song: \" + songInfo.name)\n console.log(\"Spotify Preview @: \" + songInfo.preview_url)\n console.log(\"Album: \" + songInfo.album.name);\n\t }\n });\n}", "initleancloud() {\n AV.init({\n appId: keys.appId,\n appKey: keys.appKey\n })\n this.globalData.AV = AV\n }", "function spotifyThis() {\n // console.log(searchQuery);\n if (!searchQuery) {\n searchQuery = \"The Sign by Ace of Base\"\n // console.log(searchQuery);\n }\n spotify.search({\n type: 'track',\n query: searchQuery\n }, function (err, data) {\n if (err) {\n return console.log('Error occurred: ' + err);\n }\n // console.log(JSON.stringify(data.tracks))\n console.log(\"Artist: \" + data.tracks.items[0].album.artists[0].name);\n console.log(\"Song Title: \" + data.tracks.items[0].name);\n console.log(\"Album Name: \" + data.tracks.items[0].album.name);\n console.log(\"Spotify Preview link: \" + data.tracks.items[0].preview_url);\n\n\n\n });\n}", "get(url, callback) {\n rest({\n path: url,\n headers: { Authorization: `Client-Id ${imgurConfig.clientId}` } }).then((response) => {\n callback(response);\n });\n }", "function getUserID() {\n var access_token = getAccessToken();\n fetch('https://api.spotify.com/v1/me', {\n headers: {\n 'Authorization': 'Bearer ' + access_token\n }\n }).then(res => res.json()).then(data => {\n console.log(\"user data\");\n console.log(data);\n p.getUser(data.id);\n })\n }", "function getSessionInfo() \r\n{\r\n xrxSessionGetSessionInfo(\"http://127.0.0.1\", getSessionInfo_callback_Success, getSessionInfo_callback_failure);\r\n}", "function httpResponseHandler() {\n if(xmlHttp.readyState == 4 && xmlHttp.status==200) {\n responseData = JSON.parse(xmlHttp.response);\n displayAdjectiveCloud(responseData['adjective_cloud']);\n }\n }", "function makeRequest(queryString, callback) {\n console.log(\"requestMade for\",queryString);\n var baseUrl = \"https://api.mixcloud.com\";\n var action = \"/search/?q=\";\n var searchWord = queryString.slice();\n var searchType = \"type=cloudcast\"\n var url = baseUrl+action+searchWord+\"&\"+searchType;\n var dummyUrl = \"https://api.mixcloud.com/search/?q=gilles+peterson&type=cloudcast\";\n // console.log(\"lru\", dummyUrl);\n // console.log(\"url\", url);\n\n var xhr = new XMLHttpRequest();\n\n xhr.onreadystatechange = function() {\n if(xhr.readyState === 4 && xhr.status === 200) {\n var resonse = JSON.parse(xhr.responseText);\n callback(resonse);\n // Render-To-DOM-function-callback\n }\n }\n xhr.open(\"GET\", url);\n xhr.send();\n\n}", "function getSite(){\n\t\tconsole.log('GET SIIIITEEEEE');\n\n\t\t//Bluemix Classic (V3 Header)\n\t\t// if( document.querySelector('header.bluemix-global-header') ){\n\t\t// \treturn 'BLUEMIX_CLASSIC';\n\t\t// }\n\t\t// else if ( document.querySelector('body.link') ){\n\t\t// \treturn 'BLUEMIX_ATLAS';\n\t\t// }\n\t\t// //Registration Page\n\t\t// else if ( document.querySelector('body.registration') ){\n\t\t// \treturn 'BLUEMIX_ATLAS';\n\t\t// }\n\t\t// else if ( ! document.querySelector('header') ){\n\t\t// \treturn 'EXTERNAL_SITE';\n\t\t// }\n\t\t// else if ( document.querySelector('header').getAttribute('data-version') === 'V4' || document.querySelector('header').id === 'global-header'){\n\t\t// \treturn 'BLUEMIX_ATLAS';\n\t\t// }\n\t\t//\n\t\t// return 'EXTERNAL_SITE';\n\t\treturn 'IOTPLATFORM';\n\t}", "function getSpotifyPlaylistID(link) {\n var id;\n var indexEndOfID = link.indexOf(\"?\", link.search(\"playlist\") + 9);\n if (indexEndOfID != -1) {\n id = link.slice(link.search(\"playlist\") + 9, indexEndOfID);\n } else {\n id = link.slice(link.search(\"playlist\") + 9);\n }\n //console.log(id);\n return id;\n}" ]
[ "0.76895875", "0.6681648", "0.65367275", "0.6455802", "0.62311125", "0.6102817", "0.5931228", "0.589306", "0.5850929", "0.57600605", "0.5737367", "0.57365894", "0.5649092", "0.5643538", "0.56375027", "0.56375027", "0.55755097", "0.5546863", "0.5516768", "0.5484918", "0.5465605", "0.54406875", "0.54177016", "0.5413702", "0.5383336", "0.536975", "0.53140837", "0.5298479", "0.52947325", "0.5259024", "0.52486706", "0.5236986", "0.5229068", "0.5203468", "0.5203468", "0.5203468", "0.5181618", "0.51698124", "0.51673", "0.51621675", "0.51343215", "0.5133034", "0.512082", "0.51190865", "0.51179624", "0.5113846", "0.5106811", "0.5099515", "0.5097392", "0.5095371", "0.50948435", "0.50942796", "0.509242", "0.5085845", "0.50845295", "0.5077729", "0.5077164", "0.50691134", "0.5059451", "0.50534683", "0.5048334", "0.50356996", "0.50344354", "0.5030229", "0.5021686", "0.5021357", "0.5020498", "0.50174767", "0.4985577", "0.4982802", "0.4982639", "0.49795598", "0.49777016", "0.4963695", "0.49615052", "0.4959192", "0.49586082", "0.49554643", "0.49537584", "0.49535003", "0.4949878", "0.49454346", "0.4943432", "0.49426162", "0.493573", "0.49354872", "0.49352625", "0.49346638", "0.49309775", "0.49257043", "0.49237496", "0.4923228", "0.49223095", "0.49145192", "0.4913186", "0.49130562", "0.4911932", "0.4909177", "0.49082083", "0.49035126" ]
0.7612295
1
simple password checks. raise alert if password or username is empty or if passwords don't match
function PswCheck() { if ($('#usernameFld').val().length > 0 && $('#passwordFld').val().length > 0 && $('#passwordFld').val() === $('#verifyPasswordFld').val()) { $('#alert').hide(); return true; } else { $('#alert').fadeIn(); return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validateCreds(username, password){\n\tlet sql = \"SELECT salt, password FROM appuser WHERE username=?;\";\n\tdb.get(sql, [username], (err, row) => {\n\t\tresult = {};\n\t\tif (err) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\tif (!row) {\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\thashedPass = combineHash(\"\" + row.salt, password);\n\t\t\t\tif (!(hashedPass == row.password)) {\n\t\t\t\t\treturn false;\n\t\t\t\t} else{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\treturn true;\n}", "function isValidPassword(password) {\n\n\n}", "function checkPasswordMatch() {\n var password = $(\"#password\").val();\n var confirmPassword = $(\"#confirmPassword\").val();\n \n if (password != confirmPassword)\n $(\"#divCheckPasswordMatch\").html(\"Passwords do not match!\");\n else\n $(\"#divCheckPasswordMatch\").html(\"Passwords match.\");\n }", "function checkPasswordMatch() {\n var password = $(\"#password-input\").val();\n var confirmPassword = $(\"#password-check\").val();\n \n if (password !== confirmPassword){\n $(\"#divCheckPasswordMatch\").html(\"Passwords do not match!\");\n }\n else{\n $(\"#divCheckPasswordMatch\").html(\"Passwords match.\");\n }\n }", "function verify(){\r\n var uname=document.getElementById(\"username\").value;\r\n var password=document.getElementById(\"pass\").value;\r\n if(uname == \"lovekaushik2001\" && password == \"itsme\"){\r\n alert(\"Welcome love kaushik\");\r\n }\r\n else{\r\n alert(\"Invalid username or password\");\r\n return false;\r\n }\r\n}", "function passwordsMatch(input1, input2) {\n if (input1.value !== input2.value) {\n showError(input2, \"Paswords do not match\");\n }\n}", "function checkPassword() {\n if (theUsername == \"appacademystudent\") {\n if (thePassword == \"pizza\") {\n alert(\"Access granted.\")\n } else {\n alert(\"Access denied.\")\n }\n }else {\n alert(\"I don't know that username.\")\n }\n}", "function check_password(){\n\n\t\tvar password_length = $(\"#password\").val().length;\n\t\tvar password_capital_letters_length = $(\"#password\").val().replace(/[^A-Z]/g, \"\").length;\n\t\tvar password_numbers_length = $(\"#password\").val().replace(/[^0-9]/g,\"\").length;\n\n\t\tif(password_length < 5 || password_capital_letters_length <= 0 || password_numbers_length <= 0){\n\t\t\t$(\"#password_error\").html(\"At least 5 letters and must contain numbers, letters, capital letter\");\n\t\t\t$(\"#password_error\").show();\n\t\t\terror_username = true;\n\t\t} else {\n\t\t\t$(\"#password_error\").hide();\n\t\t}\n\n\t}", "function validate() {\n return okusername && checkPass();\n}", "function checkPasswordMatch(input1 , input2){\n if(input1.value !== input2.value){\n showError(input2,'Password do not match');\n }\n}", "function passwordChecker() {\n password_value = password.value;\n\n if (password_value.length < 8) {\n errorMessage.innerText = \"Password is too short\";\n register.setAttribute(\"disabled\", \"disabled\");\n } else {\n if (password_value.match(/\\d/) === null) {\n errorMessage.innerText = \"Password must contain at least one number.\";\n register.setAttribute(\"disabled\", \"disabled\");\n } else {\n if (password_value.match(/[#%\\-@_&*!]/)) {\n errorMessage.innerText = \"\";\n passwordCompare();\n } else {\n errorMessage.innerText = \"Password must contain at least one special character: #%-@_&*!\";\n register.setAttribute(\"disabled\", \"disabled\");\n }\n\n }\n }\n}", "function checkPasswordsMatch() {\n\tif (password.value !== confirmPassword.value) {\n\t\tshowError(confirmPassword, 'Passwords do not match')\n\t}\n}", "function checkPasswordMatch(password, password2) {\r\n\r\n if (password.value !== password2.value) {\r\n showError(password2, `Passwords do not match`)\r\n };\r\n}", "function uPassword() {\n\t\tvar u_pass = $('#user_pass').val();\n\t\tvar pass_pattern = /^[a-zA-Z0-9]+$/;\n\t\tvar pass_len = u_pass.length;\n\n\t\tif (u_pass == '') {\n\t\t\t$('#alert_pass').text('this field cannot be empty');\n\t\t\tsetTimeout(function () {\n\t\t\t\t$('#alert_pass').text('');\n\t\t\t}, 7000);\n\t\t\treturn false;\n\t\t} else if (pass_len < 8 || pass_len > 15 || !u_pass.match(pass_pattern)) {\n\t\t\t$('#alert_pass').text('please enter password between 8-15 alphanumeric characters');\n\t\t\tsetTimeout(function () {\n\t\t\t\t$('#alert_pass').text('');\n\t\t\t}, 7000);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "function checkPw()\n\t\t{\n\t\tpw = $(\"#psw\").val();\n\t\tun = $(\"#un\").val()\n\t\tconsole.log(pw);\n\n\t\t//currently checks if password has at least 2 digits, 2 letters, and is at least 6 //characters long. Putting bracket thing on end results in an error. Maybe I should ask \n\t\t//stack overflow\n\t\tif (pw.match(\".*\\\\d{2}.*\") && pw.match(\".*\\\\w{2}.*\") && pw.length > 6)\n\t\t{\n\t\tconsole.log(\"Checks out.\")\n\t\t//then it sends the username and password to an SQL database.\t\n\n\t\t//SQL STUFF*********************\n\t\tconnection.query(\"INSERT INTO users_db (username, password) VALUES ('\" + un + \"', '\" + pw + \"')\" , function(err, res) {\n if (err) throw err;\n console.log(res);\n connection.end();\n });\t\n\t\t//SQL STUFF *************\n\t\t}\n\n\n\n\t\t}", "function validation(){\n\tvar password= document.getElementById(\"password\").value\n\tvar username = document.getElementById(\"username\").value\n\n\tif (username == null || username == \"\") {\n\t\talert(\"Name must be filled out\")\n\t} else if(password == null || password == \"\") {\n\t\talert(\"The password must be filled\")\n\t} else if (password !== \"12345\") {\n\t\talert(\"INCORRECT password\")\n\t} else if(password == \"12345\" || username ==\"imelda\") {\n\t\talert(\"PREMIUM ACCESS\")\n\t}\n}", "function checkPasswordMatch(input1, input2) {\n\tif (input1.value !== input2.value) {\n\t\tshowError(input2, 'Passwords do not match');\n\t}\n}", "function checkPasswordMatch(input1, input2) {\n if (input1.value !== input2.value) {\n showError(input2, \"Password does not matches\")\n }\n\n}", "function passChecker(pass, user) {\n if (pass == user) { pass_Criteria.push(\"Password equals username\" + \"\\n\"); }\n if (pass.length < 6) { pass_Criteria.push(\"Password is too short (min: 6 char)\" + \"\\n\"); }\n if (!pass.includes(\"$\") || !pass.includes(\"!\") || !pass.includes(\"#\")) { pass_Criteria.push(\"Password does not include a special character ($, #, !).\" + \"\\n\");}\n}", "function checkPasswordMatch() {\n\t\tvar password = $(\"#txtNewPassword\").val();\n\t\tvar confirmPassword = $(\"#txtConfirmPassword\").val();\n\n\t\tif (password != confirmPassword) {\n\t\t\t$(\"#txtConfirmPassword\").removeClass(\"border-success\");\n\t\t\t$(\"#txtConfirmPassword\").addClass(\"border-danger\");\n\t\t\t$(\"#divCheckPasswordMatch\").html(\"<i><small class='text-danger'>Password Harus Sama</small></i>\");\n\t\t\t$('#tbhUser').prop('disabled', true);\n\t\t} else {\n\t\t\t$(\"#txtConfirmPassword\").removeClass(\"border-danger\");\n\t\t\t$(\"#txtConfirmPassword\").addClass(\"border-success\");\n\t\t\t$(\"#divCheckPasswordMatch\").html(\"<i><small class='text-success'>Password Cocok</small></i>\");\n\t\t\t$('#tbhUser').prop('disabled', false);\n\t\t}\n\t}", "function passwordMatch(password) {\n return password === admin.password;\n}", "function validatePassword(password) {\n\t// validate password\n}", "function validateCredentials() {\n if(usernameInput.value.toLowerCase() === username) {\n if(passwordInput.value === password) {\n return true;\n } \n } \n return false;\n}", "function uConfPassword() {\n\t\tvar u_conf_pass = $('#user_conf').val();\n\t\tvar u_pass = $('#user_pass').val();\n\t\tif (!(u_conf_pass == u_pass)) {\n\t\t\t$('#alert_conf_pass').text(\"Password did'nt matched \");\n\t\t\tsetTimeout(function () {\n\t\t\t\t$('#alert_conf_pass').text('');\n\t\t\t}, 7000);\n\t\t\treturn false;\n\t\t} else if (u_conf_pass === '') {\n\t\t\t$('#alert_conf_pass').text('This field cannot be empty ');\n\t\t\tsetTimeout(function () {\n\t\t\t\t$('#alert_conf_pass').text('');\n\t\t\t}, 7000);\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "function checkPasswordMatch() {\n const password = $(\"#password\").val();\n const confirmPassword = $(\"#password2\").val();\n const feedback = $(\"#divCheckPasswordMatch\");\n\n if (password !== confirmPassword) {\n feedback.html(\"Wachtwoorden zijn niet gelijk!\").removeClass('text-success').addClass('text-danger');\n return;\n }\n\n feedback.html(\"Wachtwoorden zijn gelijk.\").removeClass('text-danger').addClass('text-success');\n }", "function validateConfPass() {\n if (user_conf.value === user_pass.value) {\n document.getElementById(\"alert_conf_pass\").innerHTML = \"\";\n return true;\n }\n document.getElementById(\"alert_conf_pass\").innerHTML =\n \"Password did'nt matched \";\n return false;\n}", "function passwordCheck(password){\n\t// Can't have password of length zero\n\tif(password.length == 0){\n\t\treturn true;\n\t}\n\t// Password must be of length 10 and numeric\n\tif(password.length == 10 && numCheck(password)){\n\t\treturn true;\n\t}\n\tatSplit=password.split('-');\n\tif(atSplit.length== 3 && numCheck(atSplit[0]) && numCheck(atSplit[1]) && numCheck(atSplit[2]) && atSplit[0].length==3 && atSplit[1].length== 3 && atSplit[2].length==4)\n\t{\n\t\treturn true;\n\t}\n\tvalCheck=false;\n\treturn false;\n}", "function checker() {\n\tvar usr = prompt(\"What is your User ID: \");\n\tvar pwd = prompt(\"What is your password: \");\n\n\tconsole.log(idPassCheck(usr, pwd) && idPassLength(usr, pwd) && idCharCheck(usr) && pwCheck(pwd) && passEquals(pwd) && passInt(pwd) && passCase(pwd));\n}", "function checkPasswordMatch() {\n\tvar password1 = document.getElementById(\"passw\").value;\n\tvar password2 = document.getElementById(\"enterPassword\").value;\n\n\tif (password2 == \"\"){\n\n\t} else {\n\t\tif (password1 == password2) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\talert(\"Password does not match!\");\n\t\t\treturn false;\n\t\t}\n\t}\n}", "function checkPasswordsMatch(input1, input2) {\n if (input1.value !== input2.value) {\n showError(input2, 'Passwords do not match');\n }\n}", "function confirmPassword(p1, p2 ){ if (p1.value && p1.value !== p2.value) {\n password2Ok = 0;\n showError(p2, \"Both passwords must match.\")\n} else if (p1.value && p1.value === p2.value) {\n password2Ok = 1;\n showSuccess(p2)\n}\n}", "function checkMatch() {\n var pw1 = $(\"#inputPassword2\").val();\n var pw2 = $(\"#inputPassword3\").val();\n //Update HTML to show user information.\n if (pw1 === pw2) {\n $(\"#match\").html(\"Passwords: Match\");\n } else {\n $(\"#match\").html(\"Passwords: Don't Match\");\n }\n }", "static async validateCredentials({ username, password }) {\n const query = {\n text: `SELECT \n username, password\n FROM \n Users\n WHERE \n username = $1;`,\n values: [username],\n };\n const {\n rows: [user],\n } = await db.query(query);\n if (!user) {\n return false;\n }\n return Password.compare({ password, compareTo: user.password });\n }", "function checkPassword() {\n\tvar password = document.getElementById(\"password\");\n\tvar check_password = document.getElementById(\"check-password\");\n\t\n\tif (isNull(password.value)) {\n\t\tpassword.style.background = \"#FDEDEC\";\n\t\tcheck_password.innerHTML = \"*Password not empty!\"\n\t} else if (!checkLength(password.value)) {\n\t\t\tcheck_password.innerHTML = \"*Password length min 8 letter.\";\n\t} else if (!checkValidate(password.value)) {\n\t\tcheck_password.innerHTML = \"*Password wrong format.\"\n\t} else {\n\t\tflagPassword = true;\n\t\tcheck_password.innerHTML = \"\";\n\t\tpassword.style.background = \"#FFF\";\n\t}\n}", "function passEquals(pw) {\n\treturn pw !== \"password\";\n}", "function check() {\n checkUsername();\n checkEmail();\n checkPassword1();\n checkPassword2();\n}", "function checkPasswordsMatch(input1,input2){\n if(input1.value != input2.value)\n {\n showError(input2,\"Password don't match\");\n }\n\n}", "function checkPassword(password){\n var upperAlphaChars = /[A-Z]/;\n var lowerAlphaChars = /[a-z]/;\n var numbers = /[0-9]/;\n var nonalphaChars = /\\W|_/;\n\n\t//document.getElementById(\"loginUsernameError\").innerHTML=\"Testing\";\n \n \tif(upperAlphaChars.test(password) && lowerAlphaChars.test(password) && \n\t\tnumbers.test(password) && nonalphaChars.test(password) && password.length >= 6){\n\treturn true;\n }\n else return false;\n}", "function check_password(){\n //password same check\n var pwd = $('#user_pwd').val();\n var repwd = $('#user_repwd').val();\n\n if(pwd == \"\" && repwd == \"\")\n return false;\n\n if (pwd != repwd) {\n $('#errmsg').show();\n setTimeout(function() { $(\"#errmsg\").hide(); }, 5000);\n return true;\n } else\n return false;\n}", "function passPatternValid() {\n var errors = document.querySelector(\"#errors\");\n var pass = document.querySelector(\"#pass\").value;\n var password = document.querySelector(\"#secondPass\").value;\n if(pass !== password) {\n errorMessage(\"<p>Please enter a valid Password with 8 to 16 characters one upper case letter and one number!</p>\");\n return false;\n }\n return true;\n }", "function checkPasswords() {\n\n var field_new_pass = document.getElementById('new_password').value;\n var field_conf_new_pass = document.getElementById('conf_new_password').value;\n\n if(field_new_pass != field_conf_new_pass) {\n window.alert('Confirmation of password was failed');\n return false;\n }\n else if(field_new_pass != ''){\n window.alert('Success');\n }\n}", "function passwordCheck(form){\r\n var p1=signup.pass.value.trim();\r\n var p2=signup.repass.value.trim();\r\n var errors= document.querySelector(\".errmessage\");\r\n var charstring =\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\r\n var chars= \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\r\n var numstring =\"0123456789\";\r\n var passAlpha=false; \r\n var passNum=false; \r\n var passChar=false; \r\n\r\n\r\n if(p1.length<8){\r\n clear();\r\n errors.innerHTML+= \"<p>* Password must be at least 8 characters long. <p>\";\r\n signup.pass.focus();\r\n return false; \r\n }\r\n\r\n if(chars.indexOf(p1.substr(0,1))>=0){\r\n passChar=true;\r\n }\r\n if(!passChar){\r\n clear();\r\n errors.innerHTML+= \"<p>* Password must begin with a character. <p>\";\r\n signup.pass.focus();\r\n return false; \r\n }\r\n\r\n for(var i=0; i<p1.length; i++){\r\n clear(); \r\n if(charstring.indexOf(p1.substr(i,1))>=0){\r\n passAlpha=true;\r\n }\r\n }\r\n\r\n if(!passAlpha){\r\n errors.innerHTML+= \"<p>* Password must have at least one upper case letter. <p>\";\r\n signup.pass.focus();\r\n return false; \r\n }\r\n\r\n for(var i=0; i<p1.length; i++){\r\n clear(); \r\n if(numstring.indexOf(p1.substr(i,1))>=0){\r\n passNum=true;\r\n }\r\n }\r\n if(!passNum){\r\n errors.innerHTML+= \"<p>* Password must have at least one number. <p>\";\r\n signup.pass.focus();\r\n return false; \r\n }\r\n \r\n if(p2!=\"\" && p1!=p2){\r\n clear(); \r\n errors.innerHTML+= \"<p>* Passwords do not match! <p>\";\r\n signup.repass.focus();\r\n return false; \r\n }\r\n\r\n return true; \r\n}", "function checkCredentials(userId, password) {\n var identification = (userId != password && userId.length >= 6 && (!userId.includes(\"!\") && !userId.includes(\"#\") && !userId.includes(\"$\")));\n var pass = (password != \"password\")\n && (password.includes(\"!\") || password.includes(\"#\") || password.includes(\"$\"))\n && (password.includes(\"0\") || password.includes(\"1\") || password.includes(\"2\") || password.includes(\"3\") || password.includes(\"4\") || password.includes(\"5\") || password.includes(\"6\") || password.includes(\"7\") || password.includes(\"8\") || password.includes(\"9\"))\n && (password != password.toUpperCase() && password != password.toLowerCase()) ;\n\n if (identification && pass) {\n $(\"#isValid\").text(\"Your credentials are valid.\");\n } else {\n $(\"#isValid\").text(\"Your credentials are not valid. Try again.\");\n }\n//closes yourId()\n}", "function checkPassword() {\r\n const pass = password.value.trim();\r\n\r\n if (pass === '') {\r\n isValid &= false;\r\n\r\n setErrorFor(password, 'Password cannot be empty')\r\n return;\r\n }\r\n\r\n isValid &= true;\r\n}", "function validatePassword(pw)\n{\n if(pw == \"********\") // indicates password has not been changed\n {\n return(true);\n }\n else if(pw.length < 6)\n {\n return(\"Password must be at least 6 characters\");\n }\n else if(hasNumbers(pw)==false)\n {\n return(\"Password must contain at least two digits\");\n }\n else\n {\n return(true);\n }\n}", "function checkPassword() {\n error1 = false;\n message1 = null;\n error2 = false;\n message2 = null;\n pass1 = $('#passwordSpan input');\n pass2 = $('#password2Span input');\n \n // Tests if the input is empty\n if (!pass1.val()) {\n error1 = true;\n message1 = \"Champ vide\";\n }\n \n // The password should be 6 char long at least\n if (pass1.val() && pass1.val().length < 6) {\n error1 = true;\n message1 = \"6 caractères min.\";\n }\n \n if (!pass2.val()) {\n error2 = true;\n message2 = \"Champ vide\";\n }\n\n // The password and its confirmation should be the same\n if (pass2.val() && pass1.val() != pass2.val()) {\n error2 = true;\n message2 = \"Les mots de passe sont différents\";\n }\n \n if (error1) {\n pass1.parents('span').addClass('inputError');\n pass1.attr(\"title\", message1);\n } else {\n removeErrors(pass1);\n }\n \n if (error2) {\n pass2.parents('span').addClass('inputError');\n pass2.attr(\"title\", message2);\n } else {\n removeErrors(pass2);\n }\n}", "function passwordCheckOld() {\n if (\n document.querySelector(\".modifyPassword_form-password input\").value ==\n userObject.password\n ) {\n passwordCheckMatch();\n } else {\n document.querySelector(\".modifyPassword_paragraph-alert\").style.display =\n \"block\";\n document.querySelector(\".modifyPassword_paragraph-alert\").textContent =\n \"Wrong old password\";\n }\n}", "function checkPasswords(input1, input2){\n if(input1.value !== input2.value){\n error(input2, \"Passwords are not matching!\");\n }\n}", "checkPassword(password) {\n return password === this.password;\n }", "function validatePassword() {\n let oldPass = new Password(dom('#oldPassword').value)\n let newPass = new Password(dom('#newPassword').value)\n let newPassConfirm = new Password(dom('#newPassword2').value)\n let errorPrompt = dom('#passwordError')\n\n if (!newPass.match(newPassConfirm)) {\n errorPrompt.innerText = \"Passwords do not match\"\n return false\n }\n if (newPass.lessEq(7) || newPassConfirm.lessEq(7)) {\n errorPrompt.innerText = \"New password must be at least 8 characters\"\n return false\n }\n if (!oldPass.matchStr(\"test\")) {\n errorPrompt.innerText = \"Incorrect password\"\n return false\n }\n errorPrompt.innerText = \"\"\n return true\n}", "function check_inputPassword() {\n\tvar text_password = $(\"#password\").val();\n\tvar show_err_password = $(\"#err_password\");\n\n\tif (text_password.length < 8 || text_password.length > 30) {\n\t\tshow_err_password.html(\"Pass in 8-30 character\");\n\t\treturn false;\n\t}\n\n\tshow_err_password.css({\"color\": \"green\"});\n\tshow_err_password.html(\"OK\");\n\treturn true;\n}", "function checkPassword() {\n\tvar item1 = document.getElementById(\"pwd1\").value;\n\tvar item2 = document.getElementById(\"pwd2\").value;\n var isSame = true;\n var isBig = true;\n\tvar numCount = 0;\n\tvar charCount = 0;\n\tif (item1.length != item2.length) {\n isSame = false;\n }\n if (item1.length < 7) {\n isBig = false;\n }\n \n\tfor (var i = 0; i < item1.length; i++) {\n\t\tif (item1.charAt(i) != item2.charAt(i)) {\n\t\t\tisSame = false;\n }\n \n\t\tif (isNaN(item1.charAt(i))) { \n\t\t\tcharCount++; \n\t\t} else { \n\t\t\tnumCount++; \n\t\t}\n }\n\n if (numCount == 0 || charCount == 0 || !isBig) {\n isBig = false;\n } else {\n isBig = true;\n }\n \n\tif (!isSame) {\n document.getElementById('error').innerHTML = \"*Passwords not identical.<br/>\";\n\t}\t\n\telse {\n\t\tdocument.getElementById('error').innerHTML = \"\";\n }\n \n\tif (!isBig) {\n document.getElementById('error2').innerHTML = \"*Password needs to start with a letter and be 7-20 characters long with at least one number.<br/>\";\n\t}\n\telse {\n\t\tdocument.getElementById('error2').innerHTML = \"\";\n }\n // running into a problem where the innerHTML is not updating before the check and alerts.\n if (isBig && isSame) {\n return true;\n } else {\n return false;\n }\n}", "function checkPassword() {\n\n\n\n}", "function test(name, password) {\n if (name === 'elevenfiftyuser' && password === 'Letmein1234!') {\n return true;\n }\n else {\n return false;\n }\n}", "function checkPasswords() {\n var pw = elements.password.value;\n var pw2 = elements.password2.value;\n if (pw == pw2 && pw != '') {\n\t$(elements.passwordCheckIcon).addClass('ok');\n\t$(elements.substep23).stop(true, true).animate({opacity: 1}, 500);\n\t$(elements.substep24).stop(true, true).animate({opacity: 1}, 500);\n\telements.retreiveSecretKeyButton.disabled = false;\n\telements.role.disabled = false;\n\telements.identity_function.disabled = false;\n } else {\n\t$(elements.passwordCheckIcon).removeClass('ok');\n\t$(elements.substep23).stop(true, true).animate({opacity: 0.2}, 500);\n\t$(elements.substep24).stop(true, true).animate({opacity: 0.2}, 500);\n\telements.retreiveSecretKeyButton.disabled = true;\n\telements.role.disabled = true;\n\telements.identity_function.disabled = true;\n }\n}", "function is_password(password) {\n return password.length > 0;\n}", "checkPassword() {\n if(user.password === '12345'){\n console.log(' Logged in ');\n } else {\n console.log('cannot log in');\n }\n }", "function checkMatch (inputPassword1, inputPassword2){\n if(inputPassword1.value === inputPassword2.value) {\n showSuccess(inputPassword1);\n } else {\n showError(inputPassword1, \"Not matching\");\n }\n}", "function checkPassword() {\n\tvar password = document.getElementById(\"password\").value;\n\tvar retypePassword = document.getElementById(\"retypePassword\").value;\n\tvar hasNumber = /\\d/;\n\tvar hasSpecialCharacter = /\\W/;\n\t//Password must contain at least one number and one special character\n\tif ((password === retypePassword) && (hasNumber.test(password)) && (hasSpecialCharacter.test(password))) {\n\t\tdocument.getElementById(\"passwordError\").innerHTML = \"\";\n\t\tdocument.getElementById(\"retypePasswordError\").innerHTML = \"\";\n\t}\n\telse {\n\t\tdocument.getElementById(\"passwordError\").innerHTML = \"Password must match, have a number and a special character.\";\n\t\tdocument.getElementById(\"retypePasswordError\").innerHTML = \"Retyped password must match, have a number and a special character.\";\n\t}\n}", "function validatePassword() {\n\n // empty array for the final if statement to check\n var errors = [];\n\n if (confirmLowerCase === true) {\n if (finalPass.search(/[a-z]/) < 0) {\n errors.push(\"lower\");\n }\n }\n if (confirmUpperCase === true) {\n if (finalPass.search(/[A-Z]/) < 0) {\n errors.push(\"upper\");\n }\n }\n if (confirmNumeric === true) {\n if (finalPass.search(/[0-9]/i) < 0) {\n errors.push(\"numeric\");\n }\n }\n if (confirmSpecialChar === true) {\n if (finalPass.search(/[!?@#$%^&*]/i) < 0) {\n errors.push(\"specialchar\");\n }\n }\n // if error array has contents, clear password string and regenerate password\n if (errors.length > 0) {\n finalPass = \"\"\n return passwordGen();\n }\n }", "function password() {\n var errors = document.querySelector(\"#errors\");\n var password = document.querySelectorAll(\"#pass\");\n var pass = password.value.trim();\n var patt = /^(?=.*[a-z])(?=.*\\d){8,16}$/ig;\n if(!patt.test(pass)) {\n return false;\n }\n else {\n return true;\n }\n}", "function isValidPassword(password, username) {\n\tconst tooShort = password.length < 8\n\tconst hasSpace = password.indexOf(' ') !== -1\n const usesUsername = password.indexOf(username) !== -1\n return !tooShort && !hasSpace && !usesUsername\n}", "function validatePasswordInput() {\n let typedPassword = document.querySelector(\n \".confirmModifications_form-password input\"\n ).value;\n if (userObject.password == typedPassword) {\n // If there is a match the user is updated in the website\n\n populateUserInfo(userObject);\n\n // The user is updated in the database\n\n put(userObject);\n document.querySelector(\".modal-confirm\").style.display = \"block\";\n closeConfirmModifications();\n } else {\n document.querySelector(\n \".confirmModifications_paragraph-alertWrongPass\"\n ).style.display = \"block\";\n }\n}", "function isValidPassword(password, username) {\n if (password.length < 8) {\n return false;\n }\n if (password.indexOf(' ') !== -1) {\n return false;\n }\n if (password.indexOf(username) !== -1) {\n return false;\n }\n return true;\n}", "function isValidPassword(password, username) {\n\tif (password.length < 8) {\n\t\treturn false\n\t}\n\tif (password.indexOf(' ') !== -1) {\n\t\treturn false\n\t}\n\tif (password.indexOf(username) !== -1) {\n\t\treturn false\n\t}\n\treturn true\n}", "function checkPasswords() {\n var password = document.getElementById('InputPassword');\n var retypePassword = document.getElementById('InputPassword2');\n\n if (password.value != retypePassword.value) {\n showFeedBack(retypePassword.name,\"NoMatch\");\n if(retypePassword.value != \"\"){\n retypePassword.value = \"\";\n retypePassword.focus();\n }\n passwordError = true;\n } else {\n if(retypePassword.value != \"\"){\n showFeedBack(retypePassword.name,\"valid\");\n passwordError = false;\n }\n \n }\n \n }", "function validation_ok() {\n\n return check_username_sync() && check_password();\n}", "function validatePasswords(){\r\n var password = document.getElementById(\"password\").value;\r\n var confirmPassword = document.getElementById(\"confirmpassword\").value;\r\n if (confirmPassword != password){\r\n document.getElementById(\"passwordsmatch\").innerHTML = \"The passwords do not match.\";\r\n }\r\n else{\r\n document.getElementById(\"passwordsmatch\").innerHTML = \"\";\r\n }\r\n}", "function isValidPassword(username, password) {\n var isPasswordLongEnough = thePassword.length > 5;\n var isUsernameShortEnough = username.length < 20;\n var passwordIncludesUsername = thePassword.indexOf(username) != -1;\n var usernameHasWhiteSpace = username !== username.trim();\n var passwordHasWhiteSpace = password !== password.trim();\n\n return (\n isPasswordLongEnough &&\n isUsernameShortEnough &&\n ! passwordIncludesUsername &&\n ! usernameHasWhiteSpace &&\n ! passwordHasWhiteSpace\n );\n }", "function checkPassword(password1, password2) {\n let errorLenght = false;\n let errorMatch = false;\n if (\n // Check length\n password1.match(/\\s+/) ||\n password1.trim().length < 4 ||\n password1.trim().lenght > 32\n ) {\n // Add message to error messages\n composeErrorMessage(\n \"Invalid Password - Must be longer than 4 characters and shorter than 32\"\n );\n errorLenght = true;\n }\n\n if (password1.trim() !== password2.trim()) {\n // Check if passwords match - if not\n // Add unmatch message\n composeErrorMessage(\"Passwords don't match\");\n errorMatch = true;\n }\n\n // If there is just one error than display it\n if (errorLenght || errorMatch) {\n displayErrorMessage(errorMessage);\n }\n return errorLenght || errorMatch;\n }", "function passwordMatchCheck(form) {\n password = form.password.value;\n passwordConfirm = form.passwordConfirm.value;\n\n if (password != passwordConfirm) {\n alert(\"\\nPassword did not match: Please try again...\");\n return false;\n } else {\n return true;\n }\n}", "function validatePasswd() {\n var pass = document.getElementById('pass').value;\n var cpass = document.getElementById('cpass').value;\n return (pass === cpass && pass != \"\" && cpass != '');\n}", "function EntryCheck( pwd, vfy_pwd )\n\t{\n\t if ( pwd != vfy_pwd )\n\t {\n\t alert ( \"ERROR - Your Input Values for ' Password ' and ' Verify Password ' do not match...\" );\n\t return false;\n\t }\n\t else\n\t return true;\n\t}", "function checkPassword ( password ) {\n //check for at least 6 characters in password field\n if ( ! ( /.{6}/.test( password ) ) ) {\n error.innerHTML += \"<li class='error' >Password less than 6 characters</li>\";\n result = true;\n }\n \n //checks whether or not password has special characters, which it must contain at least 1\n if ( ! ( /\\W/.test ( password ) ) ) {\n error.innerHTML += \"<li class='error'>Password must contain special character</li>\";\n result = true;\n }\n\n return result;\n }", "isValidPassword (password) {\n // don't use plaintext passwords in production\n return password === this.password;\n }", "function checkPassword(password, passconf) {\n\tvar password = $(password);\n\tvar passconf = $(passconf);\n\tif (password.val().trim() == passconf.val().trim()) {\n\t\tpassconf.get(0).setCustomValidity(\"\"); // All is well, clear error message\n\t\treturn true;\n\t} else {\n\t\tpassconf.get(0).setCustomValidity(ERR_PASSWORD_MISMATCH);\n\t\treturn false;\n\t}\n}", "function checkPassword() {\n if (this.value.length >= 8) {\n setAccepted('password-validated');\n } else {\n setUnaccepted('password-validated');\n }\n}", "function askPassword(ok, fail) {\n let password = prompt(\"Password?\", \"\");\n if (password == \"rockstar\") ok();\n else fail();\n}", "function check_field_password(password, confirm_password) {\n if (password != confirm_password) {\n set_message('error', 'Passwords don\\'t match. Please try again.');\n clear_message();\n return true;\n }\n return false;\n}", "function isValidPassword(password) {\n return checkStraight(password) && checkContainsLetters(password) && checkContainsPairs(password);\n}", "function validconfpass()\n{\nvar p1=document.getElementById(\"pword\").value;\nvar p2=document.getElementById(\"confpword\").value;\n\n\nif(p1.length==0 )\n{\nalert(\"Password is required\");\n}\n\nif(p1!=p2)\n{\nalert(\"Password does not match\");\n}\nelse if()\n{\ndocument.getElementById(\"mess3\").innerHTML=\"Password confirmed\";\n}\n}", "function checkPass() {\n if (getPass().length > 0) {\n if ((getPass()[0] >= \"a\" && getPass()[0] <= \"z\") || (getPass()[0] >= \"A\" && getPass()[0] <= \"Z\"))/*if the first char letter and not num*/ {\n if (isLetterOrNum(getPass())) {\n if (getPass().length >= 6)/*password at least 6 chars*/ {\n document.ePass.uPass.style.borderColor = \"green\";\n document.getElementById(\"errPass\").style.display = \"none\";\n return true;\n } else {\n document.ePass.uPass.style.borderColor = \"red\";\n document.getElementById(\"errPass\").innerHTML = \"Password have to be at least 6 chars. Left: \" + (6 - getPass().length);\n document.getElementById(\"errPass\").style.display = \"block\";\n return false;\n }\n } else {\n document.ePass.uPass.style.borderColor = \"red\";\n document.getElementById(\"errPass\").innerHTML = \"Only letters or nums\";\n document.getElementById(\"errPass\").style.display = \"block\";\n return false;\n }\n } else {\n document.ePass.uPass.style.borderColor = \"red\";\n document.getElementById(\"errPass\").innerHTML = \"First char have to be letter\";\n document.getElementById(\"errPass\").style.display = \"block\";\n return false;\n }\n } else {\n document.ePass.uPass.style.borderColor = \"grey\";\n document.getElementById(\"errPass\").style.display = \"none\";\n return false;\n }\n}", "function passLengthValid() {\n var errors = document.querySelector(\"#errors\");\n var pass = document.querySelector(\"#pass\").value;\n var password = document.querySelector(\"#secondPass\").value;\n if(!(pass.length == password.length)) {\n errorMessage(\"<p>Please make sure your passwords match!</p>\");\n return false;\n }\n return true;\n}", "function verify()\r\n {\r\n var p=document.getElementById(\"password\").value;\r\n var vp=document.getElementById(\"vpassword\").value;\r\n if(p!=vp)\r\n {\r\n alert(\"Make sure passwords match\")\r\n return false;\r\n }\r\n else\r\n {\r\n return true;\r\n }\r\n }", "function checkPassword(form) {\n password1 = form.password1.value;\n password2 = form.password2.value;\n\n // If password not entered\n if (password1 != password2) {\n document.getElementById(\"pwderror\").innerHTML = '<span style=\"color:red;\">Password did not match: Please try again...</span>';\n return false;\n }\n\n // If same return True.\n else {\n document.getElementById(\"pwderror\").innerHTML = \"\";\n return true;\n }\n}", "function checkPass() {\n var pass = \"\";\n $(opts['classname']).each(function(i){\n if (i == 0) {\n pass = $(this).val();\n } else {\n if ($(this).val() != pass) {\n if (opts['messages']['confirmation']) {\n errors.push (opts['messages']['confirmation']);\n } else {\n errors.push (opts['title'] + ' confirmation mismatch');\n }\n }\n }\n });\n }", "function isValidPassword(password, username) {\r\n let tooSmall = password.length < 8;\r\n let spc = password.indexOf(' ') !== -1;\r\n let similar = password.indexOf(username) !== -1;\r\n if (tooSmall || spc || similar) return false;\r\n return true;\r\n}", "function checkPassword() { \n if (checkedUpper) {\n var a = findCommonElement(passwordArray, upperCase) // compare to passwordArray\n } else {\n a = 'N/A';\n }\n if (checkedLower) {\n var b = findCommonElement(passwordArray, lowerCase) // compare to passwordArray\n } else {\n b = 'N/A';\n }\n if (checkedSpecial) {\n var c = findCommonElement(passwordArray, special) // compare to passwordArray\n } else {\n c = 'N/A';\n }\n if (checkedNumbers) {\n var d = findCommonElement(passwordArray, numbers) // compare to passwordArray\n } else {\n d = 'N/A';\n }\n if (!a || !b || !c || !d) {\n return false;\n } else {\n return true;\n }\n}", "function judgePassword()\n{\n var password = document.getElementById(\"Password_Password\").value;\n clearDivText(\"Div_Password\");\n if(password.length < 6)\n {\n setDivText(\"Div_Password\", TYPE_ERROR, \"密码过短\");\n return false;\n }\n if(password.length > 20)\n {\n setDivText(\"Div_Password\", TYPE_ERROR, \"密码过长\");\n return false;\n }\n if(isTextSimple(password))\n {\n setDivText(\"Div_Password\", TYPE_CORRECT, \"\");\n return true;\n }\n else\n {\n setDivText(\"Div_Password\", TYPE_ERROR, \"密码不合法\");\n return false;\n }\n}", "function askPassword(ok, fail) {\r\n let password = prompt(\"Password?\", '');\r\n if (password == \"rockstar\") ok();\r\n else fail();\r\n}", "function idPassCheck(user, pw) {\n\treturn user !== pw;\n}", "function checkPasswords() {\n\tvar err = document.getElementById(\"password-error\");\n \tvar val = document.getElementById(\"password\").value;\n\t\n\tvar valid = true;\n\terr.style.visibility = \"hidden\";\n\t\n if (val == \"\") {\n\t\tvalid = false;\n \t}\n\telse if (val.length < 6) {\n\t\terr.innerHTML = \"Password must be at least 6 characters\";\n\t\tvalid = false;\n\t}\n\telse if (document.getElementById(\"password2\").value != val) {\n\t\terr.innerHTML = \"Passwords must match\";\n\t\tvalid = false;\n\t}\n\n\tif (!valid)\n\t\terr.style.visibility = \"visible\";\n\n\treturn valid;\n\n}", "function checkPassword(password, userName) {\n if (password.length < 8) {\n return false;\n } else if (password.includes(' ')) {\n return false;\n } else if (password.includes(userName)) {\n return false;\n }\n return true;\n}", "function verify() {\n var user = document.getElementById(\"alias\").value;\n var passw = document.getElementById(\"pass\").value;\n if (user == \"ambuj\" && passw == \"kumar\") {\n alert(\"The user \" + user + \" is verified.\");\n } else {\n alert(\"The user is invalid.\");\n }\n}", "function userChecker(user, pass) {\n if (user == pass) { user_Criteria.push(\"Username equals password\" + \"\\n\"); }\n if (user.length < 6) { user_Criteria.push(\"Username is too short (min: 6 char)\" + \"\\n\"); }\n if (user.includes(\"$\") || user.includes(\"!\") || user.includes(\"#\")) { user_Criteria.push(\"Username includes a special character ($, #, !).\" + \"\\n\"); }\n}", "function validPassword(password, username) {\r\n if (password.length < 8) {\r\n return false;\r\n }\r\n if (password.indexOf(' ') !== -1) { //indexof gives -1 when the element is not there\r\n return false;\r\n }\r\n if (password.indexOf(username) !== -1) {\r\n return false;\r\n } \r\n return true\r\n}", "function checkPass(p1, p2) \r{\r\tvar error = \"\";\r\t\r\t// Contraseñas distintas\r\tif (p1 != p2) \r\t{\r\t\tdocument.getElementById(\"p1label\").className = \"error\";\r\t\terror = \"<b>Passwords don't match</b>\";\r\t}\r\telse \r\t{\r\t\t// Contraseña con menos de 6 carácteres\r\t\tif (p1.length < 6) \r\t\t{\r\t\t\tdocument.getElementById(\"p1label\").className = \"error\";\r\t\t\terror = \"<b>At least 6 characters</b>\";\r\t\t}\r\t\telse \r\t\t{\r\t\t\t// Contraseña con mas de 15 carácteres\r\t\t\tif (p1.length > 15) \r\t\t\t{\r\t\t\t\tdocument.getElementById(\"p1label\").className = \"error\";\r\t\t\t\terror = \"<b>Less than 15 characters</b>\";\r\t\t\t}\r\t\t\telse \r\t\t\t{\r\t\t\t\t// Contraseña con carácteres inválidos. Se admiten los mismo\r\t\t\t\t// carácteres que en el usuario\r\t\t\t\treg = /^[A-Za-z0-9_\\-]*$/;\r\r\t\t\t\tif (!reg.test(p1)) \r\t\t\t\t{\r\t\t\t\t\tdocument.getElementById(\"p1label\").className = \"error\";\r\t\t\t\t\terror = \"<b>Invalid character</b>\";\r\t\t\t\t}\r\t\t\t}\r\t\t}\r\t}\r\r\treturn error;\r}", "function warnPasswordIsBad(){\n var dumStr = $('#passwordValue').val();\n if (!(passwordLength(dumStr) || dumStr=='')){\n $(\"#passwordMessage\").html('<p style=\"color:red;\">Password must be six characters long or longer.</p>');\n }\n}", "function passV() {\n var pass = document.getElementById('pass').value;\n if (pass.length == 0) {\n showWarning(\"Password field empty\");\n return false;\n } else if (pass.length < 2) {\n showWarning(\"Password must be minimum 3 characters long\");\n return false;\n }\n return true;\n\n}", "function check()\n{\n\tvar pass1 = document.getElementById('pass');\n\tvar pass2 = document.getElementById('confirmpass');\n\tif(pass1.value != pass2.value)\n\t{\n\t\talert(\"Password Not Match\");\n\t\treturn false;\n\t}\n}" ]
[ "0.73250186", "0.7298997", "0.7296585", "0.7279182", "0.7254303", "0.7237787", "0.7219309", "0.7173442", "0.71519846", "0.7150609", "0.71438104", "0.7141677", "0.7135826", "0.71343863", "0.7132594", "0.7119334", "0.7104924", "0.7099809", "0.70744836", "0.70714045", "0.7054135", "0.705252", "0.70519656", "0.70405585", "0.70373696", "0.70305157", "0.70286095", "0.7012377", "0.7004789", "0.7002646", "0.700132", "0.6997866", "0.6997189", "0.6991826", "0.6979402", "0.69466275", "0.69375473", "0.6921957", "0.6913911", "0.6913764", "0.6908428", "0.69073856", "0.69042426", "0.6900976", "0.6893415", "0.6881036", "0.6875129", "0.6872808", "0.6867899", "0.6864981", "0.68620616", "0.68529105", "0.6849024", "0.6842625", "0.684254", "0.68412644", "0.6836727", "0.68349665", "0.68314284", "0.6829287", "0.6825419", "0.68244493", "0.6819436", "0.68059474", "0.68050975", "0.68028617", "0.67964506", "0.6790716", "0.67806923", "0.6775067", "0.6766445", "0.6765856", "0.6757454", "0.6750305", "0.673874", "0.67345047", "0.67321503", "0.67315423", "0.67243", "0.6722509", "0.6716331", "0.6716094", "0.6709803", "0.6709011", "0.6706814", "0.67035115", "0.66962034", "0.66945416", "0.66943026", "0.6694224", "0.66916496", "0.66859806", "0.66836", "0.66818637", "0.66787064", "0.6677363", "0.66736794", "0.66724753", "0.6672079", "0.6670974" ]
0.74553084
0